UNPKG

ag-charts-enterprise

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

47 lines (46 loc) 1.95 kB
import { _ModuleSupport } from 'ag-charts-community'; import { BaseProperties, type DynamicContext, EventEmitter, PropertiesArray } from 'ag-charts-core'; import { ToolbarButtonProperties } from '../toolbar/buttonProperties'; import { AnnotationType } from './annotationTypes'; interface EventMap { 'cancel-create-annotation': null; 'pressed-create-annotation': { annotation: AnnotationType; }; 'pressed-clear': null; 'pressed-show-menu': null; 'pressed-unrelated': null; } type AnnotationsToolbarButtonValue = 'line-menu' | 'fibonacci-menu' | 'text-menu' | 'shape-menu' | 'measurer-menu' | 'line' | 'horizontal-line' | 'vertical-line' | 'parallel-channel' | 'disjoint-channel' | 'fibonacci-retracement' | 'fibonacci-retracement-trend-based' | 'text' | 'comment' | 'callout' | 'note' | 'clear'; declare class AnnotationsToolbarButtonProperties extends ToolbarButtonProperties { value: AnnotationsToolbarButtonValue; } export declare class AnnotationsToolbar extends BaseProperties { private readonly ctx; enabled?: boolean; /** * The padding between the toolbar and the chart area. */ padding: number; buttons: PropertiesArray<AnnotationsToolbarButtonProperties>; readonly events: EventEmitter<EventMap>; private readonly toolbar; private readonly annotationMenu; private readonly cleanup; private readonly menuMargin; constructor(ctx: DynamicContext<_ModuleSupport.ChartRegistry>); destroy(): void; toggleClearButtonEnabled(enabled: boolean): void; resetButtonIcons(): void; hideOverlays(): void; clearActiveButton(): void; private onLayoutStart; refreshButtonsEnabled(enabled: boolean): void; private onToolbarButtonPress; private onToolbarButtonPressShowMenu; private onButtonPressMenuCreateAnnotation; private onButtonPressCreateAnnotation; private onKeyDown; private updateButtonByIndex; } export {};