JavaFX Bubble Chart

A Bubble Chart can be defined as the diagram which is used to display the three dimensional data. Each entity is identified by a bubble which contains three triplets (v1, v2, v3). Two of the triplets are shown by the Bubble's (X,Y) coordinate while the third one is identified by the radius of the bubble.

In the following bubble chart, a bubble chart is plotted at mapping point of X and Y-axis. There are two series in the chart named as series 1 and series 2.


JavaFX Bubble Chart1

In JavaFX, the class javafx.scene.chart.BubbleChart represents the Bubble chart. We need to instantiate this class in order to create the Bubble Chart.

Constructors

There are two constructors in the class.

  1. public BubbleChart(Axis Xaxis, Axis Yaxis) : creates the new instance of the bubble chart with the specified axis.
  2. public BubbleChart(Axis Xaxis, Axis Yaxis, ObservableList > data) : creates the new instance of the bubble chart with the specified axis and data.

Example

In the following example, we have shown the time (in hours) spent on-line by the different aged people. There are two categories(series) of the people, male and female.


JavaFX Bubble Chart2




Contact US

Email:[email protected]

JavaFX Bubble Chart
10/30