From 5a39f7f6a4f25b2964f92249af0db776a56f771a Mon Sep 17 00:00:00 2001 From: Jose C Quintas Jr Date: Wed, 24 Apr 2024 15:54:47 +0200 Subject: [PATCH] [charts] Fix left/bottomAxis not picking up default axis id (#12894) --- packages/x-charts/src/ChartsAxis/ChartsAxis.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx b/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx index 07d1357c992a0..0b6e7ce9c3e9a 100644 --- a/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx +++ b/packages/x-charts/src/ChartsAxis/ChartsAxis.tsx @@ -91,8 +91,8 @@ function ChartsAxis(props: ChartsAxisProps) { // TODO: use for plotting line without ticks or any thing // const drawingArea = React.useContext(DrawingContext); - const leftId = getAxisId(leftAxis === undefined ? yAxisIds[0] : leftAxis); - const bottomId = getAxisId(bottomAxis === undefined ? xAxisIds[0] : bottomAxis); + const leftId = getAxisId(leftAxis === undefined ? yAxisIds[0] : leftAxis, yAxisIds[0]); + const bottomId = getAxisId(bottomAxis === undefined ? xAxisIds[0] : bottomAxis, xAxisIds[0]); const topId = getAxisId(topAxis, xAxisIds[0]); const rightId = getAxisId(rightAxis, yAxisIds[0]);