I need to create a pie chart like this, but without the labels.
The mobile names like "Nokia Lumia" and "IPhone 5s" should not be shown in the chart; it's required only in the bottom part of explaining the legends.
I am using this with the help of jfreechart and apache poi in Java.
I changed BarChartDemo1
like this:
Show legends.
JFreeChart chart = ChartFactory.createPieChart( "Smart Phones Manufactured / Q3 2011", // chart title dataset, // data true, // legend <<<<<<<<<< true, // tooltips false // no URL generation );
Don't show labels.
// customise the section label appearance // plot.setLabelFont(new Font("Courier New", Font.BOLD, 20)); // plot.setLabelLinkPaint(Color.WHITE); // plot.setLabelLinkStroke(new BasicStroke(2.0f)); // plot.setLabelOutlineStroke(null); // plot.setLabelPaint(Color.WHITE); // plot.setLabelBackgroundPaint(null); plot.setLabelGenerator(null);
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.