ming 3 lat temu
rodzic
commit
34a42169aa

BIN
dist.zip


BIN
dist5.zip


+ 14 - 7
src/views/site/components/Overview/pieChart.vue

@@ -78,7 +78,7 @@ export default {
             textStyle: {
               rich: {
                 name: {
-                  fontSize: 30,
+                  fontSize: '.4rem',
                   fontWeight: "normal",
                   color: "#FFFFFF",
                   fontFamily: "impact",
@@ -113,24 +113,31 @@ export default {
         series: [
           {
             label: {
+                position:'outer',
+              alignTo:'edge',
+              margin:10,
+             
               normal: {
+                overflow: 'none',
+                padding:[0,-8,-0,-8], //调整左右位置
+                position: 'outside',
                 show: true,
                 textStyle: {
                   color: "#fff",
                 },
                 formatter: " {b} ",
               },
-              emphasis: {
-                show: true,
-              },
+              // emphasis: {
+              //   show: true,
+              // },
             },
             radius: ["43%", "60%"],
             type: "pie",
             data: pie,
-            labelLine: {
+            labelLine: {  
               normal: {
-                length: 3, //aa折线长度
-                // length2: 1, //aa折线长度
+                length: 2, //aa折线长度
+                // length2: 4, //aa折线长度
               },
             },
           },

+ 15 - 8
src/views/site/components/Overview/pieChart2.vue

@@ -83,7 +83,7 @@ export default {
             textStyle: {
               rich: {
                 name: {
-                  fontSize: 30,
+                  fontSize: '.4rem',
                   fontWeight: "normal",
                   color: "#FFFFFF",
                   fontFamily: "impact",
@@ -118,24 +118,31 @@ export default {
         series: [
           {
             label: {
+          
+            
               normal: {
+                 overflow: 'none',
+                position: 'outside',
+                padding:[30,-10,30,-10],
                 show: true,
                 textStyle: {
                   color: "#fff",
+                  fontSize:12,
+
                 },
-                formatter: " {b} ",
-              },
-              emphasis: {
-                show: true,
+                formatter: "{b}",
               },
+              // emphasis: {
+              //   show: true,
+              // },
             },
-            radius: ["43%", "65%"],
+            radius: ["43%", "60%"],
             type: "pie",
             data: pie,
             labelLine: {
               normal: {
-                length: 3, //aa折线长度
-                // length2: 1, //aa折线长度
+                length: 2, //aa折线长度
+                // length2: 4, //aa折线长度
               },
             },
           },