You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
在 V4 中,
annotation
除了可以根据内置的max
,min
等来做位置定位,也可以通过百分比来定位,内部实际是会通过coordinate
处理坐标转换逻辑。但在 V5 中,目前 transform 里面的
select
相关的没有找到可以通过百分比来定位的逻辑,所以,V4 的annotation
想迁移至 V5 的话,从目前的了解来看 V5 还不能全部支持。所以考虑通过register
来自定义annotation
实现。但由于通过
chart.getContext()
只有在AFTER_PAINT
以后才能拿到views
相关的配置,再从views
里面拿到坐标系的实例,所以如果想自己做坐标转换的逻辑,就只能在绘制结束后,但绘制结束后,不知道该怎么再去绘制额外的画布元素了。总结上面的提两个问题:
mark
现成的 API,是否能实现 V4 annotation 自定义位置的逻辑,包括百分比、下标、内置值(min
,max
等)AFTER_PAINT
即以后得生命周期,怎么实现绘制额外的画布元素呢Beta Was this translation helpful? Give feedback.
All reactions