diff --git a/src/components/chart-elements/AreaChart/AreaChart.tsx b/src/components/chart-elements/AreaChart/AreaChart.tsx index 18c721edc..6188c6992 100644 --- a/src/components/chart-elements/AreaChart/AreaChart.tsx +++ b/src/components/chart-elements/AreaChart/AreaChart.tsx @@ -80,6 +80,7 @@ const AreaChart = React.forwardRef((props, ref) ...other } = props; const CustomTooltip = customTooltip; + const paddingValue = (!showXAxis && !showYAxis) || (startEndOnly && !showYAxis) ? 0 : 20; const [legendHeight, setLegendHeight] = useState(60); const [activeDot, setActiveDot] = useState(undefined); const [activeLegend, setActiveLegend] = useState(undefined); @@ -147,7 +148,6 @@ const AreaChart = React.forwardRef((props, ref) } : undefined } - margin={{ left: 20, right: 20 }} > {showGridLines ? ( ((props, ref) /> ) : null} ((props, ref) => ...other } = props; const CustomTooltip = customTooltip; + const paddingValue = !showXAxis && !showYAxis ? 0 : 20; const [legendHeight, setLegendHeight] = useState(60); const categoryColors = constructCategoryColors(categories, colors); const [activeBar, setActiveBar] = React.useState(undefined); @@ -141,7 +142,6 @@ const BarChart = React.forwardRef((props, ref) => } : undefined } - margin={{ left: 20, right: 20 }} > {showGridLines ? ( ((props, ref) => {layout !== "vertical" ? ( ((props, ref) ...other } = props; const CustomTooltip = customTooltip; + const paddingValue = !showXAxis && !showYAxis ? 0 : 20; const [legendHeight, setLegendHeight] = useState(60); const [activeDot, setActiveDot] = useState(undefined); const [activeLegend, setActiveLegend] = useState(undefined); @@ -143,7 +144,6 @@ const LineChart = React.forwardRef((props, ref) } : undefined } - margin={{ left: 20, right: 20 }} > {showGridLines ? ( ((props, ref) /> ) : null}