Package org.rrd4j.graph

Examples of org.rrd4j.graph.RrdGraph


    gDef.setImageFormat("png");
    gDef.setAltAutoscaleMax(true);
    gDef.setAntiAliasing(true);

    // create graph finally
    RrdGraph graph = new RrdGraph(gDef);

    graph.render(bufferedImage.getGraphics());
  }
View Full Code Here



                gDef.setImageFormat("png");
                gDef.gprint("triples", ConsolFun.AVERAGE, "average triples/sec: %,.0f\\l");

                RrdGraph graph = new RrdGraph(gDef);
                BufferedImage img = new BufferedImage(900,750, BufferedImage.TYPE_INT_RGB);
                graph.render(img.getGraphics());

                try (OutputStream stream = Files.newOutputStream(gFile, StandardOpenOption.TRUNCATE_EXISTING)) {
                    ImageIO.write(img, "png", stream);
                }
View Full Code Here

        }
      }
    }

    // Write the chart as a PNG image
    RrdGraph graph;
    try {
      graph = new RrdGraph(graphDef);
      BufferedImage bi = new BufferedImage(graph.getRrdGraphInfo().getWidth(), graph.getRrdGraphInfo().getHeight(), BufferedImage.TYPE_INT_RGB);
      graph.render(bi.getGraphics());
     
      return bi;
    } catch (IOException e) {
      logger.error("Error generating graph: {}", e);
    }
View Full Code Here

TOP

Related Classes of org.rrd4j.graph.RrdGraph

Copyright © 2018 www.massapicom. 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.