@visactor/vchart-types 1.13.7-alpha.0 → 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 +2 -2
- package/types/component/custom-mark/custom-mark.d.ts +0 -1
- package/types/component/data-zoom/data-filter-base-component.d.ts +2 -2
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -1
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -1
- 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 +2 -3
- package/types/component/label/label.d.ts +3 -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 +2 -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 +1 -0
- 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/event/events/base.d.ts +1 -2
- package/types/event/interface.d.ts +6 -9
- package/types/index-harmony-simple.d.ts +2 -1
- package/types/index.d.ts +0 -3
- 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/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/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/interface.d.ts +0 -1
- package/types/series/funnel/tooltip-helper.d.ts +2 -4
- 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 +13 -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 -3
- 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 +2 -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
- package/types/util/scale.d.ts +0 -1
- package/types/vrender-tools.d.ts +0 -1
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
import type { IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
1
|
+
import type { IMark, IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
2
2
|
import type { IModel } from '../../model/interface';
|
|
3
3
|
import type { GrammarItemCompileOption, GrammarItemInitOption, IGrammarItem } from '../interface';
|
|
4
4
|
import type { DataView } from '@visactor/vdataset';
|
|
5
|
-
import type { IAnimate, IAnimateArranger, IElement, IGroupMark, IMark, IMarkConfig, MarkAnimationSpec, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
6
5
|
import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
7
6
|
import type { IRegion } from '../../region/interface';
|
|
8
7
|
import type { ICompilableData } from '../data/interface';
|
|
8
|
+
import type { ICustomPath2D, IGraphic, IGroup } from '@visactor/vrender-core';
|
|
9
|
+
import type { MarkAnimationSpec } from '../../animation/interface';
|
|
10
|
+
export interface IMarkConfig {
|
|
11
|
+
clipPath?: IGraphic[] | ((graphics: IGraphic[]) => IGraphic[]);
|
|
12
|
+
clip?: boolean;
|
|
13
|
+
zIndex?: number;
|
|
14
|
+
interactive?: boolean;
|
|
15
|
+
setCustomizedShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
|
|
16
|
+
large?: boolean;
|
|
17
|
+
largeThreshold?: number;
|
|
18
|
+
progressiveStep?: number;
|
|
19
|
+
progressiveThreshold?: number;
|
|
20
|
+
support3d?: boolean;
|
|
21
|
+
graphicName?: string | ((g: IMarkConfig) => string);
|
|
22
|
+
morph?: boolean;
|
|
23
|
+
morphKey?: string;
|
|
24
|
+
morphElementKey?: string;
|
|
25
|
+
overflow?: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';
|
|
26
|
+
skipTheme?: boolean;
|
|
27
|
+
}
|
|
9
28
|
export interface IMarkStateManager {
|
|
10
29
|
getStateInfoList: () => IStateInfo[];
|
|
11
30
|
getStateInfo: (stateValue: StateValue) => IStateInfo;
|
|
12
31
|
addStateInfo: (stateInfo: IStateInfo) => void;
|
|
13
32
|
changeStateInfo: (stateInfo: Partial<IStateInfo>) => void;
|
|
14
33
|
clearStateInfo: (stateValues: StateValue[]) => void;
|
|
15
|
-
checkOneState: (renderNode:
|
|
16
|
-
checkState: (renderNode:
|
|
17
|
-
updateLayoutState: (noRender?: boolean) => void;
|
|
34
|
+
checkOneState: (renderNode: IGraphic, datum: Datum[], state: IStateInfo) => 'in' | 'out' | 'skip';
|
|
35
|
+
checkState: (renderNode: IGraphic, datum: Datum[]) => StateValue[];
|
|
18
36
|
}
|
|
19
37
|
export interface IMarkData extends ICompilableData {
|
|
20
38
|
setCompiledProductId: (name: string) => any;
|
|
@@ -33,48 +51,37 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
33
51
|
readonly name: string;
|
|
34
52
|
readonly key?: string | ((datum: Datum) => string);
|
|
35
53
|
readonly model: IModel;
|
|
36
|
-
|
|
37
|
-
|
|
54
|
+
commit: (render?: boolean, recursion?: boolean) => void;
|
|
55
|
+
uncommit: () => void;
|
|
56
|
+
isCommited: () => boolean;
|
|
57
|
+
getData: () => ICompilableData | undefined;
|
|
58
|
+
setData: (d: ICompilableData) => void;
|
|
38
59
|
getDataView: () => DataView | undefined;
|
|
39
|
-
setDataView: (d
|
|
60
|
+
setDataView: (d: DataView) => void;
|
|
40
61
|
state: IMarkStateManager;
|
|
41
62
|
readonly stateStyle: IMarkStateStyle<any>;
|
|
42
63
|
hasState: (state: string) => boolean;
|
|
43
64
|
getState: (state: string) => any;
|
|
44
65
|
updateState: (newState: Record<string, unknown>) => void;
|
|
45
|
-
updateStaticEncode: () => void;
|
|
46
66
|
compileEncode: () => void;
|
|
47
|
-
updateLayoutState: (noRender?: boolean, recursion?: boolean) => void;
|
|
48
|
-
updateMarkState: (key: string) => void;
|
|
49
|
-
setTransform: (transform: TransformSpec[] | Nil) => void;
|
|
50
67
|
setAnimationConfig: (config: Partial<MarkAnimationSpec>) => void;
|
|
51
68
|
getAnimationConfig: () => Partial<MarkAnimationSpec>;
|
|
52
69
|
getVisible: () => boolean;
|
|
53
70
|
setVisible: (visible: boolean) => void;
|
|
54
|
-
getGroupKey: () => string | undefined;
|
|
55
71
|
setGroupKey: (groupKey: string) => void;
|
|
56
72
|
getUserId: () => StringOrNumber | undefined;
|
|
57
73
|
setUserId: (id: StringOrNumber) => void;
|
|
58
74
|
compile: (option?: IMarkCompileOption) => void;
|
|
59
|
-
getProduct: () => Maybe<
|
|
60
|
-
getProductElements: () => Maybe<IMark['elements']>;
|
|
75
|
+
getProduct: () => Maybe<IGroup>;
|
|
61
76
|
getMarks: () => ICompilableMark[];
|
|
62
77
|
setSkipBeforeLayouted: (skip: boolean) => void;
|
|
63
|
-
getSkipBeforeLayouted: () => boolean;
|
|
64
|
-
setStateSortCallback: (stateSort: (stateA: string, stateB: string) => number) => void;
|
|
65
78
|
getMarkConfig: () => IMarkConfig;
|
|
66
79
|
setMarkConfig: (config: IMarkConfig) => void;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
pauseAnimationByState: (animationState: string) => IAnimate;
|
|
70
|
-
resumeAnimationByState: (animationState: string) => IAnimate;
|
|
71
|
-
}
|
|
72
|
-
export interface IMarkDataInitOption extends ICompilableMarkOption {
|
|
73
|
-
mark: ICompilableMark;
|
|
80
|
+
getContext: () => any;
|
|
81
|
+
layout: (layoutCallback: () => void) => void;
|
|
74
82
|
}
|
|
75
83
|
export interface IMarkCompileOption extends GrammarItemCompileOption {
|
|
76
|
-
group?:
|
|
77
|
-
ignoreChildren?: boolean;
|
|
84
|
+
group?: IGroup;
|
|
78
85
|
context?: any;
|
|
79
86
|
}
|
|
80
87
|
export interface IStateInfo {
|
|
@@ -83,7 +90,11 @@ export interface IStateInfo {
|
|
|
83
90
|
datums?: any[] | null | undefined;
|
|
84
91
|
datumKeys?: string[] | null | undefined;
|
|
85
92
|
items?: any[] | null | undefined;
|
|
86
|
-
filter?: ((datum: any, options:
|
|
93
|
+
filter?: ((datum: any, options: {
|
|
94
|
+
mark?: IMark;
|
|
95
|
+
type?: string;
|
|
96
|
+
renderNode?: IGraphic;
|
|
97
|
+
}) => boolean) | null | undefined;
|
|
87
98
|
cache?: {
|
|
88
99
|
[key: string]: {
|
|
89
100
|
[key: string]: boolean;
|
|
@@ -116,7 +127,10 @@ export declare enum STATE_VALUE_ENUM {
|
|
|
116
127
|
STATE_SELECTED = "selected",
|
|
117
128
|
STATE_SELECTED_REVERSE = "selected_reverse",
|
|
118
129
|
STATE_SANKEY_EMPHASIS = "selected",
|
|
119
|
-
STATE_SANKEY_EMPHASIS_REVERSE = "blur"
|
|
130
|
+
STATE_SANKEY_EMPHASIS_REVERSE = "blur",
|
|
131
|
+
STATE_HIGHLIGHT = "highlight",
|
|
132
|
+
STATE_BLUR = "blur",
|
|
133
|
+
STATE_ACTIVE = "active"
|
|
120
134
|
}
|
|
121
135
|
export declare enum STATE_VALUE_ENUM_REVERSE {
|
|
122
136
|
STATE_HOVER_REVERSE = "hover_reverse",
|
|
@@ -130,11 +144,6 @@ export type STATE_CUSTOM = string;
|
|
|
130
144
|
export type StateValueNot = STATE_HOVER_REVERSE | STATE_CUSTOM;
|
|
131
145
|
export type StateValue = STATE_NORMAL | STATE_HOVER | STATE_CUSTOM;
|
|
132
146
|
export type StateValueType = StateValue | StateValueNot;
|
|
133
|
-
export interface IAttributeOpt {
|
|
134
|
-
element: IElement;
|
|
135
|
-
mark: IElement['mark'];
|
|
136
|
-
parent: IElement['mark']['group'];
|
|
137
|
-
}
|
|
138
147
|
export interface IModelMarkAttributeContext {
|
|
139
148
|
[key: string]: unknown;
|
|
140
149
|
}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMark, IMarkGraphic } from '../../mark/interface';
|
|
2
2
|
import type { Datum, StringOrNumber } from '../../typings';
|
|
3
|
-
import type { IStateManagerOption } from '../signal/interface';
|
|
4
|
-
import { StateManager } from '../signal/state-manager';
|
|
5
|
-
import type { CompilableMark } from './compilable-mark';
|
|
6
3
|
import type { IMarkStateManager, IStateInfo, StateValue } from './interface';
|
|
4
|
+
import type { ICompilableInitOption } from '../interface/compilable-item';
|
|
5
|
+
import { StateManager } from '../state-manager';
|
|
7
6
|
export declare class MarkStateManager extends StateManager implements IMarkStateManager {
|
|
8
|
-
protected _mark:
|
|
7
|
+
protected _mark: IMark;
|
|
9
8
|
private _stateInfoList;
|
|
10
9
|
getStateInfoList(): IStateInfo[];
|
|
11
|
-
constructor(
|
|
10
|
+
constructor(options: ICompilableInitOption, mark: IMark);
|
|
12
11
|
protected _getDefaultStateMap(): Record<string, unknown>;
|
|
13
12
|
getStateInfo(stateValue: StateValue): IStateInfo;
|
|
14
13
|
addStateInfo(stateInfo: IStateInfo): void;
|
|
15
14
|
private _clearStateBeforeSet;
|
|
16
15
|
changeStateInfo(stateInfo: Partial<IStateInfo>): void;
|
|
17
16
|
clearStateInfo(stateValues: StateValue[]): void;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
protected _isMultiMark(): boolean;
|
|
18
|
+
checkOneState(renderNode: IMarkGraphic, datum: Datum[], state: IStateInfo): 'in' | 'out' | 'skip';
|
|
19
|
+
checkState(renderNode: IMarkGraphic, datum: Datum[]): StateValue[];
|
|
20
|
+
checkDatumState(state: IStateInfo, datum: Datum[]): boolean;
|
|
21
21
|
checkItemsState(state: IStateInfo, item: any): boolean | undefined;
|
|
22
|
-
checkFieldsState(state: IStateInfo, datum: Datum
|
|
23
|
-
checkLinearFieldState(domain: StringOrNumber[], key: string, datum: any, item: any
|
|
24
|
-
updateLayoutState(noRender?: boolean): void;
|
|
25
|
-
compileState(product: IVGrammarMark, stateSort?: (stateA: string, stateB: string) => number): void;
|
|
22
|
+
checkFieldsState(state: IStateInfo, datum: Datum[], item: any): boolean;
|
|
23
|
+
checkLinearFieldState(domain: StringOrNumber[], key: string, datum: any, item: any): boolean;
|
|
26
24
|
}
|
|
@@ -2,4 +2,4 @@ import type { IAttrs, IMarkStateStyle } from '../../mark/interface';
|
|
|
2
2
|
export declare function isAttrChangeable<T>(key: string, stateStyle: IMarkStateStyle<T>): boolean;
|
|
3
3
|
export declare function isStateAttrChangeable<T>(key: string, stateStyle: Partial<IAttrs<T>>, facetField: string): boolean;
|
|
4
4
|
export declare function stateInDefaultEnum(state: string): boolean;
|
|
5
|
-
export declare function stateToReverse(state: string):
|
|
5
|
+
export declare function stateToReverse(state: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CompilableBase } from './compilable-base';
|
|
2
|
+
import type { ICompilableInitOption, StateValueMap } from './interface/compilable-item';
|
|
3
|
+
export declare class StateManager extends CompilableBase {
|
|
4
|
+
compile(): void;
|
|
5
|
+
protected _stateMap: StateValueMap;
|
|
6
|
+
getStateMap(): StateValueMap;
|
|
7
|
+
protected _getDefaultStateMap(): StateValueMap;
|
|
8
|
+
constructor(options: ICompilableInitOption);
|
|
9
|
+
initStateMap(state?: StateValueMap): void;
|
|
10
|
+
updateState(newState: Partial<StateValueMap>, noRender?: boolean): void;
|
|
11
|
+
}
|
package/types/compile/util.d.ts
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
import type { IMorphConfig } from '../animation/spec';
|
|
2
|
+
import type { IMark } from '../mark/interface';
|
|
3
|
+
import type { DiffResult } from '../typings/common';
|
|
1
4
|
import type { RenderMode } from '../typings/spec';
|
|
2
5
|
export declare function toRenderMode(mode: RenderMode): any;
|
|
6
|
+
export declare function traverseGroupMark<T>(group: IMark, apply: (mark: IMark) => T, filter?: (mark: IMark) => boolean, leafFirst?: boolean, stop?: boolean): T | undefined;
|
|
7
|
+
export declare function findSimpleMarks(groups: IMark[]): IMark[];
|
|
8
|
+
export declare function diffUpdateByGroup(prev: IMark[], next: IMark[], prevKey: (datum: IMark) => string, nextKey: (datum: IMark) => string): {
|
|
9
|
+
prev: IMark[];
|
|
10
|
+
next: IMark[];
|
|
11
|
+
update: {
|
|
12
|
+
prev: IMark[];
|
|
13
|
+
next: IMark[];
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
export declare function diffMarks(prevMarks: IMark[], nextMarks: IMark[], runningConfig: IMorphConfig): DiffResult<IMark[], IMark[]>;
|
|
@@ -4,12 +4,13 @@ import type { IGraphic } from '@visactor/vrender-core';
|
|
|
4
4
|
import type { IOrientType, IPolarOrientType, StringOrNumber, CoordinateType } from '../../typings';
|
|
5
5
|
import { BaseComponent } from '../base/base-component';
|
|
6
6
|
import { CompilableData } from '../../compile/data';
|
|
7
|
-
import type
|
|
7
|
+
import { type IAxis, type ICommonAxisSpec, type ITick } from './interface';
|
|
8
8
|
import { type IComponentOption } from '../interface';
|
|
9
9
|
import type { ISeries } from '../../series/interface';
|
|
10
10
|
import type { ITransformOptions } from '@visactor/vdataset';
|
|
11
11
|
import { DataView } from '@visactor/vdataset';
|
|
12
12
|
import type { IComponentMark } from '../../mark/interface/mark';
|
|
13
|
+
import type { ICompilableMark } from '../../compile/mark';
|
|
13
14
|
export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<string, any> = any> extends BaseComponent<T> implements IAxis {
|
|
14
15
|
static specKey: string;
|
|
15
16
|
specKey: string;
|
|
@@ -50,7 +51,7 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
50
51
|
getCoordinateType(): CoordinateType;
|
|
51
52
|
constructor(spec: T, options: IComponentOption);
|
|
52
53
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
53
|
-
getVRenderComponents():
|
|
54
|
+
getVRenderComponents(): import("@visactor/vrender-core").IGroup[];
|
|
54
55
|
created(): void;
|
|
55
56
|
protected _shouldComputeTickData(): boolean;
|
|
56
57
|
protected _initData(): void;
|
|
@@ -68,8 +69,9 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
68
69
|
protected initEvent(): void;
|
|
69
70
|
protected updateScaleDomain(): void;
|
|
70
71
|
protected _clearRawDomain(): void;
|
|
71
|
-
onLayoutEnd(
|
|
72
|
+
onLayoutEnd(): void;
|
|
72
73
|
protected computeData(updateType?: 'domain' | 'range' | 'force'): void;
|
|
74
|
+
protected _updateTickDataMarks(m: ICompilableMark): void;
|
|
73
75
|
protected initScales(): void;
|
|
74
76
|
_compareSpec(spec: T, prevSpec: T): {
|
|
75
77
|
change: boolean;
|
|
@@ -77,7 +77,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
77
77
|
protected updateScaleRange(): boolean;
|
|
78
78
|
init(option: IModelInitOption): void;
|
|
79
79
|
setAttrFromSpec(): void;
|
|
80
|
-
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect
|
|
80
|
+
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
81
81
|
protected getSeriesStatisticsField(s: ICartesianSeries): string[];
|
|
82
82
|
protected _tickTransformOption(): ICartesianTickDataOpt;
|
|
83
83
|
protected axisHelper(): IAxisHelper;
|
|
@@ -16,6 +16,7 @@ export declare class CartesianTimeAxis<T extends ICartesianTimeAxisSpec = ICarte
|
|
|
16
16
|
setAttrFromSpec(): void;
|
|
17
17
|
protected _initData(): void;
|
|
18
18
|
protected computeData(updateType?: 'range' | 'domain' | 'force'): void;
|
|
19
|
+
created(): void;
|
|
19
20
|
protected _getLabelFormatMethod(): any;
|
|
20
21
|
protected getLabelItems(length: number): any[];
|
|
21
22
|
protected registerTicksTransform(): string;
|
|
@@ -48,3 +48,11 @@ export interface ITickCalculationCfg {
|
|
|
48
48
|
export interface IBandAxisLayer extends Omit<ITickCalculationCfg, 'noDecimals' | 'tickMode'> {
|
|
49
49
|
visible?: boolean;
|
|
50
50
|
}
|
|
51
|
+
export declare enum AxisEnum {
|
|
52
|
+
lineAxis = "lineAxis",
|
|
53
|
+
circleAxis = "circleAxis"
|
|
54
|
+
}
|
|
55
|
+
export declare enum GridEnum {
|
|
56
|
+
lineAxisGrid = "lineAxisGrid",
|
|
57
|
+
circleAxisGrid = "circleAxisGrid"
|
|
58
|
+
}
|
|
@@ -3,7 +3,6 @@ import type { IRegion } from '../../region/interface';
|
|
|
3
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
4
4
|
import type { IComponentPluginService, IComponentPlugin } from '../../plugin/components/interface';
|
|
5
5
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
6
|
-
import type { IGroupMark } from '@visactor/vgrammar-core';
|
|
7
6
|
import type { IAnimate } from '../../animation/interface';
|
|
8
7
|
import type { Datum, ILayoutRect } from '../../typings';
|
|
9
8
|
import type { IComponentSpec } from './interface';
|
|
@@ -41,7 +40,7 @@ export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> ex
|
|
|
41
40
|
release(): void;
|
|
42
41
|
clear(): void;
|
|
43
42
|
compile(): void;
|
|
44
|
-
compileMarks(group?:
|
|
43
|
+
compileMarks(group?: IGroup): void;
|
|
45
44
|
reAppendComponents(): void;
|
|
46
45
|
protected _delegateEvent: (component: IGraphic, event: any, type: string, item?: any, datum?: Datum) => void;
|
|
47
46
|
getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike;
|
|
@@ -6,7 +6,7 @@ import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
|
6
6
|
import type { IRegion } from '../../region/interface';
|
|
7
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
8
|
import type { ISeries } from '../../series/interface';
|
|
9
|
-
import type {
|
|
9
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
10
10
|
import type { BrushInteractiveRangeAttr, IBrush, IBrushSpec } from './interface';
|
|
11
11
|
export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseComponent<T> implements IBrush {
|
|
12
12
|
layoutType: 'none';
|
|
@@ -23,19 +23,19 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
23
23
|
private _linkedItemMap;
|
|
24
24
|
protected _inBrushElementsMap: {
|
|
25
25
|
[brushName: string]: {
|
|
26
|
-
[elementKey: string]:
|
|
26
|
+
[elementKey: string]: IMarkGraphic;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
protected _outOfBrushElementsMap: {
|
|
30
|
-
[elementKey: string]:
|
|
30
|
+
[elementKey: string]: IMarkGraphic;
|
|
31
31
|
};
|
|
32
32
|
protected _linkedInBrushElementsMap: {
|
|
33
33
|
[brushName: string]: {
|
|
34
|
-
[elementKey: string]:
|
|
34
|
+
[elementKey: string]: IMarkGraphic;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
protected _linkedOutOfBrushElementsMap: {
|
|
38
|
-
[elementKey: string]:
|
|
38
|
+
[elementKey: string]: IMarkGraphic;
|
|
39
39
|
};
|
|
40
40
|
private _needInitOutState;
|
|
41
41
|
private _cacheInteractiveRangeAttrs;
|
|
@@ -49,12 +49,14 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
49
49
|
created(): void;
|
|
50
50
|
protected _extendDataInBrush(elementsMap: {
|
|
51
51
|
[brushName: string]: {
|
|
52
|
-
[elementKey: string]:
|
|
52
|
+
[elementKey: string]: IMarkGraphic;
|
|
53
53
|
};
|
|
54
|
-
}):
|
|
54
|
+
}): {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
}[];
|
|
55
57
|
protected _extendDatumOutOfBrush(elementsMap: {
|
|
56
|
-
[elementKey: string]:
|
|
57
|
-
}):
|
|
58
|
+
[elementKey: string]: IMarkGraphic;
|
|
59
|
+
}): import("../../typings").Datum[];
|
|
58
60
|
protected _getBrushInteractiveAttr(region: IRegion): BrushInteractiveRangeAttr;
|
|
59
61
|
protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
|
|
60
62
|
protected _createBrushComponent(region: IRegion, componentIndex: number): void;
|
|
@@ -83,7 +85,7 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
83
85
|
reSize: boolean;
|
|
84
86
|
reCompile: boolean;
|
|
85
87
|
};
|
|
86
|
-
onLayoutEnd(
|
|
88
|
+
onLayoutEnd(): void;
|
|
87
89
|
clearGraphic(): void;
|
|
88
90
|
clear(): void;
|
|
89
91
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
2
|
import { Tag } from '@visactor/vrender-components';
|
|
3
3
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
4
|
-
import type {
|
|
4
|
+
import type { IModelRenderOption } from '../../model/interface';
|
|
5
5
|
import type { IRegion } from '../../region/interface';
|
|
6
6
|
import { BaseComponent } from '../base/base-component';
|
|
7
7
|
import type { IPoint, StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
@@ -68,7 +68,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
68
68
|
private _handleTooltipHideOrRelease;
|
|
69
69
|
protected _getAxisInfoByField<T = IAxis>(field: 'x' | 'y' | 'category' | 'value'): IAxisInfo<T>;
|
|
70
70
|
changeRegions(regions: IRegion[]): void;
|
|
71
|
-
onLayoutEnd(
|
|
71
|
+
onLayoutEnd(): void;
|
|
72
72
|
onRender(ctx: IModelRenderOption): void;
|
|
73
73
|
protected _releaseEvent(): void;
|
|
74
74
|
protected _parseFieldInfo(): void;
|
|
@@ -115,8 +115,8 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
115
115
|
protected _initCommonEvent(): void;
|
|
116
116
|
updateLayoutAttribute(): void;
|
|
117
117
|
protected _autoVisible(isShown: boolean): void;
|
|
118
|
-
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect
|
|
119
|
-
onLayoutEnd(
|
|
118
|
+
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
119
|
+
onLayoutEnd(): void;
|
|
120
120
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
121
121
|
hide(): void;
|
|
122
122
|
show(): void;
|
|
@@ -28,7 +28,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
28
28
|
constructor(spec: T, options: IComponentOption);
|
|
29
29
|
created(): void;
|
|
30
30
|
setAttrFromSpec(): void;
|
|
31
|
-
onLayoutEnd(
|
|
31
|
+
onLayoutEnd(): void;
|
|
32
32
|
protected _initValueScale(): void;
|
|
33
33
|
protected _updateScaleRange(): void;
|
|
34
34
|
protected _computeDomainOfValueScale(): unknown[];
|
|
@@ -18,7 +18,7 @@ export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extend
|
|
|
18
18
|
protected _component: ScrollBarComponent;
|
|
19
19
|
constructor(spec: T, options: IComponentOption);
|
|
20
20
|
setAttrFromSpec(): void;
|
|
21
|
-
onLayoutEnd(
|
|
21
|
+
onLayoutEnd(): void;
|
|
22
22
|
protected _updateScaleRange(): void;
|
|
23
23
|
protected _computeWidth(): number;
|
|
24
24
|
protected _computeHeight(): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IPoint } from '../../typings/coordinate';
|
|
2
2
|
import { Projection } from './projection';
|
|
3
|
-
import type { IEffect,
|
|
3
|
+
import type { IEffect, IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
4
4
|
import { ComponentTypeEnum } from '../interface/type';
|
|
5
5
|
import { BaseComponent } from '../base/base-component';
|
|
6
6
|
import type { IGeoRegionSpec, IRegion } from '../../region/interface';
|
|
@@ -42,7 +42,7 @@ export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> impleme
|
|
|
42
42
|
initEvent(): void;
|
|
43
43
|
initProjection(): void;
|
|
44
44
|
coordinateHelper(): void;
|
|
45
|
-
onLayoutEnd(
|
|
45
|
+
onLayoutEnd(): void;
|
|
46
46
|
onRender(ctx: IModelRenderOption): void;
|
|
47
47
|
changeRegions(regions: IRegion[]): void;
|
|
48
48
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IPoint } from '../../typings/coordinate';
|
|
2
|
-
import type { ProjectionType } from '@visactor/vgrammar-core';
|
|
3
2
|
import type { IComponent } from '../interface';
|
|
3
|
+
export type ProjectionType = 'albers' | 'albersUsa' | 'azimuthalEqualArea' | 'azimuthalEquidistant' | 'conicConformal' | 'conicEqualArea' | 'conicEquidistant' | 'equalEarth' | 'equirectangular' | 'gnomonic' | 'identity' | 'mercator' | 'naturalEarth1' | 'orthographic' | 'stereographic' | 'transverseMercator';
|
|
4
4
|
export interface IProjectionSpec {
|
|
5
5
|
name: string;
|
|
6
6
|
type: ProjectionType;
|
|
@@ -5,6 +5,9 @@ import type { IRegion } from '../../region/interface';
|
|
|
5
5
|
import type { IModelRenderOption } from '../../model/interface';
|
|
6
6
|
import type { ILabelSpec } from './interface';
|
|
7
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
|
+
import type { IComponentMark } from '../../mark/interface/mark';
|
|
9
|
+
import type { ICompilableMark } from '../../compile/mark/interface';
|
|
10
|
+
import type { IMark } from '../../mark/interface/common';
|
|
8
11
|
export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<T> {
|
|
9
12
|
static type: ComponentTypeEnum;
|
|
10
13
|
type: ComponentTypeEnum;
|
|
@@ -29,6 +32,8 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
29
32
|
reSize: boolean;
|
|
30
33
|
reCompile: boolean;
|
|
31
34
|
};
|
|
35
|
+
_getDataLabelType(baseMark: ICompilableMark, type?: string): string;
|
|
36
|
+
_setTransformOfComponent(labelComponent: IComponentMark, baseMark: IMark | IMark[]): void;
|
|
32
37
|
onRender(ctx: IModelRenderOption): void;
|
|
33
38
|
changeRegions(regions: IRegion[]): void;
|
|
34
39
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { BaseLabelAttrs } from '@visactor/vrender-components';
|
|
2
2
|
import type { ConvertToMarkStyleSpec, Datum, IComposedTextMarkSpec, IFormatMethod, ITextMarkSpec } from '../../typings';
|
|
3
3
|
import type { IComponentSpec } from '../base/interface';
|
|
4
|
-
import type { ILabelMark } from '../../mark/interface';
|
|
4
|
+
import type { ILabelMark, IMark } from '../../mark/interface';
|
|
5
5
|
import type { ISeries } from '../../series/interface';
|
|
6
|
-
import type { ICompilableMark } from '../../compile/mark/interface';
|
|
7
6
|
import type { IRegion } from '../../region/interface';
|
|
8
7
|
export interface ILabelInfo {
|
|
9
|
-
baseMark:
|
|
8
|
+
baseMark: IMark;
|
|
10
9
|
labelMark: ILabelMark;
|
|
11
10
|
series: ISeries;
|
|
12
11
|
labelSpec: TransformedLabelSpec;
|
|
@@ -2,8 +2,8 @@ import type { IComponentOption } from '../interface';
|
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import type { IModelInitOption, IModelSpecInfo } from '../../model/interface';
|
|
5
|
-
import type {
|
|
6
|
-
import
|
|
5
|
+
import type { IMark } from '../../mark/interface';
|
|
6
|
+
import { type IComponentMark } from '../../mark/interface';
|
|
7
7
|
import { BaseLabelComponent } from './base-label';
|
|
8
8
|
import type { Maybe } from '@visactor/vutils';
|
|
9
9
|
import type { ILabelInfo } from './interface';
|
|
@@ -34,7 +34,7 @@ export declare class Label<T extends IChartSpec = any> extends BaseLabelComponen
|
|
|
34
34
|
updateLayoutAttribute(): void;
|
|
35
35
|
protected _updateMultiLabelAttribute(labelInfo: ILabelInfo[], labelComponent: IComponentMark): void;
|
|
36
36
|
protected _updateSingleLabelAttribute(labelInfo: ILabelInfo, labelComponent: IComponentMark): void;
|
|
37
|
-
protected _updateLabelComponentAttribute(
|
|
37
|
+
protected _updateLabelComponentAttribute(labelComponent: IComponentMark, baseMark: IMark | IMark[], labelInfos: ILabelInfo[]): void;
|
|
38
38
|
compileMarks(): void;
|
|
39
39
|
getVRenderComponents(): any[];
|
|
40
40
|
getLabelInfoByTextGraphic(text: IGraphic): ILabelInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WaterfallSeries } from './../../series/waterfall/waterfall';
|
|
2
2
|
import type { Datum } from '../../typings/common';
|
|
3
|
-
import type { LabelItem, Strategy } from '@visactor/vrender-components';
|
|
3
|
+
import type { LabelItem, OverlapAttrs, Strategy } from '@visactor/vrender-components';
|
|
4
4
|
import type { ILabelInfo, ILabelSpec } from './interface';
|
|
5
5
|
export declare const labelRuleMap: {
|
|
6
6
|
rect: typeof barLabel;
|
|
@@ -17,20 +17,14 @@ export declare const labelRuleMap: {
|
|
|
17
17
|
venn: typeof vennLabel;
|
|
18
18
|
};
|
|
19
19
|
export declare function defaultLabelConfig(rule: string, labelInfo: ILabelInfo): any;
|
|
20
|
-
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']):
|
|
20
|
+
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']): Partial<import("../../typings").IComposedTextMarkSpec>;
|
|
21
21
|
export declare function symbolLabel(labelInfo: ILabelInfo): {
|
|
22
22
|
position: string | ((datum: Datum) => any);
|
|
23
|
-
overlap: boolean |
|
|
24
|
-
strategy: Strategy[] | import("@visactor/vrender-components").ShiftYStrategy;
|
|
25
|
-
avoidBaseMark: boolean;
|
|
26
|
-
};
|
|
23
|
+
overlap: boolean | OverlapAttrs;
|
|
27
24
|
};
|
|
28
25
|
export declare function lineDataLabel(labelInfo: ILabelInfo): {
|
|
29
26
|
position: string | ((datum: Datum) => any);
|
|
30
|
-
overlap: boolean |
|
|
31
|
-
strategy: Strategy[] | import("@visactor/vrender-components").ShiftYStrategy;
|
|
32
|
-
avoidBaseMark: boolean;
|
|
33
|
-
};
|
|
27
|
+
overlap: boolean | OverlapAttrs;
|
|
34
28
|
};
|
|
35
29
|
export declare function barLabel(labelInfo: ILabelInfo): {
|
|
36
30
|
position: (data: any) => string;
|
|
@@ -42,6 +36,7 @@ export declare function barLabel(labelInfo: ILabelInfo): {
|
|
|
42
36
|
export declare function pointLabel(labelInfo: ILabelInfo): {
|
|
43
37
|
position: string;
|
|
44
38
|
overlap: boolean | {
|
|
39
|
+
clampForce: boolean;
|
|
45
40
|
avoidBaseMark: boolean;
|
|
46
41
|
};
|
|
47
42
|
};
|
|
@@ -69,6 +64,10 @@ export declare function vennLabel(labelInfo: ILabelInfo): {
|
|
|
69
64
|
export declare function LineLabel(labelInfo: ILabelInfo): {
|
|
70
65
|
position: string;
|
|
71
66
|
data: any;
|
|
67
|
+
overlap: {
|
|
68
|
+
avoidBaseMark: boolean;
|
|
69
|
+
clampForce: boolean;
|
|
70
|
+
};
|
|
72
71
|
};
|
|
73
72
|
export declare function sankeyLabel(labelInfo: ILabelInfo): {
|
|
74
73
|
position: import("@visactor/vrender-components").Functional<string>;
|
|
@@ -13,7 +13,7 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
13
13
|
};
|
|
14
14
|
background?: {
|
|
15
15
|
visible?: boolean;
|
|
16
|
-
style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "
|
|
16
|
+
style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "visible" | "width" | "height">;
|
|
17
17
|
};
|
|
18
18
|
text?: string | number | string[] | number[] | {
|
|
19
19
|
type?: "text";
|
|
@@ -32,10 +32,10 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
32
32
|
element: any;
|
|
33
33
|
} & import("@visactor/vrender-core").SimpleDomStyleOptions & import("@visactor/vrender-core").CommonDomOptions;
|
|
34
34
|
};
|
|
35
|
+
visible?: boolean;
|
|
36
|
+
align?: "start" | "end" | "center";
|
|
35
37
|
padding?: import("@visactor/vrender-components").Padding;
|
|
36
38
|
maxWidth?: number;
|
|
37
39
|
minWidth?: number;
|
|
38
|
-
visible?: boolean;
|
|
39
40
|
space?: number;
|
|
40
|
-
align?: "start" | "end" | "center";
|
|
41
41
|
};
|
|
@@ -59,7 +59,7 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
59
59
|
clear(): void;
|
|
60
60
|
private _getFirstSeries;
|
|
61
61
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
62
|
-
onLayoutStart(layoutRect: IRect, chartViewRect: ILayoutRect
|
|
62
|
+
onLayoutStart(layoutRect: IRect, chartViewRect: ILayoutRect): void;
|
|
63
63
|
_compareSpec(spec: T, prevSpec: T): {
|
|
64
64
|
change: boolean;
|
|
65
65
|
reMake: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Datum } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { IMark } from '../../../mark/interface';
|
|
3
2
|
import type { ISeries } from '../../../series/interface';
|
|
4
3
|
import type { IDimensionInfo } from '../../../event/events/dimension/interface';
|
|
4
|
+
import type { Datum } from '../../../typings/common';
|
|
5
5
|
export type DimensionTooltipInfo = IDimensionInfo[];
|
|
6
6
|
export type MarkTooltipInfo<T = Datum> = {
|
|
7
7
|
datum: T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Maybe } from '@visactor/vutils';
|
|
2
2
|
import type { DimensionTooltipInfo, MarkTooltipInfo, TooltipInfo } from './interface';
|
|
3
|
-
export declare const isMarkInfo: (info: Maybe<TooltipInfo>) => info is MarkTooltipInfo<
|
|
3
|
+
export declare const isMarkInfo: (info: Maybe<TooltipInfo>) => info is MarkTooltipInfo<import("../../../typings").Datum>;
|
|
4
4
|
export declare const isDimensionInfo: (info: Maybe<TooltipInfo>) => info is DimensionTooltipInfo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../interface/type';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IModelRenderOption } from '../../model/interface';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import { BaseComponent } from '../base/base-component';
|
|
5
5
|
import type { BaseEventParams, EventCallback, EventQuery, EventType } from '../../event/interface';
|
|
@@ -44,8 +44,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
44
44
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
45
45
|
protected _registerEvent(): void;
|
|
46
46
|
protected _releaseEvent(): void;
|
|
47
|
-
|
|
48
|
-
onLayoutEnd(ctx: IModelLayoutOption): void;
|
|
47
|
+
onLayoutEnd(): void;
|
|
49
48
|
onRender(ctx: IModelRenderOption): void;
|
|
50
49
|
created(): void;
|
|
51
50
|
release(): void;
|
package/types/constant/data.d.ts
CHANGED