Open befinitiv opened 7 years ago
I can confirm this as well. Also, when I was still running v2.2.4 it performed significantly better with the same large dataset. I cannot find the significant difference causing this between the two versions of the file linked by @befinitiv .
edit: this was not the case....
Right now I'm using the Largest-Triangle-Three-Buckets algorithm to slim my data set before handing it to the graph. I have not found a way to automatically load in a more detailed data set when zooming in.
My largest data set is 3 lines, each with 72000 measurements.
I personally would like to see a built in function for this
something like the Douglas Peucker algorithm would be great and is the common method for this sort of thing. However implementing this on your own is a huge pain and would make sense to just have at as an included option with the MPAndroidChart
Thanks for this nice library!
I have one issue: When using the following code, the drawing of a line chart takes prohibitively long (>1s, tested on Wiko Fever 4G and Nexus 7 13):
It seems to me as if all of the points are actually drawn, thus slowing down the update. Reducing the points drawn (by zooming in) the update rate goes back to acceptable levels.
IMO the points that are drawn should be limited to a reasonable number of points, independent of the zoom level. So at fully zoomed out the 20000 points should be "thinned" out to something like 100 points which will then be displayed.
I think the place I am talking about is this one here: https://github.com/PhilJay/MPAndroidChart/blob/master/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/LineChartRenderer.java#L388 In there we iterate over all points within the X-bounds and draw them.