import type { Animation } from "../util/Entity"; import type { Time } from "../util/Animation"; import { RoundedRectangle } from "../render/RoundedRectangle"; import { Container, IContainerPrivate, IContainerSettings, IContainerEvents } from "./Container"; import { Button } from "./Button"; export interface IScrollbarSettings extends IContainerSettings { /** * Orientation of the scrollbar. */ orientation: "horizontal" | "vertical"; /** * Start of the selected range, from `0` to `1`: `0` is the left end, or * the top on a vertical scrollbar. * * @default 0 */ start?: number; /** * End of the selected range, from `0` to `1`: `1` is the right end, or * the bottom on a vertical scrollbar. * * @default 1 */ end?: number; /** * Duration in milliseconds of scroll animations, such as after a click on * the scrollbar's background. */ animationDuration?: number; /** * Easing function of scroll animations. * * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/#Easing_functions} for more info */ animationEasing?: (t: Time) => Time; /** * Puts the scrollbar on the opposite side of the chart: a horizontal * scrollbar below the plot area instead of above it, a vertical one on the * left instead of the right. It can be changed at any time. * * Works only for scrollbars set as a chart's `scrollbarX` or `scrollbarY`. * * @default false * @since 5.20.2 */ opposite?: boolean; /** * Where the scrollbar sits relative to the axes on its side: `true` beyond * them (outermost), `false` between them and the plot area. If not set, * the chart decides. It can be changed at any time. * * Like `opposite`, works only for scrollbars set as a chart's `scrollbarX` * or `scrollbarY`. * * @since 5.21.0 */ outsideAxes?: boolean; } export interface IScrollbarPrivate extends IContainerPrivate { /** * @ignore */ isBusy?: boolean; /** * @ignore */ positionTextFunction?: (position: number, isEnd?: boolean) => string; } export interface IScrollbarEvents extends IContainerEvents { /** * The selected range (`start` or `end`) changed. */ rangechanged: { start: number; end: number; grip?: "start" | "end"; }; /** * The pointer was released after pressing a grip or the thumb. */ released: {}; } /** * A control for selecting a range, such as the zoom of a chart's axes: the * grips resize the range, the thumb between them moves it. * * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/} for more info */ export declare class Scrollbar extends Container { _addOrientationClass(): void; _settings: IScrollbarSettings; _privateSettings: IScrollbarPrivate; _events: IScrollbarEvents; static className: string; static classNames: Array; /** * The draggable bar between the grips, which moves the selected range. * Double-clicking it selects the full range. */ thumb: RoundedRectangle; /** * The grip that drags the start of the range. */ startGrip: Button; /** * The grip that drags the end of the range. */ endGrip: Button; protected _thumbBusy: boolean; protected _startDown: boolean; protected _endDown: boolean; protected _thumbDown: boolean; protected _gripDown?: "start" | "end"; protected _makeButton(): Button; protected _makeThumb(): RoundedRectangle; protected _handleAnimation(animation: Animation): void; protected _afterNew(): void; _updateChildren(): void; _changed(): void; protected _released(): void; /** * @ignore */ updateGrips(): void; protected _updateThumb(): void; protected _updateGripsByThumb(): void; } //# sourceMappingURL=Scrollbar.d.ts.map