antvis/G2

chart.line.connectNulls 支持将 null/undefined 转换为 0 #3789

xiaoshuangLi posted onGitHub

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

What problem does this feature solve?

实际监控数据中存在数据丢失残缺的情况,这种时候用户可以选择将此条数据当作0来展示

What does the proposed API look like?

nullPointMode: 'zero' | 'null' | 'connected' 

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


相比 null 数据是否跳过连接还是断开,Null 转化为 0 这个逻辑,其实挺业务属性的,建议做法是在可视化之前自己进行一波数据业务逻辑的处理。

这里理解的 0 其实是一个相对值,比如价格 = 0 理解为免费,但是对于体温温度,可能期望 null = 36.8 度;cpu 空闲率,可能期望 null = 100%。

posted by hustcc about 3 years ago

Fund this Issue

$0.00
Funded

Pull requests