From 1a5dbd61f2499987e142a539fc47ec9d5a9a0a8d Mon Sep 17 00:00:00 2001 From: Sophia Mersmann Date: Mon, 13 Jan 2025 15:25:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20remove=20duplicate=20type=20defi?= =?UTF-8?q?nitions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../grapher/src/lineLegend/LineLegend.tsx | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.tsx b/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.tsx index a7686cfde0..fb06cefd9f 100644 --- a/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.tsx +++ b/packages/@ourworldindata/grapher/src/lineLegend/LineLegend.tsx @@ -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" @@ -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]