PieChart

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

PieChart

Post by Tim Rombauts » Fri Nov 09, 2001 9:38 am

Hi all,

I'm having problems with creating a PieChart.
Although I've already created a linechart and a barchart, a PieChart is quite a problem.
For example, how should the defaultCategorieDataSource be filled to create Pies for every Serie?

If someone could help me with it, or just give me some basic code, that would be very kind.

Regards,

Tim

David Gilbert

RE: PieChart

Post by David Gilbert » Fri Nov 09, 2001 10:09 pm

Hi Tim,

I didn't write the PieChart code so I'm not an expert...but I'm pretty sure that the pie chart only displays the values for the first category in the datasource. It does all the series, but only the first category. You could probably slice it the other way, but then the legend wouldn't work so you'd have more work to do.

If you want ALL the data in the CategoryDataSource to be displayed, then you are going to need multiple pie charts. Perhaps using CategoryDataSource isn't the best approach - maybe for pie charts a specialised datasource is required.

If anyone has any ideas, please contribute...I don't use pie charts a lot myself, but they are an important part of the library...

Regards,

DG.

Locked