@visactor/vchart
Version:
charts lib based @visactor/VGrammar
19 lines (18 loc) • 1.96 kB
TypeScript
import type { IAnimationConfig } from '@visactor/vgrammar-core';
import type { MarkAnimationSpec, IAnimationState } from './interface';
import type { IStateAnimateSpec, IAnimationSpec } from './spec';
import type { SeriesMarkNameEnum } from '../series/interface/type';
import type { ISeries } from '../series';
import type { ISeriesSpec } from '../typings';
import type { IModelMarkAttributeContext } from '../compile/mark';
export declare const AnimationStates: string[];
export declare function animationConfig<Preset extends string>(defaultConfig?: MarkAnimationSpec, userConfig?: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, params?: {
dataIndex: (datum: any, params: any) => number;
dataCount: () => number;
}): MarkAnimationSpec;
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "enter" | "exit" | "update" | "appear" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
export declare function isChannelAnimation(animationConfig: IAnimationConfig): boolean;
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "enter" | "exit" | "update" | "appear" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
export declare function isAnimationEnabledForSeries(series: ISeries): boolean;