views:

231

answers:

1

I have a large number of data points that I want to graph using the Google Visualization: Annotated Time Line. I imagine that outputting, say, 100,000 data.setValue points in JS (using PHP similar to the method described here) to build a DataTable will cause performance issues. Instead, I want to output a small number and then increase depending on the date range selected.

The time line includes an event which is triggered when the range is changed - rangechange().

When the rangechange() method is triggered, is it possible to query a URL to return the data for that date range and then update the time line to display that data? What would the code be to do this?

A: 

yes,

You just make another request back to the server for a new DataTable from the server (give it query parameters to define what time range you're interested in).

Then combine the data that comes back with the data in the previously used datatable (using the addRows() method).

Then recreate the chart and set the range to what it was before the create.

This should give you the effect you are looking for.

  • Bob Light
Bob Light