Class MetricsTrendChart
java.lang.Object
io.jenkins.plugins.coverage.metrics.charts.TrendChart
io.jenkins.plugins.coverage.metrics.charts.MetricsTrendChart
Builds the Java side model for a trend chart showing the metrics of a project. The number of builds to consider is
controlled by a
ChartModelConfiguration
instance. The created model object can be serialized to JSON (e.g.,
using the JacksonFacade
) and can be used 1:1 as ECharts configuration object in the corresponding JS file.- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsTrendChart
(Set<edu.hm.hafner.coverage.Metric> visibleMetrics, boolean useLines) Creates a newMetricsTrendChart
. -
Method Summary
Modifier and TypeMethodDescriptionedu.hm.hafner.echarts.line.LinesChartModel
create
(Iterable<edu.hm.hafner.echarts.BuildResult<CoverageStatistics>> results, edu.hm.hafner.echarts.ChartModelConfiguration configuration) Creates the chart for the specified results.Methods inherited from class io.jenkins.plugins.coverage.metrics.charts.TrendChart
createTrendChart
-
Constructor Details
-
MetricsTrendChart
Creates a newMetricsTrendChart
.- Parameters:
visibleMetrics
- the metrics to render in the trend chartuseLines
- determines if the chart should use lines or filled areas
-
-
Method Details
-
create
public edu.hm.hafner.echarts.line.LinesChartModel create(Iterable<edu.hm.hafner.echarts.BuildResult<CoverageStatistics>> results, edu.hm.hafner.echarts.ChartModelConfiguration configuration) Description copied from class:TrendChart
Creates the chart for the specified results.- Specified by:
create
in classTrendChart
- Parameters:
results
- the forensics results to render - these results must be provided in descending order, i.e. the current * build is the head of the list, then the previous builds, and so onconfiguration
- the chart configuration to be used- Returns:
- the chart model, ready to be serialized to JSON
-