apache / apache/echarts

[Feature] lines 动画需要在设置 setOption 之后依然执行之前未完成的动画。执行到一半 setOption 后动画戛然而止,有点儿突兀

Open
#21,248 2 comments 0 reactions 0 assignees View on GitHub
new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

场景:一个网站受攻击的地图飞线效果,新的攻击数据来后,添加飞线,setOption 后,之前未执行完的动画直接被重置了
![threatMap](https://youke1.picui.cn/s1/2025/09/06/68bc4a2d3edd3.png)

### What does the proposed API look like?

```
series: [
{
id: 2,
type: 'lines',
coordinateSystem: 'geo',
silent: true,
effect: {
show: true,
trailWidth: 2,
trailOpacity: 0.5,
trailLength: 0.02,
period: 3,
symbol: 'arrow',
symbolSize: 6,
loop: false,
},
blendMode: 'source-over',
lineStyle: {
width: 2,
color: function (params: { value?: [number[], number[], string] }) {
return params.value?.[2] || 'rgb(255,183,45)'
},
curveness: 0.5,
},
zlevel: 1,
animation: true,
animationDuration: 3000,
/** 添加配置项,实现增量数据动画,原有数据动画继续执行 */
animationIncrementalUpdate: true,
data: [],
},
]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.