David,
Could you please explaing the reason why PieDataset, which it actually a simplified version of CategoryDataset, has Set as a return value of getCategories, while CategoriyDataset has List?
This fact prohibits creating one class (e.g. JDBCChartAdapter) that implements both interfaces.
BTW, PieDataset may be even obsoleted if create*PieChart* will use CategoryDataset...
Thanks
Andy
PieDataset & CategoryDataset interface design
Re: PieDataset & CategoryDataset interface design
David,
I have update PieDataset to inherit CategoryDataset and tweaked few other files a little bit.
Now PieCharts could be created from JDBCChartAdapter.
If you are interested, I could send you updated files.
Thanks
Andy
I have update PieDataset to inherit CategoryDataset and tweaked few other files a little bit.
Now PieCharts could be created from JDBCChartAdapter.
If you are interested, I could send you updated files.
Thanks
Andy
Re: PieDataset & CategoryDataset interface design
The PieDataset class was updated recently to return a List for the getCategories() method...you can see the code in CVS on SourceForge.
In the DatasetUtilities class, you will find a couple of methods for creating a PieDataset from one "slice" of a CategoryDataset (all the categories for one series, or all the series for one category). You could base a PiePlot on a CategoryDataset, but then you would need extra code in PiePlot to determine which series should be used for the plot...I preferred to create a special dataset (PieDataset) and provide conversion methods for those that need or want them.
Regards,
DG.
In the DatasetUtilities class, you will find a couple of methods for creating a PieDataset from one "slice" of a CategoryDataset (all the categories for one series, or all the series for one category). You could base a PiePlot on a CategoryDataset, but then you would need extra code in PiePlot to determine which series should be used for the plot...I preferred to create a special dataset (PieDataset) and provide conversion methods for those that need or want them.
Regards,
DG.