Class AbstractPlot
- java.lang.Object
-
- com.hello2morrow.sonargraph.integration.jenkins.model.AbstractPlot
-
- Direct Known Subclasses:
TimeSeriesPlot
,XYLineAndShapePlot
public abstract class AbstractPlot extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static Paint
DATA_COLOR
protected IMetricHistoryProvider
m_datasetProvider
-
Constructor Summary
Constructors Constructor Description AbstractPlot(IMetricHistoryProvider datasetProvider)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
applyRendering(org.jfree.chart.plot.XYPlot plot)
protected void
checkMinMaxYValue(double value)
protected abstract org.jfree.chart.JFreeChart
createChartInternal(String chartTitle, String categoryName, String yAxisName, org.jfree.data.xy.XYDataset dataset)
org.jfree.chart.JFreeChart
createXYChart(MetricId metric, String categoryName, int maximumNumberOfDataPoints, boolean hideLegend)
Creates a chart for a Sonargraph metricprotected org.jfree.data.xy.XYDataset
createXYDataset(MetricId metric, int maximumNumberOfDataPoints)
Creates a XYDataset from a CSV file.protected int
getDatasetSize()
protected double
getMaximumValue()
protected double
getMinimumValue()
long
getTimestampOfLastDisplayedPoint()
protected void
setDataSetSize(int itemCount)
protected void
setMaximumValue(double maximumValue)
protected void
setMinimumValue(double minimumValue)
protected void
setRangeAxis(boolean hideDecimals, org.jfree.chart.plot.XYPlot plot)
Configure the Y-axis: Adjust the range and specify tick units.protected void
setTimestampOfLastDisplayedPoint(long timestamp)
-
-
-
Field Detail
-
DATA_COLOR
protected static final Paint DATA_COLOR
-
m_datasetProvider
protected IMetricHistoryProvider m_datasetProvider
-
-
Constructor Detail
-
AbstractPlot
public AbstractPlot(IMetricHistoryProvider datasetProvider)
-
-
Method Detail
-
createXYChart
public final org.jfree.chart.JFreeChart createXYChart(MetricId metric, String categoryName, int maximumNumberOfDataPoints, boolean hideLegend)
Creates a chart for a Sonargraph metric- Parameters:
categoryName
- Name for the X-Axis, representing a category- Returns:
- Chart built with the given parameters.
-
createXYDataset
protected org.jfree.data.xy.XYDataset createXYDataset(MetricId metric, int maximumNumberOfDataPoints) throws IOException
Creates a XYDataset from a CSV file.- Throws:
IOException
-
createChartInternal
protected abstract org.jfree.chart.JFreeChart createChartInternal(String chartTitle, String categoryName, String yAxisName, org.jfree.data.xy.XYDataset dataset)
-
applyRendering
protected abstract void applyRendering(org.jfree.chart.plot.XYPlot plot)
-
setDataSetSize
protected void setDataSetSize(int itemCount)
-
checkMinMaxYValue
protected void checkMinMaxYValue(double value)
-
getMinimumValue
protected double getMinimumValue()
-
getMaximumValue
protected double getMaximumValue()
-
setMinimumValue
protected void setMinimumValue(double minimumValue)
-
setMaximumValue
protected void setMaximumValue(double maximumValue)
-
getTimestampOfLastDisplayedPoint
public long getTimestampOfLastDisplayedPoint()
-
setTimestampOfLastDisplayedPoint
protected void setTimestampOfLastDisplayedPoint(long timestamp)
-
setRangeAxis
protected void setRangeAxis(boolean hideDecimals, org.jfree.chart.plot.XYPlot plot)
Configure the Y-axis: Adjust the range and specify tick units.
-
getDatasetSize
protected int getDatasetSize()
-
-