ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
55 lines (54 loc) • 2.05 kB
TypeScript
import { _ModuleSupport } from 'ag-charts-community';
import type { BoxBounds, DynamicContext, ModuleInstance } from 'ag-charts-core';
import { BaseProperties } from 'ag-charts-core';
import type { CssColor, DurationMs, Opacity } from 'ag-charts-types';
import type { AgFlashOnUpdateItem, AgFlashOnUpdateOptions } from './flashOnUpdateTypes';
export type BandFlashDatum = {
firstKey: string;
lastKey: string;
bounds: BoxBounds;
prevBounds?: BoxBounds;
phase: FlashAnimationPhase;
};
export type FlashAnimationPhase = Extract<_ModuleSupport.AnimationPhase, 'remove' | 'update' | 'add'>;
export declare function shouldMergeBands(dataLength: number, axisSpan: number): boolean;
export declare function mergeBands(data: BandFlashDatum[], isHorizontal: boolean, axisSpan: number): BandFlashDatum[];
export declare class FlashOnUpdate extends BaseProperties implements ModuleInstance, AgFlashOnUpdateOptions {
private readonly ctx;
static readonly className = "FlashOnUpdate";
private readonly id;
enabled: boolean;
item: AgFlashOnUpdateItem;
fill: CssColor;
fillOpacity: Opacity;
flashDuration?: DurationMs;
fadeOutDuration?: DurationMs;
private readonly cleanup;
private readonly flashGroup;
private readonly chartFlashRect;
private readonly bandGroup;
private readonly bandSelection;
private seriesRect?;
private axisCtx?;
private previousBoundsCache?;
private readonly pendingDiffs;
constructor(ctx: DynamicContext<_ModuleSupport.ChartRegistry>);
destroy(): void;
private onLayoutComplete;
private resolveDomainValue;
private onDataModelDiff;
private onPreSceneRender;
private flashChart;
private cacheBounds;
private cachePreviousBounds;
private measureBandBounds;
private flashCategoryBands;
private hasScaleChange;
private createBandFlashData;
private measureBandsBatch;
private updateSelection;
private animateBands;
private stopFlash;
private animate;
private getCustomTiming;
}