From 3733915902228ecfe93ab05ea585af4e181d0b2f Mon Sep 17 00:00:00 2001 From: oiov Date: Wed, 14 Aug 2024 11:41:34 +0800 Subject: [PATCH] style: upd charts style --- .../dashboard/scrape/meta-scraping.tsx | 4 +- app/(protected)/dashboard/urls/meta-chart.tsx | 72 ++++++++++++++----- styles/globals.css | 4 +- 3 files changed, 59 insertions(+), 21 deletions(-) diff --git a/app/(protected)/dashboard/scrape/meta-scraping.tsx b/app/(protected)/dashboard/scrape/meta-scraping.tsx index eb4f92e..8bfbc35 100644 --- a/app/(protected)/dashboard/scrape/meta-scraping.tsx +++ b/app/(protected)/dashboard/scrape/meta-scraping.tsx @@ -152,7 +152,7 @@ export default function MetaScraping() { - + {/* Screenshot @@ -221,7 +221,7 @@ export default function MetaScraping() { )} - + */} ); } diff --git a/app/(protected)/dashboard/urls/meta-chart.tsx b/app/(protected)/dashboard/urls/meta-chart.tsx index 362ccd4..81f625f 100644 --- a/app/(protected)/dashboard/urls/meta-chart.tsx +++ b/app/(protected)/dashboard/urls/meta-chart.tsx @@ -6,7 +6,7 @@ import { UrlMeta } from "@prisma/client"; import { VisSingleContainer, VisTooltip, VisTopoJSONMap } from "@unovis/react"; import { Donut, MapData, TopoJSONMap } from "@unovis/ts"; import { WorldMapTopoJSON } from "@unovis/ts/maps"; -import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"; +import { Area, AreaChart, Bar, BarChart, CartesianGrid, XAxis } from "recharts"; import { isLink, removeUrlSuffix, timeAgo } from "@/lib/utils"; import { @@ -191,7 +191,7 @@ export function DailyPVUVChart({ data }: { data: UrlMeta[] }) { config={chartConfig} className="aspect-auto h-[225px] w-full" > - + + + + + + + + + + } /> - - + {/* + */} - {/* */} - + + + + + + + +
{refererStats.length > 0 && ( @@ -256,11 +296,6 @@ export function DailyPVUVChart({ data }: { data: UrlMeta[] }) { )}
- - - - - ); @@ -289,8 +324,11 @@ export function StatsList({ data, title }: { data: Stat[]; title: string }) {
diff --git a/styles/globals.css b/styles/globals.css index 9a96b76..84ad2e4 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -26,8 +26,8 @@ --radius: 0.5rem; --blue: 210 100% 50%; - --chart-1: 221.2 83.2% 53.3%; - --chart-2: 212 95% 68%; + --chart-1: 198 93% 60%; + --chart-2: 158deg 64% 52%; --chart-3: 216 92% 60%; --chart-4: 210 98% 78%; --chart-5: 212 97% 87%;