Font in pie chart legends

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

Font in pie chart legends

Post by Raymond Marfurt » Tue Oct 15, 2002 10:21 am

Hi,

the following code doesn't show any effect in version 0.9.2 ( setItemPaint() does!).

StandardLegend legend = (StandardLegend)myChart.getLegend();
legend.setItemFont(someFont);

I then tried 0.9.3 and get the following run time error:

java.lang.NoSuchMethodError: com.jrefinery.data.DatasetUtilities.getPieDatasetTotal(Lcom/jrefinery/data/PieDataset;)D
at com.jrefinery.chart.PiePlot.drawPie(Unknown Source)
at com.jrefinery.chart.PiePlot.draw(Unknown Source)
at com.jrefinery.chart.JFreeChart.draw(Unknown Source)
at com.inexsys.charts.breakdown.pieChart.PieChartPrinterImpl.draw(PieChartPrinterImpl.java:60)

This seems to be an error within the JFreeChart classes, or not?

Dave Gilbert

Re: Font in pie chart legends

Post by Dave Gilbert » Thu Oct 17, 2002 5:25 pm

You've uncovered a bug for the legend code - fixed now in CVS.

Regarding your other point, the getPieDatasetTotal(...) method was new in 0.9.3 so I am not sure what's happening here. Can you provide more detail on how to replicate the problem?

Regards,

DG.

Locked