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

its possible to only zoom x axis #16

Open
ghost opened this issue May 6, 2018 · 2 comments
Open

its possible to only zoom x axis #16

ghost opened this issue May 6, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented May 6, 2018

hi in my project, i need to only zoom x axis, but not y axis.
its possible?

@gillius
Copy link
Owner

gillius commented May 9, 2018

I believe you can achieve what you want with the ChartZoomManager by setting an axis constraint strategy that always returns horizontal (or only returns that if you are within the plot area or axis if you want). There is a org.gillius.jfxutils.chart.ChartZoomManager#setAxisConstraintStrategy used with mouse drag events, and org.gillius.jfxutils.chart.ChartZoomManager#setMouseWheelAxisConstraintStrategy used with wheel events.

@ghost
Copy link
Author

ghost commented May 9, 2018

hi, thanks for your repl. I have self solved this problem.
but its only a point, For me, in order to not modify your lib,
i have create classes to extend Chart JFXChartUtils and PayManager to modify something fpr panManager and chartZommManager, that i want to. Because from pinmanager instance i cant do that.

So i am thinking, whether its good, that user can directly get pinManager and chartZoomManager instance to modify that.
image

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

No branches or pull requests

1 participant