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
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.jfree.chart.JFreeChart
createGraph()
Actually render a chart.void
doMap(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Renders a clickable map.void
doPng(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Renders a graph.static Dimension
safeDimension(int width, int height, int defaultWidth, int defaultHeight)
-
-
-
Constructor Detail
-
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 Detail
-
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.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
Renders a graph.- Throws:
IOException
-
doMap
public void doMap(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
Renders a clickable map.- Throws:
IOException
-
-