Skip to content

Commit

Permalink
🔨 remove duplicate type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Jan 13, 2025
1 parent ab58bec commit 03ad582
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions packages/@ourworldindata/grapher/src/lineLegend/LineLegend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ import { VerticalAxis } from "../axis/Axis"
import {
Color,
EntityName,
InteractionState,
SeriesName,
VerticalAlign,
} from "@ourworldindata/types"
import { BASE_FONT_SIZE, GRAPHER_FONT_SCALE_12 } from "../core/GrapherConstants"
import { ChartSeries } from "../chart/ChartInterface"
import { darkenColorForText } from "../color/ColorUtils"
import { AxisConfig } from "../axis/AxisConfig.js"
import { GRAPHER_BACKGROUND_DEFAULT, GRAY_30 } from "../color/ColorConstants"
Expand All @@ -40,35 +38,7 @@ import {
NON_FOCUSED_TEXT_COLOR,
} from "./LineLegendConstants.js"
import { getSeriesKey } from "./LineLegendHelpers"

export interface LineLabelSeries extends ChartSeries {
label: string
yValue: number
annotation?: string
formattedValue?: string
placeFormattedValueInNewLine?: boolean
yRange?: [number, number]
hover?: InteractionState
focus?: InteractionState
}

interface SizedSeries extends LineLabelSeries {
textWrap: TextWrap | MarkdownTextWrap
textWrapForRendering: TextWrap | MarkdownTextWrap
annotationTextWrap?: TextWrap
width: number
height: number
fontWeight?: number
}

interface PlacedSeries extends SizedSeries {
origBounds: Bounds
bounds: Bounds
repositions: number
level: number
totalLevels: number
midY: number
}
import { LineLabelSeries, PlacedSeries, SizedSeries } from "./LineLegendTypes"

function groupBounds(group: PlacedSeries[]): Bounds {
const first = group[0]
Expand Down

0 comments on commit 03ad582

Please sign in to comment.