From 6f1229d08cf208bfb9ea71b6909e46620948ad9a Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 04 十二月 2023 13:40:32 +0800 Subject: [PATCH] 饼图样式优化 --- src/views/cockpitPage/components/PerSonnelProductivity.vue | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/cockpitPage/components/PerSonnelProductivity.vue b/src/views/cockpitPage/components/PerSonnelProductivity.vue index 5759ea5..84ce27a 100644 --- a/src/views/cockpitPage/components/PerSonnelProductivity.vue +++ b/src/views/cockpitPage/components/PerSonnelProductivity.vue @@ -212,8 +212,8 @@ z: 3, style: { image: img, - width: 118, - height: 118, + width: 238, + height: 238, }, left: "center", top: "center", @@ -226,7 +226,7 @@ name: "Access From", type: "pie", // center: ['80%', '46%'], - radius: ["52%", "65%"], + radius: ["52%", "62%"], // minAngle: 20, // startAngle: 60, avoidLabelOverlap: false, @@ -234,14 +234,23 @@ label: { normal: { position: "outer", - padding: [0, -55], + padding: [0, -62], color: "#01f7fd", fontSize: 12, - borderWidth: 20, + borderWidth: 5, borderRadius: 4, formatter: function (params) { - let str = params.name + params.value + "%"; - return str; + return `{a|${params.name}} {b|${params.value + "%"}}`; + }, + rich: { + a: { + color: "#00ffff", + fontSize: 14, + }, + b: { + color: "#fccd1d", + fontSize: 14, + }, }, }, }, @@ -255,8 +264,8 @@ }, labelLine: { show: true, - length: 5, - length2: 70, + length: 4, + length2: 80, lineStyle: { color: "#dcb018", }, -- Gitblit v1.8.0