diff --git a/codespeed/static/js/comparison.js b/codespeed/static/js/comparison.js index b05d77e6..cf723697 100644 --- a/codespeed/static/js/comparison.js +++ b/codespeed/static/js/comparison.js @@ -54,9 +54,14 @@ function refreshContent() { if (benchmarks.length === 0) { continue; } var plotid = "plot" + plotcounter; - $("#plotwrapper").append('
'); + var pngid = "pnglink" + plotcounter; + $("#plotwrapper").append(''); 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(); + }); } }); }