You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/01/16 01:12:20 UTC

[GitHub] DorisOu commented on issue #9430: visualMap: false不起作用。seriesIndex 能否定义为数组?

DorisOu commented on issue #9430: visualMap: false不起作用。seriesIndex 能否定义为数组?
URL: https://github.com/apache/incubator-echarts/issues/9430#issuecomment-454613066
 
 
   @shixibao visualmap:false不起作用,我这样解决的:
   //点击legend控制visualMap的显示和隐藏
       function renderSelected(params) {
           var selected = params.selected;
           if (selected['镇人口分布']) {
               scatterMap.setOption(option = {
                   visualMap: [{
                       id: '镇人口分布',
                       show: true
                   }, {
                       id: '小区人口分布',
                       show: false
                   }],
                   series: [{
                       id: 'bar',
                       zlevel: 2,
                       type: 'bar',
                       symbol: 'none',
                       itemStyle: {
                           normal: {
                               color: '#ddb926'
                           }
                       },
                       data: regionData(paths)
                   }],
                   yAxis: {
                       data: getName(paths)
                   }
               });
           } else {
               scatterMap.setOption(option = {
                   visualMap: [{
                       id: '镇人口分布',
                       show: false
                   }, {
                       id: '小区人口分布',
                       show: true
                   }],
                   series: [{
                       id: 'bar',
                       zlevel: 2,
                       type: 'bar',
                       symbol: 'none',
                       itemStyle: {
                           normal: {
                               color: '#ddb926'
                           }
                       },
                       data: []
                   }],
                   yAxis: {
                       data: []
                   }
               });
           }
       }
   scatterMap.on('legendselectchanged', renderSelected);

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


With regards,
Apache Git Services

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