Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

JFreeChart-Bar Chart

A bar chart is a chart that represents the grouped data with rectangles. The height or length of the bar is propositional to the value that represents the bar.

The following images show some of the demo versions of bar chart incorporated in JFreeChart library:

Bar Chart Demo 1:

JFreeChart Bar Chart Demo 1

Bar Chart Demo 2:

JFreeChart Bar Chart Demo 2

Bar Chart Demo 3:

JFreeChart Bar Chart Demo 3

Bar Chart Demo 4:

JFreeChart Bar Chart Demo 4

Bar Chart example

Let us consider a sample input data for our bar chart example.

Year Population in Million
USA INDIA CHINA
2005 10 15 20
2010 15 20 25
2015 20 25 30

The following codes create a bar chart from the above sample data:

BarChartExample.java

Output:

JFreeChart bar Chart example





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA