Skip to content

Commit e1a3de3

Browse files
committed
Add a workaround for invisible grid lines on the weekly contributions bar chart
Credit to @danielhjacobs for finding it.
1 parent 31d9381 commit e1a3de3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/app/compatibility/weekly_contributions.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use client";
2+
import { ReferenceLine } from "recharts";
23
import { BarChart } from "@mantine/charts";
34
import { Paper, Text } from "@mantine/core";
45
import classes from "./weekly_contributions.module.css";
@@ -43,6 +44,14 @@ export function WeeklyContributions({ data }: { data: DataPoint[] }) {
4344
),
4445
}}
4546
className={classes.chart}
46-
/>
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
51+
y={0}
52+
stroke="transparent"
53+
ifOverflow="extendDomain"
54+
/>
55+
</BarChart>
4756
);
4857
}

0 commit comments

Comments
 (0)