diff --git a/src/components/chart-elements/AreaChart/AreaChart.tsx b/src/components/chart-elements/AreaChart/AreaChart.tsx index 6188c6992..15a9b038d 100644 --- a/src/components/chart-elements/AreaChart/AreaChart.tsx +++ b/src/components/chart-elements/AreaChart/AreaChart.tsx @@ -77,6 +77,7 @@ const AreaChart = React.forwardRef((props, ref) enableLegendSlider = false, customTooltip, rotateLabelX, + tickGap = 5, ...other } = props; const CustomTooltip = customTooltip; @@ -182,7 +183,7 @@ const AreaChart = React.forwardRef((props, ref) interval={startEndOnly ? "preserveStartEnd" : intervalType} tickLine={false} axisLine={false} - minTickGap={5} + minTickGap={tickGap} angle={rotateLabelX?.angle} dy={rotateLabelX?.verticalShift} height={rotateLabelX?.xAxisHeight} diff --git a/src/components/chart-elements/BarChart/BarChart.tsx b/src/components/chart-elements/BarChart/BarChart.tsx index 3cc32b828..661ad2f13 100644 --- a/src/components/chart-elements/BarChart/BarChart.tsx +++ b/src/components/chart-elements/BarChart/BarChart.tsx @@ -88,10 +88,11 @@ const BarChart = React.forwardRef((props, ref) => allowDecimals = true, noDataText, onValueChange, + enableLegendSlider = false, customTooltip, rotateLabelX, + tickGap = 5, className, - enableLegendSlider = false, ...other } = props; const CustomTooltip = customTooltip; @@ -195,6 +196,7 @@ const BarChart = React.forwardRef((props, ref) => angle={rotateLabelX?.angle} dy={rotateLabelX?.verticalShift} height={rotateLabelX?.xAxisHeight} + minTickGap={tickGap} /> ) : ( ((props, ref) => tickLine={false} axisLine={false} tickFormatter={valueFormatter} - minTickGap={5} + minTickGap={tickGap} allowDecimals={allowDecimals} angle={rotateLabelX?.angle} dy={rotateLabelX?.verticalShift} diff --git a/src/components/chart-elements/LineChart/LineChart.tsx b/src/components/chart-elements/LineChart/LineChart.tsx index eaecdacb9..90b707a50 100644 --- a/src/components/chart-elements/LineChart/LineChart.tsx +++ b/src/components/chart-elements/LineChart/LineChart.tsx @@ -72,6 +72,7 @@ const LineChart = React.forwardRef((props, ref) enableLegendSlider = false, customTooltip, rotateLabelX, + tickGap = 5, ...other } = props; const CustomTooltip = customTooltip; @@ -178,7 +179,7 @@ const LineChart = React.forwardRef((props, ref) )} tickLine={false} axisLine={false} - minTickGap={5} + minTickGap={tickGap} angle={rotateLabelX?.angle} dy={rotateLabelX?.verticalShift} height={rotateLabelX?.xAxisHeight} diff --git a/src/components/chart-elements/ScatterChart/ScatterChart.tsx b/src/components/chart-elements/ScatterChart/ScatterChart.tsx index 8b1569edc..61ea11195 100644 --- a/src/components/chart-elements/ScatterChart/ScatterChart.tsx +++ b/src/components/chart-elements/ScatterChart/ScatterChart.tsx @@ -79,6 +79,7 @@ export interface ScatterChartProps verticalShift: number; xAxisHeight: number; }; + tickGap?: number; } const renderShape = (props: any, activeNode: any | undefined, activeLegend: string | undefined) => { @@ -138,6 +139,7 @@ const ScatterChart = React.forwardRef((props, rotateLabelX, className, enableLegendSlider = false, + tickGap = 5, ...other } = props; const CustomTooltip = customTooltip; @@ -238,7 +240,7 @@ const ScatterChart = React.forwardRef((props, tickLine={false} tickFormatter={valueFormatter.x} axisLine={false} - minTickGap={5} + minTickGap={tickGap} domain={xAxisDomain as AxisDomain} allowDataOverflow={true} angle={rotateLabelX?.angle} diff --git a/src/components/chart-elements/common/BaseChartProps.tsx b/src/components/chart-elements/common/BaseChartProps.tsx index 63bb632fb..b139a45ef 100644 --- a/src/components/chart-elements/common/BaseChartProps.tsx +++ b/src/components/chart-elements/common/BaseChartProps.tsx @@ -40,6 +40,7 @@ interface BaseChartProps extends BaseAnimationTimingProps, React.HTMLAttributes< verticalShift?: number; xAxisHeight?: number; }; + tickGap?: number; } export default BaseChartProps;