Skip to content

Commit

Permalink
fix: echarts getters in heightmap, tempchart & history statistics (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored May 29, 2022
1 parent e0fd25c commit 4be40b6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/charts/HistoryAllPrintStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/HistoryFilamentUsage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/HistoryPrinttimeAvg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 1 addition & 3 deletions src/components/charts/TempChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ interface echartsTooltipObj {
components: {},
})
export default class TempChart extends Mixins(BaseMixin) {
convertName = convertName
declare $refs: {
tempchart: any
}
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Heightmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 4be40b6

Please sign in to comment.