List of usage examples for org.jfree.chart.plot PiePlot3D setDirection
public void setDirection(Rotation direction)
From source file:net.sf.jasperreports.samples.jfreechart.JFreeChartScriptlet.java
/** * */// w w w. j a va2 s. co m public void afterReportInit() throws JRScriptletException { DefaultPieDataset dataset = new DefaultPieDataset(); dataset.setValue("Java", new Double(43.2)); dataset.setValue("Visual Basic", new Double(10.0)); dataset.setValue("C/C++", new Double(17.5)); dataset.setValue("PHP", new Double(32.5)); dataset.setValue("Perl", new Double(1.0)); JFreeChart chart = ChartFactory.createPieChart3D("Pie Chart 3D Demo 1", dataset, true, true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); plot.setNoDataMessage("No data to display"); /* */ this.setVariableValue("Chart", new JCommonDrawableRenderer(chart)); }
From source file:Controller.PieChart.java
/** * Creates a chart//from w w w . j a v a 2 s. c om */ private JFreeChart createChart(PieDataset dataset, String title) { JFreeChart chart = ChartFactory.createPieChart3D(title, // 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); return chart; }
From source file:app.view.panel.PanelCamembert.java
/** * Cre le graphique// ww w. ja v a 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; }
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]); }//from ww w . ja v a 2 s . 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:org.jfree.chart.demo.PieChart3DDemo3.java
/** * Creates a sample chart.//from w ww. jav a2 s . c o m * * @param dataset the dataset. * * @return A chart. */ private JFreeChart createChart(final PieDataset dataset) { final JFreeChart chart = ChartFactory.createPieChart3D("Pie Chart 3D Demo 3", // 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.5f); plot.setNoDataMessage("No data to display"); plot.setLabelGenerator(null); return chart; }
From source file:reports.util.PieChart3DScriptlet.java
/** * *///w ww . ja v a 2s . co m public void afterReportInit() throws JRScriptletException { JFreeChart chart = ChartFactory.createPieChart3D("Pie Chart 3D Demo 1", dataset, true, true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); plot.setNoDataMessage("No data to display"); /* */ this.setVariableValue("Chart", new JCommonDrawableRenderer(chart)); }
From source file:unikn.dbis.univis.visualization.chart.PieChart.java
/** * Makes the plot.// w w w . ja v a 2s . c o m */ protected void plot() { PiePlot3D plot = (PiePlot3D) getChart().getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); plot.setNoDataMessage("No data available"); plot.setLabelGenerator(null); plot.setLegendLabelGenerator(new LabelGenerator(createTotal())); }
From source file:aplicacion.gestion.tablero.logic.PieChart3DDemo1.java
/** * Creates a sample chart.//from w w w . j a v a 2s .com * * @param dataset the dataset. * * @return A chart. */ private JFreeChart createChart(final PieDataset dataset) { final JFreeChart chart = ChartFactory.createPieChart3D("Pie Chart 3D Demo 1", // 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.5f); plot.setNoDataMessage("No data to display"); return chart; }
From source file:bzstats.chart.KillRatioChart.java
/** * @see bzstats.chart.ChartFactory#getChart() */// ww w . jav a 2s . c o m protected JFreeChart getChart() { DefaultPieDataset dataset = new DefaultPieDataset(); Iterator playeriter = stats.getPlayerStats().values().iterator(); PlayerStats player; int playercount = 0; while (playeriter.hasNext() && (playercount++ < MAXPLAYERS)) { player = (PlayerStats) playeriter.next(); dataset.setValue(player.getName(), player.getKillRatio()); } // create chart and plot JFreeChart chart = ChartFactory.createPieChart3D("Killratio", // chart title dataset, // data false, // include legend true, false); chart.addSubtitle(new TextTitle("kills/deaths")); final PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); plot.setBackgroundAlpha(0); plot.setNoDataMessage("No data to display"); plot.setDepthFactor(.1f); return chart; }
From source file:BrowserAverage.java
private JFreeChart createChart(PieDataset dataset, String title) { JFreeChart chart = ChartFactory.createPieChart3D(title, dataset, true, true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(0);/*from www . j ava 2 s .c o m*/ plot.setDirection(Rotation.ANTICLOCKWISE); plot.setForegroundAlpha(0.5f); rotator = new Rotator(plot, 0); rotator.start(); return chart; }