Skip to content

Commit

Permalink
RotatedAxisLabelSample: Disable AutoRanging
Browse files Browse the repository at this point in the history
Having autoranging enabled on synchronized axes with bound min/max
properties results in errors when the bound properties are modified by
the autoraning algorithm.
  • Loading branch information
wirew0rm committed Sep 29, 2023
1 parent 9e84290 commit 32fc435
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public Node getChartPanel(final Stage primaryStage) {

private static DefaultNumericAxis getSynchedAxis(DefaultNumericAxis orig, String newAxisName) {
final DefaultNumericAxis axis = new DefaultNumericAxis(newAxisName);
axis.setAutoRanging(false);
axis.minProperty().bind(orig.minProperty());
axis.maxProperty().bind(orig.maxProperty());
axis.getTickLabelStyle().setRotate(orig.getTickLabelStyle().getRotate());
Expand Down

0 comments on commit 32fc435

Please sign in to comment.