Skip to content

Commit

Permalink
Add titles and axes labels
Browse files Browse the repository at this point in the history
  • Loading branch information
considerate committed Nov 13, 2020
1 parent 7142270 commit 91886d7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
1 change: 0 additions & 1 deletion templates/criterion.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ span#explain-interactivity {
}
}
.kde canvas {
border-top: 1px solid rgba(0,0,0,0.1);
}
table.analysis .low, table.analysis .high {
opacity: 0.5;
Expand Down
30 changes: 25 additions & 5 deletions templates/criterion.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@
},
}],
options: {
title: {
display: true,
text: report.groups.join(' / ') + ' — time densities',
},
elements: {
point: {
radius: 0,
Expand All @@ -531,6 +535,10 @@
xAxes: [{
display: true,
type: 'linear',
scaleLabel: {
display: true,
labelString: 'Time'
},
ticks: {
min: reportKDE.kdeValues[0] * scale,
max: reportKDE.kdeValues[reportKDE.kdeValues.length - 1] * scale,
Expand All @@ -545,10 +553,14 @@
}
}],
yAxes: [{
display: false,
display: true,
type: 'linear',
ticks: {
min: 0,
callback: function(value, inde, values) {
console.log(values);
return '';
},
},
}]
},
Expand All @@ -572,10 +584,6 @@
hover: {
intersect: false
},
title: {
display: false,
text: 'Chart.js Horizontal Bar Chart'
}
}
});
return canvas;
Expand Down Expand Up @@ -660,10 +668,18 @@
],
},
options: {
title: {
display: true,
text: report.groups.join(' / ') + ' — time per iteration',
},
scales: {
yAxes: [{
display: true,
type: 'linear',
scaleLabel: {
display: true,
labelString: 'Time'
},
ticks: {
callback: function(value, index, values) {
return formatTime(value);
Expand All @@ -673,6 +689,10 @@
xAxes: [{
display: true,
type: 'linear',
scaleLabel: {
display: true,
labelString: 'Iterations'
},
ticks: {
callback: formatter,
max: lastIter,
Expand Down

0 comments on commit 91886d7

Please sign in to comment.