antvis/G2




The issue has been closed
【V5】当存在分面且Y轴为多变量时,存在无法交互tooltip的问题 #6047
Xiatian-leo posted onGitHub
问题描述
如题,V5中分面+多变量时存在tooltip方面的问题;
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
autoFit: true,
});
chart
.options({
"autoFit": true,
"margin": 80,
"type": "facetRect",
"encode": {
"y": "group"
},
"interaction": {
"tooltip": true
},
"data": [
{
"x": "Low",
"y1": 5.1,
"y2": 81,
"group": "A",
},
{
"x": "High",
"y1": 6.3,
"y2": 86,
"group": "B",
},
],
"children": [
{
"encode": {
"x": "x",
"y": "y1",
"shape": "point",
"size": 10,
"color": "x"
},
"type": "point"
},
{
"encode": {
"x": "x",
"y": "y2",
"shape": "square",
"size": 10,
"color": "x"
},
"type": "point"
}
]
})
chart.render();
具体截图如下:
重现链接
No response
重现步骤
代码如上
预期行为
期望tooltip能正常交互
平台
- 网页浏览器: [Google Chrome, Safari, Firefox]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response