From 068a503124d6d92571acfeae41afdb736e919488 Mon Sep 17 00:00:00 2001 From: sophiamersmann Date: Tue, 3 Dec 2024 16:26:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20(slope)=20update=20fail=20messag?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx b/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx index b0e019ac372..1fac048d8d9 100644 --- a/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx +++ b/packages/@ourworldindata/grapher/src/slopeCharts/SlopeChart.tsx @@ -777,13 +777,14 @@ export class SlopeChart @computed get failMessage(): string { const message = getDefaultFailMessage(this.manager) if (message) return message - else if (this.startTime === this.endTime) return "Single date selected" + else if (this.startTime === this.endTime) + return "Two time points needed for comparison" return "" } @computed get helpMessage(): string | undefined { - if (this.failMessage === "Single date selected") - return "Please select two dates to display data." + if (this.failMessage === "Two time points needed for compariso") + return "Click or drag the timeline to select two different points in time" return undefined }