Problems with pie charts
Problems with pie charts
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.
RE: Problems with pie charts
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.
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.
RE: Problems with pie charts
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...