-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calcMinMax() during scrolling / panning #89
Comments
@AlBirdie That sounds great! If you could do a PR just a few notes:
I appreciate your participation in this project very much! :-) |
Sure, not a problem. Do you have any preferences as to how to test performance? |
That sounds good. Actually if you have the time to implement Tests based on On Fri, May 15, 2015 at 1:01 PM, AlBirdie notifications@github.com wrote:
|
Just a quick update, unfortunately it's gonna take a while for me to finish work on this, got a lot of other things to do this week. But we'll get there eventually. ;) |
Ok it was merge, along with some bugfixes. |
Sure, just give me a few minutes. The other changes I've talked about in #92 will then be based on the new master branch. I'm going to make a separate pull request for each feature, that'll make it much easier to spot bugs and make it easier to merge. |
Yes that's a good idea :-) |
Ok, tried the current master branch with the LineChart1ViewController (pinchZoomEnabled = NO, no limit lines, no custom Min/Max) and though the re-draw loop is almost gone, there are still occasional situations where you get like 2 or 3 redraws during panning resulting in a slight flicker of the chart. Personally, I haven't seen this error in our application at all, just in the demo iosCharts demo application. That doesn't mean that the error won't occur in other real-world implementations either. |
It may be the calculating min/max causes base values to change so that calculating another min/max is required. But I think I've fixed that situation so you need to debug it. If you still encounter that issue, you may want to breakpoint on all calls to setNeedsDisplay! |
For finance charts it is basically the industry standard to constantly adjust the chart's min and max values for the currently visible X axis range.
That would mean that we'd need to call calcMinMax with the chart's lowestVisibleXIndex and highestVisibleXIndex instead of just looping from 0 to data.count.
In order not to break any existing implementations, that would ideally be configurable with a boolean.
@danielgindi In case you consider this to be included into the library, I'd be happy to implement it on the current master branch and create a pull request for it (same for Android, but that would have to wait a couple of days). I'm just hoping that this doesn't put too much effort on the CPU, but I reckon that'll be fine as long as the datasets aren't that large.
The text was updated successfully, but these errors were encountered: