NEZ-3263 fix:Chart tooltip 未按照配置样式显示

This commit is contained in:
zyh
2023-10-25 16:50:05 +08:00
parent 126a078205
commit 9800496e9b

View File

@@ -684,7 +684,7 @@ export default {
}, },
chartClick (params) { chartClick (params) {
// 先取消多表联动 防止其它图表setOption // 先取消多表联动 防止其它图表setOption
if (this.isConnect !== 'none') { if (this.isConnect && this.isConnect !== 'none') {
echarts.disconnect('timeSeriesGroup') echarts.disconnect('timeSeriesGroup')
} }
getChart(this.chartId).dispatchAction({ getChart(this.chartId).dispatchAction({
@@ -740,7 +740,7 @@ export default {
this.toolbox.clickIndex = params.seriesIndex this.toolbox.clickIndex = params.seriesIndex
const e = params.event.event const e = params.event.event
this.toolboxPosition(e) this.toolboxPosition(e)
if (this.isConnect !== 'none') { if (this.isConnect && this.isConnect !== 'none') {
echarts.connect('timeSeriesGroup') echarts.connect('timeSeriesGroup')
} }
}, },
@@ -748,7 +748,7 @@ export default {
this.toolbox.show = false this.toolbox.show = false
}, },
showSelectedSeries () { showSelectedSeries () {
if (this.isConnect !== 'none') { if (this.isConnect && this.isConnect !== 'none') {
echarts.disconnect('timeSeriesGroup') echarts.disconnect('timeSeriesGroup')
} }
@@ -768,13 +768,13 @@ export default {
this.isGrey = this.isGrey.map((g, i) => i !== this.toolbox.clickIndex) this.isGrey = this.isGrey.map((g, i) => i !== this.toolbox.clickIndex)
this.$refs.legend.isGrey = this.isGrey this.$refs.legend.isGrey = this.isGrey
if (this.isConnect !== 'none') { if (this.isConnect && this.isConnect !== 'none') {
echarts.disconnect('timeSeriesGroup') echarts.connect('timeSeriesGroup')
} }
this.clickout() this.clickout()
}, },
showAllSeries () { showAllSeries () {
if (this.isConnect !== 'none') { if (this.isConnect && this.isConnect !== 'none') {
echarts.disconnect('timeSeriesGroup') echarts.disconnect('timeSeriesGroup')
} }
getChart(this.chartId).dispatchAction({ getChart(this.chartId).dispatchAction({
@@ -782,8 +782,8 @@ export default {
}) })
this.isGrey = this.isGrey.map(() => false) this.isGrey = this.isGrey.map(() => false)
this.$refs.legend.isGrey = this.isGrey this.$refs.legend.isGrey = this.isGrey
if (this.isConnect !== 'none') { if (this.isConnect && this.isConnect !== 'none') {
echarts.disconnect('timeSeriesGroup') echarts.connect('timeSeriesGroup')
} }
this.clickout() this.clickout()
} }