Hi I am using jfree to create pie chart where i have nearly 15 values in the pie chart. When the chart is drawn some of the labels are displayed completely..
so I would like to have the pie labels distributed evenly so that all the labels are visible..
Help needed in implementing the spreadEvenly() in PieLabel
-
- Posts: 13
- Joined: Tue Jun 19, 2007 6:03 am
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Can you post an example and describe in more detail what you mean by "spread evenly"?
Depending on your dataset, most of the labels might end up on one side of the pie...in that case, you could manually fix that by calling setStartAngle() in the PiePlot class (I'm considering adding an option to have the PiePlot class do this automatically to ensure that half the labels end up on one side and half on the other).
Depending on your dataset, most of the labels might end up on one side of the pie...in that case, you could manually fix that by calling setStartAngle() in the PiePlot class (I'm considering adding an option to have the PiePlot class do this automatically to ensure that half the labels end up on one side and half on the other).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 13
- Joined: Tue Jun 19, 2007 6:03 am
Here my dataset has maximum of 10 values and these values are random..
The issue here is say
value A - 20 %
value B - 20 %
value C - 20 %
value D - 11 %
value E - 7%
value F - 5 %
value G - 4 %
value I - 1 %
value J - 1 %
The start angle of my chart is 45 degree. Though the percentage for each values are random. So in the final output..I see the last 2 legends get hided..I can see only the label markings and no the legends...
In some cases i get the dataset where the first value has 98 % and all the remaining 9 as below 2 %....
Is there any way to get all the legends visible .
The issue here is say
value A - 20 %
value B - 20 %
value C - 20 %
value D - 11 %
value E - 7%
value F - 5 %
value G - 4 %
value I - 1 %
value J - 1 %
The start angle of my chart is 45 degree. Though the percentage for each values are random. So in the final output..I see the last 2 legends get hided..I can see only the label markings and no the legends...
In some cases i get the dataset where the first value has 98 % and all the remaining 9 as below 2 %....
Is there any way to get all the legends visible .