diff --git a/package-lock.json b/package-lock.json index 52d3e1bd8..060932a20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "codemirror": "^6.0.1", "core-js": "^3.16.0", "detect-browser": "^5.3.0", - "echarts": "^5.2.2", + "echarts": "^5.5.0", "echarts-gl": "^2.0.8", "hls.js": "^1.3.3", "jmuxer": "^2.0.5", @@ -5396,12 +5396,12 @@ } }, "node_modules/echarts": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.3.tgz", - "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz", + "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", "dependencies": { "tslib": "2.3.0", - "zrender": "5.4.4" + "zrender": "5.5.0" } }, "node_modules/echarts-gl": { @@ -10838,9 +10838,9 @@ } }, "node_modules/zrender": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.4.tgz", - "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.5.0.tgz", + "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", "dependencies": { "tslib": "2.3.0" } diff --git a/package.json b/package.json index 602ea0568..f6ab5fa6d 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "codemirror": "^6.0.1", "core-js": "^3.16.0", "detect-browser": "^5.3.0", - "echarts": "^5.2.2", + "echarts": "^5.5.0", "echarts-gl": "^2.0.8", "hls.js": "^1.3.3", "jmuxer": "^2.0.5", diff --git a/src/components/charts/TempChart.vue b/src/components/charts/TempChart.vue index 80fa415aa..2fe69636a 100644 --- a/src/components/charts/TempChart.vue +++ b/src/components/charts/TempChart.vue @@ -347,15 +347,8 @@ export default class TempChart extends Mixins(BaseMixin, ThemeMixin) { } @Watch('selectedLegends') - selectedLegendsChanged(newVal: any, oldVal: any) { - if (this.chart?.isDisposed() !== true) { - Object.keys(newVal).forEach((key) => { - if (newVal[key] !== oldVal[key]) { - const actionType = newVal[key] ? 'legendSelect' : 'legendUnSelect' - this.chart?.dispatchAction({ type: actionType, name: key }) - } - }) - } + selectedLegendsChanged(newVal: any) { + if (this.chart?.isDisposed() !== true) this.chart?.setOption({ legend: { selected: newVal } }) } @Watch('source') diff --git a/src/store/printer/tempHistory/getters.ts b/src/store/printer/tempHistory/getters.ts index d9b591efd..ab74bbbe5 100644 --- a/src/store/printer/tempHistory/getters.ts +++ b/src/store/printer/tempHistory/getters.ts @@ -99,11 +99,12 @@ export const getters: GetterTree = { const selected: legends = {} const available_sensors = rootState.printer?.heaters?.available_sensors ?? [] + const available_monitors = rootState.printer?.heaters?.available_monitors ?? [] const viewSettings = rootState.gui?.view?.tempchart?.datasetSettings ?? {} Object.keys(viewSettings).forEach((key) => { // break if this element doesn't exist in available_sensors - if (!available_sensors.includes(key)) return + if (!available_sensors.includes(key) && !available_monitors.includes(key)) return Object.keys(viewSettings[key]).forEach((attrKey) => { // break if this element isn't a valid datasetType