From b4ab59d359fa833ab536526efaec1d4a0405f6bf Mon Sep 17 00:00:00 2001 From: Sarthik Gupta Date: Wed, 3 Jun 2026 18:59:38 +0530 Subject: [PATCH] fix: realigned router-bandwidth chart --- .../router-bandwidth/get-router-bandwidth.ts | 2 +- .../router-bandwidth-chart.tsx | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/pages/_widgets/router/router-bandwidth/get-router-bandwidth.ts b/src/pages/_widgets/router/router-bandwidth/get-router-bandwidth.ts index 2ef43cd..9fa2574 100644 --- a/src/pages/_widgets/router/router-bandwidth/get-router-bandwidth.ts +++ b/src/pages/_widgets/router/router-bandwidth/get-router-bandwidth.ts @@ -9,6 +9,6 @@ export class RouterBandwidth extends APIInterface< GetRouterBandwidthSearchParams > { protected getUrl(): string { - return `api/router/bandwidth`; + return `router/bandwidth`; } } diff --git a/src/pages/_widgets/router/router-bandwidth/router-bandwidth-chart.tsx b/src/pages/_widgets/router/router-bandwidth/router-bandwidth-chart.tsx index 9dfd2c6..7349ca9 100644 --- a/src/pages/_widgets/router/router-bandwidth/router-bandwidth-chart.tsx +++ b/src/pages/_widgets/router/router-bandwidth/router-bandwidth-chart.tsx @@ -8,7 +8,11 @@ import { } from "@/components/ui/chart"; import { cn } from "@/lib/utils"; import { LineChart, Line, CartesianGrid, XAxis, YAxis } from "recharts"; -import { formatCount, formatUnixTimestamp } from "@/lib/format_unit"; +import { + formatCount, + formatISODate, + formatISODateWithDay, +} from "@/lib/format_unit"; import type { GetRouterBandwidthResponse } from "@model/router/bandwidth"; interface Props { @@ -33,21 +37,25 @@ export function RouterBandwidthChart(props: Props) { formatCount(tick, 0)} + tickFormatter={(v) => formatCount(v, 1)} /> } /> @@ -55,7 +63,7 @@ export function RouterBandwidthChart(props: Props) {