diff --git a/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.tsx b/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.tsx index 3f79cc7bdec..8fbd5992b73 100644 --- a/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.tsx +++ b/packages/@ourworldindata/grapher/src/barCharts/DiscreteBarChart.tsx @@ -507,8 +507,8 @@ export class DiscreteBarChart const { manager, boundsWithoutColorLegend, yAxis, innerBounds } = this const axisLineWidth = manager.isStaticAndSmall - ? GRAPHER_AXIS_LINE_WIDTH_THICK - : GRAPHER_AXIS_LINE_WIDTH_DEFAULT + ? 0.5 * GRAPHER_AXIS_LINE_WIDTH_THICK + : 0.5 * GRAPHER_AXIS_LINE_WIDTH_DEFAULT return ( <> @@ -537,6 +537,14 @@ export class DiscreteBarChart horizontalAxis={yAxis} bounds={innerBounds} strokeWidth={axisLineWidth} + // if the chart doesn't have negative values, then we + // move the zero line a little to the left to avoid + // overlap with the bars + align={ + this.hasNegative + ? HorizontalAlign.center + : HorizontalAlign.right + } /> )} {this.renderBars()} diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.tsx b/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.tsx index b298d2ae160..63317a0eae4 100644 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.tsx +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedDiscreteBarChart.tsx @@ -713,7 +713,7 @@ export class StackedDiscreteBarChart