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%; } }