Skip to content

Conversation

@dedeibel
Copy link
Contributor

@dedeibel dedeibel commented Nov 14, 2025

Fixes #705 and related problems.

@wirew0rm could you please review and accept these changes.

Benjamin Peter added 4 commits November 13, 2025 17:51
And do not reset inverted setting of x axis when adding the chart.
The cached offset was overwritten by a possibly older method to calculate it
which was not usable on the first run of calculations.
logScaleLengthInv = axisLength / logScaleLength;
offset = axisLength;

offset = isVerticalAxis ? getHeight() : getWidth();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a left over of the bigger changes lately. axisLength from line 606 is already populated during initial rendering while getWidth() seems to be zero and causes the inverted axis to be not placed properly.

setPrefWidth(-1);
setMaxWidth(Double.MAX_VALUE);

xAxis.invertAxisProperty().bindBidirectional(invertedSlide);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This did set xAxis.invertAxisProperty() to false for an axes that was already inverted before adding the zoomer plugin (invertedSlide is initially false).

Bidirectional binding was not required here IMO.

chart6.getFirstAxis(Orientation.VERTICAL).invertAxis(true);
final Zoomer zoomer6 = new Zoomer();
registerZoomerChangeListener(zoomer6, chart6.getTitle());
chart6.getPlugins().add(zoomer6);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reproduction according to Jonas' report.

@sonarqubecloud
Copy link

@dedeibel dedeibel changed the title WIP: Bugfix/705 zoomer plugin issues with inverted axes Bugfix/705 zoomer plugin issues with inverted axes Nov 19, 2025
@dedeibel
Copy link
Contributor Author

Any news on this?

@dedeibel
Copy link
Contributor Author

Is there an estimate on when you might get to looking at the PR?

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.

Zoomer plugin issues with inverted axes

2 participants