Package org.jfree.chart

Examples of org.jfree.chart.JFreeChart.createBufferedImage()


        BufferedImage biT = chartT.createBufferedImage(800, 500);
        BufferedImage biR = chartR.createBufferedImage(800, 500);
        BufferedImage biU = chartU.createBufferedImage(800, 500);
         */
        //PAT
        BufferedImage bi = chart.createBufferedImage(800, 500);
        try{
           // ImageIO.write(biT, "png", new File(path+"_T.png"));
            //ImageIO.write(biR, "png", new File(path+"_R.png"));
            //ImageIO.write(biU, "png", new File(path+"_U.png"));
            //PAT
View Full Code Here


   
   
    ((XYPlot)chart.getPlot()).setRenderer(1, renderer);
    ((XYPlot)chart.getPlot()).setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
    XulImage image = (XulImage)document.getElementById("chart");
    image.setSrc(chart.createBufferedImage(309, 168));
  }
 
  public void onLoad() {
    bindingFactory.setDocument(document);
    bindingFactory.setBindingType(Binding.Type.BI_DIRECTIONAL);
View Full Code Here

    {

        JFreeChart chart = generateChart(key, width, height, color, startTime, endTime,dataPoints);
        KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
        encoder.setEncodingAlpha(true);
        return encoder.encode(chart.createBufferedImage(width, height, BufferedImage.BITMASK, null));
    }

    /**
     * Creates a chart.
     *
 
View Full Code Here

                chart = generateSparklineAreaChart(key, color, def, startTime, endTime, dataPoints);
        }

        KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
        encoder.setEncodingAlpha(true);
        return encoder.encode(chart.createBufferedImage(width, height, BufferedImage.BITMASK, null));
    }

    private XYDataset populateData(String key, Statistic[] def, long startTime, long endTime,
                                   int dataPoints)
    {
View Full Code Here

     
     
      // Construction du diagramme.
      JFreeChart chart = ChartFactory.createPieChart3D("Répartition par genre", pieDataset,true, true, true );
      chart.setBorderVisible(false);
      BufferedImage image = chart.createBufferedImage(580,275);
      _lblAfficheRepartition.setIcon(new ImageIcon(image));
   
 
     
    } catch (SQLException e) {
View Full Code Here

      String title = "Monthly amount for year 2009";
      JFreeChart chart = ChartFactory.createPieChart(title, pieDataset, true, true, true);
      PiePlot plot = (PiePlot) chart.getPlot();
      plot.setForegroundAlpha(0.5f);
      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Pie Chart", bytes);

      Image img = new Image();
View Full Code Here

      String title = "Monthly amount for year 2009";
      JFreeChart chart = ChartFactory.createPieChart3D(title, pieDataset, true, true, true);
      PiePlot3D plot = (PiePlot3D) chart.getPlot();
      plot.setForegroundAlpha(0.5f);
      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Pie Chart", bytes);

      Image img = new Image();
View Full Code Here

      String title = "Monthly amount for year 2009";
      JFreeChart chart = ChartFactory.createRingChart(title, pieDataset, true, true, true);
      RingPlot plot = (RingPlot) chart.getPlot();
      plot.setForegroundAlpha(0.5f);
      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Ring Chart", bytes);

      Image img = new Image();
View Full Code Here

      JFreeChart chart = ChartFactory.createBarChart(title, "Month", "Amount", dataset, po, true, true, true);

      CategoryPlot plot = (CategoryPlot) chart.getPlot();
      plot.setForegroundAlpha(0.5f);

      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Bar Chart", bytes);

      Image img = new Image();
View Full Code Here

      PlotOrientation po = PlotOrientation.VERTICAL;
      JFreeChart chart = ChartFactory.createBarChart3D(title, "Month", "Amount", dataset, po, true, true, true);

      CategoryPlot plot = (CategoryPlot) chart.getPlot();
      plot.setForegroundAlpha(0.5f);
      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Bar Chart 3D", bytes);

      Image img = new Image();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.