Skip to content
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

chart is scrolling to top when reach maxScaleY and try zoom in again #463

Closed
liuxuan30 opened this issue Oct 12, 2015 · 7 comments
Closed
Labels

Comments

@liuxuan30
Copy link
Member

Steps to reproduce, using ChartsDemo:
for normal bar chart:

[_chartView.viewPortHandler setMaximumScaleY:3.0];

for horizontal bar chart:

// which is a little confusing, it means the x axis for horizontal bar chart
[_chartView.viewPortHandler setMaximumScaleY:3.0]; 

First reach the max scale level, scroll the chart to the middle, and try zoom in again, it actually starts a scrolling to top, which at first seems zooming.

@noais I guess it's introduced in #388?

@noais
Copy link
Contributor

noais commented Oct 12, 2015

@liuxuan30 yes you right this happens on all charts.
I put this gift http://imgur.com/chYcHLV to explain the issue.

It's hard to fix this issue and the worst part is to not have time to fix him 😓

@iangmaia
Copy link
Contributor

Isn't that the same as #437?
I've sent a pull request that seems to have fixed the issue but it hasn't been reviewed yet.

@liuxuan30
Copy link
Member Author

@iangmaia I don't see it on maxScaleX, only scaleY. Your PR #438 seems only to fix the x axis, while I don't have this problem on x axis. Could you clarify?

@iangmaia
Copy link
Contributor

@liuxuan30 Yes, you're right. I've added now scaleY handling as well.
I think I took the assumption that they were also always gonna be changed together (which is my case and it seemed to fix the issue).

@iangmaia
Copy link
Contributor

@liuxuan30 Actually, I've played around with it a bit more and I realized it fixes only when pinchZoom is enabled. When it is disabled, unfortunately it is still there.

@liuxuan30
Copy link
Member Author

@iangmaia thanks, but why can't it be applied when pinchZoom disabled?

@danielgindi
Copy link
Collaborator

I have merge that PR, and made some fixes. Now it works properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants