Skip to content

Commit

Permalink
Add links to export comparison charts as PNGs
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Aug 25, 2017
1 parent cfd458d commit d91c362
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion codespeed/static/js/comparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ function refreshContent() {
if (benchmarks.length === 0) { continue; }

var plotid = "plot" + plotcounter;
$("#plotwrapper").append('<div id="' + plotid + '" class="compplot"></div>');
var pngid = "pnglink" + plotcounter;
$("#plotwrapper").append('<div class="plotpng"><a id="' + pngid + '" href="#">PNG</a></div><div id="' + plotid + '" class="compplot"></div>');
plotcounter++;
renderComparisonPlot(plotid, benchmarks, exes, enviros, conf.bas, conf.chart, conf.hor);
$("#" + pngid).data("plot", plotid);
$("#" + pngid).click(function() {
window.location = $("#" + $(this).data("plot")).jqplotToImageStr();
});
}
});
}
Expand Down

0 comments on commit d91c362

Please sign in to comment.