@visactor/vchart-types 1.9.3 → 1.9.4-alpha.1
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/chart/base/base-chart.d.ts +1 -1
- package/types/component/axis/base-axis.d.ts +1 -53
- package/types/component/axis/polar/util/common.d.ts +5 -1
- package/types/component/base/base-component.d.ts +1 -1
- package/types/component/custom-mark/custom-mark.d.ts +1 -2
- package/types/component/legend/discrete/interface.d.ts +1 -0
- package/types/component/legend/util.d.ts +1 -1
- package/types/component/tooltip/interface/common.d.ts +1 -1
- package/types/data/transforms/dimension-statistics.d.ts +2 -0
- package/types/data/transforms/funnel.d.ts +1 -1
- package/types/event/interface.d.ts +2 -1
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -1
- package/types/series/cartesian/cartesian.d.ts +1 -2
- package/types/series/line/interface.d.ts +1 -1
- package/types/series/sankey/interface.d.ts +2 -2
- package/types/typings/spec/common.d.ts +20 -20
- package/types/typings/tooltip/position.d.ts +2 -19
|
@@ -10,7 +10,7 @@ import type { IComponent, IComponentConstructor } from '../../component/interfac
|
|
|
10
10
|
import type { IMark } from '../../mark/interface';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
12
12
|
import type { DataView } from '@visactor/vdataset';
|
|
13
|
-
import type { DataSet } from '@visactor/vdataset
|
|
13
|
+
import type { DataSet } from '@visactor/vdataset';
|
|
14
14
|
import { Stack } from '../stack';
|
|
15
15
|
import type { IParserOptions } from '@visactor/vdataset/es/parser';
|
|
16
16
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
@@ -74,59 +74,7 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
74
74
|
};
|
|
75
75
|
protected getLabelFormatMethod(): (value: any, datum: any, index: number) => any;
|
|
76
76
|
protected _delegateAxisContainerEvent(component: IGroup): void;
|
|
77
|
-
protected _getAxisAttributes():
|
|
78
|
-
orient: IOrientType | IPolarOrientType;
|
|
79
|
-
select: boolean;
|
|
80
|
-
hover: boolean;
|
|
81
|
-
line: any;
|
|
82
|
-
label: {
|
|
83
|
-
style: any;
|
|
84
|
-
formatMethod: (value: any, datum: any, index: number) => any;
|
|
85
|
-
state: {};
|
|
86
|
-
};
|
|
87
|
-
tick: {
|
|
88
|
-
visible: boolean;
|
|
89
|
-
length?: undefined;
|
|
90
|
-
inside?: undefined;
|
|
91
|
-
alignWithLabel?: undefined;
|
|
92
|
-
style?: undefined;
|
|
93
|
-
state?: undefined;
|
|
94
|
-
dataFilter?: undefined;
|
|
95
|
-
} | {
|
|
96
|
-
visible: true;
|
|
97
|
-
length: number;
|
|
98
|
-
inside: boolean;
|
|
99
|
-
alignWithLabel: boolean;
|
|
100
|
-
style: any;
|
|
101
|
-
state: {};
|
|
102
|
-
dataFilter: (data: import("@visactor/vrender-components").AxisItem[]) => import("@visactor/vrender-components").AxisItem[];
|
|
103
|
-
};
|
|
104
|
-
subTick: {
|
|
105
|
-
visible: boolean;
|
|
106
|
-
length?: undefined;
|
|
107
|
-
inside?: undefined;
|
|
108
|
-
count?: undefined;
|
|
109
|
-
style?: undefined;
|
|
110
|
-
state?: undefined;
|
|
111
|
-
} | {
|
|
112
|
-
visible: true;
|
|
113
|
-
length: number;
|
|
114
|
-
inside: boolean;
|
|
115
|
-
count: number;
|
|
116
|
-
style: any;
|
|
117
|
-
state: {};
|
|
118
|
-
};
|
|
119
|
-
title: any;
|
|
120
|
-
panel: {
|
|
121
|
-
visible: boolean;
|
|
122
|
-
style?: undefined;
|
|
123
|
-
state?: undefined;
|
|
124
|
-
} | {
|
|
125
|
-
visible: any;
|
|
126
|
-
style: any;
|
|
127
|
-
state: {};
|
|
128
|
-
};
|
|
129
|
-
};
|
|
77
|
+
protected _getAxisAttributes(): any;
|
|
130
78
|
protected _getGridAttributes(): {
|
|
131
79
|
alternateColor: any;
|
|
132
80
|
alignWithLabel: any;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { IPolarAxisCommonSpec } from '../interface';
|
|
2
|
-
export declare const getPolarAxisInfo: (spec: IPolarAxisCommonSpec) => {
|
|
2
|
+
export declare const getPolarAxisInfo: (spec: IPolarAxisCommonSpec, chartSpec: any) => {
|
|
3
3
|
axisType: import("../..").AxisType;
|
|
4
4
|
componentName: string;
|
|
5
|
+
startAngle: any;
|
|
6
|
+
endAngle: any;
|
|
7
|
+
center: any;
|
|
8
|
+
outerRadius: any;
|
|
5
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IGraphic, type IGroup } from '@visactor/vrender-core';
|
|
2
2
|
import type { IRegion } from '../../region/interface';
|
|
3
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
4
4
|
import type { IComponentPluginService, IComponentPlugin } from '../../plugin/components/interface';
|
|
@@ -3,7 +3,6 @@ import { ComponentTypeEnum } from '../interface/type';
|
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
5
5
|
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec } from '../../typings';
|
|
6
|
-
import type { MarkTypeEnum } from '../../mark/interface';
|
|
7
6
|
import type { Maybe } from '@visactor/vutils';
|
|
8
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
9
8
|
export declare class CustomMark<T = any> extends BaseComponent<any> {
|
|
@@ -14,7 +13,7 @@ export declare class CustomMark<T = any> extends BaseComponent<any> {
|
|
|
14
13
|
layoutType: 'none';
|
|
15
14
|
layoutZIndex: number;
|
|
16
15
|
layoutLevel: number;
|
|
17
|
-
protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType,
|
|
16
|
+
protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType, 'group'>> | ICustomMarkGroupSpec)[];
|
|
18
17
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
19
18
|
created(): void;
|
|
20
19
|
protected initMarks(): void;
|
|
@@ -57,5 +57,6 @@ export type IDiscreteLegendSpec = ILegendCommonSpec & {
|
|
|
57
57
|
pager?: IPager;
|
|
58
58
|
scaleName?: string;
|
|
59
59
|
field?: string;
|
|
60
|
+
defaultSelected?: string[];
|
|
60
61
|
} & Omit<DiscreteLegendAttrs, 'layout' | 'title' | 'items' | 'item' | 'pager'>;
|
|
61
62
|
export type IDiscreteLegendTheme = Omit<IDiscreteLegendSpec, 'type' | 'data' | 'regionIndex' | 'regionId' | 'seriesIndex' | 'seriesId' | 'id' | 'defaultSelected'>;
|
|
@@ -23,7 +23,7 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
23
23
|
text: import("@visactor/vrender-core").IRichTextCharacter[];
|
|
24
24
|
};
|
|
25
25
|
visible?: boolean;
|
|
26
|
-
padding?: import("@visactor/vrender-components
|
|
26
|
+
padding?: import("@visactor/vrender-components").Padding;
|
|
27
27
|
maxWidth?: number;
|
|
28
28
|
minWidth?: number;
|
|
29
29
|
space?: number;
|
|
@@ -14,7 +14,7 @@ export type TotalMouseEventData = {
|
|
|
14
14
|
tooltipInfo: Partial<ITooltipActiveTypeAsKeys<MarkTooltipInfo, DimensionTooltipInfo>>;
|
|
15
15
|
ignore: Partial<ITooltipActiveTypeAsKeys<boolean, boolean>>;
|
|
16
16
|
};
|
|
17
|
-
export declare enum TooltipResult {
|
|
17
|
+
export declare const enum TooltipResult {
|
|
18
18
|
success = 0,
|
|
19
19
|
failed = 1
|
|
20
20
|
}
|
|
@@ -6,6 +6,7 @@ export interface IStatisticsOption {
|
|
|
6
6
|
fields: {
|
|
7
7
|
key: string;
|
|
8
8
|
operations: StatisticOperations;
|
|
9
|
+
filter?: (fv: any) => boolean;
|
|
9
10
|
customize?: {
|
|
10
11
|
max: number;
|
|
11
12
|
min: number;
|
|
@@ -17,6 +18,7 @@ export declare const dimensionStatistics: (data: Array<DataView>, op: IStatistic
|
|
|
17
18
|
export declare const dimensionStatisticsOfSimpleData: (latestData: Datum[], fields: {
|
|
18
19
|
key: string;
|
|
19
20
|
operations: StatisticOperations;
|
|
21
|
+
filter?: (fv: any) => boolean;
|
|
20
22
|
customize?: {
|
|
21
23
|
max: number;
|
|
22
24
|
min: number;
|
|
@@ -24,7 +24,7 @@ export declare const funnel: (originData: Array<DataView>, op: IFunnelOpt) => {
|
|
|
24
24
|
type: import("@visactor/vdataset/es/constants").DATAVIEW_TYPE;
|
|
25
25
|
name: string | number;
|
|
26
26
|
target: any;
|
|
27
|
-
parseOption: import("@visactor/vdataset
|
|
27
|
+
parseOption: import("@visactor/vdataset").IParserOptions;
|
|
28
28
|
transformsArr: import("@visactor/vdataset").ITransformOptions[];
|
|
29
29
|
isRunning: boolean;
|
|
30
30
|
rawData: any;
|
|
@@ -128,7 +128,8 @@ export type EventParamsDefinition = {
|
|
|
128
128
|
pinchstart: BaseEventParams;
|
|
129
129
|
pinchend: BaseEventParams;
|
|
130
130
|
swipe: BaseEventParams;
|
|
131
|
-
|
|
131
|
+
dimensionHover: DimensionEventParams;
|
|
132
|
+
dimensionClick: DimensionEventParams;
|
|
132
133
|
tooltipShow: TooltipEventParams;
|
|
133
134
|
tooltipHide: TooltipEventParams;
|
|
134
135
|
tooltipRelease: TooltipEventParams;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TooltipFixedPosition } from '../../../../typings/tooltip/position';
|
|
1
|
+
import type { TooltipFixedPosition } from '../../../../typings/tooltip/position';
|
|
2
2
|
export declare const getActualTooltipPositionValue: (position: number | ((event: MouseEvent) => number), event: MouseEvent) => number;
|
|
3
3
|
export type TooltipHorizontalPositionType = 'left' | 'right' | 'middle';
|
|
4
4
|
export type TooltipVerticalPositionType = 'top' | 'bottom' | 'middle';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { DataView } from '@visactor/vdataset';
|
|
2
1
|
import type { ICartesianSeries } from '../interface';
|
|
3
2
|
import { BaseSeries } from '../base/base-series';
|
|
4
3
|
import type { IPoint } from '../../typings/coordinate';
|
|
@@ -98,7 +97,7 @@ export declare abstract class CartesianSeries<T extends ICartesianSeriesSpec = I
|
|
|
98
97
|
getDimensionField(): string[];
|
|
99
98
|
getDimensionContinuousField(): string[];
|
|
100
99
|
getMeasureField(): string[];
|
|
101
|
-
|
|
100
|
+
protected initEvent(): void;
|
|
102
101
|
_sortDataInAxisDomain(): void;
|
|
103
102
|
protected _getInvalidDefined: (datum: Datum) => boolean;
|
|
104
103
|
reInit(spec: T): void;
|
|
@@ -16,7 +16,7 @@ export interface ILineSeriesSpec extends ICartesianSeriesSpec, IAnimationSpec<Li
|
|
|
16
16
|
[SeriesMarkNameEnum.line]?: IMarkSpec<ILineMarkSpec>;
|
|
17
17
|
[SeriesMarkNameEnum.label]?: ILineLikeLabelSpec;
|
|
18
18
|
[SeriesMarkNameEnum.lineLabel]?: Omit<ILabelSpec, 'position'> & {
|
|
19
|
-
position
|
|
19
|
+
position?: 'start' | 'end';
|
|
20
20
|
};
|
|
21
21
|
seriesMark?: 'line' | 'point';
|
|
22
22
|
activePoint?: boolean;
|
|
@@ -33,8 +33,8 @@ export interface ISankeySeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimation
|
|
|
33
33
|
effect: 'self' | 'adjacency' | 'related';
|
|
34
34
|
};
|
|
35
35
|
[SeriesMarkNameEnum.label]?: ILabelSpec & {
|
|
36
|
-
position
|
|
37
|
-
limit
|
|
36
|
+
position?: 'outside' | 'inside-start' | 'inside-middle' | 'inside-end' | 'left' | 'right';
|
|
37
|
+
limit?: number;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
export interface SankeyLinkDatum {
|
|
@@ -159,7 +159,7 @@ export interface ISeriesSpec extends IInteractionSpec {
|
|
|
159
159
|
animationThreshold?: number;
|
|
160
160
|
support3d?: boolean;
|
|
161
161
|
morph?: IMorphSeriesSpec;
|
|
162
|
-
extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType,
|
|
162
|
+
extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[];
|
|
163
163
|
}
|
|
164
164
|
export type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph' | 'stackValue'>;
|
|
165
165
|
export type AdaptiveSpec<T, K extends keyof any> = {
|
|
@@ -236,24 +236,24 @@ export interface IPerformanceHook {
|
|
|
236
236
|
afterVRenderDraw?: () => void;
|
|
237
237
|
}
|
|
238
238
|
export type IBuildinMarkSpec = {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
239
|
+
group: IGroupMarkSpec;
|
|
240
|
+
symbol: ISymbolMarkSpec;
|
|
241
|
+
rule: IRuleMarkSpec;
|
|
242
|
+
line: ILineMarkSpec;
|
|
243
|
+
text: ITextMarkSpec;
|
|
244
|
+
rect: IRectMarkSpec;
|
|
245
|
+
rect3d: IRect3dMarkSpec;
|
|
246
|
+
image: IImageMarkSpec;
|
|
247
|
+
path: IPathMarkSpec;
|
|
248
|
+
area: IAreaMarkSpec;
|
|
249
|
+
arc: IArcMarkSpec;
|
|
250
|
+
arc3d: IArc3dMarkSpec;
|
|
251
|
+
polygon: IPolygonMarkSpec;
|
|
252
|
+
pyramid3d: IPyramid3dMarkSpec;
|
|
253
|
+
boxPlot: IBoxPlotMarkSpec;
|
|
254
|
+
linkPath: ILinkPathMarkSpec;
|
|
255
|
+
progressArc: IProgressArcMarkSpec;
|
|
256
|
+
ripple: IRippleMarkSpec;
|
|
257
257
|
};
|
|
258
258
|
export type EnableMarkType = keyof IBuildinMarkSpec;
|
|
259
259
|
export interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {
|
|
@@ -265,7 +265,7 @@ export interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBu
|
|
|
265
265
|
export interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group> {
|
|
266
266
|
children?: ICustomMarkSpec<EnableMarkType>[];
|
|
267
267
|
}
|
|
268
|
-
export interface IExtensionMarkSpec<T extends Exclude<EnableMarkType,
|
|
268
|
+
export interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, 'group'>> extends ICustomMarkSpec<T> {
|
|
269
269
|
dataIndex?: number;
|
|
270
270
|
dataId?: StringOrNumber;
|
|
271
271
|
componentType?: string;
|
|
@@ -5,25 +5,8 @@ export interface ITooltipPositionPattern {
|
|
|
5
5
|
top?: number | ITooltipPositionCallback;
|
|
6
6
|
bottom?: number | ITooltipPositionCallback;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
bottom = "bottom",
|
|
11
|
-
left = "left",
|
|
12
|
-
right = "right",
|
|
13
|
-
tl = "tl",
|
|
14
|
-
lt = "lt",
|
|
15
|
-
tr = "tr",
|
|
16
|
-
rt = "rt",
|
|
17
|
-
bl = "bl",
|
|
18
|
-
lb = "lb",
|
|
19
|
-
br = "br",
|
|
20
|
-
rb = "rb",
|
|
21
|
-
inside = "inside"
|
|
22
|
-
}
|
|
23
|
-
export declare const enum TooltipPositionMode {
|
|
24
|
-
pointer = "pointer",
|
|
25
|
-
mark = "mark"
|
|
26
|
-
}
|
|
8
|
+
export type TooltipFixedPosition = 'top' | 'bottom' | 'left' | 'right' | 'tl' | 'lt' | 'tr' | 'rt' | 'bl' | 'lb' | 'br' | 'rb' | 'inside';
|
|
9
|
+
export type TooltipPositionMode = 'pointer' | 'mark';
|
|
27
10
|
export type TooltipPosition = ITooltipPositionPattern | TooltipFixedPosition;
|
|
28
11
|
export interface ITooltipPositionActual {
|
|
29
12
|
x: number;
|