antvis/G2

G2 4.x 雷达图点过于密集时,tooltip显示错误,显示数据夹杂了其他维度的数据 #6235

mayiliang posted onGitHub

问题描述

雷达图点过于密集时,tooltip显示错误,显示数据夹杂了其他维度的数据

G2版本:4.2.8

重现链接

https://codesandbox.io/p/sandbox/lucid-dewdney-wf6zqx?file=%2Fpackage.json%3A7%2C27

重现步骤

  1. 进入页面
  2. 将鼠标移动到密集的点位之间

预期行为

Development这一维度应该只显示

a: 60
b: 70

但是实际显示结果多了Design维度的数据b: 30

a: 60
b: 70
b: 30

平台

  • 操作系统: Windows 10
  • 网页浏览器: Google Chrome 125.0.6422.60

屏幕截图或视频(可选)

1716260317143

补充说明(可选)

No response


这个问题没有办法避免,因为拾取到了多个 point,建议计算更合理的区间:

// 更合理的区间
chart.scale("score", {
  min: 0,
  max: 800,
});
posted by pearmini 11 months ago

Fund this Issue

$0.00
Funded

Pull requests