List of usage examples for org.jfree.chart.plot RingPlot setSectionDepth
public void setSectionDepth(double sectionDepth)
From source file:org.jfree.chart.demo.RingChartDemo1.java
private static JFreeChart createChart(PieDataset piedataset) { JFreeChart jfreechart = ChartFactory.createRingChart("Ring Chart Demo 1", piedataset, false, true, false); RingPlot ringplot = (RingPlot) jfreechart.getPlot(); ringplot.setLabelFont(new Font("SansSerif", 0, 12)); ringplot.setNoDataMessage("No data available"); ringplot.setSectionDepth(0.34999999999999998D); ringplot.setCircular(false);//w w w . j av a 2 s. co m ringplot.setLabelGap(0.02D); return jfreechart; }
From source file:eu.delving.sip.base.ReportChartHelper.java
public static JComponent createLinkChart(DataSet dataSet, String prefix, Map<RecDef.Check, LinkFile.LinkStats> linkStatsMap) { JPanel p = new JPanel(new GridLayout(0, 1)); for (Map.Entry<RecDef.Check, LinkFile.LinkStats> entry : linkStatsMap.entrySet()) { JPanel pp = new JPanel(new GridLayout(1, 0)); pp.setBorder(BorderFactory.createTitledBorder(entry.getKey().toString())); for (Map.Entry<String, PieDataset> datasetEntry : entry.getValue().createPies().entrySet()) { JFreeChart chart = ChartFactory.createRingChart(datasetEntry.getKey(), datasetEntry.getValue(), true, false, Locale.getDefault()); RingPlot plot = (RingPlot) chart.getPlot(); plot.setLabelGenerator(null); plot.setNoDataMessage("No data available"); plot.setSectionDepth(0.34999999999999998D); plot.setCircular(true);//from w w w. j a va2s . c o m plot.setLabelGap(0.02D); pp.add(new ChartPanel(chart)); } p.add(pp); } return p; }
From source file:org.pentaho.plugin.jfreereport.reportcharts.RingChartExpression.java
protected void configureChart(final JFreeChart chart) { super.configureChart(chart); final RingPlot ringPlot = (RingPlot) chart.getPlot(); ringPlot.setSectionDepth(sectionDepth); }