Javatpoint Logo
Javatpoint Logo

JavaFX ScatterChart

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).

JavaFX ScatterChart1

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.

  1. public ScatterChart(Axis Xaxis, Axis Yaxis) : creates the new instance of scatter chart with the specified axis.
  2. public ScatterChart(Axis Xaxis, Axis Yaxis, ObservableListdata): creates the new instance of Scatter Chart with the specified axis and data.


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.

JavaFX ScatterChart2
Next TopicStacked Area Chart

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA