import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.chart.BarChart; import javafx.scene.chart.CategoryAxisBuilder; import javafx.scene.chart.NumberAxis; import javafx.scene.layout.StackPane; import javafx.scene.layout.StackPaneBuilder; import javafx.stage.Stage; /** * * @author Alexander Kouznetsov */ public class Bug extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { NumberAxis numberAxis = new NumberAxis(); numberAxis.setLowerBound(-100.0F); numberAxis.setUpperBound(300.0F); numberAxis.setTickUnit(100.0F); BarChart barChart = new BarChart( CategoryAxisBuilder.create() .build(), numberAxis); StackPane root = StackPaneBuilder.create() .children(barChart) .build(); Scene scene = new Scene(root); stage.setScene(scene); stage.show(); System.out.println("getLowerBound = " + numberAxis.getLowerBound() + ", " + "getUpperBound = " + numberAxis.getUpperBound() + ", " + "getTickUnit = " + numberAxis.getTickUnit()); } }