need help w/ XYDataset

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

need help w/ XYDataset

Post by stoshi » Tue Jan 29, 2002 3:00 am

Im trying to use TimeSeries Chart getting data from our database.
Now, since it is a time series chart, i tried to get 2 dimensioned data, which is X-Time and Y-Price.However according to your manual, it seems to be an array of 3 dimension. That is on the manual--->public DefaultXYDataSource(object[][][] data);
The manual says the finally array dimension is 0 for the x-value and 1 for the y-value. but I didnt quite understand what you are saying.
For example, my data lists as follows
Date Price
---- -----
20011101 2000
20011102 2212
20011103 2102
20011104 4334

and so on.
in this case Date is Y-axis and Price is X-axis. What would be the last axis?

thank you for your help

David Gilbert

RE: need help w/ XYDataset

Post by David Gilbert » Tue Jan 29, 2002 9:42 am

My advice would be to use the TimeSeriesCollection class as your dataset, it has a more intuitive API.

Regards,

Dave Gilbert.

Locked