fix barchart calcuate

This commit is contained in:
oiov
2025-09-16 14:51:08 +08:00
parent 044356ad29
commit bfb1a14045
5 changed files with 8 additions and 9 deletions

View File

@@ -31,9 +31,7 @@ export function RadialShapeChart({
totalUser: number;
}) {
const t = useTranslations("Components");
const chartData = [
{ browser: "safari", actived: total, fill: "var(--color-safari)" },
];
const chartData = [{ actived: total, fill: "var(--color-safari)" }];
return (
<Card className="flex flex-col">
@@ -44,7 +42,7 @@ export function RadialShapeChart({
>
<RadialBarChart
data={chartData}
endAngle={total}
endAngle={(total / totalUser) * 100}
innerRadius={80}
outerRadius={140}
>
@@ -79,7 +77,7 @@ export function RadialShapeChart({
y={(viewBox.cy || 0) + 24}
className="fill-muted-foreground"
>
Users
{t("Users")}
</tspan>
</text>
);

View File

@@ -7,8 +7,8 @@ import { DashboardHeader } from "@/components/dashboard/header";
import UserUrlsList from "../../dashboard/urls/url-list";
export const metadata = constructMetadata({
title: "Short URLs",
description: "List and manage records.",
title: "Links",
description: "List and manage short links.",
});
export default async function DashboardPage() {

View File

@@ -322,7 +322,7 @@
"CPU": "CPU",
"Visitors": "访客",
"Name": "名称",
"Activated Api Key users": "已启用 API Key 的用户",
"Activated Api Key users": "已激活 API Key 的用户",
"total-requests-one-type": "Open API 的 {type1} 的总请求数",
"total-requests-two-types": "Open API 的 {type1} 和 {type2} 的总请求数",
"Protected Link": "受保护的链接",

View File

@@ -25,6 +25,7 @@ const systemRoutes = [
"/docs",
"/dashboard",
"/admin",
"/feedback",
"/pricing",
"/plan",
"/privacy",

File diff suppressed because one or more lines are too long