X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/1cbe9b42e992ed53c21afc0a5e03167cc0df8f00..95644459a62e2d9bc8219e714f24ce1307727a38:/web/static/seepark_web.js diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 721c586..583a14a 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -155,8 +155,18 @@ function dayschart(element, title, days, xtickformat) { {axis: 'y', start: 100, end: 999, class: 'region-boiling'} ] }); - // woraround for unrendered dots - setTimeout(function () { chart.flush(); }, 5000); + + // 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) {