A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
akkeri
- Posts: 13
- Joined: Sat Nov 22, 2003 10:50 pm
Post
by akkeri » Tue Jan 06, 2004 5:04 pm
i would like to display the values of the sections on a pie charts to integrate them in pdf files (with itext) because i can't use tooltips
i made it for bart chart and i have used:
Code: Select all
BarRenderer3D renderer = (BarRenderer3D) plot.getRenderer();
renderer.setItemLabelsVisible(true);
and it worked fine.
but with pie charts i used
Code: Select all
Pie3DPlot plot = new Pie3DPlot(data)
plot.setShowSeriesLabels(true);
plot.setSectionLabelType(PiePlot.VALUE_AND_PERCENT_LABELS);
but the values are not displayed can any body help me to solve the pb. thanks.
-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Tue Jan 06, 2004 9:56 pm
This is working OK with the latest CVS code. Which release are you using?
Double check that the plot object you are modifying is actually the one in your displayed chart...
-
akkeri
- Posts: 13
- Joined: Sat Nov 22, 2003 10:50 pm
Post
by akkeri » Wed Jan 07, 2004 10:34 am
thanks dave but i also solve the pb:)
first i used the code:
Code: Select all
Pie3DPlot plot = new Pie3DPlot(data);
pieplot.setSectionLabelType(PiePlot.VALUE_AND_PERCENT_LABELS);
and now i changed to
Code: Select all
chart = ChartFactory.createPie3DChart(titre, data, true, true, true);
PiePlot pieplot = (PiePlot)chart.getPlot();
pieplot.setSectionLabelType(PiePlot.VALUE_AND_PERCENT_LABELS);
and it worked fine.thanks