96
JFreeChart- Bubble Chart
A bubble chart represents information in a three-dimensional manner. This chart is a variation of a scatter chart(XY chart) in which the data points are replaced by bubbles, and an additional dimension (z-values) of the data is represented in the size of the bubbles.
The following images show some of the demo versions of Bubble chart incorporated in JFreeChart library:
Bubble Chart Demo 1:
Bubble Chart Demo 2:
Bubble chart example:
Let us consider the following sample data for a bubble chart.
COUNTRY | Cars (in Million) X-Value | Buses (in Million) Y-Value | Trucks (in Million) Z-Value |
---|---|---|---|
India | 40 | 65 | 70 |
U.S.A | 30 | 20 | 50 |
China | 80 | 50 | 80 |
Japan | 11 | 50 | 20 |
The following codes create a Bubble chart from the above sample data:
BubbleChartExample.java
Output:
Next TopicJfreeChart-TimeSeries Chart