X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/5ca15353c392ff167e7b8516005428ffb5077efc..8f767296cf0be759c6cccaaf7da9fde3e1fd1f85:/web/static/seepark_web.js diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 88854ca..7e727a1 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -67,7 +67,6 @@ function dayschart(element, title, days, xtickformat) { chart.resize({ width: getwidth(element) }); - // chart.flush(); }, transition: { duration: null @@ -149,6 +148,9 @@ function dayschart(element, title, days, xtickformat) { grid: { y: { show: true + }, + x: { + show: true } }, regions: [ @@ -159,6 +161,9 @@ function dayschart(element, title, days, xtickformat) { ] }); + // workaround for unrendered dots + setTimeout(function () { chart.flush(); }, 5000); + // reload data in charts setInterval( function() { @@ -173,14 +178,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 }); - } + }; + setTimeout(function () { chart.flush(); }, 5000); } function beginend(days) {