@@ -190,26 +232,7 @@ export function NetworkChart({
- {chartDataKey.map((key) => {
- return (
-
- );
- })}
+ {chartButtons}
@@ -219,15 +242,8 @@ export function NetworkChart({
>
} />
)}
- {activeChart !== defaultChart && (
-
- )}
- {activeChart === defaultChart &&
- chartDataKey.map((key) => (
-
- ))}
+ {chartLines}
);
-}
+});
From 5de6d7f63aec6cc78a8b06ce7029fffcda0991e1 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Mon, 14 Oct 2024 18:02:37 +0800
Subject: [PATCH 2/2] fix: chart data
---
.../(main)/ClientComponents/NetworkChart.tsx | 100 +++++++++---------
1 file changed, 49 insertions(+), 51 deletions(-)
diff --git a/app/[locale]/(main)/ClientComponents/NetworkChart.tsx b/app/[locale]/(main)/ClientComponents/NetworkChart.tsx
index f20c09f8a..ec9a91d1f 100644
--- a/app/[locale]/(main)/ClientComponents/NetworkChart.tsx
+++ b/app/[locale]/(main)/ClientComponents/NetworkChart.tsx
@@ -64,57 +64,6 @@ export function NetworkChartClient({ server_id }: { server_id: number }) {
if (!data) return