@visactor/vchart-types 2.0.0-alpha.2 → 2.0.0-alpha.4
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 +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/utils.d.ts +2 -2
- package/types/chart/base/base-chart.d.ts +1 -2
- package/types/chart/interface/chart.d.ts +1 -2
- package/types/component/axis/base-axis.d.ts +0 -1
- package/types/component/axis/cartesian/axis.d.ts +0 -5
- package/types/component/axis/polar/axis.d.ts +0 -2
- package/types/component/base/base-component.d.ts +1 -3
- package/types/component/brush/brush.d.ts +1 -3
- package/types/component/crosshair/base.d.ts +0 -4
- package/types/component/custom-mark/custom-mark.d.ts +0 -6
- package/types/component/data-zoom/data-filter-base-component.d.ts +0 -4
- package/types/component/data-zoom/util.d.ts +1 -0
- package/types/component/geo/geo-coordinate.d.ts +2 -6
- package/types/component/indicator/indicator.d.ts +0 -3
- package/types/component/interface/common.d.ts +0 -1
- package/types/component/label/base-label.d.ts +2 -6
- package/types/component/label/label.d.ts +0 -1
- package/types/component/label/total-label.d.ts +0 -1
- package/types/component/legend/base-legend.d.ts +0 -3
- package/types/component/marker/base-marker.d.ts +1 -4
- package/types/component/player/player.d.ts +0 -4
- package/types/component/title/title.d.ts +0 -5
- package/types/component/tooltip/tooltip.d.ts +0 -6
- package/types/mark/base/base-mark.d.ts +2 -1
- package/types/mark/component.d.ts +0 -1
- package/types/mark/group.d.ts +1 -1
- package/types/mark/interface/common.d.ts +2 -0
- package/types/mark/interface/mark.d.ts +0 -1
- package/types/model/base-model.d.ts +1 -2
- package/types/model/interface.d.ts +0 -1
- package/types/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
- package/types/region/region.d.ts +0 -1
- package/types/series/base/base-series.d.ts +1 -2
- package/types/series/mosaic/interface.d.ts +1 -0
- package/types/series/mosaic/mosaic.d.ts +2 -0
- package/types/typings/tooltip/handler.d.ts +1 -0
|
@@ -9,9 +9,9 @@ export declare function animationConfig<Preset extends string>(defaultConfig?: M
|
|
|
9
9
|
dataIndex: (datum: any, params: any) => number;
|
|
10
10
|
dataCount: () => number;
|
|
11
11
|
}): MarkAnimationSpec;
|
|
12
|
-
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "
|
|
12
|
+
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "disappear" | "enter" | "exit", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
13
13
|
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
|
|
14
14
|
export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
|
|
15
15
|
export declare function isChannelAnimation(animationConfig: IAnimationConfig): boolean;
|
|
16
|
-
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "
|
|
16
|
+
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "disappear" | "enter" | "exit", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
17
17
|
export declare function isAnimationEnabledForSeries(series: ISeries): boolean;
|
|
@@ -3,7 +3,7 @@ import { ChartData } from '../chart-meta/data';
|
|
|
3
3
|
import type { Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec, IDataValues, ILayoutRect, ILayoutOrientPadding } from '../../typings';
|
|
4
4
|
import type { ILayoutItem, LayoutCallBack } from '../../layout/interface';
|
|
5
5
|
import type { ILayoutModelState, IModel, IModelOption, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
6
|
-
import type { IChart,
|
|
6
|
+
import type { IChart, IChartOption, IChartEvaluateOption, DimensionIndexOption, IChartSpecTransformerOption, IChartSpecTransformer } from '../interface';
|
|
7
7
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
8
8
|
import type { IRegion } from '../../region/interface';
|
|
9
9
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
@@ -106,7 +106,6 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
106
106
|
getMarkByUserName(name: string): IMark[];
|
|
107
107
|
updateData(id: StringOrNumber, data: unknown, updateGlobalScale?: boolean, options?: IParserOptions): void;
|
|
108
108
|
updateFullData(data: IDataValues | IDataValues[], updateGlobalScale?: boolean): void;
|
|
109
|
-
onRender(option: IChartRenderOption): void;
|
|
110
109
|
setCanvasRect(width: number, height: number): void;
|
|
111
110
|
getCanvasRect(): Omit<IRect, 'x' | 'y'>;
|
|
112
111
|
getSeriesData(id: StringOrNumber | undefined, index: number | undefined): DataView | undefined;
|
|
@@ -6,7 +6,7 @@ import type { IMark } from '../../mark/interface';
|
|
|
6
6
|
import type { IModel, IModelConstructor, IModelOption, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
7
7
|
import type { IRegion, IRegionConstructor } from '../../region/interface';
|
|
8
8
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
9
|
-
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption,
|
|
9
|
+
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartSpecInfo, IChartSpecTransformerOption } from './common';
|
|
10
10
|
import type { IBoundsLike, IPadding, Maybe } from '@visactor/vutils';
|
|
11
11
|
import type { ICompilable } from '../../compile/interface';
|
|
12
12
|
import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber, IShowTooltipOption, IDataValues, ILayoutRect, IData } from '../../typings';
|
|
@@ -53,7 +53,6 @@ export interface IChart extends ICompilable {
|
|
|
53
53
|
onLayoutStart: (ctx: IChartLayoutOption) => void;
|
|
54
54
|
onLayoutEnd: (ctx: IChartLayoutOption) => void;
|
|
55
55
|
onEvaluateEnd: (ctx: IChartEvaluateOption) => void;
|
|
56
|
-
onRender: (ctx: IChartRenderOption) => void;
|
|
57
56
|
onResize: (width: number, height: number, reRender: boolean) => void;
|
|
58
57
|
onLayout: () => void;
|
|
59
58
|
reInit: () => void;
|
|
@@ -51,7 +51,6 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
51
51
|
protected _coordinateType: CoordinateType;
|
|
52
52
|
getCoordinateType(): CoordinateType;
|
|
53
53
|
constructor(spec: T, options: IComponentOption);
|
|
54
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
55
54
|
getVRenderComponents(): import("@visactor/vrender-core").IGroup[];
|
|
56
55
|
created(): void;
|
|
57
56
|
protected _shouldComputeTickData(): boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type IBoundsLike, type Maybe } from '@visactor/vutils';
|
|
2
2
|
import type { IEffect, IModelInitOption, IModelSpecInfo } from '../../../model/interface';
|
|
3
3
|
import type { ICartesianSeries } from '../../../series/interface';
|
|
4
|
-
import type { IRegion } from '../../../region/interface';
|
|
5
4
|
import type { ICartesianAxisCommonSpec, IAxisHelper } from './interface';
|
|
6
5
|
import type { IOrientType, IPadding, IRect } from '../../../typings/space';
|
|
7
6
|
import type { IBaseScale } from '@visactor/vscale';
|
|
@@ -73,10 +72,6 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
73
72
|
protected _tickTransformOption(): ICartesianTickDataOpt;
|
|
74
73
|
protected axisHelper(): IAxisHelper;
|
|
75
74
|
afterCompile(): void;
|
|
76
|
-
onRender(ctx: any): void;
|
|
77
|
-
changeRegions(regions: IRegion[]): void;
|
|
78
|
-
update(ctx: IComponentOption): void;
|
|
79
|
-
resize(ctx: IComponentOption): void;
|
|
80
75
|
protected collectScale(): IBaseScale[];
|
|
81
76
|
protected collectSeriesField(depth: number, series: ICartesianSeries): string | string[];
|
|
82
77
|
protected updateSeriesScale(): void;
|
|
@@ -45,8 +45,6 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
45
45
|
effect: IEffect;
|
|
46
46
|
setAttrFromSpec(): void;
|
|
47
47
|
_transformLayoutPosition: (pos: Partial<IPoint>) => Partial<IPoint>;
|
|
48
|
-
onRender(ctx: any): void;
|
|
49
|
-
changeRegions(): void;
|
|
50
48
|
protected _tickTransformOption(): IPolarTickDataOpt;
|
|
51
49
|
protected updateScaleRange(): boolean;
|
|
52
50
|
protected collectSeriesField(depth: number, series: IPolarSeries): string | string[];
|
|
@@ -7,7 +7,7 @@ import type { Datum, ILayoutRect } from '../../typings';
|
|
|
7
7
|
import type { IComponentSpec } from './interface';
|
|
8
8
|
import { LayoutModel } from '../../model/layout-model';
|
|
9
9
|
import { BaseComponentSpecTransformer } from './base-component-transformer';
|
|
10
|
-
import type {
|
|
10
|
+
import type { IModelSpecInfo } from '../../model/interface';
|
|
11
11
|
export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> extends LayoutModel<T> implements IComponent {
|
|
12
12
|
static transformerConstructor: typeof BaseComponentSpecTransformer;
|
|
13
13
|
name: string;
|
|
@@ -21,9 +21,7 @@ export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> ex
|
|
|
21
21
|
protected _container: IGroup;
|
|
22
22
|
created(): void;
|
|
23
23
|
initLayout(): void;
|
|
24
|
-
changeRegions(regions: IRegion[]): void;
|
|
25
24
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
26
|
-
onRender(ctx: IModelRenderOption): void;
|
|
27
25
|
getVRenderComponents(): IGraphic<Partial<IGraphicAttribute>>[];
|
|
28
26
|
protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
|
|
29
27
|
protected getContainer(): IGroup;
|
|
@@ -2,7 +2,7 @@ import { BaseComponent } from '../base/base-component';
|
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import { Brush as BrushComponent } from '@visactor/vrender-components';
|
|
4
4
|
import type { Maybe } from '@visactor/vutils';
|
|
5
|
-
import type {
|
|
5
|
+
import type { 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';
|
|
@@ -55,8 +55,6 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
55
55
|
private _initRegionAxisMap;
|
|
56
56
|
private _initAxisDataZoomMap;
|
|
57
57
|
protected initEvent(): void;
|
|
58
|
-
onRender(ctx: IModelRenderOption): void;
|
|
59
|
-
changeRegions(regions: IRegion[]): void;
|
|
60
58
|
_compareSpec(spec: T, prevSpec: T): {
|
|
61
59
|
change: boolean;
|
|
62
60
|
reMake: boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
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 { IModelRenderOption } from '../../model/interface';
|
|
5
|
-
import type { IRegion } from '../../region/interface';
|
|
6
4
|
import { BaseComponent } from '../base/base-component';
|
|
7
5
|
import type { IPoint, StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
8
6
|
import type { IComponentOption } from '../interface';
|
|
@@ -67,9 +65,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
67
65
|
private _handleTooltipShow;
|
|
68
66
|
private _handleTooltipHideOrRelease;
|
|
69
67
|
protected _getAxisInfoByField<T = IAxis>(field: 'x' | 'y' | 'category' | 'value'): IAxisInfo<T>;
|
|
70
|
-
changeRegions(regions: IRegion[]): void;
|
|
71
68
|
onLayoutEnd(): void;
|
|
72
|
-
onRender(ctx: IModelRenderOption): void;
|
|
73
69
|
protected _releaseEvent(): void;
|
|
74
70
|
protected _parseFieldInfo(): void;
|
|
75
71
|
protected _parseCrosshairSpec(): void;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
|
-
import type { IRegion } from '../../region/interface';
|
|
4
|
-
import type { IModelRenderOption } from '../../model/interface';
|
|
5
3
|
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec, ILayoutRect } from '../../typings';
|
|
6
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
4
|
import type { IModelMarkAttributeContext } from '../../compile/mark/interface';
|
|
8
5
|
export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMarkType>> {
|
|
9
6
|
static type: ComponentTypeEnum;
|
|
@@ -28,9 +25,6 @@ export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMark
|
|
|
28
25
|
reSize: boolean;
|
|
29
26
|
reCompile: boolean;
|
|
30
27
|
};
|
|
31
|
-
changeRegions(regions: IRegion[]): void;
|
|
32
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
33
|
-
onRender(ctx: IModelRenderOption): void;
|
|
34
28
|
private _getMarkAttributeContext;
|
|
35
29
|
private _getLayoutRect;
|
|
36
30
|
getBoundsInRect(rect: ILayoutRect): {
|
|
@@ -87,7 +87,6 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
87
87
|
protected _initStateScale(): void;
|
|
88
88
|
init(option: IModelInitOption): void;
|
|
89
89
|
protected _addTransformToSeries(): void;
|
|
90
|
-
onRender(ctx: any): void;
|
|
91
90
|
_compareSpec(spec: AdaptiveSpec<T, 'width' | 'height'>, prevSpec: AdaptiveSpec<T, 'width' | 'height'>): {
|
|
92
91
|
change: boolean;
|
|
93
92
|
reMake: boolean;
|
|
@@ -96,9 +95,6 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
96
95
|
reCompile: boolean;
|
|
97
96
|
};
|
|
98
97
|
reInit(spec?: AdaptiveSpec<T, 'width' | 'height'>): void;
|
|
99
|
-
changeRegions(): void;
|
|
100
|
-
protected update(ctx: IComponentOption): void;
|
|
101
|
-
protected resize(ctx: IComponentOption): void;
|
|
102
98
|
protected _parseDomainFromState(startValue: number | string, endValue: number | string): any;
|
|
103
99
|
protected _handleStateChange: (startValue: number, endValue: number, tag?: string) => boolean;
|
|
104
100
|
protected _handleChartZoom: (params: {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { IPoint } from '../../typings/coordinate';
|
|
2
2
|
import { Projection } from './projection';
|
|
3
|
-
import type { IEffect,
|
|
3
|
+
import type { IEffect, IModelSpecInfo } from '../../model/interface';
|
|
4
4
|
import { ComponentTypeEnum } from '../interface/type';
|
|
5
5
|
import { BaseComponent } from '../base/base-component';
|
|
6
|
-
import type { IGeoRegionSpec
|
|
6
|
+
import type { IGeoRegionSpec } from '../../region/interface';
|
|
7
7
|
import type { IGeoCoordinate, IGeoCoordinateSpec, IProjectionSpec } from './interface';
|
|
8
8
|
import type { StringOrNumber } from '../../typings';
|
|
9
9
|
import type { Maybe } from '@visactor/vutils';
|
|
10
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
11
10
|
export declare function projectionName(key: string, id: number): string;
|
|
12
11
|
export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> implements IGeoCoordinate {
|
|
13
12
|
static type: ComponentTypeEnum;
|
|
@@ -43,9 +42,6 @@ export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> impleme
|
|
|
43
42
|
initProjection(): void;
|
|
44
43
|
coordinateHelper(): void;
|
|
45
44
|
onLayoutEnd(): void;
|
|
46
|
-
onRender(ctx: IModelRenderOption): void;
|
|
47
|
-
changeRegions(regions: IRegion[]): void;
|
|
48
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
49
45
|
protected collectFeatures(): any[];
|
|
50
46
|
dataToPosition(values?: number[]): IPoint;
|
|
51
47
|
dataToLatitude(lat: number): number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../interface/type';
|
|
2
2
|
import { BaseComponent } from '../base/base-component';
|
|
3
|
-
import type { IRegion } from '../../region/interface';
|
|
4
3
|
import type { IIndicator, IIndicatorSpec } from './interface';
|
|
5
4
|
import type { Maybe } from '../../typings';
|
|
6
5
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
@@ -28,8 +27,6 @@ export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T
|
|
|
28
27
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
29
28
|
created(): void;
|
|
30
29
|
setAttrFromSpec(): void;
|
|
31
|
-
onRender(ctx: any): void;
|
|
32
|
-
changeRegions(regions: IRegion[]): void;
|
|
33
30
|
protected initEvent(): void;
|
|
34
31
|
updateDatum(datum: any): void;
|
|
35
32
|
private initData;
|
|
@@ -24,7 +24,6 @@ export interface IComponent extends ILayoutModel {
|
|
|
24
24
|
readonly name: string;
|
|
25
25
|
getRegions: () => IRegion[];
|
|
26
26
|
getBindSeriesFilter?: () => ISeriesFilter;
|
|
27
|
-
changeRegions: (regions: IRegion[]) => void;
|
|
28
27
|
getVRenderComponents: () => IGraphic[];
|
|
29
28
|
clear: () => void;
|
|
30
29
|
getDatum: (childGraphic?: IGraphic) => any | undefined;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
2
|
import type { IComponentOption } from '../interface';
|
|
3
3
|
import { ComponentTypeEnum } from '../interface/type';
|
|
4
|
-
import type { IRegion } from '../../region/interface';
|
|
5
|
-
import type { IModelRenderOption } from '../../model/interface';
|
|
6
4
|
import type { ILabelSpec } from './interface';
|
|
7
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
5
|
import type { IComponentMark } from '../../mark/interface/mark';
|
|
9
6
|
import type { ICompilableMark } from '../../compile/mark/interface';
|
|
10
7
|
import type { IMark } from '../../mark/interface/common';
|
|
@@ -34,7 +31,6 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
34
31
|
};
|
|
35
32
|
_getDataLabelType(baseMark: ICompilableMark, type?: string): string;
|
|
36
33
|
_setTransformOfComponent(labelComponent: IComponentMark, baseMark: IMark | IMark[]): void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
34
|
+
getVRenderComponents(): any[];
|
|
35
|
+
clear(): void;
|
|
40
36
|
}
|
|
@@ -36,7 +36,6 @@ export declare class Label<T extends IChartSpec = any> extends BaseLabelComponen
|
|
|
36
36
|
protected _updateSingleLabelAttribute(labelInfo: ILabelInfo, labelComponent: IComponentMark): void;
|
|
37
37
|
protected _updateLabelComponentAttribute(labelComponent: IComponentMark, baseMark: IMark | IMark[], labelInfos: ILabelInfo[]): void;
|
|
38
38
|
compileMarks(): void;
|
|
39
|
-
getVRenderComponents(): any[];
|
|
40
39
|
getLabelInfoByTextGraphic(text: IGraphic): ILabelInfo;
|
|
41
40
|
}
|
|
42
41
|
export declare const registerLabel: () => void;
|
|
@@ -25,7 +25,6 @@ export declare class TotalLabel extends BaseLabelComponent {
|
|
|
25
25
|
protected _initLabelComponent(): void;
|
|
26
26
|
updateLayoutAttribute(): void;
|
|
27
27
|
compileMarks(): void;
|
|
28
|
-
getVRenderComponents(): any[];
|
|
29
28
|
protected _getSeries(): ISeries;
|
|
30
29
|
}
|
|
31
30
|
export declare function totalLabelPosition(series: ISeries, type: MarkType, position?: 'top' | 'bottom'): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
|
-
import type { IRegion } from '../../region/interface';
|
|
3
2
|
import { BaseComponent } from '../base/base-component';
|
|
4
3
|
import type { IEffect } from '../../model/interface';
|
|
5
4
|
import type { ILayoutRect, ILayoutType, IOrientType, IPoint, StringOrNumber } from '../../typings';
|
|
@@ -32,7 +31,6 @@ export declare abstract class BaseLegend<T extends ILegendCommonSpec> extends Ba
|
|
|
32
31
|
protected _regionUserIndex?: number[];
|
|
33
32
|
setAttrFromSpec(): void;
|
|
34
33
|
created(): void;
|
|
35
|
-
onRender(ctx: any): void;
|
|
36
34
|
_compareSpec(spec: T, prevSpec: T): {
|
|
37
35
|
change: boolean;
|
|
38
36
|
reMake: boolean;
|
|
@@ -40,7 +38,6 @@ export declare abstract class BaseLegend<T extends ILegendCommonSpec> extends Ba
|
|
|
40
38
|
reSize: boolean;
|
|
41
39
|
reCompile: boolean;
|
|
42
40
|
};
|
|
43
|
-
changeRegions(regions: IRegion[]): void;
|
|
44
41
|
protected abstract _initLegendData(): DataView;
|
|
45
42
|
protected abstract _initSelectedData(): void;
|
|
46
43
|
protected abstract _getLegendAttributes(rect: ILayoutRect): any;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DataView } from '@visactor/vdataset';
|
|
2
2
|
import type { Maybe } from '@visactor/vutils';
|
|
3
|
-
import type {
|
|
4
|
-
import type { IRegion } from '../../region/interface';
|
|
3
|
+
import type { IModelSpecInfo } from '../../model/interface';
|
|
5
4
|
import type { CoordinateType, ILayoutRect, ILayoutType, IRect } from '../../typings';
|
|
6
5
|
import { BaseComponent } from '../base/base-component';
|
|
7
6
|
import type { IDataPos, IDataPosCallback, IMarkerAttributeContext, IMarkerSpec, IMarkerSupportSeries, IMarkProcessOptions } from './interface';
|
|
@@ -54,8 +53,6 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
54
53
|
private _getSeriesByIdOrIndex;
|
|
55
54
|
protected _bindSeries(): void;
|
|
56
55
|
protected initEvent(): void;
|
|
57
|
-
onRender(ctx: IModelRenderOption): void;
|
|
58
|
-
changeRegions(regions: IRegion[]): void;
|
|
59
56
|
clear(): void;
|
|
60
57
|
private _getFirstSeries;
|
|
61
58
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
2
|
-
import type { IModelRenderOption } from '../../model/interface';
|
|
3
|
-
import type { IRegion } from '../../region/interface';
|
|
4
2
|
import type { IPlayer } from './interface';
|
|
5
3
|
import type { IComponent } from '../interface';
|
|
6
4
|
import type { IPoint, IOrientType, ILayoutRect } from '../../typings';
|
|
@@ -38,8 +36,6 @@ export declare class Player extends BaseComponent<IPlayer> implements IComponent
|
|
|
38
36
|
y1: number;
|
|
39
37
|
y2: number;
|
|
40
38
|
};
|
|
41
|
-
changeRegions(regions: IRegion[]): void;
|
|
42
|
-
onRender(ctx: IModelRenderOption): void;
|
|
43
39
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
44
40
|
private _getPlayerAttrs;
|
|
45
41
|
private _createOrUpdatePlayerComponent;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
2
|
-
import type { IRegion } from '../../region/interface';
|
|
3
2
|
import type { IPoint, IOrientType, ILayoutType, ILayoutRect } from '../../typings';
|
|
4
3
|
import { BaseComponent } from '../base/base-component';
|
|
5
4
|
import type { IComponentOption } from '../interface';
|
|
@@ -25,7 +24,6 @@ export declare class Title<T extends ITitleSpec = ITitleSpec> extends BaseCompon
|
|
|
25
24
|
constructor(spec: T, options: IComponentOption);
|
|
26
25
|
initLayout(): void;
|
|
27
26
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
28
|
-
onRender(ctx: any): void;
|
|
29
27
|
_compareSpec(spec: T, prevSpec: T): {
|
|
30
28
|
change: boolean;
|
|
31
29
|
reMake: boolean;
|
|
@@ -33,9 +31,6 @@ export declare class Title<T extends ITitleSpec = ITitleSpec> extends BaseCompon
|
|
|
33
31
|
reSize: boolean;
|
|
34
32
|
reCompile: boolean;
|
|
35
33
|
};
|
|
36
|
-
changeRegions(regions: IRegion[]): void;
|
|
37
|
-
update(ctx: IComponentOption): void;
|
|
38
|
-
resize(ctx: IComponentOption): void;
|
|
39
34
|
afterSetLayoutStartPoint(pos: IPoint): void;
|
|
40
35
|
getBoundsInRect(rect: ILayoutRect): {
|
|
41
36
|
x1: number;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../interface/type';
|
|
2
|
-
import type { IModelRenderOption } from '../../model/interface';
|
|
3
|
-
import type { IRegion } from '../../region/interface';
|
|
4
2
|
import { BaseComponent } from '../base/base-component';
|
|
5
3
|
import type { BaseEventParams, EventCallback, EventQuery, EventType } from '../../event/interface';
|
|
6
4
|
import type { ITooltipHandler, TooltipActiveType } from '../../typings/tooltip';
|
|
@@ -8,7 +6,6 @@ import type { Datum, IShowTooltipOption } from '../../typings';
|
|
|
8
6
|
import type { ITooltip, ITooltipActiveTypeAsKeys, ITooltipSpec, TooltipHandlerParams, TotalMouseEventData } from './interface';
|
|
9
7
|
import { TooltipResult } from './interface/common';
|
|
10
8
|
import type { DimensionTooltipInfo, GroupTooltipInfo, ITooltipProcessor, MarkTooltipInfo } from './processor/interface';
|
|
11
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
12
9
|
import { TooltipSpecTransformer } from './tooltip-transformer';
|
|
13
10
|
export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
14
11
|
protected layoutZIndex: number;
|
|
@@ -43,12 +40,9 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
43
40
|
protected _clickLock: boolean;
|
|
44
41
|
private _handleMouseMove;
|
|
45
42
|
isTooltipShown(): boolean;
|
|
46
|
-
changeRegions(regions: IRegion[]): void;
|
|
47
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
48
43
|
protected _registerEvent(): void;
|
|
49
44
|
protected _releaseEvent(): void;
|
|
50
45
|
onLayoutEnd(): void;
|
|
51
|
-
onRender(ctx: IModelRenderOption): void;
|
|
52
46
|
created(): void;
|
|
53
47
|
release(): void;
|
|
54
48
|
beforeRelease(): void;
|
|
@@ -112,6 +112,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
112
112
|
protected _prevDataByKey: GroupedData<Datum>;
|
|
113
113
|
protected _graphicMap: Map<string, IMarkGraphic>;
|
|
114
114
|
protected _graphics: IMarkGraphic[];
|
|
115
|
+
needClear?: boolean;
|
|
115
116
|
protected _keyGetter: (datum: Datum) => string;
|
|
116
117
|
protected _groupKeyGetter: (datum: Datum) => string;
|
|
117
118
|
protected renderContext?: {
|
|
@@ -157,7 +158,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
157
158
|
protected _updateAttrsOfGroup(): void;
|
|
158
159
|
protected _runBeforeTransform(data: Datum[]): Datum[];
|
|
159
160
|
protected _runEncoderTransform(data: Datum[], isProgressive: boolean): Datum[];
|
|
160
|
-
|
|
161
|
+
renderInner(): void;
|
|
161
162
|
render(): void;
|
|
162
163
|
updateMarkState(key: string): void;
|
|
163
164
|
clearExitGraphics(): void;
|
|
@@ -17,7 +17,6 @@ export declare class ComponentMark extends BaseMark<ICommonSpec> implements ICom
|
|
|
17
17
|
protected _attributesTransform: (attrs: any) => any;
|
|
18
18
|
setAttributeTransform(t: (attrs: any) => any): void;
|
|
19
19
|
renderInner(): void;
|
|
20
|
-
render(): void;
|
|
21
20
|
release(): void;
|
|
22
21
|
}
|
|
23
22
|
export declare const registerComponentMark: () => void;
|
package/types/mark/group.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
|
|
|
22
22
|
protected _compileProduct(option?: IMarkCompileOption): void;
|
|
23
23
|
protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
|
|
24
24
|
getGraphics(): IMarkGraphic[];
|
|
25
|
-
|
|
25
|
+
renderInner(): void;
|
|
26
26
|
render(): void;
|
|
27
27
|
updateAnimationState(callback: (g: IMarkGraphic) => AnimationStateValues): void;
|
|
28
28
|
release(): void;
|
|
@@ -81,6 +81,7 @@ export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
|
|
|
81
81
|
setPostProcess: <U extends keyof T, A>(key: U, postProcessFunc: IAttrConfig<A, T>['postProcess'], state?: StateValueType) => void;
|
|
82
82
|
updateMarkState: (key: string) => void;
|
|
83
83
|
render: () => void;
|
|
84
|
+
renderInner: () => void;
|
|
84
85
|
getGraphics: () => IMarkGraphic[];
|
|
85
86
|
reuse: (mark: IMark) => void;
|
|
86
87
|
prepareMorph: (mark: IMark) => void;
|
|
@@ -93,6 +94,7 @@ export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
|
|
|
93
94
|
canAnimateAfterProgressive: () => boolean;
|
|
94
95
|
updateAnimationState: (callback: (graphic: IMarkGraphic) => AnimationStateValues) => void;
|
|
95
96
|
runAnimation: () => void;
|
|
97
|
+
needClear?: boolean;
|
|
96
98
|
}
|
|
97
99
|
export type IMark = IMarkRaw<ICommonSpec>;
|
|
98
100
|
export interface ICompileMarkConfig extends IMarkConfig {
|
|
@@ -4,7 +4,6 @@ import type { IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICellMarkSpec, ICom
|
|
|
4
4
|
import type { IMark, IMarkRaw } from './common';
|
|
5
5
|
import type { MarkType } from './type';
|
|
6
6
|
export interface IComponentMark extends IMarkRaw<ICommonSpec> {
|
|
7
|
-
renderInner: () => void;
|
|
8
7
|
getComponent: () => IGraphic;
|
|
9
8
|
clearComponent: () => void;
|
|
10
9
|
setAttributeTransform: (t: (attrs: any) => any) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IEvent } from '../event/interface';
|
|
2
|
-
import type { IEffect, IModel, IModelInitOption, IModelOption,
|
|
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 { ICompileMarkConfig, IMark, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
|
|
5
5
|
import type { Datum, StateValueType, ConvertToMarkStyleSpec, ICommonSpec, StringOrNumber, IRect, ILayoutRect } from '../typings';
|
|
@@ -45,7 +45,6 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
|
|
|
45
45
|
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
46
46
|
onLayoutEnd(): void;
|
|
47
47
|
onEvaluateEnd(ctx: IModelEvaluateOption): void;
|
|
48
|
-
abstract onRender(ctx: IModelRenderOption): void;
|
|
49
48
|
onDataUpdate(): void;
|
|
50
49
|
beforeRelease(): void;
|
|
51
50
|
clear(): void;
|
|
@@ -75,7 +75,6 @@ export interface IModel extends ICompilable {
|
|
|
75
75
|
reInit: (spec?: any) => void;
|
|
76
76
|
beforeRelease: () => void;
|
|
77
77
|
onEvaluateEnd: (ctx: IModelEvaluateOption) => void;
|
|
78
|
-
onRender: (ctx: IModelRenderOption) => void;
|
|
79
78
|
onDataUpdate: () => void;
|
|
80
79
|
updateSpec: (spec: any, totalSpec?: any) => IUpdateSpecResult;
|
|
81
80
|
getSpec?: () => any;
|
|
@@ -24,6 +24,7 @@ export declare class DomTooltipHandler extends BaseTooltipHandler {
|
|
|
24
24
|
protected _cacheCustomTooltipPosition: ILayoutPoint;
|
|
25
25
|
getVisibility(): boolean;
|
|
26
26
|
setVisibility(_value: boolean): void;
|
|
27
|
+
getRootDom(): HTMLElement;
|
|
27
28
|
constructor();
|
|
28
29
|
onAdd(service: IComponentPluginService<any>): void;
|
|
29
30
|
initEl(): void;
|
package/types/region/region.d.ts
CHANGED
|
@@ -64,7 +64,6 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
64
64
|
getSeriesInType(type: string): ISeries[];
|
|
65
65
|
getSeriesInCoordinateType(coordinateType: CoordinateType): ISeries[];
|
|
66
66
|
getSeriesInDataName(dataName: string): ISeries[];
|
|
67
|
-
onRender(ctx: any): void;
|
|
68
67
|
initSeriesDataflow(): void;
|
|
69
68
|
seriesDataFilterOver: () => void;
|
|
70
69
|
release(): void;
|
|
@@ -5,7 +5,7 @@ import type { ICompileMarkConfig, IGroupMark, IMark } from '../../mark/interface
|
|
|
5
5
|
import type { CoordinateType, IInvalidType, IPoint, DataKeyType, Datum, Maybe, ISeriesSpec, IExtensionMarkSpec, IExtensionGroupMarkSpec, EnableMarkType, IGroup, ILayoutType, ILayoutPoint, ILayoutRect } from '../../typings';
|
|
6
6
|
import { BaseModel } from '../../model/base-model';
|
|
7
7
|
import type { ISeriesOption, ISeries, ISeriesMarkInitOption, ISeriesStackData, ISeriesTooltipHelper, SeriesMarkMap, ISeriesMarkInfo, ISeriesSpecInfo, ISeriesStackDataLeaf, ISeriesStackDataMeta, ISeriesSeriesInfo } from '../interface';
|
|
8
|
-
import type { IModelEvaluateOption,
|
|
8
|
+
import type { IModelEvaluateOption, IUpdateSpecResult } from '../../model/interface';
|
|
9
9
|
import type { AddVChartPropertyContext } from '../../data/transforms/add-property';
|
|
10
10
|
import type { IHoverSpec, ISelectSpec } from '../../interaction/interface/spec';
|
|
11
11
|
import type { ISeriesMarkAttributeContext } from '../../compile/mark';
|
|
@@ -180,7 +180,6 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
180
180
|
_updateSpecData(): void;
|
|
181
181
|
reInit(spec?: T): void;
|
|
182
182
|
onEvaluateEnd(ctx: IModelEvaluateOption): void;
|
|
183
|
-
onRender(ctx: IModelRenderOption): void;
|
|
184
183
|
release(): void;
|
|
185
184
|
setLayoutStartPosition(pos: Partial<IPoint>): void;
|
|
186
185
|
setLayoutRect({ width, height }: Partial<ILayoutRect>, levelMap?: Partial<ILayoutRect>): void;
|
|
@@ -12,5 +12,6 @@ export interface IMosaicSeriesSpec extends Omit<IBarSeriesSpec, 'type' | 'label'
|
|
|
12
12
|
};
|
|
13
13
|
position?: Functional<'outside' | 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'inside-top' | 'inside-bottom' | 'inside-right' | 'inside-left' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>;
|
|
14
14
|
}>;
|
|
15
|
+
bandWidthField?: string;
|
|
15
16
|
}
|
|
16
17
|
export type IMosaicSeriesTheme = IBarSeriesTheme;
|
|
@@ -9,6 +9,8 @@ export declare class MosaicSeries<T extends IMosaicSeriesSpec = IMosaicSeriesSpe
|
|
|
9
9
|
static readonly builtInTheme: Record<string, IBarSeriesTheme>;
|
|
10
10
|
static readonly transformerConstructor: any;
|
|
11
11
|
readonly transformerConstructor: any;
|
|
12
|
+
private _bandWidthField?;
|
|
13
|
+
get bandWidthField(): string;
|
|
12
14
|
getStack(): boolean;
|
|
13
15
|
getPercent(): boolean;
|
|
14
16
|
getGroupFields(): string[];
|
|
@@ -3,6 +3,7 @@ import type { IDimensionData, IDimensionInfo } from '../../event/events/dimensio
|
|
|
3
3
|
export interface ITooltipHandler extends ITooltipHandlerSpec {
|
|
4
4
|
getTooltipContainer?: () => any;
|
|
5
5
|
reInit?: () => any;
|
|
6
|
+
getRootDom?: () => any;
|
|
6
7
|
}
|
|
7
8
|
export type TooltipData = IDimensionInfo[] | IDimensionData[];
|
|
8
9
|
export type TooltipActiveType = 'mark' | 'dimension' | 'group';
|