js: resize charts on window resize
authorgregor herrmann <gregor@toastfreeware.priv.at>
Mon, 3 Sep 2018 15:03:51 +0000 (17:03 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Mon, 3 Sep 2018 15:03:51 +0000 (17:03 +0200)
web/static/seepark_web.js

index b2e5a32..e4bd8d6 100644 (file)
@@ -60,6 +60,12 @@ function dayschart(element, title, days, xtickformat) {
                size: {
                        width: document.getElementById(element).parentElement.clientWidth * 80 / 100
                },
+               onresized: function () {
+                       chart.resize({
+                               width: document.getElementById(element).parentElement.clientWidth * 80 / 100
+                       });
+                       // chart.flush();
+               },
                transition: {
                        duration: null
                },