X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/ebe2bb2492812aea5d73facd2a87cfb66e04ee3d..b34bde11dcf0b2f922010a5cc01756c4a7805443:/web/static/seepark_web.js?ds=inline diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index e663296..9b24b60 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -49,6 +49,9 @@ function dayschart(element, title, days, xtickformat) { text: title }, data: chartdata, + point: { + r: 1.5 // default 2.5 + }, axis: { x: { type: 'timeseries', @@ -88,10 +91,17 @@ function dayschart(element, title, days, xtickformat) { }, tooltip: { format: { + // TODO: maybe move to top name: function (name, ratio, id, index) { - var re = /\d m/; - var res = re.exec(name); - return res; + var prefix = ''; + if (element.substr(0, 7) == 'chart_w') { + var re = /\d m/; + prefix = 'Wasser '; + } else { + var re = /Luft/; + }; + var result = re.exec(name); + return prefix + result; }, value: function (value, ratio, id, index) { return value.toFixed(2) + '°'; @@ -138,9 +148,9 @@ function beginend(days) { dayschart('chart_water_1', 'Der See (Tag)', 1, '%H:%M'); dayschart('chart_water_7', 'Der See (Woche)', 7, '%a %d'); dayschart('chart_water_31', 'Der See (Monat)', 31, 'Woche %V'); -dayschart('chart_water_365', 'Der See (Jahr)', 365, '%b %d'); +dayschart('chart_water_365', 'Der See (Jahr)', 365, '%b %Y'); dayschart('chart_air_1', 'Die Luft (Tag)', 1, '%H:%M'); dayschart('chart_air_7', 'Die Luft (Woche)', 7, '%a %d'); dayschart('chart_air_31', 'Die Luft (Monat)', 31, 'Woche %V'); -dayschart('chart_air_365', 'Die Luft (Jahr)', 365, '%b %d'); +dayschart('chart_air_365', 'Die Luft (Jahr)', 365, '%b %Y');