PieCharts with DefaultCategoryDataSet

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

PieCharts with DefaultCategoryDataSet

Post by Don Mitchell » Thu Nov 28, 2002 2:01 am

I've created a DefaultCategoryDataSet with several categories and series. The Line and Bar charts created with this dataset displays as I would expect it, with the categories along the x-axis and the multiple series along the y-axis. However, if I use the same exact dataset with a pie chart I get one pie for each series. The pies are divided up by category. I would have expected this to be the other way around: one pie for each category and the pies are subdivided by series. Is this a bug or did I misunderstand how this is being done.

For the bar charts what you see on the x-axis is the categories. Above each category is a separate column for each category.

Thanks!
Don

David Gilbert

Re: PieCharts with DefaultCategoryDataSet

Post by David Gilbert » Fri Nov 29, 2002 6:43 pm

Hi Don,

I think you have a good point. I've used the term 'category' in slightly different ways for the PieDataset and the CategoryDataset, so that is the source of the problem.

I've changed the CategoryDataset interface in CVS to make it more like a table (actually I've called it TableDataset). This does away with the difference between series and categories (replacing them with row keys and column keys), and should make it simpler to transpose a dataset (and also to display it in a JTable, but that is another issue). I'm still working on this, so I will endeavour to make the multi-pie chart work the way you have suggested.

Regards,

DG

Don Mitchell

Re: PieCharts with DefaultCategoryDataSet

Post by Don Mitchell » Mon Dec 02, 2002 2:51 am

Thanks David. Any idea when these changes will be done?

David Gilbert

Re: PieCharts with DefaultCategoryDataSet

Post by David Gilbert » Tue Dec 03, 2002 12:19 am

I was hoping to get the next release out this month, but I have some catching up to do with JFreeReport so I'll have to see how it goes.

Regards,

DG

Locked