com.sonyericsson.jenkins.plugins.bfa.graphs
Class StackedBarChart

java.lang.Object
  extended by hudson.util.Graph
      extended by com.sonyericsson.jenkins.plugins.bfa.graphs.BFAGraph
          extended by com.sonyericsson.jenkins.plugins.bfa.graphs.StackedBarChart
Direct Known Subclasses:
BuildNbrStackedBarChart

public abstract class StackedBarChart
extends BFAGraph

Bar chart displaying failure causes. Since it's a stacked bar chart, different failure causes for the same x-value will get stacked in different colors on top of each other.

Author:
Fredrik Persson <fredrik6.persson@sonymobile.com>

Field Summary
protected static String NO_FAILURE
          String used for creating "empty" x-values without y-values (if there are no failure causes).
 
Fields inherited from class com.sonyericsson.jenkins.plugins.bfa.graphs.BFAGraph
filter, GRAPH_OTHERS, GRAPH_UNCATEGORIZED, GRAPH_UNKNOWN, graphTitle, MAX_GRAPH_ELEMENTS, MAX_YEARS_FOR_TIME_GRAPH, project
 
Constructor Summary
StackedBarChart(long timestamp, int defaultW, int defaultH, hudson.model.AbstractProject project, GraphFilterBuilder filter, String graphTitle)
          Default constructor.
 
Method Summary
protected abstract  org.jfree.data.category.DefaultCategoryDataset createDataset()
          Creates the dataset used for plotting the graph.
protected  org.jfree.chart.JFreeChart createGraph()
           
protected abstract  String getTitle()
          Getter for the graph title.
protected abstract  String getXAxisTitle()
          Getter for the X-axis title.
protected abstract  String getYAxisTitle()
          Getter for the Y-axis title.
 
Methods inherited from class com.sonyericsson.jenkins.plugins.bfa.graphs.BFAGraph
getBuildNumbers
 
Methods inherited from class hudson.util.Graph
doMap, doPng
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_FAILURE

protected static final String NO_FAILURE
String used for creating "empty" x-values without y-values (if there are no failure causes). This string is typically hidden from the legend.

See Also:
Constant Field Values
Constructor Detail

StackedBarChart

public StackedBarChart(long timestamp,
                       int defaultW,
                       int defaultH,
                       hudson.model.AbstractProject project,
                       GraphFilterBuilder filter,
                       String graphTitle)
Default constructor.

Parameters:
timestamp - timestamp for this project graph, used for HTTP caching. Set to -1 if timestamp is not needed.
defaultW - width of the graph in pixels
defaultH - height of the graph in pixels
project - the parent project of this graph
filter - the filter used when fetching data for this graph
graphTitle - The title of the graph
Method Detail

createGraph

protected org.jfree.chart.JFreeChart createGraph()
Specified by:
createGraph in class hudson.util.Graph

createDataset

protected abstract org.jfree.data.category.DefaultCategoryDataset createDataset()
Creates the dataset used for plotting the graph.

Returns:
created dataset

getTitle

protected abstract String getTitle()
Getter for the graph title.

Returns:
graph title

getYAxisTitle

protected abstract String getYAxisTitle()
Getter for the Y-axis title.

Returns:
title for the Y-axis

getXAxisTitle

protected abstract String getXAxisTitle()
Getter for the X-axis title.

Returns:
title for the X-axis


Copyright © 2004-2014. All Rights Reserved.