Jelajahi Sumber

气泡地图支持渐变色

qianming 4 tahun lalu
induk
melakukan
2eca15e5ac

+ 2 - 2
report-ui/src/views/report/bigscreen/designer/tools.js

@@ -5998,7 +5998,7 @@ const widgetTools = [
           {
             name: '地图块颜色',
             list: [
-/*              {
+              {
                 type: 'vue-color',
                 label: '0%处颜色',
                 name: 'font0PreColor',
@@ -6013,7 +6013,7 @@ const widgetTools = [
                 required: false,
                 placeholder: '',
                 value: '#061E3D'
-              },*/
+              },
               {
                 type: 'vue-color',
                 label: '高亮渐变色',

+ 19 - 0
report-ui/src/views/report/bigscreen/designer/widget/map/widgetAirBubbleMap.vue

@@ -443,6 +443,24 @@ export default {
     setOptionMapBlocak() {
       const optionsSetup = this.optionsSetup;
       const itemStyle = this.options.series[0]['itemStyle'];
+      const normal = {
+          //地图块颜色
+          areaColor: {
+            x: 0,
+            y: 0,
+            x2: 0,
+            y2: 1,
+            colorStops: [{
+              offset: 0,
+              color: optionsSetup.font0PreColor // 0% 处的颜色
+            }, {
+              offset: 1,
+              color: optionsSetup.font100PreColor // 100% 处的颜色
+            }],
+          },
+          borderColor: '#215495',
+          borderWidth: 1,
+        };
       //鼠标放置颜色加深
       const emphasis = {
         areaColor: {
@@ -459,6 +477,7 @@ export default {
           }],
         },
       };
+      itemStyle['normal'] = normal;
       itemStyle['emphasis'] = emphasis;
     },
     setOptionAirSize() {