]> ToastFreeware Gitweb - chrisu/seepark.git/blobdiff - web/static/seepark_web.js
js: resize charts on window resize
[chrisu/seepark.git] / web / static / seepark_web.js
index b2e5a326669690404d781a4bf5aa312c08cccea8..e4bd8d640646581708e418b28469bd256e81010c 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
                },