@visactor/vchart-types 2.0.12-alpha.5 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ import { AStageAnimate } from '@visactor/vrender-animate';
2
+ import { EasingType } from '@visactor/vrender-core';
3
+ export declare class CallbackDisappearAnimate extends AStageAnimate<any> {
4
+ protected currentAnimationRatio: number;
5
+ protected animationTime: number;
6
+ constructor(from: null, to: null, duration: number, easing: EasingType, params: any);
7
+ onUpdate(end: boolean, ratio: number, out: any): void;
8
+ protected getAnimationTime(): number;
9
+ protected afterStageRender(stage: any, canvas: HTMLCanvasElement): void;
10
+ }
@@ -35,9 +35,6 @@ export declare const ScaleInOutAnimation: {
35
35
  exit: {
36
36
  type: string;
37
37
  };
38
- disappear: {
39
- type: string;
40
- };
41
38
  };
42
39
  export declare const FadeInOutAnimation: {
43
40
  appear: {
@@ -49,9 +46,6 @@ export declare const FadeInOutAnimation: {
49
46
  exit: {
50
47
  type: string;
51
48
  };
52
- disappear: {
53
- type: string;
54
- };
55
49
  };
56
50
  export declare const registerScaleInOutAnimation: () => void;
57
51
  export declare const registerFadeInOutAnimation: () => void;
@@ -1,5 +1,5 @@
1
- import type { ACustomAnimate } from '@visactor/vrender-animate';
2
- import type { IGraphic, EasingType } from '@visactor/vrender-core';
1
+ import type { ACustomAnimate, AStageAnimate } from '@visactor/vrender-animate';
2
+ import type { IGraphic, EasingType, IStage } from '@visactor/vrender-core';
3
3
  import type { IMark, IMarkGraphic } from '../mark/interface/common';
4
4
  import type { BaseMark } from '../mark';
5
5
  export declare enum AnimationStateEnum {
@@ -101,8 +101,11 @@ export interface IAnimationTimeline {
101
101
  controlOptions?: IAnimationControlOptions;
102
102
  }
103
103
  export type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;
104
+ export type IStageAnimationCallback = (stage: IStage, canvas: HTMLCanvasElement, ratio: number, time: number) => void;
104
105
  export interface MarkAnimationSpec {
105
- disappear?: IAnimationConfig | IAnimationConfig[];
106
+ disappear?: IStateAnimationConfig & {
107
+ callBack?: IStageAnimationCallback | AStageAnimate<any>;
108
+ };
106
109
  appear?: IAnimationConfig | IAnimationConfig[];
107
110
  enter?: IAnimationConfig | IAnimationConfig[];
108
111
  exit?: IAnimationConfig | IAnimationConfig[];
@@ -62,6 +62,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
62
62
  created(transformer: Maybe<IChartSpecTransformer>): void;
63
63
  _initInteractions(): void;
64
64
  init(): void;
65
+ initStageAnimation(): void;
65
66
  reDataFlow(): void;
66
67
  onResize(width: number, height: number, reRender?: boolean): void;
67
68
  updateViewBox(viewBox: IBoundsLike, reLayout: boolean): void;
@@ -21,6 +21,7 @@ export declare class Compiler implements ICompiler {
21
21
  protected _rootMarks: IMark[];
22
22
  protected _stage: IStage;
23
23
  protected _stateAnimationConfig: Partial<MarkAnimationSpec>;
24
+ get stateAnimationConfig(): Partial<MarkAnimationSpec>;
24
25
  protected _rootGroup: IGroup;
25
26
  getRootGroup(): IGroup;
26
27
  protected _viewListeners: Map<(...args: any[]) => any, EventListener>;
@@ -65,7 +66,6 @@ export declare class Compiler implements ICompiler {
65
66
  render(morphConfig?: IMorphConfig): void;
66
67
  setStageAnimationConfig(config: Partial<MarkAnimationSpec>): void;
67
68
  updateStateAnimation(): void;
68
- runStageAnimation(): void;
69
69
  updateViewBox(viewBox: IBoundsLike, reRender?: boolean): void;
70
70
  resize(width: number, height: number, reRender?: boolean): void;
71
71
  setBackground(color: IColor): void;
@@ -28,6 +28,7 @@ export interface IGrammarItemMap<T extends IGrammarItem> {
28
28
  export type ICompilerModel = Record<GrammarType, IProductMap<IGrammarItem>>;
29
29
  export interface ICompiler {
30
30
  isInited?: boolean;
31
+ readonly stateAnimationConfig?: MarkAnimationSpec;
31
32
  getCanvas: () => HTMLCanvasElement | undefined;
32
33
  getStage: () => IStage | undefined;
33
34
  compile: (ctx: {
@@ -0,0 +1,5 @@
1
+ export declare const BuiltIn_DISAPPEAR_ANIMATE_NAME: string;
2
+ export declare enum RenderStateEnum {
3
+ render = "render",
4
+ disappear = "disappear"
5
+ }
@@ -81,6 +81,7 @@ export declare class VChart implements IVChart {
81
81
  private _chartPlugin?;
82
82
  private _vChartPlugin?;
83
83
  private _onResize?;
84
+ private _renderState;
84
85
  constructor(spec: ISpec, options: IInitOption);
85
86
  private _setNewSpec;
86
87
  private _getSpecFromOriginalSpec;
@@ -214,5 +215,7 @@ export declare class VChart implements IVChart {
214
215
  protected getTheme: (...keys: string[]) => any;
215
216
  isAnimationEnable(): boolean;
216
217
  protected _getChartOption(type: string): IChartOption;
218
+ runDisappearAnimation(): void;
219
+ private _reSetRenderState;
217
220
  }
218
221
  export declare const registerVChartCore: () => void;
@@ -60,6 +60,7 @@ export interface IGeoRegionSpec extends IRegionSpec {
60
60
  min?: number;
61
61
  max?: number;
62
62
  };
63
+ zoomRate?: number;
63
64
  }
64
65
  export type RegionSpec = IRegionSpec | IGeoRegionSpec;
65
66
  export interface IRegionSpecInfo<T extends RegionSpec = IRegionSpec> extends IModelSpecInfo {
@@ -158,7 +158,6 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
158
158
  marks: IMark[];
159
159
  }[];
160
160
  initAnimation(): void;
161
- initStageAnimation(): void;
162
161
  initMarkState(): void;
163
162
  initSeriesStyleState(): void;
164
163
  afterInitMark(): void;
@@ -28,7 +28,7 @@ export declare class HeatmapSeries<T extends IHeatmapSeriesSpec = IHeatmapSeries
28
28
  initCellBackgroundMarkStyle(): void;
29
29
  getColorAttribute(): {
30
30
  scale: any;
31
- field: any;
31
+ field: string;
32
32
  };
33
33
  getInteractionTriggers(): {
34
34
  trigger: Partial<import("../../interaction/interface/trigger").IBaseTriggerOptions>;
@@ -5,3 +5,4 @@ export declare function couldBeValidNumber(v: any): boolean;
5
5
  export declare function toValidNumber(v: any): number;
6
6
  export declare function isNumeric(value: string): boolean;
7
7
  export declare function isDataDomainSpec(domain: any): domain is IDataDomainSpec[];
8
+ export declare function isClass(obj: any): boolean;