Linechart with Many series

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
agh
Posts: 9
Joined: Thu Mar 02, 2006 10:28 pm

Linechart with Many series

Post by agh » Thu Apr 20, 2006 7:21 pm

I am having the problem when I am generating Line chart for months Jul-Jun

I have many series..
X- Axis - Months
Y - Axis - Inpatients ,Variance and out patients data (Three lines)

Here is my Code..
XYSeriesCollection dataset = new XYSeriesCollection();
XYSeries inpseries = new XYSeries(Inpatient);
loop begins
inpseries.add(months,value)
Loop Ends

Same thing for rest of those two.
dataset.add(inpseries )
dataset.add(varseries )
dataset.add(outptseries )

The problem I am getting is series object. add is not accepting string,number).
IS there anyway to display for months.

I appreciate your help..

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Fri Apr 21, 2006 7:07 am

Try a TimeSeries or a CategoryDataset

agh
Posts: 9
Joined: Thu Mar 02, 2006 10:28 pm

Post by agh » Fri Apr 21, 2006 6:37 pm

Thanks a lot... I got it..

agh
Posts: 9
Joined: Thu Mar 02, 2006 10:28 pm

Post by agh » Fri Apr 21, 2006 7:13 pm

Is there any way that I can show the data underneath of the graph

Locked