How to handle HighCharts scaling with large datasets

I have a HighCharts chart and I am showing a trend that has value every minute. So on a given day I will have 1440 data points, because 24 hours = 1440 minutes.

This is ok when I am showing one or two days of data. But if I show 4 weeks, I have 40,000 data points. I can quickly read this data from the server, but it takes a few minutes to generate a graph for HighCharts.

My suggested solution is to interpolate the data on the server side so that we have 1000 points in 4 weeks, or one value every 43 minutes. Then when the user zooms in, use AJAX to re-read the data from the server.

Am I making a mess of this or is this what usually happens? Is there a way to get HighCharts to do something like this for me (and quickly)? I tried the HighCharts DownSample Plugin , but the initial slowness (2-3 minutes to plot) remains.

+3


source to share


1 answer


In fact, you want to use Highstock, dataGrouping

. Demo is here .

If you can't use Highstock, this can be tricky. Check out this ticket though - it's an experimental plugin for Highcharts to use the canvas to render a huge amount of points. Of course IE6 / 7/8 is out of the question.



For on-demand data loading, check out lazy loading article. Yes, this applies to Highstock, but it should be possible to use the same solution in Highcharts. Demo is here .

+2


source







All Articles