@visactor/vchart-types 2.1.0-alpha.2 → 2.1.0-alpha.21
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 +0 -3
- package/types/chart/base/base-chart.d.ts +9 -15
- package/types/chart/interface/chart.d.ts +0 -1
- package/types/chart/util.d.ts +1 -4
- package/types/compile/compiler.d.ts +0 -2
- 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/compile/interface/compiler.d.ts +1 -2
- package/types/component/axis/base-axis.d.ts +7 -2
- package/types/component/axis/cartesian/band-axis.d.ts +7 -1
- package/types/component/base/base-component.d.ts +7 -7
- package/types/component/brush/brush.d.ts +7 -2
- package/types/component/crosshair/base.d.ts +7 -1
- package/types/component/custom-mark/custom-mark.d.ts +7 -1
- package/types/component/data-zoom/data-filter-base-component.d.ts +7 -1
- package/types/component/geo/geo-coordinate.d.ts +7 -1
- package/types/component/label/base-label.d.ts +7 -1
- package/types/component/legend/base-legend.d.ts +7 -2
- package/types/component/marker/base-marker.d.ts +7 -7
- package/types/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/types/component/title/title.d.ts +7 -1
- package/types/core/vchart.d.ts +1 -5
- package/types/mark/base/base-mark.d.ts +2 -13
- package/types/mark/component.d.ts +0 -9
- package/types/mark/interface/mark.d.ts +0 -2
- package/types/model/base-model.d.ts +15 -3
- package/types/model/interface.d.ts +0 -13
- package/types/region/region.d.ts +7 -1
- package/types/series/area/area.d.ts +0 -2
- package/types/series/bar/bar.d.ts +0 -3
- package/types/series/base/base-series.d.ts +7 -8
- package/types/series/base/constant.d.ts +0 -3
- package/types/series/box-plot/box-plot.d.ts +0 -2
- package/types/series/heatmap/heatmap.d.ts +0 -2
- package/types/series/line/line.d.ts +0 -2
- package/types/series/mixin/line-mixin.d.ts +0 -1
- package/types/series/pie/pie.d.ts +7 -3
- package/types/series/progress/circular/circular.d.ts +0 -2
- package/types/series/progress/linear/linear.d.ts +0 -2
- package/types/series/scatter/scatter.d.ts +0 -2
- package/types/series/waterfall/waterfall.d.ts +2 -2
- package/types/compile/stage-app.d.ts +0 -9
- package/types/component/base/release-vrender-component.d.ts +0 -10
- package/types/data/data-view-utils.d.ts +0 -5
- package/types/util/graphic-state.d.ts +0 -4
|
@@ -8,7 +8,6 @@ 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>;
|
|
12
11
|
protected _option: IChartSpecTransformerOption;
|
|
13
12
|
constructor(option: IChartSpecTransformerOption);
|
|
14
13
|
initChartSpec(chartSpec: T): IChartSpecInfo;
|
|
@@ -17,8 +16,6 @@ export declare class BaseChartSpecTransformer<T extends IChartSpec> implements I
|
|
|
17
16
|
transformModelSpec(chartSpec: T): IChartSpecInfo;
|
|
18
17
|
createSpecInfo(chartSpec: T, transform?: (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => void): IChartSpecInfo;
|
|
19
18
|
protected _isValidSeries(seriesType: string): boolean;
|
|
20
|
-
getSeriesRelatedSpecKeys(): Record<string, true>;
|
|
21
|
-
protected _addSeriesRelatedSpecKeys(...keysList: Array<string[] | undefined>): void;
|
|
22
19
|
protected _getDefaultSeriesSpec(chartSpec: any, pickKeys?: string[], pickKeys2?: string[]): any;
|
|
23
20
|
forEachRegionInSpec<K>(chartSpec: T, callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
|
|
24
21
|
forEachSeriesInSpec<K>(chartSpec: T, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
|
|
@@ -30,7 +30,6 @@ 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>;
|
|
34
33
|
protected _layoutFunc: LayoutCallBack;
|
|
35
34
|
protected _layoutRect: IRect;
|
|
36
35
|
getLayoutRect(): IRect;
|
|
@@ -119,22 +118,17 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
119
118
|
updateGlobalScale(result: IUpdateSpecResult): void;
|
|
120
119
|
updateGlobalScaleTheme(): void;
|
|
121
120
|
private _getSpecKeys;
|
|
122
|
-
updateSpec(spec: T):
|
|
121
|
+
updateSpec(spec: T): {
|
|
122
|
+
change: boolean;
|
|
123
|
+
reMake: boolean;
|
|
124
|
+
reRender: boolean;
|
|
125
|
+
reSize: boolean;
|
|
126
|
+
reCompile: boolean;
|
|
127
|
+
};
|
|
123
128
|
updateChartConfig(result: IUpdateSpecResult, oldSpec: IChartSpec): void;
|
|
124
129
|
updateDataSpec(): void;
|
|
125
130
|
updateRegionSpec(result: IUpdateSpecResult): void;
|
|
126
|
-
updateComponentSpec(result: IUpdateSpecResult):
|
|
127
|
-
componentOnlyUpdatedComponents: IComponent[];
|
|
128
|
-
hasNonComponentOnlyUpdate: boolean;
|
|
129
|
-
};
|
|
130
|
-
private _canRemoveMarkerComponentsWithoutRemake;
|
|
131
|
-
private _isOnlyMarkerComponentsRemoved;
|
|
132
|
-
private _isComponentSpecKey;
|
|
133
|
-
private _isOnlyComponentSpecsChanged;
|
|
134
|
-
private _isOnlySeriesSpecsChanged;
|
|
135
|
-
private _canSkipChartDataStages;
|
|
136
|
-
private _removeMarkerComponentsForEmptySpecs;
|
|
137
|
-
private _removeComponent;
|
|
131
|
+
updateComponentSpec(result: IUpdateSpecResult): void;
|
|
138
132
|
updateSeriesSpec(result: IUpdateSpecResult): void;
|
|
139
133
|
getCanvas(): HTMLCanvasElement;
|
|
140
134
|
private _updateLayoutRect;
|
|
@@ -148,7 +142,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
148
142
|
compileRegions(): void;
|
|
149
143
|
compileSeries(): void;
|
|
150
144
|
compileComponents(): void;
|
|
151
|
-
release(
|
|
145
|
+
release(): void;
|
|
152
146
|
onLayout(): void;
|
|
153
147
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
154
148
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
@@ -112,7 +112,6 @@ 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>;
|
|
116
115
|
forEachRegionInSpec: <K>(spec: any, callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo) => K[];
|
|
117
116
|
forEachSeriesInSpec: <K>(spec: any, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo) => K[];
|
|
118
117
|
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 {
|
|
4
|
+
import type { 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,9 +13,6 @@ 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;
|
|
19
16
|
export declare function mergeUpdateResult(target: IUpdateSpecResult, ...sources: IUpdateSpecResult[]): IUpdateSpecResult;
|
|
20
17
|
export declare function getTrimPaddingConfig(chartType: string, spec: IChartSpec): {
|
|
21
18
|
paddingInner: number;
|
|
@@ -20,8 +20,6 @@ export declare class Compiler implements ICompiler {
|
|
|
20
20
|
private _progressiveRafId?;
|
|
21
21
|
protected _rootMarks: IMark[];
|
|
22
22
|
protected _stage: IStage;
|
|
23
|
-
private _isExternalStage;
|
|
24
|
-
private _releaseVRenderAppRef?;
|
|
25
23
|
protected _stateAnimationConfig: Partial<MarkAnimationSpec>;
|
|
26
24
|
get stateAnimationConfig(): Partial<MarkAnimationSpec>;
|
|
27
25
|
protected _rootGroup: IGroup;
|
|
@@ -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(
|
|
16
|
+
removeProduct(): 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(
|
|
14
|
+
abstract removeProduct(): 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: (
|
|
88
|
+
removeProduct: () => void;
|
|
89
89
|
setTransform: (transform: ITransformSpec[]) => void;
|
|
90
90
|
}
|
|
91
91
|
export type GrammarItemInitOption = ICompilableInitOption;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IColor, IStageParams, IStage, ILayer, IOption3D, ITicker } from '@visactor/vrender-core';
|
|
2
2
|
import type { IPerformanceHook, RenderMode } from '../../typings/spec/common';
|
|
3
3
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
4
4
|
import type { StringOrNumber } from '../../typings';
|
|
@@ -42,7 +42,6 @@ export interface IRenderOption {
|
|
|
42
42
|
viewBox?: IBoundsLike;
|
|
43
43
|
canvasControled?: boolean;
|
|
44
44
|
stage?: IStage;
|
|
45
|
-
app?: IApp;
|
|
46
45
|
layer?: ILayer;
|
|
47
46
|
beforeRender?: IStageParams['beforeRender'];
|
|
48
47
|
afterRender?: IStageParams['afterRender'];
|
|
@@ -82,8 +82,13 @@ 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
|
-
|
|
85
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
86
|
+
change: boolean;
|
|
87
|
+
reMake: boolean;
|
|
88
|
+
reRender: boolean;
|
|
89
|
+
reSize: boolean;
|
|
90
|
+
reCompile: boolean;
|
|
91
|
+
};
|
|
87
92
|
protected _getAxisAttributes(): any;
|
|
88
93
|
protected _getGridAttributes(): {
|
|
89
94
|
alternateColor: any;
|
|
@@ -43,7 +43,13 @@ export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICarte
|
|
|
43
43
|
maxBandSize: number;
|
|
44
44
|
minBandSize: number;
|
|
45
45
|
};
|
|
46
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
46
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
47
|
+
change: boolean;
|
|
48
|
+
reMake: boolean;
|
|
49
|
+
reRender: boolean;
|
|
50
|
+
reSize: boolean;
|
|
51
|
+
reCompile: boolean;
|
|
52
|
+
};
|
|
47
53
|
reInit(spec?: T): void;
|
|
48
54
|
}
|
|
49
55
|
export declare const registerCartesianBandAxis: () => void;
|
|
@@ -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;
|
|
24
22
|
created(): void;
|
|
25
23
|
initLayout(): void;
|
|
26
24
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
27
25
|
getVRenderComponents(): IGraphic<Partial<IGraphicAttribute>>[];
|
|
28
26
|
protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
|
|
29
27
|
protected getContainer(): IGroup;
|
|
30
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
31
|
-
|
|
28
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
29
|
+
change: boolean;
|
|
30
|
+
reMake: boolean;
|
|
31
|
+
reRender: boolean;
|
|
32
|
+
reSize: boolean;
|
|
33
|
+
reCompile: boolean;
|
|
34
|
+
};
|
|
32
35
|
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;
|
|
@@ -48,7 +48,6 @@ 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;
|
|
52
51
|
private _initNeedOperatedItem;
|
|
53
52
|
created(): void;
|
|
54
53
|
protected _bindRegions(): void;
|
|
@@ -56,7 +55,13 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
56
55
|
private _initRegionAxisMap;
|
|
57
56
|
private _initAxisDataZoomMap;
|
|
58
57
|
protected initEvent(): void;
|
|
59
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
58
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
59
|
+
change: boolean;
|
|
60
|
+
reMake: boolean;
|
|
61
|
+
reRender: boolean;
|
|
62
|
+
reSize: boolean;
|
|
63
|
+
reCompile: boolean;
|
|
64
|
+
};
|
|
60
65
|
onLayoutEnd(): void;
|
|
61
66
|
protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
|
|
62
67
|
protected _shouldEnableInteractive(): boolean;
|
|
@@ -41,7 +41,13 @@ 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):
|
|
44
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
45
|
+
change: boolean;
|
|
46
|
+
reMake: boolean;
|
|
47
|
+
reRender: boolean;
|
|
48
|
+
reSize: boolean;
|
|
49
|
+
reCompile: boolean;
|
|
50
|
+
};
|
|
45
51
|
protected _initEvent(): void;
|
|
46
52
|
private _registerEvent;
|
|
47
53
|
private _eventOff;
|
|
@@ -18,7 +18,13 @@ 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>):
|
|
21
|
+
_compareSpec(spec: ICustomMarkSpec<EnableMarkType>, prevSpec: ICustomMarkSpec<EnableMarkType>): {
|
|
22
|
+
change: boolean;
|
|
23
|
+
reMake: boolean;
|
|
24
|
+
reRender: boolean;
|
|
25
|
+
reSize: boolean;
|
|
26
|
+
reCompile: boolean;
|
|
27
|
+
};
|
|
22
28
|
private _getMarkAttributeContext;
|
|
23
29
|
private _getLayoutRect;
|
|
24
30
|
getBoundsInRect(rect: ILayoutRect): {
|
|
@@ -76,7 +76,13 @@ 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'>):
|
|
79
|
+
_compareSpec(spec: AdaptiveSpec<T, 'width' | 'height'>, prevSpec: AdaptiveSpec<T, 'width' | 'height'>): {
|
|
80
|
+
change: boolean;
|
|
81
|
+
reMake: boolean;
|
|
82
|
+
reRender: boolean;
|
|
83
|
+
reSize: boolean;
|
|
84
|
+
reCompile: boolean;
|
|
85
|
+
};
|
|
80
86
|
reInit(spec?: AdaptiveSpec<T, 'width' | 'height'>): void;
|
|
81
87
|
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
82
88
|
updateLayoutAttribute(): void;
|
|
@@ -52,7 +52,13 @@ 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):
|
|
55
|
+
_compareSpec(spec: IGeoRegionSpec, prevSpec: IGeoRegionSpec): {
|
|
56
|
+
change: boolean;
|
|
57
|
+
reMake: boolean;
|
|
58
|
+
reRender: boolean;
|
|
59
|
+
reSize: boolean;
|
|
60
|
+
reCompile: boolean;
|
|
61
|
+
};
|
|
56
62
|
release(): void;
|
|
57
63
|
}
|
|
58
64
|
export declare const registerGeoCoordinate: () => void;
|
|
@@ -22,7 +22,13 @@ 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):
|
|
25
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
26
|
+
change: boolean;
|
|
27
|
+
reMake: boolean;
|
|
28
|
+
reRender: boolean;
|
|
29
|
+
reSize: boolean;
|
|
30
|
+
reCompile: boolean;
|
|
31
|
+
};
|
|
26
32
|
_getDataLabelType(baseMark: ICompilableMark, type?: string): string;
|
|
27
33
|
_setTransformOfComponent(labelComponent: IComponentMark, baseMark: IMark | IMark[]): void;
|
|
28
34
|
getVRenderComponents(): any[];
|
|
@@ -31,8 +31,13 @@ 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
|
-
|
|
34
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
35
|
+
change: boolean;
|
|
36
|
+
reMake: boolean;
|
|
37
|
+
reRender: boolean;
|
|
38
|
+
reSize: boolean;
|
|
39
|
+
reCompile: boolean;
|
|
40
|
+
};
|
|
36
41
|
protected abstract _initLegendData(): DataView;
|
|
37
42
|
protected abstract _initSelectedData(): void;
|
|
38
43
|
protected abstract _getLegendAttributes(rect: ILayoutRect): any;
|
|
@@ -19,8 +19,6 @@ 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;
|
|
24
22
|
protected _markerComponent: any;
|
|
25
23
|
protected _layoutOffsetX: number;
|
|
26
24
|
protected _layoutOffsetY: number;
|
|
@@ -51,18 +49,20 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
51
49
|
};
|
|
52
50
|
protected _processSpecCoo(spec: any): IOptionWithCoordinates;
|
|
53
51
|
protected _getRelativeDataView(): DataView;
|
|
54
|
-
protected _setMarkerData(data: DataView, owned?: boolean): void;
|
|
55
|
-
protected _bindMarkerDataChange(): void;
|
|
56
|
-
private _releaseMarkerData;
|
|
57
52
|
updateLayoutAttribute(): void;
|
|
58
53
|
private _getSeriesByIdOrIndex;
|
|
59
54
|
protected _bindSeries(): void;
|
|
60
55
|
protected initEvent(): void;
|
|
61
56
|
clear(): void;
|
|
62
|
-
release(): void;
|
|
63
57
|
private _getFirstSeries;
|
|
64
58
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
65
59
|
onLayoutStart(layoutRect: IRect, chartViewRect: ILayoutRect): void;
|
|
66
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
60
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
61
|
+
change: boolean;
|
|
62
|
+
reMake: boolean;
|
|
63
|
+
reRender: boolean;
|
|
64
|
+
reSize: boolean;
|
|
65
|
+
reCompile: boolean;
|
|
66
|
+
};
|
|
67
67
|
_initCommonDataView(): void;
|
|
68
68
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { DataView } from '@visactor/vdataset';
|
|
1
2
|
import type { IComponent } from '../../../interface';
|
|
2
|
-
import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint, MarkerStateValue, MarkerStateCallback, IMarkerSupportSeries } from '../../interface';
|
|
3
|
+
import type { IAggrType, IMarkerAttributeContext, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint, MarkerStateValue, MarkerStateCallback, IMarkerSupportSeries } from '../../interface';
|
|
3
4
|
import type { IRegressType } from '../../mark-area/interface';
|
|
4
5
|
import type { IMarkLineTheme } from './theme';
|
|
5
6
|
import type { Datum, ILineMarkSpec, IPoint } from '../../../../typings';
|
|
6
7
|
import type { BaseMarkerAnimation, MarkCommonLineAnimationType } from '@visactor/vrender-components';
|
|
8
|
+
import type { IRegion } from '../../../../region/interface';
|
|
7
9
|
export type IMarkLine = IComponent;
|
|
8
10
|
export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineXYSpec | IMarkLineXYY1Spec | IMarkLineYXX1Spec | IMarkLineAngleSpec | IMarkLineRadiusSpec | IMarkLineAngRadRad1Spec | IMarkLineRadAngAng1Spec | IMarkLineAngRadSpec | IMarkLineCoordinateSpec | IMarkerPositionsSpec) & IMarkLineTheme & BaseMarkerAnimation<MarkCommonLineAnimationType>) | (IStepMarkLineSpec & BaseMarkerAnimation<MarkCommonLineAnimationType>);
|
|
9
11
|
export interface IMarkLineXSpec extends IMarkerCrossSeriesSpec {
|
|
@@ -64,7 +66,12 @@ export type IMarkLineCoordinateSpec = {
|
|
|
64
66
|
export type IStepMarkLineSpec = IMarkerSpec & {
|
|
65
67
|
type: 'type-step';
|
|
66
68
|
connectDirection: 'top' | 'bottom' | 'left' | 'right';
|
|
67
|
-
expandDistance?: number | string
|
|
69
|
+
expandDistance?: number | string | ((markerData: DataView, context: IMarkerAttributeContext & {
|
|
70
|
+
region: IRegion;
|
|
71
|
+
startRegion: IRegion;
|
|
72
|
+
endRegion: IRegion;
|
|
73
|
+
coordinatePoints: IPoint[];
|
|
74
|
+
}) => number | string);
|
|
68
75
|
label?: IMarkerLabelSpec;
|
|
69
76
|
line?: {
|
|
70
77
|
multiSegment?: boolean;
|
|
@@ -24,7 +24,13 @@ 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):
|
|
27
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
28
|
+
change: boolean;
|
|
29
|
+
reMake: boolean;
|
|
30
|
+
reRender: boolean;
|
|
31
|
+
reSize: boolean;
|
|
32
|
+
reCompile: boolean;
|
|
33
|
+
};
|
|
28
34
|
afterSetLayoutStartPoint(pos: IPoint): void;
|
|
29
35
|
getBoundsInRect(rect: ILayoutRect): {
|
|
30
36
|
x1: number;
|
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 {
|
|
11
|
+
import type { 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,7 +78,6 @@ export declare class VChart implements IVChart {
|
|
|
78
78
|
private _onError?;
|
|
79
79
|
private _context;
|
|
80
80
|
private _isReleased;
|
|
81
|
-
private _exitingVRenderComponents?;
|
|
82
81
|
private _chartPlugin?;
|
|
83
82
|
private _vChartPlugin?;
|
|
84
83
|
private _onResize?;
|
|
@@ -111,9 +110,6 @@ export declare class VChart implements IVChart {
|
|
|
111
110
|
protected _renderAsync(option?: IVChartRenderOption): Promise<IVChart>;
|
|
112
111
|
private _updateAnimateState;
|
|
113
112
|
release(): void;
|
|
114
|
-
_registerExitingVRenderComponent(component: IGraphic): void;
|
|
115
|
-
_unregisterExitingVRenderComponent(component: IGraphic): void;
|
|
116
|
-
private _forceReleaseExitingVRenderComponents;
|
|
117
113
|
updateData(id: StringOrNumber, data: DataView | Datum[] | string, parserOptions?: IParserOptions, userUpdateOptions?: IUpdateDataResult): Promise<IVChart>;
|
|
118
114
|
private _updateDataById;
|
|
119
115
|
updateDataInBatches(list: {
|
|
@@ -5,7 +5,7 @@ import { MarkTypeEnum } from '../interface';
|
|
|
5
5
|
import type { IMarkRaw, IMarkStateStyle, IMarkStyle, IMark, IMarkOption, StyleConvert, MarkInputStyle, GroupedData, IAttrs, IMarkGraphic, ProgressiveContext, IProgressiveTransformResult, MarkType, AnimationStateValues } from '../interface';
|
|
6
6
|
import type { ICompilableMark, IMarkCompileOption, IMarkConfig, IMarkStateManager, StateValueType } from '../../compile/mark/interface';
|
|
7
7
|
import type { ICompilableInitOption } from '../../compile/interface';
|
|
8
|
-
import type { IGroupGraphicAttribute, IGroup, IGraphic
|
|
8
|
+
import type { IGroupGraphicAttribute, IGroup, IGraphic } from '@visactor/vrender-core';
|
|
9
9
|
import { GrammarItem } from '../../compile/grammar-item';
|
|
10
10
|
import type { IModel } from '../../model/interface';
|
|
11
11
|
import type { ICompilableData } from '../../compile/data/interface';
|
|
@@ -74,7 +74,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
74
74
|
stopAnimationByState(state?: string): void;
|
|
75
75
|
pauseAnimationByState(state?: string): void;
|
|
76
76
|
resumeAnimationByState(state?: string): void;
|
|
77
|
-
removeProduct(
|
|
77
|
+
removeProduct(): void;
|
|
78
78
|
release(): void;
|
|
79
79
|
protected _simpleStyle: T;
|
|
80
80
|
setSimpleStyle(s: T): void;
|
|
@@ -82,11 +82,6 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
82
82
|
protected _option: IMarkOption;
|
|
83
83
|
protected _attributeContext: IModelMarkAttributeContext;
|
|
84
84
|
protected _encoderOfState: Record<string, Record<string, (datum: Datum) => any>>;
|
|
85
|
-
protected _sharedStateDefinitionsCacheKey?: string;
|
|
86
|
-
protected _sharedStateDefinitionsCache?: StateDefinitionsInput<Record<string, unknown>>;
|
|
87
|
-
protected _sharedStateDefinitionRefIds: WeakMap<object, number>;
|
|
88
|
-
protected _sharedStateDefinitionRefId: number;
|
|
89
|
-
protected _dynamicSharedStateNames: Set<string>;
|
|
90
85
|
_extensionChannel: {
|
|
91
86
|
[key: string | number | symbol]: string[];
|
|
92
87
|
};
|
|
@@ -160,14 +155,8 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
160
155
|
protected _getEncoderOfStyle: (stateName: string, style: Partial<IAttrs<T>>) => Record<string, (datum: Datum) => any>;
|
|
161
156
|
protected _setGraphicFromMarkConfig: (g: IMarkGraphic) => void;
|
|
162
157
|
protected _setStateOfGraphic: (g: IMarkGraphic, hasAnimation?: boolean) => void;
|
|
163
|
-
protected _getSharedStateDefinitionRefId(value: unknown): string;
|
|
164
|
-
protected _getSharedStateDefinitionValueKey(value: unknown): string;
|
|
165
|
-
protected _isStaticSharedStateAttribute(stateName: string, key: string): boolean;
|
|
166
|
-
protected _applySharedStateDefinitions(): void;
|
|
167
158
|
protected _addProgressiveGraphic(parent: IGroup, g: IMarkGraphic): void;
|
|
168
159
|
protected _runEncoder(graphics: IMarkGraphic[], noGroupEncode?: boolean): void;
|
|
169
|
-
protected _excludeStateControlledDiffAttrs(g: IMarkGraphic, diffAttrs: Record<string, any>): Record<string, any>;
|
|
170
|
-
protected _hasDiffAttrs(g: IMarkGraphic): boolean;
|
|
171
160
|
protected _runApplyGraphic(graphics: IMarkGraphic[]): void;
|
|
172
161
|
protected _updateEncoderByState(): void;
|
|
173
162
|
protected _runState(graphics: IMarkGraphic[]): void;
|
|
@@ -8,20 +8,11 @@ export declare class ComponentMark extends BaseMark<ICommonSpec> implements ICom
|
|
|
8
8
|
type: string;
|
|
9
9
|
private _componentType;
|
|
10
10
|
private _component;
|
|
11
|
-
private _exitingComponent?;
|
|
12
|
-
private _exitingProduct?;
|
|
13
11
|
private _mode;
|
|
14
12
|
constructor(name: string, option: IMarkOption);
|
|
15
13
|
protected _getDefaultStyle(): IMarkStyle<ICommonSpec>;
|
|
16
14
|
getComponent(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
|
|
17
|
-
private _clearExitingComponent;
|
|
18
|
-
private _removeProductAfterExit;
|
|
19
|
-
private _registerExitingComponent;
|
|
20
|
-
private _unregisterExitingComponent;
|
|
21
|
-
private _releaseComponentWithExitAnimation;
|
|
22
15
|
clearComponent(): void;
|
|
23
|
-
releaseWithExitAnimation(): boolean;
|
|
24
|
-
forceReleaseExitAnimation(): void;
|
|
25
16
|
protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
|
|
26
17
|
protected _attributesTransform: (attrs: any) => any;
|
|
27
18
|
setAttributeTransform(t: (attrs: any) => any): void;
|
|
@@ -6,8 +6,6 @@ import type { MarkType } from './type';
|
|
|
6
6
|
export interface IComponentMark extends IMarkRaw<ICommonSpec> {
|
|
7
7
|
getComponent: () => IGraphic;
|
|
8
8
|
clearComponent: () => void;
|
|
9
|
-
releaseWithExitAnimation: () => boolean;
|
|
10
|
-
forceReleaseExitAnimation: () => void;
|
|
11
9
|
setAttributeTransform: (t: (attrs: any) => any) => any;
|
|
12
10
|
}
|
|
13
11
|
export interface IGlyphMark<T extends ICommonSpec = ICommonSpec, C = any> extends IMarkRaw<T> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IEvent } from '../event/interface';
|
|
2
|
-
import type { IEffect, IModel, IModelInitOption, IModelOption, IModelEvaluateOption, IModelSpec, IModelMarkInfo, IModelSpecInfo
|
|
2
|
+
import type { IEffect, IModel, IModelInitOption, IModelOption, IModelEvaluateOption, IModelSpec, IModelMarkInfo, IModelSpecInfo } from './interface';
|
|
3
3
|
import type { CoordinateType } from '../typings/coordinate';
|
|
4
4
|
import type { AnimationStateValues, ICompileMarkConfig, IMark, IMarkGraphic, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
|
|
5
5
|
import type { Datum, StateValueType, ConvertToMarkStyleSpec, ICommonSpec, StringOrNumber, IRect, ILayoutRect } from '../typings';
|
|
@@ -50,8 +50,20 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
|
|
|
50
50
|
beforeRelease(): void;
|
|
51
51
|
clear(): void;
|
|
52
52
|
release(): void;
|
|
53
|
-
updateSpec(spec: T):
|
|
54
|
-
|
|
53
|
+
updateSpec(spec: T): {
|
|
54
|
+
change: boolean;
|
|
55
|
+
reMake: boolean;
|
|
56
|
+
reRender: boolean;
|
|
57
|
+
reSize: boolean;
|
|
58
|
+
reCompile: boolean;
|
|
59
|
+
};
|
|
60
|
+
protected _compareSpec(spec: T, prevSpec: T): {
|
|
61
|
+
change: boolean;
|
|
62
|
+
reMake: boolean;
|
|
63
|
+
reRender: boolean;
|
|
64
|
+
reSize: boolean;
|
|
65
|
+
reCompile: boolean;
|
|
66
|
+
};
|
|
55
67
|
reInit(spec?: T): void;
|
|
56
68
|
updateLayoutAttribute(): void;
|
|
57
69
|
setAttrFromSpec(): void;
|
|
@@ -33,18 +33,6 @@ export interface IModelRenderOption {
|
|
|
33
33
|
export interface IEffect {
|
|
34
34
|
[key: string]: (e?: any) => any;
|
|
35
35
|
}
|
|
36
|
-
export interface IUpdateSpecEffects {
|
|
37
|
-
remake?: boolean;
|
|
38
|
-
compile?: boolean;
|
|
39
|
-
render?: boolean;
|
|
40
|
-
layout?: boolean;
|
|
41
|
-
data?: boolean;
|
|
42
|
-
scaleDomain?: boolean;
|
|
43
|
-
series?: boolean;
|
|
44
|
-
component?: boolean;
|
|
45
|
-
animation?: boolean;
|
|
46
|
-
localOnly?: boolean;
|
|
47
|
-
}
|
|
48
36
|
export interface IMarkTreeGroup extends Partial<IMarkStyle<IGroupMarkSpec>> {
|
|
49
37
|
type: 'group';
|
|
50
38
|
name: string;
|
|
@@ -58,7 +46,6 @@ export interface IUpdateSpecResult {
|
|
|
58
46
|
reSize?: boolean;
|
|
59
47
|
reCompile?: boolean;
|
|
60
48
|
reTransformSpec?: boolean;
|
|
61
|
-
effects?: IUpdateSpecEffects;
|
|
62
49
|
reAnimate?: boolean;
|
|
63
50
|
changeTheme?: boolean;
|
|
64
51
|
changeBackground?: boolean;
|
package/types/region/region.d.ts
CHANGED
|
@@ -39,7 +39,13 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
39
39
|
initMark(): void;
|
|
40
40
|
protected _initBackgroundMarkStyle(): void;
|
|
41
41
|
protected _initForegroundMarkStyle(): void;
|
|
42
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
42
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
43
|
+
change: boolean;
|
|
44
|
+
reMake: boolean;
|
|
45
|
+
reRender: boolean;
|
|
46
|
+
reSize: boolean;
|
|
47
|
+
reCompile: boolean;
|
|
48
|
+
};
|
|
43
49
|
reInit(spec?: T): void;
|
|
44
50
|
addSeries(s: ISeries): void;
|
|
45
51
|
removeSeries(s: ISeries): void;
|
|
@@ -7,7 +7,6 @@ import { SeriesTypeEnum } from '../interface/type';
|
|
|
7
7
|
import type { IAreaSeriesSpec, IAreaSeriesTheme } from './interface';
|
|
8
8
|
import type { IMark, IAreaMark } from '../../mark/interface';
|
|
9
9
|
import { AreaSeriesSpecTransformer } from './area-transformer';
|
|
10
|
-
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
11
10
|
export interface AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends Pick<LineLikeSeriesMixin, 'initLineMark' | 'initSymbolMark' | 'initLabelMarkStyle' | 'initLineMarkStyle' | 'initSymbolMarkStyle' | 'encodeDefined' | '_lineMark' | '_symbolMark' | 'addSamplingCompile' | 'addOverlapCompile' | 'reCompileSampling' | 'initLineLabelMarkStyle'>, CartesianSeries<T> {
|
|
12
11
|
}
|
|
13
12
|
export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends CartesianSeries<T> {
|
|
@@ -19,7 +18,6 @@ export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> ext
|
|
|
19
18
|
readonly transformerConstructor: typeof AreaSeriesSpecTransformer;
|
|
20
19
|
protected _areaMark: IAreaMark;
|
|
21
20
|
protected _sortDataByAxis: boolean;
|
|
22
|
-
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
23
21
|
initMark(): void;
|
|
24
22
|
initMarkStyle(): void;
|
|
25
23
|
initAreaMarkStyle(): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { IBaseScale } from '@visactor/vscale';
|
|
2
2
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
3
|
-
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
4
3
|
import type { IMark, IRectMark, ITextMark } from '../../mark/interface';
|
|
5
4
|
import type { Datum, DirectionType } from '../../typings';
|
|
6
5
|
import type { IBarSeriesSpec, IBarSeriesTheme } from './interface';
|
|
@@ -25,11 +24,9 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
|
|
|
25
24
|
protected _barMark: IRectMark;
|
|
26
25
|
protected _barBackgroundMark: IRectMark;
|
|
27
26
|
protected _barBackgroundViewData: ICompilableData;
|
|
28
|
-
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
29
27
|
initMark(): void;
|
|
30
28
|
protected _initBarBackgroundMark(): void;
|
|
31
29
|
initMarkStyle(): void;
|
|
32
|
-
protected initRectMarkStyle(): void;
|
|
33
30
|
initLabelMarkStyle(textMark: ITextMark): void;
|
|
34
31
|
protected initTooltip(): void;
|
|
35
32
|
protected _statisticViewData(): void;
|