简体   繁体   中英

JFreeChart Pie graph labels squishing

http://i.stack.imgur.com/34WJU.png

As you can see from the picture, the labels for the arrows pointing to the sections of the pie graph are overlapping on the left side. Is there a way to shrink the font of the labels so more can fit? Or make them go out so they dont overlap? strong text

you can rotate chart by some angle by using following code

 JFreeChart chart = ChartFactory.createPieChart3D("World Polulation by Countries ", dataset, true, true, true);
            PiePlot plot = (PiePlot) chart.getPlot();

            plot.setPieIndex(0);

//          plot.setLabelFont(new Font("SansSerif", Font.NORMAL, 12));
            plot.setNoDataMessage("No data available");
            plot.setCircular(false);
            plot.setLabelLinksVisible(true);
//          plot.zoom(200);
//          plot.setStartAngle(180);
//          plot.setLabelBackgroundPaint(paint);
            plot.setLabelLinkMargin(0.01);
            return chart;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM