Example usage for javafx.scene.chart ScatterChart ScatterChart

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

Introduction

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

Prototype

public ScatterChart(@NamedArg("xAxis") Axis<X> xAxis, @NamedArg("yAxis") Axis<Y> yAxis) 

Source Link

Document

Construct a new ScatterChart with the given axis and data.

Usage

From source file:Main.java

@Override
public void start(final Stage stage) {
    stage.setTitle("");
    stage.setWidth(500);/*from   w  w w.j  a  va 2s . c om*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();

    NumberAxis yAxis = new NumberAxis(0.0, 5.0, 1.0);
    NumberAxis xAxis = new NumberAxis(0.0, 5.0, 1.0);
    ScatterChart scatterChart = new ScatterChart(xAxis, yAxis);

    root.getChildren().addAll(scatterChart);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}