@visactor/vchart-types 1.9.0-alpha.0 → 1.9.0-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 +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/utils.d.ts +1 -1
- package/types/chart/base/base-chart-transformer.d.ts +1 -0
- package/types/chart/base/base-chart.d.ts +1 -0
- package/types/chart/base/util.d.ts +7 -0
- package/types/chart/index.d.ts +5 -3
- package/types/chart/interface/chart.d.ts +1 -0
- package/types/chart/interface/common.d.ts +2 -4
- package/types/chart/interface/type.d.ts +3 -2
- package/types/chart/liquid/index.d.ts +2 -0
- package/types/chart/liquid/interface.d.ts +7 -0
- package/types/chart/liquid/liquid-transformer.d.ts +6 -0
- package/types/chart/liquid/liquid.d.ts +13 -0
- package/types/chart/util.d.ts +4 -1
- package/types/compile/compiler.d.ts +16 -5
- package/types/compile/data/compilable-data.d.ts +1 -1
- package/types/compile/data/interface.d.ts +1 -1
- package/types/compile/interface/compiler.d.ts +3 -0
- package/types/compile/mark/compilable-mark.d.ts +4 -2
- package/types/compile/mark/interface.d.ts +3 -11
- package/types/compile/mark/mark-state-manager.d.ts +2 -2
- package/types/compile/signal/state-manager.d.ts +1 -1
- package/types/component/axis/base-axis.d.ts +10 -10
- package/types/component/axis/cartesian/axis.d.ts +13 -5
- package/types/component/axis/cartesian/band-axis.d.ts +1 -0
- package/types/component/axis/cartesian/interface/common.d.ts +3 -5
- package/types/component/axis/cartesian/interface/spec.d.ts +20 -3
- package/types/component/axis/interface/common.d.ts +10 -0
- package/types/component/axis/interface/spec.d.ts +4 -7
- package/types/component/axis/mixin/band-axis-mixin.d.ts +19 -2
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +9 -1
- package/types/component/axis/polar/axis.d.ts +8 -4
- package/types/component/axis/polar/band-axis.d.ts +1 -0
- package/types/component/axis/util.d.ts +6 -0
- package/types/component/base/base-component.d.ts +0 -5
- package/types/component/brush/brush.d.ts +2 -1
- package/types/component/crosshair/base.d.ts +10 -2
- package/types/component/crosshair/cartesian.d.ts +5 -0
- package/types/component/crosshair/config.d.ts +2 -3
- package/types/component/crosshair/interface/spec.d.ts +2 -1
- package/types/component/data-zoom/constant.d.ts +1 -1
- package/types/component/data-zoom/data-filter-base-component.d.ts +1 -1
- package/types/component/geo/geo-coordinate.d.ts +1 -0
- package/types/component/indicator/indicator.d.ts +2 -0
- package/types/component/indicator/interface.d.ts +1 -0
- package/types/component/interface/common.d.ts +1 -0
- package/types/component/interface/theme.d.ts +1 -0
- package/types/component/label/base-label.d.ts +0 -3
- package/types/component/label/interface.d.ts +1 -0
- package/types/component/label/util.d.ts +6 -0
- package/types/component/legend/base-legend.d.ts +1 -1
- package/types/component/legend/discrete/legend.d.ts +1 -0
- package/types/component/legend/util.d.ts +1 -1
- package/types/component/marker/base-marker.d.ts +5 -1
- package/types/component/marker/interface.d.ts +3 -4
- package/types/component/marker/mark-point/interface/theme.d.ts +1 -0
- package/types/component/marker/utils.d.ts +2 -1
- package/types/component/tooltip/interface/theme.d.ts +1 -0
- package/types/component/tooltip/tooltip.d.ts +2 -1
- package/types/core/factory.d.ts +5 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +4 -1
- package/types/core/vchart.d.ts +9 -5
- package/types/data/transforms/marker-filter.d.ts +5 -0
- package/types/event/events/dimension/util/cartesian.d.ts +1 -1
- package/types/interaction/drill/drillable.d.ts +1 -1
- package/types/interaction/interface.d.ts +24 -2
- package/types/interaction/trigger.d.ts +1 -0
- package/types/interaction/zoom/zoomable.d.ts +3 -1
- package/types/layout/base-layout.d.ts +46 -2
- package/types/layout/interface.d.ts +2 -0
- package/types/layout/layout-item.d.ts +2 -1
- package/types/layout/layout3d/index.d.ts +1 -8
- package/types/mark/interface/type.d.ts +2 -1
- package/types/mark/liquid.d.ts +13 -0
- package/types/model/base-model-transformer.d.ts +2 -1
- package/types/model/base-model.d.ts +1 -2
- package/types/model/interface.d.ts +3 -2
- package/types/plugin/chart/media-query/interface/common.d.ts +0 -4
- package/types/plugin/chart/media-query/interface/index.d.ts +1 -1
- package/types/plugin/chart/media-query/media-query.d.ts +3 -1
- package/types/plugin/chart/media-query/util/action.d.ts +2 -2
- package/types/plugin/chart/media-query/util/filter.d.ts +3 -3
- package/types/plugin/components/axis-sync/axis-sync.d.ts +13 -0
- package/types/plugin/components/axis-sync/index.d.ts +1 -0
- package/types/plugin/components/axis-sync/tick-align-transform.d.ts +7 -0
- package/types/plugin/components/axis-sync/zero-align-transform.d.ts +15 -0
- package/types/plugin/components/index.d.ts +1 -1
- package/types/plugin/components/register.d.ts +2 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +66 -0
- package/types/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.d.ts +22 -0
- package/types/plugin/components/tooltip-handler/canvas/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/constants.d.ts +17 -0
- package/types/plugin/components/tooltip-handler/dom/constant.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +28 -0
- package/types/plugin/components/tooltip-handler/dom/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/dom/interface.d.ts +57 -0
- package/types/plugin/components/tooltip-handler/dom/model/base-tooltip-model.d.ts +25 -0
- package/types/plugin/components/tooltip-handler/dom/model/content-column-model.d.ts +23 -0
- package/types/plugin/components/tooltip-handler/dom/model/content-model.d.ts +16 -0
- package/types/plugin/components/tooltip-handler/dom/model/interface.d.ts +10 -0
- package/types/plugin/components/tooltip-handler/dom/model/shape-model.d.ts +23 -0
- package/types/plugin/components/tooltip-handler/dom/model/style-constants.d.ts +7 -0
- package/types/plugin/components/tooltip-handler/dom/model/text-model.d.ts +5 -0
- package/types/plugin/components/tooltip-handler/dom/model/title-model.d.ts +15 -0
- package/types/plugin/components/tooltip-handler/dom/model/tooltip-model.d.ts +21 -0
- package/types/plugin/components/tooltip-handler/dom/utils/common.d.ts +3 -0
- package/types/plugin/components/tooltip-handler/dom/utils/index.d.ts +2 -0
- package/types/plugin/components/tooltip-handler/dom/utils/style.d.ts +4 -0
- package/types/plugin/components/tooltip-handler/index.d.ts +2 -0
- package/types/plugin/components/tooltip-handler/interface/common.d.ts +4 -0
- package/types/plugin/components/tooltip-handler/interface/index.d.ts +2 -0
- package/types/plugin/components/tooltip-handler/interface/style.d.ts +13 -0
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +8 -0
- package/types/plugin/components/tooltip-handler/utils/common.d.ts +20 -0
- package/types/plugin/components/tooltip-handler/utils/compose.d.ts +4 -0
- package/types/plugin/components/tooltip-handler/utils/get-spec.d.ts +5 -0
- package/types/plugin/components/tooltip-handler/utils/index.d.ts +6 -0
- package/types/plugin/components/tooltip-handler/utils/pattern.d.ts +4 -0
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +7 -0
- package/types/region/interface.d.ts +0 -3
- package/types/series/area/area-transformer.d.ts +2 -0
- package/types/series/area/area.d.ts +0 -1
- package/types/series/bar/bar.d.ts +16 -3
- package/types/series/bar/interface.d.ts +5 -2
- package/types/series/base/base-series.d.ts +35 -6
- package/types/series/base/constant.d.ts +4 -0
- package/types/series/base/tooltip-helper.d.ts +3 -1
- package/types/series/cartesian/cartesian.d.ts +6 -0
- package/types/series/gauge/gauge-pointer.d.ts +1 -0
- package/types/series/heatmap/heatmap.d.ts +1 -0
- package/types/series/interface/common.d.ts +2 -1
- package/types/series/interface/series.d.ts +2 -3
- package/types/series/interface/theme.d.ts +2 -0
- package/types/series/interface/type.d.ts +7 -4
- package/types/series/link/link.d.ts +1 -0
- package/types/series/liquid/animation.d.ts +14 -0
- package/types/series/liquid/constant.d.ts +2 -0
- package/types/series/liquid/interface.d.ts +35 -0
- package/types/series/liquid/liquid.d.ts +50 -0
- package/types/series/liquid/tooltip-helper.d.ts +9 -0
- package/types/series/liquid/util.d.ts +2 -0
- package/types/series/mixin/line-mixin.d.ts +2 -2
- package/types/series/pie/pie.d.ts +1 -0
- package/types/series/polar/polar.d.ts +2 -0
- package/types/series/progress/circular/circular.d.ts +1 -0
- package/types/series/progress/linear/linear.d.ts +1 -0
- package/types/series/range-column/interface.d.ts +2 -2
- package/types/series/range-column/range-column.d.ts +5 -1
- package/types/series/treemap/treemap-transform.d.ts +6 -0
- package/types/series/treemap/treemap.d.ts +6 -3
- package/types/series/word-cloud/base.d.ts +7 -7
- package/types/series/word-cloud/interface.d.ts +3 -12
- package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +1 -0
- package/types/theme/builtin/common/series/liquid.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +1 -0
- package/types/typings/layout.d.ts +2 -1
- package/types/typings/shape.d.ts +0 -21
- package/types/typings/space.d.ts +1 -1
- package/types/typings/spec/common.d.ts +7 -2
- package/types/typings/spec/index.d.ts +1 -0
- package/types/typings/spec/media-query.d.ts +28 -0
- package/types/typings/tooltip/line.d.ts +4 -0
- package/types/typings/tooltip/position.d.ts +2 -2
- package/types/typings/visual.d.ts +6 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { LinearScale } from '@visactor/vscale';
|
|
2
2
|
import type { IAxisLocationCfg, ITick } from '../interface';
|
|
3
3
|
import type { IEvent } from '../../../event/interface';
|
|
4
|
+
import type { IOrientType } from '../../../typings/space';
|
|
5
|
+
import type { IComponentOption } from '../../interface/common';
|
|
4
6
|
export declare const e10: number;
|
|
5
7
|
export declare const e5: number;
|
|
6
8
|
export declare const e2: number;
|
|
@@ -21,8 +23,14 @@ export interface LinearAxisMixin {
|
|
|
21
23
|
_tick: ITick | undefined;
|
|
22
24
|
isSeriesDataEnable: any;
|
|
23
25
|
computeDomain: any;
|
|
24
|
-
collectData:
|
|
26
|
+
collectData: (depth?: number) => {
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
values: any[];
|
|
30
|
+
}[];
|
|
25
31
|
event: IEvent;
|
|
32
|
+
_orient: IOrientType;
|
|
33
|
+
_option: IComponentOption;
|
|
26
34
|
}
|
|
27
35
|
export declare class LinearAxisMixin {
|
|
28
36
|
protected _extend: {
|
|
@@ -2,7 +2,7 @@ import type { IBaseScale } from '@visactor/vscale';
|
|
|
2
2
|
import type { IPolarAxis, IPolarAxisCommonSpec } from './interface';
|
|
3
3
|
import type { IComponentOption } from '../../interface';
|
|
4
4
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
5
|
-
import type { IPolarTickDataOpt
|
|
5
|
+
import type { IPolarTickDataOpt } from '@visactor/vutils-extension';
|
|
6
6
|
import type { IPolarSeries } from '../../../series/interface';
|
|
7
7
|
import type { IPoint, IPolarOrientType, IPolarPoint, StringOrNumber, ILayoutType } from '../../../typings';
|
|
8
8
|
import type { Maybe } from '@visactor/vutils';
|
|
@@ -34,17 +34,17 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
34
34
|
private _gridStyle;
|
|
35
35
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
36
36
|
static createComponent(specInfo: IModelSpecInfo, options: IComponentOption): IPolarAxis;
|
|
37
|
+
constructor(spec: T, options: IComponentOption);
|
|
37
38
|
effect: IEffect;
|
|
38
39
|
setAttrFromSpec(): void;
|
|
39
40
|
_transformLayoutPosition: (pos: Partial<IPoint>) => Partial<IPoint>;
|
|
40
41
|
onLayoutEnd(ctx: any): void;
|
|
41
42
|
onRender(ctx: any): void;
|
|
42
43
|
changeRegions(): void;
|
|
43
|
-
protected
|
|
44
|
-
protected _tickTransformOption(coordinateType: CoordinateType): IPolarTickDataOpt;
|
|
44
|
+
protected _tickTransformOption(): IPolarTickDataOpt;
|
|
45
45
|
afterCompile(): void;
|
|
46
46
|
protected updateScaleRange(): boolean;
|
|
47
|
-
protected collectData(depth: number): {
|
|
47
|
+
protected collectData(depth: number, rawData?: boolean): {
|
|
48
48
|
min: number;
|
|
49
49
|
max: number;
|
|
50
50
|
values: any[];
|
|
@@ -65,6 +65,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
65
65
|
center: () => IPoint;
|
|
66
66
|
getScale: (depth: number) => IBaseScale;
|
|
67
67
|
getAxisId: () => number;
|
|
68
|
+
getSpec: () => T;
|
|
68
69
|
};
|
|
69
70
|
positionToData(position: IPoint): number;
|
|
70
71
|
coordToPoint(point: IPolarPoint): IPoint;
|
|
@@ -74,6 +75,9 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
74
75
|
getInnerRadius(): number;
|
|
75
76
|
tickValues(): number[];
|
|
76
77
|
updateLayoutAttribute(): void;
|
|
78
|
+
protected _getNormalizedValue(values: any[], length: number): number;
|
|
79
|
+
protected getLabelItems(length: number): any[];
|
|
80
|
+
protected _getStartValue(): number;
|
|
77
81
|
private _layoutAngleAxis;
|
|
78
82
|
private _layoutRadiusAxis;
|
|
79
83
|
protected _getRelatedAngleAxis(): IPolarAxis | undefined;
|
|
@@ -27,6 +27,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
27
27
|
center: () => import("../../../typings").IPoint;
|
|
28
28
|
getScale: (depth: number) => import("@visactor/vscale").IBaseScale;
|
|
29
29
|
getAxisId: () => number;
|
|
30
|
+
getSpec: () => T;
|
|
30
31
|
};
|
|
31
32
|
protected initScales(): void;
|
|
32
33
|
transformScaleDomain(): void;
|
|
@@ -27,3 +27,9 @@ export declare function isValidPolarAxis(spec: any): boolean;
|
|
|
27
27
|
export declare const getCartesianAxisTheme: (orient: IOrientType, type: AxisType, chartTheme: ITheme) => any;
|
|
28
28
|
export declare const getPolarAxisTheme: (orient: IPolarOrientType, type: AxisType, chartTheme: ITheme) => any;
|
|
29
29
|
export declare const isDiscreteAxis: (axisType: AxisType) => boolean;
|
|
30
|
+
export declare function getAxisItem(value: any, normalizedValue: number): {
|
|
31
|
+
id: any;
|
|
32
|
+
label: any;
|
|
33
|
+
value: number;
|
|
34
|
+
rawValue: any;
|
|
35
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
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
|
-
import type { BaseEventParams } from '../../event/interface';
|
|
5
4
|
import type { IComponentPluginService, IComponentPlugin } from '../../plugin/components/interface';
|
|
6
5
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
7
6
|
import type { IGroupMark } from '@visactor/vgrammar-core';
|
|
@@ -31,10 +30,6 @@ export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> ex
|
|
|
31
30
|
onRender(ctx: IModelRenderOption): void;
|
|
32
31
|
getVRenderComponents(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>[];
|
|
33
32
|
protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
|
|
34
|
-
protected eventPos(markEventParams: BaseEventParams): {
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
};
|
|
38
33
|
protected getContainer(): IGroup;
|
|
39
34
|
_compareSpec(spec: T, prevSpec: T): {
|
|
40
35
|
change: boolean;
|
|
@@ -39,7 +39,7 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
39
39
|
};
|
|
40
40
|
private _needInitOutState;
|
|
41
41
|
private _cacheInteractiveRangeAttrs;
|
|
42
|
-
private
|
|
42
|
+
private _needDisablePickable;
|
|
43
43
|
init(): void;
|
|
44
44
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
45
45
|
created(): void;
|
|
@@ -76,6 +76,7 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
76
76
|
reCompile: boolean;
|
|
77
77
|
};
|
|
78
78
|
onLayoutEnd(ctx: any): void;
|
|
79
|
+
clearGraphic(): void;
|
|
79
80
|
clear(): void;
|
|
80
81
|
}
|
|
81
82
|
export declare const registerBrush: () => void;
|
|
@@ -39,7 +39,10 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
39
39
|
trigger: CrossHairTrigger;
|
|
40
40
|
enable: boolean;
|
|
41
41
|
showDefault: boolean;
|
|
42
|
-
triggerOff:
|
|
42
|
+
triggerOff: 'none' | number;
|
|
43
|
+
private _timer?;
|
|
44
|
+
private _clickLock?;
|
|
45
|
+
private _hasActive?;
|
|
43
46
|
get enableRemain(): boolean;
|
|
44
47
|
private _limitBounds;
|
|
45
48
|
constructor(spec: T, options: IComponentOption);
|
|
@@ -62,7 +65,10 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
62
65
|
private _registerEvent;
|
|
63
66
|
private _eventOff;
|
|
64
67
|
updateLayoutAttribute(): void;
|
|
65
|
-
private
|
|
68
|
+
private _handleIn;
|
|
69
|
+
private _handleClickInEvent;
|
|
70
|
+
private _handleHoverInEvent;
|
|
71
|
+
private _handleOutEvent;
|
|
66
72
|
private _getTriggerEvent;
|
|
67
73
|
protected _getAxisInfoByField<T = IAxis>(field: 'x' | 'y' | 'category' | 'value'): IAxisInfo<T>;
|
|
68
74
|
changeRegions(regions: IRegion[]): void;
|
|
@@ -73,4 +79,6 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
73
79
|
protected _parseCrosshairSpec(): void;
|
|
74
80
|
protected _parseField(field: ICrosshairCategoryFieldSpec, fieldName: string): any;
|
|
75
81
|
protected _filterAxisByPoint<T>(axisMap: IAxisInfo<T>, relativeX: number, relativeY: number): IAxisInfo<T>;
|
|
82
|
+
protected clearEvent(): void;
|
|
83
|
+
clear(): void;
|
|
76
84
|
}
|
|
@@ -2,6 +2,7 @@ import type { Maybe } from '@visactor/vutils';
|
|
|
2
2
|
import type { IComponentOption } from '../interface';
|
|
3
3
|
import { ComponentTypeEnum } from '../interface/type';
|
|
4
4
|
import type { ICartesianCrosshairSpec } from './interface';
|
|
5
|
+
import type { IBound } from './base';
|
|
5
6
|
import { BaseCrossHair } from './base';
|
|
6
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
8
|
import type { IAxis } from '../axis/interface';
|
|
@@ -35,6 +36,10 @@ export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICar
|
|
|
35
36
|
private _getAllAxisValues;
|
|
36
37
|
protected _layoutCrosshair(relativeX: number, relativeY: number): void;
|
|
37
38
|
hide(): void;
|
|
39
|
+
_setRegionArea(outRegion: IBound, currentValue: Map<number, {
|
|
40
|
+
v: StringOrNumber;
|
|
41
|
+
axis: IAxis;
|
|
42
|
+
}>): void;
|
|
38
43
|
layoutByValue(tag?: number): void;
|
|
39
44
|
private _layoutVertical;
|
|
40
45
|
private _layoutHorizontal;
|
|
@@ -10,9 +10,8 @@ export declare function getDefaultCrosshairTriggerEventByMode(mode: RenderMode):
|
|
|
10
10
|
hoverOut: string;
|
|
11
11
|
clickOut: string;
|
|
12
12
|
};
|
|
13
|
-
export declare enum LayoutType {
|
|
13
|
+
export declare const enum LayoutType {
|
|
14
14
|
ALL = 3,
|
|
15
15
|
HORIZONTAL = 2,
|
|
16
|
-
VERTICAL = 1
|
|
17
|
-
NONE = 0
|
|
16
|
+
VERTICAL = 1
|
|
18
17
|
}
|
|
@@ -11,7 +11,8 @@ export interface ICrossHair extends IComponent {
|
|
|
11
11
|
export type CrossHairTrigger = 'click' | 'hover' | ['click', 'hover'];
|
|
12
12
|
export interface ICommonCrosshairSpec extends IComponentSpec {
|
|
13
13
|
trigger?: CrossHairTrigger;
|
|
14
|
-
triggerOff?: CrossHairTrigger | 'none';
|
|
14
|
+
triggerOff?: CrossHairTrigger | 'none' | number;
|
|
15
|
+
lockAfterClick?: boolean;
|
|
15
16
|
labelZIndex?: number;
|
|
16
17
|
gridZIndex?: number;
|
|
17
18
|
}
|
|
@@ -106,7 +106,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
106
106
|
protected _handleChartScroll: (params: {
|
|
107
107
|
scrollX: number;
|
|
108
108
|
scrollY: number;
|
|
109
|
-
}, e: BaseEventParams['event']) =>
|
|
109
|
+
}, e: BaseEventParams['event']) => boolean;
|
|
110
110
|
protected _handleChartDrag: (delta: [number, number], e: BaseEventParams['event']) => void;
|
|
111
111
|
protected _handleChartMove: (value: number, rate: number) => void;
|
|
112
112
|
protected _initCommonEvent(): void;
|
|
@@ -29,6 +29,7 @@ export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> impleme
|
|
|
29
29
|
}>;
|
|
30
30
|
private _actualScale;
|
|
31
31
|
getZoom(): number;
|
|
32
|
+
private _initialScale;
|
|
32
33
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
33
34
|
effect: IEffect;
|
|
34
35
|
setAttrFromSpec(): void;
|
|
@@ -4,6 +4,7 @@ import type { IRegion } from '../../region/interface';
|
|
|
4
4
|
import type { IIndicator, IIndicatorSpec } from './interface';
|
|
5
5
|
import type { Maybe } from '../../typings';
|
|
6
6
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
7
|
+
import { Indicator as IndicatorComponents } from '@visactor/vrender-components';
|
|
7
8
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
9
|
export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T> implements IIndicator {
|
|
9
10
|
static type: ComponentTypeEnum;
|
|
@@ -37,5 +38,6 @@ export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T
|
|
|
37
38
|
private isRelativeModel;
|
|
38
39
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
39
40
|
clear(): void;
|
|
41
|
+
getIndicatorComponent(): IndicatorComponents;
|
|
40
42
|
}
|
|
41
43
|
export declare const registerIndicator: () => void;
|
|
@@ -10,6 +10,7 @@ export interface IIndicatorItemSpec {
|
|
|
10
10
|
autoLimit?: boolean;
|
|
11
11
|
autoFit?: boolean;
|
|
12
12
|
fitPercent?: number;
|
|
13
|
+
fitStrategy?: 'default' | 'inscribed';
|
|
13
14
|
style?: Omit<ConvertToMarkStyleSpec<ITextMarkSpec>, 'visible' | 'text'> & {
|
|
14
15
|
type?: 'text' | 'rich' | 'html';
|
|
15
16
|
text?: string | string[] | number | number[] | IRichTextCharacter[];
|
|
@@ -19,6 +19,7 @@ export interface IComponentOption extends IModelOption {
|
|
|
19
19
|
getComponentByIndex: (key: string, index: number) => IComponent | undefined;
|
|
20
20
|
getComponentByUserId: (userId: StringOrNumber) => IComponent | undefined;
|
|
21
21
|
getComponentsByKey: (key: string) => IComponent[];
|
|
22
|
+
getComponentsByType: (type: string) => IComponent[];
|
|
22
23
|
}
|
|
23
24
|
export interface IComponent extends ILayoutModel {
|
|
24
25
|
readonly name: string;
|
|
@@ -21,6 +21,7 @@ export interface IComponentTheme {
|
|
|
21
21
|
axisLinear?: IAxisCommonTheme;
|
|
22
22
|
axisX?: ICartesianAxisCommonTheme;
|
|
23
23
|
axisY?: ICartesianAxisCommonTheme;
|
|
24
|
+
axisZ?: ICartesianAxisCommonTheme;
|
|
24
25
|
axisRadius?: IPolarAxisCommonTheme;
|
|
25
26
|
axisAngle?: IPolarAxisCommonTheme;
|
|
26
27
|
[ComponentTypeEnum.discreteLegend]?: IDiscreteLegendTheme;
|
|
@@ -21,9 +21,6 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
21
21
|
selected?: Partial<import("../..").ITextMarkSpec>;
|
|
22
22
|
selected_reverse?: Partial<import("../..").ITextMarkSpec>;
|
|
23
23
|
};
|
|
24
|
-
} | {
|
|
25
|
-
hover: boolean;
|
|
26
|
-
select: boolean;
|
|
27
24
|
};
|
|
28
25
|
_compareSpec(spec: T, prevSpec: T): {
|
|
29
26
|
change: boolean;
|
|
@@ -13,7 +13,9 @@ export declare const labelRuleMap: {
|
|
|
13
13
|
area: typeof LineLabel;
|
|
14
14
|
rect3d: typeof barLabel;
|
|
15
15
|
arc3d: typeof pieLabel;
|
|
16
|
+
treemap: typeof treemapLabel;
|
|
16
17
|
};
|
|
18
|
+
export declare function defaultLabelConfig(rule: string, labelInfo: ILabelInfo): any;
|
|
17
19
|
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']): any;
|
|
18
20
|
export declare function symbolLabel(labelInfo: ILabelInfo): {
|
|
19
21
|
position: string | ((datum: Datum) => any);
|
|
@@ -53,6 +55,10 @@ export declare function stackLabel(labelInfo: ILabelInfo): {
|
|
|
53
55
|
strategy: any;
|
|
54
56
|
};
|
|
55
57
|
};
|
|
58
|
+
export declare function treemapLabel(labelInfo: ILabelInfo): {
|
|
59
|
+
customLayoutFunc: (labels: LabelItem[]) => import("@visactor/vrender-core").IText[];
|
|
60
|
+
overlap: boolean;
|
|
61
|
+
};
|
|
56
62
|
export declare function LineLabel(labelInfo: ILabelInfo): {
|
|
57
63
|
position: string;
|
|
58
64
|
data: any;
|
|
@@ -17,7 +17,7 @@ export declare abstract class BaseLegend<T extends ILegendCommonSpec> extends Ba
|
|
|
17
17
|
protected _visible: boolean;
|
|
18
18
|
get visible(): boolean;
|
|
19
19
|
protected _position: 'start' | 'middle' | 'end';
|
|
20
|
-
get position(): "
|
|
20
|
+
get position(): "start" | "end" | "middle";
|
|
21
21
|
protected _legendData: CompilableData;
|
|
22
22
|
getLegendData(): any;
|
|
23
23
|
private _preSelectedData;
|
|
@@ -17,6 +17,7 @@ export declare class DiscreteLegend extends BaseLegend<IDiscreteLegendSpec> {
|
|
|
17
17
|
protected _initLegendData(): DataView;
|
|
18
18
|
protected _getSeriesLegendField(s: ISeries): string;
|
|
19
19
|
protected _initSelectedData(): void;
|
|
20
|
+
private _getLegendDefaultData;
|
|
20
21
|
private _addDefaultTitleText;
|
|
21
22
|
protected _getLegendAttributes(rect: ILayoutRect): any;
|
|
22
23
|
protected _getLegendConstructor(): typeof LegendComponent;
|
|
@@ -21,6 +21,6 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
21
21
|
maxWidth?: number;
|
|
22
22
|
minWidth?: number;
|
|
23
23
|
space?: number;
|
|
24
|
-
align?: "
|
|
24
|
+
align?: "start" | "end" | "center";
|
|
25
25
|
};
|
|
26
26
|
export declare function getLayout(spec: ILegendCommonSpec): "vertical" | "horizontal";
|
|
@@ -18,7 +18,11 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
18
18
|
protected _layoutOffsetY: number;
|
|
19
19
|
private _firstSeries;
|
|
20
20
|
created(): void;
|
|
21
|
-
|
|
21
|
+
protected _getAllRelativeSeries(): {
|
|
22
|
+
getRelativeSeries: () => ICartesianSeries;
|
|
23
|
+
getStartRelativeSeries: () => ICartesianSeries;
|
|
24
|
+
getEndRelativeSeries: () => ICartesianSeries;
|
|
25
|
+
};
|
|
22
26
|
private _getFieldInfoFromSpec;
|
|
23
27
|
protected _processSpecX(specX: IDataPos | IDataPosCallback): {
|
|
24
28
|
getRelativeSeries: () => ICartesianSeries;
|
|
@@ -12,9 +12,8 @@ export type OffsetPoint = {
|
|
|
12
12
|
export type IAggrType = 'sum' | 'average' | 'min' | 'max' | 'variance' | 'standardDeviation' | 'median';
|
|
13
13
|
export type IDataPos = StringOrNumber | IAggrType;
|
|
14
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;
|
|
16
15
|
export type IDataPointSpec = {
|
|
17
|
-
[key: string]: IDataPos |
|
|
16
|
+
[key: string]: IDataPos | IDataPosCallback;
|
|
18
17
|
refRelativeSeriesIndex?: number;
|
|
19
18
|
refRelativeSeriesId?: StringOrNumber;
|
|
20
19
|
xFieldIndex?: number;
|
|
@@ -27,8 +26,8 @@ export type MarkerPositionPoint = {
|
|
|
27
26
|
y: StringOrNumber;
|
|
28
27
|
};
|
|
29
28
|
export type ICoordinateOption = {
|
|
30
|
-
x?: IOptionAggrField | (
|
|
31
|
-
y?: IOptionAggrField | (
|
|
29
|
+
x?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];
|
|
30
|
+
y?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];
|
|
32
31
|
getRefRelativeSeries?: () => ICartesianSeries;
|
|
33
32
|
} & IOptionSeries;
|
|
34
33
|
export type IMarkerPositionsSpec = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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';
|
|
4
|
+
import type { IDataPos, IMarkerLabelSpec, MarkerPositionPoint } from './interface';
|
|
5
5
|
import type { IRegion } from '../../region/interface';
|
|
6
6
|
import type { OffsetPoint } from './interface';
|
|
7
7
|
export declare function isAggrSpec(spec: IDataPos): boolean;
|
|
@@ -14,3 +14,4 @@ export declare function computeClipRange(regions: IRegion[]): {
|
|
|
14
14
|
minY: number;
|
|
15
15
|
maxY: number;
|
|
16
16
|
};
|
|
17
|
+
export declare function transformLabelAttributes(label: IMarkerLabelSpec): any;
|
|
@@ -31,6 +31,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
31
31
|
tooltipHandler?: ITooltipHandler;
|
|
32
32
|
private _alwaysShow;
|
|
33
33
|
private _cacheInfo;
|
|
34
|
+
private _cacheParams;
|
|
34
35
|
private _eventList;
|
|
35
36
|
protected _processor: ITooltipActiveTypeAsKeys<MarkTooltipProcessor, DimensionTooltipProcessor>;
|
|
36
37
|
protected _isTooltipShown: boolean;
|
|
@@ -59,7 +60,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
59
60
|
setAttrFromSpec(): void;
|
|
60
61
|
showTooltip(datum: Datum, options: IShowTooltipOption): false | "none" | TooltipActiveType;
|
|
61
62
|
hideTooltip(): boolean;
|
|
62
|
-
private
|
|
63
|
+
private _isSameAsCache;
|
|
63
64
|
private _isPointerInChart;
|
|
64
65
|
private _isPointerOnTooltip;
|
|
65
66
|
getVisible(): boolean;
|
package/types/core/factory.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { Transform, Parser } from '@visactor/vdataset';
|
|
|
8
8
|
import type { ILayoutConstructor } from '../layout/interface';
|
|
9
9
|
import type { MarkAnimationSpec } from '@visactor/vgrammar-core';
|
|
10
10
|
import type { IChartPluginConstructor } from '../plugin/chart/interface';
|
|
11
|
+
import type { IComponentPluginConstructor } from '../plugin/components/interface';
|
|
11
12
|
export declare class Factory {
|
|
12
13
|
private static _charts;
|
|
13
14
|
private static _series;
|
|
@@ -17,6 +18,7 @@ export declare class Factory {
|
|
|
17
18
|
private static _animations;
|
|
18
19
|
private static _implements;
|
|
19
20
|
private static _chartPlugin;
|
|
21
|
+
private static _componentPlugin;
|
|
20
22
|
static transforms: {
|
|
21
23
|
[key: string]: Transform;
|
|
22
24
|
};
|
|
@@ -36,6 +38,7 @@ export declare class Factory {
|
|
|
36
38
|
static registerAnimation(key: string, animation: (params?: any, preset?: any) => MarkAnimationSpec): void;
|
|
37
39
|
static registerImplement(key: string, implement: (...args: any) => void): void;
|
|
38
40
|
static registerChartPlugin(key: string, plugin: IChartPluginConstructor): void;
|
|
41
|
+
static registerComponentPlugin(key: string, plugin: IComponentPluginConstructor): void;
|
|
39
42
|
static createChart(chartType: string, spec: any, options: IChartOption): IChart | null;
|
|
40
43
|
static createChartSpecTransformer(chartType: string, option: IChartSpecTransformerOption): IChartSpecTransformer | null;
|
|
41
44
|
static createRegion(regionType: string, spec: any, options: IModelOption): IRegion | null;
|
|
@@ -57,4 +60,6 @@ export declare class Factory {
|
|
|
57
60
|
static getImplementInKey(key: string): (...args: any) => void;
|
|
58
61
|
static getSeriesMarkMap(seriesType: string): Partial<Record<SeriesMarkNameEnum, ISeriesMarkInfo>>;
|
|
59
62
|
static getChartPlugins(): IChartPluginConstructor[];
|
|
63
|
+
static getComponentPlugins(): IComponentPluginConstructor[];
|
|
64
|
+
static getComponentPluginInType(type: string): IComponentPluginConstructor;
|
|
60
65
|
}
|
package/types/core/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from '../typings/spec/common';
|
|
|
8
8
|
export * from '../event/interface';
|
|
9
9
|
export * from '../theme/interface';
|
|
10
10
|
export * from '../constant';
|
|
11
|
+
export * from './interface';
|
|
11
12
|
export * from '../typings/spec/index';
|
|
12
13
|
export * from '../theme/index';
|
|
13
14
|
export { vglobal } from '@visactor/vrender-core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataSet } from '@visactor/vdataset';
|
|
2
2
|
import type { IParserOptions } from '@visactor/vdataset/es/parser';
|
|
3
|
-
import type { Datum, IMarkStateSpec, IPoint, IRegionQuerier, IShowTooltipOption, ISpec, ITooltipHandler, Maybe, MaybeArray, StringOrNumber } from '../typings';
|
|
3
|
+
import type { Datum, IInitOption, IMarkStateSpec, IPoint, IRegionQuerier, IShowTooltipOption, ISpec, ITooltipHandler, Maybe, MaybeArray, StringOrNumber } from '../typings';
|
|
4
4
|
import type { IMorphConfig } from '../animation/spec';
|
|
5
5
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
6
6
|
import type { EventCallback, EventParams, EventQuery, EventType } from '../event/interface';
|
|
@@ -21,6 +21,9 @@ export type DataLinkAxis = {
|
|
|
21
21
|
axisId?: StringOrNumber;
|
|
22
22
|
axisIndex?: number;
|
|
23
23
|
};
|
|
24
|
+
export interface IVChartConstructor {
|
|
25
|
+
new (spec: ISpec, options: IInitOption): IVChart;
|
|
26
|
+
}
|
|
24
27
|
export interface IVChart {
|
|
25
28
|
readonly id: number;
|
|
26
29
|
renderSync: (morphConfig?: IMorphConfig, resetMediaQuery?: boolean) => IVChart;
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import type { DimensionIndexOption, IChart, IChartConstructor, IChartSpecInfo }
|
|
|
6
6
|
import type { IComponentConstructor } from '../component/interface';
|
|
7
7
|
import type { EventCallback, EventParams, EventQuery, EventType } from '../event/interface';
|
|
8
8
|
import type { IParserOptions } from '@visactor/vdataset/es/parser';
|
|
9
|
-
import type { Transform } from '@visactor/vdataset';
|
|
10
|
-
import { DataSet
|
|
9
|
+
import type { Transform, DataView } from '@visactor/vdataset';
|
|
10
|
+
import { DataSet } from '@visactor/vdataset';
|
|
11
11
|
import type { Stage } from '@visactor/vrender-core';
|
|
12
12
|
import type { GeoSourceType } from '../typings/geo';
|
|
13
13
|
import type { GeoSourceOption } from '../series/map/geo-source';
|
|
@@ -84,8 +84,8 @@ export declare class VChart implements IVChart {
|
|
|
84
84
|
private _bindResizeEvent;
|
|
85
85
|
private _unBindResizeEvent;
|
|
86
86
|
getCurrentSize(): {
|
|
87
|
-
width:
|
|
88
|
-
height:
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
89
|
};
|
|
90
90
|
private _doResize;
|
|
91
91
|
private _onResize;
|
|
@@ -102,12 +102,13 @@ export declare class VChart implements IVChart {
|
|
|
102
102
|
private _updateAnimateState;
|
|
103
103
|
release(): void;
|
|
104
104
|
updateData(id: StringOrNumber, data: DataView | Datum[] | string, options?: IParserOptions): Promise<IVChart>;
|
|
105
|
+
private _updateDataById;
|
|
105
106
|
updateDataInBatches(list: {
|
|
106
107
|
id: string;
|
|
107
108
|
data: Datum[];
|
|
108
109
|
options?: IParserOptions;
|
|
109
110
|
}[]): Promise<IVChart>;
|
|
110
|
-
updateDataSync(id: StringOrNumber, data: DataView | Datum[], options?: IParserOptions): IVChart;
|
|
111
|
+
updateDataSync(id: StringOrNumber, data: DataView | Datum[] | string, options?: IParserOptions): IVChart;
|
|
111
112
|
updateFullDataSync(data: IDataValues | IDataValues[], reRender?: boolean): IVChart;
|
|
112
113
|
updateFullData(data: IDataValues | IDataValues[], reRender?: boolean): Promise<IVChart>;
|
|
113
114
|
updateSpec(spec: ISpec, forceMerge?: boolean, morphConfig?: IMorphConfig): Promise<IVChart>;
|
|
@@ -124,6 +125,9 @@ export declare class VChart implements IVChart {
|
|
|
124
125
|
} | ((model: IModel) => boolean), spec: unknown, forceMerge?: boolean, morphConfig?: IMorphConfig): IVChart;
|
|
125
126
|
protected _updateModelSpec(model: IModel, spec: unknown, sync?: boolean, forceMerge?: boolean, morphConfig?: IMorphConfig): IVChart | Promise<IVChart>;
|
|
126
127
|
resize(width: number, height: number): Promise<IVChart>;
|
|
128
|
+
resizeSync(width: number, height: number): IVChart;
|
|
129
|
+
protected _beforeResize(width: number, height: number): boolean;
|
|
130
|
+
protected _afterResize(): IVChart;
|
|
127
131
|
updateViewBox(viewBox: IBoundsLike, reRender?: boolean, reLayout?: boolean): IVChart;
|
|
128
132
|
on(eType: EventType, handler: EventCallback<EventParams>): void;
|
|
129
133
|
on(eType: EventType, query: EventQuery, handler: EventCallback<EventParams>): void;
|
|
@@ -3,6 +3,6 @@ import type { IDimensionInfo } from '../interface';
|
|
|
3
3
|
import type { CartesianAxis } from '../../../../component/axis/cartesian';
|
|
4
4
|
import type { ICartesianSeries } from '../../../../series/interface';
|
|
5
5
|
import type { ILayoutPoint } from '../../../../typings/layout';
|
|
6
|
-
export declare const getCartesianDimensionInfo: (chart: IChart | undefined, pos: ILayoutPoint) => IDimensionInfo[] | null;
|
|
6
|
+
export declare const getCartesianDimensionInfo: (chart: IChart | undefined, pos: ILayoutPoint, isTooltip?: boolean) => IDimensionInfo[] | null;
|
|
7
7
|
export declare const getDimensionInfoByPosition: (axis: CartesianAxis, posValue: number, posKey: 'x' | 'y', getDimensionField: (series: ICartesianSeries) => string | string[]) => IDimensionInfo | null;
|
|
8
8
|
export declare const getDimensionInfoByValue: (axis: CartesianAxis, value: any, getDimensionField?: (series: ICartesianSeries) => string | string[]) => IDimensionInfo | null;
|
|
@@ -17,7 +17,7 @@ export interface IDrillable {
|
|
|
17
17
|
export declare class Drillable implements IDrillable {
|
|
18
18
|
private _drillParams;
|
|
19
19
|
private _drillInfo;
|
|
20
|
-
private
|
|
20
|
+
private _getDrillTriggerEvent;
|
|
21
21
|
private _hideTooltip;
|
|
22
22
|
initDrillable(params: DrillParams): void;
|
|
23
23
|
initDrillableData(dataSet: DataSet): void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { IElement } from '@visactor/vgrammar-core';
|
|
1
|
+
import type { ElementActiveByLegendSpec, ElementActiveSpec, ElementHighlightByGroupSpec, ElementHighlightByKeySpec, ElementHighlightByLegendSpec, ElementHighlightByNameSpec, ElementHighlightSpec, ElementSelectSpec, IElement } from '@visactor/vgrammar-core';
|
|
2
2
|
import type { IMark } from '../mark/interface';
|
|
3
3
|
import type { RenderMode } from '../typings/spec/common';
|
|
4
4
|
import type { BaseEventParams, IEventDispatcher, EventType } from '../event/interface';
|
|
5
5
|
import type { IModel } from '../model/interface';
|
|
6
6
|
import type { StateValue } from '../compile/mark';
|
|
7
|
+
import type { StringOrNumber } from '../typings/common';
|
|
7
8
|
export interface IInteraction {
|
|
8
9
|
registerMark: (state: StateValue, mark: IMark) => void;
|
|
9
10
|
filterEventMark: (params: BaseEventParams, state: StateValue) => boolean;
|
|
@@ -41,10 +42,31 @@ export type ISelectSpec = {
|
|
|
41
42
|
enable?: boolean;
|
|
42
43
|
mode?: 'single' | 'multiple';
|
|
43
44
|
trigger?: Trigger;
|
|
44
|
-
triggerOff?: Trigger;
|
|
45
|
+
triggerOff?: Trigger | number;
|
|
45
46
|
};
|
|
46
47
|
export interface ITriggerSpec {
|
|
47
48
|
hover?: IHoverSpec | boolean;
|
|
48
49
|
select?: ISelectSpec | boolean;
|
|
49
50
|
}
|
|
51
|
+
interface IBaseInteractionSpec {
|
|
52
|
+
markIds?: StringOrNumber[];
|
|
53
|
+
markNames?: StringOrNumber[];
|
|
54
|
+
}
|
|
55
|
+
export type IElementActiveSpec = IBaseInteractionSpec & Pick<ElementActiveSpec, 'type' | 'trigger' | 'triggerOff' | 'state'>;
|
|
56
|
+
export type IElementSelectSpec = IBaseInteractionSpec & Pick<ElementSelectSpec, 'type' | 'trigger' | 'triggerOff' | 'state' | 'isMultiple' | 'reverseState'>;
|
|
57
|
+
export type IElementHighlightSpec = IBaseInteractionSpec & Pick<ElementHighlightSpec, 'type' | 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'>;
|
|
58
|
+
export type IElementHighlightByKeySpec = IBaseInteractionSpec & Pick<ElementHighlightByKeySpec, 'type' | 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'>;
|
|
59
|
+
export type IElementHighlightByGroup = IBaseInteractionSpec & Pick<ElementHighlightByGroupSpec, 'type' | 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'>;
|
|
60
|
+
export type IElementActiveByLegend = IBaseInteractionSpec & Pick<ElementActiveByLegendSpec, 'type' | 'filterType' | 'state'>;
|
|
61
|
+
export type IElementHighlightByLegend = IBaseInteractionSpec & Pick<ElementHighlightByLegendSpec, 'type' | 'filterType' | 'blurState' | 'highlightState'>;
|
|
62
|
+
export type IElementHighlightByName = IBaseInteractionSpec & Pick<ElementHighlightByNameSpec, 'type' | 'blurState' | 'highlightState' | 'graphicName' | 'parseData'>;
|
|
63
|
+
export interface ICustomInteraction extends IBaseInteractionSpec {
|
|
64
|
+
type: string;
|
|
65
|
+
}
|
|
66
|
+
export type IInteractionItemSpec = IElementActiveSpec | IElementSelectSpec | IElementHighlightSpec | IElementHighlightByKeySpec | IElementHighlightByGroup | IElementActiveByLegend | IElementHighlightByLegend | IElementHighlightByName;
|
|
67
|
+
export interface IInteractionSpec {
|
|
68
|
+
hover?: IHoverSpec | boolean;
|
|
69
|
+
select?: ISelectSpec | boolean;
|
|
70
|
+
interactions?: IInteractionItemSpec[];
|
|
71
|
+
}
|
|
50
72
|
export {};
|
|
@@ -14,6 +14,7 @@ export declare class Trigger implements ITrigger {
|
|
|
14
14
|
protected _fields: string[] | null;
|
|
15
15
|
protected _marks: MarkSet;
|
|
16
16
|
protected _markReverse: MarkSet;
|
|
17
|
+
private _isHovered?;
|
|
17
18
|
constructor(spec: ITriggerSpec, option: ITriggerOption);
|
|
18
19
|
setStateKeys(fields: string[]): void;
|
|
19
20
|
registerMark(mark: IMark): void;
|
|
@@ -50,8 +50,10 @@ export declare class Zoomable implements IZoomable {
|
|
|
50
50
|
private _zoomableTrigger;
|
|
51
51
|
private _eventObj;
|
|
52
52
|
private _renderMode;
|
|
53
|
+
private _gestureController;
|
|
54
|
+
private _isGestureListener;
|
|
53
55
|
initZoomable(evt: IEvent, mode?: RenderMode): void;
|
|
54
|
-
private
|
|
56
|
+
private _getZoomTriggerEvent;
|
|
55
57
|
private _zoomEventDispatch;
|
|
56
58
|
private _getRegionOrSeriesLayout;
|
|
57
59
|
private _bindZoomEventAsRegion;
|