Skip to content

Commit 574f37d

Browse files
[charts] Fix key generation for the ChartsGrid (@alexfauquette) (#15864)
Co-authored-by: Alexandre Fauquette <[email protected]>
1 parent 3009085 commit 574f37d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: packages/x-charts/src/ChartsGrid/ChartsHorizontalGrid.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export function ChartsGridHorizontal(props: ChartsGridHorizontalProps) {
2323

2424
return (
2525
<React.Fragment>
26-
{yTicks.map(({ formattedValue, offset }) => (
26+
{yTicks.map(({ value, offset }) => (
2727
<GridLine
28-
key={`horizontal-${formattedValue}`}
28+
key={`horizontal-${value}`}
2929
y1={offset}
3030
y2={offset}
3131
x1={drawingArea.left}

Diff for: packages/x-charts/src/ChartsGrid/ChartsVerticalGrid.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export function ChartsGridVertical(props: ChartsGridVerticalProps) {
2323

2424
return (
2525
<React.Fragment>
26-
{xTicks.map(({ formattedValue, offset }) => (
26+
{xTicks.map(({ value, offset }) => (
2727
<GridLine
28-
key={`vertical-${formattedValue}`}
28+
key={`vertical-${value}`}
2929
y1={drawingArea.top}
3030
y2={drawingArea.top + drawingArea.height}
3131
x1={offset}

0 commit comments

Comments
 (0)