Actually, the view returned by getView of the ChartWrapper is only the json representation of the view and it doesn't contain the data. Therefore, the only option to sort the table is if you have it locally and use setRows with the getSortedRows of the table itself or have the data sorted in the server using the query language.
Viz Kid On Thu, Jul 28, 2011 at 4:58 PM, asgallant <[email protected]>wrote: > How would you sort inside the chartWrapper? The only way I can think of > doing it would be like: > > var wrap = new google.visualization.ChartWrapper(...); > wrap.setView(); > var view = wrap.getView(); > var sorted = view.getSortedRows(<sort criteria>); > view.setRows(sorted); > var viewJSON= view.toJSON(); > wrap.setView(viewJSON); > > which seems overly complicated to me, and may not even work at all. > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-visualization-api/-/zhL6i87tYekJ. > > 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. > -- 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.
