NEZ-3201 fix:Share tooltip 右侧 chart tooltip 遮挡

This commit is contained in:
zyh
2023-10-23 15:16:07 +08:00
parent b0fc23ef1e
commit 7f1b75d182
2 changed files with 7 additions and 2 deletions

View File

@@ -134,6 +134,9 @@ export default {
// 监听当前鼠标所在的图表id变化
'$store.state.panel.currentMousemove': {
handler (n) {
if (this.isConnect !== 'crosshair') {
return
}
// 判断是否是当前鼠标所在的图表
if (n === this.chartId) {
let option = {}
@@ -250,9 +253,8 @@ export default {
// timeSeries类型图表设置group 用于多表联动
if (this.isInit && !this.isFullscreen) {
myChart.group = 'timeSeriesGroup'
if (this.isConnect === 'crosshair') {
if (this.isConnect !== 'none') {
myChart.getZr().on('mousemove', params => {
// crosshair 模式才会执行
if (this.$store.state.panel.currentMousemove !== this.chartId) {
this.$store.commit('setCurrentMousemove', this.chartId)
}

View File

@@ -337,6 +337,9 @@ export default {
}
},
tooltipPosition (point, params, dom, rect, size) {
if (this.isConnect === 'tooltip' && this.$store.state.panel.currentMousemove != this.chartId) {
return
}
dom.style.transform = 'translateZ(999999)'
const windowWidth = window.innerWidth// 窗口宽度
const windowHeight = window.innerHeight// 窗口高度