Skip to content

Commit 6368b9d

Browse files
committed
♻️ use linechart
1 parent 1b643fb commit 6368b9d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/components/LogAnalyticsData.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
} from "./InfoSection";
3535
import { WorldMap } from "./WorldMap";
3636
import { countryCodeToFlagEmoji } from "@app/lib/countryCodeToFlagEmoji";
37-
import { useTheme } from "next-themes";
37+
3838
import {
3939
Tooltip,
4040
TooltipContent,
@@ -49,7 +49,7 @@ import {
4949
ChartTooltipContent,
5050
type ChartConfig
5151
} from "./ui/chart";
52-
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
52+
import { CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts";
5353

5454
export type AnalyticsContentProps = {
5555
orgId: string;
@@ -365,7 +365,7 @@ function RequestChart(props: RequestChartProps) {
365365
config={chartConfig}
366366
className="min-h-[200px] w-full h-80"
367367
>
368-
<AreaChart accessibilityLayer data={props.data}>
368+
<LineChart accessibilityLayer data={props.data}>
369369
<ChartLegend content={<ChartLegendContent />} />
370370
<ChartTooltip
371371
content={
@@ -412,23 +412,25 @@ function RequestChart(props: RequestChartProps) {
412412
}}
413413
/>
414414

415-
<Area
415+
<Line
416416
dataKey="allowedCount"
417417
stroke="var(--color-allowedCount)"
418418
strokeWidth={2}
419419
fill="transparent"
420420
radius={4}
421421
isAnimationActive={false}
422+
dot={false}
422423
/>
423-
<Area
424+
<Line
424425
dataKey="blockedCount"
425426
stroke="var(--color-blockedCount)"
426427
strokeWidth={2}
427428
fill="transparent"
428429
radius={4}
429430
isAnimationActive={false}
431+
dot={false}
430432
/>
431-
</AreaChart>
433+
</LineChart>
432434
</ChartContainer>
433435
);
434436
}

0 commit comments

Comments
 (0)