antvis/G2





Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: g2最新版本折线图,x轴横坐标只有两个并且数据缺失时,tooltip展示的图例颜色顺序错乱 #6710
ustcfury posted onGitHub
Describe the bug / 问题描述
以下是data,删除注释的一条数据后,tooltip展示的图例颜色不对,并且只有在x轴只有两个值时才会发生(例如eg中x轴横坐标为 '10:10','10:20',假如有更多个时不会有这种问题)
const data = [ { time: '10:10', call: 10, value: 2,name:"people" }, { time: '10:20', call: 10, value: 7,name:"people" }, // { time: '10:10', call: 10, value: 3,name:"mock" }, { time: '10:20', call: 10, value: 5,name:"mock" }, { time: '10:10', call: 10, value: 10,name:"call" }, { time: '10:20', call: 10, value: 10,name:"call" }, ];
Reproduction link / 复现链接
https://codesandbox.io/p/sandbox/wh6y9r
Steps to Reproduce the Bug or Issue / 重现步骤
复现链接即可重现
Version / 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他