Skip to content

Commit 31ae011

Browse files
committed
compatibility: Use a better workaround for the CartesianGrid issue
1 parent c9e6bc1 commit 31ae011

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/app/compatibility/weekly_contributions.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"use client";
2-
import { ReferenceLine } from "recharts";
32
import { BarChart } from "@mantine/charts";
43
import { Paper, Text } from "@mantine/core";
54
import classes from "./weekly_contributions.module.css";
@@ -36,6 +35,9 @@ export function WeeklyContributions({ data }: { data: DataPoint[] }) {
3635
h={300}
3736
w="100%"
3837
data={data}
38+
// This manually updated grid property is a workaround for https://github.com/mantinedev/mantine/issues/8110,
39+
// a regression with switching to Recharts 3. TODO: Remove when fixed.
40+
gridProps={{ yAxisId: "left" }}
3941
dataKey="week"
4042
series={[{ name: "Commits", color: "ruffle-orange" }]}
4143
tooltipProps={{
@@ -44,10 +46,6 @@ export function WeeklyContributions({ data }: { data: DataPoint[] }) {
4446
),
4547
}}
4648
className={classes.chart}
47-
>
48-
{/* This invisible line is a workaround for https://github.com/mantinedev/mantine/issues/8110,
49-
a regression with switching to Recharts 3. TODO: Remove when fixed. */}
50-
<ReferenceLine y={0} stroke="transparent" ifOverflow="extendDomain" />
51-
</BarChart>
49+
/>
5250
);
5351
}

0 commit comments

Comments
 (0)