Open glutanimate opened 4 years ago
Good suggestion. Here's a plugin that was suggested on that page and seems to be easy to implement: https://www.npmjs.com/package/chartjs-plugin-downsample
A feature has been implemented to support this. However: currently, the downsampled data in the graph is lost, thus decreasing accuracy. In the future a feature could be implemented to take the averages of the omitted data for a more accurate representation. Therefore leaving this open for now.
For future reference: https://stackoverflow.com/questions/5162130/
another option is https://github.com/leeoniya/uPlot :)
Right now simulations spanning over longer periods of time (>3000 days or so) will start to tank the interactive performance of the graph. It would be nice if we could find a way to ameliorate that. One solution might be switching to Chart.js v3.0.0. It's currently in alpha, but offers a data grouping feature for large datasets: https://github.com/chartjs/Chart.js/issues/4053
The issue report above also contains a number of sample plugins that might work on the current stable release of Chart.js, so perhaps those might be worth exploring as well.