]> ToastFreeware Gitweb - chrisu/seepark.git/blobdiff - web/static/seepark_web.js
typo in comment
[chrisu/seepark.git] / web / static / seepark_web.js
index 721c586c2f9cb8fb2d8387484760c9e32018ce3e..6d8e1f1a19345fe06c2ba63b20e73f064e60e1dd 100644 (file)
@@ -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) {