图表修改异常,暂时挂起

This commit is contained in:
nkdns 2024-11-29 17:10:46 +08:00
parent c9e5b60aa0
commit 3208c975bb
No known key found for this signature in database
3 changed files with 30 additions and 32 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>frps dashboard</title> <title>frps dashboard</title>
<script type="module" crossorigin src="./index-peJTiTX9.js"></script> <script type="module" crossorigin src="./index-yOnBcT7d.js"></script>
<link rel="stylesheet" crossorigin href="./index-5A9aPAsI.css"> <link rel="stylesheet" crossorigin href="./index-5A9aPAsI.css">
</head> </head>

View File

@ -3,7 +3,7 @@ import * as echarts from 'echarts/core'
import { PieChart, BarChart } from 'echarts/charts' import { PieChart, BarChart } from 'echarts/charts'
import { CanvasRenderer } from 'echarts/renderers' import { CanvasRenderer } from 'echarts/renderers'
import { LabelLayout } from 'echarts/features' import { LabelLayout } from 'echarts/features'
import { useI18n } from 'vue-i18n';
import { import {
TitleComponent, TitleComponent,
TooltipComponent, TooltipComponent,
@ -27,7 +27,6 @@ function DrawTrafficChart(
trafficIn: number, trafficIn: number,
trafficOut: number trafficOut: number
) { ) {
const { t } = useI18n();
const myChart = echarts.init( const myChart = echarts.init(
document.getElementById(elementId) as HTMLElement, document.getElementById(elementId) as HTMLElement,
'macarons' 'macarons'
@ -36,8 +35,8 @@ function DrawTrafficChart(
const option = { const option = {
title: { title: {
text: t("OverView.Chart.Traffic.title"), text: 'Network Traffic',
subtext: t("OverView.Chart.Traffic.subTitle"), subtext: 'today',
left: 'center', left: 'center',
}, },
tooltip: { tooltip: {
@ -49,7 +48,7 @@ function DrawTrafficChart(
legend: { legend: {
orient: 'vertical', orient: 'vertical',
left: 'left', left: 'left',
data: [t("OverView.Chart.Traffic.TrafficIn"), t("OverView.Chart.Traffic.TrafficOut")], data: ['Traffic In', 'Traffic Out'],
}, },
series: [ series: [
{ {
@ -59,11 +58,11 @@ function DrawTrafficChart(
data: [ data: [
{ {
value: trafficIn, value: trafficIn,
name: t("OverView.Chart.Traffic.TrafficIn"), name: 'Traffic In',
}, },
{ {
value: trafficOut, value: trafficOut,
name: t("OverView.Chart.Traffic.TrafficOut"), name: 'Traffic Out',
}, },
], ],
emphasis: { emphasis: {
@ -81,7 +80,6 @@ function DrawTrafficChart(
} }
function DrawProxyChart(elementId: string, serverInfo: any) { function DrawProxyChart(elementId: string, serverInfo: any) {
const { t } = useI18n();
const myChart = echarts.init( const myChart = echarts.init(
document.getElementById(elementId) as HTMLElement, document.getElementById(elementId) as HTMLElement,
'macarons' 'macarons'
@ -90,8 +88,8 @@ function DrawProxyChart(elementId: string, serverInfo: any) {
const option = { const option = {
title: { title: {
text: t("OverView.Chart.Proxies.title"), text: 'Proxies',
subtext: t("OverView.Chart.Proxies.subTitle"), subtext: 'now',
left: 'center', left: 'center',
}, },
tooltip: { tooltip: {