Problems with pie charts

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

Problems with pie charts

Post by Heikki Hiltunen » Wed Nov 14, 2001 1:37 pm

Is there a way to draw pie charts without series names written all over the chart (and over the edges)? I also tried to get rid of the legend (which is in a bit unsuitable location for me) with 'setLegend(null)', that should be legal according to javadocs, but it resulted in NullPointerException when trying to draw the chart.

David Gilbert

RE: Problems with pie charts

Post by David Gilbert » Wed Nov 14, 2001 6:42 pm

Hi Heikki,

The labels are drawn in the PiePlot.draw(...) method, there's no flag to control whether or not they are drawn, but it would be a pretty simple job to add such a flag (I'll add that feature for the next version).

The setLegend(null) problem is a bug that's been fixed in the development version of JFreeChart which you can obtain from CVS on SourceForge. I'm going to package up a new release before the end of December if you'd rather wait...

Regards,

DG.

Heikki Hiltunen

RE: Problems with pie charts

Post by Heikki Hiltunen » Fri Nov 16, 2001 3:25 pm

I found that the labels are not drawn if I call setDrawCircle(false) (!). Of course, as a side effect, the pie is not circular anymore...

Locked