Skip to content

Commit

Permalink
style: use existing type ChartTableTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber committed Oct 17, 2023
1 parent e074163 commit e7be0b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/@ourworldindata/grapher/src/core/Grapher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ import {
import classnames from "classnames"
import { GrapherAnalytics } from "./GrapherAnalytics"
import { legacyToCurrentGrapherQueryParams } from "./GrapherUrlMigrations"
import { ChartInterface } from "../chart/ChartInterface"
import { ChartInterface, ChartTableTransformer } from "../chart/ChartInterface"
import { MarimekkoChartManager } from "../stackedCharts/MarimekkoChartConstants"
import { AxisConfigInterface } from "../axis/AxisConfigInterface"
import Bugsnag from "@bugsnag/js"
Expand Down Expand Up @@ -811,7 +811,7 @@ export class Grapher

@action.bound
async downloadLegacyDataFromOwidVariableIds(
inputTableTransformer?: (table: OwidTable) => OwidTable
inputTableTransformer?: ChartTableTransformer
): Promise<void> {
if (this.variableIds.length === 0)
// No data to download
Expand Down Expand Up @@ -858,7 +858,7 @@ export class Grapher
@action.bound private _setInputTable(
json: MultipleOwidVariableDataDimensionsMap,
legacyConfig: Partial<LegacyGrapherInterface>,
inputTableTransformer?: (table: OwidTable) => OwidTable
inputTableTransformer?: ChartTableTransformer
): void {
// TODO grapher model: switch this to downloading multiple data and metadata files
const { dimensions, table } = legacyToOwidTableAndDimensions(
Expand All @@ -884,7 +884,7 @@ export class Grapher
}

@action rebuildInputOwidTable(
inputTableTransformer?: (table: OwidTable) => OwidTable
inputTableTransformer?: ChartTableTransformer
): void {
// TODO grapher model: switch this to downloading multiple data and metadata files
if (!this.legacyVariableDataJson) return
Expand All @@ -900,7 +900,7 @@ export class Grapher

@action.bound private _receiveOwidDataAndApplySelection(
json: MultipleOwidVariableDataDimensionsMap,
inputTableTransformer?: (table: OwidTable) => OwidTable
inputTableTransformer?: ChartTableTransformer
): void {
this.legacyVariableDataJson = json

Expand Down

0 comments on commit e7be0b5

Please sign in to comment.