package mint.javafx.dashboard.chart; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.chart.BarChart; import javafx.scene.chart.CategoryAxis; import javafx.scene.chart.LineChart; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.XYChart; import javafx.scene.chart.XYChart.Data; import javafx.scene.chart.XYChart.Series; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class MissingBarsChartSample extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) throws Exception { VBox root = new VBox(); root.setFillWidth(true); primaryStage.setScene(new Scene(root)); Series series = createSeries(); ObservableList> chartData = FXCollections.observableArrayList(series); root.getChildren().add(new LineChart(new CategoryAxis(), new NumberAxis(), chartData)); root.getChildren().add(new BarChart(new CategoryAxis(), new NumberAxis(), chartData)); primaryStage.show(); } private Series createSeries() { ObservableList> observableArrayList1 = FXCollections.observableArrayList( new XYChart.Data("ID-0701", 0.000000), new XYChart.Data("ID-0693", 1.000000), new XYChart.Data("ID-2484", 0.000000), new XYChart.Data("ID-0719", 0.000000), new XYChart.Data("ID-1756", 0.000000), new XYChart.Data("ID-4005", 0.000000), new XYChart.Data("ID-1661", 0.000000), new XYChart.Data("ID-1716", 0.000000), new XYChart.Data("ID-3322", 0.000000), new XYChart.Data("ID-1864", 0.000000), new XYChart.Data("ID-2341", 0.000000), new XYChart.Data("ID-3389", 0.000000), new XYChart.Data("ID-0890", 0.000000), new XYChart.Data("ID-4000", 0.000000), new XYChart.Data("ID-3175", 0.000000), new XYChart.Data("ID-2844", 0.000000), new XYChart.Data("ID-0859", 0.000000), new XYChart.Data("ID-1644", 1.000000), new XYChart.Data("ID-0358", 0.000000), new XYChart.Data("ID-1168", 1.000000), new XYChart.Data("ID-1809", 0.000000), new XYChart.Data("ID-2281", 0.000000), new XYChart.Data("ID-1795", 1.000000), new XYChart.Data("ID-0458", 1.000000), new XYChart.Data("ID-1439", 0.000000), new XYChart.Data("ID-1273", 0.000000), new XYChart.Data("ID-1431", 0.000000), new XYChart.Data("ID-1860", 0.000000), new XYChart.Data("ID-2177", 0.000000), new XYChart.Data("ID-1642", 0.000000), new XYChart.Data("ID-3082", 0.000000), new XYChart.Data("ID-2092", 0.000000), new XYChart.Data("ID-2298", 0.000000), new XYChart.Data("ID-1886", 1.000000), new XYChart.Data("ID-0341", 0.000000), new XYChart.Data("ID-0621", 0.000000), new XYChart.Data("ID-2058", 0.000000), new XYChart.Data("ID-2953", 0.000000), new XYChart.Data("ID-0678", 0.000000), new XYChart.Data("ID-2851", 0.000000), new XYChart.Data("ID-3320", 0.000000), new XYChart.Data("ID-2826", 0.000000), new XYChart.Data("ID-2062", 0.000000), new XYChart.Data("ID-0246", 1.000000), new XYChart.Data("ID-0631", 0.000000), new XYChart.Data("ID-1350", 0.000000), new XYChart.Data("ID-0777", 0.000000), new XYChart.Data("ID-3214", 0.000000), new XYChart.Data("ID-2379", 0.000000), new XYChart.Data("ID-3159", 0.000000), new XYChart.Data("ID-0592", 0.000000), new XYChart.Data("ID-2709", 0.000000), new XYChart.Data("ID-0602", 0.000000), new XYChart.Data("ID-3227", 0.000000), new XYChart.Data("ID-0541", 0.000000), new XYChart.Data("ID-0235", 0.000000), new XYChart.Data("ID-1998", 0.000000), new XYChart.Data("ID-1683", 0.000000), new XYChart.Data("ID-1278", 0.000000), new XYChart.Data("ID-0681", 0.000000), new XYChart.Data("ID-1172", 0.000000), new XYChart.Data("ID-0462", 0.000000), new XYChart.Data("ID-2529", 0.000000), new XYChart.Data("ID-3168", 0.000000), new XYChart.Data("ID-2000", 0.000000)); ObservableList> observableArrayList = observableArrayList1; return new LineChart.Series("A330 / Theoretical /...", observableArrayList); } }