X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/f8c6575a6f0f97100827d51ffa7d24f7fadb0f84..866247a8ef351c97bf845799ef78f7eea25f9793:/web/static/seepark_web.js diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index fca458b..583a14a 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -155,6 +155,18 @@ function dayschart(element, title, days, xtickformat) { {axis: 'y', start: 100, end: 999, class: 'region-boiling'} ] }); + + // reload data + setInterval( + function() { + chart.load({ + url: api_base_url_sensors + beginend(days), + mimeType: 'json' + }); + chart.flush(); + }, + 5 * 60 * 1000 + ); }; function loaddays(chart, element, days) {