antvis/G2

The issue has been closed
[v5] Tooltip 与 Slider一起使用会造成Tooltip失效 #4959
wuchuanxun posted onGitHub
示例地址: https://g2.antv.antgroup.com/examples/interaction/interaction/#tooltip-render
修改代码,增加x轴slider 配置
chart
.interval()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv',
})
.transform([{ type: 'sortX', by: 'y', reverse: true, slice: 5 }])
.encode('x', 'letter')
.encode('y', 'frequency')
.slider({
x: {},
});
初始情况下tooltip是正常的,但是只需要更改slider范围后,tooltip就保持最后的提示不变了。
修复思路,可能slider变化之后需要移除tooltip交互重新添加tooltip