import { AbstractHistogram } from '../AbstractHistogram.js'; import { SelectionType } from '../HistogramParams.js'; import { Brush } from '../brushes/brush.js'; import { ChartAxes, HistogramData, HistogramSVGClipPath, HistogramSVGG, HistogramSVGRect, SelectedInputValues, SelectedOutputValues } from '../utils/HistogramUtils.js'; export declare abstract class AbstractChart extends AbstractHistogram { protected chartAxes: ChartAxes; protected yStartsFromMin: boolean; protected START_Y_FROM_MIN_STRIPES_PATTERN: string; protected START_Y_FROM_MIN_STRIPES_SIZE: number; protected NO_DATA_STRIPES_PATTERN: string; protected NO_DATA_STRIPES_SIZE: number; brush: Brush; protected clipPathContext: HistogramSVGClipPath; protected currentClipPathContext: HistogramSVGClipPath; protected rectangleCurrentClipper: HistogramSVGRect; protected selectedIntervals: Map; /** Maximum number of buckets that a chart can have */ private MAX_BUCKET_NUMBER; plot(inputData: Array): void; /** * - Shows a tooltip on hover of a dataBucket. * - Emits a hoveredBucketEvent on hover of one of the allBuckets. * @param dataBuckets Buckets provided by data that are plot on the histogram. * @param allBuckets Buckets composed of data buckets and buckets beyond the data domain (that include the selection range). * @param chartIsToSides (Optional) Sides of the y axis in case of multi-charts representation. */ protected handleBucketsInteractions(dataBuckets: HistogramData[], allBuckets: HistogramData[], chartIsToSides?: Map): void; private onHoverBucket; private onLeaveBucket; /** * This method is called whenever the brush is being moved. It sets the positions the brush's left and right corner tooltips. */ protected setBrushCornerTooltipsPositions(): void; protected setVerticalTooltipsWidth(): void; protected setBrushVerticalTooltipsXPositions(leftPosition: number, rightPosition: number): void; protected setBrushVerticalTooltipsYPositions(): void; protected setBrushHorizontalTooltipsXPositions(leftPosition: number, rightPosition: number): void; protected setBrushHorizontalTooltipsYPositions(): void; setSelectedInterval(selectedInputValues: SelectedInputValues): void; removeSelectInterval(id: string): void; resize(histogramContainer: HTMLElement): void; redrawSelectedIntervals(): void; protected updateSelectionStyle(id: string): void; protected onSelectionDoubleClick(axes: ChartAxes): void; protected resizeSelectedIntervals(chartAxes: ChartAxes): void; protected moveDataByHalfInterval(data: Array): Array; protected customizeData(data: Array): void; protected initializeChartDimensions(): void; protected createChartXAxes(data: Array): void; protected createChartAxes(data: Array): void; protected drawYAxis(chartAxes: ChartAxes, chartIdsToSide?: Map, chartId?: string): void; /** * Draws a indicator behind the hovered bucket of the histogram. This has as objective to highlight it on the histogram * @param data * @param axes */ protected drawTooltipCursor(data: Array, axes: ChartAxes, chartIsToSides?: Map): void; protected setTooltipPositions(data: Array, event: MouseEvent, chartIsToSides?: Map): void; protected getIntervalMiddlePositon(chartAxes: ChartAxes, startvalue: number, endvalue: number): number; protected getSelectedBars(startvalue: number, endvalue: number): Array; protected addStrippedPattern(id: string, pattern: string, size: number, cssClass: string): void; protected applyFormatOnXticks(data: Array): void; protected setDataInterval(data: Array): void; protected getDataInterval(data: Array): number; protected getAxes(): ChartAxes; protected addSelectionBrush(selectionType: SelectionType, chartAxes: ChartAxes, leftOffset: number): void; protected applyStyleOnSelectedBars(barsContext: HistogramSVGG): void; protected getAppendedRectangle(start: Date | number, end: Date | number): HistogramSVGRect; protected applyStyleOnClipper(): void; /** * When the selection is wider than the range of the data, adds "fake" buckets, for the x axis to be fully drawn * @param data Data to plot * @returns Extended data to fit the selection */ protected extendData(data: Array): Array; protected abstract plotChart(data: Array): void; protected abstract applyStyleOnSelection(): void; protected abstract getStartPosition(data: Array, index: number): number; protected abstract getEndPosition(data: Array, index: number): number; protected abstract setTooltipXposition(xPosition: number): number; protected abstract setTooltipYposition(yPosition: number): number; private handleOnBrushingEvent; private handleEndOfBrushingEvent; private checkSelectedValuesValidity; protected checkDomainInitialized(): boolean; }