@visactor/vchart-types 1.8.2 → 1.8.3
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/compile/interface/compiler.d.ts +1 -0
- package/types/component/brush/brush.d.ts +1 -0
- package/types/component/label/util.d.ts +5 -0
- package/types/component/marker/utils.d.ts +2 -1
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +4 -1
- package/types/core/vchart.d.ts +2 -2
- package/types/interaction/zoom/zoomable.d.ts +2 -0
- 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/series/base/base-series.d.ts +1 -0
- package/types/series/interface/series.d.ts +2 -1
- package/types/series/treemap/treemap-transform.d.ts +6 -0
- package/types/series/treemap/treemap.d.ts +6 -3
|
@@ -13,6 +13,7 @@ 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
|
};
|
|
17
18
|
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']): any;
|
|
18
19
|
export declare function symbolLabel(labelInfo: ILabelInfo): {
|
|
@@ -53,6 +54,10 @@ export declare function stackLabel(labelInfo: ILabelInfo): {
|
|
|
53
54
|
strategy: any;
|
|
54
55
|
};
|
|
55
56
|
};
|
|
57
|
+
export declare function treemapLabel(labelInfo: ILabelInfo): {
|
|
58
|
+
customLayoutFunc: (labels: LabelItem[]) => import("@visactor/vrender-core").IText[];
|
|
59
|
+
overlap: boolean;
|
|
60
|
+
};
|
|
56
61
|
export declare function LineLabel(labelInfo: ILabelInfo): {
|
|
57
62
|
position: string;
|
|
58
63
|
data: any;
|
|
@@ -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;
|
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
|
@@ -50,6 +50,8 @@ 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
56
|
private _getTriggerEvent;
|
|
55
57
|
private _zoomEventDispatch;
|
|
@@ -2,6 +2,7 @@ import type { IMediaInfo, IMediaQueryCheckResult, IMediaQuerySpec, IMediaQueryOp
|
|
|
2
2
|
import type { IChartPlugin, IChartPluginService } from '../interface';
|
|
3
3
|
import type { VChartRenderActionSource } from '../../../core/interface';
|
|
4
4
|
import { BasePlugin } from '../../base/base-plugin';
|
|
5
|
+
import type { IChartSpecInfo } from '../../../chart/interface';
|
|
5
6
|
export declare class MediaQuery extends BasePlugin implements IChartPlugin {
|
|
6
7
|
static readonly pluginType: 'chart';
|
|
7
8
|
static readonly specKey = "media";
|
|
@@ -10,6 +11,7 @@ export declare class MediaQuery extends BasePlugin implements IChartPlugin {
|
|
|
10
11
|
protected _spec: IMediaQuerySpec;
|
|
11
12
|
protected _option: IMediaQueryOption;
|
|
12
13
|
protected _baseChartSpec: any;
|
|
14
|
+
protected _baseChartSpecInfo: IChartSpecInfo;
|
|
13
15
|
protected _currentMediaInfo: Partial<IMediaInfo>;
|
|
14
16
|
readonly currentActiveItems: Set<IMediaQueryItem>;
|
|
15
17
|
protected _initialized: boolean;
|
|
@@ -21,7 +23,7 @@ export declare class MediaQuery extends BasePlugin implements IChartPlugin {
|
|
|
21
23
|
protected _changeSize(width: number, height: number, compile?: boolean, render?: boolean): boolean;
|
|
22
24
|
protected _applyQueries(compile?: boolean, render?: boolean): boolean;
|
|
23
25
|
protected _check(item: IMediaQueryItem): IMediaQueryCheckResult;
|
|
24
|
-
protected _apply(item: IMediaQueryItem, chartSpec: any): IMediaQueryActionResult;
|
|
26
|
+
protected _apply(item: IMediaQueryItem, chartSpec: any, chartSpecInfo: IChartSpecInfo): IMediaQueryActionResult;
|
|
25
27
|
protected _reInit(compile?: boolean, render?: boolean): void;
|
|
26
28
|
dispose(): void;
|
|
27
29
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IVChart } from '../../../../core';
|
|
2
1
|
import type { IMediaQueryAction, IMediaQueryCondition, IMediaQueryActionResult } from '../interface';
|
|
3
|
-
|
|
2
|
+
import type { IChartSpecInfo } from '../../../../chart/interface';
|
|
3
|
+
export declare const executeMediaQueryAction: <T extends Record<string, unknown>>(action: IMediaQueryAction<T>, query: IMediaQueryCondition, chartSpec: any, chartSpecInfo: IChartSpecInfo) => IMediaQueryActionResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IVChart } from '../../../../core';
|
|
2
1
|
import type { IMediaQueryAction, IMediaQueryActionFilterResult, IMediaQueryCondition, MediaQueryActionFilter, MediaQueryActionFilterType } from '../interface';
|
|
3
2
|
import type { MaybeArray } from '../../../../typings';
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
3
|
+
import type { IChartSpecInfo } from '../../../../chart/interface';
|
|
4
|
+
export declare const executeMediaQueryActionFilter: <T extends Record<string, unknown>>(filterType: MediaQueryActionFilterType, filter: MaybeArray<MediaQueryActionFilter<T>>, action: IMediaQueryAction<T>, query: IMediaQueryCondition, chartSpec: any, chartSpecInfo: IChartSpecInfo) => IMediaQueryActionFilterResult;
|
|
5
|
+
export declare const executeMediaQueryActionFilterType: <T extends Record<string, unknown>>(filterType: MediaQueryActionFilterType, chartSpec: any, chartSpecInfo: IChartSpecInfo) => IMediaQueryActionFilterResult<T>;
|
|
@@ -76,6 +76,7 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
76
76
|
getInvalidType(): IInvalidType;
|
|
77
77
|
setInvalidType(t: IInvalidType): void;
|
|
78
78
|
protected _markAttributeContext: ISeriesMarkAttributeContext;
|
|
79
|
+
getMarkAttributeContext(): ISeriesMarkAttributeContext;
|
|
79
80
|
constructor(spec: T, options: ISeriesOption);
|
|
80
81
|
created(): void;
|
|
81
82
|
protected _buildMarkAttributeContext(): void;
|
|
@@ -11,7 +11,7 @@ import type { IPolarAxisHelper } from '../../component/axis/polar/interface';
|
|
|
11
11
|
import type { ISeriesSeriesInfo, ISeriesSpecInfo, ISeriesStackData } from './common';
|
|
12
12
|
import type { ISeriesTooltipHelper } from './tooltip-helper';
|
|
13
13
|
import type { IInvalidType, Datum, DirectionType, IGroup, StringOrNumber } from '../../typings';
|
|
14
|
-
import type { StateValueType } from '../../compile/mark';
|
|
14
|
+
import type { ISeriesMarkAttributeContext, StateValueType } from '../../compile/mark';
|
|
15
15
|
import type { StatisticOperations } from '../../data/transforms/dimension-statistics';
|
|
16
16
|
import type { IGroupMark } from '../../mark/group';
|
|
17
17
|
import type { IGeoCoordinateHelper } from '../../component/geo/interface';
|
|
@@ -95,6 +95,7 @@ export interface ISeries extends IModel {
|
|
|
95
95
|
initLabelMarkStyle?: (labelMark: ILabelMark) => void;
|
|
96
96
|
getGroupFields: () => string[];
|
|
97
97
|
getSpecInfo: () => ISeriesSpecInfo;
|
|
98
|
+
getMarkAttributeContext: () => ISeriesMarkAttributeContext;
|
|
98
99
|
}
|
|
99
100
|
export interface ICartesianSeries extends ISeries {
|
|
100
101
|
readonly coordinate: 'cartesian';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ISeriesSpec } from '../../typings';
|
|
2
|
+
import { BaseSeriesSpecTransformer } from '../base';
|
|
3
|
+
import type { ITreemapSeriesSpec, ITreemapSeriesTheme } from './interface';
|
|
4
|
+
export declare class TreemapSeriesSpecTransformer<T extends ISeriesSpec = Omit<ITreemapSeriesSpec, 'data'>, K extends ITreemapSeriesTheme = ITreemapSeriesTheme> extends BaseSeriesSpecTransformer<T, K> {
|
|
5
|
+
protected _transformLabelSpec(spec: T): void;
|
|
6
|
+
}
|
|
@@ -5,10 +5,14 @@ import { SeriesTypeEnum } from '../interface/type';
|
|
|
5
5
|
import type { ITreemapSeriesSpec } from './interface';
|
|
6
6
|
import type { PanEventParam, ZoomEventParam } from '../../event/interface';
|
|
7
7
|
import { DataView } from '@visactor/vdataset';
|
|
8
|
+
import type { ILabelMark } from '../../mark/label';
|
|
9
|
+
import { TreemapSeriesSpecTransformer } from './treemap-transform';
|
|
8
10
|
export declare class TreemapSeries extends CartesianSeries<any> {
|
|
9
11
|
static readonly type: string;
|
|
10
12
|
type: SeriesTypeEnum;
|
|
11
13
|
static readonly mark: SeriesMarkMap;
|
|
14
|
+
static readonly transformerConstructor: typeof TreemapSeriesSpecTransformer;
|
|
15
|
+
readonly transformerConstructor: typeof TreemapSeriesSpecTransformer;
|
|
12
16
|
private _leafMark;
|
|
13
17
|
private _nonLeafMark;
|
|
14
18
|
private _labelMark;
|
|
@@ -23,7 +27,6 @@ export declare class TreemapSeries extends CartesianSeries<any> {
|
|
|
23
27
|
private _maxDepth;
|
|
24
28
|
private _matrix;
|
|
25
29
|
private _viewBox;
|
|
26
|
-
private _clickEnable;
|
|
27
30
|
private _enableAnimationHook;
|
|
28
31
|
setAttrFromSpec(): void;
|
|
29
32
|
initData(): void;
|
|
@@ -38,8 +41,8 @@ export declare class TreemapSeries extends CartesianSeries<any> {
|
|
|
38
41
|
initMarkStyle(): void;
|
|
39
42
|
protected _initLeafMarkStyle(): void;
|
|
40
43
|
protected _initNonLeafMarkStyle(): void;
|
|
41
|
-
|
|
42
|
-
protected
|
|
44
|
+
initLabelMarkStyle(labelMark: ILabelMark): void;
|
|
45
|
+
protected initNonLeafLabelMarkStyle(labelMark: ILabelMark): void;
|
|
43
46
|
initAnimation(): void;
|
|
44
47
|
protected initEvent(): void;
|
|
45
48
|
protected _getDataIdKey(): string;
|