Hi,
What would the best way to display to the percentages, as well as the values of segments in a Pie Chart be?
I have a lot of data, and do not nescessarily want to to iterate twice
over the dataset to calculate these percentages. I am sure Pie Chart
calculates this already to draw each segment.
Cheers,
Nick.
Best way to display percentages on a pie chart
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Something like:
Code: Select all
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} = {1} ({2})"));
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

