Re: Google Visualization with millions of data points

49 views
Skip to first unread message
Message has been deleted

asgallant

unread,
Apr 20, 2012, 9:23:39 AM4/20/12
to google-visua...@googlegroups.com
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',
    calcfunction (dtrow{
        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
Reply all
Reply to author
Forward
0 new messages