From b5209549f2b1276d60d8f5fb7bbf9c480cf37ac2 Mon Sep 17 00:00:00 2001 From: sophiamersmann Date: Fri, 22 Nov 2024 16:58:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20enable=20line/slope=20chart=20sw?= =?UTF-8?q?itching=20in=20explorers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@ourworldindata/explorer/src/GrapherGrammar.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@ourworldindata/explorer/src/GrapherGrammar.ts b/packages/@ourworldindata/explorer/src/GrapherGrammar.ts index 78d6a82344a..9c12109ffd0 100644 --- a/packages/@ourworldindata/explorer/src/GrapherGrammar.ts +++ b/packages/@ourworldindata/explorer/src/GrapherGrammar.ts @@ -3,6 +3,7 @@ import { ColorSchemeName, FacetAxisDomain, FacetStrategy, + GRAPHER_CHART_TYPES, GRAPHER_TAB_OPTIONS, MissingDataStrategy, StackMode, @@ -66,10 +67,11 @@ export const GrapherGrammar: Grammar = { description: `The type of chart to show such as LineChart or ScatterPlot. If set to None, then the chart tab is hidden.`, terminalOptions: toTerminalOptions([ ...ALL_GRAPHER_CHART_TYPES, + `${GRAPHER_CHART_TYPES.LineChart} ${GRAPHER_CHART_TYPES.SlopeChart}`, "None", ]), toGrapherObject: (value) => ({ - chartTypes: value === "None" ? [] : [value], + chartTypes: value === "None" ? [] : value.split(" "), }), }, grapherId: {