cut off large spikes by default

This commit is contained in:
xenofem 2023-10-14 23:54:36 -04:00
parent 5999d54842
commit d1f8a3b8b6

View file

@ -5,7 +5,7 @@ const cutSpikesInput = document.getElementById('cutSpikes');
const hashParams = new URLSearchParams(window.location.hash.substring(1));
startInput.value = hashParams.get('start');
endInput.value = hashParams.get('end');
cutSpikesInput.checked = hashParams.get('cutSpikes') === 'true';
cutSpikesInput.checked = hashParams.get('cutSpikes') !== 'false';
const SPIKE_PERCENTILE = 95;
const Y_ROUNDING = 500;
@ -303,8 +303,8 @@ function plot(data) {
if (end !== '') {
params.set('end', end);
}
if (cutSpikesInput.checked) {
params.set('cutSpikes', 'true');
if (!cutSpikesInput.checked) {
params.set('cutSpikes', 'false');
}
window.location.hash = params.toString();
};