Package org.jfree.chart

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


      PlotOrientation po = PlotOrientation.VERTICAL;
      JFreeChart chart = ChartFactory.createStackedBarChart(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("Stacked Bar Chart", bytes);

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


      PlotOrientation po = PlotOrientation.VERTICAL;
      JFreeChart chart = ChartFactory.createStackedBarChart3D(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("Stacked Bar Chart 3D", bytes);

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

      PlotOrientation po = PlotOrientation.VERTICAL;
      JFreeChart chart = ChartFactory.createLineChart(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("Line Bar Chart", bytes);

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

      PlotOrientation po = PlotOrientation.VERTICAL;
      JFreeChart chart = ChartFactory.createLineChart3D(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("Line Bar Chart 3D", bytes);

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

                true, // Show Legend
                true, // Use tooltips
                false // Configure chart to generate URLs?
                );

        BufferedImage chartImage = chart.createBufferedImage(300,200);
        if(!lblchart.isVisible())
        {
            this.setSize(this.getWidth()+300,this.getHeight());
            lblchart.setVisible(true);
        }
View Full Code Here

            ValueAxis domainAxis = new NumberAxis("X");
            ValueAxis rangeAxis = new NumberAxis("Y");
            FastScatterPlot plot = new FastScatterPlot(data, domainAxis,
                    rangeAxis);
            JFreeChart chart = new JFreeChart(plot);
            /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                    null);
            success = true;
        }
        catch (NullPointerException e) {
            e.printStackTrace();
View Full Code Here

            dataset.addValue(1.0, "S1", "C1");
            CategoryPlot plot = new CategoryPlot(dataset,
                    new CategoryAxis("Category"), new NumberAxis("Value"),
                    new LevelRenderer());
            JFreeChart chart = new JFreeChart(plot);
            /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                    null);
            success = true;
        }
        catch (NullPointerException e) {
            e.printStackTrace();
View Full Code Here

        }

        assertEquals(chart, chart2);
        boolean passed = true;
        try {
            chart2.createBufferedImage(300, 200);
        }
        catch (Exception e) {
            passed = false;
            e.printStackTrace();
        }
View Full Code Here

        }

        assertEquals(chart, chart2);
        boolean passed = true;
        try {
            chart2.createBufferedImage(300, 200);
        }
        catch (Exception e) {
            passed = false;
            e.printStackTrace();
        }
View Full Code Here

            dataset.add(3.0, 4.0, "S1", "C2");
            CategoryPlot plot = new CategoryPlot(dataset,
                    new CategoryAxis("Category"), new NumberAxis("Value"),
                    new StatisticalBarRenderer());
            JFreeChart chart = new JFreeChart(plot);
            /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                    null);
            success = true;
        }
        catch (NullPointerException e) {
            e.printStackTrace();
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.