@visactor/vchart-types 2.1.0-alpha.0 → 2.1.0-alpha.10
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/chart/base/base-chart-transformer.d.ts +3 -0
- package/types/chart/base/base-chart.d.ts +25 -9
- package/types/chart/interface/chart.d.ts +1 -0
- package/types/chart/util.d.ts +4 -1
- package/types/compile/data/compilable-data.d.ts +1 -1
- package/types/compile/grammar-item.d.ts +1 -1
- package/types/compile/interface/compilable-item.d.ts +1 -1
- package/types/component/axis/base-axis.d.ts +2 -7
- package/types/component/axis/cartesian/band-axis.d.ts +1 -7
- package/types/component/axis/polar/band-axis.d.ts +2 -0
- package/types/component/base/base-component.d.ts +7 -7
- package/types/component/base/release-vrender-component.d.ts +10 -0
- package/types/component/brush/brush.d.ts +3 -7
- package/types/component/crosshair/base.d.ts +4 -7
- package/types/component/custom-mark/custom-mark.d.ts +4 -7
- package/types/component/data-zoom/data-filter-base-component.d.ts +3 -7
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -0
- package/types/component/geo/geo-coordinate.d.ts +1 -7
- package/types/component/indicator/indicator.d.ts +1 -0
- package/types/component/indicator/util.d.ts +4 -3
- package/types/component/label/base-label.d.ts +1 -7
- package/types/component/legend/base-legend.d.ts +2 -7
- package/types/component/marker/base-marker.d.ts +14 -7
- package/types/component/marker/utils.d.ts +4 -4
- package/types/component/player/player.d.ts +1 -0
- package/types/component/title/title.d.ts +1 -7
- package/types/component/tooltip/tooltip.d.ts +1 -0
- package/types/core/vchart.d.ts +5 -1
- package/types/data/data-view-utils.d.ts +5 -0
- package/types/data/transforms/box-plot.d.ts +4 -1
- package/types/data/transforms/correlation-center.d.ts +10 -4
- package/types/data/transforms/correlation.d.ts +18 -15
- package/types/data/transforms/funnel.d.ts +10 -8
- package/types/data/transforms/lookup.d.ts +3 -3
- package/types/data/transforms/map.d.ts +8 -2
- package/types/data/transforms/sankey.d.ts +12 -4
- package/types/data/transforms/stack-split.d.ts +2 -1
- package/types/data/transforms/treemap.d.ts +5 -3
- package/types/data/transforms/venn.d.ts +4 -2
- package/types/data/transforms/waterfall.d.ts +4 -2
- package/types/event/event.d.ts +4 -0
- package/types/mark/base/base-mark.d.ts +12 -2
- package/types/mark/component.d.ts +9 -0
- package/types/mark/interface/mark.d.ts +2 -0
- package/types/model/base-model.d.ts +3 -15
- package/types/model/interface.d.ts +13 -0
- package/types/region/region.d.ts +1 -7
- package/types/scale/color-ordinal-scale.d.ts +1 -0
- package/types/series/area/area.d.ts +2 -0
- package/types/series/bar/bar.d.ts +3 -0
- package/types/series/base/base-series.d.ts +10 -7
- package/types/series/base/constant.d.ts +3 -0
- package/types/series/box-plot/box-plot.d.ts +2 -0
- package/types/series/dot/dot.d.ts +12 -0
- package/types/series/heatmap/heatmap.d.ts +2 -0
- package/types/series/line/line.d.ts +2 -0
- package/types/series/mixin/line-mixin.d.ts +1 -0
- package/types/series/pie/pie.d.ts +3 -7
- package/types/series/polar/progress-like/progress-like.d.ts +2 -0
- package/types/series/polar/rose-like/rose-like.d.ts +2 -0
- package/types/series/progress/circular/circular.d.ts +2 -0
- package/types/series/progress/linear/linear.d.ts +2 -0
- package/types/series/scatter/scatter.d.ts +2 -0
- package/types/series/waterfall/waterfall.d.ts +2 -0
- package/types/util/graphic-state.d.ts +1 -0
|
@@ -8,6 +8,7 @@ import type { ICartesianBandAxisSpec } from '../..//component/axis/cartesian/int
|
|
|
8
8
|
export declare class BaseChartSpecTransformer<T extends IChartSpec> implements IChartSpecTransformer {
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _seriesRelatedSpecKeys: Record<string, true>;
|
|
11
12
|
protected _option: IChartSpecTransformerOption;
|
|
12
13
|
constructor(option: IChartSpecTransformerOption);
|
|
13
14
|
initChartSpec(chartSpec: T): IChartSpecInfo;
|
|
@@ -16,6 +17,8 @@ export declare class BaseChartSpecTransformer<T extends IChartSpec> implements I
|
|
|
16
17
|
transformModelSpec(chartSpec: T): IChartSpecInfo;
|
|
17
18
|
createSpecInfo(chartSpec: T, transform?: (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => void): IChartSpecInfo;
|
|
18
19
|
protected _isValidSeries(seriesType: string): boolean;
|
|
20
|
+
getSeriesRelatedSpecKeys(): Record<string, true>;
|
|
21
|
+
protected _addSeriesRelatedSpecKeys(...keysList: Array<string[] | undefined>): void;
|
|
19
22
|
protected _getDefaultSeriesSpec(chartSpec: any, pickKeys?: string[], pickKeys2?: string[]): any;
|
|
20
23
|
forEachRegionInSpec<K>(chartSpec: T, callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
|
|
21
24
|
forEachSeriesInSpec<K>(chartSpec: T, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
|
|
@@ -30,6 +30,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
30
30
|
protected _regions: IRegion[];
|
|
31
31
|
protected _series: ISeries[];
|
|
32
32
|
protected _components: IComponent[];
|
|
33
|
+
protected _specTransformer: Maybe<IChartSpecTransformer>;
|
|
33
34
|
protected _layoutFunc: LayoutCallBack;
|
|
34
35
|
protected _layoutRect: IRect;
|
|
35
36
|
getLayoutRect(): IRect;
|
|
@@ -118,17 +119,32 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
118
119
|
updateGlobalScale(result: IUpdateSpecResult): void;
|
|
119
120
|
updateGlobalScaleTheme(): void;
|
|
120
121
|
private _getSpecKeys;
|
|
121
|
-
updateSpec(spec: T):
|
|
122
|
-
change: boolean;
|
|
123
|
-
reMake: boolean;
|
|
124
|
-
reRender: boolean;
|
|
125
|
-
reSize: boolean;
|
|
126
|
-
reCompile: boolean;
|
|
127
|
-
};
|
|
122
|
+
updateSpec(spec: T): IUpdateSpecResult;
|
|
128
123
|
updateChartConfig(result: IUpdateSpecResult, oldSpec: IChartSpec): void;
|
|
129
124
|
updateDataSpec(): void;
|
|
130
125
|
updateRegionSpec(result: IUpdateSpecResult): void;
|
|
131
|
-
updateComponentSpec(result: IUpdateSpecResult):
|
|
126
|
+
updateComponentSpec(result: IUpdateSpecResult): {
|
|
127
|
+
componentOnlyUpdatedComponents: IComponent[];
|
|
128
|
+
hasNonComponentOnlyUpdate: boolean;
|
|
129
|
+
};
|
|
130
|
+
private _canChangeMarkerComponentsWithoutRemake;
|
|
131
|
+
private _canAddMarkerComponentsWithoutRemake;
|
|
132
|
+
private _isMarkerAdditionSpecSafeWithoutRemake;
|
|
133
|
+
private _isAutoRangeMarkerSpec;
|
|
134
|
+
private _canRemoveMarkerComponentsWithoutRemake;
|
|
135
|
+
private _isOnlyMarkerComponentsRemoved;
|
|
136
|
+
private _isComponentSpecKey;
|
|
137
|
+
private _isOnlyComponentSpecsChanged;
|
|
138
|
+
private _isOnlySeriesSpecsChanged;
|
|
139
|
+
private _isOnlyComponentOrSeriesSpecsChanged;
|
|
140
|
+
private _canSkipChartDataStages;
|
|
141
|
+
private _isComponentScaleDomainOnlyUpdate;
|
|
142
|
+
private _reRunStackDataFlow;
|
|
143
|
+
private _getModelSpecIndex;
|
|
144
|
+
private _hasComponentForSpecInfo;
|
|
145
|
+
private _createMissingMarkerComponentsForSpecs;
|
|
146
|
+
private _removeMarkerComponentsForEmptySpecs;
|
|
147
|
+
private _removeComponent;
|
|
132
148
|
updateSeriesSpec(result: IUpdateSpecResult): void;
|
|
133
149
|
getCanvas(): HTMLCanvasElement;
|
|
134
150
|
private _updateLayoutRect;
|
|
@@ -142,7 +158,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
142
158
|
compileRegions(): void;
|
|
143
159
|
compileSeries(): void;
|
|
144
160
|
compileComponents(): void;
|
|
145
|
-
release(): void;
|
|
161
|
+
release(forceReleaseVRenderComponents?: boolean): void;
|
|
146
162
|
onLayout(): void;
|
|
147
163
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
148
164
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
@@ -112,6 +112,7 @@ export interface IChartSpecTransformer {
|
|
|
112
112
|
transformSpec: (spec: any) => void;
|
|
113
113
|
transformModelSpec: (spec: any) => IChartSpecInfo;
|
|
114
114
|
createSpecInfo: (chartSpec: any, transform?: (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => void) => IChartSpecInfo;
|
|
115
|
+
getSeriesRelatedSpecKeys: () => Record<string, true>;
|
|
115
116
|
forEachRegionInSpec: <K>(spec: any, callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo) => K[];
|
|
116
117
|
forEachSeriesInSpec: <K>(spec: any, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo) => K[];
|
|
117
118
|
forEachComponentInSpec: <K>(spec: any, callbackfn: (constructor: IComponentConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo) => K[];
|
package/types/chart/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IChartSpec } from '../typings';
|
|
2
2
|
import type { ICartesianChartSpec } from './cartesian/interface';
|
|
3
3
|
import type { IChartOption } from './interface/common';
|
|
4
|
-
import type { IUpdateSpecResult } from '../model/interface';
|
|
4
|
+
import type { IUpdateSpecEffects, IUpdateSpecResult } from '../model/interface';
|
|
5
5
|
export declare function setDefaultCrosshairForCartesianChart(spec: ICartesianChartSpec): void;
|
|
6
6
|
export declare function calculateChartSize(spec: {
|
|
7
7
|
width?: number;
|
|
@@ -13,6 +13,9 @@ export declare function calculateChartSize(spec: {
|
|
|
13
13
|
width: number;
|
|
14
14
|
height: number;
|
|
15
15
|
};
|
|
16
|
+
export declare function normalizeUpdateSpecEffects(result: IUpdateSpecResult): IUpdateSpecEffects;
|
|
17
|
+
export declare function isUpdateSpecResultLocalOnly(result: IUpdateSpecResult): boolean;
|
|
18
|
+
export declare function isUpdateSpecResultComponentOnly(result: IUpdateSpecResult): boolean;
|
|
16
19
|
export declare function mergeUpdateResult(target: IUpdateSpecResult, ...sources: IUpdateSpecResult[]): IUpdateSpecResult;
|
|
17
20
|
export declare function getTrimPaddingConfig(chartType: string, spec: IChartSpec): {
|
|
18
21
|
paddingInner: number;
|
|
@@ -13,7 +13,7 @@ export declare class CompilableData extends GrammarItem implements ICompilableDa
|
|
|
13
13
|
setDataView(d?: DataView): void;
|
|
14
14
|
getLatestData(): any;
|
|
15
15
|
constructor(option: GrammarItemInitOption, dataView?: DataView);
|
|
16
|
-
removeProduct(): void;
|
|
16
|
+
removeProduct(_releaseDetach?: boolean): void;
|
|
17
17
|
release(): void;
|
|
18
18
|
protected _relatedMarks?: Record<string, ICompilableMark>;
|
|
19
19
|
addRelatedMark(mark: ICompilableMark): void;
|
|
@@ -11,7 +11,7 @@ export declare abstract class GrammarItem extends CompilableBase implements IGra
|
|
|
11
11
|
getProductId(): string;
|
|
12
12
|
compile(option?: GrammarItemCompileOption): void;
|
|
13
13
|
protected abstract _compileProduct(option?: GrammarItemCompileOption): void;
|
|
14
|
-
abstract removeProduct(): void;
|
|
14
|
+
abstract removeProduct(releaseDetach?: boolean): void;
|
|
15
15
|
protected _transform: ITransformSpec[];
|
|
16
16
|
setTransform(transform: ITransformSpec[]): void;
|
|
17
17
|
runTransforms<T = any>(transforms: ITransformSpec[], data: T): T;
|
|
@@ -85,7 +85,7 @@ export interface IGrammarItem extends ICompilable {
|
|
|
85
85
|
id: number;
|
|
86
86
|
generateProductId: () => string;
|
|
87
87
|
getProductId: () => string;
|
|
88
|
-
removeProduct: () => void;
|
|
88
|
+
removeProduct: (releaseDetach?: boolean) => void;
|
|
89
89
|
setTransform: (transform: ITransformSpec[]) => void;
|
|
90
90
|
}
|
|
91
91
|
export type GrammarItemInitOption = ICompilableInitOption;
|
|
@@ -82,13 +82,8 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
82
82
|
protected computeData(updateType?: 'domain' | 'range' | 'force'): void;
|
|
83
83
|
protected _updateTickDataMarks(m: ICompilableMark): void;
|
|
84
84
|
protected initScales(): void;
|
|
85
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
86
|
-
|
|
87
|
-
reMake: boolean;
|
|
88
|
-
reRender: boolean;
|
|
89
|
-
reSize: boolean;
|
|
90
|
-
reCompile: boolean;
|
|
91
|
-
};
|
|
85
|
+
_compareSpec(spec: T, prevSpec: T): import("../..").IUpdateSpecResult;
|
|
86
|
+
private _isComponentOnlySpecChange;
|
|
92
87
|
protected _getAxisAttributes(): any;
|
|
93
88
|
protected _getGridAttributes(): {
|
|
94
89
|
alternateColor: any;
|
|
@@ -43,13 +43,7 @@ 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
|
-
};
|
|
46
|
+
_compareSpec(spec: T, prevSpec: T): import("../../..").IUpdateSpecResult;
|
|
53
47
|
reInit(spec?: T): void;
|
|
54
48
|
}
|
|
55
49
|
export declare const registerCartesianBandAxis: () => void;
|
|
@@ -18,6 +18,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
18
18
|
};
|
|
19
19
|
protected _scale: BandScale;
|
|
20
20
|
protected _scales: BandScale[];
|
|
21
|
+
protected _updateData: () => void;
|
|
21
22
|
protected computeDomain(data: {
|
|
22
23
|
min: number;
|
|
23
24
|
max: number;
|
|
@@ -37,6 +38,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
37
38
|
getSpec: () => T;
|
|
38
39
|
};
|
|
39
40
|
protected initScales(): void;
|
|
41
|
+
reInit(spec?: T): void;
|
|
40
42
|
protected registerTicksTransform(): string;
|
|
41
43
|
transformScaleDomain(): void;
|
|
42
44
|
}
|
|
@@ -19,20 +19,20 @@ export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> ex
|
|
|
19
19
|
protected _regions: IRegion[];
|
|
20
20
|
getRegions(): IRegion[];
|
|
21
21
|
protected _container: IGroup;
|
|
22
|
+
private _exitingVRenderComponents?;
|
|
23
|
+
private _forceReleaseVRenderComponents;
|
|
22
24
|
created(): void;
|
|
23
25
|
initLayout(): void;
|
|
24
26
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
25
27
|
getVRenderComponents(): IGraphic<Partial<IGraphicAttribute>>[];
|
|
26
28
|
protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
|
|
27
29
|
protected getContainer(): IGroup;
|
|
28
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
29
|
-
|
|
30
|
-
reMake: boolean;
|
|
31
|
-
reRender: boolean;
|
|
32
|
-
reSize: boolean;
|
|
33
|
-
reCompile: boolean;
|
|
34
|
-
};
|
|
30
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
31
|
+
beforeRelease(): void;
|
|
35
32
|
release(): void;
|
|
33
|
+
protected _shouldReleaseVRenderComponentsImmediately(): boolean;
|
|
34
|
+
protected _forceReleaseExitingVRenderComponents(): void;
|
|
35
|
+
protected _releaseVRenderComponent(component: IGraphic): void;
|
|
36
36
|
clear(): void;
|
|
37
37
|
compile(): void;
|
|
38
38
|
compileMarks(group?: IGroup): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
2
|
+
type ReleaseVRenderComponentOptions = {
|
|
3
|
+
enableExitAnimation?: boolean;
|
|
4
|
+
removeFromParent?: boolean;
|
|
5
|
+
onComplete?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const releaseVRenderComponentSync: (component: IGraphic, removeFromParent?: boolean) => void;
|
|
8
|
+
export declare const collectVRenderComponents: (component: IGraphic) => IGraphic[];
|
|
9
|
+
export declare const releaseVRenderComponent: (component: IGraphic, options?: ReleaseVRenderComponentOptions) => boolean;
|
|
10
|
+
export {};
|
|
@@ -48,6 +48,7 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
48
48
|
private _zoomRecord;
|
|
49
49
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
50
50
|
init(): void;
|
|
51
|
+
reInit(spec?: T): void;
|
|
51
52
|
private _initNeedOperatedItem;
|
|
52
53
|
created(): void;
|
|
53
54
|
protected _bindRegions(): void;
|
|
@@ -55,13 +56,8 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
55
56
|
private _initRegionAxisMap;
|
|
56
57
|
private _initAxisDataZoomMap;
|
|
57
58
|
protected initEvent(): void;
|
|
58
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
59
|
-
|
|
60
|
-
reMake: boolean;
|
|
61
|
-
reRender: boolean;
|
|
62
|
-
reSize: boolean;
|
|
63
|
-
reCompile: boolean;
|
|
64
|
-
};
|
|
59
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
60
|
+
protected _isComponentOnlySpecChange(spec: T, prevSpec: T): boolean;
|
|
65
61
|
onLayoutEnd(): void;
|
|
66
62
|
protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
|
|
67
63
|
protected _shouldEnableInteractive(): boolean;
|
|
@@ -41,13 +41,10 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
41
41
|
protected _showDefaultCrosshair(): void;
|
|
42
42
|
setAttrFromSpec(): void;
|
|
43
43
|
created(): void;
|
|
44
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
reSize: boolean;
|
|
49
|
-
reCompile: boolean;
|
|
50
|
-
};
|
|
44
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
45
|
+
private _isComponentOnlySpecChange;
|
|
46
|
+
private _isFieldComponentOnlySpecChange;
|
|
47
|
+
private _isLineComponentOnlySpecChange;
|
|
51
48
|
protected _initEvent(): void;
|
|
52
49
|
private _registerEvent;
|
|
53
50
|
private _eventOff;
|
|
@@ -18,13 +18,10 @@ export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMark
|
|
|
18
18
|
protected initMarks(): void;
|
|
19
19
|
private _createExtensionMark;
|
|
20
20
|
initEvent(): void;
|
|
21
|
-
_compareSpec(spec: ICustomMarkSpec<EnableMarkType>, prevSpec: ICustomMarkSpec<EnableMarkType>):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
reSize: boolean;
|
|
26
|
-
reCompile: boolean;
|
|
27
|
-
};
|
|
21
|
+
_compareSpec(spec: ICustomMarkSpec<EnableMarkType>, prevSpec: ICustomMarkSpec<EnableMarkType>): import("../..").IUpdateSpecResult;
|
|
22
|
+
protected _isComponentOnlySpecChange(spec: ICustomMarkSpec<EnableMarkType>, prevSpec: ICustomMarkSpec<EnableMarkType>): boolean;
|
|
23
|
+
reInit(spec?: ICustomMarkSpec<EnableMarkType>): void;
|
|
24
|
+
private _updateMarkStyleWithSpec;
|
|
28
25
|
private _getMarkAttributeContext;
|
|
29
26
|
private _getLayoutRect;
|
|
30
27
|
getBoundsInRect(rect: ILayoutRect): {
|
|
@@ -76,13 +76,9 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
76
76
|
created(): void;
|
|
77
77
|
initLayout(): void;
|
|
78
78
|
init(option: IModelInitOption): void;
|
|
79
|
-
_compareSpec(spec: AdaptiveSpec<T, 'width' | 'height'>, prevSpec: AdaptiveSpec<T, 'width' | 'height'>):
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
reRender: boolean;
|
|
83
|
-
reSize: boolean;
|
|
84
|
-
reCompile: boolean;
|
|
85
|
-
};
|
|
79
|
+
_compareSpec(spec: AdaptiveSpec<T, 'width' | 'height'>, prevSpec: AdaptiveSpec<T, 'width' | 'height'>): import("../../model/interface").IUpdateSpecResult;
|
|
80
|
+
protected _getComponentOnlySpecKeys(): Record<string, boolean>;
|
|
81
|
+
protected _isComponentOnlySpecChange(spec: AdaptiveSpec<T, 'width' | 'height'>, prevSpec: AdaptiveSpec<T, 'width' | 'height'>): boolean;
|
|
86
82
|
reInit(spec?: AdaptiveSpec<T, 'width' | 'height'>): void;
|
|
87
83
|
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
88
84
|
updateLayoutAttribute(): void;
|
|
@@ -36,6 +36,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
36
36
|
created(): void;
|
|
37
37
|
updateLayoutAttribute(): void;
|
|
38
38
|
protected _beforeLayoutEnd(): void;
|
|
39
|
+
protected _getComponentOnlySpecKeys(): Record<string, boolean>;
|
|
39
40
|
clear(): void;
|
|
40
41
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
41
42
|
setAttrFromSpec(): void;
|
|
@@ -22,6 +22,7 @@ export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extend
|
|
|
22
22
|
constructor(spec: T, options: IComponentOption);
|
|
23
23
|
protected _handleChange(start: number, end: number, updateComponent?: boolean): void;
|
|
24
24
|
protected _handleDataCollectionChange(): void;
|
|
25
|
+
protected _getComponentOnlySpecKeys(): Record<string, boolean>;
|
|
25
26
|
protected _beforeLayoutEnd(): void;
|
|
26
27
|
onLayoutEnd(): void;
|
|
27
28
|
protected _updateScaleRange(): void;
|
|
@@ -52,13 +52,7 @@ export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> impleme
|
|
|
52
52
|
invert(point: [number, number]): any;
|
|
53
53
|
private evaluateProjection;
|
|
54
54
|
protected _initCenterCache(): void;
|
|
55
|
-
_compareSpec(spec: IGeoRegionSpec, prevSpec: IGeoRegionSpec):
|
|
56
|
-
change: boolean;
|
|
57
|
-
reMake: boolean;
|
|
58
|
-
reRender: boolean;
|
|
59
|
-
reSize: boolean;
|
|
60
|
-
reCompile: boolean;
|
|
61
|
-
};
|
|
55
|
+
_compareSpec(spec: IGeoRegionSpec, prevSpec: IGeoRegionSpec): import("../../model/interface").IUpdateSpecResult;
|
|
62
56
|
release(): void;
|
|
63
57
|
}
|
|
64
58
|
export declare const registerGeoCoordinate: () => void;
|
|
@@ -27,6 +27,7 @@ export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T
|
|
|
27
27
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
28
28
|
created(): void;
|
|
29
29
|
setAttrFromSpec(): void;
|
|
30
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
30
31
|
protected initEvent(): void;
|
|
31
32
|
updateDatum(datum: any): void;
|
|
32
33
|
private initData;
|
|
@@ -2,12 +2,13 @@ import type { IIndicatorItemSpec } from './interface';
|
|
|
2
2
|
export interface IIndicatorDatum {
|
|
3
3
|
type: 'title' | 'content';
|
|
4
4
|
index: number;
|
|
5
|
-
datum:
|
|
5
|
+
datum: unknown;
|
|
6
6
|
spec: IIndicatorItemSpec;
|
|
7
7
|
}
|
|
8
8
|
export interface IIndicatorMapper {
|
|
9
9
|
title: IIndicatorItemSpec;
|
|
10
10
|
content: IIndicatorItemSpec[];
|
|
11
|
-
datum: () =>
|
|
11
|
+
datum: () => unknown;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type IndicatorMapperOption = IIndicatorMapper | (() => IIndicatorMapper);
|
|
14
|
+
export declare const indicatorMapper: (data: Array<unknown>, op: IndicatorMapperOption) => IIndicatorDatum[];
|
|
@@ -22,13 +22,7 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
22
22
|
selected_reverse?: Partial<import("../../core").IComposedTextMarkSpec>;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
26
|
-
change: boolean;
|
|
27
|
-
reMake: boolean;
|
|
28
|
-
reRender: boolean;
|
|
29
|
-
reSize: boolean;
|
|
30
|
-
reCompile: boolean;
|
|
31
|
-
};
|
|
25
|
+
_compareSpec(spec: T, prevSpec: T): import("../../core").IUpdateSpecResult;
|
|
32
26
|
_getDataLabelType(baseMark: ICompilableMark, type?: string): string;
|
|
33
27
|
_setTransformOfComponent(labelComponent: IComponentMark, baseMark: IMark | IMark[]): void;
|
|
34
28
|
getVRenderComponents(): any[];
|
|
@@ -31,13 +31,8 @@ export declare abstract class BaseLegend<T extends ILegendCommonSpec> extends Ba
|
|
|
31
31
|
protected _regionUserIndex?: number[];
|
|
32
32
|
setAttrFromSpec(): void;
|
|
33
33
|
created(): void;
|
|
34
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
35
|
-
|
|
36
|
-
reMake: boolean;
|
|
37
|
-
reRender: boolean;
|
|
38
|
-
reSize: boolean;
|
|
39
|
-
reCompile: boolean;
|
|
40
|
-
};
|
|
34
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
35
|
+
private _isComponentOnlySpecChange;
|
|
41
36
|
protected abstract _initLegendData(): DataView;
|
|
42
37
|
protected abstract _initSelectedData(): void;
|
|
43
38
|
protected abstract _getLegendAttributes(rect: ILayoutRect): any;
|
|
@@ -19,6 +19,8 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
19
19
|
getRelativeSeries(): IMarkerSupportSeries;
|
|
20
20
|
protected _markerData: DataView;
|
|
21
21
|
getMarkerData(): DataView;
|
|
22
|
+
private _markerDataChangeHandler;
|
|
23
|
+
private _markerDataOwned;
|
|
22
24
|
protected _markerComponent: any;
|
|
23
25
|
protected _layoutOffsetX: number;
|
|
24
26
|
protected _layoutOffsetY: number;
|
|
@@ -38,6 +40,10 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
38
40
|
getStartRelativeSeries: () => IMarkerSupportSeries;
|
|
39
41
|
getEndRelativeSeries: () => IMarkerSupportSeries;
|
|
40
42
|
};
|
|
43
|
+
protected _getAutoRangeExtendDomainKeyPrefix(): string;
|
|
44
|
+
private _getAutoRangeExtendDomainKey;
|
|
45
|
+
private _clearAutoRangeExtendDomain;
|
|
46
|
+
private _updateMarkerLayout;
|
|
41
47
|
private _getFieldInfoFromSpec;
|
|
42
48
|
protected _processSpecByDims(dimSpec: {
|
|
43
49
|
dim: 'x' | 'y' | 'angle' | 'radius' | 'areaName';
|
|
@@ -49,20 +55,21 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
49
55
|
};
|
|
50
56
|
protected _processSpecCoo(spec: any): IOptionWithCoordinates;
|
|
51
57
|
protected _getRelativeDataView(): DataView;
|
|
58
|
+
protected _setMarkerData(data: DataView, owned?: boolean): void;
|
|
59
|
+
protected _bindMarkerDataChange(): void;
|
|
60
|
+
private _releaseMarkerData;
|
|
52
61
|
updateLayoutAttribute(): void;
|
|
53
62
|
private _getSeriesByIdOrIndex;
|
|
54
63
|
protected _bindSeries(): void;
|
|
55
64
|
protected initEvent(): void;
|
|
56
65
|
clear(): void;
|
|
66
|
+
release(): void;
|
|
57
67
|
private _getFirstSeries;
|
|
58
68
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
59
69
|
onLayoutStart(layoutRect: IRect, chartViewRect: ILayoutRect): void;
|
|
60
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
reSize: boolean;
|
|
65
|
-
reCompile: boolean;
|
|
66
|
-
};
|
|
70
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
71
|
+
protected _isComponentOnlySpecChange(spec: T, prevSpec: T): boolean;
|
|
72
|
+
protected _isAutoRangeSpecChange(spec: T, prevSpec: T): boolean;
|
|
73
|
+
reInit(spec?: T): void;
|
|
67
74
|
_initCommonDataView(): void;
|
|
68
75
|
}
|
|
@@ -5,11 +5,11 @@ import type { IDataPos, IMarkerAttributeContext, IMarkerLabelSpec, IMarkerState,
|
|
|
5
5
|
import type { IRegion } from '../../region/interface';
|
|
6
6
|
import type { OffsetPoint } from './interface';
|
|
7
7
|
export declare function isAggrSpec(spec: IDataPos): boolean;
|
|
8
|
-
export declare function xyLayout(data: DataView, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries, relativeSeries: IMarkerSupportSeries, autoRange: boolean, includeFullBand?: boolean): IPoint[][];
|
|
9
|
-
export declare function polarLayout(data: DataView, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries, relativeSeries: IMarkerSupportSeries, autoRange: boolean): IPolarPoint[][];
|
|
8
|
+
export declare function xyLayout(data: DataView, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries, relativeSeries: IMarkerSupportSeries, autoRange: boolean, includeFullBand?: boolean, autoRangeExtendDomainKeyPrefix?: string): IPoint[][];
|
|
9
|
+
export declare function polarLayout(data: DataView, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries, relativeSeries: IMarkerSupportSeries, autoRange: boolean, autoRangeExtendDomainKeyPrefix?: string): IPolarPoint[][];
|
|
10
10
|
export declare function geoLayout(data: DataView, relativeSeries: IMarkerSupportSeries): IPoint[][];
|
|
11
|
-
export declare function cartesianCoordinateLayout(data: DataView, relativeSeries: IMarkerSupportSeries, autoRange: boolean, coordinatesOffset: OffsetPoint[] | OffsetPoint): IPoint[];
|
|
12
|
-
export declare function polarCoordinateLayout(data: DataView, relativeSeries: IMarkerSupportSeries, autoRange: boolean): IPolarPoint[];
|
|
11
|
+
export declare function cartesianCoordinateLayout(data: DataView, relativeSeries: IMarkerSupportSeries, autoRange: boolean, coordinatesOffset: OffsetPoint[] | OffsetPoint, autoRangeExtendDomainKeyPrefix?: string): IPoint[];
|
|
12
|
+
export declare function polarCoordinateLayout(data: DataView, relativeSeries: IMarkerSupportSeries, autoRange: boolean, autoRangeExtendDomainKeyPrefix?: string): IPolarPoint[];
|
|
13
13
|
export declare function positionLayout(positions: MarkerPositionPoint | MarkerPositionPoint[] | ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => MarkerPositionPoint) | ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => MarkerPositionPoint[]), series: IMarkerSupportSeries, regionRelative: boolean): IPoint[];
|
|
14
14
|
export declare function computeClipRange(regions: IRegion[]): {
|
|
15
15
|
minX: number;
|
|
@@ -29,6 +29,7 @@ export declare class Player extends BaseComponent<IPlayer> implements IComponent
|
|
|
29
29
|
get orient(): IOrientType;
|
|
30
30
|
set layoutOrient(v: IOrientType);
|
|
31
31
|
setAttrFromSpec(): void;
|
|
32
|
+
_compareSpec(spec: IPlayer, prevSpec: IPlayer): import("../../model/interface").IUpdateSpecResult;
|
|
32
33
|
afterSetLayoutStartPoint(pos: IPoint): void;
|
|
33
34
|
getBoundsInRect(rect: ILayoutRect, fullSpace: ILayoutRect): {
|
|
34
35
|
x1: number;
|
|
@@ -24,13 +24,7 @@ export declare class Title<T extends ITitleSpec = ITitleSpec> extends BaseCompon
|
|
|
24
24
|
constructor(spec: T, options: IComponentOption);
|
|
25
25
|
initLayout(): void;
|
|
26
26
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
27
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
28
|
-
change: boolean;
|
|
29
|
-
reMake: boolean;
|
|
30
|
-
reRender: boolean;
|
|
31
|
-
reSize: boolean;
|
|
32
|
-
reCompile: boolean;
|
|
33
|
-
};
|
|
27
|
+
_compareSpec(spec: T, prevSpec: T): import("../../model/interface").IUpdateSpecResult;
|
|
34
28
|
afterSetLayoutStartPoint(pos: IPoint): void;
|
|
35
29
|
getBoundsInRect(rect: ILayoutRect): {
|
|
36
30
|
x1: number;
|
|
@@ -45,6 +45,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
45
45
|
protected _releaseEvent(): void;
|
|
46
46
|
onLayoutEnd(): void;
|
|
47
47
|
created(): void;
|
|
48
|
+
_compareSpec(spec: ITooltipSpec, prevSpec: ITooltipSpec): import("../../model/interface").IUpdateSpecResult;
|
|
48
49
|
release(): void;
|
|
49
50
|
beforeRelease(): void;
|
|
50
51
|
protected _initHandler(): void;
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { IComponentConstructor } from '../component/interface';
|
|
|
8
8
|
import type { EventCallback, EventQuery, EventType, ExtendEventParam, IEvent } from '../event/interface';
|
|
9
9
|
import type { IParserOptions, Transform } from '@visactor/vdataset';
|
|
10
10
|
import { DataSet, DataView } from '@visactor/vdataset';
|
|
11
|
-
import type { IStage } from '@visactor/vrender-core';
|
|
11
|
+
import type { IGraphic, IStage } from '@visactor/vrender-core';
|
|
12
12
|
import type { GeoSourceType } from '../typings/geo';
|
|
13
13
|
import type { GeoSourceOption } from '../series/map/geo-source';
|
|
14
14
|
import type { IMark, MarkConstructor } from '../mark/interface';
|
|
@@ -78,6 +78,7 @@ export declare class VChart implements IVChart {
|
|
|
78
78
|
private _onError?;
|
|
79
79
|
private _context;
|
|
80
80
|
private _isReleased;
|
|
81
|
+
private _exitingVRenderComponents?;
|
|
81
82
|
private _chartPlugin?;
|
|
82
83
|
private _vChartPlugin?;
|
|
83
84
|
private _onResize?;
|
|
@@ -110,6 +111,9 @@ export declare class VChart implements IVChart {
|
|
|
110
111
|
protected _renderAsync(option?: IVChartRenderOption): Promise<IVChart>;
|
|
111
112
|
private _updateAnimateState;
|
|
112
113
|
release(): void;
|
|
114
|
+
_registerExitingVRenderComponent(component: IGraphic): void;
|
|
115
|
+
_unregisterExitingVRenderComponent(component: IGraphic): void;
|
|
116
|
+
private _forceReleaseExitingVRenderComponents;
|
|
113
117
|
updateData(id: StringOrNumber, data: DataView | Datum[] | string, parserOptions?: IParserOptions, userUpdateOptions?: IUpdateDataResult): Promise<IVChart>;
|
|
114
118
|
private _updateDataById;
|
|
115
119
|
updateDataInBatches(list: {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DataView } from '@visactor/vdataset';
|
|
2
|
+
export declare const detachDataViewDependencies: (dataView?: DataView | null) => void;
|
|
3
|
+
export declare const releaseDataViews: (dataViews: Array<DataView | null | undefined>) => void;
|
|
4
|
+
export declare const releaseDataView: (dataView?: DataView | null) => void;
|
|
5
|
+
export declare const releaseDataViewWithDependencies: (dataView: DataView | null | undefined, shouldReleaseDependency: (dataView: DataView) => boolean) => void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { DataView } from '@visactor/vdataset';
|
|
1
2
|
export interface IBoxPlotOutlierOpt {
|
|
2
3
|
dimensionField: string[];
|
|
3
4
|
outliersField: string;
|
|
4
5
|
seriesField?: string;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
type BoxPlotOutlierOption = IBoxPlotOutlierOpt | (() => IBoxPlotOutlierOpt);
|
|
8
|
+
export declare const foldOutlierData: (data: Array<DataView>, op: BoxPlotOutlierOption) => Record<string, unknown>[];
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
type CorrelationCenterOptionValue<T> = T | (() => T);
|
|
2
|
+
type CorrelationCenterData = Array<{
|
|
3
|
+
latestData: Array<Record<string, unknown>>;
|
|
4
|
+
}>;
|
|
5
|
+
export interface ICorrelationCenterOpt {
|
|
6
|
+
keyword: CorrelationCenterOptionValue<string>;
|
|
7
|
+
categoryField: CorrelationCenterOptionValue<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const correlationCenter: (data: CorrelationCenterData, options: ICorrelationCenterOpt) => Record<string, unknown> | [];
|
|
10
|
+
export {};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
type CorrelationOptionValue<T> = T | (() => T);
|
|
1
2
|
export interface ICorrelationOpt {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
view: () => {
|
|
4
|
+
x0: number;
|
|
5
|
+
x1: number;
|
|
6
|
+
y0: number;
|
|
7
|
+
y1: number;
|
|
8
|
+
};
|
|
9
|
+
field: CorrelationOptionValue<string>;
|
|
10
|
+
radiusField?: CorrelationOptionValue<string | undefined>;
|
|
11
|
+
radiusRange?: CorrelationOptionValue<[number, number] | undefined>;
|
|
12
|
+
center?: CorrelationOptionValue<[string | number, string | number] | undefined>;
|
|
13
|
+
startAngle?: CorrelationOptionValue<number | undefined>;
|
|
14
|
+
endAngle?: CorrelationOptionValue<number | undefined>;
|
|
15
|
+
innerRadius?: CorrelationOptionValue<string | number | undefined>;
|
|
16
|
+
outerRadius?: CorrelationOptionValue<string | number | undefined>;
|
|
10
17
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
size: number;
|
|
15
|
-
datum: any;
|
|
16
|
-
}
|
|
17
|
-
export declare const correlation: (data: any, options: any) => any;
|
|
18
|
+
export type CircularRelationItem = Record<string, unknown>;
|
|
19
|
+
export declare const correlation: (data: unknown, options: ICorrelationOpt) => unknown;
|
|
20
|
+
export {};
|