Examples of RrdGraph


Examples of org.jrobin.graph.RrdGraph

      graphTemplate.setVariable("start", start);
      graphTemplate.setVariable("end", end);
      graphTemplate.setVariable("rrd", _rrdPath);
      // create graph finally
      RrdGraphDef gDef = graphTemplate.getRrdGraphDef();
      RrdGraph graph = new RrdGraph(gDef);
      return graph.getRrdGraphInfo().getBytes();
    }
    catch (Exception e)
    {
      _logger.warn("Unable to create graph", e);
      return null;
View Full Code Here

Examples of org.jrobin.graph.RrdGraph

      rrdGraphDef.comment("START: " + new Date(t1 * 1000L) + "\\r");
      rrdGraphDef.comment("END: " + new Date(t2 * 1000L) + "\\r");
      int width = graphPanel.getWidth(), height = graphPanel.getHeight();
      rrdGraphDef.setWidth(width + deltaWidth);
      rrdGraphDef.setHeight(height + deltaHeight);
      rrdGraph = new RrdGraph(rrdGraphDef);
      if (deltaWidth == 0 && deltaHeight == 0) {
        RrdGraphInfo info = rrdGraph.getRrdGraphInfo();
        deltaWidth = graphPanel.getWidth() - info.getWidth();
        deltaHeight = graphPanel.getHeight() - info.getHeight();
        if (deltaWidth != 0 && deltaHeight != 0) {
View Full Code Here

Examples of org.jrobin.graph.RrdGraph

  Object execute() throws RrdException, IOException {
    gdef = getGraphDef();
   
    // create diagram finally
    RrdGraphInfo info = new RrdGraph(gdef).getRrdGraphInfo();
    if (info.getFilename().equals(RrdGraphConstants.IN_MEMORY_IMAGE)) {
      println(new String(info.getBytes()));
    }
    else {
      println(info.getWidth() + "x" + info.getHeight());
View Full Code Here

Examples of org.jrobin.graph.RrdGraph

  Object execute() throws RrdException, IOException {
    gdef = getGraphDef();
   
    // create diagram finally
    RrdGraphInfo info = new RrdGraph(gdef).getRrdGraphInfo();
    if (info.getFilename().equals(RrdGraphConstants.IN_MEMORY_IMAGE)) {
      println(new String(info.getBytes()));
    }
    else {
      println(info.getWidth() + "x" + info.getHeight());
View Full Code Here

Examples of org.jrobin.graph.RrdGraph

      rrdGraphDef.comment("START: " + new Date(t1 * 1000L) + "\\r");
      rrdGraphDef.comment("END: " + new Date(t2 * 1000L) + "\\r");
      int width = graphPanel.getWidth(), height = graphPanel.getHeight();
      rrdGraphDef.setWidth(width + deltaWidth);
      rrdGraphDef.setHeight(height + deltaHeight);
      rrdGraph = new RrdGraph(rrdGraphDef);
      if (deltaWidth == 0 && deltaHeight == 0) {
        RrdGraphInfo info = rrdGraph.getRrdGraphInfo();
        deltaWidth = graphPanel.getWidth() - info.getWidth();
        deltaHeight = graphPanel.getHeight() - info.getHeight();
        if (deltaWidth != 0 && deltaHeight != 0) {
View Full Code Here

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

Examples of org.rrd4j.graph.RrdGraph


                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

Examples of org.rrd4j.graph.RrdGraph

        }
      }
    }

    // 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
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.