|
5 | 5 | */ |
6 | 6 | package hudson.plugins.plot; |
7 | 7 |
|
| 8 | +import static org.jfree.chart.plot.PlotOrientation.VERTICAL; |
| 9 | + |
8 | 10 | import com.opencsv.CSVReader; |
9 | 11 | import com.opencsv.CSVWriter; |
10 | 12 | import com.opencsv.exceptions.CsvValidationException; |
|
49 | 51 | import org.jfree.chart.plot.CategoryPlot; |
50 | 52 | import org.jfree.chart.plot.DefaultDrawingSupplier; |
51 | 53 | import org.jfree.chart.plot.DrawingSupplier; |
52 | | -import org.jfree.chart.plot.PlotOrientation; |
53 | 54 | import org.jfree.chart.renderer.category.AbstractCategoryItemRenderer; |
54 | 55 | import org.jfree.chart.renderer.category.LineAndShapeRenderer; |
55 | 56 | import org.kohsuke.stapler.DataBoundConstructor; |
@@ -417,7 +418,7 @@ public Double getDoubleFromString(String input) { |
417 | 418 | } catch (NumberFormatException nfe) { |
418 | 419 | LOGGER.log( |
419 | 420 | Level.INFO, |
420 | | - "Failed to parse Double value from String." + " Not a problem, result already set", |
| 421 | + "Failed to parse double from '" + input + "'. Not a problem, result already set", |
421 | 422 | nfe); |
422 | 423 | } |
423 | 424 | } |
@@ -896,26 +897,36 @@ private void generatePlot(boolean forceGenerate) { |
896 | 897 | */ |
897 | 898 | private JFreeChart createChart(PlotCategoryDataset dataset) { |
898 | 899 | return switch (ChartStyle.forName(getUrlStyle())) { |
899 | | - case AREA -> ChartFactory.createAreaChart( |
900 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
901 | | - case BAR -> ChartFactory.createBarChart( |
902 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
903 | | - case BAR_3D -> ChartFactory.createBarChart3D( |
904 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
905 | | - case LINE_3D -> ChartFactory.createLineChart3D( |
906 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
907 | | - case LINE_SIMPLE -> ChartFactory.createLineChart( |
908 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
909 | | - case STACKED_AREA -> ChartFactory.createStackedAreaChart( |
910 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
911 | | - case STACKED_BAR -> ChartFactory.createStackedBarChart( |
912 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
913 | | - case STACKED_BAR_3D -> ChartFactory.createStackedBarChart3D( |
914 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
915 | | - case WATERFALL -> ChartFactory.createWaterfallChart( |
916 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
917 | | - default -> ChartFactory.createLineChart( |
918 | | - getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); |
| 900 | + case AREA -> |
| 901 | + ChartFactory.createAreaChart( |
| 902 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 903 | + case BAR -> |
| 904 | + ChartFactory.createBarChart( |
| 905 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 906 | + case BAR_3D -> |
| 907 | + ChartFactory.createBarChart3D( |
| 908 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 909 | + case LINE_3D -> |
| 910 | + ChartFactory.createLineChart3D( |
| 911 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 912 | + case LINE_SIMPLE -> |
| 913 | + ChartFactory.createLineChart( |
| 914 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 915 | + case STACKED_AREA -> |
| 916 | + ChartFactory.createStackedAreaChart( |
| 917 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 918 | + case STACKED_BAR -> |
| 919 | + ChartFactory.createStackedBarChart( |
| 920 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 921 | + case STACKED_BAR_3D -> |
| 922 | + ChartFactory.createStackedBarChart3D( |
| 923 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 924 | + case WATERFALL -> |
| 925 | + ChartFactory.createWaterfallChart( |
| 926 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
| 927 | + default -> |
| 928 | + ChartFactory.createLineChart( |
| 929 | + getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false); |
919 | 930 | }; |
920 | 931 | } |
921 | 932 |
|
|
0 commit comments