antvis/G2

x轴scale里调用formatter,会把时间变成时间戳 #3466

Break-2020 posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

如链接所示,当x轴的值为yyyy-mm-dd,在x轴的scale中传入formatter,不做处理直接把val返回,x轴会被格式化成时间戳

有什么方法是可以不把它变成时间戳的吗,我在回调里需要处理别的类型的x轴,但是也有可能会有时间类型的传入,时间被转成时间戳不是预期想要的结果

Environment Info
g2 4.1.18
System 90.0.4430.93(正式版本) (64 位)
Browser Chrome

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


这个是一个存量的大问题,不是很好修复,在新版本 scale 修复了,但是迁移会导致 break change。

posted by hustcc almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests