/** * Creates a ring chart with default settings. * <P> * The chart object returned by this method uses a {@link RingPlot} * instance as the plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createRingChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { RingPlot plot = new RingPlot(dataset); plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator( StandardPieToolTipGenerator.DEFAULT_SECTION_LABEL_FORMAT)); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); }
/** * Creates a 3D pie chart using the specified dataset. The chart object * returned by this method uses a {@link PiePlot3D} instance as the * plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart3D(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot3D plot = new PiePlot3D(dataset); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); }
/** * Creates a pie chart with default settings. * <P> * The chart object returned by this method uses a {@link PiePlot} instance as the * plot. * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot plot = new PiePlot(dataset); plot.setLabelGenerator(new StandardPieItemLabelGenerator()); plot.setInsets(new Insets(0, 5, 5, 5)); if (tooltips) { plot.setToolTipGenerator( new StandardPieItemLabelGenerator( StandardPieItemLabelGenerator.DEFAULT_SECTION_LABEL_FORMAT ) ); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); }
/** * Creates a 3D pie chart using the specified dataset. * <P> * The chart object returned by this method uses a {@link PiePlot3D} instance as the * plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart3D(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot3D plot = new PiePlot3D(dataset); plot.setInsets(new Insets(0, 5, 5, 5)); if (tooltips) { plot.setToolTipGenerator(new StandardPieItemLabelGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); }
/** * Creates a pie chart with default settings. * <P> * The chart object returned by this method uses a {@link PiePlot} instance * as the plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot plot = new PiePlot(dataset); plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator( StandardPieToolTipGenerator.DEFAULT_SECTION_LABEL_FORMAT)); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); }
/** * Creates a pie chart with default settings. * <P> * The chart object returned by this method uses a {@link PiePlot} instance * as the plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot plot = new PiePlot(dataset); plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a ring chart with default settings. * <P> * The chart object returned by this method uses a {@link RingPlot} * instance as the plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A ring chart. */ public static JFreeChart createRingChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { RingPlot plot = new RingPlot(dataset); plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a 3D pie chart using the specified dataset. The chart object * returned by this method uses a {@link PiePlot3D} instance as the * plot. * * @param title the chart title (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart3D(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot3D plot = new PiePlot3D(dataset); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a pie chart with default settings. * <P> * The chart object returned by this method uses a {@link PiePlot} instance * as the plot. * * @param title the chart title ({@code null} permitted). * @param dataset the dataset for the chart ({@code null} permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot plot = new PiePlot(dataset); plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a ring chart with default settings. * <P> * The chart object returned by this method uses a {@link RingPlot} * instance as the plot. * * @param title the chart title ({@code null} permitted). * @param dataset the dataset for the chart ({@code null} permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A ring chart. */ public static JFreeChart createRingChart(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { RingPlot plot = new RingPlot(dataset); plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a 3D pie chart using the specified dataset. The chart object * returned by this method uses a {@link PiePlot3D} instance as the * plot. * * @param title the chart title ({@code null} permitted). * @param dataset the dataset for the chart ({@code null} permitted). * @param legend a flag specifying whether or not a legend is required. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A pie chart. */ public static JFreeChart createPieChart3D(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls) { PiePlot3D plot = new PiePlot3D(dataset); plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0)); if (tooltips) { plot.setToolTipGenerator(new StandardPieToolTipGenerator()); } if (urls) { plot.setURLGenerator(new StandardPieURLGenerator()); } JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
private JFreeChart createPieChart(ReportChart reportChart, ChartValue[] values, boolean displayInline) { PieDataset dataset = createPieDataset(values); PiePlot3D plot = new PiePlot3D(dataset); plot.setToolTipGenerator(new StandardPieToolTipGenerator()); if (reportChart.getDrillDownReport() != null) { plot.setURLGenerator(new StandardPieURLGenerator( "executeReport.action?displayInline=" + displayInline + "&exportType=0&reportId=" + reportChart.getDrillDownReport().getId(), ReportChart.DRILLDOWN_PARAMETER, "pieIndex")); } JFreeChart chart = new JFreeChart(reportChart.getTitle(), JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend()); return chart; }
private JFreeChart createRingChart(ReportChart reportChart, ChartValue[] values, boolean displayInline) { PieDataset dataset = createPieDataset(values); RingPlot plot = new RingPlot(dataset); plot.setToolTipGenerator(new StandardPieToolTipGenerator()); if (reportChart.getDrillDownReport() != null) { plot.setURLGenerator(new StandardPieURLGenerator( "executeReport.action?displayInline=" + displayInline + "&exportType=0&reportId=" + reportChart.getDrillDownReport().getId(), ReportChart.DRILLDOWN_PARAMETER, "pieIndex")); } JFreeChart chart = new JFreeChart(reportChart.getTitle(), JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend()); return chart; }