ming131419 opened a new issue #13012:
URL: https://github.com/apache/incubator-echarts/issues/13012


   ### Version
   I use the latest version from official website.
   
   ### Coding
   let option = {
       backgroundColor: optcolcfg.backgroundColor,
       title: {
         text: '数据中心',
         left: 'center',
         top: 5,
         itemGap: 0,
         textStyle: {
           color: optcolcfg.titleTextColor,
           fontWeight: 'lighter',
           fontSize : 24
         },
         z: 200
       },
       geo: {
         // center: [116.3, 39.9],
         show: true,
         map: 'world',
         roam: true,
         zoom: 1,
         itemStyle: {
           normal: {
             borderColor: optcolcfg.geoItemStyleBorderColor,
             borderWidth: 1,
             areaColor: {
                 type: 'radial',
                 x: 0.5,
                 y: 0.5,
                 r: 0.8,
                 colorStops: [
                   {
                     offset: 0,
                     color: optcolcfg.geoEmphasisAreaColorOffset0 // 0% 处的颜色
                   }, 
                   {
                       offset: 1,
                       color: optcolcfg.geoEmphasisAreaColorOffset1 // 100% 处的颜色
                   }
                 ],
                 globalCoord: true // 缺省为 false
             },
             shadowColor: optcolcfg.geoItemStyleShadowColor,
             shadowOffsetX: -2,
             shadowOffsetY: 2,
             shadowBlur: 10
             },
             emphasis: {
                 areaColor: optcolcfg.geoEmphasisAreaColor,
                 borderWidth: 0
             }
         },
         selectedMode: 'single',
         silent: true,
         bottom: 0,
         left: 0,
         right: 0,
         top: 40
       },
       series: [
         {
           name: '1w~1k',
           type: 'scatter',
           coordinateSystem: 'geo',
           data: newData,
           symbolSize: function (val) {
             let cnt = (val[2] === 'string') ? int(val[2]) : val[2];
             return levelData(cnt);
           },
           itemStyle: {
               normal: {
                 color: new echarts.graphic.RadialGradient(0.5, 0.5, 1.0, [     
     // 由中心向四周渐变
                     {
                         offset: 0,
                         color: optcolcfg.seriesScatter1ItemStyleStartColor
                     },
                     {
                         offset: 1,
                         color: optcolcfg.seriesScatter1ItemStyleEndColor
                     }
                 ]),
                 borderWidth: 2,
                 borderColor: optcolcfg.seriesScatter1ItemStyleBorderColor,
                 borderType: 'dotted',
                 shadowBlur: 5,
                 shadowColor: optcolcfg.seriesScatter1ItemStyleShadowColor,
                 shadowOffsetX: 1,
                 shadowOffsetY: 1
               }
           },
           encode: {
               value: 2
           },
           emphasis: {
               label: {
                   formatter: '{@value}',
                   position: 'right',
                   color: optcolcfg.seriesScatterLabelColor,
                   fontWeight: 'normal',
                   fontSize : 18,
                   show: true,
               },
               itemStyle: {
                 areaColor: '#fff',
                 borderColor: "#000"
               }
           },
           zlevel: 1
         },
       ]
     };
     // console.log('r',r);
     myChart.setOption(option);
     myChart.hideLoading();
     // window.addEventListener('resize', () => myChart.resize()) 
     window.onresize = myChart.resize;
   
   
![image](https://user-images.githubusercontent.com/37602985/88267354-50a7ed80-cd03-11ea-8bee-b3ef52f89e67.png)
   
   
![image](https://user-images.githubusercontent.com/37602985/88267424-687f7180-cd03-11ea-8530-421ac0d917df.png)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to