List of usage examples for org.jfree.chart ChartFactory createPieChart3D
public static JFreeChart createPieChart3D(String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls)
From source file:de.aidger.view.utils.Charts.java
/** * Creates a 3D pie chart.//from w w w. j a va 2s .c o m * * @param title * the diagram title * @param dataset * the dataset. * @param width * the width of the chart as image * @param height * the height of the chart as image * * @return the 3D pie chart as image */ public static ImageIcon createPieChart3D(String title, PieDataset dataset, int width, int height) { JFreeChart chart = ChartFactory.createPieChart3D(title, dataset, true, true, false); Font titleFont = UIManager.getFont("TitledBorder.font"); chart.setBackgroundPaint(null); chart.getLegend().setBackgroundPaint(null); chart.getTitle().setFont(new Font(titleFont.getName(), titleFont.getStyle(), 14)); chart.getTitle().setPaint(UIManager.getColor("TitledBorder.titleColor")); chart.setBorderPaint(null); chart.getLegend().setBorder(0, 0, 0, 0); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setForegroundAlpha(0.9f); plot.setDirection(Rotation.CLOCKWISE); plot.setNoDataMessage(_("No data to display.")); plot.setLabelGenerator(null); plot.setInsets(new RectangleInsets(10, 1, 5, 1)); plot.setBackgroundPaint(null); plot.setOutlineVisible(false); plot.setDarkerSides(true); return new ImageIcon(chart.createBufferedImage(width, height)); }
From source file:net.neurowork.cenatic.centraldir.model.graphs.Piechart3DGraphCreator.java
public JFreeChart createGraphChart(String title, String yAxis, Dataset data) { return ChartFactory.createPieChart3D(title, (PieDataset) data, true, true, true); }
From source file:com.thecoderscorner.groovychart.chart.PieChart3D.java
public JFreeChart createChart() { return ChartFactory.createPieChart3D(getTitle(), (PieDataset) getDataset(), isLegend(), isTooltips(), isUrls()); }
From source file:fuel.gui.stats.PieChartPanel.java
public PieChartPanel(DefaultPieDataset pieDataset, String message) { JFreeChart pieChart = ChartFactory.createPieChart3D("", pieDataset, true, true, false); PiePlot3D plot1 = (PiePlot3D) pieChart.getPlot(); plot1.setForegroundAlpha(0.6f);/* w w w .j a v a 2 s .co m*/ //plot3.setCircular(true); ChartPanel barChartPanel = new ChartPanel(pieChart); barChartPanel.getChartRenderingInfo().setEntityCollection(null); barChartPanel.setBorder(BorderFactory.createTitledBorder(message)); barChartPanel.setPreferredSize(new java.awt.Dimension(320, 240)); barChartPanel.setLayout(new BorderLayout()); setLayout(new BorderLayout()); add(barChartPanel); }
From source file:org.amanzi.awe.charts.builder.PieChartBuilder.java
@Override public JFreeChart createChart() throws ModelException { PieDatasetContainer dataset = new PieDatasetContainer(getModel()); dataset.computeDatasets();/*from w ww. j a v a2 s. com*/ return ChartFactory.createPieChart3D(getModel().getName(), dataset.getDataset(getModel().getMainRangeAxis()), true, true, true); }
From source file:Grafica.java
private void init() { panel = new JPanel(); getContentPane().add(panel);/* www . ja v a2 s . c o m*/ // Fuente de Datos DefaultPieDataset defaultpiedataset = new DefaultPieDataset(); defaultpiedataset.setValue("Abiertas 81%", new Double(81D)); defaultpiedataset.setValue("Cerradas 19%", new Double(19D)); // defaultpiedataset.setValue("Hacking", new Double(19.5D)); // defaultpiedataset.setValue("SEO", new Double(30.5D)); // defaultpiedataset.setValue("Redes", new Double(2.0D)); // Creando el Grafico JFreeChart chart = ChartFactory.createPieChart3D("Informe De Asignacin De Clases", defaultpiedataset, true, true, false); PiePlot3D pieplot3d = (PiePlot3D) chart.getPlot(); pieplot3d.setDepthFactor(0.5); pieplot3d.setStartAngle(290D); pieplot3d.setDirection(Rotation.CLOCKWISE); pieplot3d.setForegroundAlpha(0.5F); // Mostrar Grafico ChartPanel chartPanel = new ChartPanel(chart); panel.add(chartPanel); }
From source file:edu.coeia.charts.PieChartPanel.java
private static JFreeChart createChart(final PieDataset dataset, String str) { final JFreeChart chart = ChartFactory.createPieChart3D(str, // chart title dataset, // data true, // include legend true, false);//w ww .j av a 2 s. com final PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); StandardPieSectionLabelGenerator labelGenerator = new StandardPieSectionLabelGenerator("{0} {2}"); plot.setLabelGenerator(labelGenerator); plot.setNoDataMessage("No data to display"); return chart; }
From source file:uk.ac.ed.epcc.webapp.charts.jfreechart.JFreeChart3DPieChartData.java
@Override public JFreeChart getJFreeChart() { DefaultPieDataset pieDataset = makeDataSet(); JFreeChart chart = ChartFactory.createPieChart3D(quantity, // Title pieDataset, // Dataset true // Show legend , false, false);//from w w w. j a va 2s. c om return chart; }
From source file:de.berlios.statcvs.xml.chart.AbstractPieChart.java
/** * @param filename/*from w w w. ja v a 2 s . c om*/ * @param title */ public AbstractPieChart(ReportSettings settings, String filename, String title) { super(settings, filename, title); dataset = new DefaultPieDataset(); JFreeChart chart = ChartFactory.createPieChart3D(settings.getProjectName(), // chart title dataset, // data true, // include legend true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(270); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); //plot.setDepthFactor(0.2); plot.setDepthFactor(0.01); setChart(chart); }
From source file:com.manydesigns.portofino.chart.ChartPie3DGenerator.java
protected JFreeChart createChart(ChartDefinition chartDefinition, PieDataset dataset) { return ChartFactory.createPieChart3D(chartDefinition.getName(), dataset, true, true, true); }