소스 검색

fix: 优化首页饼图的暗黑样式

yanglzh 10 달 전
부모
커밋
e5defdfc14
1개의 변경된 파일28개의 추가작업 그리고 7개의 파일을 삭제
  1. 28 7
      src/utils/dataUiOptions.ts

+ 28 - 7
src/utils/dataUiOptions.ts

@@ -13,7 +13,7 @@ export function getLineData({ xAxis = [] as any[], datas = [] as number[][], leg
         "show": false
       },
       "padding": {
-        "top": 16,
+        "top": height * 0.3,
         "right": 14,
         "bottom": 34,
         "left": 30
@@ -110,19 +110,40 @@ export function getPieData({ datas = [] as number[][], legend = [] as string[],
           "bottom": 0,
           "left": 0
         },
-        legend: { color: "#888888" },
-        tooltip: {
-          color: "#888888",
-          showPercentage: true,
-          backgroundOpacity: 30,
-        },
         "title": {
           "text": " ",
           "show": false,
         },
+        "legend": {
+          "show": true,
+          "bold": false,
+          "backgroundColor": "transparent",
+          "color": "#888888",
+          "fontSize": 14,
+          "roundingValue": 0,
+          "roundingPercentage": 0
+        },
         "layout": {
           "labels": {
+            value: { rounding: 0, show: true, formatter: null },
+            percentage: {
+              color: "#888888",
+              bold: true,
+              fontSize: 18,
+              rounding: 0,
+              formatter: null,
+            },
+            name: { color: "#888888", bold: false, fontSize: 14 },
             "hollow": {
+              "total": {
+                "fontSize": 18,
+                "color": "#888888",
+                "text": "总计",
+                "value": {
+                  "color": "#888888",
+                  "fontSize": 18,
+                }
+              },
               "average": {
                 "show": false,
               },