Package org.jfree.chart

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



        BufferedImage img = new BufferedImage
            (width, height, BufferedImage.TYPE_INT_RGB);
        Graphics2D g2 = img.createGraphics();
        chart.draw(g2, new Rectangle2D.Double(0, 0, width, height));
        g2.dispose();

        int quality = (parameters.containsKey("EXPORT") ? 85 : 100);
        JpegEncoder jpegEncoder = new JpegEncoder(img, quality, outStream);
        jpegEncoder.Compress();
View Full Code Here


        BufferedImage img = new BufferedImage
            (width, height, BufferedImage.TYPE_INT_RGB);
        Graphics2D g2 = img.createGraphics();
        if ("auto".equals(getSetting("titleFontSize")))
            maybeAdjustTitleFontSize(chart, g2, width);
        chart.draw(g2, new Rectangle2D.Double(0, 0, width, height), info);
        g2.dispose();

        String outputFormat = getSetting("outputFormat");
        OutputStream imgOut;
        if (isHtmlMode()) {
View Full Code Here

    try {
      DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
      Document document = domImpl.createDocument(null, "svg", null);
      SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
      /* tady se určuje velikost grafu */
      graf.draw(svgGenerator, new Rectangle2D.Double(0, 0, 640, 400));
      Writer out = new OutputStreamWriter(new FileOutputStream(new File(soubor)), "UTF-8");
      /** tady musí být FALSE, jinak je to rozsypané! */
      svgGenerator.stream(out, false);
                        out.close();
    } catch (IOException e) {
View Full Code Here

    try {
      DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
      Document document = domImpl.createDocument(null, "svg", null);
      SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
      /* tady se určuje velikost grafu */
      graf.draw(svgGenerator, new Rectangle2D.Double(0, 0, 640, 400));
      Writer out = new OutputStreamWriter(new FileOutputStream(new File(soubor)), "UTF-8");
      /** tady musí být FALSE, jinak je to rozsypané! */
      svgGenerator.stream(out, false);
                        out.close();
    } catch (IOException e) {
View Full Code Here

        boolean success = false;
        try {
            BufferedImage image = new BufferedImage(200 , 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null);
            g2.dispose();
            success = true;
        }
        catch (Exception e) {
            success = false;
View Full Code Here

        boolean success = false;
        try {
            BufferedImage image = new BufferedImage(200 , 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null);
            g2.dispose();
            success = true;
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        boolean success = false;
        try {
            BufferedImage image = new BufferedImage(200 , 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null);
            g2.dispose();
            success = true;
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        boolean success = false;
        try {
            BufferedImage image = new BufferedImage(200 , 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null);
            g2.dispose();
            success = true;
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        boolean success = false;
        try {
            BufferedImage image = new BufferedImage(200 , 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null);
            g2.dispose();
            success = true;
        }
        catch (Throwable t) {
            success = false;
View Full Code Here

        JFreeChart chart = new JFreeChart(plot);
        try {
            BufferedImage image = new BufferedImage(200, 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null);
            g2.dispose();
            success = true;
        }
        catch (Exception e) {
            success = false;
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.