How can I show the values on PIECharts?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
akkeri
Posts: 13
Joined: Sat Nov 22, 2003 10:50 pm

How can I show the values on PIECharts?

Post by akkeri » Fri Nov 28, 2003 11:03 pm

How can I show the values on PIECharts.
i did it for bar charts . i used
BarRenderer renderer = (BarRenderer) plot.getRenderer();
renderer.setItemLabelsVisible(true);
but for pie charts i don't know what to do

patrickherber
Posts: 8
Joined: Mon Jul 28, 2003 5:07 pm

Post by patrickherber » Sat Nov 29, 2003 6:17 pm

Hi,
try with

Code: Select all

PiePlot plot = ...;
...
plot.setShowSeriesLabels(true);
// Then you have sever choices:
plot.setSectionLabelType(PiePlot.NAME_LABELS); // show the name as label
//plot.setSectionLabelType(PiePlot.PERCENT_LABELS); // show the values as %
plot.setSectionLabelType(PiePlot.VALUE_LABELS); // show the values
plot.setSectionLabelType(PiePlot.NAME_AND_PERCENT_LABELS); // show name and %
plot.setSectionLabelType(PiePlot.NAME_AND_VALUE_LABELS); // show name and values
plot.setSectionLabelType(PiePlot.VALUE_AND_PERCENT_LABELS); // show values and %
I hope this can help you.
Regards,
Patrick

Guest

Post by Guest » Tue Dec 02, 2003 10:39 am

I tried it in JSP. But it doses not work.
I do not why.

Locked