]> ToastFreeware Gitweb - chrisu/seepark.git/blobdiff - web/static/seepark_web.js
remove flush after creation, add flush after reload
[chrisu/seepark.git] / web / static / seepark_web.js
index 6d8e1f1a19345fe06c2ba63b20e73f064e60e1dd..583a14a7d4f619d4ea4742a4d28503c0da220bce 100644 (file)
@@ -156,16 +156,14 @@ function dayschart(element, title, days, xtickformat) {
                ]
        });
 
-       // workaround for unrendered dots
-       setTimeout(function () { chart.flush(); }, 5000);
-
        // reload data
        setInterval(
                function() {
                        chart.load({
                                url: api_base_url_sensors + beginend(days),
                                mimeType: 'json'
-                       })
+                       });
+                       chart.flush();
                },
                5 * 60 * 1000
        );