[Chartjs]-Chartjs 2 scaling lots of data points

4👍

In the case that you are still interested in ‘dropping data points’, you can have a look at the github issue which is recently active again. See link

https://github.com/chartjs/chartjs-plugin-zoom/issues/75.

There you can find a plugin written earlier this year in js for filtering datasets to include only those which are visible; it can be customized with your own filtering rule. I personally filter the dataset on my backend prior to sending it to javascript though….

Else, if you want to render even more time series data in a ‘scalable’ way, why not use the Chartjs time series/financial line plot ? You can check it out at the official documentation here …

http://www.chartjs.org/samples/latest/scales/time/financial.html … Which is a variant of the line chart ; check out the source code.
Caveat is, use it as is (the source example) if you don’t mind not having interactive tooltips.

Nonetheless in addition to xnakos’s comment , a final thought (a bit of extra that crossed my mind..) on performance renders for even larger data sets, you may experiment with the combination of setting smaller pointRadius (non zero), and not rendering the lines instead. I have found this trick useful as well for allot of points on screen. In your datasets, just set showLine = 'false' and see how to make it work for you.

Leave a comment