Skip to content

Commit 6ce7f5e

Browse files
Default to showing absolute data.
Also set minimum value of absolute graphs to 0.
1 parent c0049e9 commit 6ce7f5e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

site/static/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
yAxis: absolute ? {
115115
title: {
116116
text: yAxis,
117-
}
117+
},
118+
min: 0,
118119
} : {
119120
softMax: 5,
120121
softMin: -5,
@@ -153,7 +154,7 @@
153154
start: "",
154155
end: "",
155156
stat: "instructions:u",
156-
absolute: false,
157+
absolute: true,
157158
}, state);
158159
make_request("/graph", values).then(function(response) {
159160
init_graph(response, values.stat, values.absolute);

site/static/shared.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ function load_state(callback) {
205205
}
206206
if (state.absolute === true || state.absolute === false) {
207207
document.getElementById("absolute").checked = state.absolute;
208+
} else {
209+
// check absolute by default
210+
let element = document.getElementById("absolute");
211+
if (element) {
212+
element.checked = true;
213+
}
208214
}
209215
make_settings(() => {
210216
if (state.stat) {

0 commit comments

Comments
 (0)