This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I am working on pie charts using cewolf. I would like to know, Is there any way I can show the percentages on the lables of the pie chart.Please let me know, do you have any examples?
thanks a lot
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
The labels are just strings - you can pass in whatever you can stuff into a string.
Could you please give me some examples for showing percentage on the lables like 73.45%.
Actually I am doing this code in the method DefaultPieDataset
dataset.setValue(sCategory[iCategory],s1); //Here I am getting the values for s1 as 73.45 on the legend lables. I want show the legend lables as 73.45%
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
Those labels are taken from the category - the first parameter of that method (which is a string, so it can contain any character you need).
phani kon
Ranch Hand
Joined: Apr 06, 2005
Posts: 251
posted
0
By using the below code
dataset.setValue(sCategory[iCategory],s1);
I am getting the lables as ALL = 56.78 KIO = 67.89 so on
My question is, How would I change to ALL = 56.78% KIO = 67.89% and so on
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
If you want the change just the labels -and not the categories-, then the easiest would be to use a custom label generator, something like this:
phani kon
Ranch Hand
Joined: Apr 06, 2005
Posts: 251
posted
0
Thanks for your help. what do I have to write in my jsp page for the?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
Are you using cewolf? If so, the easiest way would probably be to write a ChartPostProcessor.