Selaa lähdekoodia

3D饼状样式

zpf 1 vuosi sitten
vanhempi
commit
e3537963bb
1 muutettua tiedostoa jossa 29 lisäystä ja 27 poistoa
  1. 29 27
      src/views/cockpitNew1/tdsc.vue

+ 29 - 27
src/views/cockpitNew1/tdsc.vue

@@ -398,31 +398,32 @@ export default {
         return series;
       }
       // 传入数据生成 option
-      const optionsData = [{
-        name: '秸秆',
-        value: 20,
-        itemStyle: {
-          opacity: 0.8,
-          color: '#3b8584',
+      const optionsData = [
+        {
+          name: '回收',
+          value: 50,
+          itemStyle: {
+            opacity: 0.8,
+            color: 'RGBA(235, 184, 86, 1)',
+          },
+        }, {
+          name: '征收',
+          value: 20,
+          itemStyle: {
+            opacity: 0.8,
+            color: 'RGBA(100, 184, 255, 1)',
+          },
         },
-      },
 
-      {
-        name: '粪污',
-        value: 50,
-        itemStyle: {
-          opacity: 0.8,
-          color: '#64d9e0',
-        },
-      },
-      {
-        name: '厨余',
-        value: 30,
-        itemStyle: {
-          opacity: 0.8,
-          color: '#dac254',
+        {
+          name: '收购',
+          value: 30,
+          itemStyle: {
+            opacity: 0.8,
+            color: 'RGBA(71, 203, 129, 1)',
+          },
         },
-      },
+
       ];
 
       const series = getPie3D(optionsData, 0.6);
@@ -451,8 +452,9 @@ export default {
         clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
         radius: ['30%', '55%'],
         center: ['52%', '38%'],
+        // 没啥用
         data: [{
-          name: '秸秆',
+          name: '征收',
           value: 20,
           itemStyle: {
             //						 opacity: 0.8,
@@ -461,7 +463,7 @@ export default {
         },
 
         {
-          name: '粪污',
+          name: '收购',
           value: 50,
           itemStyle: {
             //						 opacity: 0.8,
@@ -469,7 +471,7 @@ export default {
           },
         },
         {
-          name: '厨余',
+          name: '回收',
           value: 30,
           itemStyle: {
             //						 opacity: 0.8,
@@ -496,8 +498,8 @@ export default {
 
           itemWidth: 12, // 设置宽度
           itemHeight: 12, // 设置高度
-          data: ['秸秆', '粪污', '厨余'],
-          bottom: '5%',
+          data: ['征收', '收购', '回收'],
+          bottom: '40%',
           right: '40%',
 
           itemGap: 10,