Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>5.9</version>
<version>5.12</version>
<relativePath />
</parent>

Expand Down
14 changes: 4 additions & 10 deletions src/main/java/hudson/plugins/plot/CSVSeries.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,18 +280,12 @@ private boolean excludePoint(final String label, int index) {

boolean retVal =
switch (inclusionFlag) {
case INCLUDE_BY_STRING ->
// if the set contains it, don't exclude it.
!checkExclusionSet(label);
case EXCLUDE_BY_STRING ->
// if the set doesn't contain it, exclude it.
checkExclusionSet(label);
case INCLUDE_BY_STRING -> !checkExclusionSet(label); // if the set contains it, don't exclude it.
case EXCLUDE_BY_STRING -> checkExclusionSet(label); // if the set doesn't contain it, exclude it.
case INCLUDE_BY_COLUMN ->
// if the set contains it, don't exclude it.
!(colExclusionSet.contains(index));
!(colExclusionSet.contains(index)); // if the set contains it, don't exclude it.
case EXCLUDE_BY_COLUMN ->
// if the set doesn't contain it, don't exclude it.
colExclusionSet.contains(index);
colExclusionSet.contains(index); // if the set doesn't contain it, don't exclude it.
default -> false;
};

Expand Down
50 changes: 30 additions & 20 deletions src/main/java/hudson/plugins/plot/Plot.java
Original file line number Diff line number Diff line change
Expand Up @@ -896,26 +896,36 @@ private void generatePlot(boolean forceGenerate) {
*/
private JFreeChart createChart(PlotCategoryDataset dataset) {
return switch (ChartStyle.forName(getUrlStyle())) {
case AREA -> ChartFactory.createAreaChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case BAR -> ChartFactory.createBarChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case BAR_3D -> ChartFactory.createBarChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case LINE_3D -> ChartFactory.createLineChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case LINE_SIMPLE -> ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_AREA -> ChartFactory.createStackedAreaChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_BAR -> ChartFactory.createStackedBarChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_BAR_3D -> ChartFactory.createStackedBarChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case WATERFALL -> ChartFactory.createWaterfallChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
default -> ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case AREA ->
ChartFactory.createAreaChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case BAR ->
ChartFactory.createBarChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case BAR_3D ->
ChartFactory.createBarChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case LINE_3D ->
ChartFactory.createLineChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case LINE_SIMPLE ->
ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_AREA ->
ChartFactory.createStackedAreaChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_BAR ->
ChartFactory.createStackedBarChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_BAR_3D ->
ChartFactory.createStackedBarChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case WATERFALL ->
ChartFactory.createWaterfallChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
default ->
ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
};
}

Expand Down