From 14101bd42ce17dfb9d951d0738abe9d303fb3fe5 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 11 十二月 2023 10:41:39 +0800 Subject: [PATCH] 机器开机率、人员技能比饼图优化 --- src/views/cockpitPage/components/MaterialChart.vue | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/views/cockpitPage/components/MaterialChart.vue b/src/views/cockpitPage/components/MaterialChart.vue index 3710cb5..6d4d449 100644 --- a/src/views/cockpitPage/components/MaterialChart.vue +++ b/src/views/cockpitPage/components/MaterialChart.vue @@ -55,13 +55,22 @@ myChart = echarts.init(chartDom); let option; let lineColor = "#35ddc74d"; + let spirit = "/cockpitPage/order-bg.png"; if (data) { option = { - color: ["#00FFFF", "#dcb018"], + color: ["#00FFFF", "#fccd1d"], tooltip: { trigger: "axis", axisPointer: { type: "none", + }, + textStyle: { + color: "#00FFFF", + }, + borderColor: "#00FFFF", + backgroundColor: "#238d8d6b", + valueFormatter: function (value) { + return "鐗╂枡涓嶈冻鐨勬暟閲�:" + value; }, }, grid: { @@ -92,6 +101,7 @@ yAxis: [ { type: "category", + inverse: true, axisTick: { show: false, }, @@ -108,7 +118,7 @@ fontSize: 12, textStyle: { color: function (params, index) { - let colorList = ["#dcb018", "#00FFFF"]; + let colorList = ["#fccd1d", "#00FFFF"]; if (index % 2 == 0) { return colorList[0]; } else { @@ -168,15 +178,20 @@ ], series: [ { - type: "bar", + type: "pictorialBar", name: "", - barWidth: "15", + symbol: spirit, + symbolRepeat: true, + symbolMargin: "25%", + symbolClip: true, + symbolSize: [4, 11], + barCategoryGap: "40%", itemStyle: { normal: { //鏌卞舰鍥惧渾瑙掞紝鍒濆鍖栨晥鏋� barBorderRadius: [4, 4, 0, 0], color: function (params) { - let colorList = ["#dcb018", "#00FFFF"]; + let colorList = ["#fccd1d", "#00FFFF"]; if (params.dataIndex % 2 == 0) { return colorList[0]; } else { -- Gitblit v1.8.0