If you want the bars to be in the same order as they appear in the datatable regardless of their values, then you need to use discrete string values for the domain axes instead of numbers or dates.
There is also an undocumented feature you could use to treat all your numeric or date/time values as discrete values. Add this to your domain axis options: type: 'category'. On Sun, Dec 4, 2016 at 10:46 PM, Bill Rebey <[email protected]> wrote: > I've tried the BarChart class you mention instead of the "Bar" class, but > the results are the same: No matter what order the data is in when I > create the chart, the chart is drawn with the data re-sorted in ascending > order. > > I need the data either A) left alone and not rearranged, or B) sorted in > Descending order. > > Do you know of any way to achieve this? How can I stop BarChart from > messing with the data, and instead just rendering it in the order given? > > Any direction here is greatly appreciated! > > > On Saturday, December 3, 2016 at 12:28:01 PM UTC-5, Bill Rebey wrote: >> >> It appears that Material Bar Charts always render the data along the Y >> (vertical) axis in Sorted order, Ascending, sorted on Column 0 (the column >> in the Y axis). >> >> It doesn't matter if the DataTable is ordered descending, ordered >> ascending, or randomly ordered. The resultant bar chart always has the >> smallest value (a Date, in my case) at the top, and the largest value at >> the bottom. >> >> I require the inverse of this: newest dates at top, and oldest at bottom. >> >> What am I missing? I can't seem to find any information about the >> Ordering of Bar chart data as it gets rendered. >> >> JSFiddle demonstrated my trouble here: https://jsfiddle.net/brebey/db >> buL8tv/ >> >> -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/91371900-0773-4ca8-aad6- > 356bd362e5a4%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/91371900-0773-4ca8-aad6-356bd362e5a4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMaMjU0wh7nYGpnT7jheuhct7U-JhDwNiM3e3w0Qhe62A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
