Very IMP!!!!!!!!!!!

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

Very IMP!!!!!!!!!!!

Post by Shruti » Fri May 24, 2002 6:27 pm

I need to make a stand-alone application, where I want to make bar charts with the data from a .txt file.. Can someone point me to the right direction of how that could be done.

Thanks.....
Shruti

Gaurav Kathotia

Re: Very IMP!!!!!!!!!!!

Post by Gaurav Kathotia » Thu May 30, 2002 7:37 am

Hey Shruti
Open a FileInputStream with your .txt file , retrieve the data by calling
read() to this Stream and retrieve the values.

Populate a DefaultCategoryDataset with this data.

Finally create a barchart by calling
ChartFactory.createVerticalBarChart by passing the DefaultCategoryDataset as an argument, along with others.

Hope this helps
Gaurav Kathotia

Locked