antvis/G2



The issue has been closed
【v5】图例上 hover 一下后,style cursor 就失效了 #5533
Deathsteps posted onGitHub
问题描述
没法截图,手动交互一下,比较明显
.style('cursor', 'pointer')
手形在,hover 图例区后,再 hover 在柱子上,就不出手形了
<img width="610" alt="image" src="https://github.com/antvis/G2/assets/1549118/2f825d4d-3d4f-49ce-af77-f9d97995fe5f">
期望结果
图例不影响 style cursor 效果
如何重现
官方代码修改
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
autoFit: true,
});
chart
.interval()
.data([
{ name: 'MODIFY', value: 138, washaway: 0.21014492753623193 },
{ name: 'PRERELEASE', value: 109, washaway: 0.5596330275229358 },
{ name: 'RELEASING', value: 48, washaway: 0 },
])
.encode('x', 'name')
.encode('y', 'value')
.encode('color', 'name')
.encode('size', 80)
.style('radiusTopLeft', 10)
.style('radiusTopRight', 20)
.style('radiusBottomRight', 30)
.style('radiusBottomLeft', 40)
.style('cursor', 'pointer');
chart.render();
额外信息
- G2 5.1.1 版本