format x-axis

This commit is contained in:
Alex Holliday committed 2025-12-18 12:57:05 -08:00
1 parent 6f41167456
commit 88dc2f4096
2 files changed
+8 -2

No files matched your search

@@ -1,5 +1,6 @@
import { BaseChart } from "@/components/monitors/Chart";
import { TrendingUp } from "lucide-react";
import { XTick } from "./ChartResponseTime";
import {
XAxis,
AreaChart,
@@ -49,8 +50,10 @@ const config: Record<string, ConfigItem> = {
export const HistogramPageSpeedScores = ({
checks,
range,
}: {
checks: GroupedCheck[];
range: string;
}) => {
const theme = useTheme();
return (
@@ -60,7 +63,10 @@ export const HistogramPageSpeedScores = ({
>
<ResponsiveContainer width="100%" minWidth={25} height={215}>
<AreaChart data={checks}>
<XAxis dataKey={"_id"} />
<XAxis
dataKey={"_id"}
tick={(props) => <XTick {...props} range={range} />}
/>
<CartesianGrid
stroke={theme.palette.divider}
strokeWidth={1}
@@ -87,7 +87,7 @@ const PageSpeedDetailsPage = () => {
/>
</Stack>
<HeaderRange loading={isValidating} range={range} setRange={setRange} />
<HistogramPageSpeedScores checks={checks} />
<HistogramPageSpeedScores checks={checks} range={range} />
<Stack direction={isSmall ? "column" : "row"} gap={theme.spacing(10)}>
<ChartPageSpeedReport latestCheck={checks?.[0]} />
<ChartPageSpeedReportLegend latestCheck={checks?.[0]} />