List of usage examples for javafx.scene.chart BarChart setCategoryGap
public final void setCategoryGap(double value)
From source file:Main.java
@Override public void start(Stage primaryStage) { CategoryAxis xAxis = new CategoryAxis(); NumberAxis yAxis = new NumberAxis(); BarChart barChart = new BarChart(xAxis, yAxis, getChartData()); barChart.setCategoryGap(0.2); barChart.setTitle("A"); primaryStage.setTitle("BarChart example"); StackPane root = new StackPane(); root.getChildren().add(barChart);// w w w . jav a 2s .c o m primaryStage.setScene(new Scene(root, 400, 250)); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { CategoryAxis xAxis = new CategoryAxis(); NumberAxis yAxis = new NumberAxis(); BarChart barChart = new BarChart(xAxis, yAxis, getChartData()); barChart.setCategoryGap(0.2); System.out.println(barChart.getBarGap()); System.out.println(barChart.getCategoryGap()); barChart.setTitle("A"); primaryStage.setTitle("BarChart example"); StackPane root = new StackPane(); root.getChildren().add(barChart);/* w w w. j a v a 2s . c om*/ primaryStage.setScene(new Scene(root, 400, 250)); primaryStage.show(); }