ecomfe / vue-echarts

Vue.js component for Apache ECharts™.
https://vue-echarts.dev
MIT License
9.43k stars 1.48k forks source link

useAutoresize throttle switch to requestAnimationFrame method #768

Closed xstxhjh closed 1 month ago

xstxhjh commented 4 months ago

提前确认

新功能详情

changing the component size like this will be smoother.

Justineo commented 4 months ago

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

xstxhjh commented 4 months ago

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.

Justineo commented 1 month ago

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.