It works very well, I would sort it with a Query but this table has multiple columns and is used for multiple charts, the columns needs to be sorted differently based on the chart type and I try to avoid doing the query more than once.
Thanks -- Rune V. Sjoen You always pass failure on the way to success On Wed, Dec 2, 2009 at 2:16 PM, Pegasusrjf <[email protected]> wrote: > It appears that the code you show below will work, according to the > API documentation. > > http://code.google.com/apis/visualization/documentation/reference.html > > If the datatable is coming from a Query statement, then you could sort > the return dataset during the query operation. > > On Dec 1, 8:45 am, Gerard Flanagan <[email protected]> wrote: > > Rune V. Sjoen wrote: > > > Is there any way to control the direction of sort when executing > > > datatable.sort(columnindex) ? Whenever I do this the table is sorted > > > on the correct column index but it is sorted ascending. I would like > > > to sort it descending. > > > > > I could simply invert it after sorting but that seems very ugly. > > > > eg. > > > > dt = new google.visualization.DataTable(mydata, 0.6); > > dt.sort({column: 1, desc: true}); > > -- > > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-visualization-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
