import type { AxisId, DatapointMetadata, SeriesId, XYChartAxisInternal } from '../../types/xy-chart-internals.js'; import type { BarDatapoint } from '../../types/xy-chart.js'; export interface GroupingResult { datapointMetadata: DatapointMetadata; } /** * A class that encapsulates grouping operations for series variants. * This class can be instantiated by any series strategy that needs grouping functionality. */ export declare class GroupableSeriesHelper { private static readonly STARTING_POINT; private readonly groupData; private readonly axisStats; readonly axisIdToDimension: Map>; constructor(); /** * Calculate total height of group bin. * Should be called at the beginning of a new grouping calculation cycle (preprocess phase). * * Also records which series contributed to each axisKey so that `getGroupBinDomain` can * fall back to a cross-bin reference for single-series axes. Single-series groups would * otherwise collapse to 100% in every bin. */ processGroupDomain(datapoint: BarDatapoint, chartOrientation: 'vertical' | 'horizontal', xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, seriesId: SeriesId): void; /** * Returns the total bin domain for a given group key. * * For axes with more than one contributing series the result is the per-bin total height * of the group (|positive| + |negative|). For axes with only one contributing series the * result collapses to a cross-bin reference: the largest per-bin absolute total across all * bins of that axis. This keeps single-series groups consistent with the regular relative * behavior, where the tallest bar represents 100% and the rest scale proportionally. */ getGroupBinDomain(groupKey: string): number | undefined; private getOrInitAxisStats; /** * Processes a datapoint for grouping, calculating the bin domain metadata. * Also registers the series in the dimension map for the primary axis. * Returns metadata with binDomain set but no accumulator (bars remain side-by-side). */ processGroupDatapoint(datapoint: BarDatapoint, chartOrientation: 'vertical' | 'horizontal', xAxis: XYChartAxisInternal, yAxis: XYChartAxisInternal, seriesId: string, datapointMetadata: DatapointMetadata): GroupingResult; } //# sourceMappingURL=groupable-series.d.ts.map