@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
|
@@ -3,11 +3,18 @@ import type { SymbolType, IRichTextCharacter } from '@visactor/vrender-core';
|
|
|
3
3
|
import type { IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../typings';
|
|
4
4
|
import type { IComponentSpec } from '../base/interface';
|
|
5
5
|
import type { Datum } from '@visactor/vrender-components';
|
|
6
|
+
import type { ICartesianSeries } from '../../series/interface';
|
|
7
|
+
import type { IOptionAggrField, IOptionSeries } from '../../data/transforms/aggregation';
|
|
8
|
+
export type OffsetPoint = {
|
|
9
|
+
x?: number | string;
|
|
10
|
+
y?: number | string;
|
|
11
|
+
};
|
|
6
12
|
export type IAggrType = 'sum' | 'average' | 'min' | 'max' | 'variance' | 'standardDeviation' | 'median';
|
|
7
13
|
export type IDataPos = StringOrNumber | IAggrType;
|
|
8
|
-
export type IDataPosCallback = (relativeSeriesData:
|
|
14
|
+
export type IDataPosCallback = (relativeSeriesData: Datum[], startRelativeSeriesData: Datum[], endRelativeSeriesData: Datum[], relativeSeries: ICartesianSeries, startRelativeSeries: ICartesianSeries, endRelativeSeries: ICartesianSeries) => StringOrNumber;
|
|
15
|
+
export type IDataPointCallback = (relativeSeriesData: Datum[], relativeSeries: ICartesianSeries) => StringOrNumber;
|
|
9
16
|
export type IDataPointSpec = {
|
|
10
|
-
[key: string]: IDataPos;
|
|
17
|
+
[key: string]: IDataPos | IDataPointCallback;
|
|
11
18
|
refRelativeSeriesIndex?: number;
|
|
12
19
|
refRelativeSeriesId?: StringOrNumber;
|
|
13
20
|
xFieldIndex?: number;
|
|
@@ -15,12 +22,17 @@ export type IDataPointSpec = {
|
|
|
15
22
|
yFieldIndex?: number;
|
|
16
23
|
yFieldDim?: string;
|
|
17
24
|
};
|
|
18
|
-
type
|
|
19
|
-
x:
|
|
20
|
-
y:
|
|
25
|
+
export type MarkerPositionPoint = {
|
|
26
|
+
x: StringOrNumber;
|
|
27
|
+
y: StringOrNumber;
|
|
21
28
|
};
|
|
29
|
+
export type ICoordinateOption = {
|
|
30
|
+
x?: IOptionAggrField | (IDataPointCallback | StringOrNumber)[];
|
|
31
|
+
y?: IOptionAggrField | (IDataPointCallback | StringOrNumber)[];
|
|
32
|
+
getRefRelativeSeries?: () => ICartesianSeries;
|
|
33
|
+
} & IOptionSeries;
|
|
22
34
|
export type IMarkerPositionsSpec = {
|
|
23
|
-
positions:
|
|
35
|
+
positions: MarkerPositionPoint[];
|
|
24
36
|
regionRelative?: boolean;
|
|
25
37
|
};
|
|
26
38
|
export type IMarkerLabelWithoutRefSpec = {
|
|
@@ -52,12 +64,11 @@ export interface IMarkerRef {
|
|
|
52
64
|
refY?: number;
|
|
53
65
|
refAngle?: number;
|
|
54
66
|
}
|
|
55
|
-
export interface
|
|
67
|
+
export interface IMarkerCrossSeriesSpec {
|
|
56
68
|
startRelativeSeriesIndex?: number;
|
|
57
69
|
endRelativeSeriesIndex?: number;
|
|
58
70
|
startRelativeSeriesId?: string;
|
|
59
71
|
endRelativeSeriesId?: string;
|
|
60
|
-
relativeRelativeSeriesIndex?: number;
|
|
61
72
|
}
|
|
62
73
|
export interface IMarkerSpec extends IComponentSpec {
|
|
63
74
|
relativeSeriesIndex?: number;
|
|
@@ -74,4 +85,3 @@ export interface IMarkerSymbol extends IMarkerRef {
|
|
|
74
85
|
size?: number;
|
|
75
86
|
style?: Omit<ISymbolMarkSpec, 'visible'>;
|
|
76
87
|
}
|
|
77
|
-
export {};
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import type { IComponent } from '../../../interface';
|
|
2
|
-
import type { IMarkerPositionsSpec, IDataPointSpec, IDataPos, IMarkerSpec,
|
|
2
|
+
import type { IMarkerPositionsSpec, IDataPointSpec, IDataPos, IMarkerSpec, IDataPosCallback, IMarkerCrossSeriesSpec, OffsetPoint } from '../../interface';
|
|
3
3
|
import type { IMarkAreaTheme } from './theme';
|
|
4
4
|
export type IMarkArea = IComponent;
|
|
5
5
|
export type IRegressType = 'regression';
|
|
6
|
-
export type IMarkAreaSpec = IMarkerSpec & (IMarkAreaXSpec | IMarkAreaYSpec |
|
|
7
|
-
export interface IMarkAreaXSpec extends
|
|
6
|
+
export type IMarkAreaSpec = IMarkerSpec & (IMarkAreaXSpec | IMarkAreaYSpec | IMarkAreaXYSpec | IMarkAreaCoordinateSpec | IMarkerPositionsSpec) & IMarkAreaTheme;
|
|
7
|
+
export interface IMarkAreaXSpec extends IMarkerCrossSeriesSpec {
|
|
8
8
|
x: IDataPos | IDataPosCallback;
|
|
9
9
|
x1: IDataPos | IDataPosCallback;
|
|
10
10
|
}
|
|
11
|
-
export interface IMarkAreaYSpec extends
|
|
11
|
+
export interface IMarkAreaYSpec extends IMarkerCrossSeriesSpec {
|
|
12
12
|
y: IDataPos | IDataPosCallback;
|
|
13
13
|
y1: IDataPos | IDataPosCallback;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
startRadius: IDataPos | IDataPosCallback;
|
|
21
|
-
endRadius: IDataPos | IDataPosCallback;
|
|
15
|
+
export interface IMarkAreaXYSpec extends IMarkerCrossSeriesSpec {
|
|
16
|
+
x: IDataPos | IDataPosCallback;
|
|
17
|
+
x1: IDataPos | IDataPosCallback;
|
|
18
|
+
y: IDataPos | IDataPosCallback;
|
|
19
|
+
y1: IDataPos | IDataPosCallback;
|
|
22
20
|
}
|
|
23
21
|
export type IMarkAreaCoordinateSpec = {
|
|
24
22
|
coordinates: IDataPointSpec[];
|
|
23
|
+
coordinatesOffset?: OffsetPoint[];
|
|
25
24
|
};
|
|
26
|
-
export type IMarkAreaPositionsSpec = IMarkerPositionsSpec;
|
|
@@ -3,7 +3,8 @@ import type { IComponentOption } from '../../interface';
|
|
|
3
3
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
4
4
|
import { MarkArea as MarkAreaComponent } from '@visactor/vrender-components';
|
|
5
5
|
import { BaseMarker } from '../base-marker';
|
|
6
|
-
|
|
6
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
7
|
+
export declare class MarkArea extends BaseMarker<IMarkAreaSpec> implements IMarkArea {
|
|
7
8
|
static type: ComponentTypeEnum;
|
|
8
9
|
type: ComponentTypeEnum;
|
|
9
10
|
name: string;
|
|
@@ -11,7 +12,7 @@ export declare class MarkArea extends BaseMarker<IMarkAreaSpec & IMarkAreaTheme>
|
|
|
11
12
|
protected _theme: IMarkAreaTheme;
|
|
12
13
|
protected _markerComponent: MarkAreaComponent;
|
|
13
14
|
static createComponent(spec: any, options: IComponentOption): MarkArea | MarkArea[];
|
|
14
|
-
protected _createMarkerComponent():
|
|
15
|
+
protected _createMarkerComponent(): IGroup;
|
|
15
16
|
protected _markerLayout(): void;
|
|
16
17
|
protected _initDataView(): void;
|
|
17
18
|
}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
import type { IComponent } from '../../../interface';
|
|
2
|
-
import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec,
|
|
2
|
+
import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint } from '../../interface';
|
|
3
3
|
import type { IRegressType } from '../../mark-area/interface';
|
|
4
4
|
import type { IMarkLineTheme } from './theme';
|
|
5
5
|
import type { ILineMarkSpec, IPoint } from '../../../../typings';
|
|
6
6
|
export type IMarkLine = IComponent;
|
|
7
|
-
export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineCoordinateSpec |
|
|
8
|
-
export interface IMarkLineXSpec extends
|
|
7
|
+
export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineXYSpec | IMarkLineXYY1Spec | IMarkLineYXX1Spec | IMarkLineCoordinateSpec | IMarkerPositionsSpec) & IMarkLineTheme) | IStepMarkLineSpec;
|
|
8
|
+
export interface IMarkLineXSpec extends IMarkerCrossSeriesSpec {
|
|
9
9
|
x: IDataPos | IDataPosCallback;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IMarkLineXYY1Spec extends IMarkerCrossSeriesSpec {
|
|
12
|
+
x: IDataPos | IDataPosCallback;
|
|
12
13
|
y: IDataPos | IDataPosCallback;
|
|
14
|
+
y1: IDataPos | IDataPosCallback;
|
|
13
15
|
}
|
|
14
|
-
export interface
|
|
15
|
-
|
|
16
|
+
export interface IMarkLineYSpec extends IMarkerCrossSeriesSpec {
|
|
17
|
+
y: IDataPos | IDataPosCallback;
|
|
16
18
|
}
|
|
17
|
-
export interface
|
|
18
|
-
|
|
19
|
+
export interface IMarkLineYXX1Spec extends IMarkerCrossSeriesSpec {
|
|
20
|
+
y: IDataPos | IDataPosCallback;
|
|
21
|
+
x: IDataPos | IDataPosCallback;
|
|
22
|
+
x1: IDataPos | IDataPosCallback;
|
|
23
|
+
}
|
|
24
|
+
export interface IMarkLineXYSpec extends IMarkerCrossSeriesSpec {
|
|
25
|
+
x: IDataPos | IDataPosCallback;
|
|
26
|
+
y: IDataPos | IDataPosCallback;
|
|
27
|
+
x1: IDataPos | IDataPosCallback;
|
|
28
|
+
y1: IDataPos | IDataPosCallback;
|
|
19
29
|
}
|
|
20
30
|
export type IMarkLineCoordinateSpec = {
|
|
21
31
|
coordinates: IDataPointSpec[];
|
|
32
|
+
coordinatesOffset?: OffsetPoint[];
|
|
22
33
|
process?: {
|
|
23
34
|
x: IAggrType;
|
|
24
35
|
} | {
|
|
@@ -27,7 +38,6 @@ export type IMarkLineCoordinateSpec = {
|
|
|
27
38
|
xy: IRegressType;
|
|
28
39
|
};
|
|
29
40
|
};
|
|
30
|
-
export type IMarkLinePositionsSpec = IMarkerPositionsSpec;
|
|
31
41
|
export type IStepMarkLineSpec = IMarkerSpec & {
|
|
32
42
|
type: 'type-step';
|
|
33
43
|
connectDirection: 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -49,4 +59,5 @@ export type IStepMarkLineSpec = IMarkerSpec & {
|
|
|
49
59
|
};
|
|
50
60
|
} | {
|
|
51
61
|
positions: [IPoint, IPoint];
|
|
62
|
+
regionRelative?: boolean;
|
|
52
63
|
});
|
|
@@ -3,15 +3,17 @@ import type { IComponentOption } from '../../interface';
|
|
|
3
3
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
4
4
|
import { MarkLine as MarkLineComponent } from '@visactor/vrender-components';
|
|
5
5
|
import { BaseMarker } from '../base-marker';
|
|
6
|
-
|
|
6
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
7
|
+
export declare class MarkLine extends BaseMarker<IMarkLineSpec> implements IMarkLine {
|
|
7
8
|
static type: ComponentTypeEnum;
|
|
8
9
|
type: ComponentTypeEnum;
|
|
9
10
|
name: string;
|
|
10
11
|
layoutZIndex: number;
|
|
11
12
|
protected _theme: IMarkLineTheme;
|
|
12
13
|
protected _markerComponent: MarkLineComponent;
|
|
14
|
+
private _isXYLayout;
|
|
13
15
|
static createComponent(spec: any, options: IComponentOption): MarkLine | MarkLine[];
|
|
14
|
-
protected _createMarkerComponent():
|
|
16
|
+
protected _createMarkerComponent(): IGroup;
|
|
15
17
|
protected _markerLayout(): void;
|
|
16
18
|
protected _initDataView(): void;
|
|
17
19
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type { IPoint } from '../../../../typings';
|
|
2
1
|
import type { IComponent } from '../../../interface';
|
|
3
|
-
import type { IDataPointSpec, IMarkerSpec, IMarkerSymbol } from '../../interface';
|
|
2
|
+
import type { IDataPointSpec, IDataPos, IDataPosCallback, IMarkerSpec, IMarkerSymbol, MarkerPositionPoint, OffsetPoint } from '../../interface';
|
|
4
3
|
import type { IMarkPointTheme } from './theme';
|
|
5
4
|
export type IMarkPoint = IComponent;
|
|
6
|
-
export type IMarkPointSpec = IMarkerSpec & (IMarkPointCoordinateSpec | IMarkPointPositionsSpec) & IMarkPointTheme<IMarkerSymbol>;
|
|
5
|
+
export type IMarkPointSpec = IMarkerSpec & (IMarkPointXYSpec | IMarkPointCoordinateSpec | IMarkPointPositionsSpec) & IMarkPointTheme<IMarkerSymbol>;
|
|
6
|
+
export type IMarkPointXYSpec = {
|
|
7
|
+
y: IDataPos | IDataPosCallback;
|
|
8
|
+
x: IDataPos | IDataPosCallback;
|
|
9
|
+
};
|
|
7
10
|
export type IMarkPointCoordinateSpec = {
|
|
8
11
|
coordinates: IDataPointSpec;
|
|
9
|
-
|
|
10
|
-
relativeRelativeSeriesId?: string;
|
|
12
|
+
coordinatesOffset?: OffsetPoint;
|
|
11
13
|
};
|
|
12
14
|
export type IMarkPointPositionsSpec = {
|
|
13
|
-
position:
|
|
15
|
+
position: MarkerPositionPoint;
|
|
14
16
|
regionRelative?: boolean;
|
|
15
17
|
};
|
|
@@ -3,7 +3,8 @@ import type { IComponentOption } from '../../interface';
|
|
|
3
3
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
4
4
|
import { MarkPoint as MarkPointComponent } from '@visactor/vrender-components';
|
|
5
5
|
import { BaseMarker } from '../base-marker';
|
|
6
|
-
|
|
6
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
7
|
+
export declare class MarkPoint extends BaseMarker<IMarkPointSpec> implements IMarkPoint {
|
|
7
8
|
static type: ComponentTypeEnum;
|
|
8
9
|
type: ComponentTypeEnum;
|
|
9
10
|
name: string;
|
|
@@ -11,7 +12,7 @@ export declare class MarkPoint extends BaseMarker<IMarkPointSpec & IMarkPointThe
|
|
|
11
12
|
protected _theme: IMarkPointTheme;
|
|
12
13
|
protected _markerComponent: MarkPointComponent;
|
|
13
14
|
static createComponent(spec: any, options: IComponentOption): MarkPoint | MarkPoint[];
|
|
14
|
-
protected _createMarkerComponent():
|
|
15
|
+
protected _createMarkerComponent(): IGroup;
|
|
15
16
|
protected _markerLayout(): void;
|
|
16
17
|
protected _initDataView(): void;
|
|
17
18
|
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import type { ICartesianSeries } from '../../series/interface';
|
|
1
|
+
import type { ICartesianSeries, ISeries } from '../../series/interface';
|
|
2
2
|
import type { DataView } from '@visactor/vdataset';
|
|
3
3
|
import type { IPoint } from '../../typings';
|
|
4
|
+
import type { IDataPos, MarkerPositionPoint } from './interface';
|
|
5
|
+
import type { IRegion } from '../../region/interface';
|
|
6
|
+
import type { OffsetPoint } from './interface';
|
|
7
|
+
export declare function isAggrSpec(spec: IDataPos): boolean;
|
|
4
8
|
export declare function xyLayout(data: DataView, startRelativeSeries: ICartesianSeries, endRelativeSeries: ICartesianSeries, relativeSeries: ICartesianSeries, autoRange: boolean): IPoint[][];
|
|
5
|
-
export declare function coordinateLayout(data: DataView, relativeSeries: ICartesianSeries, autoRange: boolean): IPoint[];
|
|
9
|
+
export declare function coordinateLayout(data: DataView, relativeSeries: ICartesianSeries, autoRange: boolean, coordinatesOffset: OffsetPoint[] | OffsetPoint): IPoint[];
|
|
10
|
+
export declare function positionLayout(positions: MarkerPositionPoint[], series: ISeries, regionRelative: boolean): IPoint[];
|
|
11
|
+
export declare function computeClipRange(regions: IRegion[]): {
|
|
12
|
+
minX: number;
|
|
13
|
+
maxX: number;
|
|
14
|
+
minY: number;
|
|
15
|
+
maxY: number;
|
|
16
|
+
};
|
|
@@ -38,7 +38,7 @@ export declare class Player extends BaseComponent<IPlayer> implements IComponent
|
|
|
38
38
|
};
|
|
39
39
|
changeRegions(regions: IRegion[]): void;
|
|
40
40
|
onRender(ctx: IModelRenderOption): void;
|
|
41
|
-
|
|
41
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
42
42
|
private _getPlayerAttrs;
|
|
43
43
|
private _createOrUpdatePlayerComponent;
|
|
44
44
|
private _computeLayoutRect;
|
|
@@ -40,7 +40,7 @@ export declare class Title extends BaseComponent<ITitleSpec> implements ITitle {
|
|
|
40
40
|
private _getTitleLayoutRect;
|
|
41
41
|
private _getTitleAttrs;
|
|
42
42
|
private _createOrUpdateTitleComponent;
|
|
43
|
-
|
|
43
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
44
44
|
clear(): void;
|
|
45
45
|
}
|
|
46
46
|
export declare const registerTitle: () => void;
|
|
@@ -32,7 +32,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
32
32
|
protected _isTooltipShown: boolean;
|
|
33
33
|
isTooltipShown(): boolean;
|
|
34
34
|
changeRegions(regions: IRegion[]): void;
|
|
35
|
-
|
|
35
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
36
36
|
protected _registerEvent(): void;
|
|
37
37
|
protected _releaseEvent(): void;
|
|
38
38
|
onLayout(ctx: IModelLayoutOption): void;
|
|
@@ -15,7 +15,7 @@ export type IOptionSeries = {
|
|
|
15
15
|
getStartRelativeSeries: () => ICartesianSeries;
|
|
16
16
|
getEndRelativeSeries: () => ICartesianSeries;
|
|
17
17
|
};
|
|
18
|
-
export type IOptionCallback = (relativeSeriesData: any, startRelativeSeriesData: any, endRelativeSeriesData: any) => IOptionPos;
|
|
18
|
+
export type IOptionCallback = (relativeSeriesData: any, startRelativeSeriesData: any, endRelativeSeriesData: any, relativeSeries: ICartesianSeries, startRelative: ICartesianSeries, endRelative: ICartesianSeries) => IOptionPos;
|
|
19
19
|
export type IOptionAggr = {
|
|
20
20
|
x?: IOptionPos | IOptionCallback;
|
|
21
21
|
y?: IOptionPos | IOptionCallback;
|
|
@@ -29,6 +29,6 @@ export declare function markerVariance(_data: Array<DataView>, opt: IOption): nu
|
|
|
29
29
|
export declare function markerStandardDeviation(_data: Array<DataView>, opt: IOption): number;
|
|
30
30
|
export declare function markerMedian(_data: Array<DataView>, opt: IOption): number;
|
|
31
31
|
export declare function markerAggregation(_data: Array<DataView>, options: IOptionAggr[]): {
|
|
32
|
-
x: StringOrNumber[] | StringOrNumber | null;
|
|
33
|
-
y: StringOrNumber[] | StringOrNumber | null;
|
|
32
|
+
x: StringOrNumber[] | StringOrNumber | IOptionCallback | null;
|
|
33
|
+
y: StringOrNumber[] | StringOrNumber | IOptionCallback | null;
|
|
34
34
|
}[];
|
|
@@ -71,7 +71,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
|
|
|
71
71
|
protected _getDefaultSpecFromChart(chartSpec: any): Partial<T>;
|
|
72
72
|
protected _shouldMergeThemeToSpec(): boolean;
|
|
73
73
|
protected _prepareSpecBeforeMergingTheme(obj?: any): any;
|
|
74
|
-
setCurrentTheme(
|
|
74
|
+
setCurrentTheme(): void;
|
|
75
75
|
updateLayoutAttribute(): void;
|
|
76
76
|
setAttrFromSpec(): void;
|
|
77
77
|
protected _convertMarkStyle<T extends ICommonSpec = ICommonSpec>(style: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>): Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>;
|
|
@@ -74,7 +74,7 @@ export interface IModel extends ICompilable {
|
|
|
74
74
|
getSpecIndex: () => number;
|
|
75
75
|
onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect, ctx: IModelLayoutOption) => void;
|
|
76
76
|
onLayoutEnd: (ctx: IModelLayoutOption) => void;
|
|
77
|
-
setCurrentTheme: (
|
|
77
|
+
setCurrentTheme: () => void;
|
|
78
78
|
getColorScheme: () => IThemeColorScheme | undefined;
|
|
79
79
|
setMarkStyle: <T extends ICommonSpec>(mark?: IMarkRaw<T>, style?: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>, state?: StateValueType, level?: number) => void;
|
|
80
80
|
initMarkStyleWithSpec: (mark?: IMark, spec?: any, key?: string) => void;
|
|
@@ -89,6 +89,7 @@ export interface ILayoutModel extends IModel {
|
|
|
89
89
|
afterSetLayoutStartPoint: (pos: ILayoutPoint) => void;
|
|
90
90
|
}
|
|
91
91
|
export interface IModelOption extends ICompilableInitOption {
|
|
92
|
+
type: string;
|
|
92
93
|
eventDispatcher: IEventDispatcher;
|
|
93
94
|
dataSet: DataSet;
|
|
94
95
|
map: Map<StringOrNumber, IModel | IMark>;
|
|
@@ -2,7 +2,7 @@ import type { IMark } from '../../mark/interface';
|
|
|
2
2
|
import { MarkTypeEnum } from '../../mark/interface/type';
|
|
3
3
|
import type { SeriesMarkMap } from '../interface';
|
|
4
4
|
import { SeriesTypeEnum } from '../interface/type';
|
|
5
|
-
import type { IGaugePointerSeriesSpec, IGaugePointerSeriesTheme } from './interface';
|
|
5
|
+
import type { IGaugePointerSeriesSpec, IGaugePointerSeriesTheme, PinMarkSpec, PointerMarkSpec } from './interface';
|
|
6
6
|
import type { Datum, Maybe } from '../../typings';
|
|
7
7
|
import { ProgressLikeSeries } from '../polar/progress-like';
|
|
8
8
|
export declare class GaugePointerSeries<T extends IGaugePointerSeriesSpec = IGaugePointerSeriesSpec> extends ProgressLikeSeries<T> {
|
|
@@ -21,6 +21,7 @@ export declare class GaugePointerSeries<T extends IGaugePointerSeriesSpec = IGau
|
|
|
21
21
|
initGroups(): void;
|
|
22
22
|
private initPointerMarkStyle;
|
|
23
23
|
protected initTooltip(): void;
|
|
24
|
+
protected _getPointerAnchor(datum: Datum, markSpec: PinMarkSpec | PointerMarkSpec): import("../../typings").IPoint;
|
|
24
25
|
protected _getPointerWidth(): number;
|
|
25
26
|
protected _getPointerHeight(datum: Datum): number;
|
|
26
27
|
protected _getPointerAngle(datum: Datum): number;
|
|
@@ -21,10 +21,12 @@ export type PointerMarkSpec = {
|
|
|
21
21
|
innerPadding?: number;
|
|
22
22
|
outerPadding?: number;
|
|
23
23
|
center?: [number, number];
|
|
24
|
+
isOnCenter?: boolean;
|
|
24
25
|
};
|
|
25
26
|
export type PinMarkSpec = {
|
|
26
27
|
width?: number;
|
|
27
28
|
height?: number;
|
|
29
|
+
isOnCenter?: boolean;
|
|
28
30
|
};
|
|
29
31
|
export interface IGaugePointerSeriesTheme extends IProgressLikeSeriesTheme {
|
|
30
32
|
[SeriesMarkNameEnum.pin]?: Partial<IMarkTheme<IPathMarkSpec> & PinMarkSpec>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { IAxisHelper as CartesianHelper } from '../../component/axis/cartesian/interface/common';
|
|
2
2
|
import type { Datum } from '../../typings';
|
|
3
3
|
import type { IPolarAxisHelper } from '../../component/axis';
|
|
4
|
+
import type { ICartesianSeries } from '..';
|
|
4
5
|
export declare function isPolarAxisSeries(type: string): boolean;
|
|
5
6
|
export declare function sortDataInAxisHelper(axisHelper: CartesianHelper | IPolarAxisHelper, field: string, dataList: Datum[]): void;
|
|
7
|
+
export declare function getGroupAnimationParams(series: ICartesianSeries): {
|
|
8
|
+
dataIndex: (datum: any) => any;
|
|
9
|
+
dataCount: () => any;
|
|
10
|
+
};
|
|
@@ -9,8 +9,7 @@ import type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark'
|
|
|
9
9
|
import type { Datum, StringOrNumber } from './common';
|
|
10
10
|
import type { IPadding } from '@visactor/vutils';
|
|
11
11
|
import type { IColorKey } from '../theme/color-scheme/interface';
|
|
12
|
-
import type { IRepeatType, TextAlignType, TextBaselineType } from '@visactor/vrender-core';
|
|
13
|
-
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
12
|
+
import type { IRepeatType, TextAlignType, TextBaselineType, IRichTextCharacter } from '@visactor/vrender-core';
|
|
14
13
|
export interface IVisualSpecBase<D, T> {
|
|
15
14
|
type: ScaleType;
|
|
16
15
|
domain: D[];
|
|
@@ -74,6 +73,7 @@ export interface ICommonSpec {
|
|
|
74
73
|
anchor3d?: [number, number];
|
|
75
74
|
pickMode?: 'accurate' | 'imprecise' | 'custom';
|
|
76
75
|
boundsMode?: 'accurate' | 'imprecise';
|
|
76
|
+
pickStrokeBuffer?: number;
|
|
77
77
|
texture?: TextureType | string;
|
|
78
78
|
textureColor?: string;
|
|
79
79
|
textureSize?: number;
|
|
@@ -128,6 +128,7 @@ export interface ITextMarkSpec extends IFillMarkSpec {
|
|
|
128
128
|
fontStyle?: FontStyle;
|
|
129
129
|
maxLineWidth?: number;
|
|
130
130
|
ellipsis?: string;
|
|
131
|
+
suffixPosition?: 'start' | 'end' | 'middle';
|
|
131
132
|
lineBreak?: string;
|
|
132
133
|
underline?: boolean;
|
|
133
134
|
lineThrough?: boolean;
|