Package hudson.util

Class Graph

java.lang.Object
hudson.util.Graph

public abstract class Graph extends Object
A JFreeChart-generated graph that's bound to UI.

This object exposes two URLs:

/png
PNG image of a graph
/map
Clickable map
Since:
1.320
Author:
Kohsuke Kawaguchi
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Graph(long timestamp, int defaultWidth, int defaultHeight)
     
    protected
    Graph(Calendar timestamp, int defaultWidth, int defaultHeight)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract org.jfree.chart.JFreeChart
    Actually render a chart.
    void
    doMap(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp)
    Renders a clickable map.
    void
    doMap(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
    void
    doPng(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp)
    Renders a graph.
    void
    doPng(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
    static Dimension
    safeDimension(int width, int height, int defaultWidth, int defaultHeight)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Graph

      protected Graph(long timestamp, int defaultWidth, int defaultHeight)
      Parameters:
      timestamp - Timestamp of this graph. Used for HTTP cache related headers. If the graph doesn't have any timestamp to tie it to, pass -1.
    • Graph

      protected Graph(Calendar timestamp, int defaultWidth, int defaultHeight)
  • Method Details

    • createGraph

      protected abstract org.jfree.chart.JFreeChart createGraph()
      Actually render a chart.
    • safeDimension

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static Dimension safeDimension(int width, int height, int defaultWidth, int defaultHeight)
    • doPng

      public void doPng(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException
      Renders a graph.
      Throws:
      IOException
      Since:
      2.475
    • doPng

      @Deprecated @StaplerNotDispatchable public void doPng(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
      Throws:
      IOException
    • doMap

      public void doMap(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException
      Renders a clickable map.
      Throws:
      IOException
      Since:
      2.475
    • doMap

      @Deprecated @StaplerNotDispatchable public void doMap(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
      Throws:
      IOException