Hi
please help me !!!!
i want to customizes my labels in pie chart and bar chart..
how can i do that
customization of label in the pie chart and bar graph
-
- Posts: 9
- Joined: Fri Jun 13, 2008 4:09 am
- Location: Japan
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: customization of label in the pie chart and bar graph
For the former, create a class that implements PieSectionLabelGenerator. For the latter, create a class that implements CategoryItemLabelGenerator. Assign a instance of each class to their respective plot.kapilkaps83 wrote:i want to customizes my labels in pie chart and bar chart..
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I think I already answered your question in another thread. It doesn't really help to ask twice, it just clutters the forum with duplication.rahul wrote:I also need to use CategoryItemLabelGenerator. Can you please show a piece of code of how to use it?
http://www.jfree.org/phpBB2/viewtopic.php?t=24992
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 9
- Joined: Fri Jun 13, 2008 4:09 am
- Location: Japan
hi david.gilbert
i have generated a simple bar graph ( not category plot) . i simply want to display a label with some message below each bar..
the sample dataset used by me is
dataset.addValue(8, 1回, "");
dataset.addValue(4, 2回, "");
dataset.addValue(9, 3回, "");
dataset.addValue(5, 4回, "");
dataset.addValue(3, 5回, "");
now if i change my dataset to
dataset.addValue(8, 1回, "1回");
dataset.addValue(4, 1回, "2回");
dataset.addValue(9, 1回, "3回");
dataset.addValue(5, 1回, "4回");
dataset.addValue(3, 1回, "5回");
Then i have solved my problem but in this case legend is 1回 and all bar are of same color
i want to display bar graph with label below each bar and each bar has to be in different color
Please help me with some sample code.
i have generated a simple bar graph ( not category plot) . i simply want to display a label with some message below each bar..
the sample dataset used by me is
dataset.addValue(8, 1回, "");
dataset.addValue(4, 2回, "");
dataset.addValue(9, 3回, "");
dataset.addValue(5, 4回, "");
dataset.addValue(3, 5回, "");
now if i change my dataset to
dataset.addValue(8, 1回, "1回");
dataset.addValue(4, 1回, "2回");
dataset.addValue(9, 1回, "3回");
dataset.addValue(5, 1回, "4回");
dataset.addValue(3, 1回, "5回");
Then i have solved my problem but in this case legend is 1回 and all bar are of same color
i want to display bar graph with label below each bar and each bar has to be in different color
Please help me with some sample code.