You can do that with a DataView to restrict the number of rows to 10, so you can have an arbitrarily large DataTable, but still only chart the first 10 rows of data. Example:
var view = new google.visualization.DataView(data); view.setRows(0, 9); // use only rows at indices 0-9 Then use the DataView to draw your chart(s) instead of the DataTable. On Monday, December 17, 2012 5:54:46 PM UTC-5, diferdin wrote: > > I see your point, but what I am asking is more along the lines of "here's > my data, make sure you only chart the first x rows in case I ask you to", > which seems a fair option (not a mandatory requirement). The client-side > code would become smaller and more elegant -- two desirable features in > single-threaded clients such as the web ones. In my case, when my server > handles many hundreds of clients I may have to loop over those hundreds > although I only need 5 or 10. Yes -- the server should avoid such data > exchange, but if clients are fairly volatile that may become necessary. > > But anyway, enough of phylantropic talk. Thanks again for your interest. > > Regards. > -- 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/-/0DeoGg76aUwJ. 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.
