Skip to content

Commit

Permalink
✨ (explorer) add missing data strategy (#3634)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann authored May 23, 2024
1 parent 5a75af7 commit 8b04286
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions explorer/GrapherGrammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
FacetAxisDomain,
FacetStrategy,
GrapherTabOption,
MissingDataStrategy,
StackMode,
} from "@ourworldindata/types"
import { ColorSchemes } from "@ourworldindata/grapher"
Expand Down Expand Up @@ -258,4 +259,11 @@ export const GrapherGrammar: Grammar = {
description:
"Set the 'target time' for the map chart. This is the year that will be shown by default in the map chart.",
},
missingDataStrategy: {
...EnumCellDef,
keyword: "missingDataStrategy",
description:
"Hide or show entities for which one or more variables are missing",
terminalOptions: toTerminalOptions(Object.values(MissingDataStrategy)),
},
} as const
1 change: 1 addition & 0 deletions packages/@ourworldindata/grapher/src/core/Grapher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2980,6 +2980,7 @@ export class Grapher
this.timelineMaxTime = grapher.timelineMaxTime
this.relatedQuestions = grapher.relatedQuestions
this.sourceDesc = grapher.sourceDesc
this.missingDataStrategy = grapher.missingDataStrategy
}

debounceMode = false
Expand Down

0 comments on commit 8b04286

Please sign in to comment.