Vijayalakshmi Vijayalakshmi - 11 months ago 65
Java Question

How to display values within pie chart sector

I am using

to create pie charts. Values are displayed outside pie chart sectors as labels. I want to display the values within the pie sectors. How can I achieve this. Please can any one help me?

Answer Source

Use setSimpleLabels(), as shown below; org.jfree.chart.demo.PieChartDemo1 is a good starting point.

PiePlot plot = (PiePlot) chart.getPlot();