import { type AxisID, type ChartModuleDefinition, type CloneOptions, type DeepPartial, type LogIssue, Logger, type ModuleScope, type PlainObject } from 'ag-charts-core'; import { type AgChartModule, type AgChartOptions, type AgChartThemeParams } from 'ag-charts-types'; import { ChartTheme } from '../chart/themes/chartTheme'; import { type ChartValidations, type ValidationsRuntime } from '../chart/validation/chartValidations'; import { type OptionsGraphAccessor } from './optionsGraph'; export interface ChartSpecialOverrides { document: Document; window: Window; styleContainer?: HTMLElement; skipCss?: boolean; } export interface ChartInternalOptionMetadata { presetType?: 'price-volume' | 'gauge-preset' | 'sparkline' | 'quadrant'; pool?: boolean; domMode?: 'normal' | 'minimal'; withDragInterpretation?: boolean; /** Modules registered for this chart only, additive over the global registry. */ modules?: AgChartModule[]; } export declare class ChartOptions { static readonly OPTIONS_CLONE_OPTS_SLOW: CloneOptions; static readonly OPTIONS_CLONE_OPTS_FAST: CloneOptions; static readonly JSON_DIFF_OPTS: Set; private static readonly REMOVED; private static readonly perfDebug; private static readonly FAST_PATH_OPTIONS; private static isFastPathDelta; private static containsRemovalSentinel; activeTheme: ChartTheme; processedOptions: T; userOptions: Partial; processedOverrides: Partial; specialOverrides: ChartSpecialOverrides; optionMetadata: ChartInternalOptionMetadata; readonly moduleRegistry: ModuleScope; themeParameters: AgChartThemeParams; annotationThemes: any; googleFonts?: Set; fonts?: Set; fastDelta?: DeepPartial; chartDef?: ChartModuleDefinition; optionsProcessingTime?: number; optionsGraph?: OptionsGraphAccessor; remappedAxisKeys?: Map; seriesWithUserVisibility?: { identifiers: Set; indices: Set; }; userDeltaKeys?: Set; processedCSSVariables?: Record; /** Every issue the Logger reported while this pass ran; the chart starts its validation cycle from them. */ issues: LogIssue[]; /** False when the fast path or the structural cache carried the previous pass's issues forward unvalidated. */ revalidated: boolean; unmappedAxisKeys: Map; logger: Logger; /** The subscriber this pass reported through: the chart's own, or a provisional stand-in. */ validations: ChartValidations; private static readonly debug; constructor(currentUserOptions: T | ChartOptions | undefined, newUserOptions: T, processedOverrides: Partial, specialOverrides: Partial, metadata: ChartInternalOptionMetadata, deltaOptions?: DeepPartial | null, stripSymbols?: boolean, refreshCSSVariables?: boolean, apiStartTime?: number, runtime?: ValidationsRuntime); private findSeriesWithUserVisiblity; private fastSetup; private fastSeriesSetup; private slowSetup; private computeStructuralCacheKeyForSlowSetup; private slowSetupCached; /** * Points these options at the chart that ended up owning them, which is not knowable until the type is * resolved and the pool consulted. `validations` stays the instance that handled the pass, so the chart * can tell what it already reported. */ adopt(runtime: ValidationsRuntime): void; private replay; private get validateParams(); private logValidationErrors; /** * Reports an argument that could not be options at all (`create(undefined)`, `create(3)`) at `error` * severity: unlike a per-option problem, nothing of the caller's intent survives it. Raised after * construction, so it joins this pass's issues by hand. */ recordOptionsArgumentError(message: string): void; private removeIncompatibleSeriesAreaOptions; private validatePluginOptions; private validateSeriesOptions; private validateAxesOptions; private removeAxisInteractionListeners; diffOptions(other?: ChartOptions): Partial; private optionsType; private processSeriesOptions; private validateSizeBounds; /** * Collates axis keys from the axis and series options to determine the full set of axis keys, defaults series to * the primary axes and renames the primary axes to the internal direction-based names. */ private processAxesOptions; /** * These keys are used to map a series to an axis for each direction. They are retrieved per-series to allow a * mixture of flipped and non-flipped series within the same chart. */ private getSeriesDirectionAxisKey; /** * Check if any of the series' axis keys have values that do not match the expected value, i.e. the direction. */ private countNonDefaultSeriesAxisKeys; /** * The primary axes are defined, for each direction, as those first in the `axes` object or referenced by a series. * This is irregardless of the specific key of the axis, e.g. an axis with the key `y` may have the position `top`, * and would therefore be classified as the primary `x` axis. */ private getPrimaryAxisKeys; private getRemappedAxisKeys; /** * Update each series' axis keys to match the name used internally, such as the direction or a constant suffixed by * the index for secondary axes. */ private remapSeriesAxisKeys; /** * Attempt to predict the axes for each direction based on a subset of the data. Each series has its own prediction * algorithm. */ private predictAxes; private cloneDefaultAxes; private predictAxesMissingTypesAndPositions; private predictAxisMissingTypeFromPosition; private predictAxisMissingTypeAndPositionFromSeries; /** * If the first secondary axis in either direction does not have a specified position, it will be placed in the * alternate position to the primary axis (i.e. right or top). */ private alternateSecondaryAxisPositions; private processMiniChartSeriesOptions; private getSeriesGroupingOptions; private setSeriesGroupingOptions; private getSeriesGroupId; private getSeriesGrouping; private soloSeriesIntegrity; private static processFontOptions; private processFonts; private static removeDisabledOptionJson; private removeDisabledOptions; private static removeLeftoverSymbolsJson; private removeLeftoverSymbols; private static processCSSVariablesJSON; private static isExternalColorVar; private static resolveColorVar; private processCSSVariables; processCSSVariablesPartial(partialOptions: PlainObject | undefined, container: HTMLElement | null | undefined): Record | undefined; private specialOverridesDefaults; }