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

Allow setting maximum y-scale factor #388

Merged
merged 1 commit into from
Sep 21, 2015
Merged

Allow setting maximum y-scale factor #388

merged 1 commit into from
Sep 21, 2015

Conversation

noais
Copy link
Contributor

@noais noais commented Sep 18, 2015

No description provided.

@liuxuan30
Copy link
Member

Hey noais, thanks for your PR! There is a issue about maxScaleY:#256. You will see Daniel said maxScaleY is just a much more complex issue :-)

So I hope you could read the post, and test more. It's not as easy as you would think first about maxScaleY :)

@noais
Copy link
Contributor Author

noais commented Sep 19, 2015

I implement this because there aren't a way to stop the zoom in on the y axis, like the x axis. With this feature Is possible avoid labels duplicated. I implemented this because I have the same issue like #315

@noais
Copy link
Contributor Author

noais commented Sep 19, 2015

I need to read more carefully the issue #256 because I don't get the problem.

@liuxuan30
Copy link
Member

@noais, I remember the problem I had is for horizontal bar chart. I don't know why maxScaleY is complcated as @danielgindi said, but when I think I face the same problem, horizontal bar chart's xAxis is like yAxis, and the maxScaleX issue on horizontal bar chart is same as maxScaleY issue on bar chart I guess.

Anyway, you may want to test more on bar/line/horizontal bar chart for maxScaleY. @danielgindi, do you remember why maxScaleY is complicated?

@noais
Copy link
Contributor Author

noais commented Sep 21, 2015

@liuxuan30 I found this wrong behaviour:
http://imgur.com/chYcHLV

When we zoom in and the limit is past, zoom in is stopped but the chart is scrolling to up side.
Is this one the problem?

This can be resolved when we have the max Y we can block the all zoom in events.

@noais
Copy link
Contributor Author

noais commented Sep 21, 2015

This problem happen with setMaximumScaleX and this is already in the main project.
I don't see the diference between setMaximumScaleX with setMaximumScaleY.

This behaviour must be fixed, for both cases beyond this problem I don't see what issue can have maxScaleY specifically?

@liuxuan30
Copy link
Member

if you are confident, just test different charts as many as possible with different situations.

@danielgindi danielgindi merged commit 2006671 into ChartsOrg:master Sep 21, 2015
@danielgindi
Copy link
Collaborator

There were a few reasons:

  1. That conversation at viewPortHandler.setMaximumScaleX not working for horizontal bar chart #256 was in the context of the plans to change x-indexes into x-values. Along with supporting logarithmic y-axis etc. We are looking at ways to implement those, and it requires mainly a rewrite of the Transformer and the ViewPortHandler. We are lucky that they are different classes and not just code mixed in random places in the project...
  2. There's the possible collisions with auto-scaling and other features that work on the Y axis

But this is fine as a solution for the time being - as it seems to work in "normal" situations.

Thanks :-)

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

Successfully merging this pull request may close these issues.

3 participants