antvis/G2

漏斗图的标注在某些数据情况下位置会错乱 #3543

bingqichen posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

漏斗图的标注在某些数据情况下位置会产生漂移

demo例子中,将 生成订单 订单数字改成 30000,标注就会漂移

Environment Info
g2 4.1.22
System -
Browser -

期望结果:标注依然遵循规则,保持居中

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


我也遇到了这个问题。请问你知道如何解决了吗

posted by mochalhui over 3 years ago

@mochalhui 暂时换echarts了😂

posted by bingqichen over 3 years ago

image

annotation 的位置 position 是根据数据来的,percent 数据直接是居中,直接写死 0.5 就好了。median的意思是中位数,真好 35000 -> 40000 后,中位数变大了,所以文本偏右了。

image

posted by hustcc over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests