In Scatter Chart, the data points are scattered along the graph. Each data point displays the mapping between both the axis. It is mainly used to plot the relationship between the axes. As in the following image, the variation in the temperature over a year is shown. On the X-axis, the month number is plotted while, on the Y-axis, the temperature is plotted (in Degree Celsius).
In JavaFX, the Scatter Chart is represented by the class javafx.scene.chart.ScatterChart class. We need to instantiate this class in order to create the scatter chart.
There are two constructors in the class.
In the following example, we have shown the perfect height according to the weight of the people. The data shown in the chart is logically correct.