pie chart - percent figures

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jens

pie chart - percent figures

Post by jens » Wed Jun 12, 2002 12:59 pm

Hi,

I use a PieChart.

The program displays automatically the % figures for every slice. Fine.
Is there a possibility to change the formatting?

I would like to have three digits after the . instead of 1.

4.376% instead of 4.4%

Is this possible?

thanks!
jens

David Gilbert

Re: pie chart - percent figures

Post by David Gilbert » Thu Jun 13, 2002 10:14 am

Try the setPercentFormatString(...) method in the PiePlot class.

Regards,

DG.

jens

Re: pie chart - percent figures

Post by jens » Thu Jun 13, 2002 12:21 pm

Thank you David!
Your help is - as always - very appreciated and welcome!
jens

robert

Re: pie chart - percent figures

Post by robert » Tue Jun 25, 2002 8:34 am

I can't display the % figures for every slice.Would you please give me some advice?Thank you very much!

David Gilbert

Re: pie chart - percent figures

Post by David Gilbert » Tue Jun 25, 2002 10:19 am

What have you tried so far?

You need to call the setSectionLabelType method in the PiePlot class to get percentage labels to display. After that you can alter the format as specified earlier in this thread.

Regards,

DG

robert

Re: pie chart - percent figures

Post by robert » Tue Jun 25, 2002 10:56 am

Thank you very much!

By the way,if I want to add the dollar symbol in the front of the value, for example, $33000 instead of 33000, how could I do this style?

robert

Re: pie chart - percent figures

Post by robert » Tue Jun 25, 2002 11:00 am

I have already finished this function.Thank you!

Locked