I am analyzing the the results of anual surveys.
My DefaultCategoryDataset contains the answers as rows, and the years as columns.
Each field in the table contains the absolute values (sums), i. e. the number of persons who selected this answer.
So in my case, "66" doesn't mean "66%" (as usually imposed by JFreeChart), but "66 people of all the participants".
My questions: the Vertical BarChart displaying the results should automatically convert the sums from the data to percentages in the display.
As I still want to keep track of the absolute values, I would like to have them shown in the tooltip of each chart segment.
How do I achieve my goals?
Thank you in advance,
Reiner
Dataset with sums - Renderer with percentages?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Create a StandardCategoryItemLabelGenerator with a "{3}" in the format string...this will be replaced by the percentage.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

