G2
G2 copied to clipboard
[Bug]: 图例过滤,有时候会出现刻度值标题的丢失
Describe the bug / 问题描述
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
autoFit: true,
});
chart
.point()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/bmw-prod/bd73a175-4417-4749-8b88-bc04d955e899.csv',
})
.encode('x', 'x')
.encode('y', 'y')
.encode('shape', 'category')
.encode('color', 'category')
.encode('size', 5)
.scale('shape', { range: ['point', 'plus', 'diamond'] });
chart.render();
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
点击图例过滤,有时候会出现刻度值标题的丢失
Version / 版本
🆕 5.x
OS / 操作系统
- [ ] macOS
- [x] Windows
- [ ] Linux
- [ ] Others / 其他
Browser / 浏览器
- [x] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他
看起来像是因为 legendFilter 触发了数据筛选,导致domain变化,刻度值变化后部分刻度值被隐藏了,但刻度未消失,确实是一个BUG
试试最新版本。