List of usage examples for org.jfree.chart.plot MultiplePiePlot setLimit
public void setLimit(double limit)
From source file:org.jfree.chart.demo.MultiplePieChartDemo4.java
/** * Creates a sample chart for the given dataset. * /* w ww .ja va 2 s. c o m*/ * @param dataset the dataset. * * @return A sample chart. */ private JFreeChart createChart(final CategoryDataset dataset) { final JFreeChart chart = ChartFactory.createMultiplePieChart3D("Multiple Pie Chart Demo 4", dataset, TableOrder.BY_COLUMN, false, true, false); chart.setBackgroundPaint(new Color(216, 255, 216)); final MultiplePiePlot plot = (MultiplePiePlot) chart.getPlot(); final JFreeChart subchart = plot.getPieChart(); // final StandardLegend legend = new StandardLegend(); // legend.setItemFont(new Font("SansSerif", Font.PLAIN, 8)); // legend.setAnchor(Legend.SOUTH); // subchart.setLegend(legend); plot.setLimit(0.10); final PiePlot p = (PiePlot) subchart.getPlot(); p.setLabelGenerator(new StandardPieItemLabelGenerator("{0}")); p.setLabelFont(new Font("SansSerif", Font.PLAIN, 8)); p.setInteriorGap(0.30); return chart; }