@visactor/vchart-types 1.10.0-alpha.4 → 1.10.0-alpha.5
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/chart/base/base-chart.d.ts +1 -1
- package/types/chart/interface/chart.d.ts +1 -1
- package/types/compile/compiler.d.ts +1 -1
- package/types/component/axis/base-axis.d.ts +9 -6
- package/types/component/axis/cartesian/axis.d.ts +1 -5
- package/types/component/axis/cartesian/time-axis.d.ts +1 -1
- package/types/component/axis/cartesian/util/index.d.ts +0 -1
- package/types/component/axis/interface/common.d.ts +2 -1
- package/types/component/axis/interface/spec.d.ts +2 -0
- package/types/component/axis/polar/axis.d.ts +1 -5
- package/types/component/base/util.d.ts +5 -0
- package/types/component/crosshair/base.d.ts +4 -1
- package/types/component/crosshair/cartesian.d.ts +1 -7
- package/types/component/crosshair/interface/cartesian.d.ts +46 -0
- package/types/component/crosshair/interface/common.d.ts +7 -0
- package/types/component/crosshair/interface/index.d.ts +3 -0
- package/types/component/crosshair/interface/polar.d.ts +23 -0
- package/types/component/crosshair/interface/spec.d.ts +1 -0
- package/types/component/crosshair/polar.d.ts +2 -2
- package/types/component/crosshair/utils/cartesian.d.ts +32 -0
- package/types/component/crosshair/utils/common.d.ts +9 -0
- package/types/component/crosshair/utils/index.d.ts +1 -0
- package/types/component/crosshair/utils/polar.d.ts +37 -0
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
- package/types/component/data-zoom/data-zoom/interface.d.ts +4 -5
- package/types/component/data-zoom/scroll-bar/interface.d.ts +2 -4
- package/types/component/data-zoom/util.d.ts +0 -4
- package/types/component/index.d.ts +1 -0
- package/types/component/interface/theme.d.ts +8 -0
- package/types/component/label/interface.d.ts +1 -1
- package/types/component/legend/continuous/interface.d.ts +6 -12
- package/types/component/legend/discrete/interface.d.ts +17 -4
- package/types/component/legend/discrete/legend.d.ts +1 -0
- package/types/component/legend/util.d.ts +1 -2
- package/types/component/player/interface/theme.d.ts +1 -1
- package/types/component/tooltip/interface/common.d.ts +2 -2
- package/types/component/tooltip/interface/event.d.ts +0 -2
- package/types/component/tooltip/interface/index.d.ts +1 -0
- package/types/component/tooltip/interface/spec.d.ts +2 -2
- package/types/component/tooltip/interface/theme.d.ts +3 -3
- package/types/component/tooltip/tooltip.d.ts +3 -3
- package/types/component/util.d.ts +8 -0
- package/types/core/factory.d.ts +3 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +1 -1
- package/types/core/vchart.d.ts +2 -1
- package/types/event/events/dimension/interface.d.ts +3 -2
- package/types/index.d.ts +1 -0
- package/types/mark/base/base-mark.d.ts +3 -3
- package/types/mark/index.d.ts +2 -3
- package/types/mark/interface/type.d.ts +0 -1
- package/types/plugin/chart/formatter/formatter.d.ts +28 -0
- package/types/plugin/chart/formatter/index.d.ts +1 -0
- package/types/plugin/components/index.d.ts +2 -5
- package/types/plugin/components/tooltip-handler/base.d.ts +6 -6
- package/types/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/constants.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +8 -4
- package/types/plugin/components/tooltip-handler/dom/model/base-tooltip-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-column-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/interface.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/common.d.ts +3 -3
- package/types/plugin/components/tooltip-handler/utils/compose.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +18 -3
- package/types/plugin/index.d.ts +1 -0
- package/types/series/base/tooltip-helper.d.ts +3 -3
- package/types/series/gauge/interface.d.ts +3 -3
- package/types/series/interface/common.d.ts +1 -1
- package/types/series/progress/circular/interface.d.ts +5 -5
- package/types/series/sunburst/sunburst.d.ts +1 -1
- package/types/typings/spec/common.d.ts +4 -3
- package/types/typings/tooltip/line.d.ts +5 -2
- package/types/typings/tooltip/position.d.ts +21 -10
- package/types/typings/tooltip/shape.d.ts +2 -2
- package/types/typings/tooltip/tooltip.d.ts +8 -8
- package/types/typings/visual.d.ts +2 -4
- package/types/util/index.d.ts +1 -2
|
@@ -7,14 +7,14 @@ import type { IHoverSpec, ISelectSpec, IInteractionSpec } from '../../interactio
|
|
|
7
7
|
import type { IRenderOption } from '../../compile/interface';
|
|
8
8
|
import type { ITooltipSpec } from '../../component/tooltip/interface';
|
|
9
9
|
import type { ILayoutSpec } from '../../layout/interface';
|
|
10
|
-
import type { ConvertToMarkStyleSpec, IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICommonSpec, IGroupMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec,
|
|
10
|
+
import type { ConvertToMarkStyleSpec, IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICommonSpec, IGroupMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IRuleMarkSpec, ISymbolMarkSpec, IRippleMarkSpec, ITextMarkSpec, IVisualSpecScale } from '../visual';
|
|
11
11
|
import type { StateValue } from '../../compile/mark';
|
|
12
12
|
import type { ISeriesStyle, SeriesType } from '../../series/interface';
|
|
13
13
|
import type { Datum, StringOrNumber } from '../common';
|
|
14
14
|
import type { IInvalidType } from '../data';
|
|
15
15
|
import type { IMorphSeriesSpec } from '../../animation/spec';
|
|
16
16
|
import type { IPlayer } from '../../component/player';
|
|
17
|
-
import { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';
|
|
17
|
+
import type { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';
|
|
18
18
|
import type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';
|
|
19
19
|
import type { ICrosshairSpec } from '../../component/crosshair/interface';
|
|
20
20
|
import type { ITheme } from '../../theme';
|
|
@@ -252,13 +252,13 @@ export type IBuildinMarkSpec = {
|
|
|
252
252
|
pyramid3d: IPyramid3dMarkSpec;
|
|
253
253
|
boxPlot: IBoxPlotMarkSpec;
|
|
254
254
|
linkPath: ILinkPathMarkSpec;
|
|
255
|
-
progressArc: IProgressArcMarkSpec;
|
|
256
255
|
ripple: IRippleMarkSpec;
|
|
257
256
|
};
|
|
258
257
|
export type EnableMarkType = keyof IBuildinMarkSpec;
|
|
259
258
|
export interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {
|
|
260
259
|
type: T;
|
|
261
260
|
dataIndex?: number;
|
|
261
|
+
dataKey?: string | ((datum: any) => string);
|
|
262
262
|
dataId?: StringOrNumber;
|
|
263
263
|
componentType?: string;
|
|
264
264
|
}
|
|
@@ -267,6 +267,7 @@ export interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group
|
|
|
267
267
|
}
|
|
268
268
|
export interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, 'group'>> extends ICustomMarkSpec<T> {
|
|
269
269
|
dataIndex?: number;
|
|
270
|
+
dataKey?: string | ((datum: any) => string);
|
|
270
271
|
dataId?: StringOrNumber;
|
|
271
272
|
componentType?: string;
|
|
272
273
|
}
|
|
@@ -2,9 +2,11 @@ import type { TooltipContentProperty } from './common';
|
|
|
2
2
|
import type { ITooltipLabelActual, ITooltipLabelPattern } from './label';
|
|
3
3
|
import type { ITooltipShapeActual, ITooltipShapePattern } from './shape';
|
|
4
4
|
import type { TooltipRichTextAttrs } from '@visactor/vrender-components';
|
|
5
|
-
export interface
|
|
5
|
+
export interface ITooltipLinePattern extends ITooltipShapePattern, ITooltipLabelPattern {
|
|
6
6
|
key?: TooltipContentProperty<string>;
|
|
7
|
+
keyFormatter?: string;
|
|
7
8
|
value?: TooltipContentProperty<string | TooltipRichTextAttrs>;
|
|
9
|
+
valueFormatter?: string;
|
|
8
10
|
visible?: TooltipContentProperty<boolean>;
|
|
9
11
|
isKeyAdaptive?: TooltipContentProperty<boolean>;
|
|
10
12
|
spaceRow?: TooltipContentProperty<number>;
|
|
@@ -13,9 +15,10 @@ export interface IToolTipLinePattern extends ITooltipShapePattern, ITooltipLabel
|
|
|
13
15
|
valueTimeFormat?: string;
|
|
14
16
|
valueTimeFormatMode?: 'utc' | 'local';
|
|
15
17
|
}
|
|
16
|
-
export interface
|
|
18
|
+
export interface ITooltipLineActual extends ITooltipShapeActual, ITooltipLabelActual {
|
|
17
19
|
key?: string;
|
|
18
20
|
value?: string | TooltipRichTextAttrs;
|
|
21
|
+
valueFormatter?: string;
|
|
19
22
|
visible?: boolean;
|
|
20
23
|
isKeyAdaptive?: boolean;
|
|
21
24
|
spaceRow?: number;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
1
|
+
export type TooltipPositionCallback<T> = (event: MouseEvent) => T;
|
|
2
|
+
export type TooltipPositionValue = number | TooltipPositionCallback<number>;
|
|
3
|
+
export interface ITooltipPositionFixedValue {
|
|
4
|
+
orient: TooltipFixedPosition;
|
|
5
|
+
mode: TooltipPositionMode;
|
|
6
|
+
offset?: number;
|
|
7
|
+
}
|
|
8
|
+
export type TooltipPositionPatternItem = TooltipPositionValue | ITooltipPositionFixedValue;
|
|
9
|
+
export type TooltipFixedPosition = 'top' | 'bottom' | 'left' | 'right' | 'tl' | 'lt' | 'tr' | 'rt' | 'bl' | 'lb' | 'br' | 'rb' | 'center' | 'centerTop' | 'centerBottom' | 'centerLeft' | 'centerRight' | 'inside';
|
|
10
|
+
export type TooltipPositionMode = 'pointer' | 'mark' | 'crosshair';
|
|
11
|
+
export interface IGlobalTooltipPositionPattern {
|
|
12
|
+
left?: TooltipPositionValue;
|
|
13
|
+
right?: TooltipPositionValue;
|
|
14
|
+
top?: TooltipPositionValue;
|
|
15
|
+
bottom?: TooltipPositionValue;
|
|
16
|
+
}
|
|
17
|
+
export interface IFixedTooltipPositionPattern {
|
|
18
|
+
x: TooltipPositionPatternItem;
|
|
19
|
+
y: TooltipPositionPatternItem;
|
|
20
|
+
}
|
|
21
|
+
export type TooltipPosition = IGlobalTooltipPositionPattern | IFixedTooltipPositionPattern | TooltipFixedPosition;
|
|
11
22
|
export interface ITooltipPositionActual {
|
|
12
23
|
x: number;
|
|
13
24
|
y: number;
|
|
@@ -8,8 +8,8 @@ export interface ITooltipShapePattern {
|
|
|
8
8
|
shapeStroke?: TooltipContentProperty<string>;
|
|
9
9
|
shapeLineWidth?: TooltipContentProperty<number>;
|
|
10
10
|
shapeSize?: TooltipContentProperty<number>;
|
|
11
|
+
shapeHollow?: TooltipContentProperty<boolean>;
|
|
11
12
|
shapeColor?: TooltipContentProperty<string>;
|
|
12
|
-
shapeHollow?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface ITooltipShapeActual {
|
|
15
15
|
hasShape?: boolean;
|
|
@@ -18,6 +18,6 @@ export interface ITooltipShapeActual {
|
|
|
18
18
|
shapeStroke?: string;
|
|
19
19
|
shapeLineWidth?: number;
|
|
20
20
|
shapeSize?: number;
|
|
21
|
-
shapeColor?: string;
|
|
22
21
|
shapeHollow?: boolean;
|
|
22
|
+
shapeColor?: string;
|
|
23
23
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import type { MaybeArray } from '../common';
|
|
2
2
|
import type { TooltipPatternProperty, TooltipUpdateCallback } from './common';
|
|
3
3
|
import type { TooltipActiveType, TooltipData } from './handler';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ITooltipLineActual, ITooltipLinePattern } from './line';
|
|
5
5
|
import type { ITooltipPositionActual, TooltipPositionMode, TooltipPosition } from './position';
|
|
6
6
|
import type { ITooltipShapePattern } from './shape';
|
|
7
7
|
export interface ITooltipPattern extends ITooltipShapePattern {
|
|
8
8
|
visible?: TooltipPatternProperty<boolean>;
|
|
9
|
-
title?: TooltipPatternProperty<
|
|
10
|
-
content?: MaybeArray<TooltipPatternProperty<MaybeArray<
|
|
9
|
+
title?: TooltipPatternProperty<ITooltipLinePattern>;
|
|
10
|
+
content?: MaybeArray<TooltipPatternProperty<MaybeArray<ITooltipLinePattern>>>;
|
|
11
11
|
position?: TooltipPatternProperty<TooltipPosition>;
|
|
12
12
|
positionMode?: TooltipPatternProperty<TooltipPositionMode>;
|
|
13
|
-
updateTitle?: TooltipUpdateCallback<
|
|
14
|
-
updateContent?: TooltipUpdateCallback<
|
|
13
|
+
updateTitle?: TooltipUpdateCallback<ITooltipLineActual>;
|
|
14
|
+
updateContent?: TooltipUpdateCallback<ITooltipLineActual[]>;
|
|
15
15
|
updatePosition?: TooltipUpdateCallback<ITooltipPositionActual>;
|
|
16
16
|
maxLineCount?: number;
|
|
17
17
|
activeType?: TooltipActiveType;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface ITooltipActual {
|
|
20
20
|
visible?: boolean;
|
|
21
|
-
title?:
|
|
22
|
-
content?:
|
|
21
|
+
title?: ITooltipLineActual;
|
|
22
|
+
content?: ITooltipLineActual[];
|
|
23
23
|
activeType?: TooltipActiveType;
|
|
24
24
|
position?: ITooltipPositionActual;
|
|
25
25
|
data?: TooltipData;
|
|
@@ -207,6 +207,8 @@ export interface IArcMarkSpec extends IFillMarkSpec {
|
|
|
207
207
|
outerRadius?: number;
|
|
208
208
|
innerRadius?: number;
|
|
209
209
|
cornerRadius?: number;
|
|
210
|
+
innerPadding?: number;
|
|
211
|
+
outerPadding?: number;
|
|
210
212
|
centerOffset?: number;
|
|
211
213
|
cap?: boolean | [boolean, boolean];
|
|
212
214
|
autoCapConical?: boolean;
|
|
@@ -214,10 +216,6 @@ export interface IArcMarkSpec extends IFillMarkSpec {
|
|
|
214
216
|
export interface IArc3dMarkSpec extends IArcMarkSpec {
|
|
215
217
|
height?: number;
|
|
216
218
|
}
|
|
217
|
-
export interface IProgressArcMarkSpec extends IArcMarkSpec {
|
|
218
|
-
innerPadding?: number;
|
|
219
|
-
outerPadding?: number;
|
|
220
|
-
}
|
|
221
219
|
export interface ICellMarkSpec extends ISymbolMarkSpec {
|
|
222
220
|
padding?: number | number[] | IPadding;
|
|
223
221
|
}
|
package/types/util/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TimeUtil } from '
|
|
2
|
-
import { debounce, throttle, clamp } from '@visactor/vutils';
|
|
1
|
+
import { debounce, throttle, clamp, TimeUtil } from '@visactor/vutils';
|
|
3
2
|
export { debounce, throttle, clamp };
|
|
4
3
|
export * from './array';
|
|
5
4
|
export * from './color';
|