import { BaseType, Selection } from 'd3-selection'; import { AbstractHistogram } from '../AbstractHistogram.js'; import { HistogramData, HistogramSVGG, HistogramSVGRect, SwimlaneAxes, SwimlaneData, SwimlaneOptions, SwimlaneRepresentation, SwimlaneStats } from '../utils/HistogramUtils.js'; export declare abstract class AbstractSwimlane extends AbstractHistogram { protected swimlaneAxes: SwimlaneAxes; protected swimlaneIntervalBorders: [number | Date, number | Date]; protected isSwimlaneHeightFixed: boolean; protected swimlaneHasMoreThanTwoBuckets: boolean; protected swimlaneContextList: { name: string; context: HistogramSVGG; }[]; protected verticalTooltipLine: Selection; protected labelsContext: HistogramSVGG; protected swimlaneBarsWeight: number; protected labelsContextList: { name: string; context: Selection; }[]; protected labelsRectContextList: { name: string; context: HistogramSVGRect; }[]; plot(inputData: SwimlaneData): void; buildLegend(stats: SwimlaneStats): void; resize(histogramContainer: HTMLElement): void; truncateLabels(): void; applyStyleOnSwimlanes(): void; protected applyHoverStyleOnSwimlaneLabels(labelRectContext: { name: string; context: HistogramSVGRect; }): void; protected plotSwimlane(data: Map>): void; protected initializeChartDimensions(): void; protected createSwimlaneAxes(data: Map>): void; protected drawChartAxes(swimlaneAxes: SwimlaneAxes): void; protected drawLineSeparators(): void; protected showTooltipsForSwimlane(swimlaneMapData: Map>, swimStats: SwimlaneStats, representation: SwimlaneRepresentation): void; /** * Emits and returns the hovered buckets based on mouse event */ protected onHoverBucket(data: HistogramData[], event: MouseEvent): HistogramData[]; protected setTooltipPosition(hoveredBuckets: HistogramData[], event: MouseEvent, swimlaneStats: SwimlaneStats, representation: SwimlaneRepresentation): void; private onLeaveBucket; protected clearTooltipCursor(): void; protected drawTooltipCursor(position: number): void; /** * returns a color in hex form (#abcdef) * @param bucket the bucket to be colorized * @param swimStats stats of the swimlane used to put `bucket` in the context of all the data * @param representation what information to represent: * - `column`: the bucket value is compared to other values of the same column (vertical lane) * - `global`: the bucket value is compated to all data. * @param colors Either a hex string color or a color name (in English) or a saturation interval. */ protected getBucketColor(bucket: HistogramData, swimOptions: SwimlaneOptions, swimStats: SwimlaneStats, representation: SwimlaneRepresentation, colors: string | [number, number]): string; protected addLabels(swimlanesMapData: Map>): void; protected setSwimlaneDataInterval(swimlaneData: Map>): void; protected setDataInterval(swimlaneData: Map>): void; protected getDataInterval(swimlaneData: Map>): number; protected setSelectedSwimlanes(labelContext: { name: string; context: HistogramSVGG; }): void; protected setSwimlaneMinMaxBorders(swimlaneStats: SwimlaneStats): void; protected getHistogramMinMaxBorders(data: Array): [number | Date, number | Date]; protected getAxes(): SwimlaneAxes; protected abstract plotOneLane(data: Array, indexOfLane: number): void; }