X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/8422e1bb7ea6ab2bda185ef9d9b77cd41e7eb3d1..25c75a25c0932cc9a244ffe959a0baf6de8135aa:/web/static/seepark_web.js diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 40fd919..5cdeca5 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -162,6 +162,9 @@ function dayschart(element, title, days, xtickformat) { ] }); + // workaround for unrendered dots + setTimeout(function () { chart.flush(); }, 5000); + // reload data in charts setInterval( function() { @@ -176,14 +179,17 @@ function loaddays(chart, element, days) { if (element.substr(0, 7) == 'chart_w') { chart.load({ url: api_base_url_sensors + beginend(days), - mimeType: 'json' + mimeType: 'json', + unload: true }); } else { chart.load({ url: api_base_url_weather + beginend(days), - mimeType: 'json' + mimeType: 'json', + unload: true }); - } + }; + chart.flush(); } function beginend(days) {