Example usage for javafx.scene.chart BarChart setBarGap

List of usage examples for javafx.scene.chart BarChart setBarGap

Introduction

In this page you can find the example usage for javafx.scene.chart BarChart setBarGap.

Prototype

public final void setBarGap(double value) 

Source Link

Usage

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.setBarGap(0.2);
    barChart.setTitle("A");
    primaryStage.setTitle("BarChart example");

    StackPane root = new StackPane();
    root.getChildren().add(barChart);//from w  ww .  ja v a2  s  .c  om
    primaryStage.setScene(new Scene(root, 400, 250));
    primaryStage.show();
}