Pie chart legend and overlapping

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

Pie chart legend and overlapping

Post by Sean » Fri Jun 21, 2002 9:26 pm

Hello,

First let me say that JFreeChart has been a huge success for some of my projects.

I have a couple of questions though, that are probably obvious fixes only I cant find them.

First, I am trying to get the PERCENT_LABELS next to each element in the legend labels. So far I can only figure out how to place PERCENT_LABELS next to the pie chart figure.

Next, I am having difficulty with text overlapping when using large data in the pie chart. The text next to the pie chart that displays the section number is sometimes overlapping when there is large amounts of data. Is there a way to avoid this, or a solution around it?

Finally, I would like to know if there is a way to add more color options to the pie chart so that there is not a repeat of the same colors over again. If not then perhaps is there a way to add patterns to the repeated colors.

Thank you for your time and input (and for JFreeChart! :) ).

Thanks
Sean

David Gilbert

Re: Pie chart legend and overlapping

Post by David Gilbert » Fri Jun 21, 2002 10:29 pm

Hi Sean,

The pie chart still has some limitations...one by one these are being fixed.

1) At the moment the legend just takes the category names for labels. It wouldn't be hard to modify the getLegendItemLabels() method in the PiePlot class to change this.

2) No calculations are being performed at present to detect label overlapping. I'd welcome suggestions on how to deal with it.

3) This you can control. Use the setSeriesPaint(...) method inherited from the Plot class. Supply an array of Paint objects, the array can be any size you want (if it is small, some colors will be recycled; if it is large, some colors will never be used).

Regards,

DG.

Locked