@visactor/vchart-types 1.7.1 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/utils.d.ts +1 -0
- package/types/chart/bar/bar-3d.d.ts +2 -2
- package/types/chart/base-chart.d.ts +2 -5
- package/types/chart/cartesian/interface.d.ts +1 -1
- package/types/chart/interface/chart.d.ts +3 -3
- package/types/component/axis/base-axis.d.ts +2 -1
- package/types/component/axis/cartesian/axis.d.ts +1 -1
- package/types/component/axis/cartesian/util/common.d.ts +0 -2
- package/types/component/axis/interface/common.d.ts +1 -0
- package/types/component/axis/polar/interface/common.d.ts +2 -3
- package/types/component/base/base-component.d.ts +2 -7
- package/types/component/brush/brush.d.ts +1 -1
- package/types/component/crosshair/base.d.ts +4 -5
- package/types/component/crosshair/cartesian.d.ts +12 -35
- package/types/component/crosshair/config.d.ts +6 -0
- package/types/component/crosshair/interface/spec.d.ts +7 -3
- package/types/component/crosshair/polar.d.ts +13 -55
- package/types/component/custom-mark/custom-mark.d.ts +1 -1
- package/types/component/data-zoom/data-filter-base-component.d.ts +1 -1
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -1
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -1
- package/types/component/geo/geo-coordinate.d.ts +1 -1
- package/types/component/indicator/indicator.d.ts +1 -1
- package/types/component/label/base-label.d.ts +1 -1
- package/types/component/label/label.d.ts +1 -0
- package/types/component/label/totalLabel.d.ts +1 -0
- package/types/component/legend/base-legend.d.ts +1 -1
- package/types/component/legend/continuous/interface.d.ts +1 -0
- package/types/component/map-label/component.d.ts +1 -1
- package/types/component/marker/base-marker.d.ts +23 -25
- package/types/component/marker/interface.d.ts +19 -9
- package/types/component/marker/mark-area/interface/spec.d.ts +10 -12
- package/types/component/marker/mark-area/mark-area.d.ts +3 -2
- package/types/component/marker/mark-line/interface/spec.d.ts +20 -9
- package/types/component/marker/mark-line/mark-line.d.ts +4 -2
- package/types/component/marker/mark-point/interface/spec.d.ts +8 -6
- package/types/component/marker/mark-point/mark-point.d.ts +3 -2
- package/types/component/marker/utils.d.ts +13 -2
- package/types/component/player/player.d.ts +1 -1
- package/types/component/title/title.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +1 -1
- package/types/data/transforms/aggregation.d.ts +3 -3
- package/types/model/base-model.d.ts +1 -1
- package/types/model/interface.d.ts +2 -1
- package/types/series/gauge/gauge-pointer.d.ts +2 -1
- package/types/series/gauge/interface.d.ts +2 -0
- package/types/series/util/utils.d.ts +5 -0
- package/types/typings/visual.d.ts +3 -2
|
@@ -8,6 +8,7 @@ import type { ISeriesMarkAttributeContext } from '../compile/mark';
|
|
|
8
8
|
export declare const AnimationStates: string[];
|
|
9
9
|
export declare function animationConfig<Preset extends string>(defaultConfig?: MarkAnimationSpec, userConfig?: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, params?: {
|
|
10
10
|
dataIndex: (datum: any) => number;
|
|
11
|
+
dataCount: () => number;
|
|
11
12
|
}): MarkAnimationSpec;
|
|
12
13
|
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: ISeriesMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "enter" | "exit" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<string>>>;
|
|
13
14
|
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class Bar3dChart extends
|
|
1
|
+
import { BarChart } from './bar';
|
|
2
|
+
export declare class Bar3dChart extends BarChart {
|
|
3
3
|
static readonly type: string;
|
|
4
4
|
static readonly view: string;
|
|
5
5
|
readonly type: string;
|
|
@@ -109,7 +109,7 @@ export declare class BaseChart extends CompilableBase implements IChart {
|
|
|
109
109
|
updateGlobalScaleDomain(): void;
|
|
110
110
|
updateGlobalScale(result: IUpdateSpecResult): void;
|
|
111
111
|
updateGlobalScaleTheme(): void;
|
|
112
|
-
updateSpec(spec: any
|
|
112
|
+
updateSpec(spec: any): {
|
|
113
113
|
change: boolean;
|
|
114
114
|
reMake: boolean;
|
|
115
115
|
reRender: boolean;
|
|
@@ -125,10 +125,7 @@ export declare class BaseChart extends CompilableBase implements IChart {
|
|
|
125
125
|
protected isValidSeries(seriesType: string): boolean;
|
|
126
126
|
protected _getDefaultSeriesSpec(spec: any): any;
|
|
127
127
|
private _updateLayoutRect;
|
|
128
|
-
setCurrentTheme(
|
|
129
|
-
protected setRegionTheme(reInit?: boolean): void;
|
|
130
|
-
protected setComponentTheme(reInit?: boolean): void;
|
|
131
|
-
protected setSeriesTheme(reInit?: boolean): void;
|
|
128
|
+
setCurrentTheme(): void;
|
|
132
129
|
clear(): void;
|
|
133
130
|
compile(): void;
|
|
134
131
|
afterCompile(): void;
|
|
@@ -10,6 +10,6 @@ export interface ICartesianChartSpec extends IChartSpec {
|
|
|
10
10
|
axes?: ICartesianAxisSpec[];
|
|
11
11
|
crosshair?: ICartesianCrosshairSpec | ICartesianCrosshairSpec[];
|
|
12
12
|
markLine?: IMarkLineSpec | IMarkLineSpec[];
|
|
13
|
-
markArea?: IMarkAreaSpec |
|
|
13
|
+
markArea?: IMarkAreaSpec | IMarkAreaSpec[];
|
|
14
14
|
markPoint?: IMarkPointSpec | IMarkPointSpec[];
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IEvent } from '../../event/interface';
|
|
2
2
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IView } from '@visactor/vgrammar-core';
|
|
4
4
|
import type { IParserOptions } from '@visactor/vdataset/es/parser';
|
|
5
5
|
import type { IComponent } from '../../component/interface';
|
|
6
6
|
import type { IMark } from '../../mark/interface';
|
|
@@ -73,13 +73,13 @@ export interface IChart extends ICompilable {
|
|
|
73
73
|
getAllModels: () => IModel[];
|
|
74
74
|
getMarkById: (id: number) => IMark | undefined;
|
|
75
75
|
getAllMarks: () => IMark[];
|
|
76
|
-
updateSpec: (spec: any
|
|
76
|
+
updateSpec: (spec: any) => IUpdateSpecResult;
|
|
77
77
|
updateState: (state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean) => void;
|
|
78
78
|
setSelected: (datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
79
79
|
setHovered: (datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
80
80
|
updateViewBox: (viewBox: IBoundsLike, reLayout: boolean) => void;
|
|
81
81
|
getCanvas: () => HTMLCanvasElement | undefined;
|
|
82
|
-
setCurrentTheme: (
|
|
82
|
+
setCurrentTheme: () => void;
|
|
83
83
|
getSeriesData: (id: StringOrNumber | undefined, index: number | undefined) => DataView | undefined;
|
|
84
84
|
setDimensionIndex: (value: StringOrNumber, opt: DimensionIndexOption) => void;
|
|
85
85
|
}
|
|
@@ -50,7 +50,8 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
50
50
|
protected _axisMark: IComponentMark;
|
|
51
51
|
protected _gridMark: IComponentMark;
|
|
52
52
|
constructor(spec: T, options: IComponentOption);
|
|
53
|
-
|
|
53
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
54
|
+
getVRenderComponents(): any[];
|
|
54
55
|
created(): void;
|
|
55
56
|
protected isSeriesDataEnable(): boolean;
|
|
56
57
|
protected setSeriesAndRegionsFromSpec(): void;
|
|
@@ -101,5 +101,5 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
101
101
|
onDataUpdate(): void;
|
|
102
102
|
protected _transformSpec(): void;
|
|
103
103
|
private _appendAxisUnit;
|
|
104
|
-
|
|
104
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
105
105
|
}
|
|
@@ -9,5 +9,3 @@ export declare function getOrient(spec: ICartesianAxisCommonSpec, whiteList?: st
|
|
|
9
9
|
export declare function getDirectionByOrient(orient: IOrientType): Direction;
|
|
10
10
|
export declare function isOrientInSameDirection(orient1: IOrientType, orient2: IOrientType): boolean;
|
|
11
11
|
export declare function transformInverse(spec: ICartesianAxisCommonSpec, isHorizontal: boolean): boolean;
|
|
12
|
-
export declare function scaleWholeRangeSize(count: number, bandwidth: number, paddingInner: number, paddingOuter: number): number;
|
|
13
|
-
export declare function bandSpace(count: number, paddingInner: number, paddingOuter: number): number;
|
|
@@ -15,6 +15,7 @@ export interface IAxis extends IComponent {
|
|
|
15
15
|
getScales: () => IBaseScale[];
|
|
16
16
|
getOrient: () => ICartesianAxisSpec['orient'] | IPolarOrientType;
|
|
17
17
|
visible: boolean;
|
|
18
|
+
directionStr?: 'l2r' | 'r2l' | 't2b' | 'b2t';
|
|
18
19
|
}
|
|
19
20
|
export interface IAxisItem<T> {
|
|
20
21
|
visible?: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IBaseScale } from '@visactor/vscale';
|
|
2
|
-
import type { IComponent } from '../../../interface';
|
|
3
2
|
import type { IPoint, IPolarOrientType, IPolarPoint } from '../../../../typings';
|
|
4
|
-
import type { IGrid } from '../../interface';
|
|
3
|
+
import type { IAxis, IGrid } from '../../interface';
|
|
5
4
|
import type { ICompilableData } from '../../../../compile/data';
|
|
6
5
|
export type IPolarGrid = IGrid & {
|
|
7
6
|
smooth?: boolean;
|
|
@@ -16,7 +15,7 @@ export interface IPolarAxisHelper {
|
|
|
16
15
|
getBandwidth?: (depth?: number) => number;
|
|
17
16
|
getAxisId: () => number;
|
|
18
17
|
}
|
|
19
|
-
export interface IPolarAxis extends
|
|
18
|
+
export interface IPolarAxis extends IAxis {
|
|
20
19
|
startAngle: number;
|
|
21
20
|
endAngle: number;
|
|
22
21
|
getOrient: () => IPolarOrientType;
|
|
@@ -22,7 +22,8 @@ export declare abstract class BaseComponent<T extends IComponentSpec = IComponen
|
|
|
22
22
|
constructor(spec: T, options: IComponentOption);
|
|
23
23
|
initLayout(): void;
|
|
24
24
|
abstract changeRegions(regions: IRegion[]): void;
|
|
25
|
-
abstract
|
|
25
|
+
protected abstract _getNeedClearVRenderComponents(): IGraphic[];
|
|
26
|
+
getVRenderComponents(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>[];
|
|
26
27
|
protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
|
|
27
28
|
protected eventPos(markEventParams: BaseEventParams): {
|
|
28
29
|
x: number;
|
|
@@ -43,11 +44,5 @@ export declare abstract class BaseComponent<T extends IComponentSpec = IComponen
|
|
|
43
44
|
compile(): void;
|
|
44
45
|
compileMarks(group?: string | IGroupMark): void;
|
|
45
46
|
protected _delegateEvent: (component: IGraphic, event: any, type: string, item?: any, datum?: Datum) => void;
|
|
46
|
-
getGraphicBounds: () => {
|
|
47
|
-
x1: number;
|
|
48
|
-
y1: number;
|
|
49
|
-
x2: number;
|
|
50
|
-
y2: number;
|
|
51
|
-
};
|
|
52
47
|
getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike;
|
|
53
48
|
}
|
|
@@ -63,7 +63,7 @@ export declare class Brush extends BaseComponent<IBrushSpec> implements IBrush {
|
|
|
63
63
|
protected initEvent(): void;
|
|
64
64
|
onRender(ctx: IModelRenderOption): void;
|
|
65
65
|
changeRegions(regions: IRegion[]): void;
|
|
66
|
-
|
|
66
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
67
67
|
_compareSpec(): {
|
|
68
68
|
change: boolean;
|
|
69
69
|
reMake: boolean;
|
|
@@ -6,13 +6,13 @@ import type { IPadding, Maybe, StringOrNumber } from '../../typings';
|
|
|
6
6
|
import type { IComponentOption } from '../interface';
|
|
7
7
|
import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairTheme, ICrosshairCategoryFieldSpec } from './interface';
|
|
8
8
|
import type { IAxis } from '../axis/interface';
|
|
9
|
-
type IBound = {
|
|
9
|
+
export type IBound = {
|
|
10
10
|
x1: number;
|
|
11
11
|
y1: number;
|
|
12
12
|
x2: number;
|
|
13
13
|
y2: number;
|
|
14
14
|
};
|
|
15
|
-
type IAxisInfo<T> = Map<number, IBound & {
|
|
15
|
+
export type IAxisInfo<T> = Map<number, IBound & {
|
|
16
16
|
axis: T;
|
|
17
17
|
}>;
|
|
18
18
|
export interface IHair {
|
|
@@ -40,14 +40,14 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
40
40
|
triggerOff: CrossHairTrigger | 'none';
|
|
41
41
|
protected _theme: Maybe<ICrosshairTheme>;
|
|
42
42
|
get enableRemain(): boolean;
|
|
43
|
-
protected _crosshairConfig: ICartesianCrosshairSpec | IPolarCrosshairSpec;
|
|
44
43
|
private _limitBounds;
|
|
45
44
|
constructor(spec: T, options: IComponentOption);
|
|
46
|
-
protected abstract
|
|
45
|
+
protected abstract _showDefaultCrosshairBySpec(): void;
|
|
47
46
|
protected abstract _layoutCrosshair(x: number, y: number): void;
|
|
48
47
|
protected abstract _parseFieldInfo(): void;
|
|
49
48
|
abstract hide(): void;
|
|
50
49
|
protected _getLimitBounds(): IBoundsLike;
|
|
50
|
+
protected _showDefaultCrosshair(): void;
|
|
51
51
|
setAttrFromSpec(): void;
|
|
52
52
|
created(): void;
|
|
53
53
|
_compareSpec(): {
|
|
@@ -73,4 +73,3 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
73
73
|
protected _parseField(field: ICrosshairCategoryFieldSpec, fieldName: string): any;
|
|
74
74
|
protected _filterAxisByPoint<T>(axisMap: IAxisInfo<T>, relativeX: number, relativeY: number): IAxisInfo<T>;
|
|
75
75
|
}
|
|
76
|
-
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IComponentOption } from '../interface';
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { ICartesianCrosshairSpec } from './interface';
|
|
4
|
-
import type { IHair } from './base';
|
|
5
4
|
import { BaseCrossHair } from './base';
|
|
6
5
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
6
|
import type { IAxis } from '../axis/interface';
|
|
@@ -12,16 +11,8 @@ export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICar
|
|
|
12
11
|
static type: ComponentTypeEnum;
|
|
13
12
|
type: ComponentTypeEnum;
|
|
14
13
|
name: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
axis: IAxis;
|
|
18
|
-
}>;
|
|
19
|
-
currValueY: Map<number, {
|
|
20
|
-
v: StringOrNumber;
|
|
21
|
-
axis: IAxis;
|
|
22
|
-
}>;
|
|
23
|
-
xHair: IHair | undefined;
|
|
24
|
-
yHair: IHair | undefined;
|
|
14
|
+
private _xHair;
|
|
15
|
+
private _yHair;
|
|
25
16
|
private _cacheXCrossHairInfo;
|
|
26
17
|
private _cacheYCrossHairInfo;
|
|
27
18
|
private _xCrosshair;
|
|
@@ -30,40 +21,26 @@ export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICar
|
|
|
30
21
|
private _yCrosshair;
|
|
31
22
|
private _yLeftLabel;
|
|
32
23
|
private _yRightLabel;
|
|
24
|
+
private _currValueX;
|
|
25
|
+
private _currValueY;
|
|
33
26
|
static createComponent(spec: any, options: IComponentOption): CartesianCrossHair<any> | CartesianCrossHair<ICartesianCrosshairSpec>[];
|
|
34
27
|
constructor(spec: T, options: IComponentOption);
|
|
35
|
-
protected
|
|
36
|
-
private
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
x1: number;
|
|
40
|
-
y1: number;
|
|
41
|
-
x2: number;
|
|
42
|
-
y2: number;
|
|
43
|
-
} & {
|
|
44
|
-
axis: IAxis;
|
|
45
|
-
}>;
|
|
46
|
-
yAxisMap: Map<number, {
|
|
47
|
-
x1: number;
|
|
48
|
-
y1: number;
|
|
49
|
-
x2: number;
|
|
50
|
-
y2: number;
|
|
51
|
-
} & {
|
|
52
|
-
axis: IAxis;
|
|
53
|
-
}>;
|
|
54
|
-
};
|
|
55
|
-
private getValueAt;
|
|
28
|
+
protected _showDefaultCrosshairBySpec(): void;
|
|
29
|
+
private _defaultCrosshair;
|
|
30
|
+
private _findAllAxisContains;
|
|
31
|
+
private _getValueAt;
|
|
56
32
|
clearAxisValue(): void;
|
|
57
33
|
setAxisValue(v: StringOrNumber, axis: IAxis): void;
|
|
58
|
-
private
|
|
34
|
+
private _getAllAxisValues;
|
|
59
35
|
protected _layoutCrosshair(relativeX: number, relativeY: number): void;
|
|
60
36
|
hide(): void;
|
|
61
|
-
|
|
37
|
+
layoutByValue(tag?: number): void;
|
|
62
38
|
private _layoutVertical;
|
|
63
39
|
private _layoutHorizontal;
|
|
40
|
+
private _getRectSize;
|
|
64
41
|
protected _parseFieldInfo(): void;
|
|
65
42
|
private _updateCrosshair;
|
|
66
43
|
private _updateCrosshairLabel;
|
|
67
|
-
|
|
44
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
68
45
|
}
|
|
69
46
|
export declare const registerCartesianCrossHair: () => void;
|
|
@@ -25,10 +25,10 @@ export interface IPolarCrosshairSpec extends ICommonCrosshairSpec {
|
|
|
25
25
|
}
|
|
26
26
|
export interface ICrosshairCategoryFieldSpec extends ICrosshairDataBindSpec {
|
|
27
27
|
visible: boolean;
|
|
28
|
-
line?: ICrosshairLineSpec | ICrosshairRectSpec
|
|
28
|
+
line?: ICrosshairLineSpec | Omit<ICrosshairRectSpec, 'width'>;
|
|
29
29
|
label?: ICrosshairLabelSpec;
|
|
30
30
|
}
|
|
31
|
-
export interface ICrosshairValueFieldSpec {
|
|
31
|
+
export interface ICrosshairValueFieldSpec extends ICrosshairDataBindSpec {
|
|
32
32
|
visible: boolean;
|
|
33
33
|
line?: ICrosshairLineSpec;
|
|
34
34
|
label?: ICrosshairLabelSpec;
|
|
@@ -42,10 +42,14 @@ export interface ICrosshairLineSpec {
|
|
|
42
42
|
smooth?: boolean;
|
|
43
43
|
style?: ICrosshairLineStyle;
|
|
44
44
|
}
|
|
45
|
+
export type ICrosshairRectWidthCallback = (axisSize: {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
}, axis: IAxis) => number;
|
|
45
49
|
export interface ICrosshairRectSpec {
|
|
46
50
|
visible?: boolean;
|
|
47
51
|
type?: 'rect';
|
|
48
|
-
width?: number | string;
|
|
52
|
+
width?: number | string | ICrosshairRectWidthCallback;
|
|
49
53
|
style?: ICrosshairRectStyle;
|
|
50
54
|
}
|
|
51
55
|
export interface ICrosshairLabelSpec {
|
|
@@ -1,80 +1,38 @@
|
|
|
1
1
|
import type { IComponentOption } from '../interface';
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { IPolarCrosshairSpec } from './interface';
|
|
4
|
-
import type { IPolarAxis } from '../axis/polar/interface';
|
|
5
|
-
import type { IPoint, StringOrNumber } from '../../typings';
|
|
6
|
-
import type { IHair } from './base';
|
|
7
4
|
import { BaseCrossHair } from './base';
|
|
8
5
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
9
|
-
type IBound = {
|
|
10
|
-
x1: number;
|
|
11
|
-
y1: number;
|
|
12
|
-
x2: number;
|
|
13
|
-
y2: number;
|
|
14
|
-
};
|
|
15
|
-
type IAxisInfo = Map<number, IBound & {
|
|
16
|
-
axis: IPolarAxis;
|
|
17
|
-
}>;
|
|
18
6
|
export declare class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrosshairSpec> extends BaseCrossHair<T> {
|
|
19
7
|
static specKey: string;
|
|
20
8
|
specKey: string;
|
|
21
9
|
static type: ComponentTypeEnum;
|
|
22
10
|
type: ComponentTypeEnum;
|
|
23
11
|
name: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
v: StringOrNumber;
|
|
31
|
-
axis: IPolarAxis;
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
}>;
|
|
34
|
-
xHair: IHair | undefined;
|
|
35
|
-
yHair: (IHair & {
|
|
36
|
-
smooth: boolean;
|
|
37
|
-
}) | undefined;
|
|
38
|
-
private _cacheXCrossHairInfo;
|
|
39
|
-
private _cacheYCrossHairInfo;
|
|
12
|
+
private _currValueAngle;
|
|
13
|
+
private _currValueRadius;
|
|
14
|
+
private _angleHair;
|
|
15
|
+
private _radiusHair;
|
|
16
|
+
private _cacheAngleCrossHairInfo;
|
|
17
|
+
private _cacheRadiusCrossHairInfo;
|
|
40
18
|
private _radiusCrosshair;
|
|
41
19
|
private _radiusLabelCrosshair;
|
|
42
20
|
private _angleCrosshair;
|
|
43
21
|
private _angleLabelCrosshair;
|
|
44
22
|
static createComponent(spec: any, options: IComponentOption): PolarCrossHair<any> | PolarCrossHair<IPolarCrosshairSpec>[];
|
|
45
23
|
constructor(spec: T, options: IComponentOption);
|
|
46
|
-
protected
|
|
24
|
+
protected _showDefaultCrosshairBySpec(): void;
|
|
25
|
+
private _defaultCrosshair;
|
|
47
26
|
hide(): void;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
y1: number;
|
|
52
|
-
x2: number;
|
|
53
|
-
y2: number;
|
|
54
|
-
} & {
|
|
55
|
-
axis: IPolarAxis;
|
|
56
|
-
}>;
|
|
57
|
-
yAxisMap: Map<number, {
|
|
58
|
-
x1: number;
|
|
59
|
-
y1: number;
|
|
60
|
-
x2: number;
|
|
61
|
-
y2: number;
|
|
62
|
-
} & {
|
|
63
|
-
axis: IPolarAxis;
|
|
64
|
-
}>;
|
|
65
|
-
};
|
|
66
|
-
getAllAxisValues(axisMap: IAxisInfo, point: IPoint, currValue: Map<number, {
|
|
67
|
-
v: StringOrNumber;
|
|
68
|
-
axis: IPolarAxis;
|
|
69
|
-
[key: string]: any;
|
|
70
|
-
}>): boolean;
|
|
27
|
+
private _findAllAxisContains;
|
|
28
|
+
private _getAllAxisValues;
|
|
29
|
+
private _getValueByAxis;
|
|
71
30
|
protected _layoutCrosshair(relativeX: number, relativeY: number): void;
|
|
72
|
-
|
|
31
|
+
layoutByValue(tag?: number): void;
|
|
73
32
|
private _layoutVertical;
|
|
74
33
|
private _layoutHorizontal;
|
|
75
34
|
protected _parseFieldInfo(): void;
|
|
76
35
|
private _updateCrosshairLabel;
|
|
77
|
-
|
|
36
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
78
37
|
}
|
|
79
38
|
export declare const registerPolarCrossHair: () => void;
|
|
80
|
-
export {};
|
|
@@ -26,7 +26,7 @@ export declare class CustomMark extends BaseComponent<any> {
|
|
|
26
26
|
reCompile: boolean;
|
|
27
27
|
};
|
|
28
28
|
changeRegions(regions: IRegion[]): void;
|
|
29
|
-
|
|
29
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
30
30
|
onRender(ctx: IModelRenderOption): void;
|
|
31
31
|
private _getMarkAttributeContext;
|
|
32
32
|
}
|
|
@@ -121,5 +121,5 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
121
121
|
minBandSize: number;
|
|
122
122
|
};
|
|
123
123
|
protected _autoUpdate(rect?: ILayoutRect): boolean;
|
|
124
|
-
|
|
124
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
125
125
|
}
|
|
@@ -62,6 +62,6 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
62
62
|
area: any;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
66
66
|
}
|
|
67
67
|
export declare const registerDataZoom: () => void;
|
|
@@ -27,6 +27,6 @@ export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extend
|
|
|
27
27
|
protected _handleDataCollectionChange(): void;
|
|
28
28
|
protected _initCommonEvent(): void;
|
|
29
29
|
protected _getComponentAttrs(): Partial<ScrollBarAttributes>;
|
|
30
|
-
|
|
30
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
31
31
|
}
|
|
32
32
|
export declare const registerScrollBar: () => void;
|
|
@@ -47,7 +47,7 @@ export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> impleme
|
|
|
47
47
|
onLayoutEnd(ctx: IModelLayoutOption): void;
|
|
48
48
|
onRender(ctx: IModelRenderOption): void;
|
|
49
49
|
changeRegions(regions: IRegion[]): void;
|
|
50
|
-
|
|
50
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
51
51
|
protected collectFeatures(): any[];
|
|
52
52
|
dataToPosition(values?: number[]): IPoint;
|
|
53
53
|
dataToLatitude(lat: number): number;
|
|
@@ -34,7 +34,7 @@ export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T
|
|
|
34
34
|
private _createText;
|
|
35
35
|
private _computeLayoutRadius;
|
|
36
36
|
private isRelativeModel;
|
|
37
|
-
|
|
37
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
38
38
|
clear(): void;
|
|
39
39
|
}
|
|
40
40
|
export declare const registerIndicator: () => void;
|
|
@@ -34,5 +34,5 @@ export declare abstract class BaseLabelComponent<T extends ILabelSpec = ILabelSp
|
|
|
34
34
|
};
|
|
35
35
|
onRender(ctx: IModelRenderOption): void;
|
|
36
36
|
changeRegions(regions: IRegion[]): void;
|
|
37
|
-
|
|
37
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
38
38
|
}
|
|
@@ -41,5 +41,6 @@ export declare class Label<T extends ILabelSpec = ILabelSpec> extends BaseLabelC
|
|
|
41
41
|
protected _updateSingleLabelAttribute(labelInfo: ILabelInfo, labelComponent: IComponentMark): void;
|
|
42
42
|
protected _updateLabelComponentAttribute(component: ILabel, target: IVGrammarMark | IVGrammarMark[], labelInfos: ILabelInfo[]): void;
|
|
43
43
|
compileMarks(): void;
|
|
44
|
+
getVRenderComponents(): any[];
|
|
44
45
|
}
|
|
45
46
|
export declare const registerLabel: () => void;
|
|
@@ -21,6 +21,7 @@ export declare class TotalLabel extends BaseLabelComponent {
|
|
|
21
21
|
protected _initLabelComponent(): void;
|
|
22
22
|
updateLayoutAttribute(): void;
|
|
23
23
|
compileMarks(): void;
|
|
24
|
+
getVRenderComponents(): any[];
|
|
24
25
|
}
|
|
25
26
|
export declare function totalLabelPosition(series: ISeries, type: MarkType): string;
|
|
26
27
|
export declare const registerTotalLabel: () => void;
|
|
@@ -41,6 +41,7 @@ export type IColorLegendSpec = IContinuousLegendSpec & {
|
|
|
41
41
|
export type ISizeLegendSpec = IContinuousLegendSpec & {
|
|
42
42
|
type: 'size';
|
|
43
43
|
sizeBackground?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;
|
|
44
|
+
align?: 'top' | 'bottom' | 'left' | 'right';
|
|
44
45
|
};
|
|
45
46
|
export type IContinuousLegendTheme = Omit<IContinuousLegendSpec, 'type' | 'field' | 'scale' | 'regionIndex' | 'regionId' | 'seriesIndex' | 'seriesId' | 'id' | 'defaultSelected'>;
|
|
46
47
|
export interface IColorLegendTheme {
|
|
@@ -47,6 +47,6 @@ export declare class MapLabelComponent extends BaseComponent<IMapLabelSpec> {
|
|
|
47
47
|
private _isRelativeSeries;
|
|
48
48
|
onRender(ctx: any): void;
|
|
49
49
|
changeRegions(): void;
|
|
50
|
-
|
|
50
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
51
51
|
}
|
|
52
52
|
export declare const registerMapLabel: () => void;
|
|
@@ -2,11 +2,11 @@ import type { DataView } from '@visactor/vdataset';
|
|
|
2
2
|
import type { IModelRenderOption } from '../../model/interface';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import type { ICartesianSeries } from '../../series/interface';
|
|
5
|
-
import type { ILayoutRect, ILayoutType, IRect
|
|
5
|
+
import type { ILayoutRect, ILayoutType, IRect } from '../../typings';
|
|
6
6
|
import { BaseComponent } from '../base/base-component';
|
|
7
|
-
import type { IAggrType, IDataPos, IDataPosCallback,
|
|
8
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
9
|
-
export declare abstract class BaseMarker<T extends IMarkerSpec
|
|
7
|
+
import type { IAggrType, IDataPos, IDataPosCallback, IMarkerSpec } from './interface';
|
|
8
|
+
import type { IGraphic, IGroup } from '@visactor/vrender-core';
|
|
9
|
+
export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComponent<T> {
|
|
10
10
|
layoutType: ILayoutType | 'none';
|
|
11
11
|
protected _startRelativeSeries: ICartesianSeries;
|
|
12
12
|
protected _endRelativeSeries: ICartesianSeries;
|
|
@@ -16,55 +16,53 @@ export declare abstract class BaseMarker<T extends IMarkerSpec & IMarkerAxisSpec
|
|
|
16
16
|
protected _markerComponent: any;
|
|
17
17
|
protected _layoutOffsetX: number;
|
|
18
18
|
protected _layoutOffsetY: number;
|
|
19
|
+
private _firstSeries;
|
|
19
20
|
created(): void;
|
|
20
|
-
private _isSpecAggr;
|
|
21
21
|
private _getAllRelativeSeries;
|
|
22
|
+
private _getFieldInfoFromSpec;
|
|
22
23
|
protected _processSpecX(specX: IDataPos | IDataPosCallback): {
|
|
23
24
|
getRelativeSeries: () => ICartesianSeries;
|
|
24
25
|
getStartRelativeSeries: () => ICartesianSeries;
|
|
25
26
|
getEndRelativeSeries: () => ICartesianSeries;
|
|
26
|
-
x: {
|
|
27
|
+
x: string | number | IDataPosCallback | {
|
|
27
28
|
field: any;
|
|
28
29
|
aggrType: IAggrType;
|
|
29
30
|
};
|
|
30
|
-
} | {
|
|
31
|
-
getRelativeSeries: () => ICartesianSeries;
|
|
32
|
-
getStartRelativeSeries: () => ICartesianSeries;
|
|
33
|
-
getEndRelativeSeries: () => ICartesianSeries;
|
|
34
|
-
x: IDataPos | IDataPosCallback;
|
|
35
31
|
};
|
|
36
32
|
protected _processSpecY(specY: IDataPos | IDataPosCallback): {
|
|
37
33
|
getRelativeSeries: () => ICartesianSeries;
|
|
38
34
|
getStartRelativeSeries: () => ICartesianSeries;
|
|
39
35
|
getEndRelativeSeries: () => ICartesianSeries;
|
|
40
|
-
y: {
|
|
36
|
+
y: string | number | IDataPosCallback | {
|
|
41
37
|
field: any;
|
|
42
38
|
aggrType: IAggrType;
|
|
43
39
|
};
|
|
44
|
-
}
|
|
40
|
+
};
|
|
41
|
+
protected _processSpecXY(specX: IDataPos | IDataPosCallback, specY: IDataPos | IDataPosCallback): {
|
|
45
42
|
getRelativeSeries: () => ICartesianSeries;
|
|
46
43
|
getStartRelativeSeries: () => ICartesianSeries;
|
|
47
44
|
getEndRelativeSeries: () => ICartesianSeries;
|
|
48
|
-
|
|
45
|
+
x: string | number | IDataPosCallback | {
|
|
46
|
+
field: any;
|
|
47
|
+
aggrType: IAggrType;
|
|
48
|
+
};
|
|
49
|
+
y: string | number | IDataPosCallback | {
|
|
50
|
+
field: any;
|
|
51
|
+
aggrType: IAggrType;
|
|
52
|
+
};
|
|
49
53
|
};
|
|
50
|
-
protected _processSpecXY(specX: IDataPos | IDataPosCallback, specY: IDataPos | IDataPosCallback): any;
|
|
51
54
|
protected _processSpecCoo(spec: any): any;
|
|
52
55
|
updateLayoutAttribute(): void;
|
|
53
|
-
|
|
56
|
+
private _getSeriesByIdOrIndex;
|
|
54
57
|
protected _bindSeries(): void;
|
|
55
|
-
protected _computeClipRange(regions: IRegion[]): {
|
|
56
|
-
minX: number;
|
|
57
|
-
maxX: number;
|
|
58
|
-
minY: number;
|
|
59
|
-
maxY: number;
|
|
60
|
-
};
|
|
61
58
|
protected abstract _initDataView(): void;
|
|
62
|
-
protected abstract _createMarkerComponent():
|
|
59
|
+
protected abstract _createMarkerComponent(): IGroup;
|
|
63
60
|
protected abstract _markerLayout(): void;
|
|
64
61
|
protected initEvent(): void;
|
|
65
62
|
onRender(ctx: IModelRenderOption): void;
|
|
66
63
|
changeRegions(regions: IRegion[]): void;
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
clear(): void;
|
|
65
|
+
private _getFirstSeries;
|
|
66
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
69
67
|
onLayoutStart(layoutRect: IRect, chartViewRect: ILayoutRect, ctx: any): void;
|
|
70
68
|
}
|