Skip to content

Commit

Permalink
🐛 (admin) only evaluate chart series names once Grapher is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Dec 17, 2024
1 parent b2c21dc commit b3eda9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/@ourworldindata/core-table/src/CoreTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,7 @@ export class CoreTable<
): this {
const newStore: CoreColumnStore = { ...this.columnStore }
columnSlugs.forEach((slug) => {
console.log(slug, newStore[slug])

Check warning on line 1145 in packages/@ourworldindata/core-table/src/CoreTable.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement

Check warning on line 1145 in packages/@ourworldindata/core-table/src/CoreTable.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement

Check warning on line 1145 in packages/@ourworldindata/core-table/src/CoreTable.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
newStore[slug] = newStore[slug].map(replaceFn)
})
return this.transform(
Expand Down
2 changes: 2 additions & 0 deletions packages/@ourworldindata/grapher/src/core/Grapher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ export class Grapher
}

@computed get chartSeriesNames(): SeriesName[] {
if (!this.isReady) return []

// collect series names from all chart instances when faceted
if (this.isFaceted) {
const facetChartInstance = new FacetChart({ manager: this })
Expand Down

0 comments on commit b3eda9e

Please sign in to comment.