G2 icon indicating copy to clipboard operation
G2 copied to clipboard

[Bug]: 图例过滤,有时候会出现刻度值标题的丢失

Open 105197 opened this issue 7 months ago • 1 comments

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 / 重现步骤

点击图例过滤,有时候会出现刻度值标题的丢失

Image

Version / 版本

🆕 5.x

OS / 操作系统

  • [ ] macOS
  • [x] Windows
  • [ ] Linux
  • [ ] Others / 其他

Browser / 浏览器

  • [x] Chrome
  • [ ] Edge
  • [ ] Firefox
  • [ ] Safari (Limited support / 有限支持)
  • [ ] IE (Nonsupport / 不支持)
  • [ ] Others / 其他

105197 avatar May 29 '25 03:05 105197

看起来像是因为 legendFilter 触发了数据筛选,导致domain变化,刻度值变化后部分刻度值被隐藏了,但刻度未消失,确实是一个BUG

interstellarmt avatar May 29 '25 07:05 interstellarmt

试试最新版本。

lxfu1 avatar Sep 16 '25 03:09 lxfu1