X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/f8c6575a6f0f97100827d51ffa7d24f7fadb0f84..72faf7d55093a0ec1af6a840150e422686b6f40b:/web/static/seepark_web.js diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index fca458b..6d8e1f1 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -155,6 +155,20 @@ function dayschart(element, title, days, xtickformat) { {axis: 'y', start: 100, end: 999, class: 'region-boiling'} ] }); + + // 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) {