@visactor/vchart-types 2.0.3-alpha.0 → 2.0.3-alpha.1

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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/chart/base/base-chart.d.ts +1 -0
  4. package/types/chart/index.d.ts +2 -2
  5. package/types/chart/interface/chart.d.ts +1 -0
  6. package/types/chart/interface/common.d.ts +1 -1
  7. package/types/compile/compiler.d.ts +1 -0
  8. package/types/compile/interface/compilable-item.d.ts +1 -0
  9. package/types/compile/interface/compiler.d.ts +5 -0
  10. package/types/component/axis/cartesian/band-axis.d.ts +8 -0
  11. package/types/component/axis/mixin/band-axis-mixin.d.ts +2 -0
  12. package/types/component/brush/interface.d.ts +1 -0
  13. package/types/component/crosshair/base.d.ts +1 -1
  14. package/types/component/data-zoom/data-filter-base-component.d.ts +0 -1
  15. package/types/component/data-zoom/interface.d.ts +0 -3
  16. package/types/component/data-zoom/util.d.ts +0 -1
  17. package/types/core/interface.d.ts +1 -0
  18. package/types/core/vchart.d.ts +2 -0
  19. package/types/mark/base/base-line.d.ts +1 -1
  20. package/types/mark/base/base-mark.d.ts +6 -2
  21. package/types/mark/group.d.ts +3 -2
  22. package/types/mark/interface/common.d.ts +5 -2
  23. package/types/model/base-model.d.ts +5 -1
  24. package/types/model/interface.d.ts +5 -2
  25. package/types/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
  26. package/types/series/dot/dot.d.ts +0 -1
  27. package/types/series/dot/interface.d.ts +0 -1
  28. package/types/series/interface/type.d.ts +0 -3
  29. package/types/series/link/interface.d.ts +1 -10
  30. package/types/series/link/link.d.ts +1 -3
  31. package/types/series/sankey/sankey.d.ts +10 -10
  32. package/types/util/mark.d.ts +1 -0
  33. package/types/util/object.d.ts +1 -0
@@ -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[];
@@ -35,7 +35,7 @@ import { RangeColumnChart, registerRangeColumnChart } from './range-column';
35
35
  import type { IRoseChartSpec } from './rose';
36
36
  import { RoseChart, registerRoseChart } from './rose';
37
37
  import type { ISankeyChartSpec } from './sankey';
38
- import { SankeyChart, registerSankeyChart } from './sankey';
38
+ import { SankeyChart, registerSankeyChart, SankeyChartSpecTransformer } from './sankey';
39
39
  import type { IScatterChartSpec } from './scatter';
40
40
  import { ScatterChart, registerScatterChart } from './scatter';
41
41
  import type { ISequenceChartSpec } from './sequence';
@@ -63,6 +63,6 @@ import type { IChart } from './interface/chart';
63
63
  import { BaseWordCloudChart } from './word-cloud/base/base';
64
64
  import { BaseWordCloudChartSpecTransformer } from './word-cloud/base/word-cloud-base-transformer';
65
65
  import { BaseHistogramChart } from './histogram/base/base';
66
- export { AreaChart, BarChart, BarChartSpecTransformer, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChartSpecTransformer, FunnelChart, GaugeChart, HeatmapChart, HistogramChartSpecTransformer, BaseHistogramChart, HistogramChart, LineChart, MapChart, BasePieChartSpecTransformer, BasePieChart, PieChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, BaseWordCloudChartSpecTransformer, BaseWordCloudChart, WordCloudChart, TreemapChart, VennChart, BaseChart, MosaicChart };
66
+ export { AreaChart, BarChart, BarChartSpecTransformer, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChartSpecTransformer, FunnelChart, GaugeChart, HeatmapChart, HistogramChartSpecTransformer, BaseHistogramChart, HistogramChart, LineChart, MapChart, BasePieChartSpecTransformer, BasePieChart, PieChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeAreaChart, RoseChart, SankeyChart, SankeyChartSpecTransformer, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, BaseWordCloudChartSpecTransformer, BaseWordCloudChart, WordCloudChart, TreemapChart, VennChart, BaseChart, MosaicChart };
67
67
  export { registerLineChart, registerAreaChart, registerBarChart, registerBoxplotChart, registerCirclePackingChart, registerCircularProgressChart, registerCommonChart, registerFunnelChart, registerGaugeChart, registerHeatmapChart, registerHistogramChart, registerLinearProgressChart, registerMapChart, registerPieChart, registerRadarChart, registerRangeAreaChart, registerRangeColumnChart, registerRoseChart, registerSankeyChart, registerScatterChart, registerSequenceChart, registerSunburstChart, registerTreemapChart, registerWaterfallChart, registerWordCloudChart, registerCorrelationChart, registerLiquidChart, registerWordCloudShapeChart, registerVennChart, registerMosaicChart };
68
68
  export type { IChart, IAreaChartSpec, IBarChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, IVennChartSpec, IMosaicChartSpec };
@@ -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[];
@@ -5,7 +5,7 @@ import type { IBoundsLike } from '@visactor/vutils';
5
5
  import type { ISeriesSpecInfo } from '../../series/interface';
6
6
  import type { IRegionSpecInfo } from '../../region/interface';
7
7
  import type { IPerformanceHook } from '../../typings';
8
- export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'getChartLayoutRect' | 'globalScale' | 'getChart' | 'getSeriesData'> {
8
+ export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'getChartLayoutRect' | 'globalScale' | 'getChart' | 'getSeriesData' | 'animation'> {
9
9
  container: HTMLElement | null;
10
10
  canvas?: HTMLCanvasElement | OffscreenCanvas | string;
11
11
  modeParams?: IRenderOption['modeParams'];
@@ -34,6 +34,7 @@ export declare class Compiler implements ICompiler {
34
34
  private _layoutState?;
35
35
  private _compileChart;
36
36
  constructor(container: IRenderContainer, option: IRenderOption);
37
+ getChart(): IChart;
37
38
  getCanvas(): HTMLCanvasElement | undefined;
38
39
  _gestureController?: Gesture;
39
40
  getStage(): IStage | undefined;
@@ -54,6 +54,7 @@ export interface ICompiler {
54
54
  updateLayoutTag: () => void;
55
55
  getLayoutState: () => LayoutState;
56
56
  getRootGroup: () => IGroup;
57
+ getChart: () => IChart;
57
58
  }
58
59
  export interface ICompilable {
59
60
  getCompiler: () => ICompiler;
@@ -45,6 +45,11 @@ export interface IRenderOption {
45
45
  layer?: ILayer;
46
46
  beforeRender?: IStageParams['beforeRender'];
47
47
  afterRender?: IStageParams['afterRender'];
48
+ renderHooks?: {
49
+ afterClearScreen?: IStageParams['afterClearScreen'];
50
+ afterClearRect?: IStageParams['afterClearRect'];
51
+ [key: string]: any;
52
+ };
48
53
  background?: IColor;
49
54
  logLevel?: number;
50
55
  onError?: (...args: any[]) => void;
@@ -43,5 +43,13 @@ export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICarte
43
43
  maxBandSize: number;
44
44
  minBandSize: number;
45
45
  };
46
+ _compareSpec(spec: T, prevSpec: T): {
47
+ change: boolean;
48
+ reMake: boolean;
49
+ reRender: boolean;
50
+ reSize: boolean;
51
+ reCompile: boolean;
52
+ };
53
+ reInit(spec?: T): void;
46
54
  }
47
55
  export declare const registerCartesianBandAxis: () => void;
@@ -33,10 +33,12 @@ export interface BandAxisMixin {
33
33
  _forceLayout: () => void;
34
34
  _getNormalizedValue: (values: any[], length: number) => number;
35
35
  _onTickDataChange: (compilableData: CompilableData) => void;
36
+ registerTicksTransform: () => string;
36
37
  }
37
38
  export declare class BandAxisMixin {
38
39
  private _tickDataMap;
39
40
  protected _initData(): void;
41
+ protected _updateData(): void;
40
42
  protected _rawDomainIndex: {
41
43
  [key: string | number | symbol]: number;
42
44
  }[];
@@ -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;
@@ -22,7 +22,6 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
22
22
  protected _dataUpdating: boolean;
23
23
  protected _stateScale: IBaseScale;
24
24
  protected _relatedAxisComponent: IComponent;
25
- protected _linkedAxisComponent: IComponent;
26
25
  protected _originalStateFields: Record<number, string | number>;
27
26
  protected _seriesUserId?: StringOrNumber[];
28
27
  protected _seriesIndex?: number[];
@@ -11,8 +11,6 @@ export interface IDataFilterComponentSpec extends Omit<IComponentSpec, 'width' |
11
11
  field?: string;
12
12
  axisId?: string;
13
13
  axisIndex?: number;
14
- linkedAxisId?: string;
15
- linkedAxisIndex?: number;
16
14
  regionIndex?: number | number[];
17
15
  start?: number;
18
16
  end?: number;
@@ -39,7 +37,6 @@ export interface IDataFilterComponentSpec extends Omit<IComponentSpec, 'width' |
39
37
  export interface IRoamDragSpec extends IRoamSpec {
40
38
  reverse?: boolean;
41
39
  filter?: (delta: [number, number], e?: BaseEventParams['event']) => boolean;
42
- autoVisible?: boolean;
43
40
  }
44
41
  export interface IRoamScrollSpec extends IRoamSpec {
45
42
  reverse?: boolean;
@@ -12,7 +12,6 @@ export interface IDataFilterComputeDomainOption {
12
12
  dataCollection: any[];
13
13
  stateFields: string[];
14
14
  valueFields: string[];
15
- seriesTypes: string[];
16
15
  isCategoryState?: boolean;
17
16
  method: 'sum';
18
17
  };
@@ -102,6 +102,7 @@ export interface IVChart {
102
102
  x: number;
103
103
  y: number;
104
104
  }) => void;
105
+ isAnimationEnable: () => boolean;
105
106
  stopAnimation: () => void;
106
107
  pauseAnimation: () => void;
107
108
  resumeAnimation: () => void;
@@ -179,6 +179,7 @@ export declare class VChart implements IVChart {
179
179
  getScale(scaleId: string): import("@visactor/vscale").IBaseScale;
180
180
  setDimensionIndex(value: StringOrNumber, opt?: DimensionIndexOption): void;
181
181
  stopAnimation(): void;
182
+ reRunNormalAnimation(): void;
182
183
  pauseAnimation(): void;
183
184
  resumeAnimation(): void;
184
185
  convertDatumToPosition(datum: Datum, dataLinkInfo?: DataLinkSeries, isRelativeToCanvas?: boolean, checkInViewData?: boolean): IPoint | null;
@@ -207,6 +208,7 @@ export declare class VChart implements IVChart {
207
208
  private _chartPluginApply;
208
209
  protected _getMode(): (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
209
210
  protected getTheme: (...keys: string[]) => any;
211
+ isAnimationEnable(): boolean;
210
212
  protected _getChartOption(type: string): IChartOption;
211
213
  }
212
214
  export declare const registerVChartCore: () => void;
@@ -15,7 +15,7 @@ export declare abstract class BaseLineMark<T extends ILineLikeMarkSpec = ILineLi
15
15
  setStyle<T>(style: Partial<ConvertToMarkStyleSpec<T>> | Partial<IMarkStyle<T>>, state?: StateValueType, level?: number): void;
16
16
  _isValidPointChannel: (channel: string) => boolean;
17
17
  _getLineSegments(items: any[], points: IPointLike[]): any[];
18
- _getPrevPoints(g: ILine): IPointLike[];
18
+ _getPrevPoints(g: ILine): IPointLike[] | null;
19
19
  _runPointsEncoder(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
20
20
  _runEncoderOfGraphic(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
21
21
  protected _getDataByKey(data: Datum[]): import("../interface").GroupedData<Datum>;
@@ -44,6 +44,9 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
44
44
  protected _animationConfig: Partial<MarkAnimationSpec>;
45
45
  getAnimationConfig(): Partial<MarkAnimationSpec>;
46
46
  setAnimationConfig(config: Partial<MarkAnimationSpec>): void;
47
+ protected _disabledAnimationStates?: string[];
48
+ disableAnimationByState(state: string | string[]): void;
49
+ enableAnimationByState(state: string | string[]): void;
47
50
  private _skipBeforeLayouted;
48
51
  setSkipBeforeLayouted(skip: boolean): void;
49
52
  protected _groupKey?: string;
@@ -123,6 +126,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
123
126
  protected _attrsByGroup?: Record<string, T>;
124
127
  protected _getDataByKey(data: Datum[]): GroupedData<Datum>;
125
128
  protected _getCommonContext(): {
129
+ compiler: import("../../compile/interface").ICompiler;
126
130
  markType: MarkTypeEnum;
127
131
  markId: number;
128
132
  modelId: number;
@@ -138,6 +142,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
138
142
  protected createAnimationStateList(type: string, animationConfig: Partial<MarkAnimationSpec>): any;
139
143
  protected tryRunMorphing(graphics: IMarkGraphic[]): boolean;
140
144
  protected _runStateAnimation(graphics: IMarkGraphic[]): void;
145
+ protected _setAnimationState(g: IMarkGraphic): void;
141
146
  protected _runJoin(data: Datum[]): void;
142
147
  _runEncoderOfGraphic(styles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
143
148
  _runGroupEncoder(groupStyles: Record<string, (datum: Datum) => any>): any;
@@ -179,8 +184,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
179
184
  protected _runProgressiveApplyGraphic(graphics: IMarkGraphic[]): void;
180
185
  protected _runProgressiveStep(): void;
181
186
  renderProgressive(): void;
182
- updateAnimationState(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
183
- hasAnimationByState(state: keyof MarkAnimationSpec): boolean;
187
+ hasAnimationByState(state: AnimationStateValues): boolean;
184
188
  hasAnimation(): boolean;
185
189
  runAnimation(): void;
186
190
  }
@@ -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 { DiffState, 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';
@@ -10,6 +10,7 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
10
10
  readonly type = MarkTypeEnum.group;
11
11
  protected _marks: IMark[];
12
12
  getMarks(): IMark[];
13
+ protected _diffState: DiffState;
13
14
  protected _product: Maybe<IGroup>;
14
15
  getProduct: () => Maybe<IGroup>;
15
16
  protected isMarkExist(mark: IMark): boolean;
@@ -23,8 +24,8 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
23
24
  protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
24
25
  getGraphics(): IMarkGraphic[];
25
26
  renderInner(): void;
27
+ clearExitGraphics(): void;
26
28
  render(): void;
27
- updateAnimationState(callback: (g: IMarkGraphic) => AnimationStateValues): void;
28
29
  release(): void;
29
30
  }
30
31
  export declare const registerGroupMark: () => void;
@@ -8,6 +8,7 @@ import type { Datum, StringOrNumber } from '../../typings';
8
8
  import type { IGraphic } from '@visactor/vrender-core';
9
9
  import type { IGroupMark } from './mark';
10
10
  import type { IAnimationConfig } from '../../animation/interface';
11
+ import type { ICompiler } from '../../compile/interface';
11
12
  export interface VisualScaleType {
12
13
  scale: IBaseScale;
13
14
  field: StringOrNumber;
@@ -35,8 +36,9 @@ export type IMarkStyle<T extends ICommonSpec> = {
35
36
  [key in keyof T]: MarkInputStyle<T[key]>;
36
37
  };
37
38
  export type DiffStateValues = 'update' | 'enter' | 'exit';
38
- export type AnimationStateValues = 'appear' | 'enter' | 'update' | 'exit' | 'disappear';
39
+ export type AnimationStateValues = 'appear' | 'enter' | 'update' | 'exit' | 'disappear' | 'none' | 'state';
39
40
  export interface IGraphicContext {
41
+ compiler: ICompiler;
40
42
  markType: MarkTypeEnum;
41
43
  markId: number;
42
44
  modelId: number;
@@ -92,9 +94,10 @@ export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
92
94
  restartProgressive: () => void;
93
95
  renderProgressive: () => void;
94
96
  canAnimateAfterProgressive: () => boolean;
95
- updateAnimationState: (callback: (graphic: IMarkGraphic) => AnimationStateValues) => void;
96
97
  runAnimation: () => void;
97
98
  needClear?: boolean;
99
+ disableAnimationByState: (state: string | string[]) => void;
100
+ enableAnimationByState: (state: string | string[]) => void;
98
101
  }
99
102
  export type IMark = IMarkRaw<ICommonSpec>;
100
103
  export interface ICompileMarkConfig extends IMarkConfig {
@@ -1,7 +1,7 @@
1
1
  import type { IEvent } from '../event/interface';
2
2
  import type { IEffect, IModel, IModelInitOption, IModelOption, IModelEvaluateOption, IModelSpec, IModelMarkInfo, IModelSpecInfo } from './interface';
3
3
  import type { CoordinateType } from '../typings/coordinate';
4
- import type { ICompileMarkConfig, IMark, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
4
+ import type { AnimationStateValues, ICompileMarkConfig, IMark, IMarkGraphic, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
5
5
  import type { Datum, StateValueType, ConvertToMarkStyleSpec, ICommonSpec, StringOrNumber, IRect, ILayoutRect } from '../typings';
6
6
  import { MarkSet } from '../mark/mark-set';
7
7
  import type { ILayoutItem } from '../layout/interface';
@@ -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;
@@ -77,4 +78,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
77
78
  getColorScheme(): any;
78
79
  getSpecInfo(): IModelSpecInfo<any>;
79
80
  getSpecIndex(): number;
81
+ private _aniamtionStateCallback;
82
+ updateAnimateStateCallback(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
83
+ getAnimationStateCallback(): (graphic: IMarkGraphic) => AnimationStateValues;
80
84
  }
@@ -1,7 +1,7 @@
1
1
  import type { IBoundsLike } from '@visactor/vutils';
2
2
  import type { DataSet, DataView } from '@visactor/vdataset';
3
3
  import type { IEvent, IEventDispatcher } from '../event/interface';
4
- import type { IMark, IMarkRaw, IMarkStyle, MarkTypeEnum } from '../mark/interface';
4
+ import type { AnimationStateValues, IMark, IMarkGraphic, IMarkRaw, IMarkStyle, MarkTypeEnum } from '../mark/interface';
5
5
  import type { RenderMode } from '../typings/spec/common';
6
6
  import type { StringOrNumber } from '../typings/common';
7
7
  import type { IGroupMarkSpec, ConvertToMarkStyleSpec, ICommonSpec } from '../typings/visual';
@@ -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;
@@ -86,6 +87,8 @@ export interface IModel extends ICompilable {
86
87
  setMarkStyle: <T extends ICommonSpec>(mark?: IMarkRaw<T>, style?: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>, state?: StateValueType, level?: number) => void;
87
88
  initMarkStyleWithSpec: (mark?: IMark, spec?: any) => void;
88
89
  getSpecInfo: () => IModelSpecInfo;
90
+ updateAnimateStateCallback: (callback: (graphic: IMarkGraphic) => AnimationStateValues) => void;
91
+ getAnimationStateCallback: () => (graphic: IMarkGraphic) => AnimationStateValues;
89
92
  }
90
93
  export interface ILayoutModel extends IModel {
91
94
  getLayoutStartPoint: () => IPoint;
@@ -114,7 +117,7 @@ export interface IModelOption extends ICompilableInitOption {
114
117
  getChart: () => IChart;
115
118
  getSeriesData: (id: StringOrNumber | undefined, index: number | undefined) => DataView | undefined;
116
119
  globalScale: IGlobalScale;
117
- animation: boolean;
120
+ animation?: boolean;
118
121
  onError: (...args: any[]) => void;
119
122
  disableTriggerEvent?: boolean;
120
123
  getDimensionInfo?: (chart: IChart | undefined, pos: ILayoutPoint, isTooltip?: boolean) => IDimensionInfo[] | null;
@@ -34,7 +34,7 @@ export declare class DomTooltipHandler extends BaseTooltipHandler {
34
34
  protected _updateTooltip(visible: boolean, params: TooltipHandlerParams): void;
35
35
  protected _initStyle(): void;
36
36
  protected _updateDomStringByCol(actualTooltip?: ITooltipActual): void;
37
- protected _updateDomStyle(sizeKey?: 'width' | 'height'): void;
37
+ protected _updateDomStyle(sizeKey: 'width' | 'height', refreshSize: boolean): void;
38
38
  protected _getParentElement(spec: ITooltipSpec): HTMLElement;
39
39
  isTooltipShown(): boolean;
40
40
  reInit(): void;
@@ -32,7 +32,6 @@ export declare class DotSeries<T extends IDotSeriesSpec = IDotSeriesSpec> extend
32
32
  protected _gridBackground?: IFillMarkSpec;
33
33
  setGridBackground(gridBackground: IFillMarkSpec): void;
34
34
  initData(): void;
35
- protected _statisticViewData(): void;
36
35
  getStatisticFields(): {
37
36
  key: string;
38
37
  operations: Array<'max' | 'min' | 'values'>;
@@ -23,7 +23,6 @@ export interface IDotSeriesSpec extends ICartesianSeriesSpec {
23
23
  subTitleField?: string;
24
24
  highLightSeriesGroup?: string;
25
25
  name: string;
26
- linearMode?: boolean;
27
26
  [SeriesMarkNameEnum.dot]?: IMarkSpec<ISymbolMarkSpec>;
28
27
  [SeriesMarkNameEnum.title]?: ISequenceLabel;
29
28
  [SeriesMarkNameEnum.symbol]?: IMarkSpec<ISymbolMarkSpec>;
@@ -8,7 +8,6 @@ export declare enum SeriesTypeEnum {
8
8
  dot = "dot",
9
9
  geo = "geo",
10
10
  link = "link",
11
- curveLink = "curveLink",
12
11
  map = "map",
13
12
  pie = "pie",
14
13
  radar = "radar",
@@ -62,8 +61,6 @@ export declare const enum SeriesMarkNameEnum {
62
61
  cell = "cell",
63
62
  cellBackground = "cellBackground",
64
63
  link = "link",
65
- curveLink = "curveLink",
66
- imageLabel = "imageLabel",
67
64
  arrow = "arrow",
68
65
  pie = "pie",
69
66
  labelLine = "labelLine",
@@ -1,6 +1,6 @@
1
1
  import type { ICartesianSeriesSpec, ICartesianSeriesTheme } from '../cartesian/interface';
2
2
  import type { IMarkSpec, IMarkTheme } from '../../typings/spec/common';
3
- import type { IImageMarkSpec, ILineMarkSpec, ISymbolMarkSpec } from '../../typings/visual';
3
+ import type { ILineMarkSpec, ISymbolMarkSpec } from '../../typings/visual';
4
4
  import type { SeriesMarkNameEnum } from '../interface/type';
5
5
  import type { DataView } from '@visactor/vdataset';
6
6
  import type { IDotSeriesSpec } from '../dot/interface';
@@ -10,11 +10,7 @@ export interface ILinkSeriesSpec extends ICartesianSeriesSpec, ILinkSeriesSpecFr
10
10
  toField: string;
11
11
  dotSeriesIndex: number;
12
12
  dotTypeField?: string;
13
- linkType?: LinkType;
14
- imageLabelField?: string;
15
- allowExtend?: boolean;
16
13
  [SeriesMarkNameEnum.link]?: IMarkSpec<ILineMarkSpec>;
17
- [SeriesMarkNameEnum.imageLabel]?: IMarkSpec<IImageMarkSpec>;
18
14
  }
19
15
  type ILinkSeriesSpecFromDot = {
20
16
  dataDot?: DataView;
@@ -25,10 +21,5 @@ type ILinkSeriesSpecFromDot = {
25
21
  export interface ILinkSeriesTheme extends ICartesianSeriesTheme {
26
22
  [SeriesMarkNameEnum.link]?: Partial<IMarkTheme<ILineMarkSpec>>;
27
23
  [SeriesMarkNameEnum.arrow]?: Partial<IMarkTheme<ISymbolMarkSpec>>;
28
- [SeriesMarkNameEnum.imageLabel]?: Partial<IMarkTheme<IImageMarkSpec>>;
29
- }
30
- export declare enum LinkType {
31
- line = "line",
32
- curve = "curve"
33
24
  }
34
25
  export {};
@@ -3,7 +3,7 @@ import type { Datum } from '../../typings';
3
3
  import type { IMark } from '../../mark/interface';
4
4
  import { SeriesTypeEnum } from '../interface/type';
5
5
  import type { IDotSeriesSpec } from '../dot/interface';
6
- import { type ILinkSeriesSpec } from './interface';
6
+ import type { ILinkSeriesSpec } from './interface';
7
7
  import type { SeriesMarkMap } from '../interface';
8
8
  export declare class LinkSeries<T extends ILinkSeriesSpec = ILinkSeriesSpec> extends CartesianSeries<T> {
9
9
  static readonly type: string;
@@ -12,7 +12,6 @@ export declare class LinkSeries<T extends ILinkSeriesSpec = ILinkSeriesSpec> ext
12
12
  static readonly builtInTheme: {
13
13
  link: import("./interface").ILinkSeriesTheme;
14
14
  };
15
- private _curveLinkCountMap;
16
15
  protected _fromField?: string;
17
16
  getFromField(): string;
18
17
  setFromField(field: string): void;
@@ -32,7 +31,6 @@ export declare class LinkSeries<T extends ILinkSeriesSpec = ILinkSeriesSpec> ext
32
31
  private _containerMark;
33
32
  private _linkMark;
34
33
  private _arrowMark;
35
- private _imageLabelMark;
36
34
  initMark(): void;
37
35
  initMarkStyle(): void;
38
36
  afterInitMark(): void;
@@ -5,7 +5,7 @@ import type { Datum, StringOrNumber } from '../../typings';
5
5
  import { DataView } from '@visactor/vdataset';
6
6
  import type { ISankeySeriesSpec } from './interface';
7
7
  import type { ExtendEventParam } from '../../event/interface';
8
- import type { IMark, IMarkGraphic, ITextMark } from '../../mark/interface';
8
+ import type { ILinkPathMark, IMark, IMarkGraphic, IRectMark, ITextMark } from '../../mark/interface';
9
9
  import { SankeySeriesSpecTransformer } from './sankey-transformer';
10
10
  import type { ILabelSpec } from '../../component';
11
11
  export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpec> extends CartesianSeries<T> {
@@ -17,8 +17,8 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
17
17
  static readonly builtInTheme: {
18
18
  sankey: import("./interface").ISankeySeriesTheme;
19
19
  };
20
- private _nodeMark;
21
- private _linkMark;
20
+ protected _nodeMark: IRectMark;
21
+ protected _linkMark: ILinkPathMark;
22
22
  private _nodeLayoutZIndex;
23
23
  private _labelLayoutZIndex;
24
24
  protected _nodesSeriesData?: DataView;
@@ -27,7 +27,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
27
27
  protected _categoryField: string;
28
28
  private _colorScale;
29
29
  private _nodeList;
30
- private _needClear;
30
+ protected _needClear: boolean;
31
31
  get direction(): "horizontal" | "vertical";
32
32
  getCategoryField(): string;
33
33
  setCategoryField(f: string): string;
@@ -55,12 +55,12 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
55
55
  private nodesSeriesDataUpdate;
56
56
  private linksSeriesDataUpdate;
57
57
  protected _handleEmphasisElement: (params: ExtendEventParam) => void;
58
- protected _handleClearEmpty: () => void;
59
- protected _handleNodeAdjacencyClick: (graphic: IMarkGraphic) => void;
60
- protected _handleLinkAdjacencyClick: (graphic: IMarkGraphic) => void;
61
- protected _handleNodeRelatedClick: (graphic: IMarkGraphic) => void;
62
- protected _handleLinkRelatedClick: (graphic: IMarkGraphic) => void;
63
- protected _highLightElements(graphics: IMarkGraphic[], highlightNodes: string[]): void;
58
+ protected _handleClearEmpty(): void;
59
+ protected _handleNodeAdjacencyClick(graphic: IMarkGraphic): void;
60
+ protected _handleLinkAdjacencyClick(graphic: IMarkGraphic): void;
61
+ protected _handleNodeRelatedClick(graphic: IMarkGraphic): void;
62
+ protected _handleLinkRelatedClick(graphic: IMarkGraphic): void;
63
+ protected _highLightElements(graphics: IMarkGraphic[], highlightNodes: (string | number)[]): void;
64
64
  protected initTooltip(): void;
65
65
  _setNodeOrdinalColorScale(): void;
66
66
  getNodeList(): any;
@@ -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>;
@@ -1,3 +1,4 @@
1
1
  import { get, pick, cloneDeep } from '@visactor/vutils';
2
2
  export { get, pick, cloneDeep };
3
3
  export declare function field(f: string | string[]): (datum: any) => any;
4
+ export declare function removeUndefined(obj: any, deep?: boolean): void;