Example usage for javafx.scene.chart BubbleChart BubbleChart

List of usage examples for javafx.scene.chart BubbleChart BubbleChart

Introduction

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

Prototype

public BubbleChart(@NamedArg("xAxis") Axis<X> xAxis, @NamedArg("yAxis") Axis<Y> yAxis,
        @NamedArg("data") ObservableList<Series<X, Y>> data) 

Source Link

Document

Construct a new BubbleChart with the given axis and data.

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    NumberAxis xAxis = new NumberAxis();
    NumberAxis yAxis = new NumberAxis();
    xAxis.setAutoRanging(false);//www  .  j  av  a2  s . c  o  m
    xAxis.setLowerBound(2011);
    xAxis.setUpperBound(2016);
    BubbleChart bubbleChart = new BubbleChart(xAxis, yAxis, getChartData());
    bubbleChart.setTitle("Title");
    primaryStage.setTitle("Chart example");

    StackPane root = new StackPane();
    root.getChildren().add(bubbleChart);
    primaryStage.setScene(new Scene(root, 400, 250));
    primaryStage.show();
}