Skip to content

Commit 502cbf2

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

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/app/compatibility/weekly_contributions.tsx

Lines changed: 3 additions & 4 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={{
@@ -45,9 +47,6 @@ export function WeeklyContributions({ data }: { data: DataPoint[] }) {
4547
}}
4648
className={classes.chart}
4749
>
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" />
5150
</BarChart>
5251
);
5352
}

0 commit comments

Comments
 (0)