From adc9e790a5b1e38f75d39df0b596b1982de4e89e Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 03 三月 2026 16:18:59 +0800
Subject: [PATCH] 1. 修改饼图样式
---
src/components/monitor/DeviceStatus.vue | 30 ++++++++++++++++++++++++------
1 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/src/components/monitor/DeviceStatus.vue b/src/components/monitor/DeviceStatus.vue
index 3a6fbde..20228aa 100644
--- a/src/components/monitor/DeviceStatus.vue
+++ b/src/components/monitor/DeviceStatus.vue
@@ -126,19 +126,37 @@
formatter: '{a} <br/>{b}: {c} ({d}%)',
},
legend: {
- orient: 'vertical',
- left: 'left',
+ bottom: '0%',
data: ['鍦ㄧ嚎璁惧', '绂荤嚎璁惧', '姝e父璁惧', '鏁呴殰璁惧'],
},
series: [
{
- name: '璁惧鐘舵��',
+ name: '鍦ㄧ嚎鐘舵��',
type: 'pie',
- radius: '60%',
- center: ['50%', '50%'],
+ radius: ['40%', '70%'],
+ center: ['48%', '50%'],
+ startAngle: 270,
+ endAngle: 90,
data: [
{ value: this.onlineCount, name: '鍦ㄧ嚎璁惧', itemStyle: { color: '#67C23A' } },
{ value: this.offlineCount, name: '绂荤嚎璁惧', itemStyle: { color: '#909399' } },
+ ],
+ emphasis: {
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)',
+ },
+ },
+ },
+ {
+ name: '杩愯鐘舵��',
+ type: 'pie',
+ radius: ['40%', '70%'],
+ center: ['52%', '50%'],
+ startAngle: 90,
+ endAngle: 270,
+ data: [
{ value: this.normalCount, name: '姝e父璁惧', itemStyle: { color: '#409EFF' } },
{ value: this.faultCount, name: '鏁呴殰璁惧', itemStyle: { color: '#F56C6C' } },
],
@@ -224,7 +242,7 @@
.chart-container {
width: 100%;
- height: 100%;
+ height: 300px;
}
@keyframes pulse {
--
Gitblit v1.9.3