jfxutils icon indicating copy to clipboard operation
jfxutils copied to clipboard

its possible to only zoom x axis

Open ghost opened this issue 6 years ago • 2 comments

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

ghost avatar May 06 '18 13:05 ghost

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.

gillius avatar May 09 '18 02:05 gillius

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

ghost avatar May 09 '18 14:05 ghost