Java 类javafx.scene.chart.NumberAxisBuilder 实例源码

项目:marathonv5    文件:StackedAreaChartSample.java   
public StackedAreaChartSample() {
    NumberAxis xAxis = NumberAxisBuilder.create()
                       .label("X Values")
                       .lowerBound(1.0d)
                       .upperBound(9.0d)
                       .tickUnit(2.0d).build();

    NumberAxis yAxis = NumberAxisBuilder.create()
                       .label("Y Values")
                       .lowerBound(0.0d)
                       .upperBound(30.0d)
                       .tickUnit(2.0d).build();

    ObservableList<StackedAreaChart.Series> areaChartData = FXCollections.observableArrayList(
            new StackedAreaChart.Series("Series 1",FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,4),
                new StackedAreaChart.Data(2,5),
                new StackedAreaChart.Data(4,4),
                new StackedAreaChart.Data(6,2),
                new StackedAreaChart.Data(8,6),
                new StackedAreaChart.Data(10,8)
            )),
            new StackedAreaChart.Series("Series 2", FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,8),
                new StackedAreaChart.Data(2,2),
                new StackedAreaChart.Data(4,9),
                new StackedAreaChart.Data(6,7),
                new StackedAreaChart.Data(8,5),
                new StackedAreaChart.Data(10,7)
            )),
            new StackedAreaChart.Series("Series 3", FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,2),
                new StackedAreaChart.Data(2,5),
                new StackedAreaChart.Data(4,8),
                new StackedAreaChart.Data(6,6),
                new StackedAreaChart.Data(8,9),
                new StackedAreaChart.Data(10,7)
            ))
    );
    StackedAreaChart chart = new StackedAreaChart(xAxis, yAxis, areaChartData);
    getChildren().add(chart);
}
项目:marathonv5    文件:StackedAreaChartSample.java   
public StackedAreaChartSample() {
    NumberAxis xAxis = NumberAxisBuilder.create()
                       .label("X Values")
                       .lowerBound(1.0d)
                       .upperBound(9.0d)
                       .tickUnit(2.0d).build();

    NumberAxis yAxis = NumberAxisBuilder.create()
                       .label("Y Values")
                       .lowerBound(0.0d)
                       .upperBound(30.0d)
                       .tickUnit(2.0d).build();

    ObservableList<StackedAreaChart.Series> areaChartData = FXCollections.observableArrayList(
            new StackedAreaChart.Series("Series 1",FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,4),
                new StackedAreaChart.Data(2,5),
                new StackedAreaChart.Data(4,4),
                new StackedAreaChart.Data(6,2),
                new StackedAreaChart.Data(8,6),
                new StackedAreaChart.Data(10,8)
            )),
            new StackedAreaChart.Series("Series 2", FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,8),
                new StackedAreaChart.Data(2,2),
                new StackedAreaChart.Data(4,9),
                new StackedAreaChart.Data(6,7),
                new StackedAreaChart.Data(8,5),
                new StackedAreaChart.Data(10,7)
            )),
            new StackedAreaChart.Series("Series 3", FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,2),
                new StackedAreaChart.Data(2,5),
                new StackedAreaChart.Data(4,8),
                new StackedAreaChart.Data(6,6),
                new StackedAreaChart.Data(8,9),
                new StackedAreaChart.Data(10,7)
            ))
    );
    StackedAreaChart chart = new StackedAreaChart(xAxis, yAxis, areaChartData);
    getChildren().add(chart);
}
项目:kotlinfx-ensemble    文件:StackedAreaChartSample.java   
public StackedAreaChartSample() {
    NumberAxis xAxis = NumberAxisBuilder.create()
                       .label("X Values")
                       .lowerBound(1.0d)
                       .upperBound(9.0d)
                       .tickUnit(2.0d).build();

    NumberAxis yAxis = NumberAxisBuilder.create()
                       .label("Y Values")
                       .lowerBound(0.0d)
                       .upperBound(30.0d)
                       .tickUnit(2.0d).build();

    ObservableList<StackedAreaChart.Series> areaChartData = FXCollections.observableArrayList(
            new StackedAreaChart.Series("Series 1",FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,4),
                new StackedAreaChart.Data(2,5),
                new StackedAreaChart.Data(4,4),
                new StackedAreaChart.Data(6,2),
                new StackedAreaChart.Data(8,6),
                new StackedAreaChart.Data(10,8)
            )),
            new StackedAreaChart.Series("Series 2", FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,8),
                new StackedAreaChart.Data(2,2),
                new StackedAreaChart.Data(4,9),
                new StackedAreaChart.Data(6,7),
                new StackedAreaChart.Data(8,5),
                new StackedAreaChart.Data(10,7)
            )),
            new StackedAreaChart.Series("Series 3", FXCollections.observableArrayList(
                new StackedAreaChart.Data(0,2),
                new StackedAreaChart.Data(2,5),
                new StackedAreaChart.Data(4,8),
                new StackedAreaChart.Data(6,6),
                new StackedAreaChart.Data(8,9),
                new StackedAreaChart.Data(10,7)
            ))
    );
    StackedAreaChart chart = new StackedAreaChart(xAxis, yAxis, areaChartData);
    getChildren().add(chart);
}