@visactor/vchart-types 1.15.5-alpha.8 → 2.0.0-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.
- package/package.json +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/animate-manager.d.ts +2 -4
- package/types/animation/interface.d.ts +86 -2
- package/types/animation/spec.d.ts +27 -3
- package/types/animation/utils.d.ts +3 -4
- package/types/chart/base/base-chart.d.ts +10 -7
- package/types/chart/funnel/util.d.ts +2 -0
- package/types/chart/interface/chart.d.ts +3 -4
- package/types/chart/interface/common.d.ts +2 -9
- package/types/chart/sankey/sankey.d.ts +1 -1
- package/types/compile/compilable-base.d.ts +1 -1
- package/types/compile/compiler.d.ts +35 -25
- package/types/compile/data/compilable-data.d.ts +7 -7
- package/types/compile/data/interface.d.ts +4 -1
- package/types/compile/grammar-item.d.ts +7 -13
- package/types/compile/interface/compilable-item.d.ts +22 -28
- package/types/compile/interface/compiler.d.ts +13 -4
- package/types/compile/mark/index.d.ts +0 -1
- package/types/compile/mark/interface.d.ts +42 -33
- package/types/compile/mark/mark-state-manager.d.ts +11 -13
- package/types/compile/mark/util.d.ts +1 -1
- package/types/compile/state-manager.d.ts +11 -0
- package/types/compile/util.d.ts +14 -0
- package/types/component/axis/base-axis.d.ts +5 -3
- package/types/component/axis/cartesian/axis.d.ts +1 -1
- package/types/component/axis/cartesian/time-axis.d.ts +1 -0
- package/types/component/axis/interface/common.d.ts +8 -0
- package/types/component/base/base-component.d.ts +1 -2
- package/types/component/brush/brush.d.ts +12 -10
- package/types/component/crosshair/base.d.ts +25 -36
- package/types/component/crosshair/cartesian.d.ts +5 -28
- package/types/component/crosshair/interface/common.d.ts +67 -2
- package/types/component/crosshair/interface/index.d.ts +0 -2
- package/types/component/crosshair/interface/spec.d.ts +8 -4
- package/types/component/crosshair/polar.d.ts +6 -22
- package/types/component/crosshair/utils/cartesian.d.ts +5 -26
- package/types/component/crosshair/utils/polar.d.ts +18 -11
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -1
- package/types/component/data-zoom/interface.d.ts +11 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -2
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/geo/interface.d.ts +1 -1
- package/types/component/label/base-label.d.ts +5 -0
- package/types/component/label/interface.d.ts +4 -3
- package/types/component/label/label.d.ts +5 -3
- package/types/component/label/util.d.ts +9 -10
- package/types/component/legend/util.d.ts +3 -3
- package/types/component/marker/base-marker.d.ts +1 -1
- package/types/component/tooltip/processor/interface.d.ts +1 -1
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +3 -3
- package/types/constant/data.d.ts +1 -0
- package/types/constant/event.d.ts +53 -2
- package/types/core/factory.d.ts +28 -3
- package/types/core/index.d.ts +2 -1
- package/types/core/interface.d.ts +13 -4
- package/types/core/vchart.d.ts +6 -6
- package/types/data/transforms/treemap.d.ts +5 -6
- package/types/data/transforms/venn.d.ts +10 -0
- package/types/data/transforms/waterfall.d.ts +1 -0
- package/types/event/events/base.d.ts +1 -2
- package/types/event/index.d.ts +1 -0
- package/types/event/interface.d.ts +6 -9
- package/types/index-harmony-simple.d.ts +2 -1
- package/types/index.d.ts +0 -1
- package/types/interaction/config.d.ts +13 -0
- package/types/interaction/index.d.ts +9 -1
- package/types/interaction/interaction.d.ts +17 -25
- package/types/interaction/interface/common.d.ts +22 -0
- package/types/interaction/interface/spec.d.ts +53 -0
- package/types/interaction/interface/trigger.d.ts +87 -0
- package/types/interaction/triggers/base.d.ts +28 -0
- package/types/interaction/triggers/dimension-hover.d.ts +22 -0
- package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
- package/types/interaction/triggers/element-active.d.ts +20 -0
- package/types/interaction/triggers/element-highlight-by-graphic-name.d.ts +13 -0
- package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
- package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
- package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
- package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
- package/types/interaction/triggers/element-highlight.d.ts +25 -0
- package/types/interaction/triggers/element-select-by-graphic-name.d.ts +8 -0
- package/types/interaction/triggers/element-select.d.ts +24 -0
- package/types/interaction/triggers/enum.d.ts +8 -0
- package/types/interaction/triggers/util.d.ts +12 -0
- package/types/interaction/zoom/zoomable.d.ts +1 -0
- package/types/layout/interface.d.ts +2 -2
- package/types/layout/layout-item.d.ts +2 -3
- package/types/mark/arc.d.ts +2 -2
- package/types/mark/area.d.ts +2 -0
- package/types/mark/base/base-line.d.ts +16 -2
- package/types/mark/base/base-mark.d.ts +131 -13
- package/types/mark/box-plot.d.ts +11 -5
- package/types/mark/cell.d.ts +5 -2
- package/types/mark/component.d.ts +11 -3
- package/types/mark/glyph.d.ts +29 -0
- package/types/mark/group.d.ts +10 -6
- package/types/mark/index.d.ts +3 -1
- package/types/mark/interface/common.d.ts +61 -9
- package/types/mark/interface/enum.d.ts +6 -0
- package/types/mark/interface/index.d.ts +1 -0
- package/types/mark/interface/mark.d.ts +18 -1
- package/types/mark/interface/type.d.ts +1 -0
- package/types/mark/label.d.ts +4 -3
- package/types/mark/link-path.d.ts +35 -5
- package/types/mark/liquid.d.ts +47 -5
- package/types/mark/ripple.d.ts +39 -4
- package/types/mark/rule.d.ts +3 -0
- package/types/mark/symbol.d.ts +4 -4
- package/types/mark/text.d.ts +4 -2
- package/types/mark/transform/data-sampling.d.ts +10 -0
- package/types/mark/transform/filter.d.ts +1 -0
- package/types/mark/transform/map.d.ts +1 -0
- package/types/mark/transform/symbol-overlap.d.ts +14 -0
- package/types/mark/utils/common.d.ts +4 -0
- package/types/mark/utils/glyph.d.ts +2 -0
- package/types/mark/utils/index.d.ts +2 -0
- package/types/mark/utils/line.d.ts +3 -0
- package/types/model/base-model.d.ts +8 -8
- package/types/model/interface.d.ts +4 -8
- package/types/model/layout-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +2 -4
- package/types/plugin/other.d.ts +3 -3
- package/types/region/interface.d.ts +0 -2
- package/types/region/region.d.ts +3 -9
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area.d.ts +1 -1
- package/types/series/bar/animation.d.ts +1 -1
- package/types/series/bar/bar.d.ts +3 -3
- package/types/series/base/base-series.d.ts +26 -42
- package/types/series/base/tooltip-helper.d.ts +1 -2
- package/types/series/box-plot/box-plot.d.ts +3 -3
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/animation.d.ts +1 -1
- package/types/series/circle-packing/circle-packing.d.ts +1 -1
- package/types/series/correlation/animation.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +3 -4
- package/types/series/dot/dot.d.ts +2 -2
- package/types/series/funnel/funnel.d.ts +3 -2
- package/types/series/funnel/tooltip-helper.d.ts +1 -1
- package/types/series/gauge/animation.d.ts +1 -1
- package/types/series/gauge/gauge-pointer.d.ts +4 -1
- package/types/series/gauge/gauge.d.ts +2 -2
- package/types/series/geo/geo.d.ts +2 -2
- package/types/series/heatmap/animation.d.ts +1 -1
- package/types/series/heatmap/heatmap.d.ts +4 -1
- package/types/series/interface/common.d.ts +1 -4
- package/types/series/interface/series.d.ts +6 -1
- package/types/series/line/animation.d.ts +1 -1
- package/types/series/line/line.d.ts +1 -1
- package/types/series/link/link.d.ts +5 -2
- package/types/series/liquid/animation.d.ts +1 -1
- package/types/series/liquid/liquid.d.ts +4 -1
- package/types/series/map/interface.d.ts +10 -0
- package/types/series/mixin/line-mixin.d.ts +5 -5
- package/types/series/pictogram/pictogram.d.ts +15 -19
- package/types/series/pie/animation/animation.d.ts +4 -3
- package/types/series/pie/animation/centerOffset.d.ts +1 -1
- package/types/series/pie/interface.d.ts +2 -2
- package/types/series/pie/pie.d.ts +8 -6
- package/types/series/polar/progress-like/animation.d.ts +1 -1
- package/types/series/polar/progress-like/progress-like.d.ts +1 -2
- package/types/series/progress/circular/circular.d.ts +4 -1
- package/types/series/progress/linear/animation.d.ts +1 -1
- package/types/series/progress/linear/linear.d.ts +4 -1
- package/types/series/radar/animation.d.ts +11 -9
- package/types/series/radar/radar.d.ts +2 -2
- package/types/series/range-column/animation.d.ts +1 -1
- package/types/series/rose/animation.d.ts +1 -1
- package/types/series/sankey/animation.d.ts +1 -1
- package/types/series/sankey/sankey.d.ts +11 -12
- package/types/series/sankey/tooltip-helper.d.ts +1 -1
- package/types/series/scatter/animation.d.ts +1 -1
- package/types/series/sunburst/animation/enter.d.ts +1 -1
- package/types/series/sunburst/animation/exit.d.ts +1 -1
- package/types/series/sunburst/animation/preset.d.ts +1 -1
- package/types/series/sunburst/animation/utils.d.ts +2 -2
- package/types/series/sunburst/sunburst.d.ts +1 -1
- package/types/series/treemap/animation.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +1 -2
- package/types/series/venn/animation.d.ts +1 -1
- package/types/series/venn/venn.d.ts +2 -1
- package/types/series/waterfall/animation.d.ts +1 -1
- package/types/series/waterfall/waterfall.d.ts +2 -2
- package/types/series/word-cloud/animation.d.ts +1 -1
- package/types/series/word-cloud/base.d.ts +1 -1
- package/types/series/word-cloud/interface.d.ts +1 -1
- package/types/typings/common.d.ts +13 -0
- package/types/typings/spec/common.d.ts +37 -36
- package/types/typings/visual.d.ts +9 -2
- package/types/util/array.d.ts +1 -0
- package/types/util/index.d.ts +1 -0
- package/types/util/mark.d.ts +5 -0
- package/types/util/math.d.ts +1 -1
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { StateManager } from '../compile/
|
|
2
|
-
import type { StateValueMap } from '../compile/signal/interface';
|
|
1
|
+
import { StateManager } from '../compile/state-manager';
|
|
3
2
|
import type { IAnimate, IAnimateState } from './interface';
|
|
4
3
|
import { AnimationStateEnum } from './interface';
|
|
4
|
+
import type { StateValueMap } from '../compile/interface/compilable-item';
|
|
5
5
|
export declare class AnimateManager extends StateManager implements IAnimate {
|
|
6
6
|
protected _stateMap: IAnimateState & StateValueMap;
|
|
7
7
|
readonly id: number;
|
|
8
|
-
protected stateKeyToSignalName: (key: string) => string;
|
|
9
|
-
getAnimationStateSignalName(): string;
|
|
10
8
|
updateAnimateState(state: AnimationStateEnum, noRender?: boolean): void;
|
|
11
9
|
protected _getDefaultStateMap(): IAnimateState & StateValueMap;
|
|
12
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ACustomAnimate, EasingType, IGraphic } from '@visactor/vrender-core';
|
|
2
2
|
import type { ICompilable } from '../compile/interface';
|
|
3
|
+
import type { IMark } from '../mark/interface/common';
|
|
3
4
|
export declare enum AnimationStateEnum {
|
|
4
5
|
appear = "appear",
|
|
5
6
|
disappear = "disappear",
|
|
@@ -19,7 +20,6 @@ export interface IAnimateState {
|
|
|
19
20
|
export interface IAnimate extends ICompilable {
|
|
20
21
|
id: number;
|
|
21
22
|
updateAnimateState: (state: AnimationStateEnum, noRender?: boolean) => void;
|
|
22
|
-
getAnimationStateSignalName: () => string;
|
|
23
23
|
}
|
|
24
24
|
export interface ICartesianGroupAnimationParams {
|
|
25
25
|
direction: () => 'x' | 'y';
|
|
@@ -27,3 +27,87 @@ export interface ICartesianGroupAnimationParams {
|
|
|
27
27
|
width: () => number;
|
|
28
28
|
height: () => number;
|
|
29
29
|
}
|
|
30
|
+
export interface IAnimationParameters {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
mark: IMark;
|
|
34
|
+
group: IMark | null;
|
|
35
|
+
elementIndex: number;
|
|
36
|
+
elementCount: number;
|
|
37
|
+
view: any;
|
|
38
|
+
}
|
|
39
|
+
export type IAnimationChannelInterpolator = (ratio: number, from: any, to: any, nextAttributes: any, datum: any, g: IGraphic, parameters: IAnimationParameters) => boolean | void;
|
|
40
|
+
export type GraphicFunctionCallback<T> = (datum: any, g: IGraphic, params: any) => T;
|
|
41
|
+
export type GraphicFunctionValueType<T> = GraphicFunctionCallback<T> | T;
|
|
42
|
+
export interface IStateAnimationConfig {
|
|
43
|
+
duration?: number;
|
|
44
|
+
easing?: EasingType;
|
|
45
|
+
}
|
|
46
|
+
export interface IAnimationControlOptions {
|
|
47
|
+
stopWhenStateChange?: boolean;
|
|
48
|
+
immediatelyApply?: boolean;
|
|
49
|
+
ignoreLoopFinalAttributes?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface CommonAnimationConfigItem {
|
|
52
|
+
custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;
|
|
53
|
+
customParameters?: GraphicFunctionValueType<any>;
|
|
54
|
+
easing?: EasingType;
|
|
55
|
+
duration?: GraphicFunctionValueType<number>;
|
|
56
|
+
delay?: GraphicFunctionValueType<number>;
|
|
57
|
+
delayAfter?: GraphicFunctionValueType<number>;
|
|
58
|
+
oneByOne?: GraphicFunctionValueType<boolean | number>;
|
|
59
|
+
startTime?: GraphicFunctionValueType<number>;
|
|
60
|
+
totalTime?: GraphicFunctionValueType<number>;
|
|
61
|
+
loop?: boolean | number;
|
|
62
|
+
options?: GraphicFunctionValueType<any>;
|
|
63
|
+
controlOptions?: IAnimationControlOptions;
|
|
64
|
+
}
|
|
65
|
+
export interface TypeAnimationConfig extends CommonAnimationConfigItem {
|
|
66
|
+
type: string;
|
|
67
|
+
}
|
|
68
|
+
export type IAnimationChannelFunction = (datum: any, g: IGraphic, mark: IMark) => any;
|
|
69
|
+
export type IAnimationChannelAttrs = Record<string, {
|
|
70
|
+
from?: any | IAnimationChannelFunction;
|
|
71
|
+
to?: any | IAnimationChannelFunction;
|
|
72
|
+
}>;
|
|
73
|
+
export interface ChannelAnimationConfig extends CommonAnimationConfigItem {
|
|
74
|
+
channel: IAnimationChannelAttrs | string[];
|
|
75
|
+
}
|
|
76
|
+
export type IAnimationTypeConfig = TypeAnimationConfig | ChannelAnimationConfig | CommonAnimationConfigItem;
|
|
77
|
+
export interface IAnimationCustomConstructor {
|
|
78
|
+
new (from: any, to: any, duration: number, ease: EasingType, parameters?: any): ACustomAnimate<any>;
|
|
79
|
+
}
|
|
80
|
+
export type IAnimationEffect = {
|
|
81
|
+
type?: string;
|
|
82
|
+
channel?: IAnimationChannelAttrs | string[];
|
|
83
|
+
custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;
|
|
84
|
+
customParameters?: GraphicFunctionValueType<any>;
|
|
85
|
+
easing?: EasingType;
|
|
86
|
+
options?: GraphicFunctionValueType<any>;
|
|
87
|
+
};
|
|
88
|
+
export interface IAnimationTimeSlice {
|
|
89
|
+
effects: IAnimationEffect | IAnimationEffect[];
|
|
90
|
+
duration?: GraphicFunctionValueType<number>;
|
|
91
|
+
delay?: GraphicFunctionValueType<number>;
|
|
92
|
+
delayAfter?: GraphicFunctionValueType<number>;
|
|
93
|
+
}
|
|
94
|
+
export interface IAnimationTimeline {
|
|
95
|
+
id?: string;
|
|
96
|
+
timeSlices: IAnimationTimeSlice | IAnimationTimeSlice[];
|
|
97
|
+
startTime?: GraphicFunctionValueType<number>;
|
|
98
|
+
totalTime?: GraphicFunctionValueType<number>;
|
|
99
|
+
oneByOne?: GraphicFunctionValueType<number | boolean>;
|
|
100
|
+
loop?: GraphicFunctionValueType<number | boolean>;
|
|
101
|
+
partitioner?: GraphicFunctionCallback<boolean>;
|
|
102
|
+
sort?: (datumA: any, datumB: any, graphicA: IGraphic, graphicB: IGraphic) => number;
|
|
103
|
+
controlOptions?: IAnimationControlOptions;
|
|
104
|
+
}
|
|
105
|
+
export type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;
|
|
106
|
+
export interface MarkAnimationSpec {
|
|
107
|
+
appear?: IAnimationConfig | IAnimationConfig[];
|
|
108
|
+
enter?: IAnimationConfig | IAnimationConfig[];
|
|
109
|
+
exit?: IAnimationConfig | IAnimationConfig[];
|
|
110
|
+
update?: IAnimationConfig | IAnimationConfig[];
|
|
111
|
+
normal?: IAnimationConfig | IAnimationConfig[];
|
|
112
|
+
state?: IStateAnimationConfig;
|
|
113
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type { IRunningConfig as IMorphConfig, IMorphAnimationConfig } from '@visactor/vgrammar-core';
|
|
1
|
+
import type { EasingType, IGraphic } from '@visactor/vrender-core';
|
|
2
|
+
import type { IAnimationConfig, IStateAnimationConfig } from './interface';
|
|
4
3
|
export interface ICommonStateAnimateSpec {
|
|
5
4
|
duration?: number;
|
|
6
5
|
delay?: number;
|
|
@@ -25,3 +24,28 @@ export interface IMorphSeriesSpec {
|
|
|
25
24
|
morphKey?: string;
|
|
26
25
|
morphElementKey?: string;
|
|
27
26
|
}
|
|
27
|
+
export type MorphData = {
|
|
28
|
+
prev: any[];
|
|
29
|
+
next: any[];
|
|
30
|
+
};
|
|
31
|
+
export type MorphElements = {
|
|
32
|
+
prev: IGraphic[];
|
|
33
|
+
next: IGraphic[];
|
|
34
|
+
};
|
|
35
|
+
export type MorphFunctionCallback<T> = (datum: MorphData, element: MorphElements, parameters: any) => T;
|
|
36
|
+
export type MorphFunctionType<T> = T | MorphFunctionCallback<T>;
|
|
37
|
+
export type MorphFunctionValueType<T> = MorphFunctionType<T> | T;
|
|
38
|
+
export interface IMorphAnimationConfig {
|
|
39
|
+
easing?: EasingType;
|
|
40
|
+
delay?: MorphFunctionValueType<number>;
|
|
41
|
+
duration?: MorphFunctionValueType<number>;
|
|
42
|
+
oneByOne?: MorphFunctionValueType<boolean | number>;
|
|
43
|
+
splitPath?: MorphFunctionValueType<'clone' | null | undefined>;
|
|
44
|
+
}
|
|
45
|
+
export interface IMorphConfig {
|
|
46
|
+
reuse?: boolean;
|
|
47
|
+
morph?: boolean;
|
|
48
|
+
morphAll?: boolean;
|
|
49
|
+
animation?: IMorphAnimationConfig;
|
|
50
|
+
enableExitAnimation?: boolean;
|
|
51
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { IAnimationConfig } from '
|
|
2
|
-
import type { MarkAnimationSpec, IAnimationState } from './interface';
|
|
1
|
+
import type { MarkAnimationSpec, IAnimationState, IAnimationConfig } from './interface';
|
|
3
2
|
import type { IStateAnimateSpec, IAnimationSpec } from './spec';
|
|
4
3
|
import type { SeriesMarkNameEnum } from '../series/interface/type';
|
|
5
4
|
import type { ISeries } from '../series';
|
|
@@ -10,9 +9,9 @@ export declare function animationConfig<Preset extends string>(defaultConfig?: M
|
|
|
10
9
|
dataIndex: (datum: any, params: any) => number;
|
|
11
10
|
dataCount: () => number;
|
|
12
11
|
}): MarkAnimationSpec;
|
|
13
|
-
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" | "
|
|
12
|
+
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" | "update" | "exit" | "disappear" | "appear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
14
13
|
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
|
|
15
14
|
export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
|
|
16
15
|
export declare function isChannelAnimation(animationConfig: IAnimationConfig): boolean;
|
|
17
|
-
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "enter" | "
|
|
16
|
+
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "enter" | "update" | "exit" | "disappear" | "appear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
18
17
|
export declare function isAnimationEnabledForSeries(series: ISeries): boolean;
|
|
@@ -3,7 +3,7 @@ import { ChartData } from '../chart-meta/data';
|
|
|
3
3
|
import type { Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec, IDataValues, ILayoutRect, ILayoutOrientPadding } from '../../typings';
|
|
4
4
|
import type { ILayoutItem, LayoutCallBack } from '../../layout/interface';
|
|
5
5
|
import type { ILayoutModelState, IModel, IModelOption, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
6
|
-
import type { IChart,
|
|
6
|
+
import type { IChart, IChartRenderOption, IChartOption, IChartEvaluateOption, DimensionIndexOption, IChartSpecTransformerOption, IChartSpecTransformer } from '../interface';
|
|
7
7
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
8
8
|
import type { IRegion } from '../../region/interface';
|
|
9
9
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
@@ -13,9 +13,10 @@ import type { DataView } from '@visactor/vdataset';
|
|
|
13
13
|
import type { DataSet } from '@visactor/vdataset';
|
|
14
14
|
import type { IParserOptions } from '@visactor/vdataset';
|
|
15
15
|
import type { IBoundsLike, Maybe } from '@visactor/vutils';
|
|
16
|
-
import type { IRunningConfig as IMorphConfig, IView } from '@visactor/vgrammar-core';
|
|
17
16
|
import { CompilableBase } from '../../compile/compilable-base';
|
|
18
17
|
import type { IGlobalScale } from '../../scale/interface';
|
|
18
|
+
import type { IMorphConfig } from '../../animation/spec';
|
|
19
|
+
import type { IInteraction } from '../../interaction/interface/common';
|
|
19
20
|
export declare class BaseChart<T extends IChartSpec> extends CompilableBase implements IChart {
|
|
20
21
|
readonly type: string;
|
|
21
22
|
readonly seriesType: string;
|
|
@@ -52,8 +53,10 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
52
53
|
protected _paddingSpec: ILayoutOrientPadding;
|
|
53
54
|
protected _canvasRect: ILayoutRect;
|
|
54
55
|
protected _backgroundMark: IRectMark;
|
|
56
|
+
protected _interaction: IInteraction;
|
|
55
57
|
constructor(spec: T, option: IChartOption);
|
|
56
58
|
created(transformer: Maybe<IChartSpecTransformer>): void;
|
|
59
|
+
_initInteractions(): void;
|
|
57
60
|
init(): void;
|
|
58
61
|
reDataFlow(): void;
|
|
59
62
|
onResize(width: number, height: number, reRender?: boolean): void;
|
|
@@ -73,9 +76,9 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
73
76
|
private _createLayout;
|
|
74
77
|
setLayout(layout: LayoutCallBack): void;
|
|
75
78
|
private _initLayoutFunc;
|
|
76
|
-
layout(
|
|
77
|
-
onLayoutStart(
|
|
78
|
-
onLayoutEnd(
|
|
79
|
+
layout(): void;
|
|
80
|
+
onLayoutStart(): void;
|
|
81
|
+
onLayoutEnd(): void;
|
|
79
82
|
onEvaluateEnd(option: IChartEvaluateOption): void;
|
|
80
83
|
getLayoutElements(): ILayoutItem[];
|
|
81
84
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
@@ -135,7 +138,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
135
138
|
compileSeries(): void;
|
|
136
139
|
compileComponents(): void;
|
|
137
140
|
release(): void;
|
|
138
|
-
onLayout(
|
|
141
|
+
onLayout(): void;
|
|
139
142
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
140
143
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
141
144
|
setHovered(datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
@@ -146,7 +149,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
146
149
|
private _initEvent;
|
|
147
150
|
protected _enableMarkAnimation(states: string | string[]): void;
|
|
148
151
|
protected _disableMarkAnimation(states: string | string[]): void;
|
|
149
|
-
protected _setStateInDatum(stateKey: string,
|
|
152
|
+
protected _setStateInDatum(stateKey: string, d: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
150
153
|
setDimensionIndex(value: StringOrNumber, opt: DimensionIndexOption): void;
|
|
151
154
|
getColorScheme(): import("../..").IThemeColorScheme;
|
|
152
155
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { IEvent } from '../../event/interface';
|
|
2
2
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
|
-
import type { IView } from '@visactor/vgrammar-core';
|
|
4
3
|
import type { IParserOptions } from '@visactor/vdataset';
|
|
5
4
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
6
5
|
import type { IMark } from '../../mark/interface';
|
|
7
6
|
import type { IModel, IModelConstructor, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
8
7
|
import type { IRegion, IRegionConstructor } from '../../region/interface';
|
|
9
8
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
10
|
-
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartRenderOption, IChartSpecInfo, IChartSpecTransformerOption
|
|
9
|
+
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartRenderOption, IChartSpecInfo, IChartSpecTransformerOption } from './common';
|
|
11
10
|
import type { IBoundsLike, IPadding, Maybe } from '@visactor/vutils';
|
|
12
11
|
import type { ICompilable } from '../../compile/interface';
|
|
13
12
|
import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber, IShowTooltipOption, IDataValues, ILayoutRect, IData } from '../../typings';
|
|
@@ -40,7 +39,7 @@ export interface IChart extends ICompilable {
|
|
|
40
39
|
getEvent: () => IEvent;
|
|
41
40
|
getGlobalScale: () => IGlobalScale;
|
|
42
41
|
setLayout: (layout: LayoutCallBack) => void;
|
|
43
|
-
layout: (
|
|
42
|
+
layout: () => void;
|
|
44
43
|
getLayoutTag: () => boolean;
|
|
45
44
|
setLayoutTag: (tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean) => boolean;
|
|
46
45
|
updateData: (id: StringOrNumber, data: unknown, updateGlobalScale?: boolean, options?: IParserOptions) => void;
|
|
@@ -53,7 +52,7 @@ export interface IChart extends ICompilable {
|
|
|
53
52
|
onEvaluateEnd: (ctx: IChartEvaluateOption) => void;
|
|
54
53
|
onRender: (ctx: IChartRenderOption) => void;
|
|
55
54
|
onResize: (width: number, height: number, reRender: boolean) => void;
|
|
56
|
-
onLayout: (
|
|
55
|
+
onLayout: () => void;
|
|
57
56
|
reInit: () => void;
|
|
58
57
|
getAllSeries: () => ISeries[];
|
|
59
58
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
2
2
|
import type { IRenderOption } from '../../compile/interface';
|
|
3
3
|
import type { IModelOption, IModelSpecInfo } from '../../model/interface';
|
|
4
|
-
import type { IView } from '@visactor/vgrammar-core';
|
|
5
4
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
6
5
|
import type { ISeriesSpecInfo } from '../../series/interface';
|
|
7
6
|
import type { IRegionSpecInfo } from '../../region/interface';
|
|
8
|
-
|
|
9
|
-
srView?: IView;
|
|
10
|
-
group?: any;
|
|
11
|
-
}
|
|
12
|
-
export interface IAttributeParams {
|
|
13
|
-
srView?: IView;
|
|
14
|
-
group?: any;
|
|
15
|
-
}
|
|
7
|
+
import type { IPerformanceHook } from '../../typings';
|
|
16
8
|
export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'getChartLayoutRect' | 'globalScale' | 'getChart' | 'getSeriesData'> {
|
|
17
9
|
container: HTMLElement | null;
|
|
18
10
|
canvas?: HTMLCanvasElement | OffscreenCanvas | string;
|
|
@@ -20,6 +12,7 @@ export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'g
|
|
|
20
12
|
viewBox?: IBoundsLike;
|
|
21
13
|
layout?: LayoutCallBack;
|
|
22
14
|
disableTriggerEvent?: boolean;
|
|
15
|
+
performanceHook?: IPerformanceHook;
|
|
23
16
|
}
|
|
24
17
|
export interface IChartSpecTransformerOption extends Partial<IChartOption> {
|
|
25
18
|
seriesType?: string;
|
|
@@ -12,6 +12,6 @@ export declare class SankeyChart<T extends ISankeyChartSpec = ISankeyChartSpec>
|
|
|
12
12
|
readonly transformerConstructor: typeof SankeyChartSpecTransformer;
|
|
13
13
|
readonly type: string;
|
|
14
14
|
readonly seriesType: string;
|
|
15
|
-
protected _setStateInDatum(stateKey: string,
|
|
15
|
+
protected _setStateInDatum(stateKey: string, datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
16
16
|
}
|
|
17
17
|
export declare const registerSankeyChart: () => void;
|
|
@@ -4,7 +4,7 @@ export declare abstract class CompilableBase implements ICompilable {
|
|
|
4
4
|
getOption(): ICompilableInitOption;
|
|
5
5
|
getCompiler: () => ICompiler;
|
|
6
6
|
constructor(option: ICompilableInitOption);
|
|
7
|
-
getVGrammarView(): import("@visactor/vgrammar-core").IView;
|
|
8
7
|
abstract compile(): void;
|
|
8
|
+
getStage(): import("@visactor/vrender-core").IStage;
|
|
9
9
|
release(): void;
|
|
10
10
|
}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
1
|
+
import type { CompilerListenerParameters, ICompiler, IRenderContainer, IRenderOption } from './interface';
|
|
2
|
+
import { LayoutState } from './interface';
|
|
3
3
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
4
4
|
import type { EventSourceType } from '../event/interface';
|
|
5
5
|
import type { IChart } from '../chart/interface';
|
|
6
|
-
import type { IColor, IStage } from '@visactor/vrender-core';
|
|
6
|
+
import type { IColor, IGroup, IStage } from '@visactor/vrender-core';
|
|
7
7
|
import type { IMorphConfig } from '../animation/spec';
|
|
8
|
-
import type { IVChart } from '../core/interface';
|
|
8
|
+
import type { IVChart, IVChartRenderOption } from '../core/interface';
|
|
9
|
+
import { type IMark } from '../mark/interface';
|
|
10
|
+
import type { Gesture } from '@visactor/vrender-kits';
|
|
9
11
|
type EventListener = {
|
|
10
12
|
type: string;
|
|
11
13
|
callback: (...args: any[]) => void;
|
|
12
14
|
};
|
|
13
15
|
export declare class Compiler implements ICompiler {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
private _count;
|
|
17
|
+
private _cachedMarks;
|
|
18
|
+
private _progressiveMarks?;
|
|
19
|
+
private _progressiveRafId?;
|
|
20
|
+
protected _rootMarks: IMark[];
|
|
21
|
+
protected _stage: IStage;
|
|
22
|
+
protected _rootGroup: IGroup;
|
|
23
|
+
getRootGroup(): IGroup;
|
|
16
24
|
protected _viewListeners: Map<(...args: any[]) => any, EventListener>;
|
|
17
25
|
protected _windowListeners: Map<(...args: any[]) => any, EventListener>;
|
|
18
26
|
protected _canvasListeners: Map<(...args: any[]) => any, EventListener>;
|
|
@@ -23,31 +31,34 @@ export declare class Compiler implements ICompiler {
|
|
|
23
31
|
protected _container: IRenderContainer;
|
|
24
32
|
protected _option: IRenderOption;
|
|
25
33
|
private _released;
|
|
26
|
-
|
|
27
|
-
protected _interactions: (InteractionSpec & {
|
|
28
|
-
seriesId?: number;
|
|
29
|
-
regionId?: number;
|
|
30
|
-
})[];
|
|
31
|
-
getModel(): ICompilerModel;
|
|
34
|
+
private _layoutState?;
|
|
32
35
|
private _compileChart;
|
|
33
36
|
constructor(container: IRenderContainer, option: IRenderOption);
|
|
34
|
-
getRenderer(): import("@visactor/vgrammar-core").IRenderer;
|
|
35
37
|
getCanvas(): HTMLCanvasElement | undefined;
|
|
38
|
+
_gestureController?: Gesture;
|
|
36
39
|
getStage(): IStage | undefined;
|
|
37
40
|
initView(): void;
|
|
41
|
+
getLayoutState(): LayoutState;
|
|
42
|
+
updateLayoutTag(): void;
|
|
43
|
+
protected handleLayoutEnd: () => void;
|
|
38
44
|
protected handleStageRender: () => void;
|
|
39
45
|
private _setCanvasStyle;
|
|
40
|
-
protected compileInteractions(): void;
|
|
41
46
|
compile(ctx: {
|
|
42
47
|
chart: IChart;
|
|
43
48
|
vChart: IVChart;
|
|
44
|
-
}, option
|
|
49
|
+
}, option?: IVChartRenderOption): void;
|
|
45
50
|
protected clearNextRender(): boolean;
|
|
46
51
|
clear(ctx: {
|
|
47
52
|
chart: IChart;
|
|
48
53
|
vChart: IVChart;
|
|
49
|
-
}
|
|
54
|
+
}): void;
|
|
50
55
|
renderNextTick(morphConfig?: IMorphConfig): void;
|
|
56
|
+
protected _commitedAll(): boolean;
|
|
57
|
+
protected _hasCommitedMark(): boolean;
|
|
58
|
+
private _handleAfterNextRender;
|
|
59
|
+
private _doRender;
|
|
60
|
+
renderMarks(): void;
|
|
61
|
+
reuseOrMorphing(morphConfig?: IMorphConfig): void;
|
|
51
62
|
render(morphConfig?: IMorphConfig): void;
|
|
52
63
|
updateViewBox(viewBox: IBoundsLike, reRender?: boolean): void;
|
|
53
64
|
resize(width: number, height: number, reRender?: boolean): void;
|
|
@@ -59,15 +70,14 @@ export declare class Compiler implements ICompiler {
|
|
|
59
70
|
protected releaseEvent(): void;
|
|
60
71
|
release(): void;
|
|
61
72
|
releaseGrammar(removeGraphicItems?: boolean): void;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
addInteraction(interaction: InteractionSpec & {
|
|
66
|
-
seriesId?: number;
|
|
67
|
-
regionId?: number;
|
|
68
|
-
}): void;
|
|
69
|
-
removeInteraction(seriesId: number): void;
|
|
70
|
-
updateDepend(items?: IGrammarItem[]): boolean;
|
|
73
|
+
addRootMark(mark: IMark): void;
|
|
74
|
+
getRootMarks(): IMark[];
|
|
75
|
+
removeRootMark(mark: IMark): boolean;
|
|
71
76
|
private _getGlobalThis;
|
|
77
|
+
private _combineIncrementalLayers;
|
|
78
|
+
private findProgressiveMarks;
|
|
79
|
+
private doPreProgressive;
|
|
80
|
+
private handleProgressiveFrame;
|
|
81
|
+
private clearProgressive;
|
|
72
82
|
}
|
|
73
83
|
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
|
-
import type { IData as IVGrammarData } from '@visactor/vgrammar-core';
|
|
3
2
|
import { GrammarItem } from '../grammar-item';
|
|
4
3
|
import type { Maybe } from '../../typings';
|
|
5
4
|
import type { ICompilableData } from './interface';
|
|
6
5
|
import type { GrammarItemInitOption } from '../interface';
|
|
7
|
-
import {
|
|
6
|
+
import type { ICompilableMark } from '../mark';
|
|
8
7
|
export declare class CompilableData extends GrammarItem implements ICompilableData {
|
|
9
|
-
|
|
10
|
-
protected
|
|
11
|
-
getProduct
|
|
8
|
+
protected _product: Maybe<any>;
|
|
9
|
+
protected _prevProduct: Maybe<any>;
|
|
10
|
+
getProduct(): any;
|
|
12
11
|
protected _data: Maybe<DataView>;
|
|
13
12
|
getDataView(): DataView;
|
|
14
13
|
setDataView(d?: DataView): void;
|
|
15
14
|
getLatestData(): any;
|
|
16
15
|
constructor(option: GrammarItemInitOption, dataView?: DataView);
|
|
16
|
+
removeProduct(): void;
|
|
17
17
|
release(): void;
|
|
18
|
+
protected _relatedMarks?: Record<string, ICompilableMark>;
|
|
19
|
+
addRelatedMark(mark: ICompilableMark): void;
|
|
18
20
|
updateData(noRender?: boolean): void;
|
|
19
21
|
protected _compileProduct(): void;
|
|
20
|
-
protected _initProduct(data: any[]): void;
|
|
21
22
|
generateProductId(): string;
|
|
22
|
-
protected _lookupGrammar(id: string): IVGrammarData;
|
|
23
23
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
import type { IGrammarItem } from '../interface';
|
|
3
|
+
import type { ICompilableMark } from '../mark';
|
|
3
4
|
export interface ICompilableData extends IGrammarItem {
|
|
4
5
|
getDataView: () => DataView;
|
|
5
6
|
setDataView: (d?: DataView) => void;
|
|
6
|
-
|
|
7
|
+
getProduct: () => any;
|
|
7
8
|
updateData: (noRender?: boolean) => void;
|
|
9
|
+
getLatestData: () => any;
|
|
10
|
+
addRelatedMark: (mark: ICompilableMark) => void;
|
|
8
11
|
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import type { IGrammarBase } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { Maybe } from '../typings';
|
|
3
2
|
import { CompilableBase } from './compilable-base';
|
|
4
|
-
import type { GrammarItemCompileOption,
|
|
3
|
+
import type { GrammarItemCompileOption, IGrammarItem, GrammarItemInitOption, ITransformSpec } from './interface';
|
|
5
4
|
export declare abstract class GrammarItem extends CompilableBase implements IGrammarItem {
|
|
6
|
-
grammarType: GrammarType;
|
|
7
5
|
protected _option: GrammarItemInitOption;
|
|
8
6
|
readonly id: number;
|
|
9
|
-
protected _product: Maybe<
|
|
10
|
-
getProduct():
|
|
11
|
-
protected abstract _lookupGrammar(id: string): IGrammarBase;
|
|
7
|
+
protected _product: Maybe<any>;
|
|
8
|
+
abstract getProduct(): Maybe<any>;
|
|
12
9
|
protected _compiledProductId: string;
|
|
13
10
|
abstract generateProductId(): string;
|
|
14
11
|
getProductId(): string;
|
|
15
|
-
protected _depend: IGrammarItem[];
|
|
16
|
-
getDepend(): IGrammarItem[];
|
|
17
|
-
setDepend(...depend: IGrammarItem[]): void;
|
|
18
12
|
compile(option?: GrammarItemCompileOption): void;
|
|
19
13
|
protected abstract _compileProduct(option?: GrammarItemCompileOption): void;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
abstract removeProduct(): void;
|
|
15
|
+
protected _transform: ITransformSpec[];
|
|
16
|
+
setTransform(transform: ITransformSpec[]): void;
|
|
17
|
+
runTransforms<T = any>(transforms: ITransformSpec[], data: T): T;
|
|
24
18
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { IColor, IStage } from '@visactor/vrender-core';
|
|
1
|
+
import type { StringOrNumber } from '../../typings';
|
|
2
|
+
import type { IColor, IGroup, IStage } from '@visactor/vrender-core';
|
|
4
3
|
import type { IChart } from '../../chart/interface/chart';
|
|
5
|
-
import type { IVChart } from '../../core/interface';
|
|
4
|
+
import type { IVChart, IVChartRenderOption } from '../../core/interface';
|
|
6
5
|
import type { IMorphConfig } from '../../animation/spec';
|
|
7
6
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
8
7
|
import type { EventSourceType, EventType } from '../../event/interface';
|
|
8
|
+
import type { IMark, IMarkGraphic } from '../../mark/interface';
|
|
9
|
+
import type { LayoutState } from '../interface/compiler';
|
|
9
10
|
export type CompilerListenerParameters = {
|
|
10
11
|
type: EventType;
|
|
11
12
|
event: Event;
|
|
12
13
|
source: EventSourceType;
|
|
13
|
-
item:
|
|
14
|
+
item: IMarkGraphic | null;
|
|
14
15
|
datum: any | null;
|
|
15
16
|
markId: number | null;
|
|
16
17
|
modelId: number | null;
|
|
@@ -26,15 +27,12 @@ export interface IGrammarItemMap<T extends IGrammarItem> {
|
|
|
26
27
|
export type ICompilerModel = Record<GrammarType, IProductMap<IGrammarItem>>;
|
|
27
28
|
export interface ICompiler {
|
|
28
29
|
isInited?: boolean;
|
|
29
|
-
getVGrammarView: () => IView;
|
|
30
|
-
getModel: () => ICompilerModel;
|
|
31
|
-
getRenderer: () => IRenderer;
|
|
32
30
|
getCanvas: () => HTMLCanvasElement | undefined;
|
|
33
31
|
getStage: () => IStage | undefined;
|
|
34
32
|
compile: (ctx: {
|
|
35
33
|
chart: IChart;
|
|
36
34
|
vChart: IVChart;
|
|
37
|
-
}, option
|
|
35
|
+
}, option?: IVChartRenderOption) => void;
|
|
38
36
|
clear: (ctx: {
|
|
39
37
|
chart: IChart;
|
|
40
38
|
vChart: IVChart;
|
|
@@ -50,45 +48,41 @@ export interface ICompiler {
|
|
|
50
48
|
removeEventListener: (source: EventSourceType, type: string, callback: (params: CompilerListenerParameters) => void) => void;
|
|
51
49
|
release: () => void;
|
|
52
50
|
releaseGrammar: (removeGraphicItems: boolean) => void;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
removeInteraction: (seriesId: number) => void;
|
|
60
|
-
updateDepend: (items?: IGrammarItem[]) => boolean;
|
|
51
|
+
addRootMark: (mark: IMark) => any;
|
|
52
|
+
removeRootMark: (mark: IMark) => any;
|
|
53
|
+
getRootMarks: () => IMark[];
|
|
54
|
+
updateLayoutTag: () => void;
|
|
55
|
+
getLayoutState: () => LayoutState;
|
|
56
|
+
getRootGroup: () => IGroup;
|
|
61
57
|
}
|
|
62
58
|
export interface ICompilable {
|
|
63
59
|
getCompiler: () => ICompiler;
|
|
64
|
-
|
|
60
|
+
getStage: () => IStage;
|
|
65
61
|
compile: () => void;
|
|
66
|
-
compileMarks?: (group?:
|
|
62
|
+
compileMarks?: (group?: IGroup) => void;
|
|
67
63
|
compileData?: () => void;
|
|
68
|
-
compileSignal?: () => void;
|
|
69
64
|
clear?: () => void;
|
|
70
65
|
afterCompile?: () => void;
|
|
71
66
|
release: () => void;
|
|
72
67
|
}
|
|
73
68
|
export interface ICompilableInitOption {
|
|
74
69
|
getCompiler: () => ICompiler;
|
|
75
|
-
performanceHook?: IPerformanceHook;
|
|
76
70
|
}
|
|
77
71
|
export declare enum GrammarType {
|
|
78
72
|
data = "data",
|
|
79
|
-
signal = "signal",
|
|
80
73
|
mark = "mark"
|
|
81
74
|
}
|
|
75
|
+
export interface ITransformSpec {
|
|
76
|
+
type: string;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}
|
|
82
79
|
export interface IGrammarItem extends ICompilable {
|
|
83
80
|
id: number;
|
|
84
|
-
grammarType: GrammarType;
|
|
85
|
-
getProduct: () => Maybe<IGrammarBase>;
|
|
86
81
|
generateProductId: () => string;
|
|
87
82
|
getProductId: () => string;
|
|
88
|
-
removeProduct: (
|
|
89
|
-
|
|
90
|
-
setDepend: (...depend: IGrammarItem[]) => void;
|
|
91
|
-
updateDepend: () => boolean;
|
|
83
|
+
removeProduct: () => void;
|
|
84
|
+
setTransform: (transform: ITransformSpec[]) => void;
|
|
92
85
|
}
|
|
93
86
|
export type GrammarItemInitOption = ICompilableInitOption;
|
|
94
87
|
export type GrammarItemCompileOption = Record<string, any>;
|
|
88
|
+
export type StateValueMap = Record<string, unknown>;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { RenderMode } from '../../typings/spec/common';
|
|
1
|
+
import type { IColor, IStageParams, IStage, ILayer, IOption3D } from '@visactor/vrender-core';
|
|
2
|
+
import type { IPerformanceHook, RenderMode } from '../../typings/spec/common';
|
|
4
3
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
5
4
|
import type { StringOrNumber } from '../../typings';
|
|
5
|
+
export declare enum LayoutState {
|
|
6
|
+
before = "before",
|
|
7
|
+
layouting = "layouting",
|
|
8
|
+
reevaluate = "reevaluate",
|
|
9
|
+
after = "after"
|
|
10
|
+
}
|
|
6
11
|
export interface IRenderContainer {
|
|
7
12
|
dom?: HTMLElement | 'none';
|
|
8
13
|
canvas?: HTMLCanvasElement | string;
|
|
@@ -53,5 +58,9 @@ export interface IRenderOption {
|
|
|
53
58
|
ReactDOM?: any;
|
|
54
59
|
clickInterval?: number;
|
|
55
60
|
autoPreventDefault?: boolean;
|
|
56
|
-
performanceHook?:
|
|
61
|
+
performanceHook?: IPerformanceHook;
|
|
62
|
+
options3d?: {
|
|
63
|
+
enable?: boolean;
|
|
64
|
+
enableView3dTranform?: boolean;
|
|
65
|
+
} & IOption3D;
|
|
57
66
|
}
|