@visactor/vchart-types 2.0.0 → 2.0.1-alpha.0

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.
@@ -83,6 +83,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
83
83
  onLayoutStart(): void;
84
84
  onLayoutEnd(): void;
85
85
  onEvaluateEnd(option: IChartEvaluateOption): void;
86
+ onBeforeRender(): void;
86
87
  getLayoutElements(): ILayoutItem[];
87
88
  getRegionsInIndex: (index?: number[]) => IRegion[];
88
89
  getAllRegions: () => IRegion[];
@@ -55,6 +55,7 @@ export interface IChart extends ICompilable {
55
55
  onEvaluateEnd: (ctx: IChartEvaluateOption) => void;
56
56
  onResize: (width: number, height: number, reRender: boolean) => void;
57
57
  onLayout: () => void;
58
+ onBeforeRender: () => void;
58
59
  reInit: () => void;
59
60
  getAllSeries: () => ISeries[];
60
61
  getRegionsInIndex: (index?: number[]) => IRegion[];
@@ -33,6 +33,7 @@ export interface IBrushTheme {
33
33
  export interface IBrushSpec extends IBrushTheme, IBrushDataBindSpec {
34
34
  id?: string;
35
35
  visible?: boolean;
36
+ updateElementsState?: boolean;
36
37
  }
37
38
  export type IBrushType = 'x' | 'y' | 'rect' | 'polygon';
38
39
  export type IBrushMode = 'single' | 'multiple';
@@ -51,7 +51,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
51
51
  protected _initEvent(): void;
52
52
  private _registerEvent;
53
53
  private _eventOff;
54
- updateLayoutAttribute(): void;
54
+ onBeforeRender(): void;
55
55
  protected calculateTriggerPoint(params: any): {
56
56
  x: number;
57
57
  y: number;
@@ -138,6 +138,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
138
138
  protected createAnimationStateList(type: string, animationConfig: Partial<MarkAnimationSpec>): any;
139
139
  protected tryRunMorphing(graphics: IMarkGraphic[]): boolean;
140
140
  protected _runStateAnimation(graphics: IMarkGraphic[]): void;
141
+ protected _setAnimationState(g: IMarkGraphic): void;
141
142
  protected _runJoin(data: Datum[]): void;
142
143
  _runEncoderOfGraphic(styles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
143
144
  _runGroupEncoder(groupStyles: Record<string, (datum: Datum) => any>): any;
@@ -179,8 +180,9 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
179
180
  protected _runProgressiveApplyGraphic(graphics: IMarkGraphic[]): void;
180
181
  protected _runProgressiveStep(): void;
181
182
  renderProgressive(): void;
183
+ protected _aniamtionStateCallback: (g: IMarkGraphic) => AnimationStateValues;
182
184
  updateAnimationState(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
183
- hasAnimationByState(state: keyof MarkAnimationSpec): boolean;
185
+ hasAnimationByState(state: AnimationStateValues): boolean;
184
186
  hasAnimation(): boolean;
185
187
  runAnimation(): void;
186
188
  }
@@ -1,7 +1,7 @@
1
1
  import type { Maybe } from '../typings';
2
2
  import type { IGroupMarkSpec } from '../typings/visual';
3
3
  import { BaseMark } from './base/base-mark';
4
- import type { AnimationStateValues, IGroupMark, IMark, IMarkGraphic, MarkType } from './interface';
4
+ import { type AnimationStateValues, type IGroupMark, type IMark, type IMarkGraphic, type MarkType } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
6
  import { type IMarkCompileOption } from '../compile/mark';
7
7
  import type { IGroup, IGroupGraphicAttribute } from '@visactor/vrender-core';
@@ -35,7 +35,7 @@ export type IMarkStyle<T extends ICommonSpec> = {
35
35
  [key in keyof T]: MarkInputStyle<T[key]>;
36
36
  };
37
37
  export type DiffStateValues = 'update' | 'enter' | 'exit';
38
- export type AnimationStateValues = 'appear' | 'enter' | 'update' | 'exit' | 'disappear';
38
+ export type AnimationStateValues = 'appear' | 'enter' | 'update' | 'exit' | 'disappear' | 'none' | 'state';
39
39
  export interface IGraphicContext {
40
40
  markType: MarkTypeEnum;
41
41
  markId: number;
@@ -45,6 +45,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
45
45
  onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
46
46
  onLayoutEnd(): void;
47
47
  onEvaluateEnd(ctx: IModelEvaluateOption): void;
48
+ onBeforeRender(): void;
48
49
  onDataUpdate(): void;
49
50
  beforeRelease(): void;
50
51
  clear(): void;
@@ -76,6 +76,7 @@ export interface IModel extends ICompilable {
76
76
  beforeRelease: () => void;
77
77
  onEvaluateEnd: (ctx: IModelEvaluateOption) => void;
78
78
  onDataUpdate: () => void;
79
+ onBeforeRender: () => void;
79
80
  updateSpec: (spec: any, totalSpec?: any) => IUpdateSpecResult;
80
81
  getSpec?: () => any;
81
82
  getSpecIndex: () => number;
@@ -3,3 +3,4 @@ import type { IMarkGraphic } from '../mark/interface/common';
3
3
  export declare const isCollectionMark: (type: string) => boolean;
4
4
  export declare const getDatumOfGraphic: (g: IMarkGraphic) => import("..").Datum;
5
5
  export declare const findMarkGraphic: (rootGroup: IGraphic, target: IGraphic) => IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
6
+ export declare const getDiffAttributesOfGraphic: (g: IMarkGraphic, newAttrs: any) => Record<string, any>;