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?
can any one suggest me to avoid this issue and show the labels clearly??
-- Regards Rangana
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?
can any one suggest me to avoid this issue and show the labels clearly??
-- Regards Rangana
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));
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!