X-Git-Url: http://www.average.org/gitweb/?p=pulsecounter.git;a=blobdiff_plain;f=web%2Findex.html;h=f63467190945b58bd4d7aae8eb7c81639a1603ce;hp=fcad1c30a6f30cef8b52aa58cea457e4e117cb92;hb=9dcf18f64ca3a0df27551f392d2ad0263479af52;hpb=f38bcf760eab6faa9f69a6989bdffd83ec1791d8 diff --git a/web/index.html b/web/index.html index fcad1c3..f634671 100644 --- a/web/index.html +++ b/web/index.html @@ -10,7 +10,7 @@ var ww, wh; var hmax, hfact; var tmin, tmax, tfact; - var xzero = 20, yzero = 20; + var xzero = 36, yzero = 24; var cold_d = [], hot_d = []; function showdate(utime) { @@ -25,16 +25,16 @@ var scl = Math.floor(d / ord); var inc, inc2, first, x, lb; - if (scl < 2) { inc = 0.1; inc2 = 0.5; } - else if (scl < 5) { inc = 0.2; inc2 = 1; } - else { inc = 0.5; inc2 = 2; } + if (scl < 2) { inc = 0.1; inc2 = 0.2; } + else if (scl < 5) { inc = 0.1; inc2 = 0.2; } + else { inc = 0.5; inc2 = 1; } inc *= ord; inc2 *= ord; first = (Math.floor(lo / inc) + 1) * inc; - for (x = 0; x < (d / inc) - 1.5; x++) + for (x = 0; x < (d / inc) - 1.2; x++) comb.push(first + inc * x); first = (Math.floor(lo / inc2) + 1) * inc2; - for (x = 0; x < (d / inc2) - 1.5; x++) + for (x = 0; x < (d / inc2) - 1.2; x++) lb.push(first + inc2 * x); //dbg.innerHTML = "ord=" + ord + "
inc=" + inc + "
" // + comb + "
" + lb; @@ -57,11 +57,11 @@ ctx.stroke(); ctx.fillStyle = "black"; - ctx.font = "bold 8px Courier"; + ctx.font = "bold 12px Courier"; ctx.textAlign = "left"; - ctx.fillText(showdate(tmin), px(tmin), py(0) + 16); + ctx.fillText(showdate(tmin), px(tmin), py(0) + 20); ctx.textAlign = "right"; - ctx.fillText(showdate(tmax), px(tmax), py(0) + 16); + ctx.fillText(showdate(tmax), px(tmax), py(0) + 20); } function yaxis() { @@ -83,14 +83,14 @@ ctx.stroke(); ctx.fillStyle = "black"; - ctx.font = "bold 8px Courier"; + ctx.font = "bold 12px Courier"; ctx.textAlign = "right"; - ctx.fillText(0, px(tmin) - 2, py(0)); + ctx.fillText(0, px(tmin) - 6, py(0)); for (i = 0; comb[1][i]; i++) { - ctx.fillText(comb[1][i], px(tmin) - 2, py(comb[1][i])); + ctx.fillText(comb[1][i].toFixed(1), px(tmin) - 6, py(comb[1][i])); } ctx.textAlign = "left"; - ctx.fillText("l/h", px(tmin) + 2, py(hmax) + 8); + ctx.fillText("l/h", px(tmin) + 4, py(hmax) + 8); } /* @ updates global var `hmax` */ @@ -328,7 +328,7 @@ canvas#plot { display: block; width: 640px; height: 320px; - /*border: solid 1px black;*/ + /* border: solid 1px black; */ } div#queries { margin-left: auto; @@ -365,7 +365,7 @@ body {
-
PREV WEEK
+
PREVIOUS WEEK
DAY BEFORE YESTERDAY
YESTERDAY