From a52b3dab512fbfc35096b96796335d5b520466ba Mon Sep 17 00:00:00 2001
From: zCans <1224895921@qq.com>
Date: Sun, 19 Feb 2023 17:49:34 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=9B=BE=E8=A1=A8=E6=94=B9?=
=?UTF-8?q?=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../admin/components/DailyTrafficChart.vue | 58 +++++++++-------
.../home/admin/components/LicenseChart.vue | 67 +++++++++++++------
.../admin/components/PortMappingChart.vue | 54 ++++++++++-----
.../home/admin/components/TrafficSumChart.vue | 4 +-
.../src/views/home/admin/index.vue | 3 +
5 files changed, 123 insertions(+), 63 deletions(-)
diff --git a/neutrino-proxy-admin/src/views/home/admin/components/DailyTrafficChart.vue b/neutrino-proxy-admin/src/views/home/admin/components/DailyTrafficChart.vue
index 2f72d52e..74c7e7fc 100644
--- a/neutrino-proxy-admin/src/views/home/admin/components/DailyTrafficChart.vue
+++ b/neutrino-proxy-admin/src/views/home/admin/components/DailyTrafficChart.vue
@@ -22,7 +22,7 @@ export default {
},
height: {
type: String,
- default: '160px'
+ default: '250px'
},
data: {
type: Object,
@@ -57,60 +57,70 @@ export default {
const option = {
title: {
text: this.data.text,
- left: 'center',
- bottom: '0',
+ subtext: '上行:' + this.data.upload + '\n\n' + '下行:' + this.data.download,
textStyle: {
- fontSize: 12,
+ fontSize: 18,
fontWeight: 800,
- color: '#6c7a89'
+ align: 'center'
}
},
tooltip: {
trigger: 'item'
},
legend: {
+ data: ['上行', '下行'],
orient: 'vertical',
- left: 'left'
+ left: 'right'
},
series: [
{
name: this.data.text,
type: 'pie',
- radius: '68%',
+ radius: [45, 65],
+ center: ['50%', '58%'],
// 隐藏指示线
labelLine: {
normal: {
show: false
}
},
+ // 隐藏圆环上文字
label: {
normal: {
- show: true,
- position: 'inner',
- fontSize: 10,
- color: '#fff',
- formatter: (data) => {
- return `${data.name}${data.value > 1000 ? ':\n\n' : ':'}${data.value}`
- }
+ show: false,
+ position: 'center'
}
},
data: [
{
value: this.data.upload,
- name: '上行'
+ name: '上行',
+ lineStyle: {
+ normal: {
+ color: '#2B81B1'
+ }
+ },
+ itemStyle: {
+ normal: {
+ color: '#2B81B1'
+ }
+ }
},
{
value: this.data.download,
- name: '下行'
+ name: '下行',
+ lineStyle: {
+ normal: {
+ color: '#dbebf7'
+ }
+ },
+ itemStyle: {
+ normal: {
+ color: '#dbebf7'
+ }
+ }
}
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
+ ]
}
]
}
diff --git a/neutrino-proxy-admin/src/views/home/admin/components/LicenseChart.vue b/neutrino-proxy-admin/src/views/home/admin/components/LicenseChart.vue
index 768576bf..d9882033 100644
--- a/neutrino-proxy-admin/src/views/home/admin/components/LicenseChart.vue
+++ b/neutrino-proxy-admin/src/views/home/admin/components/LicenseChart.vue
@@ -1,5 +1,7 @@
-
+