antvis/G2

根据XY点 返回 xy轴上的值 #3449

ValueLan posted onGitHub

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

What problem does this feature solve?

K线的时候 可以画出当前鼠标的值

What does the proposed API look like?

根据XY点 返回 xy轴上的值

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


  • 首先监听 mousemove 事件,获取鼠标的 x y 位置
  • 然后 x y 位置可以通过 coordinate 转化成归一化的坐标(0 ~ 1 范围)
  • 然后归一化的 x y 分别用 scaleX、scaleY 做 invert 操作,就可以拿到 x y 实际的值了
posted by hustcc over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests