echarts地图如何放大

地图不能写dataZoom来放大缩小,一定要写在series里的zoom

$.get(
          'https://geo.datav.aliyun.com/areas_v3/bound/140000_full.json',
          function(geoJson) {
            myChart.hideLoading()
            echarts.registerMap('SX', geoJson)
            myChart.setOption({
              title: {
                text:
                  'Shanxi map (' + new Date().getFullYear().toString() + ')',
                subtext: 'Evaluation of municipal'
              },
              tooltip: {
                trigger: 'item',
                formatter: '{b}
{c} 个评价'
}, toolbox: { show: true, orient: 'vertical', left: 'right', top: 'center', feature: { dataView: { readOnly: false }, restore: {}, saveAsImage: {} } }, visualMap: { min: 1, max: 50, text: ['高', '低'], realtime: false, calculable: true, inRange: { color: ['lightskyblue', 'yellow', 'orangered'] } }, series: [ { name: '山西省各市评价数', type: 'map', map: 'SX', zoom: 1.2, // 一定要写这里 ..... label: { show: true }, data: arr } ] }) } )

你可能感兴趣的:(vue,echarts)