Category Dataset

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

Category Dataset

Post by axel » Mon Jul 01, 2002 8:58 am

Hi , i have just started with jFreeChart and i like it!

my first tests are to add data dynamicly to different kinds of charts(Datasets).
for example to add data to an existing DefaultPieDataset i use the setValue() method.
To add data to an TimeSeriesChart i use the TimeSeriesCollection and the add() method of a BasicTimeSeries object.
This works because they are using List internally to handle their data.
Then i tried to add dynamicly data to an DefaultCategoryDataset and this doesnt work because they are using an array to store the data.
Is this right and how can i add data dynamicly to an CategoryDataset ?


Thanks axel

David Gilbert

Re: Category Dataset

Post by David Gilbert » Tue Jul 02, 2002 6:12 am

The DefaultCategoryDataset was developed earlier than the TimeSeriesCollection class, and isn't as flexible when it comes to adding data. It's on my to-do list to improve this class, but it isn't the highest priority item for me at the moment. I'm hoping someone will contribute a DeluxeCategoryDataset class to save me the trouble...

Regards,

DG.

Locked