@visactor/vchart-types 1.15.5-alpha.8 → 2.0.0-alpha.0
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/animate-manager.d.ts +2 -4
- package/types/animation/interface.d.ts +86 -2
- package/types/animation/spec.d.ts +27 -3
- package/types/animation/utils.d.ts +3 -4
- package/types/chart/base/base-chart.d.ts +10 -7
- package/types/chart/funnel/util.d.ts +2 -0
- package/types/chart/interface/chart.d.ts +3 -4
- package/types/chart/interface/common.d.ts +2 -9
- package/types/chart/sankey/sankey.d.ts +1 -1
- package/types/compile/compilable-base.d.ts +1 -1
- package/types/compile/compiler.d.ts +35 -25
- package/types/compile/data/compilable-data.d.ts +7 -7
- package/types/compile/data/interface.d.ts +4 -1
- package/types/compile/grammar-item.d.ts +7 -13
- package/types/compile/interface/compilable-item.d.ts +22 -28
- package/types/compile/interface/compiler.d.ts +13 -4
- package/types/compile/mark/index.d.ts +0 -1
- package/types/compile/mark/interface.d.ts +42 -33
- package/types/compile/mark/mark-state-manager.d.ts +11 -13
- package/types/compile/mark/util.d.ts +1 -1
- package/types/compile/state-manager.d.ts +11 -0
- package/types/compile/util.d.ts +14 -0
- package/types/component/axis/base-axis.d.ts +5 -3
- package/types/component/axis/cartesian/axis.d.ts +1 -1
- package/types/component/axis/cartesian/time-axis.d.ts +1 -0
- package/types/component/axis/interface/common.d.ts +8 -0
- package/types/component/base/base-component.d.ts +1 -2
- package/types/component/brush/brush.d.ts +12 -10
- package/types/component/crosshair/base.d.ts +25 -36
- package/types/component/crosshair/cartesian.d.ts +5 -28
- package/types/component/crosshair/interface/common.d.ts +67 -2
- package/types/component/crosshair/interface/index.d.ts +0 -2
- package/types/component/crosshair/interface/spec.d.ts +8 -4
- package/types/component/crosshair/polar.d.ts +6 -22
- package/types/component/crosshair/utils/cartesian.d.ts +5 -26
- package/types/component/crosshair/utils/polar.d.ts +18 -11
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -1
- package/types/component/data-zoom/interface.d.ts +11 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -2
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/geo/interface.d.ts +1 -1
- package/types/component/label/base-label.d.ts +5 -0
- package/types/component/label/interface.d.ts +4 -3
- package/types/component/label/label.d.ts +5 -3
- package/types/component/label/util.d.ts +9 -10
- package/types/component/legend/util.d.ts +3 -3
- package/types/component/marker/base-marker.d.ts +1 -1
- package/types/component/tooltip/processor/interface.d.ts +1 -1
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +3 -3
- package/types/constant/data.d.ts +1 -0
- package/types/constant/event.d.ts +53 -2
- package/types/core/factory.d.ts +28 -3
- package/types/core/index.d.ts +2 -1
- package/types/core/interface.d.ts +13 -4
- package/types/core/vchart.d.ts +6 -6
- package/types/data/transforms/treemap.d.ts +5 -6
- package/types/data/transforms/venn.d.ts +10 -0
- package/types/data/transforms/waterfall.d.ts +1 -0
- package/types/event/events/base.d.ts +1 -2
- package/types/event/index.d.ts +1 -0
- package/types/event/interface.d.ts +6 -9
- package/types/index-harmony-simple.d.ts +2 -1
- package/types/index.d.ts +0 -1
- package/types/interaction/config.d.ts +13 -0
- package/types/interaction/index.d.ts +9 -1
- package/types/interaction/interaction.d.ts +17 -25
- package/types/interaction/interface/common.d.ts +22 -0
- package/types/interaction/interface/spec.d.ts +53 -0
- package/types/interaction/interface/trigger.d.ts +87 -0
- package/types/interaction/triggers/base.d.ts +28 -0
- package/types/interaction/triggers/dimension-hover.d.ts +22 -0
- package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
- package/types/interaction/triggers/element-active.d.ts +20 -0
- package/types/interaction/triggers/element-highlight-by-graphic-name.d.ts +13 -0
- package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
- package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
- package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
- package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
- package/types/interaction/triggers/element-highlight.d.ts +25 -0
- package/types/interaction/triggers/element-select-by-graphic-name.d.ts +8 -0
- package/types/interaction/triggers/element-select.d.ts +24 -0
- package/types/interaction/triggers/enum.d.ts +8 -0
- package/types/interaction/triggers/util.d.ts +12 -0
- package/types/interaction/zoom/zoomable.d.ts +1 -0
- package/types/layout/interface.d.ts +2 -2
- package/types/layout/layout-item.d.ts +2 -3
- package/types/mark/arc.d.ts +2 -2
- package/types/mark/area.d.ts +2 -0
- package/types/mark/base/base-line.d.ts +16 -2
- package/types/mark/base/base-mark.d.ts +131 -13
- package/types/mark/box-plot.d.ts +11 -5
- package/types/mark/cell.d.ts +5 -2
- package/types/mark/component.d.ts +11 -3
- package/types/mark/glyph.d.ts +29 -0
- package/types/mark/group.d.ts +10 -6
- package/types/mark/index.d.ts +3 -1
- package/types/mark/interface/common.d.ts +61 -9
- package/types/mark/interface/enum.d.ts +6 -0
- package/types/mark/interface/index.d.ts +1 -0
- package/types/mark/interface/mark.d.ts +18 -1
- package/types/mark/interface/type.d.ts +1 -0
- package/types/mark/label.d.ts +4 -3
- package/types/mark/link-path.d.ts +35 -5
- package/types/mark/liquid.d.ts +47 -5
- package/types/mark/ripple.d.ts +39 -4
- package/types/mark/rule.d.ts +3 -0
- package/types/mark/symbol.d.ts +4 -4
- package/types/mark/text.d.ts +4 -2
- package/types/mark/transform/data-sampling.d.ts +10 -0
- package/types/mark/transform/filter.d.ts +1 -0
- package/types/mark/transform/map.d.ts +1 -0
- package/types/mark/transform/symbol-overlap.d.ts +14 -0
- package/types/mark/utils/common.d.ts +4 -0
- package/types/mark/utils/glyph.d.ts +2 -0
- package/types/mark/utils/index.d.ts +2 -0
- package/types/mark/utils/line.d.ts +3 -0
- package/types/model/base-model.d.ts +8 -8
- package/types/model/interface.d.ts +4 -8
- package/types/model/layout-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +2 -4
- package/types/plugin/other.d.ts +3 -3
- package/types/region/interface.d.ts +0 -2
- package/types/region/region.d.ts +3 -9
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area.d.ts +1 -1
- package/types/series/bar/animation.d.ts +1 -1
- package/types/series/bar/bar.d.ts +3 -3
- package/types/series/base/base-series.d.ts +26 -42
- package/types/series/base/tooltip-helper.d.ts +1 -2
- package/types/series/box-plot/box-plot.d.ts +3 -3
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/animation.d.ts +1 -1
- package/types/series/circle-packing/circle-packing.d.ts +1 -1
- package/types/series/correlation/animation.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +3 -4
- package/types/series/dot/dot.d.ts +2 -2
- package/types/series/funnel/funnel.d.ts +3 -2
- package/types/series/funnel/tooltip-helper.d.ts +1 -1
- package/types/series/gauge/animation.d.ts +1 -1
- package/types/series/gauge/gauge-pointer.d.ts +4 -1
- package/types/series/gauge/gauge.d.ts +2 -2
- package/types/series/geo/geo.d.ts +2 -2
- package/types/series/heatmap/animation.d.ts +1 -1
- package/types/series/heatmap/heatmap.d.ts +4 -1
- package/types/series/interface/common.d.ts +1 -4
- package/types/series/interface/series.d.ts +6 -1
- package/types/series/line/animation.d.ts +1 -1
- package/types/series/line/line.d.ts +1 -1
- package/types/series/link/link.d.ts +5 -2
- package/types/series/liquid/animation.d.ts +1 -1
- package/types/series/liquid/liquid.d.ts +4 -1
- package/types/series/map/interface.d.ts +10 -0
- package/types/series/mixin/line-mixin.d.ts +5 -5
- package/types/series/pictogram/pictogram.d.ts +15 -19
- package/types/series/pie/animation/animation.d.ts +4 -3
- package/types/series/pie/animation/centerOffset.d.ts +1 -1
- package/types/series/pie/interface.d.ts +2 -2
- package/types/series/pie/pie.d.ts +8 -6
- package/types/series/polar/progress-like/animation.d.ts +1 -1
- package/types/series/polar/progress-like/progress-like.d.ts +1 -2
- package/types/series/progress/circular/circular.d.ts +4 -1
- package/types/series/progress/linear/animation.d.ts +1 -1
- package/types/series/progress/linear/linear.d.ts +4 -1
- package/types/series/radar/animation.d.ts +11 -9
- package/types/series/radar/radar.d.ts +2 -2
- package/types/series/range-column/animation.d.ts +1 -1
- package/types/series/rose/animation.d.ts +1 -1
- package/types/series/sankey/animation.d.ts +1 -1
- package/types/series/sankey/sankey.d.ts +11 -12
- package/types/series/sankey/tooltip-helper.d.ts +1 -1
- package/types/series/scatter/animation.d.ts +1 -1
- package/types/series/sunburst/animation/enter.d.ts +1 -1
- package/types/series/sunburst/animation/exit.d.ts +1 -1
- package/types/series/sunburst/animation/preset.d.ts +1 -1
- package/types/series/sunburst/animation/utils.d.ts +2 -2
- package/types/series/sunburst/sunburst.d.ts +1 -1
- package/types/series/treemap/animation.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +1 -2
- package/types/series/venn/animation.d.ts +1 -1
- package/types/series/venn/venn.d.ts +2 -1
- package/types/series/waterfall/animation.d.ts +1 -1
- package/types/series/waterfall/waterfall.d.ts +2 -2
- package/types/series/word-cloud/animation.d.ts +1 -1
- package/types/series/word-cloud/base.d.ts +1 -1
- package/types/series/word-cloud/interface.d.ts +1 -1
- package/types/typings/common.d.ts +13 -0
- package/types/typings/spec/common.d.ts +37 -36
- package/types/typings/visual.d.ts +9 -2
- package/types/util/array.d.ts +1 -0
- package/types/util/index.d.ts +1 -0
- package/types/util/mark.d.ts +5 -0
- package/types/util/math.d.ts +1 -1
|
@@ -2,14 +2,14 @@ import type { DataSet, IParserOptions } from '@visactor/vdataset';
|
|
|
2
2
|
import type { Datum, IDataValues, IInitOption, IMarkStateSpec, IPoint, IRegionQuerier, IShowTooltipOption, ISpec, ITooltipHandler, Maybe, MaybeArray, StringOrNumber } from '../typings';
|
|
3
3
|
import type { IMorphConfig } from '../animation/spec';
|
|
4
4
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
5
|
-
import type { EventCallback,
|
|
5
|
+
import type { EventCallback, EventQuery, EventType, ExtendEventParam } from '../event/interface';
|
|
6
6
|
import type { IMark } from '../mark/interface';
|
|
7
7
|
import type { ISeries } from '../series/interface/series';
|
|
8
8
|
import type { ITheme } from '../theme/interface';
|
|
9
9
|
import type { IComponent } from '../component/interface';
|
|
10
10
|
import type { LayoutCallBack } from '../layout/interface';
|
|
11
11
|
import type { DimensionIndexOption, IChart, IChartSpecInfo } from '../chart/interface';
|
|
12
|
-
import type { IStage } from '@visactor/vrender-core';
|
|
12
|
+
import type { IEventTarget, IStage } from '@visactor/vrender-core';
|
|
13
13
|
import type { IContainerSize } from '@visactor/vrender-components';
|
|
14
14
|
import type { IBaseScale } from '@visactor/vscale';
|
|
15
15
|
import type { IUpdateSpecResult } from '../model/interface';
|
|
@@ -53,8 +53,8 @@ export interface IVChart {
|
|
|
53
53
|
updateViewBox: (viewBox: IBoundsLike, reRender?: boolean) => IVChart;
|
|
54
54
|
resize: (width: number, height: number) => Promise<IVChart>;
|
|
55
55
|
release: () => void;
|
|
56
|
-
on: ((eType: EventType, handler: EventCallback<
|
|
57
|
-
off: (eType: EventType, handler?: EventCallback<
|
|
56
|
+
on: ((eType: EventType, handler: EventCallback<ExtendEventParam>) => void) & ((eType: EventType, query: EventQuery, handler: EventCallback<ExtendEventParam>) => void);
|
|
57
|
+
off: (eType: EventType, handler?: EventCallback<ExtendEventParam>) => void;
|
|
58
58
|
updateState: (state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean) => void;
|
|
59
59
|
setSelected: (datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
60
60
|
setHovered: (datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
@@ -123,3 +123,12 @@ export interface IVChartRenderOption {
|
|
|
123
123
|
actionSource?: VChartRenderActionSource;
|
|
124
124
|
}
|
|
125
125
|
export type VChartRenderActionSource = 'render' | 'updateSpec' | 'updateModelSpec' | 'setCurrentTheme' | 'updateSpecAndRecompile';
|
|
126
|
+
export interface VRenderComponentOptions {
|
|
127
|
+
skipDefault?: boolean;
|
|
128
|
+
mode?: '2d' | '3d';
|
|
129
|
+
}
|
|
130
|
+
export interface IStageEventPlugin<T> {
|
|
131
|
+
new (taget: IEventTarget, cfg?: T): {
|
|
132
|
+
release: () => void;
|
|
133
|
+
};
|
|
134
|
+
}
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { RenderModeEnum } from '../typings/spec/common';
|
|
|
5
5
|
import type { ISeriesConstructor } from '../series/interface';
|
|
6
6
|
import { type DimensionIndexOption, type IChart, type IChartConstructor, type IChartOption, type IChartSpecInfo } from '../chart/interface';
|
|
7
7
|
import type { IComponentConstructor } from '../component/interface';
|
|
8
|
-
import type { EventCallback,
|
|
8
|
+
import type { EventCallback, EventQuery, EventType, ExtendEventParam } from '../event/interface';
|
|
9
9
|
import type { IParserOptions, Transform } from '@visactor/vdataset';
|
|
10
10
|
import { DataSet, DataView } from '@visactor/vdataset';
|
|
11
11
|
import type { IStage } from '@visactor/vrender-core';
|
|
@@ -85,7 +85,7 @@ export declare class VChart implements IVChart {
|
|
|
85
85
|
private _updateSpecInfo;
|
|
86
86
|
private _initChart;
|
|
87
87
|
private _releaseData;
|
|
88
|
-
private
|
|
88
|
+
private _bindViewEvent;
|
|
89
89
|
private _bindResizeEvent;
|
|
90
90
|
private _unBindResizeEvent;
|
|
91
91
|
getCurrentSize(): {
|
|
@@ -133,9 +133,9 @@ export declare class VChart implements IVChart {
|
|
|
133
133
|
protected _beforeResize(width: number, height: number): boolean;
|
|
134
134
|
protected _afterResize(): IVChart;
|
|
135
135
|
updateViewBox(viewBox: IBoundsLike, reRender?: boolean, reLayout?: boolean): IVChart;
|
|
136
|
-
on(eType: EventType, handler: EventCallback<
|
|
137
|
-
on(eType: EventType, query: EventQuery, handler: EventCallback<
|
|
138
|
-
off(eType: EventType, handler?: EventCallback<
|
|
136
|
+
on(eType: EventType, handler: EventCallback<ExtendEventParam>): void;
|
|
137
|
+
on(eType: EventType, query: EventQuery, handler: EventCallback<ExtendEventParam>): void;
|
|
138
|
+
off(eType: EventType, handler?: EventCallback<ExtendEventParam>): void;
|
|
139
139
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
140
140
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
141
141
|
setHovered(datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
@@ -205,7 +205,7 @@ export declare class VChart implements IVChart {
|
|
|
205
205
|
}): void;
|
|
206
206
|
private _initChartPlugin;
|
|
207
207
|
private _chartPluginApply;
|
|
208
|
-
protected _getMode():
|
|
208
|
+
protected _getMode(): (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
|
|
209
209
|
protected _getChartOption(type: string): IChartOption;
|
|
210
210
|
}
|
|
211
211
|
export declare const registerVChartCore: () => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { TreemapOptions } from '@visactor/vgrammar-hierarchy';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
range: () => {
|
|
1
|
+
import type { TreemapNodeElement, TreemapOptions } from '@visactor/vgrammar-hierarchy';
|
|
2
|
+
export declare const treemapLayout: (data: Array<any>, op: TreemapOptions & {
|
|
3
|
+
getViewBox: () => {
|
|
5
4
|
x0: number;
|
|
6
5
|
x1: number;
|
|
7
6
|
y0: number;
|
|
8
7
|
y1: number;
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
nameField: string;
|
|
10
|
+
}) => TreemapNodeElement[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const vennLayout: (data: Array<any>, op: {
|
|
2
|
+
setField: string;
|
|
3
|
+
valueField: string;
|
|
4
|
+
getViewBox: () => {
|
|
5
|
+
x0: number;
|
|
6
|
+
x1: number;
|
|
7
|
+
y0: number;
|
|
8
|
+
y1: number;
|
|
9
|
+
};
|
|
10
|
+
}) => (import("@visactor/vgrammar-venn").IVennCircleDatum<any> | import("@visactor/vgrammar-venn").IVennOverlapDatum<any>)[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { ValueOf } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { EventHandler, EventParamsDefinition, EventType, IComposedEvent, IEventDispatcher } from '../interface';
|
|
3
|
-
import type { Maybe, RenderMode } from '../../typings';
|
|
2
|
+
import type { Maybe, RenderMode, ValueOf } from '../../typings';
|
|
4
3
|
import type { IChart } from '../../chart/interface';
|
|
5
4
|
export declare abstract class ComposedEvent implements IComposedEvent {
|
|
6
5
|
protected _eventMap: Map<string, EventHandler<ValueOf<EventParamsDefinition>>>;
|
package/types/event/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
2
|
-
import type { IElement } from '@visactor/vgrammar-core';
|
|
3
2
|
import type { IChart } from '../chart/interface';
|
|
4
3
|
import type { IModel } from '../model/interface';
|
|
5
|
-
import type { IMark, MarkType } from '../mark/interface';
|
|
4
|
+
import type { IMark, IMarkGraphic, MarkType } from '../mark/interface';
|
|
6
5
|
import type { DimensionEventParams } from './events/dimension/interface';
|
|
7
6
|
import type { Datum, IPoint, StringOrNumber } from '../typings';
|
|
8
|
-
import type { ChartEvent, Event_Bubble_Level, Event_Source_Type,
|
|
7
|
+
import type { ChartEvent, Event_Bubble_Level, Event_Source_Type, HOOK_EVENT } from '../constant/event';
|
|
9
8
|
import type { SeriesType } from '../series/interface';
|
|
10
9
|
import type { TooltipEventParams } from '../component/tooltip/interface/event';
|
|
11
10
|
import type { ILayoutItem } from '../layout/interface';
|
|
12
11
|
import type { IVChart } from '../core/interface';
|
|
13
|
-
export type EventType = 'pointerdown' | 'pointerup' | 'pointerupoutside' | 'pointertap' | 'pointerover' | 'pointermove' | 'pointerenter' | 'pointerleave' | 'pointerout' | 'mousedown' | 'mouseup' | 'mouseupoutside' | 'rightdown' | 'rightup' | 'rightupoutside' | 'click' | 'dblclick' | 'mousemove' | 'mouseover' | 'mouseout' | 'mouseenter' | 'mouseleave' | 'wheel' | 'touchstart' | 'touchend' | 'touchendoutside' | 'touchmove' | 'touchcancel' | 'tap' | 'dragstart' | 'drag' | 'dragenter' | 'dragleave' | 'dragover' | 'dragend' | 'drop' | 'pan' | 'panstart' | 'panend' | 'press' | 'pressup' | 'pressend' | 'pinch' | 'pinchstart' | 'pinchend' | 'swipe' | keyof typeof ChartEvent | keyof typeof
|
|
12
|
+
export type EventType = 'pointerdown' | 'pointerup' | 'pointerupoutside' | 'pointertap' | 'pointerover' | 'pointermove' | 'pointerenter' | 'pointerleave' | 'pointerout' | 'mousedown' | 'mouseup' | 'mouseupoutside' | 'rightdown' | 'rightup' | 'rightupoutside' | 'click' | 'dblclick' | 'mousemove' | 'mouseover' | 'mouseout' | 'mouseenter' | 'mouseleave' | 'wheel' | 'touchstart' | 'touchend' | 'touchendoutside' | 'touchmove' | 'touchcancel' | 'tap' | 'dragstart' | 'drag' | 'dragenter' | 'dragleave' | 'dragover' | 'dragend' | 'drop' | 'pan' | 'panstart' | 'panend' | 'press' | 'pressup' | 'pressend' | 'pinch' | 'pinchstart' | 'pinchend' | 'swipe' | keyof typeof ChartEvent | keyof typeof HOOK_EVENT | string;
|
|
14
13
|
export type EventBubbleLevel = keyof typeof Event_Bubble_Level;
|
|
15
14
|
export type ComponentType = 'axis' | 'dataZoom' | 'indicator' | 'legend' | 'mapLabel' | 'markLine' | 'markArea' | 'markPoint' | 'tooltip' | 'title' | 'label' | 'totalLabel' | 'customMark';
|
|
16
15
|
export type EventTargetType = MarkType | ComponentType | SeriesType;
|
|
@@ -42,10 +41,9 @@ type SuperEvent = Event & {
|
|
|
42
41
|
};
|
|
43
42
|
export type BaseEventParams = EventParams & {
|
|
44
43
|
event: SuperEvent;
|
|
45
|
-
item:
|
|
44
|
+
item: IMarkGraphic;
|
|
46
45
|
datum: Datum;
|
|
47
46
|
source: EventSourceType;
|
|
48
|
-
itemMap: Map<string, any>;
|
|
49
47
|
};
|
|
50
48
|
export type EventCallback<Params extends EventParams> = (params: Params) => boolean | void;
|
|
51
49
|
export type EventFilter = {
|
|
@@ -66,10 +64,9 @@ export type EventHandler<Params extends EventParams> = {
|
|
|
66
64
|
};
|
|
67
65
|
export type ExtendEventParam = EventParams & {
|
|
68
66
|
event?: Event;
|
|
69
|
-
item?:
|
|
67
|
+
item?: IMarkGraphic;
|
|
70
68
|
datum?: Datum;
|
|
71
69
|
source?: EventSourceType;
|
|
72
|
-
itemMap?: Map<string, any>;
|
|
73
70
|
};
|
|
74
71
|
export type LayoutEventParam = {
|
|
75
72
|
elements: (ILayoutItem & {
|
|
@@ -84,7 +81,7 @@ export type ZoomEventParam = ExtendEventParam & {
|
|
|
84
81
|
scaleCenter: IPoint;
|
|
85
82
|
};
|
|
86
83
|
export type InteractionEventParam = {
|
|
87
|
-
|
|
84
|
+
graphics?: IMarkGraphic[];
|
|
88
85
|
datums?: Datum[];
|
|
89
86
|
} & Partial<BaseEventParams>;
|
|
90
87
|
export type EventParamsDefinition = {
|
|
@@ -37,9 +37,10 @@ import { registerCustomMark } from './component/custom-mark';
|
|
|
37
37
|
import { registerMapLabel } from './component/map-label';
|
|
38
38
|
import { registerGridLayout } from './layout/grid-layout/grid-layout';
|
|
39
39
|
import { registerPoptip } from './component/poptip';
|
|
40
|
-
import { registerElementHighlight, registerElementSelect } from '@visactor/vgrammar-core';
|
|
41
40
|
import { DefaultTicker } from '@visactor/vrender-core';
|
|
42
41
|
import { registerAnimate } from './plugin/other';
|
|
42
|
+
import { registerElementSelect } from './interaction/triggers/element-select';
|
|
43
|
+
import { registerElementHighlight } from './interaction/triggers/element-highlight';
|
|
43
44
|
export { VChart, DefaultTicker, registerAnimate };
|
|
44
45
|
export { registerScatterChart, registerRoseChart, registerRadarChart, registerHistogramChart, registerMapChart, registerGaugeChart, registerWordCloudChart, registerFunnelChart, registerWaterfallChart, registerBoxplotChart, registerCircularProgressChart, registerLinearProgressChart, registerRangeColumnChart, registerRangeAreaChart, registerSunburstChart, registerCirclePackingChart, registerTreemapChart, registerSankeyChart, registerHeatmapChart, registerCorrelationChart, registerCartesianTimeAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerPolarBandAxis, registerPolarLinearAxis, registerContinuousLegend, registerPolarCrossHair, registerDataZoom, registerScrollBar, registerIndicator, registerGeoCoordinate, registerMarkLine, registerMarkArea, registerMarkPoint, registerPolarMarkLine, registerPolarMarkArea, registerPolarMarkPoint, registerGeoMarkPoint, registerTitle, registerPlayer, registerTotalLabel, registerBrush, registerCustomMark, registerMapLabel, registerPoptip, registerGridLayout, registerElementHighlight, registerElementSelect };
|
|
45
46
|
export default VChart;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RenderMode } from '../typings/spec/common';
|
|
2
|
+
import type { IHoverSpec, ISelectSpec } from './interface/spec';
|
|
2
3
|
export declare function getDefaultInteractionConfigByMode(mode: RenderMode): {
|
|
3
4
|
hover: {
|
|
4
5
|
enable: boolean;
|
|
@@ -20,3 +21,15 @@ export declare function getDefaultInteractionConfigByMode(mode: RenderMode): {
|
|
|
20
21
|
trigger: string;
|
|
21
22
|
};
|
|
22
23
|
};
|
|
24
|
+
export declare const parseHoverSelect: (mode: RenderMode, hoverSpec: IHoverSpec, selectSpec: ISelectSpec) => {
|
|
25
|
+
select: ISelectSpec;
|
|
26
|
+
hover: {
|
|
27
|
+
enable: boolean;
|
|
28
|
+
trigger: string;
|
|
29
|
+
triggerOff: string;
|
|
30
|
+
} | {
|
|
31
|
+
enable: boolean;
|
|
32
|
+
trigger: string[];
|
|
33
|
+
triggerOff: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { registerElementHighlight } from './triggers/element-highlight';
|
|
2
|
+
export { registerElementSelect } from './triggers/element-select';
|
|
3
|
+
export { registerDimensionHover } from './triggers/dimension-hover';
|
|
4
|
+
export { registerElementActive } from './triggers/element-active';
|
|
5
|
+
export { registerElementActiveByLegend } from './triggers/element-active-by-legend';
|
|
6
|
+
export { registerElementHighlightByGroup } from './triggers/element-highlight-by-group';
|
|
7
|
+
export { registerElementHighlightByKey } from './triggers/element-highlight-by-key';
|
|
8
|
+
export { registerElementHighlightByLegend } from './triggers/element-highlight-by-legend';
|
|
9
|
+
export { registerElementHighlightByName } from './triggers/element-highlight-by-name';
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { IMark } from '../mark/interface';
|
|
5
|
-
import type { IInteraction } from './interface';
|
|
6
|
-
import type { IInteraction as IVGrammarInteraction } from '@visactor/vgrammar-core';
|
|
1
|
+
import type { IMarkGraphic } from '../mark/interface';
|
|
2
|
+
import type { IInteraction } from './interface/common';
|
|
3
|
+
import type { ITrigger } from './interface/trigger';
|
|
7
4
|
export declare class Interaction implements IInteraction {
|
|
8
|
-
private
|
|
9
|
-
private _stateElements;
|
|
10
|
-
private _vgrammarInteractions;
|
|
11
|
-
addVgrammarInteraction(state: StateValue, i: IVGrammarInteraction): void;
|
|
12
|
-
static markStateEnable(mark: IMark, state: string): boolean;
|
|
5
|
+
private _stateGraphicsByTrigger;
|
|
13
6
|
private _disableTriggerEvent;
|
|
14
7
|
setDisableActiveEffect(disable: boolean): void;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
resetAllInteraction(): void;
|
|
8
|
+
private _triggerMapByState;
|
|
9
|
+
addTrigger(trigger: ITrigger): void;
|
|
10
|
+
setStatedGraphics(trigger: ITrigger, graphics: IMarkGraphic[]): void;
|
|
11
|
+
getStatedGraphics(trigger: ITrigger): IMarkGraphic[];
|
|
12
|
+
updateStates(trigger: ITrigger, newStatedGraphics: IMarkGraphic[], prevStatedGraphics?: IMarkGraphic[], state?: string, reverseState?: string): IMarkGraphic[];
|
|
13
|
+
protected toggleReverseStateOfGraphics(trigger: ITrigger, newStatedGraphics: IMarkGraphic[], prevStatedGraphics: IMarkGraphic[], reverseState: string): void;
|
|
14
|
+
protected toggleStateOfGraphics(trigger: ITrigger, newStatedGraphics: IMarkGraphic[], prevStatedGraphics: IMarkGraphic[], state: string): void;
|
|
15
|
+
protected addBothStateOfGraphics(trigger: ITrigger, statedGraphics: IMarkGraphic[], state: string, reverseState: string): void;
|
|
16
|
+
protected addStateOfGraphics(trigger: ITrigger, statedGraphics: IMarkGraphic[], state: string): void;
|
|
17
|
+
clearAllStatesOfTrigger(trigger: ITrigger, state?: string, reverseState?: string): void;
|
|
18
|
+
clearAllStates(): void;
|
|
19
|
+
clearByState(stateValue: string): void;
|
|
20
|
+
updateStateOfGraphics(stateValue: string, markGraphics: IMarkGraphic[]): void;
|
|
29
21
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
2
|
+
import type { RenderMode } from '../../typings/spec/common';
|
|
3
|
+
import type { IEventDispatcher } from '../../event/interface';
|
|
4
|
+
import type { IModel } from '../../model/interface';
|
|
5
|
+
import type { ITrigger } from './trigger';
|
|
6
|
+
export interface IInteraction {
|
|
7
|
+
setDisableActiveEffect: (disable: boolean) => void;
|
|
8
|
+
addTrigger: (trigger: ITrigger) => void;
|
|
9
|
+
setStatedGraphics: (trigger: ITrigger, graphics: IMarkGraphic[]) => void;
|
|
10
|
+
getStatedGraphics: (trigger: ITrigger) => IMarkGraphic[];
|
|
11
|
+
updateStates: (trigger: ITrigger, newStatedGraphics: IMarkGraphic[], prevStatedGraphics?: IMarkGraphic[], state?: string, reverseState?: string) => IMarkGraphic[];
|
|
12
|
+
clearAllStates: () => void;
|
|
13
|
+
clearAllStatesOfTrigger: (trigger: ITrigger, state?: string, reverseState?: string) => void;
|
|
14
|
+
clearByState: (stateValue: string) => any;
|
|
15
|
+
updateStateOfGraphics: (stateValue: string, markGraphics: IMarkGraphic[]) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface ITriggerOption {
|
|
18
|
+
mode: RenderMode;
|
|
19
|
+
interaction: IInteraction;
|
|
20
|
+
eventDispatcher: IEventDispatcher;
|
|
21
|
+
model: IModel;
|
|
22
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { EventType } from '../../event/interface';
|
|
2
|
+
import type { StringOrNumber } from '../../typings/common';
|
|
3
|
+
import type { IElementActiveByLegendOptions, IElementActiveOptions, IElementHighlightByLegendOptions, IElementHighlightByNameOptions, IElementHighlightOptions, IElementSelectOptions } from './trigger';
|
|
4
|
+
export interface IBaseInteractionSpec {
|
|
5
|
+
markIds?: StringOrNumber[];
|
|
6
|
+
markNames?: StringOrNumber[];
|
|
7
|
+
}
|
|
8
|
+
type Trigger = EventType | EventType[];
|
|
9
|
+
export interface IHoverSpec extends IBaseInteractionSpec {
|
|
10
|
+
enable?: boolean;
|
|
11
|
+
trigger?: Trigger;
|
|
12
|
+
triggerOff?: Trigger;
|
|
13
|
+
}
|
|
14
|
+
export interface ISelectSpec extends IBaseInteractionSpec {
|
|
15
|
+
enable?: boolean;
|
|
16
|
+
mode?: 'single' | 'multiple';
|
|
17
|
+
trigger?: Trigger;
|
|
18
|
+
triggerOff?: Trigger | number;
|
|
19
|
+
}
|
|
20
|
+
export type IElementActiveSpec = IBaseInteractionSpec & Pick<IElementActiveOptions, 'trigger' | 'triggerOff' | 'state'> & {
|
|
21
|
+
type: 'element-active';
|
|
22
|
+
};
|
|
23
|
+
export type IElementSelectSpec = IBaseInteractionSpec & Pick<IElementSelectOptions, 'trigger' | 'triggerOff' | 'state' | 'isMultiple' | 'reverseState'> & {
|
|
24
|
+
type: 'element-select';
|
|
25
|
+
};
|
|
26
|
+
export type IElementHighlightSpec = IBaseInteractionSpec & Pick<IElementHighlightOptions, 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'> & {
|
|
27
|
+
type: 'element-highlight';
|
|
28
|
+
};
|
|
29
|
+
export type IElementHighlightByKeySpec = IBaseInteractionSpec & Pick<IElementHighlightOptions, 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'> & {
|
|
30
|
+
type: 'element-highlight-by-key';
|
|
31
|
+
};
|
|
32
|
+
export type IElementHighlightByGroup = IBaseInteractionSpec & Pick<IElementHighlightOptions, 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'> & {
|
|
33
|
+
type: 'element-highlight-by-group';
|
|
34
|
+
};
|
|
35
|
+
export type IElementActiveByLegend = IBaseInteractionSpec & Pick<IElementActiveByLegendOptions, 'filterType' | 'state'> & {
|
|
36
|
+
type: 'element-active-by-legend';
|
|
37
|
+
};
|
|
38
|
+
export type IElementHighlightByLegend = IBaseInteractionSpec & Pick<IElementHighlightByLegendOptions, 'filterType' | 'blurState' | 'highlightState'> & {
|
|
39
|
+
type: 'element-highlight-by-legend';
|
|
40
|
+
};
|
|
41
|
+
export type IElementHighlightByName = IBaseInteractionSpec & Pick<IElementHighlightByNameOptions, 'blurState' | 'highlightState' | 'graphicName' | 'parseData'> & {
|
|
42
|
+
type: 'element-highlight-by-name';
|
|
43
|
+
};
|
|
44
|
+
export interface ICustomInteraction extends IBaseInteractionSpec {
|
|
45
|
+
type: string;
|
|
46
|
+
}
|
|
47
|
+
export type IInteractionItemSpec = IElementActiveSpec | IElementSelectSpec | IElementHighlightSpec | IElementHighlightByKeySpec | IElementHighlightByGroup | IElementActiveByLegend | IElementHighlightByLegend | IElementHighlightByName | ICustomInteraction;
|
|
48
|
+
export interface IInteractionSpec {
|
|
49
|
+
hover?: IHoverSpec | boolean;
|
|
50
|
+
select?: ISelectSpec | boolean;
|
|
51
|
+
interactions?: IInteractionItemSpec[];
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { GraphicEventType } from '@visactor/vrender-core';
|
|
2
|
+
import type { IMark, IMarkGraphic } from '../../mark/interface/common';
|
|
3
|
+
import type { RenderMode } from '../../typings/spec/common';
|
|
4
|
+
import type { IInteraction } from './common';
|
|
5
|
+
import type { BaseEventParams } from '../../event/interface';
|
|
6
|
+
export type ITriggerEventHandler = (e: any, markGraphic?: IMarkGraphic) => void;
|
|
7
|
+
export interface ITrigger<TriggerOptions extends IBaseTriggerOptions = any> {
|
|
8
|
+
readonly options: TriggerOptions;
|
|
9
|
+
readonly type: string;
|
|
10
|
+
registerMark: (mark: IMark | IMark[]) => void;
|
|
11
|
+
release: () => void;
|
|
12
|
+
init: () => void;
|
|
13
|
+
start: (g: any) => void;
|
|
14
|
+
reset: (g?: IMarkGraphic) => void;
|
|
15
|
+
getStartState: () => string;
|
|
16
|
+
getResetState: () => string;
|
|
17
|
+
updateMarkIdByState: (states: string[]) => void;
|
|
18
|
+
getMarkIdByState: () => Record<string, number[]>;
|
|
19
|
+
getMarks: () => IMark[];
|
|
20
|
+
getMarksByState: (state: string) => IMark[];
|
|
21
|
+
}
|
|
22
|
+
export interface IBaseTriggerOptions {
|
|
23
|
+
type?: string;
|
|
24
|
+
marks?: IMark[];
|
|
25
|
+
mode?: RenderMode;
|
|
26
|
+
event: {
|
|
27
|
+
on: (eType: string, callback: ITriggerEventHandler) => void;
|
|
28
|
+
off: (eType: string, callback?: ITriggerEventHandler) => void;
|
|
29
|
+
emit: (eType: string, params: any) => void;
|
|
30
|
+
};
|
|
31
|
+
interaction: IInteraction;
|
|
32
|
+
id?: string;
|
|
33
|
+
shouldStart?: (e: any) => boolean;
|
|
34
|
+
shouldUpdate?: (e: any) => boolean;
|
|
35
|
+
shouldEnd?: (e: any) => boolean;
|
|
36
|
+
shouldReset?: (e: any) => boolean;
|
|
37
|
+
onStart?: (e: any) => boolean;
|
|
38
|
+
onUpdate?: (e: any) => boolean;
|
|
39
|
+
onEnd?: (e: any) => boolean;
|
|
40
|
+
onReset?: (e: any) => boolean;
|
|
41
|
+
}
|
|
42
|
+
export type IElementSelectTriggerOff = GraphicEventType | string | 'empty' | 'none' | number;
|
|
43
|
+
export interface IElementSelectOptions extends IBaseTriggerOptions {
|
|
44
|
+
trigger?: GraphicEventType | GraphicEventType[];
|
|
45
|
+
state?: string;
|
|
46
|
+
reverseState?: string;
|
|
47
|
+
triggerOff?: IElementSelectTriggerOff | IElementSelectTriggerOff[];
|
|
48
|
+
isMultiple?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface IDimensionHoverOptions extends IBaseTriggerOptions {
|
|
51
|
+
state?: string;
|
|
52
|
+
reverseState?: string;
|
|
53
|
+
trigger?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IElementActiveOptions extends IBaseTriggerOptions {
|
|
56
|
+
trigger?: GraphicEventType | GraphicEventType[];
|
|
57
|
+
triggerOff?: GraphicEventType | GraphicEventType[] | 'none';
|
|
58
|
+
state?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface IElementHighlightOptions extends IBaseTriggerOptions {
|
|
61
|
+
trigger?: GraphicEventType;
|
|
62
|
+
triggerOff?: GraphicEventType | 'none';
|
|
63
|
+
highlightState?: string;
|
|
64
|
+
blurState?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface IElementFilterOptions {
|
|
67
|
+
filterType?: 'key' | 'groupKey';
|
|
68
|
+
filterField?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface IElementActiveByLegendOptions extends IBaseTriggerOptions, IElementFilterOptions {
|
|
71
|
+
state?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface IElementHighlightByLegendOptions extends IBaseTriggerOptions, IElementFilterOptions {
|
|
74
|
+
highlightState?: string;
|
|
75
|
+
blurState?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface IElementHighlightByNameOptions extends IElementHighlightByLegendOptions {
|
|
78
|
+
graphicName?: string | string[];
|
|
79
|
+
trigger?: GraphicEventType;
|
|
80
|
+
triggerOff?: GraphicEventType | 'none';
|
|
81
|
+
parseData?: (e: BaseEventParams) => any;
|
|
82
|
+
}
|
|
83
|
+
export type IElementHighlightByGraphicNameOptions = IElementHighlightOptions;
|
|
84
|
+
export interface ITriggerConstructor<T extends IBaseTriggerOptions = IBaseTriggerOptions> {
|
|
85
|
+
readonly type: string;
|
|
86
|
+
new (options?: T): ITrigger<T>;
|
|
87
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IBaseTriggerOptions, ITrigger, ITriggerEventHandler } from '../interface/trigger';
|
|
2
|
+
import type { IMark, IMarkGraphic } from '../../mark/interface/common';
|
|
3
|
+
import { MarkSet } from '../../mark/mark-set';
|
|
4
|
+
export declare abstract class BaseTrigger<T extends IBaseTriggerOptions> implements ITrigger<T> {
|
|
5
|
+
options: T;
|
|
6
|
+
type: string;
|
|
7
|
+
protected _markSet: MarkSet;
|
|
8
|
+
protected _markIdByState: Record<string, number[]>;
|
|
9
|
+
constructor(options: T);
|
|
10
|
+
getMarks(): IMark[];
|
|
11
|
+
getMarksByState(state: string): IMark[];
|
|
12
|
+
registerMark(mark: IMark | IMark[]): void;
|
|
13
|
+
updateMarkIdByState(states: string[]): void;
|
|
14
|
+
getMarkIdByState(): Record<string, number[]>;
|
|
15
|
+
isGraphicInStateMark(g: IMarkGraphic, state: string): boolean;
|
|
16
|
+
isGraphicInMark(g: IMarkGraphic): boolean;
|
|
17
|
+
protected abstract getEvents(): Array<{
|
|
18
|
+
type: string | string[];
|
|
19
|
+
handler: ITriggerEventHandler;
|
|
20
|
+
}>;
|
|
21
|
+
getStartState(): string;
|
|
22
|
+
getResetState(): string;
|
|
23
|
+
init(): void;
|
|
24
|
+
release(): void;
|
|
25
|
+
start(g: IMarkGraphic | string): void;
|
|
26
|
+
reset(g?: IMarkGraphic): void;
|
|
27
|
+
protected dispatchEvent(type: 'start' | 'reset' | 'update' | 'end', params: any): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DimensionEventParams } from '../../event/events/dimension/interface';
|
|
2
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
3
|
+
import type { IDimensionHoverOptions, ITrigger } from '../interface/trigger';
|
|
4
|
+
import { BaseTrigger } from './base';
|
|
5
|
+
export declare class DimensionHover extends BaseTrigger<IDimensionHoverOptions> implements ITrigger<IDimensionHoverOptions> {
|
|
6
|
+
static type: string;
|
|
7
|
+
type: string;
|
|
8
|
+
static defaultOptions: Partial<IDimensionHoverOptions>;
|
|
9
|
+
protected _resetType: ('view' | 'self' | 'timeout')[];
|
|
10
|
+
protected _statedGraphics?: IMarkGraphic[];
|
|
11
|
+
constructor(options?: IDimensionHoverOptions);
|
|
12
|
+
getStartState(): string;
|
|
13
|
+
getResetState(): string;
|
|
14
|
+
protected getEvents(): {
|
|
15
|
+
type: string;
|
|
16
|
+
handler: (params: DimensionEventParams) => void;
|
|
17
|
+
}[];
|
|
18
|
+
resetAll: () => void;
|
|
19
|
+
protected getStatedGraphics(params: DimensionEventParams, reverse?: boolean): IMarkGraphic[];
|
|
20
|
+
handleStart: (params: DimensionEventParams) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const registerDimensionHover: () => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseTrigger } from './base';
|
|
2
|
+
import type { IElementActiveByLegendOptions, ITrigger, ITriggerEventHandler } from '../interface/trigger';
|
|
3
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
4
|
+
import type { BaseEventParams } from '../../core';
|
|
5
|
+
export declare class ElementActiveByLegend extends BaseTrigger<IElementActiveByLegendOptions> implements ITrigger<IElementActiveByLegendOptions> {
|
|
6
|
+
static type: string;
|
|
7
|
+
type: string;
|
|
8
|
+
static defaultOptions: Partial<IElementActiveByLegendOptions>;
|
|
9
|
+
constructor(options?: IElementActiveByLegendOptions);
|
|
10
|
+
protected getEvents(): Array<{
|
|
11
|
+
type: string | string[];
|
|
12
|
+
handler: ITriggerEventHandler;
|
|
13
|
+
}>;
|
|
14
|
+
getStartState(): string;
|
|
15
|
+
start(itemKey: string): void;
|
|
16
|
+
resetAll(): void;
|
|
17
|
+
reset(g?: IMarkGraphic): void;
|
|
18
|
+
handleStart: (e: BaseEventParams) => void;
|
|
19
|
+
handleReset: (e: BaseEventParams) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const registerElementActiveByLegend: () => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseTrigger } from './base';
|
|
2
|
+
import type { IElementActiveOptions, ITrigger, ITriggerEventHandler } from '../interface/trigger';
|
|
3
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
4
|
+
import type { BaseEventParams } from '../../event/interface';
|
|
5
|
+
export declare class ElementActive extends BaseTrigger<IElementActiveOptions> implements ITrigger<IElementActiveOptions> {
|
|
6
|
+
static type: string;
|
|
7
|
+
type: string;
|
|
8
|
+
static defaultOptions: Partial<IElementActiveOptions>;
|
|
9
|
+
constructor(options?: IElementActiveOptions);
|
|
10
|
+
protected getEvents(): Array<{
|
|
11
|
+
type: string | string[];
|
|
12
|
+
handler: ITriggerEventHandler;
|
|
13
|
+
}>;
|
|
14
|
+
getStartState(): string;
|
|
15
|
+
start(g: IMarkGraphic): void;
|
|
16
|
+
reset(graphic?: IMarkGraphic): void;
|
|
17
|
+
handleStart: (e: BaseEventParams) => void;
|
|
18
|
+
handleReset: (e: BaseEventParams) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const registerElementActive: () => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementHighlight } from './element-highlight';
|
|
2
|
+
import type { BaseEventParams } from '../../event/interface';
|
|
3
|
+
export declare class ElementHighlightByGraphicName extends ElementHighlight {
|
|
4
|
+
static type: string;
|
|
5
|
+
type: string;
|
|
6
|
+
protected _filterByName(e: BaseEventParams): boolean;
|
|
7
|
+
protected _parseTargetKey(e: BaseEventParams): string;
|
|
8
|
+
start(itemKey: any): void;
|
|
9
|
+
reset(): void;
|
|
10
|
+
handleStart: (e: BaseEventParams) => void;
|
|
11
|
+
handleReset: (e: BaseEventParams) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const registerElementHighlightByGraphicName: () => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseTrigger } from './base';
|
|
2
|
+
import type { IElementHighlightOptions, ITrigger, ITriggerEventHandler } from '../interface/trigger';
|
|
3
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
4
|
+
import type { BaseEventParams } from '../../core';
|
|
5
|
+
export declare class ElementHighlightByGroup extends BaseTrigger<IElementHighlightOptions> implements ITrigger<IElementHighlightOptions> {
|
|
6
|
+
static type: string;
|
|
7
|
+
type: string;
|
|
8
|
+
static defaultOptions: Partial<IElementHighlightOptions>;
|
|
9
|
+
constructor(options?: IElementHighlightOptions);
|
|
10
|
+
getStartState(): string;
|
|
11
|
+
getResetState(): string;
|
|
12
|
+
protected getEvents(): Array<{
|
|
13
|
+
type: string | string[];
|
|
14
|
+
handler: ITriggerEventHandler;
|
|
15
|
+
}>;
|
|
16
|
+
resetAll(): void;
|
|
17
|
+
protected _getHightlightKey(g: IMarkGraphic): string;
|
|
18
|
+
start(g: IMarkGraphic): void;
|
|
19
|
+
reset(g?: IMarkGraphic): void;
|
|
20
|
+
handleStart: (e: BaseEventParams) => void;
|
|
21
|
+
handleReset: (e: BaseEventParams) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const registerElementHighlightByGroup: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IElementHighlightOptions, ITrigger } from '../interface/trigger';
|
|
2
|
+
import { ElementHighlightByGroup } from './element-highlight-by-group';
|
|
3
|
+
import type { IMarkGraphic } from '../../mark/interface/common';
|
|
4
|
+
export declare class ElementHighlightByKey extends ElementHighlightByGroup implements ITrigger<IElementHighlightOptions> {
|
|
5
|
+
static type: string;
|
|
6
|
+
type: string;
|
|
7
|
+
protected _getHightlightKey(g: IMarkGraphic): string;
|
|
8
|
+
}
|
|
9
|
+
export declare const registerElementHighlightByKey: () => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseTrigger } from './base';
|
|
2
|
+
import type { IElementHighlightByLegendOptions, ITrigger, ITriggerEventHandler } from '../interface/trigger';
|
|
3
|
+
import type { IMarkGraphic } from '../../mark/interface/common';
|
|
4
|
+
import type { BaseEventParams } from '../../event/interface';
|
|
5
|
+
export declare class ElementHighlightByLegend extends BaseTrigger<IElementHighlightByLegendOptions> implements ITrigger<IElementHighlightByLegendOptions> {
|
|
6
|
+
static type: string;
|
|
7
|
+
type: string;
|
|
8
|
+
static defaultOptions: Partial<IElementHighlightByLegendOptions>;
|
|
9
|
+
constructor(options?: IElementHighlightByLegendOptions);
|
|
10
|
+
getStartState(): string;
|
|
11
|
+
getResetState(): string;
|
|
12
|
+
protected getEvents(): Array<{
|
|
13
|
+
type: string | string[];
|
|
14
|
+
handler: ITriggerEventHandler;
|
|
15
|
+
}>;
|
|
16
|
+
start(itemKey: any): void;
|
|
17
|
+
resetAll(): void;
|
|
18
|
+
reset(g?: IMarkGraphic): void;
|
|
19
|
+
handleStart: (e: BaseEventParams) => void;
|
|
20
|
+
handleReset: (e: BaseEventParams) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const registerElementHighlightByLegend: () => void;
|