@visactor/vchart-types 2.1.0-alpha.1 → 2.1.0-alpha.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/chart/base/base-chart-transformer.d.ts +3 -0
- package/types/chart/base/base-chart.d.ts +16 -9
- package/types/chart/interface/chart.d.ts +1 -0
- package/types/chart/util.d.ts +4 -1
- package/types/compile/data/compilable-data.d.ts +1 -1
- package/types/compile/grammar-item.d.ts +1 -1
- package/types/compile/interface/compilable-item.d.ts +1 -1
- package/types/component/axis/base-axis.d.ts +2 -7
- package/types/component/axis/cartesian/band-axis.d.ts +1 -7
- package/types/component/base/base-component.d.ts +7 -7
- package/types/component/base/release-vrender-component.d.ts +10 -0
- package/types/component/brush/brush.d.ts +3 -7
- package/types/component/crosshair/base.d.ts +4 -7
- package/types/component/custom-mark/custom-mark.d.ts +4 -7
- package/types/component/data-zoom/data-filter-base-component.d.ts +3 -7
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -0
- package/types/component/geo/geo-coordinate.d.ts +1 -7
- package/types/component/indicator/indicator.d.ts +1 -0
- package/types/component/label/base-label.d.ts +1 -7
- package/types/component/legend/base-legend.d.ts +2 -7
- package/types/component/marker/base-marker.d.ts +14 -7
- package/types/component/marker/utils.d.ts +4 -4
- package/types/component/player/player.d.ts +1 -0
- package/types/component/title/title.d.ts +1 -7
- package/types/component/tooltip/tooltip.d.ts +1 -0
- package/types/core/vchart.d.ts +5 -1
- package/types/data/data-view-utils.d.ts +5 -0
- package/types/mark/base/base-mark.d.ts +12 -2
- package/types/mark/component.d.ts +9 -0
- package/types/mark/interface/mark.d.ts +2 -0
- package/types/model/base-model.d.ts +3 -15
- package/types/model/interface.d.ts +13 -0
- package/types/region/region.d.ts +1 -7
- package/types/series/area/area.d.ts +2 -0
- package/types/series/bar/bar.d.ts +3 -0
- package/types/series/base/base-series.d.ts +8 -7
- package/types/series/base/constant.d.ts +3 -0
- package/types/series/box-plot/box-plot.d.ts +2 -0
- package/types/series/heatmap/heatmap.d.ts +2 -0
- package/types/series/line/line.d.ts +2 -0
- package/types/series/mixin/line-mixin.d.ts +1 -0
- package/types/series/pie/pie.d.ts +3 -7
- package/types/series/progress/circular/circular.d.ts +2 -0
- package/types/series/progress/linear/linear.d.ts +2 -0
- package/types/series/scatter/scatter.d.ts +2 -0
- package/types/series/waterfall/waterfall.d.ts +2 -0
- package/types/util/graphic-state.d.ts +1 -0
package/types/region/region.d.ts
CHANGED
|
@@ -39,13 +39,7 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
39
39
|
initMark(): void;
|
|
40
40
|
protected _initBackgroundMarkStyle(): void;
|
|
41
41
|
protected _initForegroundMarkStyle(): void;
|
|
42
|
-
_compareSpec(spec: T, prevSpec: T):
|
|
43
|
-
change: boolean;
|
|
44
|
-
reMake: boolean;
|
|
45
|
-
reRender: boolean;
|
|
46
|
-
reSize: boolean;
|
|
47
|
-
reCompile: boolean;
|
|
48
|
-
};
|
|
42
|
+
_compareSpec(spec: T, prevSpec: T): import("../model/interface").IUpdateSpecResult;
|
|
49
43
|
reInit(spec?: T): void;
|
|
50
44
|
addSeries(s: ISeries): void;
|
|
51
45
|
removeSeries(s: ISeries): void;
|
|
@@ -7,6 +7,7 @@ import { SeriesTypeEnum } from '../interface/type';
|
|
|
7
7
|
import type { IAreaSeriesSpec, IAreaSeriesTheme } from './interface';
|
|
8
8
|
import type { IMark, IAreaMark } from '../../mark/interface';
|
|
9
9
|
import { AreaSeriesSpecTransformer } from './area-transformer';
|
|
10
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
10
11
|
export interface AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends Pick<LineLikeSeriesMixin, 'initLineMark' | 'initSymbolMark' | 'initLabelMarkStyle' | 'initLineMarkStyle' | 'initSymbolMarkStyle' | 'encodeDefined' | '_lineMark' | '_symbolMark' | 'addSamplingCompile' | 'addOverlapCompile' | 'reCompileSampling' | 'initLineLabelMarkStyle'>, CartesianSeries<T> {
|
|
11
12
|
}
|
|
12
13
|
export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends CartesianSeries<T> {
|
|
@@ -18,6 +19,7 @@ export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> ext
|
|
|
18
19
|
readonly transformerConstructor: typeof AreaSeriesSpecTransformer;
|
|
19
20
|
protected _areaMark: IAreaMark;
|
|
20
21
|
protected _sortDataByAxis: boolean;
|
|
22
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
21
23
|
initMark(): void;
|
|
22
24
|
initMarkStyle(): void;
|
|
23
25
|
initAreaMarkStyle(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IBaseScale } from '@visactor/vscale';
|
|
2
2
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
3
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
3
4
|
import type { IMark, IRectMark, ITextMark } from '../../mark/interface';
|
|
4
5
|
import type { Datum, DirectionType } from '../../typings';
|
|
5
6
|
import type { IBarSeriesSpec, IBarSeriesTheme } from './interface';
|
|
@@ -24,9 +25,11 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
|
|
|
24
25
|
protected _barMark: IRectMark;
|
|
25
26
|
protected _barBackgroundMark: IRectMark;
|
|
26
27
|
protected _barBackgroundViewData: ICompilableData;
|
|
28
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
27
29
|
initMark(): void;
|
|
28
30
|
protected _initBarBackgroundMark(): void;
|
|
29
31
|
initMarkStyle(): void;
|
|
32
|
+
protected initRectMarkStyle(): void;
|
|
30
33
|
initLabelMarkStyle(textMark: ITextMark): void;
|
|
31
34
|
protected initTooltip(): void;
|
|
32
35
|
protected _statisticViewData(): void;
|
|
@@ -16,6 +16,12 @@ import type { StatisticOperations } from '../../data/transforms/interface';
|
|
|
16
16
|
import type { GraphicEventType } from '@visactor/vrender-core';
|
|
17
17
|
import type { ICompilableData } from '../../compile/data';
|
|
18
18
|
import type { IBaseTriggerOptions } from '../../interaction/interface/trigger';
|
|
19
|
+
export interface ISeriesSpecUpdatePolicy {
|
|
20
|
+
compileOnlyKeys?: Record<string, true>;
|
|
21
|
+
dataRelatedKeys?: Record<string, true>;
|
|
22
|
+
compileOnlySubKeys?: Record<string, Record<string, true>>;
|
|
23
|
+
}
|
|
24
|
+
export declare function markSeriesCompileEffect(compareResult: IUpdateSpecResult, dataRelated?: boolean): void;
|
|
19
25
|
export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel<T> implements ISeries {
|
|
20
26
|
readonly specKey: string;
|
|
21
27
|
readonly type: string;
|
|
@@ -170,13 +176,8 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
170
176
|
protected initTooltip(): void;
|
|
171
177
|
_compareExtensionMarksSpec(newMarks: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[], prevMarks: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[], compareResult: IUpdateSpecResult): void;
|
|
172
178
|
_compareLabelSpec(newLabels: ILabelSpec[], prevLabels: ILabelSpec[], compareResult: IUpdateSpecResult): void;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
reMake: boolean;
|
|
176
|
-
reRender: boolean;
|
|
177
|
-
reSize: boolean;
|
|
178
|
-
reCompile: boolean;
|
|
179
|
-
};
|
|
179
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
180
|
+
_compareSpec(spec: T, prevSpec: T, ignoreCheckKeys?: Record<string, boolean>): IUpdateSpecResult;
|
|
180
181
|
_updateSpecData(): void;
|
|
181
182
|
reInit(spec?: T): void;
|
|
182
183
|
onEvaluateEnd(ctx: IModelEvaluateOption): void;
|
|
@@ -8,6 +8,7 @@ import { DataView } from '@visactor/vdataset';
|
|
|
8
8
|
import type { IMark, ITextMark } from '../../mark/interface';
|
|
9
9
|
import type { ICompilableData } from '../../compile/data';
|
|
10
10
|
import { BoxPlotSeriesSpecTransformer } from './box-plot-transformer';
|
|
11
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
11
12
|
export declare const DEFAULT_FILL_COLOR = "#FFF";
|
|
12
13
|
export declare const DEFAULT_STROKE_COLOR = "#000";
|
|
13
14
|
export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeriesSpec> extends CartesianSeries<T> {
|
|
@@ -46,6 +47,7 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
46
47
|
getOutliersStyle(): IOutlierMarkSpec;
|
|
47
48
|
protected _outlierData: ICompilableData;
|
|
48
49
|
private _autoBoxWidth;
|
|
50
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
49
51
|
setAttrFromSpec(): void;
|
|
50
52
|
private _boxPlotMark?;
|
|
51
53
|
private _outlierMark?;
|
|
@@ -5,6 +5,7 @@ import type { SeriesMarkMap } from '../interface';
|
|
|
5
5
|
import { SeriesTypeEnum } from '../interface/type';
|
|
6
6
|
import type { ICellMark, IMark, ITextMark } from '../../mark/interface';
|
|
7
7
|
import { HeatmapSeriesSpecTransformer } from './heatmap-transformer';
|
|
8
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
8
9
|
export declare const DefaultBandWidth = 6;
|
|
9
10
|
export declare class HeatmapSeries<T extends IHeatmapSeriesSpec = IHeatmapSeriesSpec> extends CartesianSeries<T> {
|
|
10
11
|
static readonly type: string;
|
|
@@ -20,6 +21,7 @@ export declare class HeatmapSeries<T extends IHeatmapSeriesSpec = IHeatmapSeries
|
|
|
20
21
|
protected _fieldValue: string[];
|
|
21
22
|
getFieldValue(): string[];
|
|
22
23
|
setFieldValue(f: string | string[]): void;
|
|
24
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
23
25
|
setAttrFromSpec(): void;
|
|
24
26
|
initMark(): void;
|
|
25
27
|
initMarkStyle(): void;
|
|
@@ -6,6 +6,7 @@ import type { Datum } from '../../typings';
|
|
|
6
6
|
import type { ILineSeriesSpec } from './interface';
|
|
7
7
|
import type { IMark } from '../../mark/interface';
|
|
8
8
|
import { LineLikeSeriesSpecTransformer } from '../mixin/line-mixin-transformer';
|
|
9
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
9
10
|
export interface LineSeries<T extends ILineSeriesSpec = ILineSeriesSpec> extends Pick<LineLikeSeriesMixin, 'initLineMark' | 'initSymbolMark' | 'initLabelMarkStyle' | 'initLineMarkStyle' | 'initSymbolMarkStyle' | '_lineMark' | '_symbolMark' | 'addSamplingCompile' | 'addOverlapCompile' | 'reCompileSampling'>, CartesianSeries<T> {
|
|
10
11
|
}
|
|
11
12
|
export declare class LineSeries<T extends ILineSeriesSpec = ILineSeriesSpec> extends CartesianSeries<T> {
|
|
@@ -18,6 +19,7 @@ export declare class LineSeries<T extends ILineSeriesSpec = ILineSeriesSpec> ext
|
|
|
18
19
|
static readonly transformerConstructor: typeof LineLikeSeriesSpecTransformer;
|
|
19
20
|
readonly transformerConstructor: typeof LineLikeSeriesSpecTransformer;
|
|
20
21
|
protected _sortDataByAxis: boolean;
|
|
22
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
21
23
|
compile(): void;
|
|
22
24
|
initMark(): void;
|
|
23
25
|
protected initTooltip(): void;
|
|
@@ -7,6 +7,7 @@ import type { DimensionEventParams } from '../../event/events/dimension';
|
|
|
7
7
|
import type { IRegion } from '../../region/interface';
|
|
8
8
|
import type { ILineLikeSeriesTheme } from './interface';
|
|
9
9
|
import type { ICompilableData } from '../../compile/data';
|
|
10
|
+
export declare const LINE_LIKE_SERIES_DATA_RELATED_KEYS: Record<string, true>;
|
|
10
11
|
export interface LineLikeSeriesMixin extends ISeries {
|
|
11
12
|
_spec: any;
|
|
12
13
|
_option: ISeriesOption;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IPoint, Datum, StateValueType } from '../../typings';
|
|
2
2
|
import { PolarSeries } from '../polar/polar';
|
|
3
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
3
4
|
import type { IArcMark, IMark, IPathMark, ITextMark } from '../../mark/interface';
|
|
4
5
|
import type { IArcSeries, SeriesMarkMap } from '../interface';
|
|
5
6
|
import { SeriesTypeEnum } from '../interface/type';
|
|
@@ -56,15 +57,10 @@ export declare class BasePieSeries<T extends IBasePieSeriesSpec> extends PolarSe
|
|
|
56
57
|
getInnerRadius(state?: StateValueType): number;
|
|
57
58
|
computeRadius(r: number, k?: number): number;
|
|
58
59
|
computeDatumRadius(datum: Datum, state?: string): number;
|
|
60
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
59
61
|
_compareSpec(spec: T, prevSpec: T, ignoreCheckKeys?: {
|
|
60
62
|
[key: string]: true;
|
|
61
|
-
}):
|
|
62
|
-
change: boolean;
|
|
63
|
-
reMake: boolean;
|
|
64
|
-
reRender: boolean;
|
|
65
|
-
reSize: boolean;
|
|
66
|
-
reCompile: boolean;
|
|
67
|
-
};
|
|
63
|
+
}): import("../..").IUpdateSpecResult;
|
|
68
64
|
computeDatumInnerRadius(datum: Datum, state?: string): number;
|
|
69
65
|
dataToPosition(datum: Datum, checkInViewData?: boolean): IPoint | null;
|
|
70
66
|
dataToCentralPosition: (datum: Datum) => IPoint | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Datum } from '../../../typings';
|
|
2
2
|
import type { SeriesMarkMap } from '../../interface';
|
|
3
3
|
import { SeriesTypeEnum } from '../../interface/type';
|
|
4
|
+
import type { ISeriesSpecUpdatePolicy } from '../../base/base-series';
|
|
4
5
|
import type { ICircularProgressSeriesSpec } from './interface';
|
|
5
6
|
import { ProgressLikeSeries } from '../../polar/progress-like/progress-like';
|
|
6
7
|
import type { IMark } from '../../../mark/interface';
|
|
@@ -16,6 +17,7 @@ export declare class CircularProgressSeries<T extends ICircularProgressSeriesSpe
|
|
|
16
17
|
readonly transformerConstructor: typeof CircularProgressSeriesSpecTransformer;
|
|
17
18
|
private _progressMark;
|
|
18
19
|
private _trackMark;
|
|
20
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
19
21
|
getStackGroupFields(): string[];
|
|
20
22
|
getGroupFields(): string[];
|
|
21
23
|
initMark(): void;
|
|
@@ -3,6 +3,7 @@ import type { SeriesMarkMap } from '../../interface';
|
|
|
3
3
|
import { SeriesTypeEnum } from '../../interface/type';
|
|
4
4
|
import type { ILinearProgressSeriesSpec } from './interface';
|
|
5
5
|
import type { IMark } from '../../../mark/interface';
|
|
6
|
+
import type { ISeriesSpecUpdatePolicy } from '../../base/base-series';
|
|
6
7
|
export declare class LinearProgressSeries<T extends ILinearProgressSeriesSpec = ILinearProgressSeriesSpec> extends CartesianSeries<T> {
|
|
7
8
|
static readonly type: string;
|
|
8
9
|
type: SeriesTypeEnum;
|
|
@@ -12,6 +13,7 @@ export declare class LinearProgressSeries<T extends ILinearProgressSeriesSpec =
|
|
|
12
13
|
};
|
|
13
14
|
private _progressMark;
|
|
14
15
|
private _trackMark;
|
|
16
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
15
17
|
initMark(): void;
|
|
16
18
|
initMarkStyle(): void;
|
|
17
19
|
private _initProgressMark;
|
|
@@ -2,6 +2,7 @@ import type { DataView } from '@visactor/vdataset';
|
|
|
2
2
|
import type { IScatterInvalidType } from '../../typings';
|
|
3
3
|
import type { IScatterSeriesSpec } from './interface';
|
|
4
4
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
5
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
5
6
|
import type { SeriesMarkMap } from '../interface';
|
|
6
7
|
import { SeriesTypeEnum } from '../interface/type';
|
|
7
8
|
import type { ILabelMark, IMark } from '../../mark/interface';
|
|
@@ -22,6 +23,7 @@ export declare class ScatterSeries<T extends IScatterSeriesSpec = IScatterSeries
|
|
|
22
23
|
private _shape;
|
|
23
24
|
private _shapeField;
|
|
24
25
|
protected _invalidType: IScatterInvalidType;
|
|
26
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
25
27
|
setAttrFromSpec(): void;
|
|
26
28
|
private _getSeriesAttribute;
|
|
27
29
|
private getSizeAttribute;
|
|
@@ -8,6 +8,7 @@ import type { Datum } from '../../typings';
|
|
|
8
8
|
import type { ILabelMark, IRuleMark, ITextMark } from '../../mark/interface';
|
|
9
9
|
import type { ILabelInfo } from '../../component/label/interface';
|
|
10
10
|
import { type ICompilableData } from '../../compile/data';
|
|
11
|
+
import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
|
|
11
12
|
export declare const DefaultBandWidth = 6;
|
|
12
13
|
export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfallSeriesSpec> extends BarSeries<any> {
|
|
13
14
|
static readonly type: string;
|
|
@@ -24,6 +25,7 @@ export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfall
|
|
|
24
25
|
protected _leaderLineMark: IRuleMark;
|
|
25
26
|
protected _stackLabelMark: ITextMark;
|
|
26
27
|
protected _labelMark: ITextMark;
|
|
28
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
27
29
|
protected initGroups(): void;
|
|
28
30
|
setAttrFromSpec(): void;
|
|
29
31
|
getSeriesKeys(): string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { IMarkGraphic } from '../mark/interface';
|
|
2
|
+
export declare const setGraphicStates: (graphic: IMarkGraphic, nextStates?: string[] | null, hasAnimation?: boolean) => void;
|
|
2
3
|
export declare const addGraphicState: (graphic: IMarkGraphic, state: string, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;
|
|
3
4
|
export declare const removeGraphicState: (graphic: IMarkGraphic, state: string | string[], hasAnimation?: boolean) => void;
|