Expected Behavior
Other charting libraries automatically group series data instead of rendering every single point (example: http://www.highcharts.com/stock/demo/data-grouping) and here is a detailed explanation of how it's done in amcharts: https://www.amcharts.com/kbase/understanding-data-grouping-of-stock-chart/
Possible Solution
The solution outlined by highcharts.js and amcharts are a bit different:
- Highcharts calculates the point to pixel density, if each point rendered will be smaller than a pixel then there is no need to render each of them, instead data is grouped and by default the average value of the group is calculated (sum is used for bar charts)
- Amcharts implements a customizable solution where the user sets the group size
- In both cases the group size and value is calculated automatically
- A group value function callback could be added for other solutions like max or min value instead of average
- On zoom or resize groups should be recalculated
Context
Often data visualizations require to render thousands of points, this is not necesary becase:
- the user might not be able to understand so much data
- the rendering is too slow
- calculating group averages might display more interesting values than each point
- This solution improves performance because calculating groups should always be faster than rendering on the canvas [this might be up to devate]
Expected Behavior
Other charting libraries automatically group series data instead of rendering every single point (example: http://www.highcharts.com/stock/demo/data-grouping) and here is a detailed explanation of how it's done in amcharts: https://www.amcharts.com/kbase/understanding-data-grouping-of-stock-chart/
Possible Solution
The solution outlined by highcharts.js and amcharts are a bit different:
Context
Often data visualizations require to render thousands of points, this is not necesary becase: