diff --git a/packages/@ourworldindata/grapher/src/axis/AxisViews.tsx b/packages/@ourworldindata/grapher/src/axis/AxisViews.tsx index d451df09bd2..42c68ffd089 100644 --- a/packages/@ourworldindata/grapher/src/axis/AxisViews.tsx +++ b/packages/@ourworldindata/grapher/src/axis/AxisViews.tsx @@ -82,10 +82,12 @@ export class HorizontalAxisGridLines extends React.Component<{ render(): JSX.Element { const { horizontalAxis, strokeWidth } = this.props const { bounds } = this + const axis = horizontalAxis.clone() + axis.range = bounds.xRange() return ( - {horizontalAxis.getTickValues().map((t, i) => { + {axis.getTickValues().map((t, i) => { const color = t.faint ? FAINT_TICK_COLOR : t.solid @@ -95,9 +97,9 @@ export class HorizontalAxisGridLines extends React.Component<{ return ( { render(): JSX.Element { const { bounds, horizontalAxis, strokeWidth } = this.props + const axis = horizontalAxis.clone() + axis.range = bounds.xRange() return (