import type { CanvasPoint, ChartAnimationPhase, DynamicContext, ModuleInstance, Scene } from 'ag-charts-core'; import { BBox, ChartUpdateType, Debug, TranslatableGroup } from 'ag-charts-core'; import type { AgChartInstance, AgChartOptions, AgCoordinates, AgDataTransaction, AgSelectionItem, AgSelectionItemIds, SeriesType } from 'ag-charts-types'; import type { UpdateOpts } from '../core/eventsHub'; import type { ChartRegistry } from '../module/moduleContext'; import type { ChartOptions } from '../module/optionsModule'; import { Background } from './background/background'; import { ChartAxes } from './chartAxes'; import type { ChartAxis } from './chartAxis'; import type { ChartCaption } from './chartCaption'; import type { ChartEventMap, ChartEventType, ChartListeners, ChartService } from './chartService'; import type { ChartType } from './chartType'; import { DataSet } from './data/dataSet'; import { type SyncStatus } from './interaction/syncManager'; import { type LayoutContext } from './layout/layoutManager'; import { ModulesManager } from './modulesManager'; import { ChartOverlays } from './overlay/chartOverlays'; import type { SeriesArea } from './series-area/seriesArea'; import { type UnknownSeries } from './series/series'; import { SeriesAreaManager } from './series/seriesAreaManager'; import { SeriesLayerManager } from './series/seriesLayerManager'; import type { DatumIndex, ISeries, ISeriesOptions, SeriesNodeDatum } from './series/seriesTypes'; import { type CategoryGroupSeries } from './sharedCategoryGroup'; import { Tooltip, type TooltipContent } from './tooltip/tooltip'; export type TransferableResources = { container?: HTMLElement; styleContainer?: HTMLElement; scene: Scene; }; /** A chart-like owner of series and axes: the chart itself or the navigator's mini chart. */ export interface SeriesAxesHost { series: UnknownSeries[]; axes: ChartAxes; setSeries(series: UnknownSeries[]): void; setAxes(axes: ChartAxes): void; } export type SeriesChangeType = 'no-op' | 'no-change' | 'replaced' | 'data-change' | 'series-grouping-change' | 'series-count-changed' | 'updated'; export declare abstract class Chart implements ModuleInstance, ChartService { static readonly className: string; private static readonly chartsInstances; static getInstance(element: HTMLElement): Chart | undefined; readonly id: string; className?: string; readonly seriesRoot: TranslatableGroup; readonly annotationRoot: TranslatableGroup; readonly selectionRoot: TranslatableGroup; private readonly titleGroup; readonly tooltip: Tooltip; readonly overlays: ChartOverlays; private readonly sharedCategoryGroup; readonly background: Background; get seriesArea(): SeriesArea; getSeriesAreaPadding(): { top: number; right: number; bottom: number; left: number; }; foreground?: Background; protected readonly debug: Debug.DebugLogger; private extraDebugStats; private _container?; get container(): HTMLElement | undefined; private setContainer; data: DataSet; private pendingDataRetain; loading: boolean | undefined; width?: number; height?: number; minWidth?: number; minHeight?: number; overrideDevicePixelRatio?: number; /** NOTE: This is exposed for use by Integrated charts only. */ get canvasElement(): HTMLCanvasElement; private _lastAutoSize?; private _firstAutoSize; private readonly _autoSizeNotify; download(fileName?: string, fileFormat?: string): void; getCanvasDataURL(fileFormat?: string): string; toSVG(): string | undefined; private readonly chartCaptions; get seriesAreaBoundingBox(): BBox; get title(): ChartCaption; get subtitle(): ChartCaption; get footnote(): ChartCaption; context?: unknown; destroyed: boolean; private readonly cleanup; chartAnimationPhase: ChartAnimationPhase; readonly modulesManager: ModulesManager; private servicesRevision; readonly ctx: DynamicContext; protected readonly seriesLayerManager: SeriesLayerManager; protected readonly seriesAreaManager: SeriesAreaManager; private readonly processors; queuedUserOptions: AgChartOptions[]; queuedChartOptions: ChartOptions[]; chartOptions: ChartOptions; private firstApply; /** * Public API for this Chart instance. NOTE: This is initialized after construction by the * wrapping class that implements AgChartInstance. */ publicApi?: AgChartInstance; syncStatus: SyncStatus; getOptions(): import("ag-charts-types").AgCartesianChartOptions | import("ag-charts-types").AgPolarChartOptions | import("ag-charts-types").AgTopologyChartOptions | import("ag-charts-types").AgStandaloneChartOptions; getChartOptions(): ChartOptions; isDataTransactionSupported(): boolean; private getPresetDef; private createDataSet; private resolveDataRetain; constructor(options: ChartOptions, resources?: TransferableResources); protected onZoomChangeComplete(): void; get listeners(): ChartListeners; callListener(event: ChartEventMap[K] & { type: K; }): void; abstract toAgCoordinates(_point: CanvasPoint): AgCoordinates | undefined; private initSeriesAreaDependencies; getModuleContext(): DynamicContext; abstract getChartType(): ChartType; getTooltipContent(series: ISeries, datumIndex: DatumIndex, removeMeDatum: SeriesNodeDatum, purpose: 'aria-label' | 'tooltip'): TooltipContent[]; getSharedHighlightMatch(hoveredSeries: CategoryGroupSeries, hoveredDatumIndex: DatumIndex, series: CategoryGroupSeries): DatumIndex | undefined; protected getCaptionText(): string; protected getAriaLabel(): string; protected getDefaultAriaLabel(): string; private refreshSeriesUserVisibility; getSelection(): Iterable> | undefined; setSelection(items: Iterable): void; clearSelection(): void; resetAnimations(): void; skipAnimations(): void; detachAndClear(): void; private requestRefreshListener?; setRequestRefreshListener(listener: () => void): void; destroy(opts?: { keepTransferableResources: boolean; }): TransferableResources | undefined; private performTeardown; requestFactoryUpdate(cb: (chart: Chart) => Promise | void): void; private clearCallbackCache; private apiUpdate; private _pendingFactoryUpdatesCount; private _performUpdateSkipAnimations; private readonly _performUpdateNotify; private performUpdateType; private runningUpdateType; private currentProcessingUpdateType; private updateShortcutCount; private readonly seriesToUpdate; private readonly updateMutex; private clearCallbackCacheOnUpdate; private updateRequestors; private readonly performUpdateTrigger; update(type?: ChartUpdateType, opts?: UpdateOpts): void; private readonly _performUpdateSplits; private _previousSplit; private updateSplits; private tryPerformUpdate; private performUpdate; private updateDOM; private updateAriaLabels; private checkUpdateShortcut; private checkFirstAutoSize; axes: ChartAxes; createChartAxes(): ChartAxes; series: UnknownSeries[]; setAxes(axes: ChartAxes): void; setSeries(series: UnknownSeries[]): void; protected onAxisChange(newValue: ChartAxis[], oldValue?: ChartAxis[]): void; protected onSeriesChange(newValue: UnknownSeries[], oldValue?: UnknownSeries[]): void; protected destroySeries(allSeries: UnknownSeries[]): void; protected assignSeriesToAxes(): void; protected assignAxesToSeries(): void; private parentResize; /** Applies the sizing options in their declaration order, resizing once per changed value. */ private applySizeOptions; private resize; updateData(): void; private seriesData; private getSeriesData; private _cachedData; processData(): Promise; processDomains(): Promise; /** Applies the minimum axis ranges the series need, before layout. */ protected processRanges(): void; private updateLegends; private setCategoryLegendData; private processLayout; protected abstract performLayout(ctx: LayoutContext): Promise | void; seriesRect?: BBox; protected animationRect?: BBox; protected getDebugColors(): { background?: string; foreground?: string; } | undefined; protected preSeriesUpdate(): void; protected updateSeries(seriesToUpdate: ISeries[]): Promise; private readonly seriesGroupingChanged; waitForUpdate(timeoutMs?: number, failOnTimeout?: boolean): Promise; applyOptions(newChartOptions: ChartOptions): void; private applyInitialState; private maybeResetAnimations; private shouldForceNodeDataRefresh; private shouldClearLegendData; /** Applies options only this chart type consumes, once the series and axes are applied. */ protected applyChartTypeOptions(_newOpts: AgChartOptions, _oldOpts: AgChartOptions & { type?: SeriesType; }): void; private applyModules; private initSeriesDeclarationOrder; protected applySeries(chart: SeriesAxesHost, optSeries: AgChartOptions['series'], oldOptSeries?: AgChartOptions['series']): SeriesChangeType; protected applyAxes(chart: SeriesAxesHost, options: AgChartOptions, chartOptions: ChartOptions, seriesStatus: SeriesChangeType, axesChanged?: boolean): void; private createSeries; private applySeriesOptionModules; /** `options` is the full post-theme options object; `diff` narrows the apply to the keys that changed. */ private applySeriesValues; private createAxes; private applyAxisModules; applyTransaction(transaction: AgDataTransaction): Promise; onSyncActiveClear(): void; private needsViewportSupport; hasViewportSupport(): boolean; hasPgUpPgDownSupport(): boolean; }