@visactor/vchart-types 1.11.10 → 1.11.11
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/component/crosshair/base.d.ts +1 -0
- package/types/component/indicator/interface.d.ts +3 -1
- package/types/component/marker/interface.d.ts +3 -3
- package/types/component/tooltip/tooltip.d.ts +1 -0
- package/types/constant/index.d.ts +1 -0
- package/types/event/bubble.d.ts +3 -0
- package/types/event/event-dispatcher.d.ts +3 -1
- package/types/event/event.d.ts +2 -0
- package/types/event/interface.d.ts +5 -0
- package/types/mark/utils/common.d.ts +1 -0
- package/types/series/interface/type.d.ts +1 -0
- package/types/series/liquid/animation.d.ts +1 -0
- package/types/series/liquid/liquid.d.ts +3 -0
- package/types/series/pie/interface.d.ts +3 -1
- package/types/typings/interpolate.d.ts +1 -3
|
@@ -47,6 +47,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
47
47
|
private _timer?;
|
|
48
48
|
private _clickLock?;
|
|
49
49
|
private _hasActive?;
|
|
50
|
+
private _onlyLockClick?;
|
|
50
51
|
get enableRemain(): boolean;
|
|
51
52
|
private _limitBounds;
|
|
52
53
|
constructor(spec: T, options: IComponentOption);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Datum, IFormatMethod } from '../../typings';
|
|
1
|
+
import type { Datum, IFormatMethod } from '../../typings';
|
|
2
2
|
import type { IPercent } from '../../typings/layout';
|
|
3
3
|
import type { ConvertToMarkStyleSpec, ITextMarkSpec } from '../../typings/visual';
|
|
4
4
|
import type { IComponentSpec } from '../base/interface';
|
|
5
5
|
import type { IComponent } from '../interface';
|
|
6
|
+
import type { ITextGraphicAttribute } from '@visactor/vrender-core';
|
|
6
7
|
export interface IIndicatorItemSpec {
|
|
7
8
|
visible?: boolean;
|
|
8
9
|
field?: string;
|
|
@@ -11,6 +12,7 @@ export interface IIndicatorItemSpec {
|
|
|
11
12
|
autoFit?: boolean;
|
|
12
13
|
fitPercent?: number;
|
|
13
14
|
fitStrategy?: 'default' | 'inscribed';
|
|
15
|
+
formatMethod?: (text: string | number, textStyle: ITextGraphicAttribute) => IFormatMethod<[activeDatum: Datum]> | ITextMarkSpec['text'] | ReturnType<IFormatMethod<[activeDatum: Datum]>>;
|
|
14
16
|
style?: Omit<ConvertToMarkStyleSpec<ITextMarkSpec>, 'visible' | 'text'> & {
|
|
15
17
|
type?: 'text' | 'rich';
|
|
16
18
|
text?: IFormatMethod<[activeDatum: Datum]> | ITextMarkSpec['text'] | ReturnType<IFormatMethod<[activeDatum: Datum]>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
import type { IPadding } from '@visactor/vutils';
|
|
3
|
-
import type { SymbolType, IGraphicAttribute, ICustomPath2D } from '@visactor/vrender-core';
|
|
3
|
+
import type { SymbolType, IGraphicAttribute, ICustomPath2D, ITextGraphicAttribute, IRichTextGraphicAttribute } from '@visactor/vrender-core';
|
|
4
4
|
import type { IComposedTextMarkSpec, IFormatMethod, IRectMarkSpec, IRichTextFormatMethod, ISymbolMarkSpec, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IComponentSpec } from '../base/interface';
|
|
6
|
-
import type { Datum
|
|
6
|
+
import type { Datum } from '@visactor/vrender-components';
|
|
7
7
|
import type { ICartesianSeries, IGeoSeries, IPolarSeries } from '../../series/interface';
|
|
8
8
|
import type { IOptionAggr, IOptionAggrField, IOptionSeries } from '../../data/transforms/aggregation';
|
|
9
9
|
import type { IOptionRegr } from '../../data/transforms/regression';
|
|
@@ -54,7 +54,7 @@ export type IMarkerLabelWithoutRefSpec = {
|
|
|
54
54
|
maxWidth?: number;
|
|
55
55
|
labelBackground?: {
|
|
56
56
|
visible?: boolean;
|
|
57
|
-
customShape?: (text:
|
|
57
|
+
customShape?: (text: ITextGraphicAttribute | IRichTextGraphicAttribute, attrs: Partial<IGraphicAttribute>, path: ICustomPath2D) => ICustomPath2D;
|
|
58
58
|
padding?: IPadding | number[] | number;
|
|
59
59
|
} & Partial<IMarkerState<Omit<IRectMarkSpec, 'visible'>>>;
|
|
60
60
|
type?: 'rich' | 'text';
|
|
@@ -48,6 +48,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
48
48
|
protected _initProcessor(): void;
|
|
49
49
|
protected _initEvent(): void;
|
|
50
50
|
protected _mountEvent: (eType: EventType, query: EventQuery, callback: EventCallback<any>) => void;
|
|
51
|
+
protected _handleClickToLock: (params: BaseEventParams) => void;
|
|
51
52
|
protected _getMouseOutHandler: (needPointerDetection?: boolean) => (params: BaseEventParams) => void;
|
|
52
53
|
protected _handleChartMouseOut: (params?: BaseEventParams) => void;
|
|
53
54
|
protected _getMouseMoveHandler: (isClick: boolean) => (params: BaseEventParams) => void;
|
package/types/event/bubble.d.ts
CHANGED
|
@@ -9,7 +9,10 @@ export declare class Bubble {
|
|
|
9
9
|
constructor();
|
|
10
10
|
addHandler(handler: EventHandler<EventParams>, level: EventBubbleLevel): this;
|
|
11
11
|
removeHandler(handler: EventHandler<EventParams>): this;
|
|
12
|
+
preventHandler(handler: EventHandler<EventParams>): this;
|
|
13
|
+
allowHandler(handler: EventHandler<EventParams>): this;
|
|
12
14
|
getHandlers(level: EventBubbleLevel): EventHandler<EventParams>[];
|
|
15
|
+
getAllHandlers(): EventHandler<EventParams>[];
|
|
13
16
|
getCount(): number;
|
|
14
17
|
release(): void;
|
|
15
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EventType, EventHandler, EventParamsDefinition, IEventDispatcher, EventBubbleLevel } from './interface';
|
|
1
|
+
import type { EventType, EventHandler, EventParamsDefinition, IEventDispatcher, EventBubbleLevel, EventParams, EventCallback } from './interface';
|
|
2
2
|
import type { VChart } from '../core/vchart';
|
|
3
3
|
import type { Compiler } from '../compile/compiler';
|
|
4
4
|
export declare class EventDispatcher implements IEventDispatcher {
|
|
@@ -14,6 +14,8 @@ export declare class EventDispatcher implements IEventDispatcher {
|
|
|
14
14
|
register<Evt extends EventType>(eType: Evt, handler: EventHandler<EventParamsDefinition[Evt]>): this;
|
|
15
15
|
unregister<Evt extends EventType>(eType: Evt, handler?: EventHandler<EventParamsDefinition[Evt]>): this;
|
|
16
16
|
dispatch<Evt extends EventType>(eType: Evt, params: EventParamsDefinition[Evt], level?: EventBubbleLevel): this;
|
|
17
|
+
prevent<Evt extends EventType>(eType: Evt, except?: EventCallback<EventParams>): this;
|
|
18
|
+
allow<Evt extends EventType>(eType: Evt): this;
|
|
17
19
|
clear(): void;
|
|
18
20
|
release(): void;
|
|
19
21
|
private _filter;
|
package/types/event/event.d.ts
CHANGED
|
@@ -14,5 +14,7 @@ export declare class Event implements IEvent {
|
|
|
14
14
|
off<Evt extends EventType>(eType: Evt, callback?: EventCallback<EventParamsDefinition[Evt]>): this;
|
|
15
15
|
off<Evt extends EventType>(eType: Evt, query: EventQuery, callback: EventCallback<EventParamsDefinition[Evt]>): this;
|
|
16
16
|
emit<Evt extends EventType>(eType: Evt, params: EventParamsDefinition[Evt], level?: EventBubbleLevel): this;
|
|
17
|
+
prevent<Evt extends EventType>(eType: Evt, except?: EventCallback<EventParamsDefinition[Evt]>): this;
|
|
18
|
+
allow<Evt extends EventType>(eType: Evt): this;
|
|
17
19
|
release(): void;
|
|
18
20
|
}
|
|
@@ -63,6 +63,7 @@ export type EventHandler<Params extends EventParams> = {
|
|
|
63
63
|
query: EventQuery | null;
|
|
64
64
|
wrappedCallback?: EventCallback<Params>;
|
|
65
65
|
filter?: EventFilter;
|
|
66
|
+
prevented?: boolean;
|
|
66
67
|
};
|
|
67
68
|
export type ExtendEventParam = EventParams & {
|
|
68
69
|
event?: Event;
|
|
@@ -153,6 +154,8 @@ export interface IEventDispatcher {
|
|
|
153
154
|
dispatch: <Evt extends EventType>(eType: Evt, params?: EventParamsDefinition[Evt], level?: EventBubbleLevel) => this;
|
|
154
155
|
clear: () => void;
|
|
155
156
|
release: () => void;
|
|
157
|
+
prevent: <Evt extends EventType>(eType: Evt, except: EventCallback<EventParamsDefinition[Evt]>) => void;
|
|
158
|
+
allow: <Evt extends EventType>(eType: Evt) => void;
|
|
156
159
|
}
|
|
157
160
|
export interface IEvent {
|
|
158
161
|
on: (<Evt extends EventType>(eType: Evt, callback: EventCallback<EventParamsDefinition[Evt]>) => this) & (<Evt extends EventType>(eType: Evt, query: EventQuery, callback: EventCallback<EventParamsDefinition[Evt]>) => this);
|
|
@@ -163,6 +166,8 @@ export interface IEvent {
|
|
|
163
166
|
eventType: EventType;
|
|
164
167
|
event: IComposedEvent;
|
|
165
168
|
}>;
|
|
169
|
+
prevent: <Evt extends EventType>(eType: Evt, except: EventCallback<EventParamsDefinition[Evt]>) => void;
|
|
170
|
+
allow: <Evt extends EventType>(eType: Evt) => void;
|
|
166
171
|
}
|
|
167
172
|
export interface IComposedEvent {
|
|
168
173
|
register: <Evt extends EventType>(eType: Evt, handler: EventHandler<EventParamsDefinition[Evt]>) => void;
|
|
@@ -91,6 +91,7 @@ export declare const enum SeriesMarkNameEnum {
|
|
|
91
91
|
barBackground = "barBackground",
|
|
92
92
|
lineLabel = "lineLabel",
|
|
93
93
|
areaLabel = "areaLabel",
|
|
94
|
+
liquidGroup = "liquidGroup",
|
|
94
95
|
liquid = "liquid",
|
|
95
96
|
liquidBackground = "liquidBackground",
|
|
96
97
|
liquidOutline = "liquidOutline",
|
|
@@ -11,4 +11,5 @@ export interface ILiquidAnimationParams {
|
|
|
11
11
|
}
|
|
12
12
|
export type LiquidAppearPreset = 'wave' | 'grow' | 'waveGrow';
|
|
13
13
|
export declare function liquidPresetAnimation(params: ILiquidAnimationParams, preset: LiquidAppearPreset): IAnimationTypeConfig;
|
|
14
|
+
export declare function liquidGroupPresetAnimation(params: ILiquidAnimationParams, preset: LiquidAppearPreset): IAnimationTypeConfig;
|
|
14
15
|
export declare const registerLiquidAnimation: () => void;
|
|
@@ -13,6 +13,7 @@ export declare class LiquidSeries<T extends ILiquidSeriesSpec = ILiquidSeriesSpe
|
|
|
13
13
|
static readonly mark: SeriesMarkMap;
|
|
14
14
|
static readonly transformerConstructor: typeof LineLikeSeriesSpecTransformer;
|
|
15
15
|
readonly transformerConstructor: typeof LineLikeSeriesSpecTransformer;
|
|
16
|
+
private _liquidGroupMark?;
|
|
16
17
|
private _liquidMark?;
|
|
17
18
|
private _liquidBackgroundMark?;
|
|
18
19
|
private _liquidOutlineMark?;
|
|
@@ -20,6 +21,7 @@ export declare class LiquidSeries<T extends ILiquidSeriesSpec = ILiquidSeriesSpe
|
|
|
20
21
|
private _marginSpec?;
|
|
21
22
|
private _heightRatio?;
|
|
22
23
|
private _reverse?;
|
|
24
|
+
private _maskShape?;
|
|
23
25
|
protected _valueField?: string;
|
|
24
26
|
setValueField(field: string): void;
|
|
25
27
|
getValueField(): string;
|
|
@@ -34,6 +36,7 @@ export declare class LiquidSeries<T extends ILiquidSeriesSpec = ILiquidSeriesSpe
|
|
|
34
36
|
private _getLiquidPosY;
|
|
35
37
|
private _getLiquidHeight;
|
|
36
38
|
private _getLiquidBackPosAndSize;
|
|
39
|
+
private _getLiquidBackPath;
|
|
37
40
|
private _initLiquidOutlineMarkStyle;
|
|
38
41
|
private _initLiquidBackgroundMarkStyle;
|
|
39
42
|
private _initLiquidMarkStyle;
|
|
@@ -5,6 +5,7 @@ import type { SeriesMarkNameEnum } from '../interface/type';
|
|
|
5
5
|
import type { IPolarSeriesSpec, IPolarSeriesTheme } from '../polar/interface';
|
|
6
6
|
import type { PieAppearPreset } from './animation/animation';
|
|
7
7
|
import type { ILabelSpec, IMultiLabelSpec } from '../../component/label';
|
|
8
|
+
import type { ICustomPath2D, ILineGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender-core';
|
|
8
9
|
export type PieMarks = 'pie' | 'label' | 'labelLine';
|
|
9
10
|
export type IBasePieSeriesSpec = Omit<IPieSeriesSpec, 'type'> & {
|
|
10
11
|
type: string;
|
|
@@ -43,11 +44,12 @@ export interface IPie3dSeriesTheme extends IPolarSeriesTheme {
|
|
|
43
44
|
innerLabel?: IArcLabelSpec;
|
|
44
45
|
outerLabel?: IArcLabelSpec;
|
|
45
46
|
}
|
|
46
|
-
export interface IArcLabelLineSpec extends IMarkSpec<ILineMarkSpec> {
|
|
47
|
+
export interface IArcLabelLineSpec extends Omit<IMarkSpec<ILineMarkSpec>, 'customShape'> {
|
|
47
48
|
visible?: boolean;
|
|
48
49
|
line1MinLength?: number;
|
|
49
50
|
line2MinLength?: number;
|
|
50
51
|
smooth?: boolean;
|
|
52
|
+
customShape?: (text: ITextGraphicAttribute, attrs: Partial<ILineGraphicAttribute>, path: ICustomPath2D) => ICustomPath2D;
|
|
51
53
|
}
|
|
52
54
|
export type ArcLabelAlignType = 'arc' | 'labelLine' | 'edge';
|
|
53
55
|
export type ArcLabelStrategyType = 'priority' | 'vertical' | 'none';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export type InterpolateType = 'basis' | '
|
|
1
|
+
export type InterpolateType = 'basis' | 'linear' | 'monotone' | 'monotoneX' | 'monotoneY' | 'step' | 'stepAfter' | 'stepBefore' | 'linearClosed' | 'catmullRom' | 'catmullRomClosed';
|
|
2
2
|
export declare const DEFAULT_SMOOTH_INTERPOLATE = "monotone";
|
|
3
3
|
export declare const DEFAULT_LINEAR_INTERPOLATE = "linear";
|
|
4
|
-
export declare const DEFAULT_LINEAR_CLOSED_INTERPOLATE = "linearClosed";
|
|
5
|
-
export declare const DEFAULT_CIRCLE_CLOSED_INTERPOLATE = "cardinalClosed";
|