bar chart from a file

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

bar chart from a file

Post by gregch » Wed Oct 13, 2004 3:59 pm

Is it possible using the jfree.chart class to create a bar chart based in data in a text file?? Also can someone tell me where ican find simple code examples that are using jfree.chart?Please help!!
Thanx

SOURCEMAKER_

Post by SOURCEMAKER_ » Wed Oct 13, 2004 4:43 pm

You can write your own parser for example based on XML or CSV.
I have written something like this on a J2EE EJB/Servlet environment for generating charts by using a pre-definend xml schema.
It works fine.

kulsi
Posts: 7
Joined: Sat Nov 20, 2004 7:53 pm

Post by kulsi » Sun Nov 21, 2004 2:16 am

I have not used JFreeChart as of yet and was wondering if anyone used the CSV functions to read a certain portion of a text file. That is, be able to do a search within the file based on certain row values?

I would have a text file with Time as the first column, based on what window of time I want to plot (user interaction), I would read those rows of values and plot them. Also I would need to be able to read certain column values within those rows (user would choose what variable they want to see plotted). Or I could read all of the columns within those rows into a buffer or something.

I wanted to know if something like this was possible. Thanks

Guest

Post by Guest » Mon Dec 13, 2004 9:59 pm

Update:

I was finally able to do this. There is a helpful class Thomas has written and pointed out to me -- CSVTokenizer. It is in jfreereport.

On the web I found a stock chart example that might be of help:
http://www.informit.com/guides/content. ... &seqNum=75

Guest

Post by Guest » Wed Jan 26, 2005 3:39 pm

I use excel files like source data to generate the graphs..that's because people use a lot excel to make stats..to publicate on our intranet

oacis
Posts: 101
Joined: Fri Jan 07, 2005 5:57 am
Location: Australia, Sydney

Post by oacis » Thu Jan 27, 2005 4:33 am

You can also look at the code pasted in viewtopic.php?t=11413&highlight=csv

which is a quick roll-your own csv reader

Locked