Aweiisdead opened a new issue, #20499:
URL: https://github.com/apache/echarts/issues/20499
### Version
5.5.0
### Link to Minimal Reproduction
none
### Steps to Reproduce
import * as echarts from 'echarts';
import { setTooltipDom } from './index';
export const drawLine = (
dom: HTMLElement,
lineData: {
[key: number]: number | string;
}
) => {
let data = [];
Object.keys(lineData).forEach((name) => {
data.push({
name,
value: lineData[name],
});
});
dom.style.height = data.length * 210 + 'px';
const chart = echarts.init(dom);
let xArr = [];
let yArr = [];
let gridArr = [];
let seriesArr = [];
data.forEach((item, index) => {
xArr.push({
type: 'category',
gridIndex: index,
axisTick: false,
axisLabel: {
color: '#C5D8FF',
},
axisLine: {
lineStyle: {
color: 'rgba(197, 216, 255, 1)',
},
},
data: Object.keys(item.value),
});
yArr.push({
type: 'value',
gridIndex: index,
axisLabel: {
color: 'rgba(197, 216, 255, 1)',
},
splitLine: {
lineStyle: {
type: 'dashed',
color: '#E6F7FF33',
},
},
});
gridArr.push({
id: index,
height: 150,
top: 200 * index + 50,
});
seriesArr.push({
type: 'line',
name: item.name,
data: Object.values(item.value),
xAxisIndex: index,
yAxisIndex: index,
backgroundColor: 'rgb(25, 50, 92)',
});
});
let option = {
xAxis: xArr,
yAxis: yArr,
grid: gridArr,
series: seriesArr,
legend: {
show: true,
textStyle: {
color: 'rgba(197, 216, 255, 1)',
},
left: 30,
top: 10,
itemStyle: {},
},
tooltip: {
confine: false,
appendToBody: true,
trigger: 'axis',
axisPointer: {
type: 'line',
axis: 'x',
},
renderMode: 'html',
className: 'geometryTooltip',
padding: 0,
borderWidth: 0,
formatter: (val) => {
return setTooltipDom(val);
},
},
axisPointer: {
link: [
{
xAxisIndex: 'all',
},
],
},
};
chart.setOption(option);
};

### Current Behavior
tooltip没有消失
### Expected Behavior
希望切换页面后tooltip消失
### Environment
```markdown
- OS:windows11
- Browser: 130.0.6723.117
- Framework:[email protected]
```
### Any additional comments?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]