vue-echarts icon indicating copy to clipboard operation
vue-echarts copied to clipboard

useAutoresize throttle switch to requestAnimationFrame method

Open xstxhjh opened this issue 11 months ago • 2 comments

提前确认

  • [X] 我可以确认这个新功能建议是提交给此 Vue 组件的,而不应该提交到 ECharts 项目本身。

新功能详情

changing the component size like this will be smoother.

xstxhjh avatar Feb 29 '24 09:02 xstxhjh

This required the re-render of all charts on a same page within ~16ms. Do you have an actual use case?

Justineo avatar Mar 01 '24 05:03 Justineo

This required the re-render of all charts on a same page within ~16ms. Do you have an actual use case?

My chart component will have some animation effects, gradually becoming higher or wider, which will appear a bit jerky at that time.

xstxhjh avatar Mar 03 '24 11:03 xstxhjh

As ResizeObserver only triggers once in an animation frame, I think setting :autoresize="{ throttle: 0 }" will make the resizing smooth enough if the time for resizing all charts all fits in one frame.

Justineo avatar May 09 '24 04:05 Justineo