@visactor/vchart-types 1.9.4-alpha.1 → 1.9.4-alpha.2
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 +53 -1
- package/types/component/axis/polar/util/common.d.ts +1 -5
- package/types/component/base/base-component.d.ts +1 -1
- package/types/component/custom-mark/custom-mark.d.ts +2 -1
- package/types/component/legend/discrete/interface.d.ts +0 -1
- 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 +0 -2
- package/types/data/transforms/funnel.d.ts +1 -1
- package/types/event/interface.d.ts +1 -2
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -1
- package/types/series/cartesian/cartesian.d.ts +2 -1
- 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 +19 -2
|
@@ -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/es/data-set';
|
|
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,7 +74,59 @@ 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():
|
|
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
|
+
};
|
|
78
130
|
protected _getGridAttributes(): {
|
|
79
131
|
alternateColor: any;
|
|
80
132
|
alignWithLabel: any;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { IPolarAxisCommonSpec } from '../interface';
|
|
2
|
-
export declare const getPolarAxisInfo: (spec: IPolarAxisCommonSpec
|
|
2
|
+
export declare const getPolarAxisInfo: (spec: IPolarAxisCommonSpec) => {
|
|
3
3
|
axisType: import("../..").AxisType;
|
|
4
4
|
componentName: string;
|
|
5
|
-
startAngle: any;
|
|
6
|
-
endAngle: any;
|
|
7
|
-
center: any;
|
|
8
|
-
outerRadius: any;
|
|
9
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IGraphic, 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,6 +3,7 @@ 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';
|
|
6
7
|
import type { Maybe } from '@visactor/vutils';
|
|
7
8
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
9
|
export declare class CustomMark<T = any> extends BaseComponent<any> {
|
|
@@ -13,7 +14,7 @@ export declare class CustomMark<T = any> extends BaseComponent<any> {
|
|
|
13
14
|
layoutType: 'none';
|
|
14
15
|
layoutZIndex: number;
|
|
15
16
|
layoutLevel: number;
|
|
16
|
-
protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType,
|
|
17
|
+
protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | ICustomMarkGroupSpec)[];
|
|
17
18
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
18
19
|
created(): void;
|
|
19
20
|
protected initMarks(): void;
|
|
@@ -57,6 +57,5 @@ export type IDiscreteLegendSpec = ILegendCommonSpec & {
|
|
|
57
57
|
pager?: IPager;
|
|
58
58
|
scaleName?: string;
|
|
59
59
|
field?: string;
|
|
60
|
-
defaultSelected?: string[];
|
|
61
60
|
} & Omit<DiscreteLegendAttrs, 'layout' | 'title' | 'items' | 'item' | 'pager'>;
|
|
62
61
|
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").Padding;
|
|
26
|
+
padding?: import("@visactor/vrender-components/es/core/type").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
|
|
17
|
+
export declare enum TooltipResult {
|
|
18
18
|
success = 0,
|
|
19
19
|
failed = 1
|
|
20
20
|
}
|
|
@@ -6,7 +6,6 @@ export interface IStatisticsOption {
|
|
|
6
6
|
fields: {
|
|
7
7
|
key: string;
|
|
8
8
|
operations: StatisticOperations;
|
|
9
|
-
filter?: (fv: any) => boolean;
|
|
10
9
|
customize?: {
|
|
11
10
|
max: number;
|
|
12
11
|
min: number;
|
|
@@ -18,7 +17,6 @@ export declare const dimensionStatistics: (data: Array<DataView>, op: IStatistic
|
|
|
18
17
|
export declare const dimensionStatisticsOfSimpleData: (latestData: Datum[], fields: {
|
|
19
18
|
key: string;
|
|
20
19
|
operations: StatisticOperations;
|
|
21
|
-
filter?: (fv: any) => boolean;
|
|
22
20
|
customize?: {
|
|
23
21
|
max: number;
|
|
24
22
|
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").IParserOptions;
|
|
27
|
+
parseOption: import("@visactor/vdataset/es/parser").IParserOptions;
|
|
28
28
|
transformsArr: import("@visactor/vdataset").ITransformOptions[];
|
|
29
29
|
isRunning: boolean;
|
|
30
30
|
rawData: any;
|
|
@@ -128,8 +128,7 @@ export type EventParamsDefinition = {
|
|
|
128
128
|
pinchstart: BaseEventParams;
|
|
129
129
|
pinchend: BaseEventParams;
|
|
130
130
|
swipe: BaseEventParams;
|
|
131
|
-
|
|
132
|
-
dimensionClick: DimensionEventParams;
|
|
131
|
+
dimension: DimensionEventParams;
|
|
133
132
|
tooltipShow: TooltipEventParams;
|
|
134
133
|
tooltipHide: TooltipEventParams;
|
|
135
134
|
tooltipRelease: TooltipEventParams;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { 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,3 +1,4 @@
|
|
|
1
|
+
import type { DataView } from '@visactor/vdataset';
|
|
1
2
|
import type { ICartesianSeries } from '../interface';
|
|
2
3
|
import { BaseSeries } from '../base/base-series';
|
|
3
4
|
import type { IPoint } from '../../typings/coordinate';
|
|
@@ -97,7 +98,7 @@ export declare abstract class CartesianSeries<T extends ICartesianSeriesSpec = I
|
|
|
97
98
|
getDimensionField(): string[];
|
|
98
99
|
getDimensionContinuousField(): string[];
|
|
99
100
|
getMeasureField(): string[];
|
|
100
|
-
|
|
101
|
+
viewDataUpdate(d: DataView): void;
|
|
101
102
|
_sortDataInAxisDomain(): void;
|
|
102
103
|
protected _getInvalidDefined: (datum: Datum) => boolean;
|
|
103
104
|
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, MarkTypeEnum.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
|
-
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;
|
|
239
|
+
[MarkTypeEnum.group]: IGroupMarkSpec;
|
|
240
|
+
[MarkTypeEnum.symbol]: ISymbolMarkSpec;
|
|
241
|
+
[MarkTypeEnum.rule]: IRuleMarkSpec;
|
|
242
|
+
[MarkTypeEnum.line]: ILineMarkSpec;
|
|
243
|
+
[MarkTypeEnum.text]: ITextMarkSpec;
|
|
244
|
+
[MarkTypeEnum.rect]: IRectMarkSpec;
|
|
245
|
+
[MarkTypeEnum.rect3d]: IRect3dMarkSpec;
|
|
246
|
+
[MarkTypeEnum.image]: IImageMarkSpec;
|
|
247
|
+
[MarkTypeEnum.path]: IPathMarkSpec;
|
|
248
|
+
[MarkTypeEnum.area]: IAreaMarkSpec;
|
|
249
|
+
[MarkTypeEnum.arc]: IArcMarkSpec;
|
|
250
|
+
[MarkTypeEnum.arc3d]: IArc3dMarkSpec;
|
|
251
|
+
[MarkTypeEnum.polygon]: IPolygonMarkSpec;
|
|
252
|
+
[MarkTypeEnum.pyramid3d]: IPyramid3dMarkSpec;
|
|
253
|
+
[MarkTypeEnum.boxPlot]: IBoxPlotMarkSpec;
|
|
254
|
+
[MarkTypeEnum.linkPath]: ILinkPathMarkSpec;
|
|
255
|
+
[MarkTypeEnum.progressArc]: IProgressArcMarkSpec;
|
|
256
|
+
[MarkTypeEnum.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, MarkTypeEnum.group>> extends ICustomMarkSpec<T> {
|
|
269
269
|
dataIndex?: number;
|
|
270
270
|
dataId?: StringOrNumber;
|
|
271
271
|
componentType?: string;
|
|
@@ -5,8 +5,25 @@ export interface ITooltipPositionPattern {
|
|
|
5
5
|
top?: number | ITooltipPositionCallback;
|
|
6
6
|
bottom?: number | ITooltipPositionCallback;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export declare const enum TooltipFixedPosition {
|
|
9
|
+
top = "top",
|
|
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
|
+
}
|
|
10
27
|
export type TooltipPosition = ITooltipPositionPattern | TooltipFixedPosition;
|
|
11
28
|
export interface ITooltipPositionActual {
|
|
12
29
|
x: number;
|