Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50924

StackedArea chart style broken in plot plugin since 2.0.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • plot-plugin
    • Jenkins 2.117, Plot plugin 2.0.3

      The StackedArea chart style stopped working after recent updates to the plot plugin and the graph is now simply shown in the default line style.

      After looking into the code base I discovered that the bug is caused by a recent change in creating the charts via hudson.plugins.plot.Plot#createChart and the newly introduced ChartStyle enum.

      The problem is that via the hudson.plugins.plot.Plot.ChartStyle#forName method the given style is now compared case-sensitive while it was previously compare case-insensitive. And it just so happens to be that the StackedArea style is passed via the config as stackedArea (see hudson/plugins/plot/PlotBuilder/config.jelly:41) but the name of the hudson.plugins.plot.Plot.ChartStyle#STACKED_AREA enum is just stackedarea.

      This results in the StackedArea style to be interpreted as LineSimple style, which is not the desired outcome. Fixing this bug could be done via a change to the config file or to the name of the enum. Or just change the comparison to be again case-insensitive as before.

      Thanks in advance for looking into this. It would be great if our graph would work again as expected.

       

            vgaidarji Veaceslav Gaidarji
            stefanv Stefan Victora
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: