Skip to content

Commit

Permalink
fix: update padding/margin
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Oct 23, 2023
1 parent 246d329 commit dd5c0f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/chart-elements/AreaChart/AreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ const AreaChart = React.forwardRef<HTMLDivElement, AreaChartProps>((props, ref)
}
: undefined
}
margin={{ left: 20, right: 20 }}
>
{showGridLines ? (
<CartesianGrid
Expand All @@ -161,6 +160,7 @@ const AreaChart = React.forwardRef<HTMLDivElement, AreaChartProps>((props, ref)
/>
) : null}
<XAxis
padding={{ left: 20, right: 20 }}
hide={!showXAxis}
dataKey={index}
tick={{ transform: "translate(0, 6)" }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/chart-elements/BarChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
}
: undefined
}
margin={{ left: 20, right: 20 }}
>
{showGridLines ? (
<CartesianGrid
Expand All @@ -158,6 +157,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>

{layout !== "vertical" ? (
<XAxis
padding={{ left: 20, right: 20 }}
hide={!showXAxis}
dataKey={index}
interval={startEndOnly ? "preserveStartEnd" : intervalType}
Expand Down
2 changes: 1 addition & 1 deletion src/components/chart-elements/LineChart/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ const LineChart = React.forwardRef<HTMLDivElement, LineChartProps>((props, ref)
}
: undefined
}
margin={{ left: 20, right: 20 }}
>
{showGridLines ? (
<CartesianGrid
Expand All @@ -158,6 +157,7 @@ const LineChart = React.forwardRef<HTMLDivElement, LineChartProps>((props, ref)
/>
) : null}
<XAxis
padding={{ left: 20, right: 20 }}
hide={!showXAxis}
dataKey={index}
interval={startEndOnly ? "preserveStartEnd" : intervalType}
Expand Down

0 comments on commit dd5c0f3

Please sign in to comment.