diff --git a/base.js b/base.js index 80a5f46..8bc3778 100644 --- a/base.js +++ b/base.js @@ -19,6 +19,10 @@ function buttonsPlugin(opts) { }); } + const day12 = document.getElementById("h12"); + day12.addEventListener("click", e => { + zoomRange(60 * 60 * 12); + }); const day = document.getElementById("day"); day.addEventListener("click", e => { zoomRange(60 * 60 * 24); @@ -59,7 +63,7 @@ function processCSV() { x: { time: true, range: (u, dataMin, dataMax) => { - if ((dataMax - dataMin) % (60 * 60 * 24) === 0) { + if ((dataMax - dataMin) % (60 * 60 * 12) === 0) { return [dataMin, dataMax]; } else { return [dataMin, Math.ceil(dataMax / (24 * 60 * 60)) * 24 * 60 * 60]; diff --git a/index.html b/index.html index 65c9e2d..88c091d 100644 --- a/index.html +++ b/index.html @@ -20,8 +20,8 @@ align-items: center; } button { - padding: 0.5em; - margin: 0.75em; + padding: 0.4em; + margin: 0.65em; font-size: x-large; } @@ -29,6 +29,7 @@