import type { IGenericAnimation } from "../../Core/Animations/GenericAnimation"; import { NumberRange } from "../../Core/NumberRange"; import type { Point } from "../../Core/Point"; import { EChart2DModifierType } from "../../types/ChartModifierType"; import type { ICustomResizableAnnotationOptions } from "../Visuals/Annotations/OverviewCustomResizableAnnotation"; import { OverviewCustomResizableAnnotation } from "../Visuals/Annotations/OverviewCustomResizableAnnotation"; import type { IChartModifierBaseOptions } from "./ChartModifierBase2D"; import { ChartModifierBase2D } from "./ChartModifierBase2D"; import type { ModifierMouseArgs } from "./ModifierMouseArgs"; import { EActionType } from "./MouseWheelZoomModifier"; /** * Optional parameters used to configure a {@link OverviewRangeSelectionModifier} at construct time */ export interface IRangeSelectionModifierOptions extends IChartModifierBaseOptions { xAxisId?: string; yAxisId?: string; onSelectedAreaChanged?: (area?: NumberRange) => void; } /** * The OverviewRangeSelectionModifier provides drag-rectangle to zoom behavior on a 2D {@link SciChartSurface} * within SciChart - High Performance {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts} * @remarks * * To apply the OverviewRangeSelectionModifier to a {@link SciChartSurface} and add drag to zoom behavior, * use the following code: * * ```ts * const sciChartSurface: SciChartSurface; * sciChartSurface.chartModifiers.add(new OverviewRangeSelectionModifier()); * ``` */ export declare class OverviewRangeSelectionModifier extends ChartModifierBase2D { readonly type = EChart2DModifierType.OverviewRangeSelection; onSelectedAreaChanged: (area?: NumberRange) => void; overviewPositionAnimation: IGenericAnimation | undefined; animationDuration: number; animate: boolean; protected pointTo: Point | undefined; protected isClicked: boolean; protected rangeSelectionAnnotationProperty: OverviewCustomResizableAnnotation | undefined; protected annotationBeforeSelectedAreaProperty: OverviewCustomResizableAnnotation | undefined; protected annotationAfterSelectedAreaProperty: OverviewCustomResizableAnnotation | undefined; private selectedAreaProperty; /** * Creates an instance of a OverviewRangeSelectionModifier * @param options Optional parameters used to configure the modifier */ constructor(options?: IRangeSelectionModifierOptions); /** * @inheritDoc */ onAttach(): void; /** * @inheritDoc */ modifierMouseDown(args: ModifierMouseArgs): void; /** * @inheritDoc */ modifierMouseUp(args: ModifierMouseArgs): void; /** * Animates (or immediately moves, when {@link animate} is false) the selection annotation from * initialCoordinatesRange to finalCoordinatesRange, keeping the before/after unselected annotations * and {@link onSelectedAreaChanged} in sync. */ private updateAnnotationPosition; /** * @inheritDoc * Pans or zooms the selected range when the mouse wheel is used over the overview, depending on {@link actionType}. */ modifierMouseWheel(args: ModifierMouseArgs): void; /** * Defines whether the Mouse Wheel over the overview zooms or pans the selected range. See {@link EActionType} */ actionType: EActionType; /** * Modifies the speed of the mouse-wheel pan/zoom over the overview. For example growFactor = 0.001 means each * mouse-wheel 'click' moves/zooms the selection by 0.1% */ growFactor: number; /** * Gets the annotation used for range selection */ get rangeSelectionAnnotation(): OverviewCustomResizableAnnotation; /** * Gets the svg string for the unselected part of the range */ get unselectedsvgString(): string; /** * Sets the svg string for the unselected part of the range */ set unselectedsvgString(svgString: string); /** * Gets or sets the selected area ranges of the modifier */ get selectedArea(): NumberRange; /** * Gets or sets the selected area ranges of the modifier */ set selectedArea(value: NumberRange); createAnnotation(options: ICustomResizableAnnotationOptions): OverviewCustomResizableAnnotation; protected updateSelectionAnnotation(): void; private setInitialAnnotationCoordinates; } /** Registers {@link OverviewRangeSelectionModifier} for `EChart2DModifierType.OverviewRangeSelection` definitions. */ export declare function registerOverviewRangeSelectionModifier(overWrite?: boolean): void;