antvis/G2

dataMarker 和 slider一起使用的时候,当标记点不属于当前缩略轴显示的范围之中时,图表左上角会出现一个小点标记 #3723

qiaoyuwen posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

Edit on CodeSandbox

Steps to reproduce

  1. 拖动滑块范围,使标记点移出当前显示范围;
  2. 这时候在图表左上角会出现一个小点

7DCD00FF-401F-4E1E-A11A-18C326CB600E

6E3B3CC9-C3D7-4C27-ADCC-D6B989CDFBED

Environment Info
g2 4.1.34
System -
Browser Microsoft Edge 版本 94.0.992.31 (官方内部版本) (x86_64)

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


调试了一下,问题是 https://github.com/antvis/G2/blob/master/src/chart/controller/annotation.ts#L379 该行计算标记点的坐标时,因为超出了当前视图,计算出来的坐标是NaN,所以渲染到了(0, 0)点坐标。看看能不能提个pr

posted by qiaoyuwen over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests