From 9859956f68fe6f2b48ded85524737fe52c0abee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=86=E4=B9=90?= <342503599@qq.com> Date: Fri, 5 Aug 2022 14:23:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B9=96=E9=87=8C=E5=A4=A7=E5=B1=8F(=E5=8A=B3?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86):=E4=BA=BA=E5=91=98=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectHuScreen/laborManage/rightTop.vue | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/src/views/projectAdmin/dataBoard/projectHuScreen/laborManage/rightTop.vue b/src/views/projectAdmin/dataBoard/projectHuScreen/laborManage/rightTop.vue index edc6d871..19edfb5a 100644 --- a/src/views/projectAdmin/dataBoard/projectHuScreen/laborManage/rightTop.vue +++ b/src/views/projectAdmin/dataBoard/projectHuScreen/laborManage/rightTop.vue @@ -18,37 +18,53 @@ export default { data() { return {}; }, - created() { + mounted() { this.initMyChart(); }, methods: { initMyChart() { const myChart = echarts.init(this.$refs.myChart); const option = { + title:{ + text:'1450', + subtext:'在册总人数', + x:'48%', + y:'40%', + textAlign: 'center', + textStyle: { + fontSize: 14, + fontWeight: 'normal', + color: '#41a4b5', + }, + subtextStyle: { + fontSize: 14, + fontWeight: 'normal', + color: '#41a4b5' + }, + }, series: [ { type: "pie", roseType: "radius", - radius: [30, 60], - // top: 50, + radius: [40, 70], + color:['#43d7b5','#f7d400','#5181f6','#786ff0','#5be2f6'], left: "center", - width: 350, + width: 400, label: { - alignTo: "edge", formatter: "{name|{b}}\n{time|{c} 人}", minMargin: 5, - edgeDistance: 10, - lineHeight: 15, + edgeDistance: 5 , + lineHeight: 20, rich: { time: { fontSize: 12, - color: "#999" + // color: "#999" } } }, labelLine: { length: 15, - length2: 0, + length2: 10, maxSurfaceAngle: 80 }, data: [ @@ -81,7 +97,7 @@ export default { } .myChart { width: 100%; - height: 90%; + height: 100%; } }