Skip to content

Commit

Permalink
Merge pull request #18 from hjhafner/master
Browse files Browse the repository at this point in the history
[FIXED JENKINS-28025]
  • Loading branch information
ericbn committed Apr 22, 2015
2 parents 61cf86b + 0b9bf55 commit f2daef9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions src/main/java/hudson/plugins/plot/Plot.java
Expand Up @@ -688,9 +688,13 @@ public String toString() {
Messages.Plot_Build() + " {1}: {2}", NumberFormat.getInstance()));
renderer.setItemURLGenerator(new PointURLGenerator());
if (renderer instanceof LineAndShapeRenderer) {
String s = getUrlStyle();
LineAndShapeRenderer lasRenderer = (LineAndShapeRenderer) renderer;
lasRenderer.setShapesVisible(true); // TODO: deprecated, may be
// unnecessary
if ("lineSimple".equalsIgnoreCase(s)) {
lasRenderer.setShapesVisible(false); // TODO: deprecated, may be unnecessary
} else {
lasRenderer.setShapesVisible(true); // TODO: deprecated, may be unnecessary
}
}
}

Expand Down Expand Up @@ -742,6 +746,12 @@ private JFreeChart createChart(PlotCategoryDataset dataset) {
*/
true, /* url= */false);
}
if ("lineSimple".equalsIgnoreCase(s)) {
return ChartFactory.createLineChart(
getURLTitle(), /*categoryAxisLabel=*/null, getYaxis(), dataset,
PlotOrientation.VERTICAL, hasLegend(), /*tooltips=*/true, /*url=*/false);
}

if ("stackedarea".equalsIgnoreCase(s)) {
return ChartFactory.createStackedAreaChart(getURLTitle(), /*
* categoryAxisLabel
Expand Down
Expand Up @@ -31,6 +31,7 @@
<f:option value="bar" selected="${plot.style=='bar'}">${%Bar}</f:option>
<f:option value="bar3d" selected="${plot.style=='bar3d'}">${%Bar 3D}</f:option>
<f:option value="line" selected="${plot.style=='line' || plot.style=='' || plot.style==null}">${%Line}</f:option>
<f:option value="lineSimple" selected="${plot.style=='lineSimple'}">${%Line simple}</f:option>
<f:option value="line3d" selected="${plot.style=='line3d'}">${%Line 3D}</f:option>
<f:option value="stackedArea" selected="${plot.style=='stackedArea'}">${%Stacked Area}</f:option>
<f:option value="stackedbar" selected="${plot.style=='stackedbar'}">${%Stacked Bar}</f:option>
Expand Down
3 changes: 1 addition & 2 deletions src/main/webapp/help-style.html
@@ -1,16 +1,15 @@
<div>
Specifies the graph style of the plot.
<!-- I think this level of detail is redundant...
This can be any one of:
<ul>
<li>Area - a filled area graph. (area)</li>
<li>Bar - a simple 2D bar graph. (bar)</li>
<li>Bar 3D - a 3D styled bar graph. (bar3d)</li>
<li>Line - a line graph with indicated data points. (line)</li>
<li>Line simple - a line graph without indicated data points. (lineSimple)</li>
<li>Line 3D - (line3d)</li>
<li>Stacked Area - an area graph with each plot stacked . (stackedArea)</li>
<li>Stacked Bar. (stackedBar)</li>
<li>Stacked Bar 3D. (stackedBar3d)</li>
<li>Waterfall. (waterfall)</li>
</ul> -->
</div>

0 comments on commit f2daef9

Please sign in to comment.