diff client/src/components/gauge/HydrologicalConditions.vue @ 3068:492c30ca3142

client: diagrams: added watchers to ensure diagram update when data changes
author Markus Kottlaender <markus@intevation.de>
date Wed, 17 Apr 2019 09:46:03 +0200
parents 0ffa9d418959
children f269bd001e78
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue	Wed Apr 17 09:30:00 2019 +0200
+++ b/client/src/components/gauge/HydrologicalConditions.vue	Wed Apr 17 09:46:03 2019 +0200
@@ -166,6 +166,14 @@
     ]),
     ...mapGetters("gauges", ["selectedGauge"])
   },
+  watch: {
+    longtermWaterlevels() {
+      this.drawDiagram();
+    },
+    yearWaterlevels() {
+      this.drawDiagram();
+    }
+  },
   methods: {
     downloadPDF() {
       var svg = this.svg._groups[0][0].outerHTML;