apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.53k stars 19.61k forks source link

[Bug] x 轴在动态数据时,没有设置缓动动画过度时间的配置 #18153

Closed banqii closed 1 year ago

banqii commented 1 year ago

Version

5.3.3

Link to Minimal Reproduction

No response

Steps to Reproduce

xAxis: { type: 'time', boundaryGap: ['1%', '1%'], interval: 1000, splitLine: { show: true, lineStyle: { type: 'dashed', opacity: 0.2 } }, axisTick: { show: false }, axisLine: { show: false }, axisLabel: { fontSize: 8 } }, yAxis: { type: 'value', boundaryGap: [0, '100%'], position: 'left', min: yRange?.[0], max: yRange?.[1], splitLine: { show: false }, axisLabel: { fontSize: 8 } }, grid: [{ top: 10, left: 30, right: 10, bottom: 25 }], series: [{ name: item.name, color: item.color, type: 'line', animationDurationUpdate: 1000, animationEasingUpdate: 'linear', sampling: 'lttb', showSymbol: false, smooth: true, clip: true, lineStyle: { width: 1.3 }, encode: { x: 0, y: index + 1, tooltip: [index + 1] } }]

Current Behavior

数据的缓动动画已经设置为与数据填充时间一致,但是没有找到 x 的缓动动画时间,导致X轴动画出现顿感

aaa

Expected Behavior

希望能设置 x 轴的缓动动画过度时间

Environment

- OS:macbook m1
- Browser:chrome
- Framework:next.js

Any additional comments?

No response

echarts-bot[bot] commented 1 year ago

@banqii It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** [Bug] When the x-axis is in dynamic data, there is no configuration for setting the transition time of the easing animation
Ovilia commented 1 year ago

xAxis.animationDurationUpdate should work for this case.

banqii commented 1 year ago

Thanks, it does works, but there is no such configuration in the document. https://echarts.apache.org/zh/option.html#xAxis

And I found this type in the source code types.

Ovilia commented 1 year ago

Thanks! I've updated the doc.