org.apache.jmeter.testelement
Class AbstractChart
- Cloneable, ReportChart, Serializable, TestElement
public abstract class AbstractChart
The general idea of the chart graphs information for a table.
A chart can only be generated from a specific table, though more
than one chart can be generated from a single table.
BufferedImage | getBufferedImage() - this makes it easy to get the bufferedImage
|
String | getCaption() - The caption is a description for the chart explaining
what the chart means.
|
String | getFormattedXAxis()
|
int | getHeight() - if the height is not set, the default is returned
|
String | getTitle() - The title is a the name for the chart.
|
double | getValue(SamplingStatCalculator stat) - convienance method for getting the selected value.
|
int | getWidth() - if no width is set, the default is returned
|
String | getXAxis()
|
String | getXLabel()
|
String | getYAxis()
|
String | getYLabel()
|
abstract JComponent | renderChart(List data) - Subclasses will need to implement the method by doing the following:
1. get the x and y axis
2. filter the table data
3. pass the data to the chart library
4. return the generated chart
|
void | setBufferedImage(BufferedImage img) - in case an user wants set the bufferdImage
|
void | setCaption(String caption) - The caption is a description for the chart explaining
what the chart means.
|
void | setHeight(String height) - set the height of the graph
|
void | setTitle(String title) - The title is a the name for the chart.
|
void | setWidth(String width) - set the width of the graph
|
void | setXAxis(String field)
|
void | setXLabel(String label) - The X data labels should be either the filename, date or some
other series of values
|
void | setYAxis(String scale)
|
void | setYLabel(String label)
|
addProperty , addTestElement , canRemove , clear , clearTemporary , clone , emptyTemporary , equals , getComment , getName , getProperty , getPropertyAsBoolean , getPropertyAsBoolean , getPropertyAsDouble , getPropertyAsFloat , getPropertyAsInt , getPropertyAsInt , getPropertyAsLong , getPropertyAsString , getPropertyAsString , getThreadContext , getThreadName , hashCode , isEnabled , isRunningVersion , isTemporary , logProperties , mergeIn , propertyIterator , recoverRunningVersion , removeProperty , setComment , setName , setProperty , setProperty , setProperty , setProperty , setProperty , setProperty , setProperty , setRunningVersion , setTemporary , setThreadContext , setThreadName , traverse , traverseCollection , traverseMap , traverseProperty |
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHT
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH
REPORT_CHART_CAPTION
public static final String REPORT_CHART_CAPTION
REPORT_CHART_HEIGHT
public static final String REPORT_CHART_HEIGHT
REPORT_CHART_TITLE
public static final String REPORT_CHART_TITLE
REPORT_CHART_WIDTH
public static final String REPORT_CHART_WIDTH
REPORT_CHART_X_AXIS
public static final String REPORT_CHART_X_AXIS
REPORT_CHART_X_LABEL
public static final String REPORT_CHART_X_LABEL
REPORT_CHART_Y_AXIS
public static final String REPORT_CHART_Y_AXIS
REPORT_CHART_Y_LABEL
public static final String REPORT_CHART_Y_LABEL
X_DATA_DATE_LABEL
public static final String X_DATA_DATE_LABEL
X_DATA_FILENAME_LABEL
public static final String X_DATA_FILENAME_LABEL
X_LABELS
public static final String[] X_LABELS
image
protected BufferedImage image
AbstractChart
public AbstractChart()
getBufferedImage
public BufferedImage getBufferedImage()
this makes it easy to get the bufferedImage
getCaption
public String getCaption()
The caption is a description for the chart explaining
what the chart means.
getFormattedXAxis
public String getFormattedXAxis()
getHeight
public int getHeight()
if the height is not set, the default is returned
getTitle
public String getTitle()
The title is a the name for the chart. A page link will
be generated using the title. The title will also be
used for a page index.
getValue
public double getValue(SamplingStatCalculator stat)
convienance method for getting the selected value. Rather than use
Method.invoke(Object,Object[]), it's simpler to just check which
column is selected and call the method directly.
getWidth
public int getWidth()
if no width is set, the default is returned
getXAxis
public String getXAxis()
getXLabel
public String getXLabel()
getYAxis
public String getYAxis()
getYLabel
public String getYLabel()
renderChart
public abstract JComponent renderChart(List data)
Subclasses will need to implement the method by doing the following:
1. get the x and y axis
2. filter the table data
3. pass the data to the chart library
4. return the generated chart
- renderChart in interface ReportChart
setBufferedImage
public void setBufferedImage(BufferedImage img)
in case an user wants set the bufferdImage
setCaption
public void setCaption(String caption)
The caption is a description for the chart explaining
what the chart means.
setHeight
public void setHeight(String height)
set the height of the graph
setTitle
public void setTitle(String title)
The title is a the name for the chart. A page link will
be generated using the title. The title will also be
used for a page index.
setWidth
public void setWidth(String width)
set the width of the graph
setXAxis
public void setXAxis(String field)
setXLabel
public void setXLabel(String label)
The X data labels should be either the filename, date or some
other series of values
setYAxis
public void setYAxis(String scale)
setYLabel
public void setYLabel(String label)
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.