There is no "out of the box" method for handling this.  Just thinking off 
the top of my head, you could try building a DataView from your DataTable, 
with an additional calculated column that you could use to group adjacent 
data points with the Group data method (
https://developers.google.com/chart/interactive/docs/reference#google_visualization_data_group).
 
 Maybe something like this:

// cols is an array of DataTable column indices 
// zoomLevel is an integer >= 1, where 1 is fully zoomed in and higher 
numbers are zoomed out
var view = new google.visualization.DataView(data);
cols.push({
    type: 'number',
    calc: function (dt, row) {
        return Math.Floor(row/zoomLevel);
    }
});
view.setColumns(cols);

var data2 = google.visualization.data.Group(view, [cols.length - 1], [<
column aggregation objects>]); 

On Thursday, April 19, 2012 4:19:57 PM UTC-4, JayG wrote:
>
> Hello, 
>
> I have a table with millions of data points, and I want to plot them 
> on a google annotated chart. 
>
> For up to 1 week of time, I could plot all points for that week, but 
> for a month , year, and 5 years of time, there are just way too many 
> points plotted on my chart and probably not the most efficient way to 
> visualize the data. 
>
> My question is there any out-of-the-box tools or methods I can use to 
> plot less data points for a years worth of time, and then have it so 
> that it shows more data points when i start zooming into a particular 
> period on the chart? 
>
> Or would I need to come up with a new database with less data points 
> and get averages of data sets per time intervals? 
>
> Any help will be appreciated. Thank you! 
>
> Jay

-- 
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/-/ZnzJgSYpfu0J.
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.

Reply via email to