@visactor/vchart-types 1.7.0-alpha.0 → 1.7.0-alpha.2
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/chart/base-chart.d.ts +9 -12
- package/types/chart/interface/chart.d.ts +2 -4
- package/types/chart/sequence/sequence.d.ts +1 -1
- package/types/chart/util.d.ts +8 -0
- package/types/compile/compiler.d.ts +2 -2
- package/types/compile/mark/compilable-mark.d.ts +15 -6
- package/types/compile/mark/interface.d.ts +8 -4
- package/types/compile/mark/util.d.ts +1 -3
- package/types/component/axis/base-axis.d.ts +1 -4
- package/types/component/axis/cartesian/axis.d.ts +3 -13
- package/types/component/axis/cartesian/band-axis.d.ts +0 -7
- package/types/component/axis/cartesian/interface/common.d.ts +0 -6
- package/types/component/axis/interface/common.d.ts +0 -1
- package/types/component/axis/interface/spec.d.ts +1 -0
- package/types/component/axis/mixin/band-axis-mixin.d.ts +0 -1
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +0 -1
- package/types/component/brush/brush.d.ts +1 -2
- package/types/component/crosshair/base.d.ts +2 -2
- package/types/component/custom-mark/custom-mark.d.ts +2 -2
- package/types/component/data-zoom/data-filter-base-component.d.ts +7 -2
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -2
- package/types/component/data-zoom/data-zoom/interface.d.ts +5 -1
- package/types/component/data-zoom/scroll-bar/interface.d.ts +5 -1
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -0
- package/types/component/data-zoom/util.d.ts +4 -0
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/index.d.ts +3 -2
- package/types/component/indicator/indicator.d.ts +2 -2
- package/types/component/interface/theme.d.ts +2 -1
- package/types/component/label/base-label.d.ts +1 -2
- package/types/component/label/interface.d.ts +5 -0
- package/types/component/label/label.d.ts +4 -6
- package/types/component/label/totalLabel.d.ts +0 -2
- package/types/component/label/util.d.ts +10 -3
- package/types/component/legend/util.d.ts +1 -1
- package/types/component/map-label/component.d.ts +2 -2
- package/types/component/marker/base-marker.d.ts +7 -2
- package/types/component/marker/interface.d.ts +14 -3
- package/types/component/marker/mark-area/interface/spec.d.ts +1 -1
- package/types/component/marker/mark-line/interface/spec.d.ts +3 -4
- package/types/component/marker/mark-line/util.d.ts +3 -3
- package/types/component/marker/mark-point/interface/spec.d.ts +5 -4
- package/types/component/marker/mark-point/interface/theme.d.ts +5 -5
- package/types/component/marker/utils.d.ts +3 -4
- package/types/component/tooltip/handler/utils/attribute.d.ts +3 -3
- package/types/component/tooltip/interface/spec.d.ts +1 -1
- package/types/component/tooltip/interface/theme.d.ts +10 -11
- package/types/component/tooltip/tooltip.d.ts +2 -2
- package/types/component/util.d.ts +1 -3
- package/types/core/expression-function.d.ts +12 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +5 -0
- package/types/core/vchart.d.ts +9 -1
- package/types/data/transforms/aggregation.d.ts +4 -3
- package/types/data/transforms/sankey.d.ts +3 -6
- package/types/event/events/dimension/base.d.ts +1 -0
- package/types/event/interface.d.ts +1 -1
- package/types/index-wx-simple.d.ts +4 -0
- package/types/interaction/config.d.ts +2 -2
- package/types/mark/base/base-mark.d.ts +2 -2
- package/types/model/base-model.d.ts +0 -2
- package/types/model/interface.d.ts +3 -9
- package/types/model/layout-model.d.ts +6 -4
- package/types/series/area/area.d.ts +1 -1
- package/types/series/area/interface.d.ts +4 -0
- package/types/series/base/base-series.d.ts +4 -0
- package/types/series/cartesian/cartesian.d.ts +3 -0
- package/types/series/gauge/gauge.d.ts +0 -1
- package/types/series/index.d.ts +2 -2
- package/types/series/interface/common.d.ts +4 -2
- package/types/series/interface/series.d.ts +1 -0
- package/types/series/interface/type.d.ts +3 -1
- package/types/series/line/interface.d.ts +4 -0
- package/types/series/line/line.d.ts +1 -1
- package/types/series/mixin/line-mixin.d.ts +3 -1
- package/types/series/rose/rose.d.ts +2 -1
- package/types/series/sankey/sankey.d.ts +6 -1
- package/types/series/word-cloud/base.d.ts +1 -0
- package/types/theme/builtin/common/component/tooltip.d.ts +2 -1
- package/types/theme/builtin/index.d.ts +2 -4
- package/types/theme/color-scheme/builtin/interface.d.ts +16 -7
- package/types/theme/theme-manager.d.ts +1 -1
- package/types/typings/spec/common.d.ts +3 -2
- package/types/typings/visual.d.ts +1 -2
- package/types/util/spec/common.d.ts +1 -1
- package/types/util/spec/preprocess.d.ts +1 -1
- package/types/util/spec/transform.d.ts +2 -0
- package/types/vchart-simple.d.ts +1 -0
|
@@ -55,27 +55,24 @@ export declare class BaseChart extends CompilableBase implements IChart {
|
|
|
55
55
|
constructor(spec: any, option: IChartOption);
|
|
56
56
|
created(): void;
|
|
57
57
|
transformSpec(spec: any): void;
|
|
58
|
-
init(
|
|
58
|
+
init(): void;
|
|
59
59
|
reDataFlow(): void;
|
|
60
60
|
onResize(width: number, height: number): void;
|
|
61
61
|
updateViewBox(viewBox: IBoundsLike, reLayout: boolean): void;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
createSeries(seriesSpec: ISeriesSpec[]): void;
|
|
66
|
-
initSeries(): void;
|
|
62
|
+
private _createBackground;
|
|
63
|
+
private _createRegion;
|
|
64
|
+
protected _createSeries(seriesSpec: ISeriesSpec[]): void;
|
|
67
65
|
getAllSeries: () => ISeries[];
|
|
68
66
|
getSeriesById(id: number): ISeries | undefined;
|
|
69
67
|
private _createComponent;
|
|
70
|
-
|
|
71
|
-
initComponent(): void;
|
|
68
|
+
private _createComponents;
|
|
72
69
|
getAllComponents(): IComponent[];
|
|
73
70
|
getAllModels(): IModel[];
|
|
74
71
|
getModelInFilter(filter: string | {
|
|
75
72
|
type: string;
|
|
76
73
|
index: number;
|
|
77
74
|
} | ((model: IModel) => boolean)): IModel;
|
|
78
|
-
|
|
75
|
+
private _createLayout;
|
|
79
76
|
setLayout(layout: LayoutCallBack): void;
|
|
80
77
|
private _initLayoutFunc;
|
|
81
78
|
layout(params: ILayoutParams): void;
|
|
@@ -108,7 +105,7 @@ export declare class BaseChart extends CompilableBase implements IChart {
|
|
|
108
105
|
getCanvasRect(): Omit<IRect, 'x' | 'y'>;
|
|
109
106
|
getSeriesData(id: StringOrNumber | undefined, index: number | undefined): DataView | undefined;
|
|
110
107
|
private _transformSpecScale;
|
|
111
|
-
|
|
108
|
+
private _createGlobalScale;
|
|
112
109
|
updateGlobalScaleDomain(): void;
|
|
113
110
|
updateGlobalScale(result: IUpdateSpecResult): void;
|
|
114
111
|
updateGlobalScaleTheme(): void;
|
|
@@ -145,10 +142,10 @@ export declare class BaseChart extends CompilableBase implements IChart {
|
|
|
145
142
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
146
143
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
147
144
|
setHovered(datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
148
|
-
|
|
145
|
+
private _initEvent;
|
|
149
146
|
protected _enableMarkAnimation(states: string | string[]): void;
|
|
150
147
|
protected _disableMarkAnimation(states: string | string[]): void;
|
|
151
148
|
protected _setStateInDatum(stateKey: string, checkReverse: boolean, datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
152
149
|
setDimensionIndex(value: StringOrNumber, opt: DimensionIndexOption): void;
|
|
153
|
-
getColorScheme(): import("
|
|
150
|
+
getColorScheme(): import("..").IThemeColorScheme;
|
|
154
151
|
}
|
|
@@ -7,12 +7,11 @@ import type { IMark } from '../../mark/interface';
|
|
|
7
7
|
import type { IModel, IUpdateSpecResult } from '../../model/interface';
|
|
8
8
|
import type { IRegion } from '../../region/interface';
|
|
9
9
|
import type { ISeries } from '../../series/interface';
|
|
10
|
-
import type { IChartEvaluateOption,
|
|
10
|
+
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartRenderOption, ILayoutParams } from './common';
|
|
11
11
|
import type { IBoundsLike, IPadding } from '@visactor/vutils';
|
|
12
12
|
import type { ICompilable } from '../../compile/interface';
|
|
13
13
|
import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber, IShowTooltipOption, IDataValues, ILayoutRect } from '../../typings';
|
|
14
14
|
import type { DataView } from '@visactor/vdataset';
|
|
15
|
-
import type { IThemeColorScheme } from '../../theme/color-scheme/interface';
|
|
16
15
|
export type DimensionIndexOption = {
|
|
17
16
|
filter?: (cmp: IComponent) => boolean;
|
|
18
17
|
tooltip?: boolean;
|
|
@@ -38,7 +37,7 @@ export interface IChart extends ICompilable {
|
|
|
38
37
|
updateGlobalScaleDomain: () => void;
|
|
39
38
|
created: () => void;
|
|
40
39
|
transformSpec: (spec: any) => void;
|
|
41
|
-
init: (
|
|
40
|
+
init: () => void;
|
|
42
41
|
onLayoutStart: (ctx: IChartLayoutOption) => void;
|
|
43
42
|
onLayoutEnd: (ctx: IChartLayoutOption) => void;
|
|
44
43
|
onEvaluateEnd: (ctx: IChartEvaluateOption) => void;
|
|
@@ -75,7 +74,6 @@ export interface IChart extends ICompilable {
|
|
|
75
74
|
updateViewBox: (viewBox: IBoundsLike, reLayout: boolean) => void;
|
|
76
75
|
getCanvas: () => HTMLCanvasElement | undefined;
|
|
77
76
|
setCurrentTheme: (reInit?: boolean) => void;
|
|
78
|
-
getColorScheme: () => IThemeColorScheme | undefined;
|
|
79
77
|
getSeriesData: (id: StringOrNumber | undefined, index: number | undefined) => DataView | undefined;
|
|
80
78
|
setDimensionIndex: (value: StringOrNumber, opt: DimensionIndexOption) => void;
|
|
81
79
|
}
|
|
@@ -5,7 +5,7 @@ export declare class SequenceChart extends BaseChart {
|
|
|
5
5
|
static readonly view: string;
|
|
6
6
|
readonly type: string;
|
|
7
7
|
transformSpec(spec: ISequenceChartSpec): void;
|
|
8
|
-
|
|
8
|
+
protected _createSeries(seriesSpec: ISequenceSeriesSpec[]): void;
|
|
9
9
|
addAttrToComponentSpec(componentSpec: any, attr: string, value: any): any;
|
|
10
10
|
private _getSeriesDataLength;
|
|
11
11
|
}
|
package/types/chart/util.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IChartSpec } from '../typings';
|
|
1
2
|
import type { ICartesianChartSpec } from './cartesian/interface';
|
|
2
3
|
import type { IChartOption } from './interface/common';
|
|
3
4
|
import type { IUpdateSpecResult } from '../model/interface';
|
|
@@ -10,3 +11,10 @@ export declare function calculateChartSize(spec: {
|
|
|
10
11
|
height: number;
|
|
11
12
|
};
|
|
12
13
|
export declare function mergeUpdateResult(resultA: IUpdateSpecResult, resultB: IUpdateSpecResult): IUpdateSpecResult;
|
|
14
|
+
export declare function getTrimPaddingConfig(chartType: string, spec: IChartSpec): {
|
|
15
|
+
paddingInner: number;
|
|
16
|
+
paddingOuter: number;
|
|
17
|
+
} | {
|
|
18
|
+
paddingOuter: number;
|
|
19
|
+
paddingInner?: undefined;
|
|
20
|
+
};
|
|
@@ -38,7 +38,7 @@ export declare class Compiler {
|
|
|
38
38
|
clear(ctx: {
|
|
39
39
|
chart: IChart;
|
|
40
40
|
vChart: VChart;
|
|
41
|
-
}): void;
|
|
41
|
+
}, removeGraphicItems?: boolean): void;
|
|
42
42
|
renderAsync(morphConfig?: IMorphConfig): Promise<any>;
|
|
43
43
|
renderSync(morphConfig?: IMorphConfig): void;
|
|
44
44
|
updateViewBox(viewBox: IBoundsLike, reRender?: boolean): void;
|
|
@@ -50,7 +50,7 @@ export declare class Compiler {
|
|
|
50
50
|
removeEventListener(source: EventSourceType, type: string, callback: (params: CompilerListenerParameters) => void): void;
|
|
51
51
|
protected releaseEvent(): void;
|
|
52
52
|
release(): void;
|
|
53
|
-
releaseGrammar(): void;
|
|
53
|
+
releaseGrammar(removeGraphicItems?: boolean): void;
|
|
54
54
|
protected _releaseModel(): void;
|
|
55
55
|
addGrammarItem(grammarItem: IGrammarItem): void;
|
|
56
56
|
removeGrammarItem(grammarItem: IGrammarItem, reserveVGrammarModel?: boolean): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IGroupMark, IMark, MarkAnimationSpec, MarkFunctionCallback, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
2
2
|
import type { DataView } from '@visactor/vdataset';
|
|
3
3
|
import { GrammarItem } from '../grammar-item';
|
|
4
|
-
import type { Maybe, StringOrNumber } from '../../typings';
|
|
4
|
+
import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IMarkProgressiveConfig, IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
6
6
|
import type { IModel } from '../../model/interface';
|
|
7
7
|
import { MarkStateManager } from './mark-state-manager';
|
|
@@ -9,12 +9,16 @@ import type { ICompilableMark, IMarkDataInitOption, ICompilableMarkOption, State
|
|
|
9
9
|
import { MarkData } from './mark-data';
|
|
10
10
|
import { GrammarType } from '../interface/compilable-item';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
12
|
-
import type {
|
|
12
|
+
import type { TransformedLabelSpec } from '../../component/label';
|
|
13
|
+
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
13
14
|
export declare abstract class CompilableMark extends GrammarItem implements ICompilableMark {
|
|
14
15
|
readonly grammarType = GrammarType.mark;
|
|
15
16
|
readonly type: MarkType;
|
|
16
17
|
readonly name: string;
|
|
17
18
|
readonly key: ICompilableMark['key'];
|
|
19
|
+
protected _skipTheme?: boolean;
|
|
20
|
+
getSkipTheme(): boolean;
|
|
21
|
+
setSkipTheme(skipTheme: boolean): void;
|
|
18
22
|
protected _support3d?: boolean;
|
|
19
23
|
getSupport3d(): boolean;
|
|
20
24
|
setSupport3d(support3d: boolean): void;
|
|
@@ -65,13 +69,17 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
65
69
|
protected _groupKey?: string;
|
|
66
70
|
getGroupKey(): string;
|
|
67
71
|
setGroupKey(groupKey: string): void;
|
|
68
|
-
protected _label?:
|
|
69
|
-
getLabelSpec():
|
|
70
|
-
setLabelSpec(label:
|
|
71
|
-
addLabelSpec(label:
|
|
72
|
+
protected _label?: TransformedLabelSpec[];
|
|
73
|
+
getLabelSpec(): TransformedLabelSpec[];
|
|
74
|
+
setLabelSpec(label: TransformedLabelSpec | TransformedLabelSpec[]): void;
|
|
75
|
+
addLabelSpec(label: TransformedLabelSpec, head?: boolean): void;
|
|
72
76
|
protected _progressiveConfig: IMarkProgressiveConfig;
|
|
73
77
|
getProgressiveConfig(): IMarkProgressiveConfig;
|
|
74
78
|
setProgressiveConfig(config: IMarkProgressiveConfig): void;
|
|
79
|
+
protected _setCustomizedShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
|
|
80
|
+
setCustomizedShapeCallback(callback: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D): void;
|
|
81
|
+
protected _enableSegments: boolean;
|
|
82
|
+
setEnableSegments(enable: boolean): void;
|
|
75
83
|
protected _option: ICompilableMarkOption;
|
|
76
84
|
constructor(option: ICompilableMarkOption, name: string, model: IModel);
|
|
77
85
|
protected _product: Maybe<IMark>;
|
|
@@ -95,6 +103,7 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
95
103
|
compileAnimation(): void;
|
|
96
104
|
compileContext(): void;
|
|
97
105
|
compileSignal(): void;
|
|
106
|
+
protected _computeAttribute(key: string, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => any;
|
|
98
107
|
protected compileCommonAttributeCallback(key: string, state: string): MarkFunctionCallback<any>;
|
|
99
108
|
protected compileTransform(): void;
|
|
100
109
|
protected _lookupGrammar(id: string): IMark;
|
|
@@ -7,14 +7,17 @@ import type { DataView } from '@visactor/vdataset';
|
|
|
7
7
|
import type { IAnimate, IAnimateArranger, IElement, IGroupMark, IMark, MarkAnimationSpec, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
8
8
|
import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
9
9
|
import type { MarkData } from './mark-data';
|
|
10
|
-
import type {
|
|
10
|
+
import type { TransformedLabelSpec } from '../../component/label';
|
|
11
11
|
import type { IRegion } from '../../region/interface';
|
|
12
|
+
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
12
13
|
export interface ICompilableMarkOption extends GrammarItemInitOption {
|
|
13
14
|
key?: string | ((datum: Datum) => string);
|
|
14
15
|
groupKey?: string;
|
|
15
16
|
skipBeforeLayouted?: boolean;
|
|
16
17
|
support3d?: boolean;
|
|
17
18
|
mode?: '2d' | '3d';
|
|
19
|
+
skipTheme?: boolean;
|
|
20
|
+
noSeparateStyle?: boolean;
|
|
18
21
|
}
|
|
19
22
|
export interface ICompilableMark extends IGrammarItem {
|
|
20
23
|
readonly type: MarkType;
|
|
@@ -28,9 +31,9 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
28
31
|
setDataView: (d?: DataView, productId?: string) => void;
|
|
29
32
|
getFacet: () => string | undefined;
|
|
30
33
|
setFacet: (facet: string) => void;
|
|
31
|
-
getLabelSpec: () =>
|
|
32
|
-
setLabelSpec: (label:
|
|
33
|
-
addLabelSpec: (label:
|
|
34
|
+
getLabelSpec: () => TransformedLabelSpec[];
|
|
35
|
+
setLabelSpec: (label: TransformedLabelSpec | TransformedLabelSpec[]) => void;
|
|
36
|
+
addLabelSpec: (label: TransformedLabelSpec, head?: boolean) => void;
|
|
34
37
|
state: MarkStateManager;
|
|
35
38
|
readonly stateStyle: IMarkStateStyle<any>;
|
|
36
39
|
hasState: (state: string) => boolean;
|
|
@@ -67,6 +70,7 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
67
70
|
getMarks: () => ICompilableMark[];
|
|
68
71
|
setSkipBeforeLayouted: (skip: boolean) => void;
|
|
69
72
|
getSkipBeforeLayouted: () => boolean;
|
|
73
|
+
setCustomizedShapeCallback: (callback: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D) => void;
|
|
70
74
|
runAnimationByState: (animationState?: string) => IAnimateArranger;
|
|
71
75
|
stopAnimationByState: (animationState?: string) => IAnimate;
|
|
72
76
|
pauseAnimationByState: (animationState: string) => IAnimate;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { IAttrs, IMarkStateStyle
|
|
1
|
+
import type { IAttrs, IMarkStateStyle } from '../../mark/interface';
|
|
2
2
|
export declare function isAttrChangeable<T>(key: string, stateStyle: IMarkStateStyle<T>): boolean;
|
|
3
3
|
export declare function isStateAttrChangeable<T>(key: string, stateStyle: Partial<IAttrs<T>>, facetField: string): boolean;
|
|
4
|
-
export declare function needAttrTransform(type: MarkType, attr: string): boolean;
|
|
5
|
-
export declare function attrTransform(type: MarkType, attr: string, value: any): any;
|
|
6
4
|
export declare function stateInDefaultEnum(state: string): boolean;
|
|
7
5
|
export declare function stateToReverse(state: string): any;
|
|
@@ -6,7 +6,7 @@ import { BaseComponent } from '../base/base-component';
|
|
|
6
6
|
import type { IPolarAxisCommonTheme } from './polar/interface';
|
|
7
7
|
import type { ICartesianAxisCommonTheme } from './cartesian/interface';
|
|
8
8
|
import type { CompilableData } from '../../compile/data';
|
|
9
|
-
import type { IAxis, ICommonAxisSpec, ITick
|
|
9
|
+
import type { IAxis, ICommonAxisSpec, ITick } from './interface';
|
|
10
10
|
import type { IComponentOption } from '../interface';
|
|
11
11
|
import type { ISeries } from '../../series/interface';
|
|
12
12
|
import type { ITransformOptions } from '@visactor/vdataset';
|
|
@@ -23,8 +23,6 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
23
23
|
protected _theme: ICartesianAxisCommonTheme | IPolarAxisCommonTheme;
|
|
24
24
|
protected _tickData: CompilableData;
|
|
25
25
|
getTickData(): CompilableData;
|
|
26
|
-
protected _statisticsDomain: StatisticsDomain;
|
|
27
|
-
getStatisticsDomain(): StatisticsDomain;
|
|
28
26
|
protected _seriesUserId?: StringOrNumber[];
|
|
29
27
|
protected _seriesIndex?: number[];
|
|
30
28
|
protected _regionUserId?: StringOrNumber[];
|
|
@@ -60,7 +58,6 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
60
58
|
userId: StringOrNumber[];
|
|
61
59
|
specIndex: number[];
|
|
62
60
|
};
|
|
63
|
-
protected computeStatisticsDomain: () => void;
|
|
64
61
|
protected initEvent(): void;
|
|
65
62
|
protected updateScaleDomain(): void;
|
|
66
63
|
protected computeData(updateType?: 'domain' | 'range' | 'force'): void;
|
|
@@ -33,22 +33,12 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
33
33
|
};
|
|
34
34
|
protected _orient: IOrientType;
|
|
35
35
|
getOrient(): IOrientType;
|
|
36
|
+
protected _autoIndentOnce: boolean;
|
|
37
|
+
protected _hasAutoIndent: boolean;
|
|
38
|
+
set autoIndentOnce(v: boolean);
|
|
36
39
|
protected _scales: IBaseScale[];
|
|
37
40
|
getScales(): IBaseScale[];
|
|
38
41
|
protected _theme: ICartesianAxisCommonTheme;
|
|
39
|
-
protected _statisticsDomain: {
|
|
40
|
-
domain: any[];
|
|
41
|
-
index: {
|
|
42
|
-
[key in StringOrNumber]: number;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
getStatisticsDomain(): {
|
|
46
|
-
domain: any[];
|
|
47
|
-
index: {
|
|
48
|
-
[x: string]: number;
|
|
49
|
-
[x: number]: number;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
42
|
protected _tick: ITick | undefined;
|
|
53
43
|
private _axisStyle;
|
|
54
44
|
private _latestBounds;
|
|
@@ -23,13 +23,6 @@ export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICarte
|
|
|
23
23
|
dataToPosition: (values: any[]) => number;
|
|
24
24
|
getScale: (depth: number) => BandScale;
|
|
25
25
|
getBandwidth: (depth: number) => number;
|
|
26
|
-
getStatisticsDomain: () => {
|
|
27
|
-
domain: any[];
|
|
28
|
-
index: {
|
|
29
|
-
[x: string]: number;
|
|
30
|
-
[x: number]: number;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
26
|
getAxisType: () => ComponentTypeEnum;
|
|
34
27
|
getAxisId: () => number;
|
|
35
28
|
isInverse: () => boolean;
|
|
@@ -31,12 +31,6 @@ export interface IAxisHelper {
|
|
|
31
31
|
getScale?: (depth: number) => IBaseScale;
|
|
32
32
|
getBandwidth?: (depth: number) => number;
|
|
33
33
|
setExtendDomain?: (key: string, value: number | undefined) => void;
|
|
34
|
-
getStatisticsDomain?: () => {
|
|
35
|
-
domain: any[];
|
|
36
|
-
index: {
|
|
37
|
-
[key in StringOrNumber]: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
34
|
getAxisType: () => string;
|
|
41
35
|
getAxisId: () => number;
|
|
42
36
|
isInverse: () => boolean;
|
|
@@ -15,7 +15,6 @@ export interface IAxis extends IComponent {
|
|
|
15
15
|
getScales: () => IBaseScale[];
|
|
16
16
|
getOrient: () => ICartesianAxisSpec['orient'] | IPolarOrientType;
|
|
17
17
|
visible: boolean;
|
|
18
|
-
getStatisticsDomain: () => StatisticsDomain;
|
|
19
18
|
}
|
|
20
19
|
export interface IAxisItem<T> {
|
|
21
20
|
visible?: boolean;
|
|
@@ -31,6 +31,7 @@ export interface ILinearAxisSpec {
|
|
|
31
31
|
tooltipFilterRange?: number | [number, number];
|
|
32
32
|
}
|
|
33
33
|
export interface IBandAxisSpec {
|
|
34
|
+
trimPadding?: boolean;
|
|
34
35
|
bandPadding?: number | number[];
|
|
35
36
|
paddingInner?: number | number[];
|
|
36
37
|
paddingOuter?: number | number[];
|
|
@@ -8,9 +8,8 @@ import type { IGraphic } from '@visactor/vrender-core';
|
|
|
8
8
|
import type { ISeries } from '../../series/interface';
|
|
9
9
|
import type { IElement } from '@visactor/vgrammar-core';
|
|
10
10
|
import type { BrushInteractiveRangeAttr, IBrush, IBrushSpec } from './interface';
|
|
11
|
-
import type { ILayoutType } from '../../typings/layout';
|
|
12
11
|
export declare class Brush extends BaseComponent<IBrushSpec> implements IBrush {
|
|
13
|
-
layoutType:
|
|
12
|
+
layoutType: 'none';
|
|
14
13
|
static type: ComponentTypeEnum;
|
|
15
14
|
type: ComponentTypeEnum;
|
|
16
15
|
name: string;
|
|
@@ -2,7 +2,7 @@ import type { Dict, IBoundsLike } from '@visactor/vutils';
|
|
|
2
2
|
import type { IModelLayoutOption, IModelRenderOption } from '../../model/interface';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import { BaseComponent } from '../base/base-component';
|
|
5
|
-
import type {
|
|
5
|
+
import type { IPadding, Maybe, StringOrNumber } from '../../typings';
|
|
6
6
|
import type { IComponentOption } from '../interface';
|
|
7
7
|
import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairTheme, ICrosshairCategoryFieldSpec } from './interface';
|
|
8
8
|
import type { IAxis } from '../axis/interface';
|
|
@@ -31,7 +31,7 @@ export interface IHair {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec | IPolarCrosshairSpec> extends BaseComponent<T> implements ICrossHair {
|
|
34
|
-
layoutType:
|
|
34
|
+
layoutType: 'none';
|
|
35
35
|
gridZIndex: number;
|
|
36
36
|
labelZIndex: number;
|
|
37
37
|
trigger: CrossHairTrigger;
|
|
@@ -3,13 +3,13 @@ import { ComponentTypeEnum } from '../interface/type';
|
|
|
3
3
|
import type { IComponentOption } from '../interface';
|
|
4
4
|
import type { IRegion } from '../../region/interface';
|
|
5
5
|
import type { IModelRenderOption } from '../../model/interface';
|
|
6
|
-
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec
|
|
6
|
+
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec } from '../../typings';
|
|
7
7
|
import type { MarkTypeEnum } from '../../mark/interface';
|
|
8
8
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
9
9
|
export declare class CustomMark extends BaseComponent<any> {
|
|
10
10
|
static type: ComponentTypeEnum;
|
|
11
11
|
type: ComponentTypeEnum;
|
|
12
|
-
layoutType:
|
|
12
|
+
layoutType: 'none';
|
|
13
13
|
layoutZIndex: number;
|
|
14
14
|
layoutLevel: number;
|
|
15
15
|
protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | ICustomMarkGroupSpec)[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
2
|
import type { IEffect, IModelInitOption } from '../../model/interface';
|
|
3
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
4
|
-
import type { AdaptiveSpec, ILayoutRect, ILayoutType, IOrientType, StringOrNumber } from '../../typings';
|
|
4
|
+
import type { AdaptiveSpec, ILayoutRect, ILayoutType, IOrientType, IRect, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IBaseScale } from '@visactor/vscale';
|
|
6
6
|
import type { ICartesianBandAxisSpec } from '../axis/cartesian';
|
|
7
7
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
@@ -9,8 +9,9 @@ import { IFilterMode } from './constant';
|
|
|
9
9
|
import type { IDataFilterComponent, IDataFilterComponentSpec, IRoamDragSpec, IRoamScrollSpec, IRoamZoomSpec } from './interface';
|
|
10
10
|
import type { BaseEventParams } from '../../event/interface';
|
|
11
11
|
import type { AbstractComponent } from '@visactor/vrender-components';
|
|
12
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
12
13
|
export declare abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec = IDataFilterComponentSpec> extends BaseComponent<AdaptiveSpec<T, 'width' | 'height'>> implements IDataFilterComponent {
|
|
13
|
-
layoutType: ILayoutType;
|
|
14
|
+
layoutType: ILayoutType | 'none';
|
|
14
15
|
protected _component: AbstractComponent;
|
|
15
16
|
protected _orient: IOrientType;
|
|
16
17
|
protected _isHorizontal: boolean;
|
|
@@ -60,6 +61,8 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
60
61
|
protected abstract _computeHeight(): number;
|
|
61
62
|
protected abstract _handleDataCollectionChange(): void;
|
|
62
63
|
protected _handleChange(start: number, end: number, updateComponent?: boolean): void;
|
|
64
|
+
protected _isReverse(): boolean;
|
|
65
|
+
protected _updateRangeFactor(tag?: string, label?: string): void;
|
|
63
66
|
effect: IEffect;
|
|
64
67
|
protected _visible: boolean;
|
|
65
68
|
get visible(): boolean;
|
|
@@ -108,6 +111,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
108
111
|
protected _handleChartMove: (value: number, rate: number) => void;
|
|
109
112
|
protected _initCommonEvent(): void;
|
|
110
113
|
updateLayoutAttribute(): void;
|
|
114
|
+
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
|
|
111
115
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
112
116
|
hide(): void;
|
|
113
117
|
show(): void;
|
|
@@ -117,4 +121,5 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
117
121
|
minBandSize: number;
|
|
118
122
|
};
|
|
119
123
|
protected _autoUpdate(rect?: ILayoutRect): boolean;
|
|
124
|
+
getVRenderComponents(): IGraphic[];
|
|
120
125
|
}
|
|
@@ -3,7 +3,7 @@ import { ComponentTypeEnum } from '../../interface/type';
|
|
|
3
3
|
import { DataFilterBaseComponent } from '../data-filter-base-component';
|
|
4
4
|
import { DataZoom as DataZoomComponent } from '@visactor/vrender-components';
|
|
5
5
|
import type { IRectGraphicAttribute, ISymbolGraphicAttribute, IGraphic } from '@visactor/vrender-core';
|
|
6
|
-
import type { Datum } from '../../../typings';
|
|
6
|
+
import type { Datum, ILayoutType } from '../../../typings';
|
|
7
7
|
import type { ILinearScale, IBaseScale } from '@visactor/vscale';
|
|
8
8
|
import type { IDataZoomSpec } from './interface';
|
|
9
9
|
export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends DataFilterBaseComponent<T> {
|
|
@@ -12,6 +12,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
12
12
|
name: string;
|
|
13
13
|
layoutZIndex: number;
|
|
14
14
|
layoutLevel: number;
|
|
15
|
+
layoutType: ILayoutType;
|
|
15
16
|
protected _component: DataZoomComponent;
|
|
16
17
|
protected _valueScale: ILinearScale;
|
|
17
18
|
protected _backgroundSize: number;
|
|
@@ -26,7 +27,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
26
27
|
onLayoutEnd(ctx: any): void;
|
|
27
28
|
protected _initValueScale(): void;
|
|
28
29
|
protected _updateScaleRange(): void;
|
|
29
|
-
protected _computeDomainOfValueScale():
|
|
30
|
+
protected _computeDomainOfValueScale(): unknown[];
|
|
30
31
|
protected _computeMiddleHandlerSize(): number;
|
|
31
32
|
protected _computeWidth(): number;
|
|
32
33
|
protected _computeHeight(): number;
|
|
@@ -35,6 +36,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
35
36
|
protected _dataToPositionX2: (datum: Datum) => number;
|
|
36
37
|
protected _dataToPositionY: (datum: Datum) => number;
|
|
37
38
|
protected _dataToPositionY2: (datum: Datum) => number;
|
|
39
|
+
private _getAttrs;
|
|
38
40
|
protected _createOrUpdateComponent(): void;
|
|
39
41
|
protected _handleChange(start: number, end: number, updateComponent?: boolean, tag?: string): void;
|
|
40
42
|
protected _handleDataCollectionChange(): void;
|
|
@@ -52,9 +52,13 @@ export interface IDataZoomSpec extends IDataZoomStyle, IDataFilterComponentSpec
|
|
|
52
52
|
brushSelect?: boolean;
|
|
53
53
|
ignoreBandSize?: boolean;
|
|
54
54
|
}
|
|
55
|
-
export type
|
|
55
|
+
export type IDataZoomCommonTheme = IComponentSpec & IDataZoomStyle & {
|
|
56
56
|
orient?: IDataZoomSpec['orient'];
|
|
57
57
|
width?: IDataZoomSpec['width'];
|
|
58
58
|
height?: IDataZoomSpec['height'];
|
|
59
59
|
brushSelect?: boolean;
|
|
60
60
|
};
|
|
61
|
+
export type IDataZoomTheme = IDataZoomCommonTheme & {
|
|
62
|
+
horizontal?: Omit<IDataZoomCommonTheme, 'orient'>;
|
|
63
|
+
vertical?: Omit<IDataZoomCommonTheme, 'orient'>;
|
|
64
|
+
};
|
|
@@ -14,10 +14,14 @@ export interface IScrollBarSpec extends IDataFilterComponentSpec, IScrollBarStyl
|
|
|
14
14
|
range?: [number, number];
|
|
15
15
|
limitRange?: [number, number];
|
|
16
16
|
}
|
|
17
|
-
export type
|
|
17
|
+
export type IScrollBarCommonTheme = ILayoutItemSpec & IScrollBarStyle & {
|
|
18
18
|
orient?: IScrollBarSpec['orient'];
|
|
19
19
|
width?: IScrollBarSpec['width'];
|
|
20
20
|
height?: IScrollBarSpec['height'];
|
|
21
21
|
round?: IScrollBarSpec['round'];
|
|
22
22
|
innerPadding?: IScrollBarSpec['innerPadding'];
|
|
23
23
|
};
|
|
24
|
+
export type IScrollBarTheme = IScrollBarCommonTheme & {
|
|
25
|
+
horizontal?: Omit<IScrollBarCommonTheme, 'orient'>;
|
|
26
|
+
vertical?: Omit<IScrollBarCommonTheme, 'orient'>;
|
|
27
|
+
};
|
|
@@ -5,12 +5,14 @@ import type { ScrollBarAttributes } from '@visactor/vrender-components';
|
|
|
5
5
|
import { ScrollBar as ScrollBarComponent } from '@visactor/vrender-components';
|
|
6
6
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
7
|
import type { IScrollBarSpec } from './interface';
|
|
8
|
+
import type { ILayoutType } from '../../../typings/layout';
|
|
8
9
|
export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extends DataFilterBaseComponent<T> {
|
|
9
10
|
static type: ComponentTypeEnum;
|
|
10
11
|
type: ComponentTypeEnum;
|
|
11
12
|
name: string;
|
|
12
13
|
layoutZIndex: number;
|
|
13
14
|
layoutLevel: number;
|
|
15
|
+
layoutType: ILayoutType;
|
|
14
16
|
protected _component: ScrollBarComponent;
|
|
15
17
|
static createComponent(spec: any, options: IComponentOption): ScrollBar<any> | ScrollBar<IScrollBarSpec>[];
|
|
16
18
|
constructor(spec: T, options: IComponentOption);
|
|
@@ -19,6 +21,7 @@ export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extend
|
|
|
19
21
|
protected _updateScaleRange(): void;
|
|
20
22
|
protected _computeWidth(): number;
|
|
21
23
|
protected _computeHeight(): number;
|
|
24
|
+
private _getAttrs;
|
|
22
25
|
protected _createOrUpdateComponent(): void;
|
|
23
26
|
protected _handleChange(start: number, end: number, updateComponent?: boolean): void;
|
|
24
27
|
protected _handleDataCollectionChange(): void;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { IModelOption } from '../../model/interface';
|
|
2
|
+
import { type IOrientType } from '../../typings';
|
|
3
|
+
import type { ComponentTypeEnum } from '../interface';
|
|
1
4
|
export interface IDataFilterWithNewDomainOption {
|
|
2
5
|
getNewDomain: () => any[];
|
|
3
6
|
isContinuous: () => boolean;
|
|
@@ -17,3 +20,4 @@ export interface IDataFilterComputeDomainOption {
|
|
|
17
20
|
};
|
|
18
21
|
}
|
|
19
22
|
export declare const dataFilterComputeDomain: (data: Array<any>, op: IDataFilterComputeDomainOption) => any[];
|
|
23
|
+
export declare const getDataFilterTheme: (orient: IOrientType, type: ComponentTypeEnum, option: Partial<IModelOption>) => any;
|
|
@@ -6,14 +6,14 @@ import { ComponentTypeEnum } from '../interface/type';
|
|
|
6
6
|
import { BaseComponent } from '../base/base-component';
|
|
7
7
|
import type { IGeoRegionSpec, IRegion } from '../../region/interface';
|
|
8
8
|
import type { IGeoCoordinate, IGeoCoordinateSpec, IProjectionSpec } from './interface';
|
|
9
|
-
import type { IChartSpec,
|
|
9
|
+
import type { IChartSpec, StringOrNumber } from '../../typings';
|
|
10
10
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
11
11
|
export declare function projectionName(key: string, id: number): string;
|
|
12
12
|
export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> implements IGeoCoordinate {
|
|
13
13
|
static type: ComponentTypeEnum;
|
|
14
14
|
type: ComponentTypeEnum;
|
|
15
15
|
name: string;
|
|
16
|
-
layoutType:
|
|
16
|
+
layoutType: 'none';
|
|
17
17
|
protected layoutZIndex: number;
|
|
18
18
|
_longitudeField?: string;
|
|
19
19
|
get longitudeField(): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IComponent } from './interface/common';
|
|
1
2
|
import type { IScrollBarSpec, IScrollBarTheme } from './data-zoom/scroll-bar';
|
|
2
3
|
import { ScrollBar, registerScrollBar } from './data-zoom/scroll-bar/scroll-bar';
|
|
3
4
|
import type { IDataZoomSpec, IDataZoomTheme } from './data-zoom/data-zoom';
|
|
@@ -25,7 +26,7 @@ import type { ICartesianCrosshairSpec, ICrosshairTheme, IPolarCrosshairSpec } fr
|
|
|
25
26
|
import { CartesianCrossHair, PolarCrossHair, registerCartesianCrossHair, registerPolarCrossHair } from './crosshair';
|
|
26
27
|
import type { IPlayerSpec, IPlayerTheme } from './player';
|
|
27
28
|
import { Player, registerPlayer } from './player';
|
|
28
|
-
import type { IMarkLineSpec, IMarkLineTheme } from './marker/mark-line';
|
|
29
|
+
import type { IMarkLineSpec, IStepMarkLineSpec, IMarkLineTheme } from './marker/mark-line';
|
|
29
30
|
import { MarkLine, registerMarkLine } from './marker/mark-line';
|
|
30
31
|
import type { IMarkAreaSpec, IMarkAreaTheme } from './marker/mark-area';
|
|
31
32
|
import { MarkArea, registerMarkArea } from './marker/mark-area';
|
|
@@ -42,5 +43,5 @@ import type { IAxisCommonTheme, IAxisItemTheme, IBandAxisTheme } from './axis/in
|
|
|
42
43
|
import type { IPoptipTheme } from './poptip/interface';
|
|
43
44
|
export { ScrollBar, DataZoom, CustomMark, Brush, MapLabelComponent, CartesianAxis, CartesianBandAxis, CartesianLinearAxis, CartesianTimeAxis, CartesianLogAxis, CartesianSymlogAxis, PolarAxis, PolarBandAxis, PolarLinearAxis, DiscreteLegend, ContinuousLegend, Indicator, Title, GeoCoordinate, CartesianCrossHair, PolarCrossHair, Player, MarkArea, MarkLine, MarkPoint, Tooltip, Label, TotalLabel };
|
|
44
45
|
export { registerBrush, registerScrollBar, registerTitle, registerTooltip, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerContinuousLegend, registerCustomMark, registerDataZoom, registerDiscreteLegend, registerGeoCoordinate, registerIndicator, registerLabel, registerTotalLabel, registerMapLabel, registerMarkArea, registerMarkLine, registerMarkPoint, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPoptip };
|
|
45
|
-
export type { IScrollBarSpec, IBrushSpec, ICartesianAxisSpec, ICartesianBandAxisSpec, ICartesianCrosshairSpec, ICartesianLinearAxisSpec, ICartesianTimeAxisSpec, ICartesianLogAxisSpec, IContinuousLegendSpec, IDataZoomSpec, IDiscreteLegendSpec, IGeoCoordinateSpec, IIndicatorSpec, ILabelSpec, IMapLabelSpec, IMarkAreaSpec, IMarkLineSpec, IMarkPointSpec, IPlayerSpec, IPolarAxisSpec, IPolarBandAxisSpec, IPolarCrosshairSpec, IPolarLinearAxisSpec, ITitleSpec, ITooltipSpec };
|
|
46
|
+
export type { IComponent, IScrollBarSpec, IBrushSpec, ICartesianAxisSpec, ICartesianBandAxisSpec, ICartesianCrosshairSpec, ICartesianLinearAxisSpec, ICartesianTimeAxisSpec, ICartesianLogAxisSpec, IContinuousLegendSpec, IDataZoomSpec, IDiscreteLegendSpec, IGeoCoordinateSpec, IIndicatorSpec, ILabelSpec, IMapLabelSpec, IMarkAreaSpec, IMarkLineSpec, IStepMarkLineSpec, IMarkPointSpec, IPlayerSpec, IPolarAxisSpec, IPolarBandAxisSpec, IPolarCrosshairSpec, IPolarLinearAxisSpec, ITitleSpec, ITooltipSpec };
|
|
46
47
|
export type { IComponentTheme, ICrosshairTheme, IAxisItemTheme, IAxisCommonTheme, IBandAxisTheme, IPolarAxisCommonTheme, ICartesianAxisCommonTheme, IBrushTheme, IDataZoomTheme, IScrollBarTheme, IIndicatorTheme, IMapLabelTheme, ITotalLabelTheme, ISizeLegendTheme, IColorLegendTheme, IDiscreteLegendTheme, IContinuousLegendTheme, IMarkAreaTheme, IMarkLineTheme, IMarkPointTheme, IPlayerTheme, IPoptipTheme, ITitleTheme, ITooltipTheme };
|
|
@@ -3,13 +3,13 @@ import { ComponentTypeEnum } from '../interface/type';
|
|
|
3
3
|
import { BaseComponent } from '../base/base-component';
|
|
4
4
|
import type { IRegion } from '../../region/interface';
|
|
5
5
|
import type { IIndicator, IIndicatorSpec, IIndicatorTheme } from './interface';
|
|
6
|
-
import type {
|
|
6
|
+
import type { Maybe } from '../../typings';
|
|
7
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
8
|
export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T> implements IIndicator {
|
|
9
9
|
static type: ComponentTypeEnum;
|
|
10
10
|
type: ComponentTypeEnum;
|
|
11
11
|
name: string;
|
|
12
|
-
layoutType:
|
|
12
|
+
layoutType: 'none';
|
|
13
13
|
layoutZIndex: number;
|
|
14
14
|
layoutLevel: number;
|
|
15
15
|
private _gap;
|
|
@@ -14,6 +14,7 @@ import type { ITooltipTheme } from '../tooltip/interface';
|
|
|
14
14
|
import type { ComponentTypeEnum } from './type';
|
|
15
15
|
import type { ITotalLabelTheme } from '../label';
|
|
16
16
|
import type { IPoptipTheme } from '../poptip/interface';
|
|
17
|
+
import type { IColorKey } from '../../theme';
|
|
17
18
|
export interface IComponentTheme {
|
|
18
19
|
axis?: IAxisCommonTheme;
|
|
19
20
|
axisBand?: IAxisCommonTheme;
|
|
@@ -28,7 +29,7 @@ export interface IComponentTheme {
|
|
|
28
29
|
[ComponentTypeEnum.markLine]?: IMarkLineTheme;
|
|
29
30
|
[ComponentTypeEnum.markArea]?: IMarkAreaTheme;
|
|
30
31
|
[ComponentTypeEnum.markPoint]?: IMarkPointTheme;
|
|
31
|
-
[ComponentTypeEnum.tooltip]?: ITooltipTheme
|
|
32
|
+
[ComponentTypeEnum.tooltip]?: ITooltipTheme<string | IColorKey>;
|
|
32
33
|
[ComponentTypeEnum.crosshair]?: ICrosshairTheme;
|
|
33
34
|
[ComponentTypeEnum.dataZoom]?: IDataZoomTheme;
|
|
34
35
|
[ComponentTypeEnum.scrollBar]?: IScrollBarTheme;
|