@visactor/vchart-types 1.7.2 → 1.7.4
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 +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/utils.d.ts +1 -0
- package/types/chart/bar/bar-3d.d.ts +2 -2
- package/types/chart/cartesian/interface.d.ts +1 -1
- package/types/component/axis/cartesian/util/common.d.ts +0 -2
- package/types/component/axis/interface/common.d.ts +1 -0
- package/types/component/axis/polar/interface/common.d.ts +2 -3
- package/types/component/crosshair/base.d.ts +4 -5
- package/types/component/crosshair/cartesian.d.ts +11 -34
- package/types/component/crosshair/config.d.ts +6 -0
- package/types/component/crosshair/interface/spec.d.ts +7 -3
- package/types/component/crosshair/polar.d.ts +12 -54
- package/types/component/label/label.d.ts +2 -1
- package/types/component/label/util.d.ts +1 -8
- package/types/component/legend/continuous/interface.d.ts +1 -0
- package/types/component/marker/base-marker.d.ts +22 -24
- package/types/component/marker/interface.d.ts +19 -9
- package/types/component/marker/mark-area/interface/spec.d.ts +10 -12
- package/types/component/marker/mark-area/mark-area.d.ts +3 -2
- package/types/component/marker/mark-line/interface/spec.d.ts +20 -9
- package/types/component/marker/mark-line/mark-line.d.ts +4 -2
- package/types/component/marker/mark-point/interface/spec.d.ts +8 -6
- package/types/component/marker/mark-point/mark-point.d.ts +3 -2
- package/types/component/marker/utils.d.ts +13 -2
- package/types/constant/index.d.ts +2 -1
- package/types/data/transforms/aggregation.d.ts +3 -3
- package/types/event/events/index.d.ts +1 -0
- package/types/event/index.d.ts +2 -0
- package/types/index.d.ts +1 -0
- package/types/model/interface.d.ts +1 -0
- package/types/region/interface.d.ts +1 -0
- package/types/region/region.d.ts +3 -0
- package/types/series/util/utils.d.ts +5 -0
- package/types/typings/visual.d.ts +3 -2
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type { IPoint } from '../../../../typings';
|
|
2
1
|
import type { IComponent } from '../../../interface';
|
|
3
|
-
import type { IDataPointSpec, IMarkerSpec, IMarkerSymbol } from '../../interface';
|
|
2
|
+
import type { IDataPointSpec, IDataPos, IDataPosCallback, IMarkerSpec, IMarkerSymbol, MarkerPositionPoint, OffsetPoint } from '../../interface';
|
|
4
3
|
import type { IMarkPointTheme } from './theme';
|
|
5
4
|
export type IMarkPoint = IComponent;
|
|
6
|
-
export type IMarkPointSpec = IMarkerSpec & (IMarkPointCoordinateSpec | IMarkPointPositionsSpec) & IMarkPointTheme<IMarkerSymbol>;
|
|
5
|
+
export type IMarkPointSpec = IMarkerSpec & (IMarkPointXYSpec | IMarkPointCoordinateSpec | IMarkPointPositionsSpec) & IMarkPointTheme<IMarkerSymbol>;
|
|
6
|
+
export type IMarkPointXYSpec = {
|
|
7
|
+
y: IDataPos | IDataPosCallback;
|
|
8
|
+
x: IDataPos | IDataPosCallback;
|
|
9
|
+
};
|
|
7
10
|
export type IMarkPointCoordinateSpec = {
|
|
8
11
|
coordinates: IDataPointSpec;
|
|
9
|
-
|
|
10
|
-
relativeRelativeSeriesId?: string;
|
|
12
|
+
coordinatesOffset?: OffsetPoint;
|
|
11
13
|
};
|
|
12
14
|
export type IMarkPointPositionsSpec = {
|
|
13
|
-
position:
|
|
15
|
+
position: MarkerPositionPoint;
|
|
14
16
|
regionRelative?: boolean;
|
|
15
17
|
};
|
|
@@ -3,7 +3,8 @@ import type { IComponentOption } from '../../interface';
|
|
|
3
3
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
4
4
|
import { MarkPoint as MarkPointComponent } from '@visactor/vrender-components';
|
|
5
5
|
import { BaseMarker } from '../base-marker';
|
|
6
|
-
|
|
6
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
7
|
+
export declare class MarkPoint extends BaseMarker<IMarkPointSpec> implements IMarkPoint {
|
|
7
8
|
static type: ComponentTypeEnum;
|
|
8
9
|
type: ComponentTypeEnum;
|
|
9
10
|
name: string;
|
|
@@ -11,7 +12,7 @@ export declare class MarkPoint extends BaseMarker<IMarkPointSpec & IMarkPointThe
|
|
|
11
12
|
protected _theme: IMarkPointTheme;
|
|
12
13
|
protected _markerComponent: MarkPointComponent;
|
|
13
14
|
static createComponent(spec: any, options: IComponentOption): MarkPoint | MarkPoint[];
|
|
14
|
-
protected _createMarkerComponent():
|
|
15
|
+
protected _createMarkerComponent(): IGroup;
|
|
15
16
|
protected _markerLayout(): void;
|
|
16
17
|
protected _initDataView(): void;
|
|
17
18
|
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import type { ICartesianSeries } from '../../series/interface';
|
|
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';
|
|
5
|
+
import type { IRegion } from '../../region/interface';
|
|
6
|
+
import type { OffsetPoint } from './interface';
|
|
7
|
+
export declare function isAggrSpec(spec: IDataPos): boolean;
|
|
4
8
|
export declare function xyLayout(data: DataView, startRelativeSeries: ICartesianSeries, endRelativeSeries: ICartesianSeries, relativeSeries: ICartesianSeries, autoRange: boolean): IPoint[][];
|
|
5
|
-
export declare function coordinateLayout(data: DataView, relativeSeries: ICartesianSeries, autoRange: boolean): IPoint[];
|
|
9
|
+
export declare function coordinateLayout(data: DataView, relativeSeries: ICartesianSeries, autoRange: boolean, coordinatesOffset: OffsetPoint[] | OffsetPoint): IPoint[];
|
|
10
|
+
export declare function positionLayout(positions: MarkerPositionPoint[], series: ISeries, regionRelative: boolean): IPoint[];
|
|
11
|
+
export declare function computeClipRange(regions: IRegion[]): {
|
|
12
|
+
minX: number;
|
|
13
|
+
maxX: number;
|
|
14
|
+
minY: number;
|
|
15
|
+
maxY: number;
|
|
16
|
+
};
|
|
@@ -15,7 +15,7 @@ export type IOptionSeries = {
|
|
|
15
15
|
getStartRelativeSeries: () => ICartesianSeries;
|
|
16
16
|
getEndRelativeSeries: () => ICartesianSeries;
|
|
17
17
|
};
|
|
18
|
-
export type IOptionCallback = (relativeSeriesData: any, startRelativeSeriesData: any, endRelativeSeriesData: any) => IOptionPos;
|
|
18
|
+
export type IOptionCallback = (relativeSeriesData: any, startRelativeSeriesData: any, endRelativeSeriesData: any, relativeSeries: ICartesianSeries, startRelative: ICartesianSeries, endRelative: ICartesianSeries) => IOptionPos;
|
|
19
19
|
export type IOptionAggr = {
|
|
20
20
|
x?: IOptionPos | IOptionCallback;
|
|
21
21
|
y?: IOptionPos | IOptionCallback;
|
|
@@ -29,6 +29,6 @@ export declare function markerVariance(_data: Array<DataView>, opt: IOption): nu
|
|
|
29
29
|
export declare function markerStandardDeviation(_data: Array<DataView>, opt: IOption): number;
|
|
30
30
|
export declare function markerMedian(_data: Array<DataView>, opt: IOption): number;
|
|
31
31
|
export declare function markerAggregation(_data: Array<DataView>, options: IOptionAggr[]): {
|
|
32
|
-
x: StringOrNumber[] | StringOrNumber | null;
|
|
33
|
-
y: StringOrNumber[] | StringOrNumber | null;
|
|
32
|
+
x: StringOrNumber[] | StringOrNumber | IOptionCallback | null;
|
|
33
|
+
y: StringOrNumber[] | StringOrNumber | IOptionCallback | null;
|
|
34
34
|
}[];
|
package/types/index.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export interface ILayoutModel extends IModel {
|
|
|
89
89
|
afterSetLayoutStartPoint: (pos: ILayoutPoint) => void;
|
|
90
90
|
}
|
|
91
91
|
export interface IModelOption extends ICompilableInitOption {
|
|
92
|
+
type: string;
|
|
92
93
|
eventDispatcher: IEventDispatcher;
|
|
93
94
|
dataSet: DataSet;
|
|
94
95
|
map: Map<StringOrNumber, IModel | IMark>;
|
|
@@ -28,6 +28,7 @@ export interface IRegion extends ILayoutModel {
|
|
|
28
28
|
getSeriesInDataName: (dataName: string) => ISeries[];
|
|
29
29
|
getMarks: () => IMark[];
|
|
30
30
|
getGroupMark: () => IGroupMark;
|
|
31
|
+
getInteractionMark: () => IGroupMark;
|
|
31
32
|
}
|
|
32
33
|
export type ISeriesFilter = {
|
|
33
34
|
name?: string;
|
package/types/region/region.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
24
24
|
setMaxHeight(value: number): void;
|
|
25
25
|
protected _groupMark: IGroupMark;
|
|
26
26
|
getGroupMark(): IGroupMark;
|
|
27
|
+
protected _interactionMark: IGroupMark;
|
|
28
|
+
getInteractionMark(): IGroupMark;
|
|
27
29
|
getStackInverse(): boolean;
|
|
28
30
|
protected _backgroundMark?: IRectMark;
|
|
29
31
|
protected _foregroundMark?: IRectMark;
|
|
@@ -32,6 +34,7 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
32
34
|
protected _getClipDefaultValue(): boolean;
|
|
33
35
|
_initTheme(): void;
|
|
34
36
|
created(): void;
|
|
37
|
+
private _createGroupMark;
|
|
35
38
|
init(option: any): void;
|
|
36
39
|
initMark(): void;
|
|
37
40
|
protected _initBackgroundMarkStyle(): void;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { IAxisHelper as CartesianHelper } from '../../component/axis/cartesian/interface/common';
|
|
2
2
|
import type { Datum } from '../../typings';
|
|
3
3
|
import type { IPolarAxisHelper } from '../../component/axis';
|
|
4
|
+
import type { ICartesianSeries } from '..';
|
|
4
5
|
export declare function isPolarAxisSeries(type: string): boolean;
|
|
5
6
|
export declare function sortDataInAxisHelper(axisHelper: CartesianHelper | IPolarAxisHelper, field: string, dataList: Datum[]): void;
|
|
7
|
+
export declare function getGroupAnimationParams(series: ICartesianSeries): {
|
|
8
|
+
dataIndex: (datum: any) => any;
|
|
9
|
+
dataCount: () => any;
|
|
10
|
+
};
|
|
@@ -9,8 +9,7 @@ import type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark'
|
|
|
9
9
|
import type { Datum, StringOrNumber } from './common';
|
|
10
10
|
import type { IPadding } from '@visactor/vutils';
|
|
11
11
|
import type { IColorKey } from '../theme/color-scheme/interface';
|
|
12
|
-
import type { IRepeatType, TextAlignType, TextBaselineType } from '@visactor/vrender-core';
|
|
13
|
-
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
12
|
+
import type { IRepeatType, TextAlignType, TextBaselineType, IRichTextCharacter } from '@visactor/vrender-core';
|
|
14
13
|
export interface IVisualSpecBase<D, T> {
|
|
15
14
|
type: ScaleType;
|
|
16
15
|
domain: D[];
|
|
@@ -74,6 +73,7 @@ export interface ICommonSpec {
|
|
|
74
73
|
anchor3d?: [number, number];
|
|
75
74
|
pickMode?: 'accurate' | 'imprecise' | 'custom';
|
|
76
75
|
boundsMode?: 'accurate' | 'imprecise';
|
|
76
|
+
pickStrokeBuffer?: number;
|
|
77
77
|
texture?: TextureType | string;
|
|
78
78
|
textureColor?: string;
|
|
79
79
|
textureSize?: number;
|
|
@@ -128,6 +128,7 @@ export interface ITextMarkSpec extends IFillMarkSpec {
|
|
|
128
128
|
fontStyle?: FontStyle;
|
|
129
129
|
maxLineWidth?: number;
|
|
130
130
|
ellipsis?: string;
|
|
131
|
+
suffixPosition?: 'start' | 'end' | 'middle';
|
|
131
132
|
lineBreak?: string;
|
|
132
133
|
underline?: boolean;
|
|
133
134
|
lineThrough?: boolean;
|