javafx.scene.chart.BubbleChart Java Examples
The following examples show how to use
javafx.scene.chart.BubbleChart.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdvancedBubbleChartSample.java From marathonv5 with Apache License 2.0 | 6 votes |
protected BubbleChart<Number, Number> createChart() { final NumberAxis xAxis = new NumberAxis(); final NumberAxis yAxis = new NumberAxis(); final BubbleChart<Number,Number> bc = new BubbleChart<Number,Number>(xAxis,yAxis); // setup chart bc.setTitle("Advanced BubbleChart"); xAxis.setLabel("X Axis"); yAxis.setLabel("Y Axis"); // add starting data XYChart.Series<Number,Number> series1 = new XYChart.Series<Number,Number>(); series1.setName("Data Series 1"); for (int i=0; i<20; i++) series1.getData().add( new XYChart.Data<Number,Number>(Math.random()*100, Math.random()*100, (Math.random()*10))); XYChart.Series<Number,Number> series2 = new XYChart.Series<Number,Number>(); series2.setName("Data Series 2"); for (int i=0; i<20; i++) series2.getData().add( new XYChart.Data<Number,Number>(Math.random()*100, Math.random()*100, (Math.random()*10))); bc.getData().addAll(series1, series2); return bc; }
Example #2
Source File: BubbleChartSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public BubbleChartSample() { NumberAxis xAxis = new NumberAxis("X", 0d, 150d, 20d); NumberAxis yAxis = new NumberAxis("Y", 0d, 150d, 20d); ObservableList<BubbleChart.Series> bubbleChartData = FXCollections.observableArrayList( new BubbleChart.Series("Series 1", FXCollections.observableArrayList( new XYChart.Data(30d, 40d, 10d), new XYChart.Data(60d, 20d, 13d), new XYChart.Data(10d, 90d, 7d), new XYChart.Data(100d, 40d, 10d), new XYChart.Data(50d, 23d, 5d))) , new BubbleChart.Series("Series 2", FXCollections.observableArrayList( new XYChart.Data(13d, 100d, 7d), new XYChart.Data(20d, 80d, 13d), new XYChart.Data(100d, 60d, 10d), new XYChart.Data(30d, 40d, 6d), new XYChart.Data(50d, 20d, 12d) )) ); BubbleChart chart = new BubbleChart(xAxis, yAxis, bubbleChartData); getChildren().add(chart); }
Example #3
Source File: AdvancedBubbleChartSample.java From marathonv5 with Apache License 2.0 | 6 votes |
protected BubbleChart<Number, Number> createChart() { final NumberAxis xAxis = new NumberAxis(); final NumberAxis yAxis = new NumberAxis(); final BubbleChart<Number,Number> bc = new BubbleChart<Number,Number>(xAxis,yAxis); // setup chart bc.setTitle("Advanced BubbleChart"); xAxis.setLabel("X Axis"); yAxis.setLabel("Y Axis"); // add starting data XYChart.Series<Number,Number> series1 = new XYChart.Series<Number,Number>(); series1.setName("Data Series 1"); for (int i=0; i<20; i++) series1.getData().add( new XYChart.Data<Number,Number>(Math.random()*100, Math.random()*100, (Math.random()*10))); XYChart.Series<Number,Number> series2 = new XYChart.Series<Number,Number>(); series2.setName("Data Series 2"); for (int i=0; i<20; i++) series2.getData().add( new XYChart.Data<Number,Number>(Math.random()*100, Math.random()*100, (Math.random()*10))); bc.getData().addAll(series1, series2); return bc; }
Example #4
Source File: BubbleChartSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public BubbleChartSample() { NumberAxis xAxis = new NumberAxis("X", 0d, 150d, 20d); NumberAxis yAxis = new NumberAxis("Y", 0d, 150d, 20d); ObservableList<BubbleChart.Series> bubbleChartData = FXCollections.observableArrayList( new BubbleChart.Series("Series 1", FXCollections.observableArrayList( new XYChart.Data(30d, 40d, 10d), new XYChart.Data(60d, 20d, 13d), new XYChart.Data(10d, 90d, 7d), new XYChart.Data(100d, 40d, 10d), new XYChart.Data(50d, 23d, 5d))) , new BubbleChart.Series("Series 2", FXCollections.observableArrayList( new XYChart.Data(13d, 100d, 7d), new XYChart.Data(20d, 80d, 13d), new XYChart.Data(100d, 60d, 10d), new XYChart.Data(30d, 40d, 6d), new XYChart.Data(50d, 20d, 12d) )) ); BubbleChart chart = new BubbleChart(xAxis, yAxis, bubbleChartData); getChildren().add(chart); }
Example #5
Source File: BubbleChartBuilderService.java From AsciidocFX with Apache License 2.0 | 5 votes |
@Override protected XYChart<Number, Number> createXYChart() { final NumberAxis xAxis = new NumberAxis(); final NumberAxis yAxis = new NumberAxis(); BubbleChart<Number, Number> chart = new BubbleChart<>(xAxis, yAxis); chart.getStyleClass().add("chart-extension"); return chart; }