Class ItemHistoryChart

java.lang.Object
io.jenkins.plugins.reporter.charts.ItemHistoryChart

public class ItemHistoryChart extends Object
Builds the Java side model for a trend chart showing the accurate, manually and incorrect parts of an asset or report. 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:
Simon Symhoven
See Also:
  • JacksonFacade
  • Constructor Details

    • ItemHistoryChart

      public ItemHistoryChart()
  • Method Details

    • create

      public edu.hm.hafner.echarts.LinesChartModel create(Iterable<? extends edu.hm.hafner.echarts.BuildResult<ReportResult>> results, edu.hm.hafner.echarts.ChartModelConfiguration configuration, edu.hm.hafner.echarts.SeriesBuilder<ReportResult> builder, Report report, @Nullable List<Item> items)
      Creates the chart for the specified results.
      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 on
      configuration - the chart configuration to be used
      builder - the SeriesBuilder to use for the model. ItemSeriesBuilder for each asset on build level or ReportSeriesBuilder for the aggregated result on job level.
      report - the report
      Returns:
      the chart model, ready to be serialized to JSON