X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/1cbe9b42e992ed53c21afc0a5e03167cc0df8f00..72faf7d55093a0ec1af6a840150e422686b6f40b:/web/static/seepark_web.js?ds=sidebyside diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 721c586..6d8e1f1 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -155,8 +155,20 @@ function dayschart(element, title, days, xtickformat) { {axis: 'y', start: 100, end: 999, class: 'region-boiling'} ] }); - // woraround for unrendered dots + + // workaround for unrendered dots setTimeout(function () { chart.flush(); }, 5000); + + // reload data + setInterval( + function() { + chart.load({ + url: api_base_url_sensors + beginend(days), + mimeType: 'json' + }) + }, + 5 * 60 * 1000 + ); }; function loaddays(chart, element, days) {