Skip to content

Commit

Permalink
🎉 enable line/slope chart switching in explorers
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Nov 22, 2024
1 parent e5d62b4 commit b520954
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@ourworldindata/explorer/src/GrapherGrammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ColorSchemeName,
FacetAxisDomain,
FacetStrategy,
GRAPHER_CHART_TYPES,
GRAPHER_TAB_OPTIONS,
MissingDataStrategy,
StackMode,
Expand Down Expand Up @@ -66,10 +67,11 @@ export const GrapherGrammar: Grammar<GrapherCellDef> = {
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: {
Expand Down

0 comments on commit b520954

Please sign in to comment.