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.rbs90.fwdisp.settingsgui.gui.tabs.statistics.OtherCityStats.java
public OtherCityStats() { setName("Region"); setLayout(new BorderLayout()); DefaultPieDataset data = new DefaultPieDataset(); data.setValue("HOT", 110); data.setValue("Oberlungwitz", 60); data.setValue("Limbach", 80); data.setValue("Glauchau", 90); data.setValue("Meerane", 100); data.setValue("Lichtenstein", 90); JFreeChart chart = ChartFactory.createPieChart3D("Einsatztypen", data, false, false, false); chart.setBackgroundPaint(getBackground()); ChartPanel panel = new ChartPanel(chart); panel.setPopupMenu(null);//from w w w .java 2 s . c om add(panel, BorderLayout.CENTER); }
From source file:com.rapidminer.gui.plotter.charts.PieChart3DPlotter.java
@Override public JFreeChart createChart(PieDataset pieDataSet, boolean createLegend) { JFreeChart chart = ChartFactory.createPieChart3D(null, pieDataSet, createLegend, // legend true, false);//w w w.j a v a 2s . c om PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setForegroundAlpha(0.5f); return chart; }
From source file:com.sjsu.uidesign.SystemUsage.java
public SystemUsage() { super();/*from www . j a va 2 s.c o m*/ super.setTitle("System Usage"); super.setSize(500, 500); super.setResizable(true); super.setLocationRelativeTo(null); //JLabel usageImage = new JLabel(); //usageImage.setIcon(new ImageIcon("Pie_3.png")); //usageImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sjsu/uidesign/Pie_3.png"))); // NOI18N //add(usageImage); DefaultPieDataset pieDataset = new DefaultPieDataset(); pieDataset.setValue("System Idle", 30); pieDataset.setValue("System Busy", 70); JFreeChart pieChart = ChartFactory.createPieChart3D("System Usage", pieDataset, true, true, true); Plot Pie = pieChart.getPlot(); ChartPanel piePanel = new ChartPanel(pieChart); JPanel panelPie = new JPanel(); panelPie.removeAll(); panelPie.add(piePanel, BorderLayout.CENTER); panelPie.validate(); add(panelPie); }
From source file:Interfaz.VnReporteCliente.java
/** * Creates new form VnReporteCliente/* ww w .j a v a 2 s . co m*/ */ public VnReporteCliente() { initComponents(); setLocationRelativeTo(null); // Fuente de Datos defaultpiedataset = new DefaultPieDataset(); defaultpiedataset.setValue("Total de Tickets Liberados", (Integer.parseInt(lblNumTicketsResividos.getText()) - Integer.parseInt(lblNumTicketsSatisfactorios.getText()))); defaultpiedataset.setValue("Tickets Atendidos Satisfactoriamente", Integer.parseInt(lblNumTicketsSatisfactorios.getText())); //defaultpiedataset.setValue("Hacking", new Double(19.5D)); //defaultpiedataset.setValue("SEO", new Double(30.5D)); //defaultpiedataset.setValue("Redes", new Double(2.0D)); // Creando el Grafico chart = ChartFactory.createPieChart3D("Mi Proporcin", 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 = new ChartPanel(chart); chartPanel.setBounds(0, 0, 314, 270); jpGrafico.add(chartPanel); }
From source file:unikn.dbis.univis.visualization.chart.PieChart.java
/** * Returns the JFreeChart. * * @return JFreeChart. */ protected JFreeChart createChart() { return ChartFactory.createPieChart3D(getChartName(), getDataset(), true, false, false); }
From source file:com.codeandme.jfreechart.DemoView.java
private org.jfree.chart.JFreeChart createChart(final PieDataset dataset, final String title) { final JFreeChart chart = ChartFactory.createPieChart3D(title, dataset, true, true, false); final PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290);/*from ww w . j av a 2 s . c om*/ plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); return chart; }
From source file:javaapplication2.PieChart.java
private JFreeChart createChart(PieDataset dataset, String title) { JFreeChart chart = ChartFactory.createPieChart3D(title, dataset, true, true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290);// w w w . j av a 2 s . c om plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); return chart; }
From source file:statistic.graph.gui.Charts.java
public static JFreeChart createPieChart3D(DiagramData data, PieDataset dataset) { JFreeChart chart = ChartFactory.createPieChart3D(data.getTitle(), dataset, true, true, false); return chart; }
From source file:org.mc.okapi.PieChart.java
public PieChart(String[] label, double[] value, String applicationTitle, String chartTitle) { super(applicationTitle); // This will create the dataset DefaultPieDataset result = new DefaultPieDataset(); for (int i = 0; i < label.length; i++) { result.setValue(label[i], value[i]); }//w ww. jav a 2s. co m PieDataset dataset = result; // based on the dataset we create the chart JFreeChart chart = ChartFactory.createPieChart3D(chartTitle, // chart title dataset, // data true, // include legend true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); // we put the chart into a panel ChartPanel chartPanel = new ChartPanel(chart); setIconImage(Toolkit.getDefaultToolkit().getImage("images/ico/extra/science_32.png")); // default size chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); // add it to our application setContentPane(chartPanel); }
From source file:app.view.panel.PanelCamembert.java
/** * Cre le graphique// w w w . ja va 2 s .c o m * * @param dataset Echantillon de donnes * @return Graphique */ private JFreeChart createChart(PieDataset dataset) { final JFreeChart chart = ChartFactory.createPieChart3D("Rpartition gographique", // chart title dataset, // data true, // include legend true, false); final PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.9f); plot.setNoDataMessage("Unlucky donnes ://// gg rito"); return chart; }