gillius / jfxutils

JavaFX Utilities - Zoom and Pan Charts and Pane Scaling
Apache License 2.0
68 stars 22 forks source link

Support zooming for arbitrary javafx.scene.chart.Axis implementations… #14

Closed hwaite closed 6 years ago

hwaite commented 6 years ago

… (instead of just ValueAxis). This code was compiled against Java 8 but it should be trivial to make work with v7 if that's important.

gillius commented 6 years ago

Thanks for your submission! I think the whole library is compatible with Java 7 for now but looking at the code I don't see anything specific to Java 8 here. I'm not sure Java 7 is a hard requirement; I simply started the library before JDK 8 was released so most of the code was written then.

What Axis types have lowerBoundProperty/upperBoundProperty besides ValueAxis? Or is this to support potential 3rd party Axis implementations?

hwaite commented 6 years ago

What Axis types have lowerBoundProperty/upperBoundProperty besides ValueAxis? Or is this to support potential 3rd party Axis implementations?

I'd like to work with extfx.scene.chart.DateAxis.

gillius commented 6 years ago

OK, I see that extfx library and it makes sense. If others have similar issues in future jfxutils could be expanded to use lambda to find the property or have properties passed in directly, instead of using reflection and assumed method name.

The only question is whether or not that intermediate String property is needed, it looks like it converts the Date from DateAxis into a Double, then into a String, then back into a Double later... If it's not needed can you remove that extra step? If it is needed, that's fine, and I'll merge it as-is.