antvis/G2
The issue has been closed
【v5】tooltip position auto 时,鼠标 hover 异常 #5162
Deathsteps posted onGitHub
问题描述
<img width="1222" alt="image" src="https://github.com/antvis/G2/assets/1549118/cbf0d91f-65f3-41fe-a732-36c24d58e3c3">
期望结果
position auto, 鼠标 hover 显示正常
如何重现
官方代码修改
/**
* A recreation of this demo: https://observablehq.com/@d3/bar-chart
*/
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
theme: 'classic',
autoFit: true,
});
chart
.interval()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv',
})
.encode('x', 'letter')
.encode('y', 'frequency')
.axis('y', { labelFormatter: '.0%' });
chart.interaction('tooltip', { position: 'auto' });
chart.render();
额外信息
- G2 5.0.11