From 39713b3309df904b942ff7cf1b73040ce8a5a156 Mon Sep 17 00:00:00 2001 From: soyricardodev Date: Sun, 2 Jun 2024 23:17:41 -0400 Subject: [PATCH] Fix NaN warning in BarChart.tsx by setting default height --- src/components/chart-elements/BarChart/BarChart.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/chart-elements/BarChart/BarChart.tsx b/src/components/chart-elements/BarChart/BarChart.tsx index c87df34bd..72ef0b401 100644 --- a/src/components/chart-elements/BarChart/BarChart.tsx +++ b/src/components/chart-elements/BarChart/BarChart.tsx @@ -207,7 +207,7 @@ const BarChart = React.forwardRef((props, ref) => axisLine={false} angle={rotateLabelX?.angle} dy={rotateLabelX?.verticalShift} - height={rotateLabelX?.xAxisHeight} + height={rotateLabelX?.xAxisHeight ?? 0} minTickGap={tickGap} > {xAxisLabel && ( @@ -243,7 +243,7 @@ const BarChart = React.forwardRef((props, ref) => allowDecimals={allowDecimals} angle={rotateLabelX?.angle} dy={rotateLabelX?.verticalShift} - height={rotateLabelX?.xAxisHeight} + height={rotateLabelX?.xAxisHeight ?? 0} > {xAxisLabel && (