import type { IntlShape } from 'react-intl'; import type { XYChartSelectionRectangleMetadata } from '../../hooks/useSortRectangleDatapoints.js'; import type { AnyDatapoint, DatapointMetadata, XYChartAxisInternal, XYChartSeriesWithDatapoints, XYChartVariantsInternal } from '../../types/xy-chart-internals.js'; import type { XYChartSelectionLinearMetadata } from '../../types/xy-chart-selection.js'; import type { XYChartColorPalette, XYChartData } from '../../types/xy-chart.js'; import type { ControlFlowCommand, MutableProcessingContext, SeriesConstructor, SeriesProcessingStrategy } from '../types/processing-types.js'; export declare abstract class SeriesBaseStrategy implements SeriesProcessingStrategy { protected readonly addValue: (point: T) => void; constructor(initializer: SeriesConstructor); abstract canHandle(seriesProps: XYChartVariantsInternal): boolean; preprocess(data: XYChartData[], seriesProps: XYChartVariantsInternal, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, context: MutableProcessingContext): ControlFlowCommand; process(datum: XYChartData, seriesProps: XYChartVariantsInternal, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, context: MutableProcessingContext): ControlFlowCommand; protected preprocessImpl(_data: XYChartData[], _seriesProps: XYChartVariantsInternal, _xAxis: XYChartAxisInternal, _yAxis: XYChartAxisInternal, _context: MutableProcessingContext): ControlFlowCommand; protected abstract processImpl(datum: XYChartData, seriesProps: XYChartVariantsInternal, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, datapoint: AnyDatapoint, context: MutableProcessingContext): ControlFlowCommand; /** * Gets the series ID for this datum. Override in subclasses for custom ID logic. */ protected abstract getSeriesId(datum: XYChartData, seriesProps: XYChartVariantsInternal): string; /** * Gets or creates the series index, adding to seriesIndexes if new. */ protected getOrCreateSeriesIndex(seriesId: string, seriesIndexes: string[]): number; /** * Creates a new series object. Override in subclasses for custom series structure. */ protected createSeries(seriesId: string, seriesProps: XYChartVariantsInternal, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal): { id: string; type: "area" | "bar" | "dot" | "flame" | "line" | "rect"; data: never[]; xAxisId: string; yAxisId: string; }; /** * Registers a new series in the context maps. */ protected registerSeries(currentSeries: XYChartSeriesWithDatapoints, seriesId: string, context: MutableProcessingContext): void; /** * Registers a datapoint to the series and updates metadata and domains. */ protected registerDatapoint(datapoint: D, datapointMetadata: DatapointMetadata, currentSeries: Y, context: MutableProcessingContext): void; /** * Creates series metadata. Override in subclasses for custom metadata. */ protected abstract createSeriesMetadata(datum: XYChartData, seriesProps: XYChartVariantsInternal, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, seriesId: string, context: MutableProcessingContext): Record; /** * Calculates and sets the axis domains. */ protected updateAxisDomains(calcPoint: AnyDatapoint, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, axisIdToScaleDomain: MutableProcessingContext['axisIdToScaleDomain'], isSeriesVisible: boolean): void; /** * Gets the calculation point for domain updates. Override for custom logic (e.g., time centering). */ protected getCalculationPoint(datapoint: AnyDatapoint, _xAxis: XYChartAxisInternal, _yAxis: XYChartAxisInternal): { x0?: unknown; y0?: unknown; x1?: unknown; y1?: unknown; }; getSeriesName(intl: IntlShape, seriesIndex: number, seriesNameFallback: string | undefined, namingWithAccessor?: { seriesNameAccessor?: string; datum: XYChartData; }): string | string[]; abstract getColor(...args: any[]): { color: { Default: string; }; colorPalette: XYChartColorPalette; colorIsFromSlot: boolean; } | { colorPalette: XYChartColorPalette; colorIsFromSlot: boolean; }; abstract getDatapoint(datum: XYChartData, seriesProps: XYChartVariantsInternal, xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal): AnyDatapoint | undefined; } //# sourceMappingURL=base-series.d.ts.map