LIHAO520 opened a new issue #9016: 关于echarts中的effect里的loop,设置特效是否循环,为什么我设置了false,我再次请求的时候有数据过来,但是没有渲染到地图上,为什么 URL: https://github.com/apache/incubator-echarts/issues/9016 <!-- 为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。 --> ### One-line summary [问题简述] type: 'lines', coordinateSystem: 'bmap', polyline: true, data: busLines, lineStyle: { normal: { width: 0 } }, effect: { //线特效的配置 constantSpeed: 13, //是否是固定速度 // period:5,//特效动画的时间 show: true, // loop: false, //是否循环特效 trailLength: 0.6, //特效尾际的长度 symbolSize: 1.5 //特效的大小 }, ### Version & Environment [版本及环境] + ECharts version [ECharts 版本]: + Browser version [浏览器类型和版本]: + OS Version [操作系统类型和版本]: option={ bmap: { // center: [position.x,position.y], // zoom:17, roam: true, mapStyle: { 'styleJson': [{ 'featureType': 'water', 'elementType': 'all', 'stylers': { 'color': '#031628' } }, { 'featureType': 'land', 'elementType': 'geometry', 'stylers': { 'color': '#000102' } }, { 'featureType': 'highway', 'elementType': 'all', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'arterial', 'elementType': 'geometry.fill', 'stylers': { 'color': '#000000' } }, { 'featureType': 'arterial', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#0b3d51' } }, { 'featureType': 'local', 'elementType': 'geometry', 'stylers': { 'color': '#000000' } }, { 'featureType': 'railway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#000000' } }, { 'featureType': 'railway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#08304b' } }, { 'featureType': 'subway', 'elementType': 'geometry', 'stylers': { 'lightness': -70 } }, { 'featureType': 'building', 'elementType': 'geometry.fill', 'stylers': { 'color': '#000000' } }, { 'featureType': 'all', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#857f7f' } }, { 'featureType': 'all', 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#000000' } }, { 'featureType': 'building', 'elementType': 'geometry', 'stylers': { 'color': '#022338' } }, { 'featureType': 'green', 'elementType': 'geometry', 'stylers': { 'color': '#062032' } }, { 'featureType': 'boundary', 'elementType': 'all', 'stylers': { 'color': '#465b6c' } }, { 'featureType': 'manmade', 'elementType': 'all', 'stylers': { 'color': '#022338' } }, { 'featureType': 'label', 'elementType': 'all', 'stylers': { 'visibility': 'off' } } ] } }, series: [{ type: 'lines', coordinateSystem: 'bmap', polyline: true, data: busLines, silent: true, lineStyle: { normal: { // color: '#c23531', // color: 'rgb(200, 35, 45)', opacity: 0.2, width: 1 } }, progressiveThreshold: 500, //启用渐进式渲染的图形数量阈值,在单个系列的图形数量超过该阈值时启用渐进式渲染。 progressive: 200 //渐进式渲染 }, { type: 'lines', coordinateSystem: 'bmap', polyline: true, data: busLines, lineStyle: { normal: { width: 0 } }, effect: { //线特效的配置 constantSpeed: 2, //是否是固定速度 // period:5,//特效动画的时间 show: true, // loop: false, //是否循环特效 trailLength: 0.6, //特效尾际的长度 symbolSize: 1.5 //特效的大小 }, zlevel: 1 }] }; if(centerFirst){ option.bmap.center=[position.x,position.y] option.bmap.zoom=15 centerFirst=false; } console.log(option.series[1].effect.constantSpeed); mapEcharts.setOption(option); 因为这个ajax是要定时不断的调用,所以再次调用的时候,因为设置了loop,所以第二次就只有数据,但是不显示在地图上,这是为什么???按理说有数据来,那么它就会重新渲染呀 ### Expected behaviour [期望结果] ### ECharts option [ECharts配置项] <!-- Copy and paste your 'echarts option' here. --> <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] --> ```javascript option = { } ``` ### Other comments [其他信息] <!-- For example: Screenshot or Online demo --> <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
