From 4be40b6457a414737e23ff3a2eb0a1798e68680c Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 29 May 2022 11:58:12 +0200 Subject: [PATCH] fix: echarts getters in heightmap, tempchart & history statistics (#859) --- src/components/charts/HistoryAllPrintStatus.vue | 2 +- src/components/charts/HistoryFilamentUsage.vue | 2 +- src/components/charts/HistoryPrinttimeAvg.vue | 2 +- src/components/charts/TempChart.vue | 4 +--- src/pages/Heightmap.vue | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/charts/HistoryAllPrintStatus.vue b/src/components/charts/HistoryAllPrintStatus.vue index 30afc6a00..0d90803e3 100644 --- a/src/components/charts/HistoryAllPrintStatus.vue +++ b/src/components/charts/HistoryAllPrintStatus.vue @@ -80,7 +80,7 @@ export default class HistoryAllPrintStatus extends Mixins(BaseMixin) { } get chart(): ECharts | null { - return this.$refs.historyAllPrintStatus ?? null + return this.$refs.historyAllPrintStatus?.chart ?? null } mounted() { diff --git a/src/components/charts/HistoryFilamentUsage.vue b/src/components/charts/HistoryFilamentUsage.vue index 46f2023a1..fdc8b70ae 100644 --- a/src/components/charts/HistoryFilamentUsage.vue +++ b/src/components/charts/HistoryFilamentUsage.vue @@ -110,7 +110,7 @@ export default class HistoryPrinttimeAvg extends Mixins(BaseMixin) { } get chart(): ECharts | null { - return this.$refs.historyFilamentUsage ?? null + return this.$refs.historyFilamentUsage?.chart ?? null } mounted() { diff --git a/src/components/charts/HistoryPrinttimeAvg.vue b/src/components/charts/HistoryPrinttimeAvg.vue index 591cdf2fc..a13ae5f11 100644 --- a/src/components/charts/HistoryPrinttimeAvg.vue +++ b/src/components/charts/HistoryPrinttimeAvg.vue @@ -95,7 +95,7 @@ export default class HistoryPrinttimeAvg extends Mixins(BaseMixin) { } get chart(): ECharts | null { - return this.$refs.historyPrinttimeAvg ?? null + return this.$refs.historyPrinttimeAvg?.chart ?? null } mounted() { diff --git a/src/components/charts/TempChart.vue b/src/components/charts/TempChart.vue index 4edd127ef..5d2942353 100644 --- a/src/components/charts/TempChart.vue +++ b/src/components/charts/TempChart.vue @@ -27,8 +27,6 @@ interface echartsTooltipObj { components: {}, }) export default class TempChart extends Mixins(BaseMixin) { - convertName = convertName - declare $refs: { tempchart: any } @@ -196,7 +194,7 @@ export default class TempChart extends Mixins(BaseMixin) { } get chart(): ECharts | null { - return this.$refs.tempchart ?? null + return this.$refs.tempchart?.chart ?? null } get maxHistory() { diff --git a/src/pages/Heightmap.vue b/src/pages/Heightmap.vue index 3f3c7b7e6..3943d942b 100644 --- a/src/pages/Heightmap.vue +++ b/src/pages/Heightmap.vue @@ -649,7 +649,7 @@ export default class PageHeightmap extends Mixins(BaseMixin, ControlMixin) { } get chart(): ECharts | null { - return this.$refs.heightmap ?? null + return this.$refs.heightmap?.chart ?? null } get profiles() {