From 47e7e136ca971b6c60845b4e608716593dbafcad Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期四, 07 十二月 2023 16:15:51 +0800 Subject: [PATCH] 去掉人员表格单位 --- src/views/cockpitPage/components/DeviceChart.vue | 29 ++++++++++++++++++++++++----- 1 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/views/cockpitPage/components/DeviceChart.vue b/src/views/cockpitPage/components/DeviceChart.vue index f4ea752..b95ae0e 100644 --- a/src/views/cockpitPage/components/DeviceChart.vue +++ b/src/views/cockpitPage/components/DeviceChart.vue @@ -69,7 +69,7 @@ grid: { right: "80px", bottom: "60px", - left: "60px", + left: "70px", top: "30px", }, dataZoom: [ @@ -79,6 +79,9 @@ show: false, startValue: that.startValue, // 浠庡ご寮�濮� endValue: that.endValue, // 涓�娆℃�у睍绀哄嚑涓� + zoomOnMouseWheel: false, + moveOnMouseWheel: true, + moveOnMouseMove: true, }, ], legend: { @@ -104,6 +107,7 @@ // rotate:45, margin: 10, show: true, + fontSize: 12, textStyle: { color: function (params, index) { let colorList = ["#dcb018", "#00FFFF"]; @@ -115,7 +119,7 @@ }, }, formatter: function (value) { - if (value.length > 6) { + if (value.length > 5) { return `${value.slice(0, 4)}...`; } return value; @@ -153,12 +157,13 @@ axisTick: { show: false, }, - axisLabel: { textStyle: { color: "#00FFFF", }, - formatter: "{value}%", + formatter: function (value) { + return `${value}%`; + }, }, }, ], @@ -170,7 +175,21 @@ label: { show: true, position: "right", - color: "#00FFFF", + formatter: function (params) { + if (params.dataIndex % 2 == 0) { + return `{a|${params.value}%}`; + } else { + return `{b|${params.value}%}`; + } + }, + rich: { + a: { + color: "#00FFFF", + }, + b: { + color: "#dcb018", + }, + }, }, itemStyle: { normal: { -- Gitblit v1.8.0