Closed djgenius closed 8 years ago
您好,问题如下:在lines类型中设置相关参数后,主要利用effect效果,并通过配置animationDelay以期望实现数据的延时显示。但实际中,动效几乎是同时显示,并没有出现延时效果(测试了下,似乎只对线型有效,对于effect来说是无效的),不知是否是不支持effect 的延时效果? 希望能够得到您的解答,谢谢!
1.设置lines相关参数:effect 和 animation为主,并设定好data数据 2.setoption后,观察动效
动效出现延时效果。
是否支持effcet效果的延时?
option = { geo: { show: true, map: 'world', roam: false, left: '0%', top: '0%', right: '0%', bottom: '0%', label: { emphasis: { show: false } }, itemStyle: { normal: { areaColor: '#09294d', borderColor: '#007ab3', borderWidth: 2 }, emphasis: { areaColor: '#2a333d' } } }, series: [ { type: 'lines', name: 'trailEffect', coordinateSystem: 'geo', zlevel: 1, effect: { show: true, period: 6, trailLength: 0.6, symbol: 'pin', color: '#f05c32', symbolSize: 6, loop: false }, lineStyle: { normal: { type: 'solid', color: '#f05c32', width: 0, curveness: 0.2 } }, animation: true, data: [ { coords: [ [-87.64, 41.88], // from [120.14, 30.88] // to ] }, { coords: [ [-50.66, 41.55], // from [100.11, 10.22] // to ] } ], animationDelay: function (idx) { return idx * 1000; } } ] }
参照源码问题已解决
@djgenius 请问是怎么解决的呢?
问题简述 (One-line summary)
您好,问题如下:在lines类型中设置相关参数后,主要利用effect效果,并通过配置animationDelay以期望实现数据的延时显示。但实际中,动效几乎是同时显示,并没有出现延时效果(测试了下,似乎只对线型有效,对于effect来说是无效的),不知是否是不支持effect 的延时效果? 希望能够得到您的解答,谢谢!
版本及环境 (Version & Environment)
重现步骤 (Steps to reproduce)
1.设置lines相关参数:effect 和 animation为主,并设定好data数据 2.setoption后,观察动效
期望结果 (Expected behaviour)
动效出现延时效果。
可能哪里有问题 (What went wrong)
是否支持effcet效果的延时?
ECharts配置项 (ECharts option)
其他信息 (Other comments)