1

i'm using JFreeChart to plot some data in to a pie chart. when the amount of data is getting high the labels of the graph is overlapping as shown below?

enter image description here

can any one suggest me to avoid this issue and show the labels clearly??

-- Regards Rangana

Rangana Sampath
  • 1,447
  • 3
  • 32
  • 57
  • You could display the values in an adjacent component, as shown [here][1]. [1]: http://stackoverflow.com/a/13309587/230513 – trashgod May 20 '13 at 10:05

2 Answers2

2

You could use a smaller font:

PiePlot plot = (PiePlot) chart.getPlot();
int fontSize = 10; // Adjust the size here
plot.setLabelFont(new Font("SansSerif", Font.PLAIN, fontSize));
obourgain
  • 8,856
  • 6
  • 42
  • 57
0

i was able to reduce this problem by showing the pie chart as a 2d pie chart rather than a 3d one. it gave me a final result like the one similar to the https://stackoverflow.com/a/13309587/230513 suggested by @trashgod

i think i will be able add more color to the solution by implementing the suggestion done by @obourgain

Thanks guys!

Community
  • 1
  • 1
Rangana Sampath
  • 1,447
  • 3
  • 32
  • 57