Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix up ordering and grouping.

  • Loading branch information...
commit 30541af197202c650e0466c48f3b04950e9af49e 1 parent d5c4365
@bos authored
Showing with 18 additions and 5 deletions.
  1. +5 −0 templates/criterion.css
  2. +13 −5 templates/report.tpl
View
5 templates/criterion.css
@@ -10,6 +10,11 @@ a:link {
text-decoration: none;
}
+a:visited {
+ color: #4a743b;
+ text-decoration: none;
+}
+
.hover {
color: steelblue;
text-decoration: none;
View
18 templates/report.tpl
@@ -113,18 +113,26 @@ $(function () {
{{/report}}
var benches = [{{#report}}"{{name}}",{{/report}}];
- var ylabels = [{{#report}}[{{number}},'<a href="#b{{number}}">{{name}}</a>'],{{/report}}];
+ var ylabels = [{{#report}}[-{{number}},'<a href="#b{{number}}">{{name}}</a>'],{{/report}}];
var means = $.scaleTimes([{{#report}}{{anMean.estPoint}},{{/report}}]);
- var xs = new Array(means[0].length);
+ var xs = [];
+ var prev = null;
for (var i = 0; i < means[0].length; i++) {
- var j = means[0].length - i - 1;
- xs[i] = {label: benches[j], data: [[means[0][j], j]] };
+ var name = benches[i].split(/\//);
+ name.pop();
+ name = name.join('/');
+ if (name != prev) {
+ xs.push({ label: name, data: [[means[0][i], -i]]});
+ prev = name;
+ }
+ else
+ xs[xs.length-1].data.push([means[0][i],-i]);
}
var oq = $("#overview");
o = $.plot(oq, xs, { bars: { show: true, horizontal: true,
barWidth: 0.75, align: "center" },
grid: { hoverable: true },
- legend: { show: false },
+ legend: { show: xs.length > 1 },
xaxis: { max: Math.max.apply(undefined,means[0]) * 1.02 },
yaxis: { ticks: ylabels, tickColor: '#ffffff' } });
if (benches.length > 3)
Please sign in to comment.
Something went wrong with that request. Please try again.