A scatter chart works in a similar way to how a bar chart or a line chart works. It's another two-axis graph, where the data points are plotted on the two axes. The axes are created using javafx.scene.chart.CategoryAxis or javafx.scene.chart.NumberAxis, depending on whether the data is string or numeric.
The data to be plotted is provided in the form of XYChart.Series<X,Y>, where X and Y can be String or any type extending Number, and it contains the data in the form of a list of XYChart.Data objects, something like the following:
XYChart.Series<Number,Number> series = new XYChart.Series<>(); series.getData().add(new XYChart.Data<Number, Number>(xValue, yValue));
In a scatter chart, the data is plotted in the form of points, ...