ag-charts-community
Advanced tools
Comparing version 9.0.2 to 9.1.0
@@ -13,4 +13,7 @@ import type { AgChartInstance, AgChartOptions, DownloadOptions, ImageDataUrlOptions } from '../options/agChartOptions'; | ||
private static licenseKey?; | ||
private static gridContext; | ||
private static licenseCheck; | ||
static setLicenseKey(licenseKey: string): void; | ||
static setGridContext(gridContext: boolean): void; | ||
static getLicenseDetails(licenseKey: string): {} | undefined; | ||
/** | ||
@@ -51,3 +54,3 @@ * Returns the `AgChartInstance` for a DOM node, if there is one. | ||
} | ||
/** @deprecated use AgCharts instead */ | ||
/** @deprecated v9.0 use AgCharts instead */ | ||
export declare class AgChart { | ||
@@ -54,0 +57,0 @@ private static warnDeprecated; |
import type { ModuleInstance } from '../../module/baseModule'; | ||
import type { AxisContext, ModuleContext, ModuleContextWithParent } from '../../module/moduleContext'; | ||
import { ModuleMap } from '../../module/moduleMap'; | ||
import type { AxisOptionModule } from '../../module/optionModules'; | ||
import type { AxisOptionModule } from '../../module/optionsModule'; | ||
import type { FromToDiff } from '../../motion/fromToMotion'; | ||
@@ -15,2 +15,3 @@ import type { CssColor, FontFamily, FontSize, FontStyle, FontWeight } from '../../options/agChartOptions'; | ||
import { Caption } from '../caption'; | ||
import type { ChartAnimationPhase } from '../chartAnimationPhase'; | ||
import type { ChartAxis, ChartAxisLabel, ChartAxisLabelFlipFlag } from '../chartAxis'; | ||
@@ -92,4 +93,5 @@ import { ChartAxisDirection } from '../chartAxisDirection'; | ||
nice: boolean; | ||
/** Reverse the axis scale domain if `true`. */ | ||
reverse?: boolean; | ||
/** Reverse the axis scale domain. */ | ||
reverse: boolean; | ||
keys: string[]; | ||
dataDomain: { | ||
@@ -99,8 +101,7 @@ domain: D[]; | ||
}; | ||
keys: string[]; | ||
get type(): string; | ||
abstract get direction(): ChartAxisDirection; | ||
boundSeries: ISeries<unknown>[]; | ||
linkedTo?: Axis<any, any>; | ||
includeInvisibleDomains: boolean; | ||
interactionEnabled: boolean; | ||
readonly axisGroup: Group; | ||
@@ -136,3 +137,6 @@ protected lineNode: Line; | ||
private minRect?; | ||
constructor(moduleCtx: ModuleContext, scale: S); | ||
constructor(moduleCtx: ModuleContext, scale: S, options?: { | ||
respondsToZoom: boolean; | ||
}); | ||
resetAnimation(phase: ChartAnimationPhase): void; | ||
private attachCrossLine; | ||
@@ -159,3 +163,2 @@ private detachCrossLine; | ||
protected _titleCaption: Caption; | ||
private setDomain; | ||
private setTickInterval; | ||
@@ -168,5 +171,3 @@ private setTickCount; | ||
*/ | ||
protected _gridLength: number; | ||
set gridLength(value: number); | ||
get gridLength(): number; | ||
gridLength: number; | ||
private fractionDigits; | ||
@@ -181,2 +182,4 @@ /** | ||
seriesAreaPadding: number; | ||
protected onGridLengthChange(value: number, prevValue: number): void; | ||
protected onGridVisibilityChange(): void; | ||
protected createTick(): AxisTick<S>; | ||
@@ -188,3 +191,3 @@ protected createLabel(): ChartAxisLabel; | ||
*/ | ||
update(primaryTickCount?: number): number | undefined; | ||
update(_primaryTickCount?: number, animated?: boolean): number | undefined; | ||
private getAxisLineCoordinates; | ||
@@ -201,2 +204,3 @@ private getTickLineCoordinates; | ||
private updateLayoutState; | ||
setDomain(domain: D[]): void; | ||
updateScale(): void; | ||
@@ -265,3 +269,3 @@ private calculateRotations; | ||
clipGrid(x: number, y: number, width: number, height: number): void; | ||
calculatePadding(min: number, _max: number, reverse: boolean): [number, number]; | ||
calculatePadding(min: number, max: number, reverse: boolean): [number, number]; | ||
protected getTitleFormatterParams(): { | ||
@@ -268,0 +272,0 @@ direction: ChartAxisDirection; |
@@ -10,2 +10,3 @@ import type { AxisContext } from '../../module/moduleContext'; | ||
export declare abstract class CartesianAxis<S extends Scale<D, number, TickInterval<S>> = Scale<any, number, any>, D = any> extends Axis<S, D> { | ||
static is(value: any): value is CartesianAxis<any>; | ||
thickness: number; | ||
@@ -15,3 +16,3 @@ position: AgCartesianAxisPosition; | ||
protected updateDirection(): void; | ||
update(primaryTickCount?: number): number | undefined; | ||
update(primaryTickCount?: number, animated?: boolean): number | undefined; | ||
calculateLayout(primaryTickCount?: number): { | ||
@@ -18,0 +19,0 @@ primaryTickCount: number | undefined; |
@@ -33,9 +33,4 @@ import type { ModuleContext } from '../../module/moduleContext'; | ||
*/ | ||
set gridLength(value: number); | ||
get gridLength(): number; | ||
onGridVisibilityChange(): void; | ||
protected calculateDomain(): void; | ||
normaliseDataDomain(d: any[]): { | ||
domain: any[]; | ||
clipped: boolean; | ||
}; | ||
/** | ||
@@ -42,0 +37,0 @@ * Creates/removes/updates the scene graph nodes that constitute the axis. |
@@ -5,3 +5,2 @@ import type { Scale } from '../../scale/scale'; | ||
import type { TickInterval } from './axisTick'; | ||
export declare const POLAR_AXIS_SHAPE: import("../../util/validation").ValidatePredicate; | ||
export interface PolarAxisPathPoint { | ||
@@ -8,0 +7,0 @@ x: number; |
@@ -5,4 +5,5 @@ import type { ModuleContext } from '../module/moduleContext'; | ||
import { BaseProperties } from '../util/properties'; | ||
import type { CaptionLike } from './captionLike'; | ||
import type { InteractionEvent } from './interaction/interactionManager'; | ||
export declare class Caption extends BaseProperties { | ||
export declare class Caption extends BaseProperties implements CaptionLike { | ||
static readonly SMALL_PADDING = 10; | ||
@@ -9,0 +10,0 @@ static readonly LARGE_PADDING = 20; |
@@ -0,4 +1,6 @@ | ||
import type { ChartOptions } from '../module/optionsModule'; | ||
import type { BBox } from '../scene/bbox'; | ||
import type { ChartSpecialOverrides, TransferableResources } from './chart'; | ||
import type { TransferableResources } from './chart'; | ||
import { Chart } from './chart'; | ||
import type { Series } from './series/series'; | ||
type VisibilityMap = { | ||
@@ -13,3 +15,5 @@ crossLines: boolean; | ||
readonly paired: boolean; | ||
constructor(specialOverrides: ChartSpecialOverrides, resources?: TransferableResources); | ||
constructor(options: ChartOptions, resources?: TransferableResources); | ||
private firstSeriesTranslation; | ||
destroySeries(series: Series<any>[]): void; | ||
performLayout(): Promise<BBox>; | ||
@@ -16,0 +20,0 @@ private _lastCrossLineIds?; |
import type { ModuleInstance } from '../module/baseModule'; | ||
import type { LegendModule, RootModule } from '../module/coreModules'; | ||
import type { Module } from '../module/module'; | ||
import { type Module } from '../module/module'; | ||
import type { ModuleContext } from '../module/moduleContext'; | ||
import type { AgChartInstance, AgChartOptions } from '../options/agChartOptions'; | ||
import type { ChartOptions } from '../module/optionsModule'; | ||
import type { AgChartInstance, AgChartOptions } from '../options/chart/chartBuilderOptions'; | ||
import { BBox } from '../scene/bbox'; | ||
import { Group } from '../scene/group'; | ||
import { Scene } from '../scene/scene'; | ||
import type { PlacedLabel } from '../scene/util/labelPlacement'; | ||
import { CallbackCache } from '../util/callbackCache'; | ||
import type { PlacedLabel } from '../util/labelPlacement'; | ||
import { Observable } from '../util/observable'; | ||
import { Padding } from '../util/padding'; | ||
import type { Caption } from './caption'; | ||
import { BaseProperties } from '../util/properties'; | ||
import { type ActionOnSetOptions } from '../util/proxy'; | ||
import { Caption } from './caption'; | ||
import type { ChartAnimationPhase } from './chartAnimationPhase'; | ||
import type { ChartAxis } from './chartAxis'; | ||
@@ -18,9 +22,14 @@ import { ChartHighlight } from './chartHighlight'; | ||
import { ChartUpdateType } from './chartUpdateType'; | ||
import { DataService } from './data/dataService'; | ||
import { AnimationManager } from './interaction/animationManager'; | ||
import { ChartEventManager } from './interaction/chartEventManager'; | ||
import { ContextMenuRegistry } from './interaction/contextMenuRegistry'; | ||
import { CursorManager } from './interaction/cursorManager'; | ||
import { GestureDetector } from './interaction/gestureDetector'; | ||
import type { HighlightChangeEvent } from './interaction/highlightManager'; | ||
import { HighlightManager } from './interaction/highlightManager'; | ||
import type { InteractionEvent } from './interaction/interactionManager'; | ||
import type { InteractionEvent, PointerOffsets } from './interaction/interactionManager'; | ||
import { InteractionManager } from './interaction/interactionManager'; | ||
import { RegionManager } from './interaction/regionManager'; | ||
import { SyncManager } from './interaction/syncManager'; | ||
import { TooltipManager } from './interaction/tooltipManager'; | ||
@@ -30,10 +39,9 @@ import { ZoomManager } from './interaction/zoomManager'; | ||
import type { CategoryLegendDatum, ChartLegend, ChartLegendType } from './legendDatum'; | ||
import type { SeriesOptionsTypes } from './mapping/types'; | ||
import { type SeriesOptionsTypes } from './mapping/types'; | ||
import { ChartOverlays } from './overlay/chartOverlays'; | ||
import type { Series } from './series/series'; | ||
import { type Series } from './series/series'; | ||
import { SeriesLayerManager } from './series/seriesLayerManager'; | ||
import { SeriesStateManager } from './series/seriesStateManager'; | ||
import type { ISeries, SeriesNodeDatum } from './series/seriesTypes'; | ||
import { Tooltip } from './tooltip/tooltip'; | ||
import { UpdateService } from './updateService'; | ||
import { UpdateOpts, UpdateService } from './updateService'; | ||
type OptionalHTMLElement = HTMLElement | undefined | null; | ||
@@ -52,17 +60,11 @@ export type TransferableResources = { | ||
export type ChartExtendedOptions = AgChartOptions & ChartSpecialOverrides; | ||
declare class SeriesArea { | ||
declare class SeriesArea extends BaseProperties { | ||
clip?: boolean; | ||
padding: Padding; | ||
} | ||
export declare const chartsInstances: WeakMap<HTMLElement, Chart>; | ||
export declare abstract class Chart extends Observable implements AgChartInstance { | ||
static chartsInstances: WeakMap<HTMLElement, Chart>; | ||
static getInstance(element: HTMLElement): Chart | undefined; | ||
readonly id: string; | ||
className?: string; | ||
processedOptions: AgChartOptions & { | ||
type?: SeriesOptionsTypes['type']; | ||
}; | ||
userOptions: AgChartOptions; | ||
queuedUserOptions: AgChartOptions[]; | ||
getOptions(): AgChartOptions; | ||
readonly scene: Scene; | ||
@@ -82,8 +84,6 @@ readonly seriesRoot: Group; | ||
private _firstAutoSize; | ||
private autoSizeChanged; | ||
private onAutoSizeChange; | ||
download(fileName?: string, fileFormat?: string): void; | ||
padding: Padding; | ||
_seriesArea: SeriesArea; | ||
get seriesArea(): SeriesArea; | ||
set seriesArea(newArea: SeriesArea); | ||
readonly padding: Padding; | ||
readonly seriesArea: SeriesArea; | ||
title?: Caption; | ||
@@ -93,12 +93,20 @@ subtitle?: Caption; | ||
mode: ChartMode; | ||
private _destroyed; | ||
static NodeValueChangeOptions: ActionOnSetOptions<Chart>; | ||
destroyed: boolean; | ||
private _skipSync; | ||
private readonly _destroyFns; | ||
get destroyed(): boolean; | ||
chartAnimationPhase: ChartAnimationPhase; | ||
readonly highlightManager: HighlightManager; | ||
readonly syncManager: SyncManager; | ||
readonly zoomManager: ZoomManager; | ||
readonly modules: Map<string, ModuleInstance>; | ||
protected readonly animationManager: AnimationManager; | ||
protected readonly chartEventManager: ChartEventManager; | ||
protected readonly contextMenuRegistry: ContextMenuRegistry; | ||
protected readonly cursorManager: CursorManager; | ||
protected readonly highlightManager: HighlightManager; | ||
protected readonly interactionManager: InteractionManager; | ||
protected readonly regionManager: RegionManager; | ||
protected readonly gestureDetector: GestureDetector; | ||
protected readonly tooltipManager: TooltipManager; | ||
protected readonly zoomManager: ZoomManager; | ||
protected readonly dataService: DataService<any>; | ||
protected readonly layoutService: LayoutService; | ||
@@ -111,8 +119,13 @@ protected readonly updateService: UpdateService; | ||
protected readonly seriesLayerManager: SeriesLayerManager; | ||
readonly modules: Map<string, ModuleInstance>; | ||
protected readonly legends: Map<ChartLegendType, ChartLegend>; | ||
legend: ChartLegend | undefined; | ||
private readonly specialOverrides; | ||
private readonly processors; | ||
protected constructor(specialOverrides: ChartExtendedOptions, resources?: TransferableResources); | ||
processedOptions: AgChartOptions & { | ||
type?: SeriesOptionsTypes['type']; | ||
}; | ||
userOptions: AgChartOptions; | ||
queuedUserOptions: AgChartOptions[]; | ||
chartOptions: ChartOptions; | ||
getOptions(): AgChartOptions; | ||
protected constructor(options: ChartOptions, resources?: TransferableResources); | ||
addModule<T extends RootModule | LegendModule>(module: T): void; | ||
@@ -123,14 +136,13 @@ removeModule(module: RootModule | LegendModule): void; | ||
getModuleContext(): ModuleContext; | ||
resetAnimations(): void; | ||
skipAnimations(): void; | ||
destroy(opts?: { | ||
keepTransferableResources: boolean; | ||
}): TransferableResources | undefined; | ||
disablePointer(highlightOnly?: boolean): void; | ||
requestFactoryUpdate(cb: () => Promise<void>): void; | ||
resetPointer(highlightOnly?: boolean): void; | ||
requestFactoryUpdate(cb: (chart: Chart) => Promise<void> | void): void; | ||
private _pendingFactoryUpdatesCount; | ||
private _performUpdateNoRenderCount; | ||
private _performUpdateType; | ||
private _performUpdateSkipAnimations?; | ||
get performUpdateType(): ChartUpdateType; | ||
private _lastPerformUpdateError?; | ||
get lastPerformUpdateError(): Error | undefined; | ||
private _performUpdateSkipAnimations; | ||
private performUpdateType; | ||
private updateShortcutCount; | ||
@@ -141,9 +153,3 @@ private seriesToUpdate; | ||
private performUpdateTrigger; | ||
update(type?: ChartUpdateType, opts?: { | ||
forceNodeDataRefresh?: boolean; | ||
skipAnimations?: boolean; | ||
newAnimationBatch?: boolean; | ||
seriesToUpdate?: Iterable<ISeries<any>>; | ||
backOffMs?: number; | ||
}): void; | ||
update(type?: ChartUpdateType, opts?: UpdateOpts): void; | ||
private performUpdate; | ||
@@ -153,11 +159,6 @@ private checkUpdateShortcut; | ||
readonly element: HTMLElement; | ||
protected _axes: ChartAxis[]; | ||
set axes(values: ChartAxis[]); | ||
get axes(): ChartAxis[]; | ||
protected _series: Series<any>[]; | ||
set series(values: Series<any>[]); | ||
get series(): Series<any>[]; | ||
private addSeries; | ||
private initSeries; | ||
private removeAllSeries; | ||
axes: ChartAxis[]; | ||
series: Series<any>[]; | ||
private onSeriesChange; | ||
protected destroySeries(series: Series<any>[]): void; | ||
private addSeriesListeners; | ||
@@ -170,2 +171,3 @@ updateAllSeriesListeners(): void; | ||
private resize; | ||
updateData(): Promise<void>; | ||
processData(): Promise<void>; | ||
@@ -181,13 +183,11 @@ placeLabels(): Map<Series<any>, PlacedLabel[]>; | ||
private pickSeriesNode; | ||
lastPick?: { | ||
datum: SeriesNodeDatum; | ||
event?: Event; | ||
}; | ||
private lastPick?; | ||
protected onMouseMove(event: InteractionEvent<'hover'>): void; | ||
protected onLeave(event: InteractionEvent<'leave'>): void; | ||
private onContextMenu; | ||
private lastInteractionEvent?; | ||
private pointerScheduler; | ||
protected handlePointer(event: InteractionEvent<'hover'>): void; | ||
protected handlePointerTooltip(event: InteractionEvent<'hover'>, disablePointer: (highlightOnly?: boolean) => void): void; | ||
protected handlePointerNode(event: InteractionEvent<'hover'>): void; | ||
protected handlePointer(event: PointerOffsets, redisplay: boolean): void; | ||
protected handlePointerTooltip(event: PointerOffsets, disablePointer: (highlightOnly?: boolean) => void): void; | ||
protected handlePointerNode(event: PointerOffsets): void; | ||
protected onClick(event: InteractionEvent<'click'>): void; | ||
@@ -200,8 +200,19 @@ protected onDoubleClick(event: InteractionEvent<'dblclick'>): void; | ||
private onSeriesNodeDoubleClick; | ||
private seriesGroupingChanged; | ||
changeHighlightDatum(event: HighlightChangeEvent): void; | ||
waitForUpdate(timeoutMs?: number): Promise<void>; | ||
private handleOverlays; | ||
private toggleOverlay; | ||
protected getMinRect(): BBox | undefined; | ||
private filterMiniChartSeries; | ||
applyOptions(chartOptions: ChartOptions): void; | ||
private applyModules; | ||
private applySeries; | ||
private applyAxes; | ||
private createSeries; | ||
private applySeriesOptionModules; | ||
private applySeriesValues; | ||
private createAxis; | ||
private applyAxisModules; | ||
private applyOptionValues; | ||
private registerListeners; | ||
} | ||
export {}; |
@@ -7,2 +7,6 @@ import type { AxisContext, ModuleContextWithParent } from '../module/moduleContext'; | ||
import type { Node } from '../scene/node'; | ||
import type { AxisGridLine } from './axis/axisGridLine'; | ||
import type { AxisLine } from './axis/axisLine'; | ||
import type { AxisTick } from './axis/axisTick'; | ||
import type { ChartAnimationPhase } from './chartAnimationPhase'; | ||
import type { ChartAxisDirection } from './chartAxisDirection'; | ||
@@ -32,2 +36,3 @@ import type { AxisLayout } from './layout/layoutService'; | ||
direction: ChartAxisDirection; | ||
interactionEnabled: boolean; | ||
formatDatum(datum: any): string; | ||
@@ -41,4 +46,6 @@ getLayoutState(): AxisLayout; | ||
keys: string[]; | ||
line: AxisLine; | ||
gridLine: AxisGridLine; | ||
label: ChartAxisLabel; | ||
linkedTo?: ChartAxis; | ||
tick: AxisTick<any>; | ||
maxThickness: number; | ||
@@ -58,3 +65,3 @@ nice: boolean; | ||
type: string; | ||
update(primaryTickCount?: number): number | undefined; | ||
update(primaryTickCount?: number, animated?: boolean): number | undefined; | ||
updateScale(): void; | ||
@@ -67,2 +74,3 @@ updatePosition(position: { | ||
createModuleContext: () => ModuleContextWithParent<AxisContext>; | ||
resetAnimation(chartAnimationPhase: ChartAnimationPhase): unknown; | ||
} | ||
@@ -69,0 +77,0 @@ export interface ChartAxisLabel extends FontOptions { |
@@ -1,5 +0,4 @@ | ||
import type { ModuleContext } from '../module/moduleContext'; | ||
import type { JsonApplyParams } from '../util/json'; | ||
export declare const JSON_APPLY_PLUGINS: JsonApplyParams; | ||
export declare function assignJsonApplyConstructedArray(array: any[], ctor: new () => any): void; | ||
export declare function getJsonApplyOptions(ctx: ModuleContext): JsonApplyParams; | ||
export declare const JSON_APPLY_OPTIONS: JsonApplyParams; |
@@ -11,8 +11,11 @@ import type { AgChartInstance } from '../options/chart/chartBuilderOptions'; | ||
export declare class AgChartInstanceProxy implements AgChartProxy { | ||
chart: Chart; | ||
static chartInstances: WeakMap<Chart, AgChartInstanceProxy>; | ||
static isInstance(x: any): x is AgChartInstanceProxy; | ||
private static validateImplementation; | ||
chart: Chart; | ||
constructor(chart: Chart); | ||
getOptions(): import("../options/chart/chartBuilderOptions").AgChartOptions; | ||
resetAnimations(): void; | ||
skipAnimations(): void; | ||
destroy(): void; | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { Caption } from './caption'; | ||
import type { CaptionLike } from './captionLike'; | ||
import type { ChartMode } from './chartMode'; | ||
@@ -6,4 +6,4 @@ import type { ISeries } from './series/seriesTypes'; | ||
readonly mode: ChartMode; | ||
readonly title?: Caption; | ||
readonly title?: CaptionLike; | ||
readonly series: ISeries<any>[]; | ||
} |
/** Types of chart-update, in pipeline execution order. */ | ||
export declare enum ChartUpdateType { | ||
FULL = 0, | ||
PROCESS_DATA = 1, | ||
PERFORM_LAYOUT = 2, | ||
SERIES_UPDATE = 3, | ||
TOOLTIP_RECALCULATION = 4, | ||
SCENE_RENDER = 5, | ||
NONE = 6 | ||
UPDATE_DATA = 1, | ||
PROCESS_DATA = 2, | ||
PERFORM_LAYOUT = 3, | ||
SERIES_UPDATE = 4, | ||
TOOLTIP_RECALCULATION = 5, | ||
SCENE_RENDER = 6, | ||
NONE = 7 | ||
} |
@@ -16,3 +16,3 @@ import type { ChartMode } from '../chartMode'; | ||
request<D extends object, K extends keyof D & string = keyof D & string, G extends boolean | undefined = undefined>(id: string, data: D[], opts: DataModelOptions<K, any>): Promise<Result<D, K, G>>; | ||
execute(): Promise<void>; | ||
execute(): void; | ||
private extractScopedData; | ||
@@ -19,0 +19,0 @@ private validateRequests; |
@@ -1,2 +0,1 @@ | ||
import type { ChartAxis } from '../chartAxis'; | ||
import type { ChartMode } from '../chartMode'; | ||
@@ -73,3 +72,8 @@ import type { ContinuousDomain } from './utilFunctions'; | ||
export type DatumPropertyType = 'range' | 'category'; | ||
export declare function fixNumericExtent(extent?: (number | Date)[], axis?: ChartAxis): [] | [number, number]; | ||
export declare function fixNumericExtent(extent?: (number | Date)[], axis?: { | ||
calculatePadding(min: number, max: number, reversed: boolean): [number, number]; | ||
isReversed(): boolean; | ||
}): [] | [number, number]; | ||
type MissMap = Map<string | undefined, number>; | ||
export declare function getMissCount(scopeProvider: ScopeProvider, missMap: MissMap | undefined): number; | ||
type GroupingFn<K> = (data: UngroupedDataItem<K, any[]>) => K[]; | ||
@@ -115,3 +119,3 @@ export type GroupByFn = (extractedData: UngroupedData<any>) => GroupingFn<any>; | ||
invalidValue?: any; | ||
missing?: number; | ||
missing?: MissMap; | ||
missingValue?: any; | ||
@@ -156,2 +160,3 @@ separateNegative?: boolean; | ||
export declare class DataModel<D extends object, K extends keyof D & string = keyof D & string, Grouped extends boolean | undefined = undefined> { | ||
private readonly debug; | ||
private readonly opts; | ||
@@ -176,3 +181,3 @@ private readonly keys; | ||
resolveProcessedDataDefsById(searchScope: ScopeProvider, searchId: RegExp | string): ProcessedDataDef[] | never; | ||
getDomain(scope: ScopeProvider, searchId: string | RegExp, type: "value" | "key" | "aggregate" | "group-value-processor" | "property-value-processor" | "reducer" | "processor" | undefined, processedData: ProcessedData<K>): any[] | ContinuousDomain<number> | []; | ||
getDomain(scope: ScopeProvider, searchId: string | RegExp, type: "key" | "value" | "aggregate" | "group-value-processor" | "property-value-processor" | "reducer" | "processor" | undefined, processedData: ProcessedData<K>): any[] | ContinuousDomain<number> | []; | ||
processData(data: D[], sources?: { | ||
@@ -179,0 +184,0 @@ id: string; |
@@ -10,2 +10,2 @@ import type { GroupValueProcessorDefinition, ProcessedData, ProcessorOutputPropertyDefinition, PropertyId, PropertyValueProcessorDefinition, ReducerOutputPropertyDefinition, ScopeProvider } from './dataModel'; | ||
export declare function diff(previousData: ProcessedData<any>, updateMovedDatums?: boolean): ProcessorOutputPropertyDefinition<'diff'>; | ||
export declare function createDatumId(keys: string[]): string; | ||
export declare function createDatumId(keys: any | any[]): any; |
@@ -1,5 +0,5 @@ | ||
import type { AxisConstructor } from '../../module/coreModules'; | ||
import type { ModuleContext } from '../../module/moduleContext'; | ||
export declare function registerAxis(axisType: string, ctor: AxisConstructor): void; | ||
export declare function getAxis(axisType: string, moduleCtx: ModuleContext): import("../chartAxis").ChartAxis; | ||
import type { ChartAxis } from '../chartAxis'; | ||
export declare function registerAxis(axisType: string, ctor: new (moduleContext: ModuleContext) => ChartAxis): void; | ||
export declare function getAxis(axisType: string, moduleCtx: ModuleContext): ChartAxis; | ||
export declare const AXIS_TYPES: { | ||
@@ -6,0 +6,0 @@ has(axisType: string): boolean; |
@@ -1,3 +0,7 @@ | ||
import type { Module } from '../../module-support'; | ||
type EnterpriseModuleStub = Pick<Module<any>, 'type' | 'identifier' | 'optionsKey' | 'chartTypes'> & { | ||
type EnterpriseModuleStub = { | ||
type: 'axis' | 'axis-option' | 'series' | 'series-option' | 'root' | 'legend'; | ||
packageType?: 'enterprise'; | ||
identifier?: string; | ||
optionsKey: string; | ||
chartTypes: ('cartesian' | 'polar' | 'hierarchy')[]; | ||
useCount?: number; | ||
@@ -13,4 +17,7 @@ optionsInnerKey?: string; | ||
export declare function isEnterpriseHierarchy(seriesType: string): boolean; | ||
export declare function verifyIfModuleExpected(module: Module<any>): boolean; | ||
type UnknownPackage = { | ||
packageType: string; | ||
} | EnterpriseModuleStub; | ||
export declare function verifyIfModuleExpected(module: UnknownPackage): boolean; | ||
export declare function getUnusedExpectedModules(): EnterpriseModuleStub[]; | ||
export {}; |
@@ -1,27 +0,24 @@ | ||
import type { SeriesConstructor, SeriesPaletteFactory } from '../../module/coreModules'; | ||
import type { SeriesModule } from '../../module/coreModules'; | ||
import type { SeriesPaletteFactory } from '../../module/coreModulesTypes'; | ||
import type { ModuleContext } from '../../module/moduleContext'; | ||
import type { AgChartOptions } from '../../options/agChartOptions'; | ||
import type { SeriesOptionsTypes } from '../mapping/types'; | ||
import type { Series } from '../series/series'; | ||
import type { ChartType } from './chartTypes'; | ||
type DefaultsFunction = (opts: unknown) => AgChartOptions; | ||
export declare function registerSeries(seriesType: NonNullable<SeriesOptionsTypes['type']>, chartType: ChartType, cstr: SeriesConstructor, defaults: {}, theme: {}, enterpriseTheme: {} | undefined, paletteFactory: SeriesPaletteFactory | undefined, solo: boolean | undefined, stackable: boolean | undefined, groupable: boolean | undefined, stackedByDefault: boolean | undefined, swapDefaultAxesCondition: ((opts: any) => boolean) | undefined, customDefaultsFunction: ((opts: any) => AgChartOptions) | undefined): void; | ||
export declare function registerSeriesThemeTemplate(seriesType: NonNullable<SeriesOptionsTypes['type']>, themeTemplate: {}, enterpriseThemeTemplate?: {}): void; | ||
export declare function getSeries(chartType: string, moduleCtx: ModuleContext): Series<any>; | ||
export declare function getSeriesDefaults(chartType: string): {}; | ||
import type { AgCartesianSeriesOptions, AgChartOptions, AgHierarchySeriesOptions, AgPolarSeriesOptions } from '../../options/agChartOptions'; | ||
import type { SeriesType } from '../mapping/types'; | ||
import type { ISeries } from '../series/seriesTypes'; | ||
export type SeriesOptions = AgCartesianSeriesOptions | AgPolarSeriesOptions | AgHierarchySeriesOptions; | ||
export declare function registerSeries({ identifier: seriesType, chartTypes: [chartType], instanceConstructor, seriesDefaults, themeTemplate, enterpriseThemeTemplate, paletteFactory, solo, stackable, groupable, stackedByDefault, swapDefaultAxesCondition, }: SeriesModule<any>): void; | ||
export declare function registerSeriesThemeTemplate(seriesType: NonNullable<SeriesType>, themeTemplate: {}, enterpriseThemeTemplate?: {}): void; | ||
export declare function createSeries(seriesType: string, moduleCtx: ModuleContext): ISeries<any>; | ||
export declare function getSeriesDefaults<T extends AgChartOptions>(chartType: string): T; | ||
export declare function getSeriesThemeTemplate(chartType: string): {}; | ||
export declare function addSeriesPaletteFactory(seriesType: string, factory: SeriesPaletteFactory): void; | ||
export declare function getSeriesPaletteFactory(seriesType: string): SeriesPaletteFactory<"line" | "area" | "bar" | "scatter" | "box-plot" | "bubble" | "bullet" | "heatmap" | "histogram" | "range-area" | "range-bar" | "waterfall" | "sunburst" | "treemap" | "radial-column" | "nightingale" | "pie" | "radar-line" | "radar-area" | "radial-bar">; | ||
export declare function isSoloSeries(seriesType: SeriesOptionsTypes['type']): boolean; | ||
export declare function isStackableSeries(seriesType: SeriesOptionsTypes['type']): boolean; | ||
export declare function isGroupableSeries(seriesType: SeriesOptionsTypes['type']): boolean; | ||
export declare function isSeriesStackedByDefault(seriesType: string): boolean; | ||
export declare function addGroupableSeriesType(seriesType: SeriesOptionsTypes['type']): void; | ||
export declare function addSoloSeriesType(seriesType: SeriesOptionsTypes['type']): void; | ||
export declare function addStackableSeriesType(seriesType: SeriesOptionsTypes['type']): void; | ||
export declare function addStackedByDefaultSeriesType(seriesType: string): void; | ||
export declare function addSwapDefaultAxesCondition(seriesType: string, predicate: (opts: unknown) => boolean): void; | ||
export declare function addCustomDefaultsFunctions(seriesType: string, predicate: DefaultsFunction): void; | ||
export declare function getSeriesPaletteFactory(seriesType: string): SeriesPaletteFactory<"area" | "line" | "bar" | "scatter" | "box-plot" | "bubble" | "bullet" | "heatmap" | "histogram" | "range-area" | "range-bar" | "waterfall" | "sunburst" | "treemap" | "donut" | "radial-column" | "nightingale" | "pie" | "radar-line" | "radar-area" | "radial-bar">; | ||
export declare function isSoloSeries(seriesType: SeriesType): boolean; | ||
export declare function isStackableSeries(seriesType: SeriesType): boolean; | ||
export declare function isGroupableSeries(seriesType: SeriesType): boolean; | ||
export declare function isSeriesStackedByDefault(seriesType: SeriesType): boolean; | ||
export declare function addGroupableSeriesType(seriesType: SeriesType): void; | ||
export declare function addSoloSeriesType(seriesType: SeriesType): void; | ||
export declare function addStackableSeriesType(seriesType: SeriesType): void; | ||
export declare function addStackedByDefaultSeriesType(seriesType: SeriesType): void; | ||
export declare function addSwapDefaultAxesCondition(seriesType: string, predicate: (opts: any) => boolean): void; | ||
export declare function isDefaultAxisSwapNeeded(opts: AgChartOptions): boolean | undefined; | ||
export declare function executeCustomDefaultsFunctions(opts: AgChartOptions, initialDefaults: {}): {}; | ||
export {}; |
@@ -0,3 +1,4 @@ | ||
import type { ChartOptions } from '../module/optionsModule'; | ||
import { BBox } from '../scene/bbox'; | ||
import type { ChartSpecialOverrides, TransferableResources } from './chart'; | ||
import type { TransferableResources } from './chart'; | ||
import { Chart } from './chart'; | ||
@@ -7,5 +8,5 @@ export declare class HierarchyChart extends Chart { | ||
static type: "hierarchy"; | ||
constructor(specialOverrides: ChartSpecialOverrides, resources?: TransferableResources); | ||
constructor(options: ChartOptions, resources?: TransferableResources); | ||
protected _data: any; | ||
performLayout(): Promise<BBox>; | ||
} |
@@ -5,3 +5,3 @@ import type { AdditionalAnimationOptions, AnimationOptions, AnimationValue, IAnimation } from '../../motion/animation'; | ||
import { BaseManager } from './baseManager'; | ||
import type { InteractionManager } from './interactionManager'; | ||
import { InteractionManager } from './interactionManager'; | ||
type AnimationEventType = 'animation-frame'; | ||
@@ -22,2 +22,3 @@ interface AnimationEvent { | ||
private readonly debug; | ||
private readonly rafAvailable; | ||
private isPlaying; | ||
@@ -31,3 +32,3 @@ private requestId; | ||
*/ | ||
animate<T extends AnimationValue>({ disableInteractions, immutable, ...opts }: AnimationOptions<T> & AdditionalAnimationOptions): IAnimation<any> | Animation<T> | undefined; | ||
animate<T extends AnimationValue>({ disableInteractions, ...opts }: AnimationOptions<T> & AdditionalAnimationOptions): Animation<T> | undefined; | ||
play(): void; | ||
@@ -47,2 +48,4 @@ pause(): void; | ||
scheduleAnimationFrame(cb: (time: number) => Promise<void>): void; | ||
/** Mocking point for tests to skip animations to a specific point in time. */ | ||
forceTimeJump(_animation: IAnimation, _defaultDuration: number): boolean; | ||
private requestAnimation; | ||
@@ -53,3 +56,4 @@ private cancelAnimation; | ||
endBatch(): void; | ||
onBatchStop(cb: () => void): void; | ||
} | ||
export {}; |
import { Listeners } from '../../util/listeners'; | ||
export declare abstract class BaseManager<EventType extends string = never, Event extends { | ||
type: any; | ||
} = never, Meta = never> { | ||
protected readonly listeners: Listeners<EventType, (event: Event) => void, Meta>; | ||
} = never> { | ||
protected readonly listeners: Listeners<EventType, (event: Event) => void>; | ||
addListener<T extends EventType>(type: T, handler: (event: Event & { | ||
type: T; | ||
}) => void, meta?: Meta): () => void; | ||
}) => void): () => void; | ||
removeListener(listenerSymbol: symbol): void; | ||
destroy(): void; | ||
} |
import { BaseManager } from './baseManager'; | ||
type InteractionTypes = 'click' | 'dblclick' | 'contextmenu' | 'hover' | 'drag-start' | 'drag' | 'drag-end' | 'leave' | 'page-left' | 'wheel'; | ||
export type InteractionEvent<T extends InteractionTypes = InteractionTypes> = { | ||
type: T; | ||
export declare const INTERACTION_TYPES: readonly ["click", "dblclick", "contextmenu", "hover", "drag-start", "drag", "drag-end", "leave", "page-left", "wheel"]; | ||
export type InteractionTypes = (typeof INTERACTION_TYPES)[number]; | ||
export type PointerOffsets = { | ||
offsetX: number; | ||
offsetY: number; | ||
}; | ||
export type InteractionEvent<T extends InteractionTypes = InteractionTypes> = PointerOffsets & { | ||
type: T; | ||
pageX: number; | ||
pageY: number; | ||
deltaX: number; | ||
deltaY: number; | ||
sourceEvent: Event; | ||
pauses: PauseTypes[]; | ||
/** Consume the event, don't notify other listeners! */ | ||
@@ -15,6 +19,9 @@ consume(): void; | ||
}; | ||
type PauseTypes = 'animation' | 'context-menu'; | ||
type ListenerMeta = { | ||
bypassPause?: PauseTypes[]; | ||
}; | ||
export declare enum InteractionState { | ||
Default = 8, | ||
ZoomDrag = 4, | ||
ContextMenu = 2, | ||
Animation = 1, | ||
All = 15 | ||
} | ||
/** | ||
@@ -24,3 +31,4 @@ * Manages user interactions with a specific HTMLElement (or interactions that bubble from it's | ||
*/ | ||
export declare class InteractionManager extends BaseManager<InteractionTypes, InteractionEvent<InteractionTypes>, ListenerMeta> { | ||
export declare class InteractionManager extends BaseManager<InteractionTypes, InteractionEvent<InteractionTypes>> { | ||
private readonly debug; | ||
private static interactionDocuments; | ||
@@ -34,7 +42,11 @@ private readonly rootElement; | ||
private dragStartElement?; | ||
private pausers; | ||
private stateQueue; | ||
constructor(element: HTMLElement, document: Document, window: Window); | ||
destroy(): void; | ||
resume(pauseType: PauseTypes): void; | ||
pause(pauseType: PauseTypes): void; | ||
addListener<T extends InteractionTypes>(type: T, handler: (event: InteractionEvent<T> & { | ||
type: T; | ||
}) => void, triggeringStates?: InteractionState): () => void; | ||
pushState(state: InteractionState): void; | ||
popState(state: InteractionState): void; | ||
getState(): number; | ||
private processEvent; | ||
@@ -46,5 +58,5 @@ private dispatchEvent; | ||
private calculateCoordinates; | ||
private fixOffsets; | ||
private getMouseEventCoords; | ||
private isWheelEvent; | ||
private buildEvent; | ||
} | ||
export {}; |
import type { BBox } from '../../scene/bbox'; | ||
import type { HdpiCanvas } from '../../scene/canvas/hdpiCanvas'; | ||
import type { ErrorBoundSeriesNodeDatum, SeriesNodeDatum } from '../series/seriesTypes'; | ||
import type { Tooltip, TooltipMeta } from '../tooltip/tooltip'; | ||
import type { InteractionEvent, InteractionManager } from './interactionManager'; | ||
import type { InteractionManager, PointerOffsets } from './interactionManager'; | ||
/** | ||
@@ -26,3 +25,3 @@ * Manages the tooltip HTML an element. Tracks the requested HTML from distinct dependents and | ||
private applyStates; | ||
static makeTooltipMeta(event: InteractionEvent<'hover'>, canvas: HdpiCanvas, datum: SeriesNodeDatum & Pick<ErrorBoundSeriesNodeDatum, 'yBar'>, window: Window): TooltipMeta; | ||
static makeTooltipMeta(event: PointerOffsets, datum: SeriesNodeDatum & Pick<ErrorBoundSeriesNodeDatum, 'yBar'>): TooltipMeta; | ||
} |
@@ -1,2 +0,1 @@ | ||
import type { ChartAxis } from '../chartAxis'; | ||
import { ChartAxisDirection } from '../chartAxisDirection'; | ||
@@ -16,2 +15,7 @@ import { BaseManager } from './baseManager'; | ||
} | ||
type ChartAxisLike = { | ||
id: string; | ||
direction: ChartAxisDirection; | ||
visibleRange: [number, number]; | ||
}; | ||
/** | ||
@@ -22,9 +26,9 @@ * Manages the current zoom state for a chart. Tracks the requested zoom from distinct dependents | ||
export declare class ZoomManager extends BaseManager<'zoom-change', ZoomChangeEvent> { | ||
private axes; | ||
private axisZoomManagers; | ||
private initialZoom?; | ||
updateAxes(axes: Array<ChartAxis>): void; | ||
updateZoom(callerId: string, newZoom?: AxisZoomState): void; | ||
updateAxisZoom(callerId: string, axisId: string, newZoom?: ZoomState): void; | ||
updateAxes(axes: Array<ChartAxisLike>): void; | ||
updateZoom(newZoom?: AxisZoomState): void; | ||
updateAxisZoom(axisId: string, newZoom?: ZoomState): void; | ||
getZoom(): AxisZoomState | undefined; | ||
getAxisZoom(axisId: string): ZoomState | undefined; | ||
getAxisZoom(axisId: string): ZoomState; | ||
getAxisZooms(): Record<string, { | ||
@@ -34,3 +38,4 @@ direction: ChartAxisDirection; | ||
}>; | ||
private applyStates; | ||
private applyChanges; | ||
} | ||
export {}; |
@@ -5,3 +5,3 @@ import type { FontStyle, FontWeight } from '../options/agChartOptions'; | ||
import type { Matrix } from '../scene/matrix'; | ||
import type { PointLabelDatum } from '../util/labelPlacement'; | ||
import type { PointLabelDatum } from '../scene/util/labelPlacement'; | ||
import { BaseProperties } from '../util/properties'; | ||
@@ -8,0 +8,0 @@ import type { RequireOptional } from '../util/types'; |
import type { ModuleContext } from '../module/moduleContext'; | ||
import type { AgChartLegendClickEvent, AgChartLegendDoubleClickEvent, AgChartLegendLabelFormatterParams, AgChartLegendListeners, AgChartLegendOrientation, AgChartLegendPosition, FontStyle, FontWeight } from '../options/agChartOptions'; | ||
import { BBox } from '../scene/bbox'; | ||
import type { Node } from '../scene/node'; | ||
import { BaseProperties } from '../util/properties'; | ||
import type { CategoryLegendDatum } from './legendDatum'; | ||
import type { Marker } from './marker/marker'; | ||
declare class LegendLabel { | ||
import { Pagination } from './pagination/pagination'; | ||
declare class LegendLabel extends BaseProperties { | ||
maxLength?: number; | ||
@@ -16,4 +17,3 @@ color: string; | ||
} | ||
declare class LegendMarker { | ||
size: number; | ||
declare class LegendMarker extends BaseProperties { | ||
/** | ||
@@ -23,5 +23,4 @@ * If the marker type is set, the legend will always use that marker type for all its items, | ||
*/ | ||
_shape?: string | (new () => Marker); | ||
set shape(value: string | (new () => Marker) | undefined); | ||
get shape(): string | (new () => Marker) | undefined; | ||
shape?: string | (new () => Marker); | ||
size: number; | ||
/** | ||
@@ -31,4 +30,4 @@ * Padding between the marker and the label within each legend item. | ||
padding: number; | ||
strokeWidth: number | undefined; | ||
enabled: boolean | undefined; | ||
strokeWidth?: number; | ||
enabled: boolean; | ||
parent?: { | ||
@@ -38,10 +37,7 @@ onMarkerShapeChange(): void; | ||
} | ||
declare class LegendLine { | ||
declare class LegendLine extends BaseProperties { | ||
strokeWidth?: number; | ||
length?: number; | ||
} | ||
declare class LegendItem { | ||
readonly marker: LegendMarker; | ||
readonly label: LegendLabel; | ||
readonly line: LegendLine; | ||
declare class LegendItem extends BaseProperties { | ||
/** Used to constrain the width of legend items. */ | ||
@@ -63,8 +59,11 @@ maxWidth?: number; | ||
showSeriesStroke: boolean; | ||
readonly marker: LegendMarker; | ||
readonly label: LegendLabel; | ||
readonly line: LegendLine; | ||
} | ||
declare class LegendListeners implements AgChartLegendListeners { | ||
declare class LegendListeners extends BaseProperties implements AgChartLegendListeners { | ||
legendItemClick?: (event: AgChartLegendClickEvent) => void; | ||
legendItemDoubleClick?: (event: AgChartLegendDoubleClickEvent) => void; | ||
} | ||
export declare class Legend { | ||
export declare class Legend extends BaseProperties { | ||
private readonly ctx; | ||
@@ -78,7 +77,4 @@ static className: string; | ||
private maxPageSize; | ||
private pagination; | ||
/** Item index to track on re-pagination, so current page updates appropriately. */ | ||
private paginationTrackingIndex; | ||
readonly item: LegendItem; | ||
readonly listeners: LegendListeners; | ||
private readonly truncatedItems; | ||
@@ -88,7 +84,7 @@ private _data; | ||
get data(): CategoryLegendDatum[]; | ||
private _enabled; | ||
set enabled(value: boolean); | ||
get enabled(): boolean; | ||
readonly pagination: Pagination; | ||
readonly item: LegendItem; | ||
readonly listeners: LegendListeners; | ||
enabled: boolean; | ||
position: AgChartLegendPosition; | ||
private getOrientation; | ||
/** Used to constrain the width of the legend. */ | ||
@@ -102,6 +98,2 @@ maxWidth?: number; | ||
preventHidingAll?: boolean; | ||
private destroyFns; | ||
constructor(ctx: ModuleContext); | ||
destroy(): void; | ||
onMarkerShapeChange(): void; | ||
/** | ||
@@ -112,2 +104,7 @@ * Spacing between the legend and the edge of the chart's element. | ||
private characterWidths; | ||
private destroyFns; | ||
constructor(ctx: ModuleContext); | ||
destroy(): void; | ||
onMarkerShapeChange(): void; | ||
private getOrientation; | ||
private getCharacterWidths; | ||
@@ -142,3 +139,2 @@ readonly size: [number, number]; | ||
private getDatumForPoint; | ||
computeBBox(): BBox; | ||
private computePagedBBox; | ||
@@ -148,2 +144,3 @@ private checkLegendClick; | ||
private handleLegendMouseMove; | ||
private handleLegendMouseExit; | ||
private positionLegend; | ||
@@ -150,0 +147,0 @@ private calculateLegendDimensions; |
import type { AgChartLegendListeners } from '../options/agChartOptions'; | ||
import type { BBox } from '../scene/bbox'; | ||
import type { Node } from '../scene/node'; | ||
import type { Marker } from './marker/marker'; | ||
export interface ChartLegend { | ||
computeBBox(): BBox; | ||
attachLegend(node: Node | null): void; | ||
@@ -8,0 +6,0 @@ destroy(): void; |
@@ -1,20 +0,37 @@ | ||
import type { AgCartesianSeriesOptions, AgChartOptions, AgHierarchySeriesOptions, AgPolarSeriesOptions } from '../../options/agChartOptions'; | ||
export type SeriesOptions = AgCartesianSeriesOptions | AgPolarSeriesOptions | AgHierarchySeriesOptions; | ||
/** | ||
* Groups the series options objects if they are of type `column` or `bar` and places them in an array at the index where the first instance of this series type was found. | ||
* Returns an array of arrays containing the ordered and grouped series options objects. | ||
*/ | ||
export declare function groupSeriesByType(seriesOptions: SeriesOptions[]): ({ | ||
type: 'group'; | ||
opts: SeriesOptions[]; | ||
import type { AgChartOptions } from '../../options/agChartOptions'; | ||
import type { ISeries } from '../series/seriesTypes'; | ||
export declare function matchSeriesOptions<S extends ISeries<any>>(series: S[], optSeries: NonNullable<AgChartOptions['series']>, oldOptsSeries?: AgChartOptions['series']): { | ||
status: "no-overlap"; | ||
oldKeys: IterableIterator<string>; | ||
newKeys: IterableIterator<string>; | ||
changes?: undefined; | ||
} | { | ||
type: 'stack'; | ||
opts: SeriesOptions[]; | ||
} | { | ||
type: "ungrouped"; | ||
opts: SeriesOptions[]; | ||
})[]; | ||
/** | ||
* Transforms provided series options array into an array containing series options which are compatible with standalone charts series options. | ||
*/ | ||
export declare function processSeriesOptions(_opts: AgChartOptions, seriesOptions: SeriesOptions[]): SeriesOptions[]; | ||
status: "overlap"; | ||
changes: ({ | ||
opts: import("../../options/agChartOptions").AgCartesianSeriesOptions | import("../../options/agChartOptions").AgHierarchySeriesOptions | import("../../options/agChartOptions").AgPolarSeriesOptions; | ||
idx: number; | ||
status: "add"; | ||
series?: undefined; | ||
diff?: undefined; | ||
} | { | ||
opts: import("../../options/agChartOptions").AgCartesianSeriesOptions | import("../../options/agChartOptions").AgHierarchySeriesOptions | import("../../options/agChartOptions").AgPolarSeriesOptions; | ||
series: S; | ||
diff: any; | ||
idx: number; | ||
status: "update"; | ||
} | { | ||
opts: import("../../options/agChartOptions").AgCartesianSeriesOptions | import("../../options/agChartOptions").AgHierarchySeriesOptions | import("../../options/agChartOptions").AgPolarSeriesOptions; | ||
series: S; | ||
idx: number; | ||
status: "no-op"; | ||
diff?: undefined; | ||
} | { | ||
series: S; | ||
idx: number; | ||
status: "remove"; | ||
opts?: undefined; | ||
diff?: undefined; | ||
})[]; | ||
oldKeys?: undefined; | ||
newKeys?: undefined; | ||
}; |
import type { AgCartesianChartOptions, AgChartOptions, AgHierarchyChartOptions, AgPolarChartOptions } from '../../options/agChartOptions'; | ||
export type AxesOptionsTypes = NonNullable<AgCartesianChartOptions['axes']>[number]; | ||
export type SeriesOptionsTypes = NonNullable<AgChartOptions['series']>[number]; | ||
export type SeriesType = SeriesOptionsTypes['type']; | ||
export declare function optionsType(input: { | ||
series?: { | ||
type?: SeriesOptionsTypes['type']; | ||
type?: SeriesType; | ||
}[]; | ||
}): NonNullable<SeriesOptionsTypes['type']>; | ||
}): NonNullable<SeriesType>; | ||
export declare function isAgCartesianChartOptions(input: AgChartOptions): input is AgCartesianChartOptions; | ||
export declare function isAgHierarchyChartOptions(input: AgChartOptions): input is AgHierarchyChartOptions; | ||
export declare function isAgPolarChartOptions(input: AgChartOptions): input is AgPolarChartOptions; | ||
export declare function isSeriesOptionType(input?: string): input is NonNullable<SeriesOptionsTypes['type']>; | ||
export declare function isAgPolarChartOptionsWithSeriesBasedLegend(input: AgChartOptions): input is AgPolarChartOptions; | ||
export declare function isSeriesOptionType(input?: string): input is NonNullable<SeriesType>; | ||
export declare function isAxisOptionType(input?: string): input is NonNullable<AxesOptionsTypes>['type']; |
import type { ModuleInstance } from '../../module/baseModule'; | ||
import { BaseModuleInstance } from '../../module/module'; | ||
import type { ModuleContext } from '../../module/moduleContext'; | ||
import { NavigatorHandle } from './navigatorHandle'; | ||
import { NavigatorMask } from './navigatorMask'; | ||
import { BBox } from '../../scene/bbox'; | ||
import { RangeHandle } from './shapes/rangeHandle'; | ||
import { RangeMask } from './shapes/rangeMask'; | ||
import { RangeSelector } from './shapes/rangeSelector'; | ||
export declare class Navigator extends BaseModuleInstance implements ModuleInstance { | ||
private readonly ctx; | ||
private readonly rs; | ||
readonly mask: NavigatorMask; | ||
readonly minHandle: NavigatorHandle; | ||
readonly maxHandle: NavigatorHandle; | ||
protected readonly rs: RangeSelector; | ||
miniChart: unknown; | ||
private minHandleDragging; | ||
private maxHandleDragging; | ||
private panHandleOffset; | ||
private enabled; | ||
set width(value: number); | ||
get width(): number; | ||
set height(value: number); | ||
get height(): number; | ||
enabled: boolean; | ||
mask: RangeMask; | ||
minHandle: RangeHandle; | ||
maxHandle: RangeHandle; | ||
height: number; | ||
min: number; | ||
max: number; | ||
margin: number; | ||
set min(value: number); | ||
get min(): number; | ||
set max(value: number); | ||
get max(): number; | ||
private _visible; | ||
set visible(value: boolean); | ||
get visible(): boolean; | ||
visible: boolean; | ||
private updateGroupVisibility; | ||
constructor(ctx: ModuleContext); | ||
private layout; | ||
private layoutComplete; | ||
protected x: number; | ||
protected y: number; | ||
protected width: number; | ||
performLayout({ shrinkRect }: { | ||
shrinkRect: BBox; | ||
}): Promise<{ | ||
shrinkRect: BBox; | ||
}>; | ||
performCartesianLayout(opts: { | ||
seriesRect: BBox; | ||
}): Promise<void>; | ||
private onRangeChange; | ||
private onZoomChange; | ||
private onDragStart; | ||
@@ -33,0 +40,0 @@ private onDrag; |
@@ -9,3 +9,3 @@ import { BBox } from '../../../scene/bbox'; | ||
height: number; | ||
readonly minRange = 0.05; | ||
readonly minRange = 0.001; | ||
protected _min: number; | ||
@@ -12,0 +12,0 @@ set min(value: number); |
import { Group } from '../../../scene/group'; | ||
import { type RenderContext } from '../../../scene/node'; | ||
import { RangeHandle } from './rangeHandle'; | ||
@@ -10,27 +9,12 @@ import { RangeMask } from './rangeMask'; | ||
readonly maxHandle: RangeHandle; | ||
readonly background: Group; | ||
readonly mask: RangeMask; | ||
protected _x: number; | ||
set x(value: number); | ||
get x(): number; | ||
protected _y: number; | ||
set y(value: number); | ||
get y(): number; | ||
protected _width: number; | ||
set width(value: number); | ||
get width(): number; | ||
protected _height: number; | ||
set height(value: number); | ||
get height(): number; | ||
protected _min: number; | ||
set min(value: number); | ||
get min(): number; | ||
protected _max: number; | ||
set max(value: number); | ||
get max(): number; | ||
min: number; | ||
max: number; | ||
constructor(); | ||
onRangeChange?: () => any; | ||
private updateHandles; | ||
layout(x: number, y: number, width: number, height: number): void; | ||
updateHandles(): void; | ||
computeBBox(): import("../../../integrated-charts-scene").BBox; | ||
computeVisibleRangeBBox(): import("../../../integrated-charts-scene").BBox; | ||
render(renderCtx: RenderContext): void; | ||
} |
@@ -0,7 +1,12 @@ | ||
import type { AnimationManager } from '../interaction/animationManager'; | ||
import { Overlay } from './overlay'; | ||
export declare class ChartOverlays { | ||
constructor(parent: HTMLElement); | ||
private static overlayDocuments; | ||
constructor(parent: HTMLElement, animationManager: AnimationManager); | ||
loading: Overlay; | ||
noData: Overlay; | ||
noVisibleSeries: Overlay; | ||
destroy(): void; | ||
private renderLoadingSpinner; | ||
protected createElement(parent: HTMLElement, tagName: string, options?: ElementCreationOptions): HTMLElement; | ||
} |
import type { BBox } from '../../scene/bbox'; | ||
import type { AnimationManager } from '../interaction/animationManager'; | ||
export declare const DEFAULT_OVERLAY_CLASS = "ag-chart-overlay"; | ||
export declare const DEFAULT_OVERLAY_DARK_CLASS = "ag-chart-dark-overlay"; | ||
export declare class Overlay { | ||
private className; | ||
private parentElement; | ||
private animationManager; | ||
private element?; | ||
constructor(className: string, parentElement: HTMLElement); | ||
constructor(className: string, parentElement: HTMLElement, animationManager: AnimationManager); | ||
renderer?: () => string; | ||
text?: string; | ||
darkTheme: boolean; | ||
show(rect: BBox): void; | ||
@@ -10,0 +15,0 @@ hide(): void; |
import type { AgChartLegendOrientation, FontStyle, FontWeight } from '../../options/agChartOptions'; | ||
import type { Node } from '../../scene/node'; | ||
import { BaseProperties } from '../../util/properties'; | ||
import { ChartUpdateType } from '../chartUpdateType'; | ||
import type { CursorManager } from '../interaction/cursorManager'; | ||
import type { InteractionManager } from '../interaction/interactionManager'; | ||
import type { RegionManager } from '../interaction/regionManager'; | ||
import type { Marker } from '../marker/marker'; | ||
import { type MarkerShape } from '../marker/util'; | ||
declare class PaginationLabel { | ||
declare class PaginationLabel extends BaseProperties { | ||
color: string; | ||
@@ -15,3 +16,3 @@ fontStyle?: FontStyle; | ||
} | ||
declare class PaginationMarkerStyle { | ||
declare class PaginationMarkerStyle extends BaseProperties { | ||
size: number; | ||
@@ -24,3 +25,3 @@ fill?: string; | ||
} | ||
declare class PaginationMarker { | ||
declare class PaginationMarker extends BaseProperties { | ||
readonly parent: Pagination; | ||
@@ -35,11 +36,9 @@ shape: MarkerShape; | ||
} | ||
export declare class Pagination { | ||
export declare class Pagination extends BaseProperties { | ||
private readonly chartUpdateCallback; | ||
private readonly pageUpdateCallback; | ||
private readonly interactionManager; | ||
private readonly regionManager; | ||
private readonly cursorManager; | ||
static className: string; | ||
readonly id: string; | ||
private readonly group; | ||
private readonly labelNode; | ||
readonly marker: PaginationMarker; | ||
@@ -50,4 +49,8 @@ readonly activeStyle: PaginationMarkerStyle; | ||
readonly label: PaginationLabel; | ||
private readonly group; | ||
private readonly labelNode; | ||
private highlightActive?; | ||
constructor(chartUpdateCallback: (type: ChartUpdateType) => void, pageUpdateCallback: (newPage: number) => void, interactionManager: InteractionManager, cursorManager: CursorManager); | ||
private destroyFns; | ||
constructor(chartUpdateCallback: (type: ChartUpdateType) => void, pageUpdateCallback: (newPage: number) => void, regionManager: RegionManager, cursorManager: CursorManager); | ||
destroy(): void; | ||
totalPages: number; | ||
@@ -54,0 +57,0 @@ currentPage: number; |
@@ -0,4 +1,5 @@ | ||
import type { ChartOptions } from '../module/optionsModule'; | ||
import { BBox } from '../scene/bbox'; | ||
import { Padding } from '../util/padding'; | ||
import type { ChartSpecialOverrides, TransferableResources } from './chart'; | ||
import type { TransferableResources } from './chart'; | ||
import { Chart } from './chart'; | ||
@@ -9,3 +10,3 @@ export declare class PolarChart extends Chart { | ||
padding: Padding; | ||
constructor(specialOverrides: ChartSpecialOverrides, resources?: TransferableResources); | ||
constructor(options: ChartOptions, resources?: TransferableResources); | ||
performLayout(): Promise<BBox>; | ||
@@ -12,0 +13,0 @@ protected updateAxes(cx: number, cy: number, radius: number): void; |
@@ -51,2 +51,3 @@ import type { FontStyle, FontWeight } from '../../../options/agChartOptions'; | ||
strokeData: AreaPathDatum; | ||
stackVisible: boolean; | ||
} | ||
@@ -66,4 +67,3 @@ export declare function prepareAreaPathAnimation(newData: AreaSeriesNodeDataContext, oldData: AreaSeriesNodeDataContext, diff?: ProcessedOutputDiff): { | ||
}; | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
} | { | ||
@@ -73,11 +73,8 @@ start: { | ||
}; | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
toFn: (_path: import("../../../integrated-charts-scene").Path) => { | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -90,7 +87,6 @@ }; | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
opacity: number; | ||
translationX: number | undefined; | ||
translationY: number | undefined; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -100,9 +96,8 @@ toFn: (_marker: import("../../marker/marker").Marker, datum: import("./pathUtil").PathNodeDatumLike) => { | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
translationX: number | undefined; | ||
translationY: number | undefined; | ||
opacity: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
}; | ||
} | undefined; |
@@ -33,2 +33,3 @@ import type { ModuleContext } from '../../../module/moduleContext'; | ||
readonly stroke: string | undefined; | ||
readonly opacity: number | undefined; | ||
readonly strokeWidth: number; | ||
@@ -35,0 +36,0 @@ readonly cornerRadius: number; |
import type { ModuleContext } from '../../../module/moduleContext'; | ||
import type { NodeUpdateState } from '../../../motion/fromToMotion'; | ||
import type { FromToMotionPropFn } from '../../../motion/fromToMotion'; | ||
import type { AgBarSeriesFormatterParams, AgBarSeriesStyle } from '../../../options/agChartOptions'; | ||
@@ -47,6 +47,7 @@ import type { BBox } from '../../../scene/bbox'; | ||
isVertical: boolean; | ||
mode: 'normal' | 'fade'; | ||
calculate: (datum: T, prevDatum?: T) => T; | ||
}; | ||
export declare function collapsedStartingBarPosition(isVertical: boolean, axes: Record<ChartAxisDirection, ChartAxis | undefined>): InitialPosition<AnimatableBarDatum>; | ||
export declare function midpointStartingBarPosition(isVertical: boolean): InitialPosition<AnimatableBarDatum>; | ||
export declare function collapsedStartingBarPosition(isVertical: boolean, axes: Record<ChartAxisDirection, ChartAxis | undefined>, mode: 'normal' | 'fade'): InitialPosition<AnimatableBarDatum>; | ||
export declare function midpointStartingBarPosition(isVertical: boolean, mode: 'normal' | 'fade'): InitialPosition<AnimatableBarDatum>; | ||
type AnimatableBarDatum = { | ||
@@ -57,20 +58,9 @@ x: number; | ||
width: number; | ||
opacity?: number; | ||
}; | ||
export declare function prepareBarAnimationFunctions<T extends AnimatableBarDatum>(initPos: InitialPosition<T>): { | ||
toFn: (rect: Rect, datum: T, status: NodeUpdateState) => { | ||
x: number; | ||
y: number; | ||
width: number; | ||
height: number; | ||
}; | ||
fromFn: (rect: Rect, datum: T, status: NodeUpdateState) => { | ||
animationDuration: number; | ||
animationDelay: number; | ||
x: number; | ||
y: number; | ||
width: number; | ||
height: number; | ||
}; | ||
toFn: FromToMotionPropFn<Rect, AnimatableBarDatum, T>; | ||
fromFn: FromToMotionPropFn<Rect, AnimatableBarDatum, T>; | ||
}; | ||
export declare function resetBarSelectionsFn(_node: Rect, { x, y, width, height }: AnimatableBarDatum): { | ||
export declare function resetBarSelectionsFn(_node: Rect, { x, y, width, height, opacity }: AnimatableBarDatum): { | ||
x: number; | ||
@@ -80,3 +70,4 @@ y: number; | ||
height: number; | ||
opacity: number | undefined; | ||
}; | ||
export {}; |
@@ -5,3 +5,3 @@ import type { ModuleContext } from '../../../module/moduleContext'; | ||
import type { Text } from '../../../scene/shape/text'; | ||
import type { MeasuredLabel, PointLabelDatum } from '../../../util/labelPlacement'; | ||
import type { PointLabelDatum } from '../../../scene/util/labelPlacement'; | ||
import { ChartAxisDirection } from '../../chartAxisDirection'; | ||
@@ -12,10 +12,5 @@ import type { DataController } from '../../data/dataController'; | ||
import type { SeriesNodeEventTypes } from '../series'; | ||
import { BubbleSeriesProperties } from './bubbleSeriesProperties'; | ||
import type { CartesianAnimationData, CartesianSeriesNodeDatum } from './cartesianSeries'; | ||
import { BubbleNodeDatum, BubbleSeriesProperties } from './bubbleSeriesProperties'; | ||
import type { CartesianAnimationData } from './cartesianSeries'; | ||
import { CartesianSeries, CartesianSeriesNodeClickEvent } from './cartesianSeries'; | ||
export interface BubbleNodeDatum extends Required<CartesianSeriesNodeDatum> { | ||
readonly sizeValue: any; | ||
readonly label: MeasuredLabel; | ||
readonly fill: string | undefined; | ||
} | ||
type BubbleAnimationData = CartesianAnimationData<Group, BubbleNodeDatum>; | ||
@@ -67,3 +62,2 @@ declare class BubbleSeriesNodeClickEvent<TEvent extends string = SeriesNodeEventTypes> extends CartesianSeriesNodeClickEvent<TEvent> { | ||
animateEmptyUpdateReady({ markerSelections, labelSelections }: BubbleAnimationData): void; | ||
getDatumId(datum: BubbleNodeDatum): string; | ||
protected isLabelEnabled(): boolean; | ||
@@ -70,0 +64,0 @@ protected nodeFactory(): Group; |
import type { AgBubbleSeriesLabelFormatterParams, AgBubbleSeriesOptions, AgBubbleSeriesOptionsKeys, AgBubbleSeriesTooltipRendererParams } from '../../../options/agChartOptions'; | ||
import type { MeasuredLabel } from '../../../scene/util/labelPlacement'; | ||
import { Label } from '../../label'; | ||
import { SeriesMarker } from '../seriesMarker'; | ||
import { SeriesTooltip } from '../seriesTooltip'; | ||
import type { BubbleNodeDatum } from './bubbleSeries'; | ||
import { CartesianSeriesProperties } from './cartesianSeries'; | ||
import { CartesianSeriesNodeDatum, CartesianSeriesProperties } from './cartesianSeries'; | ||
export interface BubbleNodeDatum extends Required<CartesianSeriesNodeDatum> { | ||
readonly sizeValue: any; | ||
readonly label: MeasuredLabel; | ||
readonly fill: string | undefined; | ||
} | ||
declare class BubbleSeriesMarker extends SeriesMarker<AgBubbleSeriesOptionsKeys, BubbleNodeDatum> { | ||
@@ -8,0 +13,0 @@ /** |
@@ -9,3 +9,4 @@ import type { AnimationValue } from '../../../motion/animation'; | ||
import { Text } from '../../../scene/shape/text'; | ||
import type { PointLabelDatum } from '../../../util/labelPlacement'; | ||
import type { PointLabelDatum } from '../../../scene/util/labelPlacement'; | ||
import type { ChartAnimationPhase } from '../../chartAnimationPhase'; | ||
import { ChartAxisDirection } from '../../chartAxisDirection'; | ||
@@ -40,2 +41,3 @@ import type { LegendItemClickChartEvent, LegendItemDoubleClickChartEvent } from '../../interaction/chartEventManager'; | ||
markerSelectionGarbageCollection: boolean; | ||
animationAlwaysUpdateSelections: boolean; | ||
animationResetFns?: { | ||
@@ -59,3 +61,3 @@ path?: (path: Path) => Partial<Path>; | ||
type CartesianAnimationState = 'empty' | 'ready' | 'waiting' | 'clearing'; | ||
type CartesianAnimationEvent = 'update' | 'updateData' | 'highlight' | 'highlightMarkers' | 'resize' | 'clear'; | ||
type CartesianAnimationEvent = 'update' | 'updateData' | 'highlight' | 'highlightMarkers' | 'resize' | 'clear' | 'reset' | 'skip'; | ||
export interface CartesianAnimationData<TNode extends Node, TDatum extends CartesianSeriesNodeDatum, TLabel extends SeriesNodeDatum = TDatum, TContext extends CartesianSeriesNodeDataContext<TDatum, TLabel> = CartesianSeriesNodeDataContext<TDatum, TLabel>> { | ||
@@ -95,3 +97,4 @@ datumSelections: Selection<TNode, TDatum>[]; | ||
protected animationState: StateMachine<CartesianAnimationState, CartesianAnimationEvent>; | ||
protected constructor({ pathsPerSeries, hasMarkers, hasHighlightedLabels, pathsZIndexSubOrderOffset, directionKeys, directionNames, datumSelectionGarbageCollection, markerSelectionGarbageCollection, animationResetFns, ...otherOpts }: Partial<SeriesOpts<TNode, TDatum, TLabel>> & ConstructorParameters<typeof DataModelSeries>[0]); | ||
protected constructor({ pathsPerSeries, hasMarkers, hasHighlightedLabels, pathsZIndexSubOrderOffset, directionKeys, directionNames, datumSelectionGarbageCollection, markerSelectionGarbageCollection, animationAlwaysUpdateSelections, animationResetFns, ...otherOpts }: Partial<SeriesOpts<TNode, TDatum, TLabel>> & ConstructorParameters<typeof DataModelSeries>[0]); | ||
resetAnimation(phase: ChartAnimationPhase): void; | ||
addChartEventListeners(): void; | ||
@@ -98,0 +101,0 @@ destroy(): void; |
import type { ModuleContext } from '../../../module/moduleContext'; | ||
import type { FontStyle, FontWeight } from '../../../options/chart/types'; | ||
import type { Selection } from '../../../scene/selection'; | ||
@@ -9,26 +8,4 @@ import { Rect } from '../../../scene/shape/rect'; | ||
import type { CategoryLegendDatum, ChartLegendType } from '../../legendDatum'; | ||
import { type CartesianAnimationData, CartesianSeries, type CartesianSeriesNodeDatum } from './cartesianSeries'; | ||
import { HistogramSeriesProperties } from './histogramSeriesProperties'; | ||
export interface HistogramNodeDatum extends CartesianSeriesNodeDatum { | ||
readonly x: number; | ||
readonly y: number; | ||
readonly width: number; | ||
readonly height: number; | ||
readonly fill?: string; | ||
readonly stroke?: string; | ||
readonly strokeWidth: number; | ||
readonly aggregatedValue: number; | ||
readonly frequency: number; | ||
readonly domain: [number, number]; | ||
readonly label?: { | ||
readonly text: string; | ||
readonly x: number; | ||
readonly y: number; | ||
readonly fontStyle?: FontStyle; | ||
readonly fontWeight?: FontWeight; | ||
readonly fontSize: number; | ||
readonly fontFamily: string; | ||
readonly fill: string; | ||
}; | ||
} | ||
import { type CartesianAnimationData, CartesianSeries } from './cartesianSeries'; | ||
import { HistogramNodeDatum, HistogramSeriesProperties } from './histogramSeriesProperties'; | ||
type HistogramAnimationData = CartesianAnimationData<Rect, HistogramNodeDatum>; | ||
@@ -79,5 +56,4 @@ export declare class HistogramSeries extends CartesianSeries<Rect, HistogramNodeDatum> { | ||
animateWaitingUpdateReady(data: HistogramAnimationData): void; | ||
getDatumId(datum: HistogramNodeDatum): string; | ||
protected isLabelEnabled(): boolean; | ||
} | ||
export {}; |
@@ -1,7 +0,29 @@ | ||
import type { AgHistogramSeriesLabelFormatterParams, AgHistogramSeriesOptions, AgHistogramSeriesTooltipRendererParams } from '../../../options/agChartOptions'; | ||
import type { AgHistogramSeriesLabelFormatterParams, AgHistogramSeriesOptions, AgHistogramSeriesTooltipRendererParams, FontStyle, FontWeight } from '../../../options/agChartOptions'; | ||
import { DropShadow } from '../../../scene/dropShadow'; | ||
import { Label } from '../../label'; | ||
import { SeriesTooltip } from '../seriesTooltip'; | ||
import { CartesianSeriesProperties } from './cartesianSeries'; | ||
import type { HistogramNodeDatum } from './histogramSeries'; | ||
import { CartesianSeriesNodeDatum, CartesianSeriesProperties } from './cartesianSeries'; | ||
export interface HistogramNodeDatum extends CartesianSeriesNodeDatum { | ||
readonly x: number; | ||
readonly y: number; | ||
readonly width: number; | ||
readonly height: number; | ||
readonly fill?: string; | ||
readonly stroke?: string; | ||
readonly opacity?: number; | ||
readonly strokeWidth: number; | ||
readonly aggregatedValue: number; | ||
readonly frequency: number; | ||
readonly domain: [number, number]; | ||
readonly label?: { | ||
readonly text: string; | ||
readonly x: number; | ||
readonly y: number; | ||
readonly fontStyle?: FontStyle; | ||
readonly fontWeight?: FontWeight; | ||
readonly fontSize: number; | ||
readonly fontFamily: string; | ||
readonly fill: string; | ||
}; | ||
} | ||
export declare class HistogramSeriesProperties extends CartesianSeriesProperties<AgHistogramSeriesOptions> { | ||
@@ -8,0 +30,0 @@ xKey: string; |
import type { ModuleContext } from '../../../module/moduleContext'; | ||
import type { FontStyle, FontWeight } from '../../../options/agChartOptions'; | ||
import { Group } from '../../../scene/group'; | ||
@@ -11,21 +10,5 @@ import type { Selection } from '../../../scene/selection'; | ||
import type { Marker } from '../../marker/marker'; | ||
import type { ErrorBoundSeriesNodeDatum } from '../seriesTypes'; | ||
import type { CartesianAnimationData, CartesianSeriesNodeDataContext, CartesianSeriesNodeDatum } from './cartesianSeries'; | ||
import type { CartesianAnimationData, CartesianSeriesNodeDataContext } from './cartesianSeries'; | ||
import { CartesianSeries } from './cartesianSeries'; | ||
import { LineSeriesProperties } from './lineSeriesProperties'; | ||
export interface LineNodeDatum extends CartesianSeriesNodeDatum, ErrorBoundSeriesNodeDatum { | ||
readonly point: CartesianSeriesNodeDatum['point'] & { | ||
readonly moveTo: boolean; | ||
}; | ||
readonly label?: { | ||
readonly text: string; | ||
readonly fontStyle?: FontStyle; | ||
readonly fontWeight?: FontWeight; | ||
readonly fontSize: number; | ||
readonly fontFamily: string; | ||
readonly textAlign: CanvasTextAlign; | ||
readonly textBaseline: CanvasTextBaseline; | ||
readonly fill: string; | ||
}; | ||
} | ||
import { LineNodeDatum, LineSeriesProperties } from './lineSeriesProperties'; | ||
type LineAnimationData = CartesianAnimationData<Group, LineNodeDatum>; | ||
@@ -84,3 +67,2 @@ export declare class LineSeries extends CartesianSeries<Group, LineNodeDatum> { | ||
protected animateWaitingUpdateReady(animationData: LineAnimationData): void; | ||
private getDatumId; | ||
protected isLabelEnabled(): boolean; | ||
@@ -87,0 +69,0 @@ getBandScalePadding(): { |
@@ -1,7 +0,22 @@ | ||
import type { AgLineSeriesLabelFormatterParams, AgLineSeriesOptions, AgLineSeriesOptionsKeys, AgLineSeriesTooltipRendererParams } from '../../../options/agChartOptions'; | ||
import type { AgLineSeriesLabelFormatterParams, AgLineSeriesOptions, AgLineSeriesOptionsKeys, AgLineSeriesTooltipRendererParams, FontStyle, FontWeight } from '../../../options/agChartOptions'; | ||
import { Label } from '../../label'; | ||
import { SeriesMarker } from '../seriesMarker'; | ||
import { SeriesTooltip } from '../seriesTooltip'; | ||
import { CartesianSeriesProperties } from './cartesianSeries'; | ||
import type { LineNodeDatum } from './lineSeries'; | ||
import type { ErrorBoundSeriesNodeDatum } from '../seriesTypes'; | ||
import { CartesianSeriesNodeDatum, CartesianSeriesProperties } from './cartesianSeries'; | ||
export interface LineNodeDatum extends CartesianSeriesNodeDatum, ErrorBoundSeriesNodeDatum { | ||
readonly point: CartesianSeriesNodeDatum['point'] & { | ||
readonly moveTo: boolean; | ||
}; | ||
readonly label?: { | ||
readonly text: string; | ||
readonly fontStyle?: FontStyle; | ||
readonly fontWeight?: FontWeight; | ||
readonly fontSize: number; | ||
readonly fontFamily: string; | ||
readonly textAlign: CanvasTextAlign; | ||
readonly textBaseline: CanvasTextBaseline; | ||
readonly fill: string; | ||
}; | ||
} | ||
export declare class LineSeriesProperties extends CartesianSeriesProperties<AgLineSeriesOptions> { | ||
@@ -8,0 +23,0 @@ xKey: string; |
@@ -55,4 +55,3 @@ import type { Path } from '../../../scene/shape/path'; | ||
}; | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
} | { | ||
@@ -62,11 +61,8 @@ start: { | ||
}; | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
toFn: (_path: Path) => { | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -80,7 +76,6 @@ }; | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
opacity: number; | ||
translationX: number | undefined; | ||
translationY: number | undefined; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -90,7 +85,6 @@ toFn: (_marker: import("../../marker/marker").Marker, datum: PathNodeDatumLike) => { | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
translationX: number | undefined; | ||
translationY: number | undefined; | ||
opacity: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -110,4 +104,3 @@ }; | ||
}; | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
} | { | ||
@@ -117,11 +110,8 @@ start: { | ||
}; | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
toFn: (_path: Path) => { | ||
animationDuration: number; | ||
animationDelay: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -128,0 +118,0 @@ }; |
@@ -34,7 +34,6 @@ import type { NodeUpdateState } from '../../../motion/fromToMotion'; | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
opacity: number; | ||
translationX: number | undefined; | ||
translationY: number | undefined; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
@@ -44,9 +43,8 @@ toFn: (_marker: Marker, datum: PathNodeDatumLike) => { | ||
} | { | ||
animationDuration: number; | ||
animationDelay: number; | ||
translationX: number | undefined; | ||
translationY: number | undefined; | ||
opacity: number; | ||
phase: "trailing" | "end" | "initial" | "remove" | "update" | "add"; | ||
}; | ||
}; | ||
export {}; |
@@ -32,9 +32,9 @@ import type { Point } from '../../../scene/point'; | ||
export declare function renderPartialPath(pairData: PathPoint[], ratios: Partial<Record<PathPointChange, number>>, path: Path): void; | ||
export declare function pathSwipeInAnimation({ id, visible }: { | ||
export declare function pathSwipeInAnimation({ id, visible, nodeDataDependencies }: { | ||
id: string; | ||
visible: boolean; | ||
}, animationManager: AnimationManager, paths: Path[]): void; | ||
} & NodeDataDependant, animationManager: AnimationManager, paths: Path[]): void; | ||
export declare function pathFadeInAnimation<T>({ id }: { | ||
id: string; | ||
}, subId: string, animationManager: AnimationManager, selection: Selection<Path, T>[] | Path[]): void; | ||
}, subId: string, animationManager: AnimationManager, selection: Selection<Path, T>[] | Path[], phase?: 'add' | 'trailing'): void; | ||
export declare function pathFadeOutAnimation<T>({ id }: { | ||
@@ -41,0 +41,0 @@ id: string; |
@@ -6,3 +6,3 @@ import type { ModuleContext } from '../../../module/moduleContext'; | ||
import type { Text } from '../../../scene/shape/text'; | ||
import type { MeasuredLabel, PointLabelDatum } from '../../../util/labelPlacement'; | ||
import type { PointLabelDatum } from '../../../scene/util/labelPlacement'; | ||
import { ChartAxisDirection } from '../../chartAxisDirection'; | ||
@@ -12,10 +12,5 @@ import type { DataController } from '../../data/dataController'; | ||
import type { Marker } from '../../marker/marker'; | ||
import type { ErrorBoundSeriesNodeDatum } from '../seriesTypes'; | ||
import type { CartesianAnimationData, CartesianSeriesNodeDatum } from './cartesianSeries'; | ||
import type { CartesianAnimationData } from './cartesianSeries'; | ||
import { CartesianSeries } from './cartesianSeries'; | ||
import { ScatterSeriesProperties } from './scatterSeriesProperties'; | ||
export interface ScatterNodeDatum extends Required<CartesianSeriesNodeDatum>, ErrorBoundSeriesNodeDatum { | ||
readonly label: MeasuredLabel; | ||
readonly fill: string | undefined; | ||
} | ||
import { ScatterNodeDatum, ScatterSeriesProperties } from './scatterSeriesProperties'; | ||
type ScatterAnimationData = CartesianAnimationData<Group, ScatterNodeDatum>; | ||
@@ -22,0 +17,0 @@ export declare class ScatterSeries extends CartesianSeries<Group, ScatterNodeDatum> { |
import type { AgScatterSeriesLabelFormatterParams, AgScatterSeriesOptions, AgScatterSeriesOptionsKeys, AgScatterSeriesTooltipRendererParams } from '../../../options/agChartOptions'; | ||
import type { MeasuredLabel } from '../../../scene/util/labelPlacement'; | ||
import { Label } from '../../label'; | ||
import { SeriesMarker } from '../seriesMarker'; | ||
import { SeriesTooltip } from '../seriesTooltip'; | ||
import { CartesianSeriesProperties } from './cartesianSeries'; | ||
import type { ScatterNodeDatum } from './scatterSeries'; | ||
import type { ErrorBoundSeriesNodeDatum } from '../seriesTypes'; | ||
import { CartesianSeriesNodeDatum, CartesianSeriesProperties } from './cartesianSeries'; | ||
export interface ScatterNodeDatum extends Required<CartesianSeriesNodeDatum>, ErrorBoundSeriesNodeDatum { | ||
readonly label: MeasuredLabel; | ||
readonly fill: string | undefined; | ||
} | ||
export declare class ScatterSeriesProperties extends CartesianSeriesProperties<AgScatterSeriesOptions> { | ||
@@ -8,0 +13,0 @@ xKey: string; |
@@ -1,9 +0,11 @@ | ||
import type { BBox, Point } from '../../../integrated-charts-scene'; | ||
import type { ModuleContext } from '../../../module/moduleContext'; | ||
import type { AnimationValue } from '../../../motion/animation'; | ||
import { StateMachine } from '../../../motion/states'; | ||
import type { BBox } from '../../../scene/bbox'; | ||
import type { Group } from '../../../scene/group'; | ||
import type { Node } from '../../../scene/node'; | ||
import type { Point } from '../../../scene/point'; | ||
import type { Selection } from '../../../scene/selection'; | ||
import type { PointLabelDatum } from '../../../util/labelPlacement'; | ||
import type { PointLabelDatum } from '../../../scene/util/labelPlacement'; | ||
import type { ChartAnimationPhase } from '../../chartAnimationPhase'; | ||
import type { HighlightNodeDatum } from '../../interaction/highlightManager'; | ||
@@ -15,3 +17,3 @@ import type { ChartLegendType, GradientLegendDatum } from '../../legendDatum'; | ||
type HierarchyAnimationState = 'empty' | 'ready' | 'waiting' | 'clearing'; | ||
type HierarchyAnimationEvent = 'update' | 'updateData' | 'highlight' | 'resize' | 'clear'; | ||
type HierarchyAnimationEvent = 'update' | 'updateData' | 'highlight' | 'resize' | 'clear' | 'reset' | 'skip'; | ||
export interface HierarchyAnimationData<TNode extends Node, TDatum> { | ||
@@ -53,3 +55,3 @@ datumSelections: Selection<TNode, HierarchyNode<TDatum>>[]; | ||
constructor(moduleCtx: ModuleContext); | ||
hasData(): boolean; | ||
resetAnimation(phase: ChartAnimationPhase): void; | ||
processData(): Promise<void>; | ||
@@ -56,0 +58,0 @@ protected abstract updateSelections(): Promise<void>; |
@@ -124,3 +124,3 @@ import type { ModuleContext } from '../../../module/moduleContext'; | ||
protected toggleSeriesItem(itemId: number, enabled: boolean): void; | ||
toggleOtherSeriesItems(series: PieSeries, itemId: number, enabled: boolean): void; | ||
toggleOtherSeriesItems(legendItemName: string, enabled: boolean): void; | ||
animateEmptyUpdateReady(_data?: PolarAnimationData): void; | ||
@@ -127,0 +127,0 @@ animateWaitingUpdateReady(): void; |
@@ -11,10 +11,10 @@ import type { AgPieSeriesFormat, AgPieSeriesFormatterParams, AgPieSeriesLabelFormatterParams, AgPieSeriesOptions, AgPieSeriesTooltipRendererParams } from '../../../options/series/polar/pieOptions'; | ||
} | ||
export declare class DoughnutInnerLabel<T extends object = any> extends Label<AgPieSeriesLabelFormatterParams> { | ||
text: string; | ||
margin: number; | ||
export declare class DonutInnerLabel<T extends object = any> extends Label<AgPieSeriesLabelFormatterParams> { | ||
text?: string; | ||
margin?: number; | ||
set(properties: T, _reset?: boolean): this; | ||
} | ||
export declare class DoughnutInnerCircle extends BaseProperties { | ||
fill: string; | ||
fillOpacity: number; | ||
export declare class DonutInnerCircle extends BaseProperties { | ||
fill?: string; | ||
fillOpacity?: number; | ||
} | ||
@@ -59,9 +59,9 @@ declare class PieSeriesCalloutLabel extends Label<AgPieSeriesLabelFormatterParams> { | ||
outerRadiusRatio: number; | ||
innerRadiusOffset: number; | ||
innerRadiusRatio: number; | ||
innerRadiusOffset?: number; | ||
innerRadiusRatio?: number; | ||
strokeWidth: number; | ||
sectorSpacing?: number; | ||
readonly innerLabels: PropertiesArray<DoughnutInnerLabel<any>>; | ||
readonly innerLabels: PropertiesArray<DonutInnerLabel<any>>; | ||
readonly title: PieTitle; | ||
readonly innerCircle: DoughnutInnerCircle; | ||
readonly innerCircle: DonutInnerCircle; | ||
readonly shadow: DropShadow; | ||
@@ -68,0 +68,0 @@ readonly calloutLabel: PieSeriesCalloutLabel; |
@@ -1,2 +0,2 @@ | ||
import type { FromToMotionPropFnContext, NodeUpdateState } from '../../../motion/fromToMotion'; | ||
import type { FromToMotionPropFn } from '../../../motion/fromToMotion'; | ||
import type { Sector } from '../../../scene/shape/sector'; | ||
@@ -20,30 +20,12 @@ import type { Circle } from '../../marker/circle'; | ||
nodes: { | ||
toFn: (_sect: Sector, datum: AnimatableSectorDatum, status: NodeUpdateState, { prevLive }: FromToMotionPropFnContext<Sector>) => { | ||
startAngle: number; | ||
endAngle: number; | ||
outerRadius: number; | ||
innerRadius: number; | ||
stroke: string | undefined; | ||
fill: string | undefined; | ||
}; | ||
fromFn: (sect: Sector, datum: AnimatableSectorDatum, status: NodeUpdateState, { prevFromProps }: FromToMotionPropFnContext<Sector>) => { | ||
startAngle: number; | ||
endAngle: number; | ||
innerRadius: number; | ||
outerRadius: number; | ||
fill: string | undefined; | ||
stroke: string | undefined; | ||
}; | ||
toFn: FromToMotionPropFn<Sector, any, AnimatableSectorDatum>; | ||
fromFn: FromToMotionPropFn<Sector, any, AnimatableSectorDatum>; | ||
}; | ||
innerCircle: { | ||
fromFn: (node: Circle, _datum: { | ||
fromFn: FromToMotionPropFn<Circle, any, { | ||
radius: number; | ||
}) => { | ||
size: any; | ||
}; | ||
toFn: (_node: Circle, datum: { | ||
}>; | ||
toFn: FromToMotionPropFn<Circle, any, { | ||
radius: number; | ||
}) => { | ||
size: number; | ||
}; | ||
}>; | ||
}; | ||
@@ -50,0 +32,0 @@ }; |
@@ -9,3 +9,4 @@ import type { ModuleContext } from '../../../module/moduleContext'; | ||
import { Text } from '../../../scene/shape/text'; | ||
import type { PointLabelDatum } from '../../../util/labelPlacement'; | ||
import type { PointLabelDatum } from '../../../scene/util/labelPlacement'; | ||
import type { ChartAnimationPhase } from '../../chartAnimationPhase'; | ||
import { DataModelSeries } from '../dataModelSeries'; | ||
@@ -15,3 +16,3 @@ import { SeriesNodePickMode } from '../series'; | ||
export type PolarAnimationState = 'empty' | 'ready' | 'waiting' | 'clearing'; | ||
export type PolarAnimationEvent = 'update' | 'updateData' | 'highlight' | 'highlightMarkers' | 'resize' | 'clear'; | ||
export type PolarAnimationEvent = 'update' | 'updateData' | 'highlight' | 'highlightMarkers' | 'resize' | 'clear' | 'reset' | 'skip'; | ||
export type PolarAnimationData = { | ||
@@ -21,3 +22,3 @@ duration?: number; | ||
export declare abstract class PolarSeries<TDatum extends SeriesNodeDatum, TNode extends Node> extends DataModelSeries<TDatum> { | ||
protected sectorGroup: Group; | ||
protected itemGroup: Group; | ||
protected itemSelection: Selection<TNode, TDatum>; | ||
@@ -55,2 +56,3 @@ protected labelSelection: Selection<Text, TDatum>; | ||
}); | ||
resetAnimation(phase: ChartAnimationPhase): void; | ||
protected abstract nodeFactory(): TNode; | ||
@@ -57,0 +59,0 @@ getLabelData(): PointLabelDatum[]; |
import type { ModuleContext, SeriesContext } from '../../module/moduleContext'; | ||
import { ModuleMap } from '../../module/moduleMap'; | ||
import type { SeriesOptionInstance, SeriesOptionModule, SeriesType } from '../../module/optionModules'; | ||
import type { SeriesOptionInstance, SeriesOptionModule, SeriesType } from '../../module/optionsModuleTypes'; | ||
import type { AgChartLabelFormatterParams, AgChartLabelOptions } from '../../options/agChartOptions'; | ||
@@ -10,5 +10,6 @@ import type { AgSeriesMarkerFormatterParams, AgSeriesMarkerStyle, ISeriesMarker } from '../../options/series/markerOptions'; | ||
import type { Point } from '../../scene/point'; | ||
import type { PlacedLabel, PointLabelDatum } from '../../util/labelPlacement'; | ||
import type { PlacedLabel, PointLabelDatum } from '../../scene/util/labelPlacement'; | ||
import type { TypedEvent } from '../../util/observable'; | ||
import { Observable } from '../../util/observable'; | ||
import type { ChartAnimationPhase } from '../chartAnimationPhase'; | ||
import type { ChartAxis } from '../chartAxis'; | ||
@@ -57,3 +58,3 @@ import { ChartAxisDirection } from '../chartAxisDirection'; | ||
}): (import("../data/dataModel").GroupValueProcessorDefinition<any, any> | import("../data/dataModel").AggregatePropertyDefinition<any, any, [number, number], [number, number]> | DatumPropertyDefinition<K>)[]; | ||
export type SeriesNodeEventTypes = 'nodeClick' | 'nodeDoubleClick'; | ||
export type SeriesNodeEventTypes = 'nodeClick' | 'nodeDoubleClick' | 'groupingChanged'; | ||
interface INodeClickEvent<TEvent extends string = SeriesNodeEventTypes> extends TypedEvent { | ||
@@ -86,2 +87,9 @@ readonly type: TEvent; | ||
export type SeriesModuleMap = ModuleMap<SeriesOptionModule, SeriesOptionInstance, SeriesContext>; | ||
export declare class SeriesGroupingChangedEvent implements TypedEvent { | ||
series: Series<any>; | ||
seriesGrouping: SeriesGrouping | undefined; | ||
oldGrouping: SeriesGrouping | undefined; | ||
type: string; | ||
constructor(series: Series<any>, seriesGrouping: SeriesGrouping | undefined, oldGrouping: SeriesGrouping | undefined); | ||
} | ||
export declare abstract class Series<TDatum extends SeriesNodeDatum, TLabel = TDatum, TContext extends SeriesNodeDataContext<TDatum, TLabel> = SeriesNodeDataContext<TDatum, TLabel>> extends Observable implements ISeries<TDatum> { | ||
@@ -107,2 +115,3 @@ protected destroyFns: (() => void)[]; | ||
mode: ChartMode; | ||
isMiniChart: boolean; | ||
placeLabels(): Map<Series<any>, PlacedLabel[]>; | ||
@@ -125,3 +134,2 @@ seriesRect?: BBox; | ||
setChartData(input: unknown[]): void; | ||
hasData(): boolean | undefined; | ||
private onSeriesGroupingChange; | ||
@@ -154,2 +162,3 @@ getBandScalePadding(): { | ||
destroy(): void; | ||
abstract resetAnimation(chartAnimationPhase: ChartAnimationPhase): void; | ||
private getDirectionValues; | ||
@@ -156,0 +165,0 @@ getKeys(direction: ChartAxisDirection): string[]; |
import type { AgSeriesMarkerFormatterParams, AgSeriesMarkerStyle, ISeriesMarker } from '../../options/series/markerOptions'; | ||
import { BaseProperties } from '../../util/properties'; | ||
import { ChangeDetectableProperties } from '../../scene/util/changeDetectableProperties'; | ||
import type { RequireOptional } from '../../util/types'; | ||
import type { MarkerShape } from '../marker/util'; | ||
export declare class SeriesMarker<TParams = never, TDatum = any> extends BaseProperties implements ISeriesMarker<TDatum, RequireOptional<TParams>> { | ||
export declare class SeriesMarker<TParams = never, TDatum = any> extends ChangeDetectableProperties implements ISeriesMarker<TDatum, RequireOptional<TParams>> { | ||
enabled: boolean; | ||
@@ -7,0 +7,0 @@ /** One of the predefined marker names, or a marker constructor function (for user-defined markers). */ |
@@ -19,9 +19,11 @@ export type SeriesGrouping = { | ||
}): void; | ||
getVisiblePeerGroupIndex({ type, seriesGrouping }: { | ||
getVisiblePeerGroupIndex({ type, seriesGrouping, visible, }: { | ||
type: string; | ||
seriesGrouping?: SeriesGrouping; | ||
visible: boolean; | ||
}): { | ||
visibleGroupCount: number; | ||
visibleSameStackCount: number; | ||
index: number; | ||
}; | ||
} |
import type { BBox } from '../../scene/bbox'; | ||
import type { Group } from '../../scene/group'; | ||
import type { Point, SizedPoint } from '../../scene/point'; | ||
import type { ChartAxis } from '../chartAxis'; | ||
import type { ChartAxisDirection } from '../chartAxisDirection'; | ||
import type { ChartLegendDatum, ChartLegendType } from '../legendDatum'; | ||
import type { SeriesProperties } from './seriesProperties'; | ||
interface ChartAxisLike { | ||
id: string; | ||
} | ||
export interface ISeries<TDatum> { | ||
id: string; | ||
axes: Record<ChartAxisDirection, ChartAxis | undefined>; | ||
axes: Record<ChartAxisDirection, ChartAxisLike | undefined>; | ||
contentGroup: Group; | ||
@@ -49,2 +51,3 @@ properties: SeriesProperties<any>; | ||
}; | ||
readonly cumulativeValue?: number; | ||
xBar?: { | ||
@@ -66,1 +69,2 @@ lowerPoint: Point; | ||
}; | ||
export {}; |
import type { AgChartTheme, AgChartThemePalette } from '../../options/agChartOptions'; | ||
export declare function resolvePartialPalette(partialPalette: Partial<AgChartThemePalette> | null, basePalette: AgChartThemePalette): AgChartThemePalette | null; | ||
export declare function resolvePartialPalette(partialPalette: Partial<AgChartThemePalette> | null | undefined, basePalette: AgChartThemePalette): AgChartThemePalette | null; | ||
export declare class ChartTheme { | ||
@@ -21,2 +21,5 @@ readonly palette: AgChartThemePalette; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -26,2 +29,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -31,2 +37,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -33,0 +42,0 @@ getTemplateParameters(): { |
@@ -1,26 +0,33 @@ | ||
import type { AgChartLegendPosition, AgPolarAxisShape, FontWeight } from '../../options/agChartOptions'; | ||
export declare const FONT_SIZE: { | ||
SMALL: number; | ||
MEDIUM: number; | ||
LARGE: number; | ||
}; | ||
export declare const FONT_WEIGHT: Record<'NORMAL' | 'BOLD' | 'BOLDER' | 'LIGHTER', FontWeight>; | ||
export declare const BOTTOM: AgChartLegendPosition; | ||
export declare const CARTESIAN_AXIS_POSITIONS: { | ||
BOTTOM: "bottom"; | ||
LEFT: "left"; | ||
TOP: "top"; | ||
}; | ||
export declare const CARTESIAN_AXIS_TYPES: { | ||
CATEGORY: "category"; | ||
NUMBER: "number"; | ||
TIME: "time"; | ||
LOG: "log"; | ||
}; | ||
export declare const POLAR_AXIS_TYPES: { | ||
ANGLE_CATEGORY: "angle-category"; | ||
ANGLE_NUMBER: "angle-number"; | ||
RADIUS_CATEGORY: "radius-category"; | ||
RADIUS_NUMBER: "radius-number"; | ||
}; | ||
export declare const CIRCLE: AgPolarAxisShape; | ||
export declare enum FONT_SIZE { | ||
SMALL = 12, | ||
MEDIUM = 13, | ||
LARGE = 17 | ||
} | ||
export declare enum FONT_WEIGHT { | ||
NORMAL = "normal", | ||
BOLD = "bold", | ||
BOLDER = "bolder", | ||
LIGHTER = "lighter" | ||
} | ||
export declare enum POSITION { | ||
TOP = "top", | ||
RIGHT = "right", | ||
BOTTOM = "bottom", | ||
LEFT = "left" | ||
} | ||
export declare enum CARTESIAN_AXIS_TYPE { | ||
CATEGORY = "category", | ||
NUMBER = "number", | ||
TIME = "time", | ||
LOG = "log" | ||
} | ||
export declare enum POLAR_AXIS_TYPE { | ||
ANGLE_CATEGORY = "angle-category", | ||
ANGLE_NUMBER = "angle-number", | ||
RADIUS_CATEGORY = "radius-category", | ||
RADIUS_NUMBER = "radius-number" | ||
} | ||
export declare enum POLAR_AXIS_SHAPE { | ||
CIRCLE = "circle", | ||
POLYGON = "polygon" | ||
} |
@@ -7,2 +7,5 @@ import type { AgChartThemeOptions, AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -0,1 +1,2 @@ | ||
export declare const IS_DARK_THEME: string; | ||
export declare const EXTENDS_CHART_DEFAULTS: string; | ||
@@ -2,0 +3,0 @@ export declare const EXTENDS_LEGEND_DEFAULTS: string; |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
@@ -7,2 +7,5 @@ import type { AgChartThemePalette } from '../../options/agChartOptions'; | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -12,2 +15,5 @@ protected static getWaterfallSeriesDefaultNegativeColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -17,2 +23,5 @@ protected static getWaterfallSeriesDefaultTotalColors(): { | ||
stroke: string; | ||
label: { | ||
color: string; | ||
}; | ||
}; | ||
@@ -19,0 +28,0 @@ getTemplateParameters(): { |
import type { AgTooltipRendererResult, InteractionRange, TextWrap } from '../../options/agChartOptions'; | ||
import { BaseProperties } from '../../util/properties'; | ||
import type { InteractionEvent } from '../interaction/interactionManager'; | ||
export interface TooltipMeta { | ||
pageX: number; | ||
pageY: number; | ||
offsetX: number; | ||
offsetY: number; | ||
import type { InteractionEvent, PointerOffsets } from '../interaction/interactionManager'; | ||
export type TooltipMeta = PointerOffsets & { | ||
showArrow?: boolean; | ||
lastPointerEvent: PointerOffsets; | ||
position?: { | ||
@@ -15,5 +12,4 @@ xOffset?: number; | ||
enableInteraction?: boolean; | ||
event: Event | InteractionEvent<any>; | ||
addCustomClass?: boolean; | ||
} | ||
}; | ||
export declare function toTooltipHtml(input: string | AgTooltipRendererResult, defaults?: AgTooltipRendererResult): string; | ||
@@ -43,2 +39,3 @@ type TooltipPositionType = 'pointer' | 'node'; | ||
wrapping: TextWrap; | ||
darkTheme: boolean; | ||
private lastVisibilityChange; | ||
@@ -45,0 +42,0 @@ readonly position: TooltipPosition; |
import type { LayoutService } from '../layout/layoutService'; | ||
import type { ChartLike } from './processor'; | ||
export declare class BaseLayoutProcessor { | ||
import type { ChartLike, UpdateProcessor } from './processor'; | ||
export declare class BaseLayoutProcessor implements UpdateProcessor { | ||
private readonly chartLike; | ||
@@ -5,0 +5,0 @@ private readonly layoutService; |
@@ -0,1 +1,2 @@ | ||
import type { Scale } from '../../scale/scale'; | ||
import type { Group } from '../../scene/group'; | ||
@@ -6,2 +7,4 @@ import type { Padding } from '../../util/padding'; | ||
export interface ChartLike { | ||
axes: Array<AxisLike>; | ||
series: Array<SeriesLike>; | ||
seriesArea: { | ||
@@ -16,4 +19,13 @@ clip?: boolean; | ||
} | ||
export interface AxisLike { | ||
id: string; | ||
type: string; | ||
scale: Scale<any, any>; | ||
} | ||
export interface SeriesLike { | ||
data?: any[]; | ||
visible: boolean; | ||
} | ||
export interface UpdateProcessor { | ||
destroy(): void; | ||
} |
import type { BBox } from '../scene/bbox'; | ||
import { Listeners } from '../util/listeners'; | ||
import { ChartUpdateType } from './chartUpdateType'; | ||
type UpdateCallback = (type: ChartUpdateType, options: { | ||
forceNodeDataRefresh?: boolean; | ||
skipAnimations?: boolean; | ||
}) => void; | ||
import type { ISeries } from './series/seriesTypes'; | ||
type UpdateCallback = (type: ChartUpdateType, opts?: UpdateOpts) => void; | ||
export interface UpdateCompleteEvent { | ||
@@ -12,11 +10,16 @@ type: 'update-complete'; | ||
} | ||
export type UpdateOpts = { | ||
forceNodeDataRefresh?: boolean; | ||
skipAnimations?: boolean; | ||
newAnimationBatch?: boolean; | ||
seriesToUpdate?: Iterable<ISeries<any>>; | ||
backOffMs?: number; | ||
skipSync?: boolean; | ||
}; | ||
export declare class UpdateService extends Listeners<'update-complete', (event: UpdateCompleteEvent) => void> { | ||
private updateCallback; | ||
private readonly updateCallback; | ||
constructor(updateCallback: UpdateCallback); | ||
update(type?: ChartUpdateType, { forceNodeDataRefresh, skipAnimations }?: { | ||
forceNodeDataRefresh?: boolean | undefined; | ||
skipAnimations?: boolean | undefined; | ||
}): void; | ||
update(type?: ChartUpdateType, options?: UpdateOpts): void; | ||
dispatchUpdateComplete(minRect?: BBox): void; | ||
} | ||
export {}; |
@@ -16,2 +16,3 @@ import * as fromToMotion from './motion/fromToMotion'; | ||
export { Sector } from './scene/shape/sector'; | ||
export { RadialColumnShape, getRadialColumnWidth } from './scene/shape/radialColumnShape'; | ||
export { Shape } from './scene/shape/shape'; | ||
@@ -44,7 +45,7 @@ export type { ShapeLineCap } from './scene/shape/shape'; | ||
fromToMotion<N_1 extends import("./scene/node").Node, T_1 extends Record<string, string | number | undefined> & Partial<N_1>, D_1>(groupId: string, subId: string, animationManager: import("./module-support").AnimationManager, selectionsOrNodes: import("./scene/selection").Selection<N_1, D_1>[] | N_1[], fns: fromToMotion.FromToFns<N_1, T_1, D_1>, getDatumId?: ((node: N_1, datum: D_1) => string) | undefined, diff?: fromToMotion.FromToDiff | undefined): void; | ||
staticFromToMotion<N_2 extends import("./scene/node").Node, T_2 extends Record<string, string | number | undefined> & Partial<N_2> & object, D_2>(groupId: string, subId: string, animationManager: import("./module-support").AnimationManager, selectionsOrNodes: import("./scene/selection").Selection<N_2, D_2>[] | N_2[], from: T_2, to: T_2, extraOpts?: fromToMotion.ExtraOpts<N_2>): void; | ||
staticFromToMotion<N_2 extends import("./scene/node").Node, T_2 extends Record<string, string | number | undefined> & Partial<N_2> & object, D_2>(groupId: string, subId: string, animationManager: import("./module-support").AnimationManager, selectionsOrNodes: import("./scene/selection").Selection<N_2, D_2>[] | N_2[], from: T_2, to: T_2, extraOpts: fromToMotion.ExtraOpts<N_2>): void; | ||
NODE_UPDATE_PHASES: fromToMotion.NodeUpdateState[]; | ||
FROM_TO_MIXINS: Record<fromToMotion.NodeUpdateState, import("./module-support").AnimationTiming>; | ||
NODE_UPDATE_STATE_TO_PHASE_MAPPING: Record<fromToMotion.NodeUpdateState, "trailing" | "end" | "initial" | "remove" | "update" | "add">; | ||
}; | ||
export { motion }; | ||
export type { NodeUpdateState, FromToMotionPropFn } from './motion/fromToMotion'; |
@@ -7,2 +7,3 @@ export * from './util/array'; | ||
export * from './util/deprecation'; | ||
export * from './util/json'; | ||
export * from './util/number'; | ||
@@ -12,9 +13,10 @@ export * from './util/object'; | ||
export * from './util/proxy'; | ||
export * from './util/shapes'; | ||
export * from './scene/util/shapes'; | ||
export * from './util/types'; | ||
export * from './util/type-guards'; | ||
export * from './util/theme'; | ||
export * from './module/theme'; | ||
export * from './module/baseModule'; | ||
export * from './module/coreModules'; | ||
export * from './module/optionModules'; | ||
export * from './module/optionsModule'; | ||
export * from './module/optionsModuleTypes'; | ||
export * from './module/module'; | ||
@@ -25,2 +27,4 @@ export * from './module/moduleContext'; | ||
export * from './chart/background/backgroundModule'; | ||
export * from './chart/navigator/navigator'; | ||
export * from './chart/navigator/navigatorModule'; | ||
export * from './chart/chartAxisDirection'; | ||
@@ -31,2 +35,3 @@ export { assignJsonApplyConstructedArray } from './chart/chartOptions'; | ||
export * from './chart/data/dataController'; | ||
export * from './chart/data/dataService'; | ||
export * from './chart/data/processors'; | ||
@@ -38,5 +43,7 @@ export * from './chart/data/aggregateFunctions'; | ||
export * from './chart/interaction/chartEventManager'; | ||
export * from './chart/interaction/contextMenuRegistry'; | ||
export * from './chart/interaction/cursorManager'; | ||
export * from './chart/interaction/highlightManager'; | ||
export * from './chart/interaction/interactionManager'; | ||
export * from './chart/interaction/gestureDetector'; | ||
export * from './chart/interaction/tooltipManager'; | ||
@@ -68,2 +75,3 @@ export * from './chart/interaction/zoomManager'; | ||
export * from './chart/axis/categoryAxis'; | ||
export * from './chart/axis/groupedCategoryAxis'; | ||
export * from './chart/axis/cartesianAxis'; | ||
@@ -70,0 +78,0 @@ export * from './chart/chartAxis'; |
@@ -1,3 +0,18 @@ | ||
import type { JsonApplyParams } from '../util/json'; | ||
import type { DataController } from '../chart/data/dataController'; | ||
import type { BBox } from '../scene/bbox'; | ||
export interface ModuleInstance { | ||
processData?: (opts: { | ||
dataController: DataController; | ||
}) => Promise<void>; | ||
updateData?: (opts: { | ||
data: any; | ||
}) => Promise<void>; | ||
performLayout?: (opts: { | ||
shrinkRect: BBox; | ||
}) => Promise<{ | ||
shrinkRect: BBox; | ||
}>; | ||
performCartesianLayout?: (opts: { | ||
seriesRect: BBox; | ||
}) => Promise<void>; | ||
destroy(): void; | ||
@@ -10,3 +25,2 @@ } | ||
identifier?: string; | ||
optionConstructors?: JsonApplyParams['constructors']; | ||
} |
import type { ChartAxis } from '../chart/chartAxis'; | ||
import type { ChartLegend, ChartLegendType } from '../chart/legendDatum'; | ||
import type { Series } from '../chart/series/series'; | ||
import type { AgChartOptions, AgChartThemeOverrides, AgChartThemePalette } from '../options/agChartOptions'; | ||
import type { AgChartOptions, AgChartThemeOverrides } from '../options/agChartOptions'; | ||
import type { BaseModule, ModuleInstance } from './baseModule'; | ||
import type { SeriesPaletteFactory } from './coreModulesTypes'; | ||
import type { ModuleContext } from './moduleContext'; | ||
export type AxisConstructor = new (moduleContext: ModuleContext) => ChartAxis; | ||
export type SeriesConstructor = new (moduleContext: ModuleContext) => Series<any>; | ||
export type LegendConstructor = new (moduleContext: ModuleContext) => ChartLegend; | ||
export type SeriesPaletteOptions<SeriesType extends RequiredSeriesType, SeriesOpts = NonNullable<AgChartOptions['series']>[number] & { | ||
type: SeriesType; | ||
}, ColourKeys = 'stroke' | 'fill' | 'fills' | 'strokes' | 'colors', NestedKeys = 'marker' | 'calloutLine'> = { | ||
[K in keyof SeriesOpts & ColourKeys]: NonNullable<SeriesOpts[K]>; | ||
} & { | ||
[K in keyof SeriesOpts & NestedKeys]: { | ||
[K2 in keyof NonNullable<SeriesOpts[K]> & ColourKeys]: NonNullable<NonNullable<SeriesOpts[K]>[K2]>; | ||
}; | ||
}; | ||
export interface SeriesPaletteFactoryParams { | ||
takeColors: (count: number) => { | ||
fills: string[]; | ||
strokes: string[]; | ||
}; | ||
colorsCount: number; | ||
userPalette: AgChartThemePalette | null; | ||
themeTemplateParameters: { | ||
extensions: Map<string, any>; | ||
properties: Map<string, string | string[]>; | ||
}; | ||
} | ||
export type SeriesPaletteFactory<SeriesType extends RequiredSeriesType = RequiredSeriesType> = (params: SeriesPaletteFactoryParams) => SeriesPaletteOptions<SeriesType>; | ||
export type ModuleInstanceConstructor<M> = new (moduleContext: ModuleContext) => M; | ||
export type AxisConstructor = ModuleInstanceConstructor<ChartAxis>; | ||
export type SeriesConstructor = ModuleInstanceConstructor<Series<any>>; | ||
export type LegendConstructor = ModuleInstanceConstructor<ChartLegend>; | ||
export interface RootModule<M extends ModuleInstance = ModuleInstance> extends BaseModule { | ||
type: 'root'; | ||
instanceConstructor: new (ctx: ModuleContext) => M; | ||
instanceConstructor: ModuleInstanceConstructor<M>; | ||
themeTemplate?: {}; | ||
conflicts?: Array<keyof AgChartOptions>; | ||
} | ||
@@ -57,9 +36,8 @@ export interface AxisModule extends BaseModule { | ||
}; | ||
type SeriesTheme<SeriesType extends RequiredSeriesType> = NonNullable<AgChartThemeOverrides[SeriesType]>['series']; | ||
export type ExtensibleTheme<SeriesType extends RequiredSeriesType> = Extensible<SeriesTheme<SeriesType>>; | ||
export type ExtensibleDefaults<SeriesType extends RequiredSeriesType, ChartOptions = AgChartOptions & { | ||
export type ExtensibleTheme<SeriesType extends RequiredSeriesType> = Extensible<NonNullable<AgChartThemeOverrides[SeriesType]>>; | ||
export type ExtensibleDefaults<SeriesType extends RequiredSeriesType> = Extensible<AgChartOptions & { | ||
series?: { | ||
type: SeriesType; | ||
}; | ||
}> = Extensible<ChartOptions>; | ||
}>; | ||
export type SeriesOptions<SeriesType extends RequiredSeriesType> = Extract<SeriesOptionsTypes, { | ||
@@ -81,4 +59,3 @@ type: SeriesType; | ||
swapDefaultAxesCondition?: (opts: SeriesOptions<SeriesType>) => boolean; | ||
customDefaultsFunction?: (opts: SeriesOptions<SeriesType>) => AgChartOptions; | ||
} | ||
export {}; |
import type { AgChartOptions } from '../options/chart/chartBuilderOptions'; | ||
export interface LicenseManager { | ||
setLicenseKey: (key?: string) => void; | ||
setLicenseKey: (key?: string, gridContext?: boolean) => void; | ||
validateLicense: () => void; | ||
isDisplayWatermark: () => boolean; | ||
getWatermarkMessage: () => string; | ||
getLicenseDetails: (licenseKey: string) => {}; | ||
} | ||
@@ -8,0 +9,0 @@ interface EnterpriseModuleOptions { |
@@ -1,5 +0,5 @@ | ||
import type { AgChartOptions } from '../options/agChartOptions'; | ||
import type { ModuleInstance } from './baseModule'; | ||
import type { AxisModule, LegendModule, RootModule, SeriesModule } from './coreModules'; | ||
import type { AxisOptionModule, SeriesOptionModule } from './optionModules'; | ||
import type { AxisOptionModule } from './optionsModule'; | ||
import type { SeriesOptionModule } from './optionsModuleTypes'; | ||
export type Module<M extends ModuleInstance = ModuleInstance> = RootModule<M> | AxisModule | AxisOptionModule | LegendModule | SeriesModule<any> | SeriesOptionModule; | ||
@@ -13,5 +13,1 @@ export declare abstract class BaseModuleInstance { | ||
export declare function hasRegisteredEnterpriseModules(): boolean; | ||
type AgChartOptionsKeys = keyof AgChartOptions; | ||
export declare const MODULE_CONFLICTS: Map<AgChartOptionsKeys, AgChartOptionsKeys[]>; | ||
export declare function registerModuleConflicts(source: AgChartOptionsKeys, targets: AgChartOptionsKeys[]): void; | ||
export {}; |
import type { ChartService } from '../chart/chartService'; | ||
import type { DataService } from '../chart/data/dataService'; | ||
import type { AnimationManager } from '../chart/interaction/animationManager'; | ||
import type { ChartEventManager } from '../chart/interaction/chartEventManager'; | ||
import type { ContextMenuRegistry } from '../chart/interaction/contextMenuRegistry'; | ||
import type { CursorManager } from '../chart/interaction/cursorManager'; | ||
import type { GestureDetector } from '../chart/interaction/gestureDetector'; | ||
import type { HighlightManager } from '../chart/interaction/highlightManager'; | ||
import type { InteractionManager } from '../chart/interaction/interactionManager'; | ||
import type { RegionManager } from '../chart/interaction/regionManager'; | ||
import type { SyncManager } from '../chart/interaction/syncManager'; | ||
import type { TooltipManager } from '../chart/interaction/tooltipManager'; | ||
import type { ZoomManager } from '../chart/interaction/zoomManager'; | ||
import type { LayoutService } from '../chart/layout/layoutService'; | ||
import type { SeriesLayerManager } from '../chart/series/seriesLayerManager'; | ||
import type { SeriesStateManager } from '../chart/series/seriesStateManager'; | ||
@@ -20,15 +24,19 @@ import type { UpdateService } from '../chart/updateService'; | ||
scene: Scene; | ||
callbackCache: CallbackCache; | ||
gestureDetector: GestureDetector; | ||
chartService: ChartService; | ||
dataService: DataService<any>; | ||
layoutService: LayoutService; | ||
updateService: UpdateService; | ||
animationManager: AnimationManager; | ||
chartEventManager: ChartEventManager; | ||
contextMenuRegistry: ContextMenuRegistry; | ||
cursorManager: CursorManager; | ||
highlightManager: HighlightManager; | ||
interactionManager: InteractionManager; | ||
regionManager: RegionManager; | ||
seriesStateManager: SeriesStateManager; | ||
syncManager: SyncManager; | ||
tooltipManager: TooltipManager; | ||
zoomManager: ZoomManager; | ||
chartService: ChartService; | ||
layoutService: Pick<LayoutService, 'addListener'>; | ||
updateService: UpdateService; | ||
callbackCache: CallbackCache; | ||
seriesStateManager: SeriesStateManager; | ||
seriesLayerManager: SeriesLayerManager; | ||
} | ||
@@ -40,10 +48,10 @@ export interface ModuleContextWithParent<P> extends ModuleContext { | ||
axisId: string; | ||
continuous: boolean; | ||
direction: 'x' | 'y'; | ||
position?: AgCartesianAxisPosition; | ||
direction: 'x' | 'y'; | ||
continuous: boolean; | ||
keys: () => string[]; | ||
scaleValueFormatter: (specifier: string) => ((x: any) => string) | undefined; | ||
scaleBandwidth: () => number; | ||
keys(): string[]; | ||
scaleBandwidth(): number; | ||
scaleConvert(val: any): number; | ||
scaleInvert(position: number): any; | ||
scaleValueFormatter(specifier: string): ((x: any) => string) | undefined; | ||
} | ||
@@ -50,0 +58,0 @@ export interface SeriesContext extends ModuleContext { |
@@ -13,2 +13,5 @@ import { Node } from '../scene/node'; | ||
export declare const LABEL_PHASE: AnimationTiming; | ||
export declare const ANIMATION_PHASE_ORDER: readonly ["initial", "remove", "update", "add", "trailing", "end"]; | ||
export type AnimationPhase = (typeof ANIMATION_PHASE_ORDER)[number]; | ||
export declare const ANIMATION_PHASE_TIMINGS: Record<AnimationPhase, AnimationTiming>; | ||
export type AnimationValue = number | string | undefined | Record<string, number | string | undefined>; | ||
@@ -24,7 +27,11 @@ export declare enum RepeatType { | ||
to: T; | ||
phase: AnimationPhase; | ||
skip?: boolean; | ||
autoplay?: boolean; | ||
/** Time in milliseconds to wait before starting the animation. */ | ||
/** Duration of this animation, expressed as a proportion of the total animation time. */ | ||
duration?: number; | ||
/** Delay before starting this animation, expressed as a proportion of the total animation time. */ | ||
delay?: number; | ||
duration?: number; | ||
/** If false, prevents shortening of duration to allow phase collapsing. */ | ||
collapsable?: boolean; | ||
ease?: (x: number) => number; | ||
@@ -35,9 +42,9 @@ /** Number of times to repeat the animation before stopping. Set to `0` to disable repetition. */ | ||
/** Called once when the animation is successfully completed, after all repetitions if any. */ | ||
onComplete?: (this: IAnimation<T>, self: IAnimation<T>) => void; | ||
onPlay?: (this: IAnimation<T>, self: IAnimation<T>) => void; | ||
onComplete?: (self: IAnimation) => void; | ||
onPlay?: (self: IAnimation) => void; | ||
/** Called once when then animation successfully completes or is prematurely stopped. */ | ||
onStop?: (this: IAnimation<T>, self: IAnimation<T>) => void; | ||
onRepeat?: (this: IAnimation<T>, self: IAnimation<T>) => void; | ||
onStop?: (self: IAnimation) => void; | ||
onRepeat?: (self: IAnimation) => void; | ||
/** Called once per frame with the tweened value between the `from` and `to` properties. */ | ||
onUpdate?: (this: IAnimation<T>, value: T, preInit: boolean, self: IAnimation<T>) => void; | ||
onUpdate?: (value: T, preInit: boolean, self: IAnimation) => void; | ||
} | ||
@@ -47,13 +54,14 @@ export interface AdditionalAnimationOptions { | ||
disableInteractions?: boolean; | ||
immutable?: boolean; | ||
} | ||
export type ResetAnimationOptions<T extends AnimationValue> = Pick<AnimationOptions<T>, 'from' | 'to' | 'delay' | 'duration' | 'ease'>; | ||
export interface IAnimation<T extends AnimationValue> { | ||
export interface IAnimation { | ||
readonly id: string; | ||
readonly groupId: string; | ||
readonly play: () => this; | ||
readonly pause: () => this; | ||
readonly stop: () => this; | ||
readonly reset: (opts: ResetAnimationOptions<T>) => this; | ||
readonly update: (time: number) => this; | ||
readonly phase: AnimationPhase; | ||
readonly isComplete: boolean; | ||
readonly delay: number; | ||
readonly duration: number; | ||
readonly play: () => void; | ||
readonly pause: () => void; | ||
readonly stop: () => void; | ||
readonly update: (time: number) => number; | ||
} | ||
@@ -64,11 +72,11 @@ export declare function deconstructSelectionsOrNodes<N extends Node, D>(selectionsOrNodes: Selection<N, D>[] | N[]): { | ||
}; | ||
export declare class Animation<T extends AnimationValue> implements IAnimation<T> { | ||
export declare class Animation<T extends AnimationValue> implements IAnimation { | ||
readonly id: string; | ||
readonly groupId: string; | ||
readonly phase: AnimationPhase; | ||
isComplete: boolean; | ||
readonly delay: number; | ||
readonly duration: number; | ||
protected autoplay: boolean; | ||
protected delay: number; | ||
protected duration: number; | ||
protected ease: (n: number) => number; | ||
protected repeat: number; | ||
protected repeatType: RepeatType; | ||
protected elapsed: number; | ||
@@ -81,11 +89,12 @@ protected iteration: number; | ||
private readonly onStop; | ||
private readonly onRepeat; | ||
private readonly onUpdate; | ||
private interpolate; | ||
constructor(opts: AnimationOptions<T>); | ||
play(): this; | ||
pause(): this; | ||
stop(): this; | ||
reset(opts: ResetAnimationOptions<T>): this; | ||
update(time: number): this; | ||
constructor(opts: AnimationOptions<T> & { | ||
defaultDuration: number; | ||
}); | ||
private checkCollapse; | ||
play(): void; | ||
pause(): void; | ||
stop(): void; | ||
update(time: number): number; | ||
protected get delta(): number; | ||
@@ -92,0 +101,0 @@ private createInterpolator; |
@@ -5,3 +5,3 @@ import type { ProcessedOutputDiff } from '../chart/data/dataModel'; | ||
import type { Selection } from '../scene/selection'; | ||
import type { AnimationTiming, AnimationValue } from './animation'; | ||
import type { AnimationPhase, AnimationValue } from './animation'; | ||
export type NodeUpdateState = 'unknown' | 'added' | 'removed' | 'updated'; | ||
@@ -19,10 +19,11 @@ export declare const NODE_UPDATE_PHASES: NodeUpdateState[]; | ||
export type ExtraOpts<T> = { | ||
animationDelay?: number; | ||
animationDuration?: number; | ||
phase: AnimationPhase; | ||
delay?: number; | ||
duration?: number; | ||
start?: Partial<T>; | ||
finish?: Partial<T>; | ||
}; | ||
export type FromToMotionPropFn<N extends Node, T extends Record<string, string | number | undefined> & Partial<N>, D> = (node: N, datum: D, state: NodeUpdateState, ctx: FromToMotionPropFnContext<N>) => T & ExtraOpts<N>; | ||
export type FromToMotionPropFn<N extends Node, T extends Record<string, string | number | undefined> & Partial<N>, D> = (node: N, datum: D, state: NodeUpdateState, ctx: FromToMotionPropFnContext<N>) => T & Partial<ExtraOpts<N>>; | ||
type IntermediateFn<N extends Node, D> = (node: N, datum: D, state: NodeUpdateState, ctx: FromToMotionPropFnContext<N>) => Partial<N>; | ||
export declare const FROM_TO_MIXINS: Record<NodeUpdateState, AnimationTiming>; | ||
export declare const NODE_UPDATE_STATE_TO_PHASE_MAPPING: Record<NodeUpdateState, AnimationPhase>; | ||
export type FromToDiff = Pick<ProcessedOutputDiff, 'added' | 'removed'>; | ||
@@ -59,3 +60,3 @@ export interface FromToFns<N extends Node, T extends Record<string, string | number | undefined> & Partial<N>, D> { | ||
*/ | ||
export declare function staticFromToMotion<N extends Node, T extends AnimationValue & Partial<N> & object, D>(groupId: string, subId: string, animationManager: AnimationManager, selectionsOrNodes: Selection<N, D>[] | N[], from: T, to: T, extraOpts?: ExtraOpts<N>): void; | ||
export declare function staticFromToMotion<N extends Node, T extends AnimationValue & Partial<N> & object, D>(groupId: string, subId: string, animationManager: AnimationManager, selectionsOrNodes: Selection<N, D>[] | N[], from: T, to: T, extraOpts: ExtraOpts<N>): void; | ||
export {}; |
@@ -38,2 +38,3 @@ export * from './chart/axisOptions'; | ||
export * from './series/polar/nightingaleOptions'; | ||
export * from './series/polar/donutOptions'; | ||
export * from './series/polar/pieOptions'; | ||
@@ -44,2 +45,3 @@ export * from './series/polar/polarOptions'; | ||
export * from './series/polar/radarAreaOptions'; | ||
export * from './series/polar/radialBarOptions'; | ||
export * from './series/polar/radialColumnOptions'; | ||
@@ -46,0 +48,0 @@ export * from './series/polar/radialOptions'; |
@@ -39,2 +39,3 @@ import type { CssColor, Degree, FontFamily, FontSize, FontStyle, FontWeight, PixelSize } from './types'; | ||
type: string; | ||
/** An array of keys determining which series are charted on this axis. */ | ||
keys?: string[]; | ||
@@ -41,0 +42,0 @@ /** Reverse the axis scale domain if `true`. */ |
import type { Opacity, PixelSize } from '../chart/types'; | ||
export interface AgChartBackgroundImage { | ||
/** URL of the image */ | ||
/** URL of the image. */ | ||
url: string; | ||
@@ -5,0 +5,0 @@ /** Distance from the left border of the chart to the left border of the image. If neither left nor right specified, the image is centred horizontally. */ |
@@ -27,2 +27,6 @@ import type { AgBaseCartesianChartOptions } from '../series/cartesian/cartesianOptions'; | ||
getOptions(): AgChartOptions; | ||
/** Reset animation state; treat the next AgChart.update() as-if the chart is being created from scratch. */ | ||
resetAnimations(): void; | ||
/** Skip animations on the next redraw. */ | ||
skipAnimations(): void; | ||
/** Destroy the chart instance and any allocated resources to support its rendering. */ | ||
@@ -29,0 +33,0 @@ destroy(): void; |
import type { AgAnimationOptions } from './animationOptions'; | ||
import type { AgChartBackgroundImage } from './backgroundOptions'; | ||
import type { AgContextMenuOptions } from './contextMenuOptions'; | ||
import type { AgDataSourceOptions } from './dataSourceOptions'; | ||
import type { AgBaseChartListeners } from './eventOptions'; | ||
@@ -45,2 +46,4 @@ import type { AgGradientLegendOptions } from './gradientLegendOptions'; | ||
/** An overlay to be displayed when there is no data. */ | ||
loading?: AgChartOverlayOptions; | ||
/** An overlay to be displayed when there is no data. */ | ||
noData?: AgChartOverlayOptions; | ||
@@ -55,3 +58,3 @@ /** An overlay to be displayed when there are no series visible. */ | ||
text?: string; | ||
/** Horizontal position of the text */ | ||
/** Horizontal position of the text. */ | ||
textAlign?: TextAlign; | ||
@@ -101,3 +104,24 @@ /** The font style to use for the text. */ | ||
} | ||
export interface AgBaseThemeableChartOptions { | ||
export interface AgChartSyncOptions { | ||
/** Toggles the synchronization feature. It is implicitly enabled when configuration options are provided; otherwise, it defaults to `false`. */ | ||
enabled?: boolean; | ||
/** Specifies the synchronization group identifier for the chart. Omitting this assigns the chart to a default synchronization group. */ | ||
groupId?: string; | ||
/** | ||
* Determines the axes to be synchronized across charts. | ||
* Default: `x` | ||
*/ | ||
axes?: 'x' | 'y' | 'xy'; | ||
/** | ||
* Enables synchronization of node interactions across charts. | ||
* Default: `true` | ||
*/ | ||
nodeInteraction?: boolean; | ||
/** | ||
* Enables synchronization of zoom actions across charts. | ||
* Default: `true` | ||
*/ | ||
zoom?: boolean; | ||
} | ||
export interface AgBaseThemeableChartOptions<TDatum = any> { | ||
/** The width of the chart in pixels. */ | ||
@@ -127,3 +151,3 @@ width?: PixelSize; | ||
highlight?: AgChartHighlightOptions; | ||
/** HTML overlays */ | ||
/** HTML overlays. */ | ||
overlays?: AgChartOverlaysOptions; | ||
@@ -138,2 +162,4 @@ /** Global configuration that applies to all tooltips in the chart. */ | ||
animation?: AgAnimationOptions; | ||
/** Configuration for lazily loaded data. */ | ||
dataSource?: AgDataSourceOptions<TDatum>; | ||
/** Configuration for the context menu. */ | ||
@@ -145,5 +171,9 @@ contextMenu?: AgContextMenuOptions; | ||
navigator?: AgNavigatorOptions; | ||
/** Configuration for synchronizing multiple charts. */ | ||
sync?: AgChartSyncOptions; | ||
/** A map of event names to event listeners. */ | ||
listeners?: AgBaseChartListeners<TDatum>; | ||
} | ||
/** Configuration common to all charts. */ | ||
export interface AgBaseChartOptions<TDatum = any> extends AgBaseThemeableChartOptions { | ||
export interface AgBaseChartOptions<TDatum = any> extends AgBaseThemeableChartOptions<TDatum> { | ||
/** The data to render the chart from. If this is not specified, it must be set on individual series instead. */ | ||
@@ -157,5 +187,3 @@ data?: TDatum[]; | ||
container?: HTMLElement | null; | ||
/** A map of event names to event listeners. */ | ||
listeners?: AgBaseChartListeners<TDatum>; | ||
} | ||
export {}; |
@@ -5,9 +5,9 @@ import type { AxisValue, CssColor, FontFamily, FontSize, FontStyle, FontWeight, Opacity, PixelSize } from './types'; | ||
export interface AgBaseCrossLineOptions<LabelType = AgBaseCrossLineLabelOptions> { | ||
/** Whether to show the cross line. */ | ||
/** Whether to show the Cross Line. */ | ||
enabled?: boolean; | ||
/** Type of cross line to render, defaults to `line`. */ | ||
/** Type of Cross Line to render, defaults to `line`. */ | ||
type?: 'line' | 'range'; | ||
/** The data value at which the line should be positioned. This property is used if the cross-line type is `line`. */ | ||
/** The data value at which the line should be positioned. This property is used if the Cross Line type is `line`. */ | ||
value?: AxisValue; | ||
/** The range of values from the data used to display lines at a desired chart region. This property is only used for cross-line type `range`. */ | ||
/** The range of values from the data used to display lines at a desired chart region. This property is only used for Cross Line type `range`. */ | ||
range?: [AxisValue, AxisValue]; | ||
@@ -26,7 +26,7 @@ /** The colour to use for the fill of the range. */ | ||
lineDash?: PixelSize[]; | ||
/** Configuration for the cross-line label. */ | ||
/** Configuration for the Cross Line label. */ | ||
label?: LabelType; | ||
} | ||
export interface AgBaseCrossLineLabelOptions { | ||
/** Whether to show the cross line label. */ | ||
/** Whether to show the Cross Line label. */ | ||
enabled?: boolean; | ||
@@ -43,3 +43,3 @@ /** The text to show in the label. */ | ||
fontFamily?: FontFamily; | ||
/** Padding in pixels between the label and the edge of the cross-line. */ | ||
/** Padding in pixels between the label and the edge of the Cross Line. */ | ||
padding?: PixelSize; | ||
@@ -46,0 +46,0 @@ /** The colour to use for the label. */ |
@@ -1,2 +0,2 @@ | ||
import type { AgAxisLabelFormatterParams } from '../agChartOptions'; | ||
import type { AgAxisLabelFormatterParams } from './axisOptions'; | ||
import type { AgChartLegendPosition } from './legendOptions'; | ||
@@ -28,3 +28,3 @@ import type { CssColor, FontFamily, FontSize, FontStyle, FontWeight, PixelSize } from './types'; | ||
format?: string; | ||
/** Function used to render scale labels. If `value` is a number, `fractionDigits` will also be provided, which indicates the number of fractional digits used in the step between intervals; for example, a interval step of `0.0005` would have `fractionDigits` set to `4` */ | ||
/** Function used to render scale labels. If `value` is a number, `fractionDigits` will also be provided, which indicates the number of fractional digits used in the step between intervals; for example, a interval step of `0.0005` would have `fractionDigits` set to `4`. */ | ||
formatter?: (params: AgAxisLabelFormatterParams) => string | undefined; | ||
@@ -50,3 +50,3 @@ } | ||
/** | ||
* @deprecated Use `scale` instead. | ||
* @deprecated v9.0.2 Use `scale` instead. | ||
* Configuration for the legend gradient stops that consist of a color and a label. | ||
@@ -53,0 +53,0 @@ */ |
@@ -1,2 +0,51 @@ | ||
import type { CssColor, Opacity, PixelSize, Ratio } from './types'; | ||
import type { AgAxisLabelFormatterParams } from './axisOptions'; | ||
import type { CssColor, FontFamily, FontSize, FontStyle, FontWeight, Opacity, PixelSize, Ratio } from './types'; | ||
export interface AgNavigatorMiniChartIntervalOptions { | ||
/** Maximum gap in pixels between labels. */ | ||
minSpacing?: PixelSize; | ||
/** Maximum gap in pixels between labels. */ | ||
maxSpacing?: PixelSize; | ||
/** Array of values in axis units to display as labels along the axis. The values in this array must be compatible with the axis type. */ | ||
values?: any[]; | ||
/** The step value between labels, specified as a number or time interval. If the configured interval results in too many labels given the chart size, it will be ignored. */ | ||
step?: number; | ||
} | ||
export interface AgNavigatorMiniChartLabelOptions { | ||
/** Configuration for interval between the Mini Chart's axis labels. */ | ||
interval?: AgNavigatorMiniChartIntervalOptions; | ||
/** Set to `false` to hide the axis labels. */ | ||
enabled?: boolean; | ||
/** The font style to use for the labels. */ | ||
fontStyle?: FontStyle; | ||
/** The font weight to use for the labels. */ | ||
fontWeight?: FontWeight; | ||
/** The font size in pixels to use for the labels. */ | ||
fontSize?: FontSize; | ||
/** The font family to use for the labels. */ | ||
fontFamily?: FontFamily; | ||
/** Padding in pixels between the axis labels and the Mini Chart. */ | ||
padding?: PixelSize; | ||
/** The colour to use for the labels. */ | ||
color?: CssColor; | ||
/** Avoid axis label collision by automatically reducing the number of labels displayed. If set to `false`, axis labels may collide. */ | ||
avoidCollisions?: boolean; | ||
/** Format string used when rendering labels. */ | ||
format?: string; | ||
/** Function used to render axis labels. If `value` is a number, `fractionDigits` will also be provided, which indicates the number of fractional digits used in the step between intervals; for example, a tick step of `0.0005` would have `fractionDigits` set to `4`. */ | ||
formatter?: (params: AgAxisLabelFormatterParams) => string | undefined; | ||
} | ||
export interface AgNavigatorMiniChartPadding { | ||
/** Padding between the top edge of the Navigator and the Mini Chart series. */ | ||
top?: number; | ||
/** Padding between the bottom edge of the Navigator and the Mini Chart series. */ | ||
bottom?: number; | ||
} | ||
export interface AgNavigatorMiniChartOptions { | ||
/** Whether to show a Mini Chart in the Navigator. */ | ||
enabled?: boolean; | ||
/** Configuration for the Mini Chart's axis labels. */ | ||
label?: AgNavigatorMiniChartLabelOptions; | ||
/** Configuration for the padding inside the Mini Chart. */ | ||
padding?: AgNavigatorMiniChartPadding; | ||
} | ||
export interface AgNavigatorMaskOptions { | ||
@@ -29,7 +78,7 @@ /** The fill colour used by the mask. */ | ||
export interface AgNavigatorOptions { | ||
/** Whether to show the navigator. */ | ||
/** Whether to show the Navigator. */ | ||
enabled?: boolean; | ||
/** The height of the navigator. */ | ||
/** The height of the Navigator. */ | ||
height?: PixelSize; | ||
/** The distance between the navigator and the bottom axis. */ | ||
/** The distance between the Navigator and the bottom axis of the chart. */ | ||
margin?: PixelSize; | ||
@@ -40,8 +89,10 @@ /** The start of the visible range in the `[0, 1]` interval. */ | ||
max?: Ratio; | ||
/** Configuration for the navigator's visible range mask. */ | ||
/** Configuration for the Navigator's visible range mask. */ | ||
mask?: AgNavigatorMaskOptions; | ||
/** Configuration for the navigator's left handle. */ | ||
/** Configuration for the Navigator's left handle. */ | ||
minHandle?: AgNavigatorHandleOptions; | ||
/** Configuration for the navigator's right handle. */ | ||
/** Configuration for the Navigator's right handle. */ | ||
maxHandle?: AgNavigatorHandleOptions; | ||
/** Mini Chart options. */ | ||
miniChart?: AgNavigatorMiniChartOptions; | ||
} |
@@ -17,2 +17,3 @@ import type { AgAreaSeriesThemeableOptions } from '../series/cartesian/areaOptions'; | ||
import type { AgTreemapSeriesThemeableOptions } from '../series/hierarchy/treemapOptions'; | ||
import type { AgDonutSeriesThemeableOptions } from '../series/polar/donutOptions'; | ||
import type { AgNightingaleSeriesThemeableOptions } from '../series/polar/nightingaleOptions'; | ||
@@ -26,12 +27,27 @@ import type { AgPieSeriesThemeableOptions } from '../series/polar/pieOptions'; | ||
import type { AgBaseThemeableChartOptions } from './chartOptions'; | ||
import type { CssColor } from './types'; | ||
export type AgChartThemeName = 'ag-default' | 'ag-default-dark' | 'ag-sheets' | 'ag-sheets-dark' | 'ag-polychroma' | 'ag-polychroma-dark' | 'ag-vivid' | 'ag-vivid-dark' | 'ag-material' | 'ag-material-dark'; | ||
/** | ||
* @deprecated v9.1 use AgChartThemeOptionalPalette instead; in the next major release we will rename | ||
* AgChartThemeOptionalPalette to AgChartThemePalette. | ||
*/ | ||
export interface AgChartThemePalette { | ||
/** The array of fills to be used. */ | ||
fills: string[]; | ||
fills: CssColor[]; | ||
/** The array of strokes to be used. */ | ||
strokes: string[]; | ||
strokes: CssColor[]; | ||
} | ||
/** | ||
* Temporary alias type of Partial<AgChartThemePalette>, until we can fix AgChartThemePalette in the | ||
* next major release. | ||
*/ | ||
export interface AgChartThemeOptionalPalette { | ||
/** The array of fills to be used. */ | ||
fills?: CssColor[]; | ||
/** The array of strokes to be used. */ | ||
strokes?: CssColor[]; | ||
} | ||
export interface AgBaseChartThemeOptions { | ||
/** The palette to use. If specified, this replaces the palette from the base theme. */ | ||
palette?: Partial<AgChartThemePalette>; | ||
palette?: AgChartThemeOptionalPalette; | ||
/** Configuration from this object is merged over the defaults specified in the base theme. */ | ||
@@ -81,2 +97,5 @@ overrides?: AgChartThemeOverrides; | ||
} | ||
export interface AgDonutSeriesThemeOverrides extends AgBasePolarThemeOptions { | ||
series?: AgDonutSeriesThemeableOptions; | ||
} | ||
export interface AgPieSeriesThemeOverrides extends AgBasePolarThemeOptions { | ||
@@ -136,4 +155,7 @@ series?: AgPieSeriesThemeableOptions; | ||
'range-area'?: AgRangeAreaSeriesThemeOverrides; | ||
/** Bullet series theme overrides. */ | ||
bullet?: AgBulletSeriesThemeOverrides; | ||
/** Pie series theme overrides. */ | ||
donut?: AgDonutSeriesThemeOverrides; | ||
/** Pie series theme overrides. */ | ||
pie?: AgPieSeriesThemeOverrides; | ||
@@ -140,0 +162,0 @@ /** Radar-line series theme overrides. */ |
@@ -26,6 +26,9 @@ import type { AgChartCallbackParams } from './callbackOptions'; | ||
} | ||
export type AgTooltipPositionType = 'pointer' | 'node'; | ||
export declare enum AgTooltipPositionType { | ||
POINTER = "pointer", | ||
NODE = "node" | ||
} | ||
export interface AgTooltipPositionOptions { | ||
/** The type of positioning for the tooltip. By default, the tooltip follows the mouse pointer for series without markers, and it is anchored to the highlighted marker node for series with markers. */ | ||
type?: AgTooltipPositionType; | ||
type?: `${AgTooltipPositionType}`; | ||
/** The horizontal offset in pixels for the position of the tooltip. */ | ||
@@ -63,4 +66,2 @@ xOffset?: PixelSize; | ||
renderer?: (params: TParams) => string | AgTooltipRendererResult; | ||
/** String used to format the tooltip content. */ | ||
format?: string; | ||
} | ||
@@ -67,0 +68,0 @@ export interface AgSeriesTooltipInteraction { |
@@ -18,3 +18,3 @@ import type { Ratio } from './types'; | ||
axes?: AgZoomAxes; | ||
/** Set to `true` to enable the zoom module, defaults to false. */ | ||
/** Set to `true` to enable the zoom module, defaults to `false`. */ | ||
enabled?: boolean; | ||
@@ -21,0 +21,0 @@ /** |
@@ -5,3 +5,3 @@ import type { AgDropShadowOptions } from '../../chart/dropShadowOptions'; | ||
import type { AgSeriesMarkerOptions } from '../markerOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -11,3 +11,3 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
type AgAreaSeriesTooltipRendererParams<TDatum> = AgCartesianSeriesTooltipRendererParams<TDatum>; | ||
export interface AgAreaSeriesThemeableOptions<TDatum = any> extends StrokeOptions, FillOptions, LineDashOptions, AgBaseSeriesThemeableOptions { | ||
export interface AgAreaSeriesThemeableOptions<TDatum = any> extends StrokeOptions, FillOptions, LineDashOptions, AgBaseCartesianThemeableOptions<TDatum> { | ||
/** Configuration for the markers used in the series. */ | ||
@@ -14,0 +14,0 @@ marker?: AgSeriesMarkerOptions<AgAreaSeriesOptionsKeys, TDatum>; |
@@ -6,3 +6,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
import type { AgSeriesTooltip, AgSeriesTooltipRendererParams } from '../../chart/tooltipOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgErrorBoundSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -25,3 +25,3 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
} | ||
export interface AgBarSeriesThemeableOptions<TDatum = any> extends AgBarSeriesStyle, AgBaseSeriesThemeableOptions { | ||
export interface AgBarSeriesThemeableOptions<TDatum = any> extends AgBarSeriesStyle, AgBaseCartesianThemeableOptions<TDatum> { | ||
/** | ||
@@ -28,0 +28,0 @@ * Bar rendering direction. |
import type { AgSeriesTooltip } from '../../chart/tooltipOptions'; | ||
import type { CssColor, Ratio } from '../../chart/types'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -42,3 +42,3 @@ import type { AgSeriesFormatterParams, AxisOptions, FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
} | ||
export interface AgBoxPlotSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions, AgBoxPlotSeriesStyles { | ||
export interface AgBoxPlotSeriesThemeableOptions<TDatum = any> extends AgBaseCartesianThemeableOptions<TDatum>, AgBoxPlotSeriesStyles { | ||
/** | ||
@@ -50,3 +50,3 @@ * Bar rendering direction. | ||
/** Series-specific tooltip configuration. */ | ||
tooltip?: AgSeriesTooltip<AgCartesianSeriesTooltipRendererParams>; | ||
tooltip?: AgSeriesTooltip<AgBoxPlotSeriesTooltipRendererParams>; | ||
/** Function used to return formatting for individual columns, based on the given parameters. If the current column is highlighted, the `highlighted` property will be set to `true`; make sure to check this if you want to differentiate between the highlighted and un-highlighted states. */ | ||
@@ -53,0 +53,0 @@ formatter?: (params: AgBoxPlotSeriesFormatterParams<TDatum>) => AgBoxPlotSeriesStyles; |
@@ -5,3 +5,3 @@ import type { AgChartLabelOptions } from '../../chart/labelOptions'; | ||
import type { AgSeriesMarkerOptions } from '../markerOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
export type AgBubbleSeriesTooltipRendererParams<TDatum = any> = AgSeriesTooltipRendererParams<TDatum> & AgBubbleSeriesOptionsKeys & AgBubbleSeriesOptionsNames; | ||
@@ -15,3 +15,3 @@ export interface AgBubbleSeriesMarker<TDatum> extends AgSeriesMarkerOptions<AgBubbleSeriesOptionsKeys, TDatum> { | ||
export type AgBubbleSeriesLabelFormatterParams = AgBubbleSeriesOptionsKeys & AgBubbleSeriesOptionsNames; | ||
export interface AgBubbleSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions { | ||
export interface AgBubbleSeriesThemeableOptions<TDatum = any> extends AgBaseCartesianThemeableOptions<TDatum> { | ||
/** The title to use for the series. Defaults to `yName` if it exists, or `yKey` if not. */ | ||
@@ -18,0 +18,0 @@ title?: string; |
import type { AgSeriesTooltip, AgSeriesTooltipRendererParams } from '../../chart/tooltipOptions'; | ||
import type { Ratio } from '../../chart/types'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgBarSeriesStyle } from './barOptions'; | ||
@@ -27,3 +27,3 @@ import type { LineDashOptions, StrokeOptions } from './commonOptions'; | ||
} | ||
export interface AgBulletSeriesThemeableOptions extends AgBulletSeriesStyle, AgBaseSeriesThemeableOptions { | ||
export interface AgBulletSeriesThemeableOptions<TDatum = any> extends AgBulletSeriesStyle, Omit<AgBaseCartesianThemeableOptions<TDatum>, 'showInMiniChart'> { | ||
/** Width of the bar relative to the width/height of the series area. */ | ||
@@ -40,3 +40,3 @@ widthRatio?: Ratio; | ||
} | ||
export interface AgBulletSeriesOptions<TDatum = any> extends AgBaseSeriesOptions<TDatum>, AgBulletSeriesThemeableOptions, BulletSeriesKeysAndNames { | ||
export interface AgBulletSeriesOptions<TDatum = any> extends AgBaseSeriesOptions<TDatum>, AgBulletSeriesThemeableOptions<TDatum>, BulletSeriesKeysAndNames { | ||
/** Configuration for the Bullet Series. */ | ||
@@ -43,0 +43,0 @@ type: 'bullet'; |
@@ -131,5 +131,5 @@ import type { AgAxisBaseTickOptions, AgAxisCaptionOptions, AgBaseAxisLabelOptions, AgBaseAxisOptions } from '../../chart/axisOptions'; | ||
export interface AgCartesianCrossLineLabelOptions extends AgBaseCrossLineLabelOptions { | ||
/** The position of the cross-line label. */ | ||
/** The position of the Cross Line label. */ | ||
position?: AgCrossLineLabelPosition; | ||
/** The rotation of the cross-line label in degrees. */ | ||
/** The rotation of the Cross Line label in degrees. */ | ||
rotation?: Degree; | ||
@@ -136,0 +136,0 @@ } |
@@ -5,3 +5,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
import type { PixelSize, TextAlign, VerticalAlign } from '../../chart/types'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -20,3 +20,3 @@ import type { FillOptions, StrokeOptions } from './commonOptions'; | ||
} | ||
export interface AgHeatmapSeriesThemeableOptions<TDatum = any> extends StrokeOptions, AgBaseSeriesThemeableOptions { | ||
export interface AgHeatmapSeriesThemeableOptions<TDatum = any> extends StrokeOptions, AgBaseCartesianThemeableOptions<TDatum> { | ||
/** Options for the label in each cell. */ | ||
@@ -23,0 +23,0 @@ label?: AgChartAutoSizedSecondaryLabelOptions<TDatum, AgHeatmapSeriesLabelFormatterParams>; |
import type { AgDropShadowOptions } from '../../chart/dropShadowOptions'; | ||
import type { AgChartLabelOptions } from '../../chart/labelOptions'; | ||
import type { AgSeriesTooltip } from '../../chart/tooltipOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -18,3 +18,3 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
} | ||
export interface AgHistogramSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions, FillOptions, StrokeOptions, LineDashOptions { | ||
export interface AgHistogramSeriesThemeableOptions<TDatum = any> extends AgBaseCartesianThemeableOptions<TDatum>, FillOptions, StrokeOptions, LineDashOptions { | ||
/** Configuration for the shadow used behind the chart series. */ | ||
@@ -21,0 +21,0 @@ shadow?: AgDropShadowOptions; |
@@ -5,3 +5,3 @@ import type { AgErrorBarOptions, AgErrorBarThemeableOptions } from '../../chart/errorBarOptions'; | ||
import type { AgSeriesMarkerOptions } from '../markerOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams, AgErrorBoundSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -11,3 +11,3 @@ import type { LineDashOptions, StrokeOptions } from './commonOptions'; | ||
export type AgLineSeriesLabelFormatterParams = AgLineSeriesOptionsKeys & AgLineSeriesOptionsNames; | ||
export interface AgLineSeriesThemeableOptions<TDatum = any> extends StrokeOptions, LineDashOptions, AgBaseSeriesThemeableOptions { | ||
export interface AgLineSeriesThemeableOptions<TDatum = any> extends StrokeOptions, LineDashOptions, AgBaseCartesianThemeableOptions<TDatum> { | ||
/** Configuration for the markers used in the series. */ | ||
@@ -14,0 +14,0 @@ marker?: AgSeriesMarkerOptions<AgLineSeriesOptionsKeys, TDatum>; |
@@ -6,3 +6,3 @@ import type { AgDropShadowOptions } from '../../chart/dropShadowOptions'; | ||
import type { AgSeriesMarkerOptions } from '../markerOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions, AgSeriesHighlightStyle } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions, AgSeriesHighlightStyle } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -32,3 +32,3 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
export type AgRangeAreaSeriesLabelFormatterParams = AgRangeAreaSeriesOptionsKeys & AgRangeAreaSeriesOptionsNames; | ||
export interface AgRangeAreaSeriesThemeableOptions<TDatum = any> extends StrokeOptions, FillOptions, LineDashOptions, AgBaseSeriesThemeableOptions { | ||
export interface AgRangeAreaSeriesThemeableOptions<TDatum = any> extends StrokeOptions, FillOptions, LineDashOptions, AgBaseCartesianThemeableOptions<TDatum> { | ||
/** Configuration for the markers used in the series. */ | ||
@@ -35,0 +35,0 @@ marker?: AgSeriesMarkerOptions<TDatum, AgRangeAreaSeriesOptionsKeys>; |
@@ -5,4 +5,4 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
import type { AgSeriesTooltip } from '../../chart/tooltipOptions'; | ||
import type { CssColor, PixelSize } from '../../chart/types'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions, AgSeriesHighlightStyle } from '../seriesOptions'; | ||
import type { CssColor, Opacity, PixelSize } from '../../chart/types'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions, AgSeriesHighlightStyle } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -20,2 +20,3 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
fill?: CssColor; | ||
fillOpacity?: Opacity; | ||
stroke?: CssColor; | ||
@@ -47,3 +48,3 @@ strokeWidth?: PixelSize; | ||
export type AgRangeBarSeriesLabelPlacement = 'inside' | 'outside'; | ||
export interface AgRangeBarSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions, FillOptions, StrokeOptions, LineDashOptions { | ||
export interface AgRangeBarSeriesThemeableOptions<TDatum = any> extends AgBaseCartesianThemeableOptions<TDatum>, FillOptions, StrokeOptions, LineDashOptions { | ||
/** | ||
@@ -50,0 +51,0 @@ * Bar rendering direction. |
@@ -5,3 +5,3 @@ import type { AgErrorBarOptions, AgErrorBarThemeableOptions } from '../../chart/errorBarOptions'; | ||
import type { AgSeriesMarkerOptions } from '../markerOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; | ||
import type { AgErrorBoundSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -11,3 +11,3 @@ export interface AgScatterSeriesTooltipRendererParams<TDatum = any> extends AgSeriesTooltipRendererParams<TDatum>, AgScatterSeriesOptionsKeys, AgScatterSeriesOptionsNames, AgErrorBoundSeriesTooltipRendererParams { | ||
export type AgScatterSeriesLabelFormatterParams = AgScatterSeriesOptionsKeys & AgScatterSeriesOptionsNames; | ||
export interface AgScatterSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions { | ||
export interface AgScatterSeriesThemeableOptions<TDatum = any> extends AgBaseCartesianThemeableOptions<TDatum> { | ||
/** Configuration for the markers used in the series. */ | ||
@@ -14,0 +14,0 @@ marker?: AgSeriesMarkerOptions<AgScatterSeriesOptionsKeys, TDatum>; |
@@ -6,3 +6,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
import type { CssColor, Opacity, PixelSize } from '../../chart/types'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions, AgSeriesHighlightStyle } from '../seriesOptions'; | ||
import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions, AgSeriesHighlightStyle } from '../seriesOptions'; | ||
import type { AgCartesianSeriesTooltipRendererParams } from './cartesianSeriesTooltipOptions'; | ||
@@ -35,3 +35,3 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOptions'; | ||
export type AgWaterfallSeriesLabelPlacement = 'start' | 'end' | 'inside'; | ||
export interface AgWaterfallSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions { | ||
export interface AgWaterfallSeriesThemeableOptions<TDatum = any> extends AgBaseCartesianThemeableOptions<TDatum> { | ||
/** | ||
@@ -38,0 +38,0 @@ * Bar rendering direction. |
@@ -22,3 +22,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
} | ||
export interface AgSunburstSeriesThemeableOptions<TDatum = any> extends Omit<AgBaseSeriesThemeableOptions, 'highlightStyle'> { | ||
export interface AgSunburstSeriesThemeableOptions<TDatum = any> extends Omit<AgBaseSeriesThemeableOptions<TDatum>, 'highlightStyle'> { | ||
/** Options for the label in a sector. */ | ||
@@ -25,0 +25,0 @@ label?: AgChartAutoSizedLabelOptions<TDatum, AgSunburstSeriesLabelFormatterParams<TDatum>>; |
@@ -70,3 +70,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
} | ||
export interface AgTreemapSeriesThemeableOptions<TDatum = any> extends Omit<AgBaseSeriesThemeableOptions, 'highlightStyle'> { | ||
export interface AgTreemapSeriesThemeableOptions<TDatum = any> extends Omit<AgBaseSeriesThemeableOptions<TDatum>, 'highlightStyle'> { | ||
/** The colours to cycle through for the fills of the groups and tiles. */ | ||
@@ -73,0 +73,0 @@ fills?: CssColor[]; |
@@ -8,2 +8,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
import type { AgDonutInnerCircle, AgDonutInnerLabel, AgDonutInnerLabelThemeOptions } from './donutOptions'; | ||
export interface AgPieSeriesLabelOptions<TDatum, TParams> extends AgChartLabelOptions<TDatum, TParams> { | ||
@@ -20,3 +21,3 @@ /** Distance in pixels between the callout line and the label text. */ | ||
positionOffset?: PixelSize; | ||
/** Position of labels as a ratio proportional to pie radius (or doughnut thickness). Additional offset in pixels can be applied by using positionOffset. */ | ||
/** Position of labels as a ratio proportional to pie radius. Additional offset in pixels can be applied by using positionOffset. */ | ||
positionRatio?: Ratio; | ||
@@ -46,17 +47,3 @@ } | ||
} | ||
export interface AgDoughnutInnerLabel extends FontOptions { | ||
/** The text to show in the inner label. */ | ||
text: string; | ||
/** The margin in pixels before and after the inner label. */ | ||
margin?: PixelSize; | ||
} | ||
export interface AgDoughnutInnerLabelThemeOptions extends Omit<AgDoughnutInnerLabel, 'text'> { | ||
} | ||
export interface AgDoughnutInnerCircle { | ||
/** The colour of the fill for the inner circle. */ | ||
fill: CssColor; | ||
/** The opacity of the fill for the inner circle. */ | ||
fillOpacity?: Opacity; | ||
} | ||
export interface AgPieSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions, LineDashOptions { | ||
export interface AgPieSeriesThemeableOptions<TDatum = any> extends AgBaseSeriesThemeableOptions<TDatum>, LineDashOptions { | ||
/** Configuration for the series title. */ | ||
@@ -82,9 +69,15 @@ title?: AgPieTitleOptions; | ||
rotation?: Degree; | ||
/** The offset in pixels of the outer radius of the series. Used to construct doughnut charts. */ | ||
/** The offset in pixels of the outer radius of the series. */ | ||
outerRadiusOffset?: PixelSize; | ||
/** The ratio of the outer radius of the series. Used to adjust the outer radius proportionally to the automatically calculated value. */ | ||
outerRadiusRatio?: Ratio; | ||
/** The offset in pixels of the inner radius of the series. Used to construct doughnut charts. If this is not provided, or innerRadiusRatio is unset, or a value of zero is given, a pie chart will be rendered. */ | ||
/** | ||
* @deprecated v9.1.0 Use a `donut` series instead. | ||
* The offset in pixels of the inner radius of the series. Used to construct donut charts. If this is not provided, or innerRadiusRatio is unset, or a value of zero is given, a pie chart will be rendered. | ||
*/ | ||
innerRadiusOffset?: PixelSize; | ||
/** The ratio of the inner radius of the series. Used to construct doughnut charts. If this is not provided, or innerRadiusOffset is unset, or a value of zero or one is given, a pie chart will be rendered. */ | ||
/** | ||
* @deprecated v9.1.0 Use a `donut` series instead. | ||
* The ratio of the inner radius of the series. Used to construct donut charts. If this is not provided, or innerRadiusOffset is unset, or a value of zero or one is given, a pie chart will be rendered. | ||
*/ | ||
innerRadiusRatio?: Ratio; | ||
@@ -99,7 +92,13 @@ /** Override of the automatically determined minimum radiusKey value from the data. */ | ||
tooltip?: AgSeriesTooltip<AgPieSeriesTooltipRendererParams>; | ||
/** Configuration for the text lines to display inside the series, typically used when rendering a doughnut chart */ | ||
innerLabels?: AgDoughnutInnerLabelThemeOptions; | ||
/** Configuration for the area inside the series, only visible when rendering a doughnut chart by using innerRadiusOffset or innerRadiusRatio */ | ||
innerCircle?: AgDoughnutInnerCircle; | ||
/** | ||
* @deprecated v9.1.0 Use a `donut`series instead. | ||
* Configuration for the text lines to display inside the series, typically used when rendering a donut chart. | ||
*/ | ||
innerLabels?: AgDonutInnerLabelThemeOptions; | ||
/** | ||
* @deprecated v9.1.0 Use a `donut`series instead. | ||
* Configuration for the area inside the series, only visible when rendering a donut chart by using innerRadiusOffset or innerRadiusRatio. | ||
*/ | ||
innerCircle?: AgDonutInnerCircle; | ||
/** | ||
* The spacing between pie sectors. | ||
@@ -114,6 +113,9 @@ * | ||
export interface AgPieSeriesOptions<TDatum = any> extends Omit<AgPieSeriesThemeableOptions<TDatum>, 'innerLabels'>, AgPieSeriesOptionsKeys, AgPieSeriesOptionsNames, AgBaseSeriesOptions<TDatum> { | ||
/** Configuration for Pie/Doughnut Series. */ | ||
/** Configuration for Pie Series. */ | ||
type: 'pie'; | ||
/** Configuration for the text lines to display inside the series, typically used when rendering a doughnut chart */ | ||
innerLabels?: AgDoughnutInnerLabel[]; | ||
/** | ||
* @deprecated v9.1.0 Use a `donut` series instead. | ||
* Configuration for the text lines to display inside the series, typically used when rendering a donut chart. | ||
*/ | ||
innerLabels?: AgDonutInnerLabel[]; | ||
} | ||
@@ -120,0 +122,0 @@ export interface AgPieSeriesOptionsKeys { |
import type { AgBaseThemeableChartOptions } from '../../chart/chartOptions'; | ||
import type { AgAngleCategoryAxisOptions, AgAngleNumberAxisOptions } from '../../chart/polarAxisOptions'; | ||
import type { AgRadiusCategoryAxisOptions, AgRadiusNumberAxisOptions } from '../../chart/radiusAxisOptions'; | ||
import type { AgDonutSeriesOptions } from './donutOptions'; | ||
import type { AgNightingaleSeriesOptions } from './nightingaleOptions'; | ||
@@ -10,3 +11,3 @@ import type { AgPieSeriesOptions } from './pieOptions'; | ||
import type { AgRadialColumnSeriesOptions } from './radialColumnOptions'; | ||
export type AgPolarSeriesOptions = AgPieSeriesOptions | AgRadarLineSeriesOptions | AgRadarAreaSeriesOptions | AgRadialBarSeriesOptions | AgRadialColumnSeriesOptions | AgNightingaleSeriesOptions; | ||
export type AgPolarSeriesOptions = AgDonutSeriesOptions | AgPieSeriesOptions | AgRadarLineSeriesOptions | AgRadarAreaSeriesOptions | AgRadialBarSeriesOptions | AgRadialColumnSeriesOptions | AgNightingaleSeriesOptions; | ||
export type AgPolarAxisOptions = AgAngleCategoryAxisOptions | AgAngleNumberAxisOptions | AgRadiusCategoryAxisOptions | AgRadiusNumberAxisOptions; | ||
@@ -19,7 +20,23 @@ export interface AgBasePolarChartOptions { | ||
} | ||
export interface AgAngleCategoryAxisThemeOptions extends Omit<AgAngleCategoryAxisOptions, 'type'> { | ||
/** @deprecated v9.1 omit this field, it is redundant */ | ||
type?: 'angle-category'; | ||
} | ||
export interface AgAngleNumberAxisThemeOptions extends Omit<AgAngleNumberAxisOptions, 'type'> { | ||
/** @deprecated v9.1 omit this field, it is redundant */ | ||
type?: 'angle-number'; | ||
} | ||
export interface AgRadiusCategoryAxisThemeOptions extends Omit<AgRadiusCategoryAxisOptions, 'type'> { | ||
/** @deprecated v9.1 omit this field, it is redundant */ | ||
type?: 'radius-category'; | ||
} | ||
export interface AgRadiusNumberAxisThemeOptions extends Omit<AgRadiusNumberAxisOptions, 'type'> { | ||
/** @deprecated v9.1 omit this field, it is redundant */ | ||
type?: 'radius-number'; | ||
} | ||
export interface AgPolarAxesTheme { | ||
'angle-category'?: AgAngleCategoryAxisOptions; | ||
'angle-number'?: AgAngleNumberAxisOptions; | ||
'radius-category'?: AgRadiusCategoryAxisOptions; | ||
'radius-number'?: AgRadiusNumberAxisOptions; | ||
'angle-category'?: AgAngleCategoryAxisThemeOptions; | ||
'angle-number'?: AgAngleNumberAxisThemeOptions; | ||
'radius-category'?: AgRadiusCategoryAxisThemeOptions; | ||
'radius-number'?: AgRadiusNumberAxisThemeOptions; | ||
} | ||
@@ -26,0 +43,0 @@ export interface AgBasePolarThemeOptions extends AgBaseThemeableChartOptions { |
@@ -7,3 +7,3 @@ import type { AgChartLabelOptions } from '../../chart/labelOptions'; | ||
import type { AgRadialSeriesOptionsKeys, AgRadialSeriesOptionsNames } from './radialOptions'; | ||
export interface AgRadarSeriesThemeableOptions<TDatum = any> extends StrokeOptions, LineDashOptions, AgBaseSeriesThemeableOptions { | ||
export interface AgRadarSeriesThemeableOptions<TDatum = any> extends StrokeOptions, LineDashOptions, AgBaseSeriesThemeableOptions<TDatum> { | ||
/** Configuration for the markers used in the series. */ | ||
@@ -10,0 +10,0 @@ marker?: AgSeriesMarkerOptions<TDatum, AgRadialSeriesOptionsKeys>; |
@@ -7,2 +7,4 @@ import type { AgBaseSeriesOptions } from '../seriesOptions'; | ||
type: 'radial-bar'; | ||
/** The number to normalise the bar stacks to. Has no effect unless series are stacked. */ | ||
normalizedTo?: number; | ||
/** Whether to group together (adjacently) separate sectors. */ | ||
@@ -9,0 +11,0 @@ grouped?: boolean; |
@@ -7,2 +7,4 @@ import type { Ratio } from '../../chart/types'; | ||
type: 'radial-column' | 'nightingale'; | ||
/** The number to normalise the bar stacks to. Has no effect unless series are stacked. */ | ||
normalizedTo?: number; | ||
/** Whether to group together (adjacently) separate sectors. */ | ||
@@ -9,0 +11,0 @@ grouped?: boolean; |
@@ -6,3 +6,3 @@ import type { AgChartCallbackParams } from '../../chart/callbackOptions'; | ||
import type { AgBaseSeriesThemeableOptions } from '../seriesOptions'; | ||
export interface AgBaseRadialSeriesThemeableOptions<TDatum = any> extends StrokeOptions, LineDashOptions, AgBaseSeriesThemeableOptions { | ||
export interface AgBaseRadialSeriesThemeableOptions<TDatum = any> extends StrokeOptions, LineDashOptions, FillOptions, AgBaseSeriesThemeableOptions<TDatum> { | ||
/** Configuration for the labels shown on top of data points. */ | ||
@@ -9,0 +9,0 @@ label?: AgChartLabelOptions<TDatum, AgRadialSeriesLabelFormatterParams>; |
@@ -18,3 +18,3 @@ import type { AgSeriesListeners } from '../chart/eventOptions'; | ||
} | ||
export interface AgBaseSeriesThemeableOptions { | ||
export interface AgBaseSeriesThemeableOptions<TDatum> { | ||
/** The cursor to use for hovered markers. This config is identical to the CSS `cursor` property. */ | ||
@@ -28,4 +28,10 @@ cursor?: string; | ||
showInLegend?: boolean; | ||
/** A map of event names to event listeners. */ | ||
listeners?: AgSeriesListeners<TDatum>; | ||
} | ||
export interface AgBaseSeriesOptions<TDatum> extends AgBaseSeriesThemeableOptions { | ||
export interface AgBaseCartesianThemeableOptions<TDatum> extends AgBaseSeriesOptions<TDatum> { | ||
/** Whether to include the series in the Mini Chart. */ | ||
showInMiniChart?: boolean; | ||
} | ||
export interface AgBaseSeriesOptions<TDatum> extends AgBaseSeriesThemeableOptions<TDatum> { | ||
/** | ||
@@ -40,4 +46,2 @@ * Primary identifier for the series. This is provided as `seriesId` in user callbacks to differentiate multiple series. Auto-generated ids are subject to future change without warning, if your callbacks need to vary behaviour by series please supply your own unique `id` value. | ||
visible?: boolean; | ||
/** A map of event names to event listeners. */ | ||
listeners?: AgSeriesListeners<TDatum>; | ||
} |
@@ -15,6 +15,3 @@ import { ContinuousScale } from './continuousScale'; | ||
private pow; | ||
private updateLogFn; | ||
private updatePowFn; | ||
protected updateNiceDomain(): void; | ||
static pow10(x: number): number; | ||
ticks(): number[]; | ||
@@ -26,2 +23,4 @@ tickFormat({ count, ticks, specifier, }: { | ||
}): (x: number) => string; | ||
static getBaseLogMethod(base: number): (x: number) => number; | ||
static getBasePowerMethod(base: number): (x: number) => number; | ||
} |
@@ -1,3 +0,3 @@ | ||
import { BaseProperties } from '../util/properties'; | ||
export declare class DropShadow extends BaseProperties { | ||
import { ChangeDetectableProperties } from './util/changeDetectableProperties'; | ||
export declare class DropShadow extends ChangeDetectableProperties { | ||
enabled: boolean; | ||
@@ -4,0 +4,0 @@ color: string; |
@@ -32,2 +32,3 @@ import { HdpiCanvas } from './canvas/hdpiCanvas'; | ||
download(fileName?: string, fileFormat?: string): void; | ||
/** NOTE: Integrated Charts undocumented image download method. */ | ||
getDataURL(type?: string): string; | ||
@@ -34,0 +35,0 @@ overrideDevicePixelRatio?: number; |
@@ -18,6 +18,8 @@ import type { RenderContext } from '../node'; | ||
readonly path: Path2D; | ||
clipPath?: Path2D; | ||
private _clipX; | ||
private _clipY; | ||
private _clipPath?; | ||
clipMode?: 'normal' | 'punch-out'; | ||
clipScalingX: number; | ||
clipScalingY: number; | ||
set clipX(value: number); | ||
set clipY(value: number); | ||
/** | ||
@@ -36,4 +38,3 @@ * The path only has to be updated when certain attributes change. | ||
updatePath(): void; | ||
private clip; | ||
render(renderCtx: RenderContext): void; | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { FontFamily, FontSize, FontStyle, FontWeight, OverflowStrategy, TextWrap } from '../../options/agChartOptions'; | ||
import type { FontFamily, FontSize, FontStyle, FontWeight, OverflowStrategy, TextWrap } from '../../options/chart/types'; | ||
import { BBox } from '../bbox'; | ||
@@ -3,0 +3,0 @@ import type { RenderContext } from '../node'; |
@@ -1,15 +0,16 @@ | ||
export * from './util/value'; | ||
export * from './util/angle'; | ||
export * from './util/id'; | ||
export * from './util/json'; | ||
export * from './util/number'; | ||
export * from './util/padding'; | ||
export * from './util/json'; | ||
export * from './util/angle'; | ||
export * from './util/sanitize'; | ||
export * from './util/value'; | ||
export * from './util/zip'; | ||
export * from './util/number'; | ||
export { isValidDate as isDate, isFiniteNumber as isNumber, isString } from './util/type-guards'; | ||
export { extent, normalisedExtent, normalisedExtentWithMetadata } from './util/array'; | ||
export { toFixed, isEqual as isNumberEqual } from './util/number'; | ||
export { tickFormat } from './util/numberFormat'; | ||
export * from './util/sanitize'; | ||
export { default as ticks, tickStep, range } from './util/ticks'; | ||
export { Color } from './util/color'; | ||
export type { MeasuredLabel, PointLabelDatum } from './util/labelPlacement'; | ||
export type { MeasuredLabel, PointLabelDatum } from './scene/util/labelPlacement'; | ||
export * from './util/logger'; |
@@ -9,2 +9,4 @@ export declare function extent(values: Array<number | Date>): [number, number] | undefined; | ||
export declare function toArray<T>(value: T): T[]; | ||
export declare function unique(array: any[]): any[]; | ||
export declare function unique<T>(array: T[]): T[]; | ||
export declare function groupBy<T, R extends string | number | symbol>(array: T[], iteratee: (item: T) => R): { [K in R]?: T[] | undefined; }; | ||
export declare function circularSliceArray<T>(data: T[], size: number, offset?: number): T[]; |
@@ -1,2 +0,4 @@ | ||
type DebugLogger = (...logContent: any[]) => void; | ||
type DebugLogger = ((...logContent: any[]) => void) & { | ||
check(): boolean; | ||
}; | ||
export declare const Debug: { | ||
@@ -3,0 +5,0 @@ create(...debugSelectors: Array<boolean | string>): DebugLogger; |
export declare const BREAK_TRANSFORM_CHAIN: unique symbol; | ||
type TransformFn = (target: any, key: string | symbol, value: any, oldValue?: any) => any | typeof BREAK_TRANSFORM_CHAIN; | ||
type ObserveFn = (target: any, value: any, oldValue?: any) => void; | ||
interface TransformConfig { | ||
setters: TransformFn[]; | ||
getters: TransformFn[]; | ||
observers: ObserveFn[]; | ||
valuesMap: WeakMap<object, Map<string, unknown>>; | ||
optional?: boolean; | ||
} | ||
type ConfigMetadata = Omit<TransformConfig, 'setters' | 'getters' | 'observers' | 'valuesMap'>; | ||
type DecoratedObject = { | ||
__decorator_config: Record<string, TransformConfig>; | ||
}; | ||
export declare function addTransformToInstanceProperty(setTransform: TransformFn, getTransform?: TransformFn, configMetadata?: Omit<TransformConfig, 'setters' | 'getters' | 'valuesMap'>): PropertyDecorator; | ||
export declare function addTransformToInstanceProperty(setTransform: TransformFn, getTransform?: TransformFn, configMetadata?: ConfigMetadata): PropertyDecorator; | ||
export declare function addObserverToInstanceProperty(setObserver: TransformFn): PropertyDecorator; | ||
export declare function isDecoratedObject(target: any): target is DecoratedObject; | ||
@@ -14,0 +18,0 @@ export declare function listDecoratedProperties(target: any): string[]; |
@@ -0,1 +1,10 @@ | ||
interface DebounceOptions { | ||
leading?: boolean; | ||
trailing?: boolean; | ||
maxWait?: number; | ||
} | ||
interface ThrottleOptions { | ||
leading?: boolean; | ||
trailing?: boolean; | ||
} | ||
/** | ||
@@ -5,3 +14,12 @@ * If the key was passed before, then doesn't execute the func | ||
export declare function doOnce(func: () => void, key: string): void; | ||
/** Clear doOnce() state (for test purposes). */ | ||
export declare function clearDoOnceFlags(): void; | ||
export declare namespace doOnce { | ||
var clear: () => void; | ||
} | ||
export declare function identity<T>(x: T): T; | ||
export declare function debounce<T extends (...args: Parameters<T>) => void>(callback: T, waitMs?: number, options?: DebounceOptions): ((...args: Parameters<T>) => void) & { | ||
cancel(): void; | ||
}; | ||
export declare function throttle<T extends (...args: Parameters<T>) => void>(callback: T, waitMs?: number, options?: ThrottleOptions): ((...args: Parameters<T>) => void) & { | ||
cancel(): void; | ||
}; | ||
export {}; |
@@ -16,28 +16,35 @@ import type { DeepPartial } from './types'; | ||
export declare function jsonDiff<T extends unknown>(source: T, target: T): Partial<T> | null; | ||
export declare function jsonClone<T>(source: T): T; | ||
/** | ||
* Special value used by `jsonMerge` to signal that a property should be removed from the merged | ||
* output. | ||
* Recursively clones of primitives and objects. | ||
* | ||
* @param source object | array | ||
* @param options | ||
* | ||
* @return deep clone of source | ||
*/ | ||
export declare const DELETE: unique symbol; | ||
export interface JsonMergeOptions { | ||
/** | ||
* Contains a list of properties where deep clones should be avoided | ||
*/ | ||
avoidDeepClone: string[]; | ||
} | ||
export declare function deepClone<T>(source: T, options?: { | ||
shallow?: string[]; | ||
}): T; | ||
/** | ||
* Merge together the provide JSON object structures, with the precedence of application running | ||
* from higher indexes to lower indexes. | ||
* Clones of primitives and objects. | ||
* | ||
* Deep-clones all objects to avoid mutation of the inputs changing the output object. For arrays, | ||
* just performs a deep-clone of the entire array, no merging of elements attempted. | ||
* @param source any value | ||
* | ||
* @param json all json objects to merge | ||
* @param opts merge options | ||
* @param opts.avoidDeepClone contains a list of properties where deep clones should be avoided | ||
* @return shallow clone of source | ||
*/ | ||
export declare function shallowClone<T>(source: T): T; | ||
/** | ||
* Walk the given JSON object graphs, invoking the visit() callback for every object encountered. | ||
* Arrays are descended into without a callback, however their elements will have the visit() | ||
* callback invoked if they are objects. | ||
* | ||
* @returns the combination of all the json inputs | ||
* @param json to traverse | ||
* @param visit callback for each non-primitive and non-array object found | ||
* @param opts | ||
* @param opts.skip property names to skip when walking | ||
* @param jsons to traverse in parallel | ||
*/ | ||
export declare function jsonMerge<T>(json: T[], opts?: JsonMergeOptions): T; | ||
export declare function jsonWalk<T>(json: T, visit: (...nodes: T[]) => void, opts?: { | ||
skip?: string[]; | ||
}, ...jsons: T[]): void; | ||
export type JsonApplyParams = { | ||
@@ -70,16 +77,2 @@ constructors?: Record<string, new () => any>; | ||
} & JsonApplyParams): Target; | ||
/** | ||
* Walk the given JSON object graphs, invoking the visit() callback for every object encountered. | ||
* Arrays are descended into without a callback, however their elements will have the visit() | ||
* callback invoked if they are objects. | ||
* | ||
* @param json to traverse | ||
* @param visit callback for each non-primitive and non-array object found | ||
* @param opts | ||
* @param opts.skip property names to skip when walking | ||
* @param jsons to traverse in parallel | ||
*/ | ||
export declare function jsonWalk<T>(json: T, visit: (...nodes: T[]) => void, opts?: { | ||
skip?: string[]; | ||
}, ...jsons: T[]): void; | ||
type Classification = RestrictedClassification | 'function' | 'class-instance'; | ||
@@ -86,0 +79,0 @@ type RestrictedClassification = 'array' | 'object' | 'primitive'; |
type Handler = (...args: any[]) => void; | ||
export type Listener<H extends Handler, Meta = unknown> = { | ||
export type Listener<H extends Handler> = { | ||
symbol?: Symbol; | ||
handler: H; | ||
meta?: Meta; | ||
}; | ||
export declare class Listeners<EventType extends string, EventHandler extends Handler, Meta = unknown> { | ||
protected readonly registeredListeners: Map<EventType, Listener<EventHandler, Meta>[]>; | ||
addListener(eventType: EventType, handler: EventHandler, meta?: Meta): () => void; | ||
export declare class Listeners<EventType extends string, EventHandler extends Handler> { | ||
protected readonly registeredListeners: Map<EventType, Listener<EventHandler>[]>; | ||
addListener(eventType: EventType, handler: EventHandler): () => void; | ||
removeListener(eventSymbol: symbol): void; | ||
dispatch(eventType: EventType, ...params: Parameters<EventHandler>): void; | ||
dispatchWrapHandlers(eventType: EventType, wrapFn: (handler: EventHandler, meta?: Meta, ...params: Parameters<EventHandler>) => void, ...params: Parameters<EventHandler>): void; | ||
protected getListenersByType(eventType: EventType): Listener<EventHandler, Meta>[]; | ||
dispatchWrapHandlers(eventType: EventType, wrapFn: (handler: EventHandler, ...params: Parameters<EventHandler>) => void, ...params: Parameters<EventHandler>): void; | ||
protected getListenersByType(eventType: EventType): Listener<EventHandler>[]; | ||
destroy(): void; | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
type MutexCallback = () => Promise<void>; | ||
type MutexCallback = (...args: any[]) => Promise<void>; | ||
export declare class Mutex { | ||
@@ -3,0 +3,0 @@ private available; |
export declare function clamp(min: number, value: number, max: number): number; | ||
export declare function clampArray(value: number, array: number[]): number; | ||
export declare function findMinMax(array: number[]): number[]; | ||
export declare function findRangeExtent(array: number[]): number; | ||
export declare function isEqual(a: number, b: number, epsilon?: number): boolean; | ||
export declare function isNegative(a: number): boolean; | ||
export declare function isReal(a: number): boolean; | ||
export declare function isNegative(value: number): boolean; | ||
export declare function round(value: number, decimals?: number): number; | ||
@@ -17,3 +18,2 @@ /** | ||
export declare function toFixed(value: number, fractionOrSignificantDigits?: number): string; | ||
export declare function toReal(value: number): number; | ||
/** | ||
@@ -24,2 +24,2 @@ * Returns the mathematically correct n modulus of m. For context, the JS % operator is remainder | ||
export declare function mod(n: number, m: number): number; | ||
export declare const countFractionDigits: (value: number, maxFractionDigits?: number) => number; | ||
export declare function countFractionDigits(value: number, maximumFractionDigits?: number): number; |
@@ -1,6 +0,10 @@ | ||
import type { Intersection } from './types'; | ||
import type { Intersection, PlainObject } from './types'; | ||
type FalsyType = false | null | undefined; | ||
export declare function deepMerge(target: any, source: any): any; | ||
export declare function mergeDefaults<TSource extends Record<string, any>, TArgs extends (TSource | FalsyType)[]>(...sources: TArgs): Intersection<Exclude<TArgs[number], FalsyType>>; | ||
export declare function deepMerge<TSource extends PlainObject, TArgs extends (TSource | FalsyType)[]>(...sources: TArgs): Intersection<Exclude<TSource, FalsyType>>; | ||
export declare function mergeDefaults<TSource extends PlainObject, TArgs extends (TSource | FalsyType)[]>(...sources: TArgs): Intersection<Exclude<TArgs[number], FalsyType>>; | ||
export declare function mergeArrayDefaults(dataArray: PlainObject[], ...itemDefaults: PlainObject[]): PlainObject[]; | ||
export declare function mapValues<T extends PlainObject, R>(object: T, mapper: (value: T[keyof T], key: keyof T, object: T) => R): Record<keyof T, R>; | ||
export declare function getPath(object: object, path: string | string[]): any; | ||
export declare function setPath(object: object, path: string | string[], newValue: unknown): void; | ||
export declare function partialAssign<T>(keysToCopy: (keyof T)[], target: T, source?: Partial<T>): T; | ||
export {}; |
@@ -1,2 +0,3 @@ | ||
export declare class Padding { | ||
import { BaseProperties } from './properties'; | ||
export declare class Padding extends BaseProperties { | ||
top: number; | ||
@@ -3,0 +4,0 @@ right: number; |
@@ -1,3 +0,2 @@ | ||
import { ChangeDetectable } from '../scene/changeDetectable'; | ||
export declare class BaseProperties<T extends object = object> extends ChangeDetectable { | ||
export declare class BaseProperties<T extends object = object> { | ||
protected className?: string | undefined; | ||
@@ -14,3 +13,4 @@ constructor(className?: string | undefined); | ||
reset(properties: object[]): PropertiesArray<T>; | ||
toJson(): any[]; | ||
} | ||
export declare function isProperties<T extends object>(value: unknown): value is BaseProperties<T>; |
@@ -1,4 +0,9 @@ | ||
export declare function ProxyProperty(...proxyProperties: string[]): PropertyDecorator; | ||
export declare function ProxyProperty(proxyPath: string | string[]): PropertyDecorator; | ||
export declare function ProxyOnWrite(proxyProperty: string): PropertyDecorator; | ||
export declare function ProxyPropertyOnWrite(childName: string, childProperty?: string): PropertyDecorator; | ||
export interface ActionOnSetOptions<T, V = any> { | ||
newValue?: (this: T, newValue: V) => void; | ||
oldValue?: (this: T, oldValue: V) => void; | ||
changeValue?: (this: T, newValue?: V, oldValue?: V | undefined) => void; | ||
} | ||
/** | ||
@@ -12,6 +17,3 @@ * Allows side-effects to be triggered on property write. | ||
*/ | ||
export declare function ActionOnSet<T>(opts: { | ||
newValue?: (this: T, newValue: any) => void; | ||
oldValue?: (this: T, oldValue: any) => void; | ||
changeValue?: (this: T, newValue?: any, oldValue?: any) => void; | ||
}): PropertyDecorator; | ||
export declare function ActionOnSet<T, V = any>(opts: ActionOnSetOptions<T, V>): PropertyDecorator; | ||
export declare function ObserveChanges<T, V = any>(observerFn: (target: T, newValue?: V, oldValue?: V) => void): PropertyDecorator; |
@@ -15,13 +15,13 @@ type Size = { | ||
private static documentReady; | ||
private static readyEventFn?; | ||
private static ownerDocument?; | ||
private static queuedObserveRequests; | ||
private static pollerHandler?; | ||
static init(document: Document): void; | ||
static onContentLoaded: EventListener; | ||
private static destroy; | ||
private static checkSize; | ||
static observe(element: HTMLElement, cb: OnSizeChange): void; | ||
static unobserve(element: HTMLElement, cleanup?: boolean): void; | ||
static unobserve(element: HTMLElement): void; | ||
static removeFromQueue(element: HTMLElement): void; | ||
static checkClientSize(element: HTMLElement, entry: Entry): void; | ||
} | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
import type { PlainObject } from './types'; | ||
export declare function isDefined<T>(val: T | undefined | null): val is T; | ||
@@ -6,6 +7,7 @@ export declare function isArray<T>(value: T | T[]): value is T[]; | ||
export declare function isValidDate(value: unknown): value is Date; | ||
export declare function isRegExp(value: unknown): value is RegExp; | ||
export declare function isFunction(value: unknown): value is Function; | ||
export declare function isObject(value: unknown): value is object; | ||
export declare function isObjectLike(value: unknown): value is object | unknown[]; | ||
export declare function isPlainObject(value: unknown): value is object; | ||
export declare function isObject(value: unknown): value is PlainObject; | ||
export declare function isObjectLike(value: unknown): value is PlainObject | unknown[]; | ||
export declare function isPlainObject(value: unknown): value is PlainObject; | ||
export declare function isString(value: unknown): value is string; | ||
@@ -15,1 +17,4 @@ export declare function isNumber(value: unknown): value is number; | ||
export declare function isHtmlElement(value: unknown): value is HTMLElement; | ||
export declare function isEnumKey<T extends object>(enumObject: T, enumKey: keyof T): enumKey is keyof T; | ||
export declare function isEnumValue<T extends object>(enumObject: T, enumValue: unknown): enumValue is T[keyof T]; | ||
export declare function isSymbol(value: unknown): value is symbol; |
@@ -0,1 +1,4 @@ | ||
export type PlainObject = { | ||
[key: string | number | symbol]: any; | ||
}; | ||
export type Has<P extends keyof T, T> = T & { | ||
@@ -2,0 +5,0 @@ [K in P]-?: T[P]; |
@@ -1,7 +0,19 @@ | ||
export declare const isString: (v: any) => boolean; | ||
export declare const isStringObject: (v: any) => boolean; | ||
export declare const isDate: (v: any) => boolean; | ||
export declare function isDiscrete(value: any): boolean; | ||
export declare function isContinuous(value: any): boolean; | ||
import type { PlainObject } from './types'; | ||
type StringObject = PlainObject & { | ||
toString: () => string; | ||
}; | ||
type NumberObject = PlainObject & { | ||
valueOf: () => string; | ||
}; | ||
export declare const isStringObject: (value: unknown) => value is StringObject; | ||
export declare const isContinuous: (value: unknown) => value is number | Date | NumberObject; | ||
export declare function checkDatum<T>(value: T, isContinuousScale: boolean): T | string | undefined; | ||
export declare const isNumber: (v: any) => v is number; | ||
/** | ||
* To enable duplicate categories, a category axis value on a datum from integrated charts is transformed into an | ||
* object with `getString()` and `id` properties. The string value can be non-unique so we must instead use the | ||
* unique id property. | ||
* | ||
* @see https://ag-grid.atlassian.net/browse/AG-10526 | ||
*/ | ||
export declare function transformIntegratedCategoryValue(value: unknown): any; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "9.0.2"; | ||
export declare const VERSION = "9.1.0"; |
{ | ||
"name": "ag-charts-community", | ||
"version": "9.0.2", | ||
"version": "9.1.0", | ||
"description": "Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -60,3 +60,3 @@ "main": "./dist/package/main.cjs.js", | ||
"@typescript-eslint/parser": "^5.51.0", | ||
"ag-charts-test": "9.0.2", | ||
"ag-charts-test": "9.1.0", | ||
"canvas": "^2.10.2", | ||
@@ -63,0 +63,0 @@ "jest": "^29.5.0", |
@@ -37,3 +37,3 @@ <picture><source media="(prefers-color-scheme: dark)" srcset="./.github/banner-dark.png"><source media="(prefers-color-scheme: light)" srcset="./.github/banner-light.png"><img alt="AG Charts canvas-based charting trusted by the community, built for enterprise." src="./.github/banner-light.png"></picture> | ||
- Pie | ||
- Doughnut | ||
- Donut | ||
- Histogram | ||
@@ -40,0 +40,0 @@ - Box Plot \* |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5587910
344
117103