@visactor/vchart-types 2.0.13-alpha.7 → 2.0.13-alpha.9
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/compile/compiler.d.ts +1 -0
- package/types/compile/interface/compilable-item.d.ts +2 -1
- package/types/component/brush/brush.d.ts +4 -1
- package/types/component/brush/interface.d.ts +3 -1
- package/types/component/crosshair/interface/spec.d.ts +1 -0
- package/types/component/tooltip/interface/common.d.ts +1 -0
- package/types/component/tooltip/tooltip.d.ts +1 -0
- package/types/core/interface.d.ts +9 -1
- package/types/core/vchart.d.ts +4 -0
|
@@ -33,6 +33,7 @@ export declare class Compiler implements ICompiler {
|
|
|
33
33
|
protected _height: number;
|
|
34
34
|
protected _container: IRenderContainer;
|
|
35
35
|
protected _option: IRenderOption;
|
|
36
|
+
getOption(): IRenderOption;
|
|
36
37
|
private _released;
|
|
37
38
|
private _layoutState?;
|
|
38
39
|
private _compileChart;
|
|
@@ -6,7 +6,7 @@ import type { IMorphConfig } from '../../animation/spec';
|
|
|
6
6
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
7
7
|
import type { EventSourceType, EventType } from '../../event/interface';
|
|
8
8
|
import type { IMark, IMarkGraphic } from '../../mark/interface';
|
|
9
|
-
import type { LayoutState } from '../interface/compiler';
|
|
9
|
+
import type { IRenderOption, LayoutState } from '../interface/compiler';
|
|
10
10
|
import type { MarkAnimationSpec } from '../../animation/interface';
|
|
11
11
|
export type CompilerListenerParameters = {
|
|
12
12
|
type: EventType;
|
|
@@ -27,6 +27,7 @@ export interface IGrammarItemMap<T extends IGrammarItem> {
|
|
|
27
27
|
}
|
|
28
28
|
export type ICompilerModel = Record<GrammarType, IProductMap<IGrammarItem>>;
|
|
29
29
|
export interface ICompiler {
|
|
30
|
+
getOption: () => IRenderOption;
|
|
30
31
|
isInited?: boolean;
|
|
31
32
|
readonly stateAnimationConfig?: MarkAnimationSpec;
|
|
32
33
|
getCanvas: () => HTMLCanvasElement | undefined;
|
|
@@ -4,7 +4,7 @@ import { Brush as BrushComponent } from '@visactor/vrender-components';
|
|
|
4
4
|
import type { Maybe } from '@visactor/vutils';
|
|
5
5
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
6
6
|
import type { IRegion } from '../../region/interface';
|
|
7
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
|
+
import type { IGraphic, IPolygon } from '@visactor/vrender-core';
|
|
8
8
|
import type { ISeries } from '../../series/interface';
|
|
9
9
|
import type { IMark, IMarkGraphic } from '../../mark/interface';
|
|
10
10
|
import type { BrushInteractiveRangeAttr, IBrush, IBrushSpec } from './interface';
|
|
@@ -22,6 +22,7 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
22
22
|
protected _brushComponents: BrushComponent[];
|
|
23
23
|
protected _relativeRegions: IRegion[];
|
|
24
24
|
protected _linkedSeries: ISeries[];
|
|
25
|
+
protected _operateMask: IPolygon;
|
|
25
26
|
private _itemMap;
|
|
26
27
|
private _linkedItemMap;
|
|
27
28
|
protected _inBrushElementsMap: {
|
|
@@ -63,6 +64,7 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
63
64
|
};
|
|
64
65
|
onLayoutEnd(): void;
|
|
65
66
|
protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
|
|
67
|
+
protected _shouldEnableInteractive(): boolean;
|
|
66
68
|
protected _createBrushComponent(region: IRegion, componentIndex: number): void;
|
|
67
69
|
protected _getBrushInteractiveAttr(region: IRegion): BrushInteractiveRangeAttr;
|
|
68
70
|
private _transformBrushedMarkAttr;
|
|
@@ -89,5 +91,6 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
89
91
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
90
92
|
clearGraphic(): void;
|
|
91
93
|
clear(): void;
|
|
94
|
+
clearBrushStateAndMask(): void;
|
|
92
95
|
}
|
|
93
96
|
export declare const registerBrush: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SymbolType } from '@visactor/vrender-core';
|
|
1
|
+
import type { FederatedPointerEvent, SymbolType } from '@visactor/vrender-core';
|
|
2
2
|
import type { IPolygonMarkSpec } from '../../typings';
|
|
3
3
|
import type { IComponent } from '../interface';
|
|
4
4
|
import type { IDelayType } from '../../typings/event';
|
|
@@ -15,6 +15,8 @@ interface IBrushDataBindSpec {
|
|
|
15
15
|
axisId?: string | string[];
|
|
16
16
|
axisIndex?: number | number[];
|
|
17
17
|
axisRangeExpand?: number;
|
|
18
|
+
beforeBrushChange?: (e: FederatedPointerEvent) => void | boolean;
|
|
19
|
+
disableDimensionHoverWhenBrushing?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface IBrushTheme {
|
|
20
22
|
style?: Partial<IPolygonMarkSpec>;
|
|
@@ -4,6 +4,7 @@ import type { IAxis } from '../../axis/interface';
|
|
|
4
4
|
import type { IComponentSpec } from '../../base/interface';
|
|
5
5
|
import type { IComponent } from '../../interface';
|
|
6
6
|
export interface ICrossHair extends IComponent {
|
|
7
|
+
enable: boolean;
|
|
7
8
|
clearAxisValue: () => void;
|
|
8
9
|
setAxisValue: (v: StringOrNumber, axis: IAxis) => void;
|
|
9
10
|
layoutByValue: (enableRemain?: boolean) => void;
|
|
@@ -29,6 +29,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
29
29
|
private _isEnterTooltip;
|
|
30
30
|
protected _spec: ITooltipSpec;
|
|
31
31
|
tooltipHandler?: ITooltipHandler;
|
|
32
|
+
enable?: boolean;
|
|
32
33
|
processor: ITooltipActiveTypeAsKeys<ITooltipProcessor<MarkTooltipInfo>, ITooltipProcessor<DimensionTooltipInfo>, ITooltipProcessor<GroupTooltipInfo>>;
|
|
33
34
|
private _alwaysShow;
|
|
34
35
|
private _cacheInfo;
|
|
@@ -2,7 +2,7 @@ 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, EventQuery, EventType, ExtendEventParam } from '../event/interface';
|
|
5
|
+
import type { EventCallback, EventParamsDefinition, EventQuery, EventType, ExtendEventParam } from '../event/interface';
|
|
6
6
|
import type { IMark, IMarkDataTransform } from '../mark/interface';
|
|
7
7
|
import type { ISeries } from '../series/interface/series';
|
|
8
8
|
import type { ITheme } from '../theme/interface';
|
|
@@ -90,6 +90,9 @@ export interface IVChart {
|
|
|
90
90
|
getDataSet: () => Maybe<DataSet>;
|
|
91
91
|
getScale: (scaleId: string) => IBaseScale | null;
|
|
92
92
|
setDimensionIndex: (value: StringOrNumber, options?: DimensionIndexOption) => void;
|
|
93
|
+
disableDimensionHoverEvent: (disabled?: boolean) => void;
|
|
94
|
+
disableCrossHair: (disabled: boolean) => void;
|
|
95
|
+
disableTooltip: (disabled: boolean) => void;
|
|
93
96
|
convertDatumToPosition: (datum: Datum, dataLinkInfo?: DataLinkSeries, isRelativeToCanvas?: boolean, checkInViewData?: boolean) => IPoint | null;
|
|
94
97
|
convertValueToPosition: ((value: StringOrNumber, dataLinkInfo: DataLinkAxis, isRelativeToCanvas?: boolean) => number | null) & ((value: [StringOrNumber, StringOrNumber], dataLinkInfo: DataLinkSeries, isRelativeToCanvas?: boolean) => IPoint | null);
|
|
95
98
|
updateIndicatorDataById: (id: string, datum?: Datum) => void;
|
|
@@ -140,3 +143,8 @@ export interface GrammarTransformOption {
|
|
|
140
143
|
transform: IMarkDataTransform;
|
|
141
144
|
runType?: 'beforeJoin' | 'afterEncode';
|
|
142
145
|
}
|
|
146
|
+
export interface UserEvent {
|
|
147
|
+
eType: EventType;
|
|
148
|
+
query: EventQuery | EventCallback<EventParamsDefinition[EventType]>;
|
|
149
|
+
handler?: EventCallback<EventParamsDefinition[EventType]>;
|
|
150
|
+
}
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare class VChart implements IVChart {
|
|
|
82
82
|
private _vChartPlugin?;
|
|
83
83
|
private _onResize?;
|
|
84
84
|
private _renderState;
|
|
85
|
+
protected _disableDimensionHoverEvent: boolean;
|
|
85
86
|
constructor(spec: ISpec, options: IInitOption);
|
|
86
87
|
private _setNewSpec;
|
|
87
88
|
private _getSpecFromOriginalSpec;
|
|
@@ -182,6 +183,9 @@ export declare class VChart implements IVChart {
|
|
|
182
183
|
getComponents(): import("../component/interface").IComponent[];
|
|
183
184
|
getScale(scaleId: string): import("@visactor/vscale").IBaseScale;
|
|
184
185
|
setDimensionIndex(value: StringOrNumber, opt?: DimensionIndexOption): void;
|
|
186
|
+
disableDimensionHoverEvent(value?: boolean): boolean;
|
|
187
|
+
disableCrossHair(value?: boolean): void;
|
|
188
|
+
disableTooltip(value?: boolean): void;
|
|
185
189
|
showCrosshair(cb: (axis: IAxis) => false | string | number): void;
|
|
186
190
|
stopAnimation(): void;
|
|
187
191
|
reRunNormalAnimation(): void;
|