I want to zoom into a BarChart in JavaFX. I found this project that does that this way:
private final ValueAxis<?> xAxis;
private final ValueAxis<?> yAxis;
lastY = event.getY();
yAxis.setAutoRanging(false);
yAxis.setLowerBound(yAxis.getLowerBound() + dY);
yAxis.setUpperBound(yAxis.getUpperBound() + dY);
However, I am using CategoryAxis
for xAxis and not a ValueAxis
. So the getLowerBound
function doesn't exist.
How can I adapt that to be able to zoom into a BarChart using a CategoryAxis
as an xAxis?