From e1b44632ed4cae2631ec4f81b921dd0f2802186e Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Wed, 13 Nov 2024 20:41:57 +0100 Subject: [PATCH] fix: re-enable extended tooltip hover area --- packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx | 2 +- .../grapher/src/stackedCharts/StackedAreaChart.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx b/packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx index 7687af7fda8..48e585aaa10 100644 --- a/packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx +++ b/packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx @@ -941,7 +941,7 @@ export class LineChart {/* The tiny bit of extra space in the clippath is to ensure circles centered on the very edge are still fully visible */} {this.clipPath.element} - + {/* This ensures that the parent is big enough such that we get mouse hover events for the whole charting area, including the axis, the entity labels, and the whitespace next to them. diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.tsx b/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.tsx index 9d6ad54858c..64ce17958fb 100644 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.tsx +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedAreaChart.tsx @@ -634,7 +634,7 @@ export class StackedAreaChart onTouchMove={this.onCursorMove} > {clipPath.element} - + {/* This ensures that the parent is big enough such that we get mouse hover events for the whole charting area, including the axis, the entity labels, and the whitespace next to them. We need these to be able to show the tooltip for the first/last year even if the mouse is outside the charting area. */}