Creating Bar Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Aphsal

Creating Bar Chart

Post by Aphsal » Fri Jun 07, 2002 5:51 am

Hi.
I want to create bar charts in my applicaion. Can you please guide me how to do it?

Thanks

Aphsal

Gaurav Kathotia

Re: Creating Bar Chart

Post by Gaurav Kathotia » Fri Jun 07, 2002 10:47 am

You could create a DefaultCategoryDataset with the data in the required number of categories and series. Then call ChartFactory.createVerticalBarChart giving this dataset as an argument.
That's it!

You could check out the examples in the documentation (JFreeChartDemo.java).

Gaurav Kathotia

Locked