mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 12:40:10 +00:00
fix: chart config
This commit is contained in:
@@ -69,14 +69,20 @@ export function NetworkChart({
|
||||
|
||||
const formattedData = formatData(monitorData.data);
|
||||
|
||||
const chartDataKey = Object.keys(transformedData);
|
||||
|
||||
const initChartConfig = {
|
||||
avg_delay: {
|
||||
label: t("monitor.avgDelay"),
|
||||
},
|
||||
...chartDataKey.reduce((acc, key) => {
|
||||
acc[key] = {
|
||||
label: key,
|
||||
};
|
||||
return acc;
|
||||
}, {} as ChartConfig),
|
||||
} satisfies ChartConfig;
|
||||
|
||||
const chartDataKey = Object.keys(transformedData);
|
||||
|
||||
return (
|
||||
<NetworkChartClient
|
||||
chartDataKey={chartDataKey}
|
||||
|
||||
Reference in New Issue
Block a user