mzy2240 commented on issue #9212: For Map Application, update the scatter data 
will erase all the lines data
URL: 
https://github.com/apache/incubator-echarts/issues/9212#issuecomment-429364434
 
 
   @Ovilia Hi Ovilia, I have tested using different zlevels, but it does not 
work in this situation. I even give each series different zlevel but the lines 
will still disappear while the scatters left there. 
   Below is the test case, you can replace the original **option** with the 
code below:
   http://echarts.baidu.com/examples/editor.html?c=map-polygon
   myChart.setOption({
       // backgroundColor: '#404a59',
       title: {
           text: '全国主要城市空气质量',
           subtext: 'data from PM25.in',
           sublink: 'http://www.pm25.in',
           left: 'center',
           textStyle: {
               color: '#fff'
           }
       },
       tooltip : {
           trigger: 'item'
       },
       bmap: {
           center: [104.114129, 37.550339],
           zoom: 5,
           roam: true
       },
       series : [
           {
               id: 'scatter',
               name: 'pm2.5',
               type: 'scatter',
               zlevel:0,
               coordinateSystem: 'bmap',
               data: [],//convertData(data),
               symbolSize: function (val) {
                   return val[2] / 10;
               },
               label: {
                   normal: {
                       formatter: '{b}',
                       position: 'right',
                       show: false
                   },
                   emphasis: {
                       show: true
                   }
               },
               itemStyle: {
                   normal: {
                       color: '#ddb926'
                   }
               }
           },
           {
               name: 'Top 5',
               type: 'effectScatter',
               coordinateSystem: 'bmap',
               data: convertData(data.sort(function (a, b) {
                   return b.value - a.value;
               }).slice(0, 6)),
               symbolSize: function (val) {
                   return val[2] / 10;
               },
               showEffectOn: 'emphasis',
               rippleEffect: {
                   brushType: 'stroke'
               },
               hoverAnimation: true,
               label: {
                   normal: {
                       formatter: '{b}',
                       position: 'right',
                       show: true
                   }
               },
               itemStyle: {
                   normal: {
                       color: '#f4e925',
                       shadowBlur: 10,
                       shadowColor: '#333'
                   }
               },
               zlevel: 1
           },
           {
               type: 'custom',
               coordinateSystem: 'bmap',
               zlevel:0,
               renderItem: renderItem,
               itemStyle: {
                   normal: {
                       opacity: 0.5
                   }
               },
               animation: false,
               silent: true,
               data: [0],
               z: -10
           },
           {
   name: 'lines',
   type: 'lines',
   coordinateSystem: 'bmap',
   zlevel:2,
   data: [{
   name: 'test',
   coords: [
   [91.11, 29.97],
   [125.03, 46.58]
   ]
   }],
   lineStyle: {
   normal: {
   color: '#ffff8d'
   }
   }
   }
       ]
   });
   myChart.setOption({
   series: [{
   id: 'scatter',
   name: 'pm2.5',
   data: convertData(data)
   }]
   });

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
For additional commands, e-mail: dev-h...@echarts.apache.org

Reply via email to