I have chart that can contain a lot of points (10000 +) When I scale the chart in order to see all points in screen, it takes some time to draw them
Can You advice me some optimization, in order not to draw all points
I'm not an expert with listed technologies, but I would solve this by 'bucketing
' your data points.
Your X axis
is time
, so determine the resolution point for the current chart size. IE, if you are seeing the entire chart you will only need a data point per day
for example. If you are zoomed in a long way, you might want a point per hour
.
Now you have determined resolution, go through your chart, and find all the data that exists between the resolution points, IE, all data that is > 20th April 2011 at 4pm
and < 20th April 2011 at 5pm
if you are on an hourly resolution.
Depending on the type of data you are using, will determine if you want to average
all the data point you have collected, or find the median
(or some other method, such as a candle stick chart
to show the max/min values). Either way, pick the most relevant method, repeat for all points and render the result with your new data.
Hope that's what you meant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With