@visactor/vchart-types 1.6.7 → 1.7.0-alpha.1
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 +2 -2
- package/types/chart/base-chart.d.ts +13 -16
- package/types/chart/interface/chart.d.ts +4 -6
- package/types/chart/sequence/sequence.d.ts +1 -1
- package/types/compile/mark/compilable-mark.d.ts +10 -6
- package/types/compile/mark/interface.d.ts +6 -4
- package/types/compile/mark/util.d.ts +1 -3
- package/types/component/axis/base-axis.d.ts +2 -4
- package/types/component/axis/cartesian/axis.d.ts +12 -22
- 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/cartesian/interface/theme.d.ts +1 -1
- package/types/component/axis/interface/common.d.ts +0 -1
- 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/axis/polar/axis.d.ts +3 -4
- package/types/component/base/base-component.d.ts +12 -4
- package/types/component/brush/brush.d.ts +2 -4
- package/types/component/crosshair/base.d.ts +3 -4
- package/types/component/crosshair/cartesian.d.ts +2 -0
- package/types/component/crosshair/interface/spec.d.ts +1 -1
- package/types/component/crosshair/polar.d.ts +2 -0
- package/types/component/custom-mark/custom-mark.d.ts +2 -3
- package/types/component/data-zoom/data-filter-base-component.d.ts +8 -8
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -2
- package/types/component/data-zoom/data-zoom/interface.d.ts +6 -1
- package/types/component/data-zoom/scroll-bar/interface.d.ts +6 -2
- 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 +3 -2
- package/types/component/index.d.ts +3 -2
- package/types/component/indicator/indicator.d.ts +1 -3
- package/types/component/indicator/interface.d.ts +1 -1
- package/types/component/interface/common.d.ts +3 -3
- package/types/component/interface/theme.d.ts +2 -1
- package/types/component/label/base-label.d.ts +2 -4
- package/types/component/label/interface.d.ts +4 -0
- package/types/component/label/label.d.ts +5 -7
- package/types/component/label/totalLabel.d.ts +1 -3
- package/types/component/label/util.d.ts +9 -2
- package/types/component/legend/base-legend.d.ts +6 -9
- package/types/component/legend/continuous/legend.d.ts +4 -1
- package/types/component/legend/discrete/legend.d.ts +4 -1
- package/types/component/legend/discrete/util.d.ts +1 -1
- package/types/component/legend/util.d.ts +2 -2
- package/types/component/map-label/component.d.ts +1 -3
- package/types/component/marker/base-marker.d.ts +7 -3
- package/types/component/marker/interface.d.ts +15 -4
- package/types/component/marker/mark-area/interface/spec.d.ts +1 -1
- package/types/component/marker/mark-area/mark-area.d.ts +1 -3
- package/types/component/marker/mark-line/interface/spec.d.ts +3 -4
- package/types/component/marker/mark-line/mark-line.d.ts +1 -3
- 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/mark-point/mark-point.d.ts +1 -3
- package/types/component/marker/utils.d.ts +3 -4
- package/types/component/player/interface/theme.d.ts +1 -1
- package/types/component/player/player.d.ts +6 -7
- package/types/component/title/interface/theme.d.ts +1 -1
- package/types/component/title/title.d.ts +6 -9
- 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 +3 -2
- package/types/component/util.d.ts +1 -3
- package/types/constant/layout.d.ts +1 -0
- package/types/core/expression-function.d.ts +12 -0
- package/types/core/factory.d.ts +5 -2
- 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/event/events/base.d.ts +16 -0
- package/types/event/events/dimension/util/cartesian.d.ts +1 -1
- package/types/event/events/dimension/util/common.d.ts +1 -2
- package/types/event/events/dimension/util/polar.d.ts +1 -1
- package/types/event/interface.d.ts +2 -2
- package/types/index-wx-simple.d.ts +4 -0
- package/types/interaction/zoom/zoomable.d.ts +1 -0
- package/types/layout/base-layout.d.ts +3 -5
- package/types/layout/grid-layout/grid-layout.d.ts +1 -2
- package/types/layout/interface.d.ts +74 -6
- package/types/layout/layout-item.d.ts +71 -0
- package/types/layout/layout3d/index.d.ts +2 -4
- package/types/layout/util.d.ts +1 -1
- package/types/mark/base/base-mark.d.ts +2 -2
- package/types/model/base-model.d.ts +10 -8
- package/types/model/interface.d.ts +21 -89
- package/types/model/layout-model.d.ts +41 -0
- package/types/region/interface.d.ts +3 -2
- package/types/region/region.d.ts +12 -7
- 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 +14 -4
- package/types/series/cartesian/cartesian.d.ts +3 -0
- package/types/series/funnel/interface.d.ts +1 -2
- package/types/series/gauge/gauge.d.ts +0 -1
- package/types/series/index.d.ts +2 -2
- package/types/series/interface/common.d.ts +2 -2
- package/types/series/interface/series.d.ts +4 -2
- 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 +5 -2
- package/types/series/rose/rose.d.ts +2 -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/common-mobile/component/axis/band-axis.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +3 -0
- package/types/theme/builtin/common-mobile/component/axis/common-axis.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +3 -0
- package/types/theme/builtin/common-mobile/component/crosshair.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/data-zoom.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/index.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/indicator.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/legend/color-legend.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/legend/continuous.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/legend/size-legend.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/map-label.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/mark-area.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/mark-line.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/mark-point.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/player.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/poptip.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/title.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/tooltip.d.ts +2 -0
- package/types/theme/builtin/common-mobile/component/total-label.d.ts +2 -0
- package/types/theme/builtin/common-mobile/constants.d.ts +2 -0
- package/types/theme/builtin/common-mobile/mark.d.ts +3 -0
- package/types/theme/builtin/dark-mobile/index.d.ts +2 -0
- package/types/theme/builtin/index.d.ts +2 -4
- package/types/theme/builtin/light-mobile/index.d.ts +2 -0
- package/types/theme/color-scheme/builtin/interface.d.ts +16 -7
- package/types/theme/interface.d.ts +1 -2
- package/types/theme/theme-manager.d.ts +1 -1
- package/types/typings/index.d.ts +1 -0
- package/types/typings/layout.d.ts +23 -0
- package/types/typings/spec/common.d.ts +2 -4
- package/types/typings/visual.d.ts +1 -1
- package/types/util/space.d.ts +1 -1
- 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
|
@@ -9,9 +9,9 @@ export declare const AnimationStates: string[];
|
|
|
9
9
|
export declare function animationConfig<Preset extends string>(defaultConfig?: MarkAnimationSpec, userConfig?: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, params?: {
|
|
10
10
|
dataIndex: (datum: any) => number;
|
|
11
11
|
}): MarkAnimationSpec;
|
|
12
|
-
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: ISeriesMarkAttributeContext): Partial<Record<"none" | "
|
|
12
|
+
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: ISeriesMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "enter" | "exit" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<string>>>;
|
|
13
13
|
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
|
|
14
14
|
export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
|
|
15
15
|
export declare function isChannelAnimation(animationConfig: IAnimationConfig): boolean;
|
|
16
|
-
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: ISeriesMarkAttributeContext): Partial<Record<"none" | "
|
|
16
|
+
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: ISeriesMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "enter" | "exit" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
17
17
|
export declare function isAnimationEnabledForSeries(series: ISeries): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChartData } from './chart-meta/data';
|
|
2
|
-
import type { ISeriesSpec, Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec, IDataValues } from '../typings';
|
|
3
|
-
import type { LayoutCallBack } from '../layout/interface';
|
|
4
|
-
import type { ILayoutModelState,
|
|
2
|
+
import type { ISeriesSpec, Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec, IDataValues, ILayoutRect, ILayoutOrientPadding } from '../typings';
|
|
3
|
+
import type { ILayoutItem, LayoutCallBack } from '../layout/interface';
|
|
4
|
+
import type { ILayoutModelState, IModel, IModelOption, IUpdateSpecResult } from '../model/interface';
|
|
5
5
|
import type { IChart, IChartLayoutOption, IChartRenderOption, IChartOption, IChartEvaluateOption, ILayoutParams, DimensionIndexOption } from './interface';
|
|
6
6
|
import type { ISeries } from '../series/interface';
|
|
7
7
|
import type { IRegion } from '../region/interface';
|
|
@@ -55,34 +55,31 @@ 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;
|
|
82
79
|
onLayoutStart(option: IChartLayoutOption): void;
|
|
83
80
|
onLayoutEnd(option: IChartLayoutOption): void;
|
|
84
81
|
onEvaluateEnd(option: IChartEvaluateOption): void;
|
|
85
|
-
getLayoutElements():
|
|
82
|
+
getLayoutElements(): ILayoutItem[];
|
|
86
83
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
87
84
|
getAllRegions: () => IRegion[];
|
|
88
85
|
getRegionsInIds: (ids: number[]) => IRegion[];
|
|
@@ -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
|
}
|
|
@@ -4,15 +4,14 @@ import type { IRunningConfig as IMorphConfig, IView } from '@visactor/vgrammar-c
|
|
|
4
4
|
import type { IParserOptions } from '@visactor/vdataset/es/parser';
|
|
5
5
|
import type { IComponent } from '../../component/interface';
|
|
6
6
|
import type { IMark } from '../../mark/interface';
|
|
7
|
-
import type {
|
|
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
|
-
import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber, IShowTooltipOption, IDataValues } from '../../typings';
|
|
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
|
}
|
|
@@ -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,15 @@ 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
13
|
export declare abstract class CompilableMark extends GrammarItem implements ICompilableMark {
|
|
14
14
|
readonly grammarType = GrammarType.mark;
|
|
15
15
|
readonly type: MarkType;
|
|
16
16
|
readonly name: string;
|
|
17
17
|
readonly key: ICompilableMark['key'];
|
|
18
|
+
protected _skipTheme?: boolean;
|
|
19
|
+
getSkipTheme(): boolean;
|
|
20
|
+
setSkipTheme(skipTheme: boolean): void;
|
|
18
21
|
protected _support3d?: boolean;
|
|
19
22
|
getSupport3d(): boolean;
|
|
20
23
|
setSupport3d(support3d: boolean): void;
|
|
@@ -65,10 +68,10 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
65
68
|
protected _groupKey?: string;
|
|
66
69
|
getGroupKey(): string;
|
|
67
70
|
setGroupKey(groupKey: string): void;
|
|
68
|
-
protected _label?:
|
|
69
|
-
getLabelSpec():
|
|
70
|
-
setLabelSpec(label:
|
|
71
|
-
addLabelSpec(label:
|
|
71
|
+
protected _label?: TransformedLabelSpec[];
|
|
72
|
+
getLabelSpec(): TransformedLabelSpec[];
|
|
73
|
+
setLabelSpec(label: TransformedLabelSpec | TransformedLabelSpec[]): void;
|
|
74
|
+
addLabelSpec(label: TransformedLabelSpec, head?: boolean): void;
|
|
72
75
|
protected _progressiveConfig: IMarkProgressiveConfig;
|
|
73
76
|
getProgressiveConfig(): IMarkProgressiveConfig;
|
|
74
77
|
setProgressiveConfig(config: IMarkProgressiveConfig): void;
|
|
@@ -95,6 +98,7 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
95
98
|
compileAnimation(): void;
|
|
96
99
|
compileContext(): void;
|
|
97
100
|
compileSignal(): void;
|
|
101
|
+
protected _computeAttribute(key: string, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => any;
|
|
98
102
|
protected compileCommonAttributeCallback(key: string, state: string): MarkFunctionCallback<any>;
|
|
99
103
|
protected compileTransform(): void;
|
|
100
104
|
protected _lookupGrammar(id: string): IMark;
|
|
@@ -7,7 +7,7 @@ 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
12
|
export interface ICompilableMarkOption extends GrammarItemInitOption {
|
|
13
13
|
key?: string | ((datum: Datum) => string);
|
|
@@ -15,6 +15,8 @@ export interface ICompilableMarkOption extends GrammarItemInitOption {
|
|
|
15
15
|
skipBeforeLayouted?: boolean;
|
|
16
16
|
support3d?: boolean;
|
|
17
17
|
mode?: '2d' | '3d';
|
|
18
|
+
skipTheme?: boolean;
|
|
19
|
+
noSeparateStyle?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface ICompilableMark extends IGrammarItem {
|
|
20
22
|
readonly type: MarkType;
|
|
@@ -28,9 +30,9 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
28
30
|
setDataView: (d?: DataView, productId?: string) => void;
|
|
29
31
|
getFacet: () => string | undefined;
|
|
30
32
|
setFacet: (facet: string) => void;
|
|
31
|
-
getLabelSpec: () =>
|
|
32
|
-
setLabelSpec: (label:
|
|
33
|
-
addLabelSpec: (label:
|
|
33
|
+
getLabelSpec: () => TransformedLabelSpec[];
|
|
34
|
+
setLabelSpec: (label: TransformedLabelSpec | TransformedLabelSpec[]) => void;
|
|
35
|
+
addLabelSpec: (label: TransformedLabelSpec, head?: boolean) => void;
|
|
34
36
|
state: MarkStateManager;
|
|
35
37
|
readonly stateStyle: IMarkStateStyle<any>;
|
|
36
38
|
hasState: (state: string) => boolean;
|
|
@@ -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,13 +6,14 @@ 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';
|
|
13
13
|
import { type IComponentMark } from '../../mark/component';
|
|
14
14
|
export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<string, any> = any> extends BaseComponent<T> implements IAxis {
|
|
15
15
|
static specKey: string;
|
|
16
|
+
specKey: string;
|
|
16
17
|
protected _orient: IPolarOrientType | IOrientType;
|
|
17
18
|
getOrient(): IOrientType | IPolarOrientType;
|
|
18
19
|
protected _scale: IBaseScale;
|
|
@@ -22,8 +23,6 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
22
23
|
protected _theme: ICartesianAxisCommonTheme | IPolarAxisCommonTheme;
|
|
23
24
|
protected _tickData: CompilableData;
|
|
24
25
|
getTickData(): CompilableData;
|
|
25
|
-
protected _statisticsDomain: StatisticsDomain;
|
|
26
|
-
getStatisticsDomain(): StatisticsDomain;
|
|
27
26
|
protected _seriesUserId?: StringOrNumber[];
|
|
28
27
|
protected _seriesIndex?: number[];
|
|
29
28
|
protected _regionUserId?: StringOrNumber[];
|
|
@@ -59,7 +58,6 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
59
58
|
userId: StringOrNumber[];
|
|
60
59
|
specIndex: number[];
|
|
61
60
|
};
|
|
62
|
-
protected computeStatisticsDomain: () => void;
|
|
63
61
|
protected initEvent(): void;
|
|
64
62
|
protected updateScaleDomain(): void;
|
|
65
63
|
protected computeData(updateType?: 'domain' | 'range' | 'force'): void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
|
-
import type { IEffect, IModelInitOption
|
|
2
|
+
import type { IEffect, IModelInitOption } from '../../../model/interface';
|
|
3
3
|
import type { ICartesianSeries } from '../../../series/interface';
|
|
4
4
|
import type { IRegion } from '../../../region/interface';
|
|
5
5
|
import type { ICartesianAxisCommonSpec, IAxisHelper, ICartesianAxisCommonTheme } from './interface';
|
|
6
6
|
import type { IOrientType } from '../../../typings/space';
|
|
7
7
|
import type { IBaseScale } from '@visactor/vscale';
|
|
8
|
-
import type {
|
|
9
|
-
import type { IPoint
|
|
8
|
+
import type { StringOrNumber } from '../../../typings/common';
|
|
9
|
+
import type { IPoint } from '../../../typings/coordinate';
|
|
10
|
+
import type { ILayoutRect, ILayoutType } from '../../../typings/layout';
|
|
10
11
|
import type { IComponentOption } from '../../interface';
|
|
11
12
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
12
13
|
import type { IAxis, ITick } from '../interface';
|
|
@@ -21,7 +22,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
21
22
|
protected readonly _defaultBandInnerPadding = 0.1;
|
|
22
23
|
protected readonly _defaultBandOuterPadding = 0.3;
|
|
23
24
|
directionStr?: 'l2r' | 'r2l' | 't2b' | 'b2t';
|
|
24
|
-
layoutType:
|
|
25
|
+
layoutType: ILayoutType;
|
|
25
26
|
layoutZIndex: number;
|
|
26
27
|
layoutLevel: number;
|
|
27
28
|
protected _dataSet: DataSet;
|
|
@@ -32,27 +33,12 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
32
33
|
};
|
|
33
34
|
protected _orient: IOrientType;
|
|
34
35
|
getOrient(): IOrientType;
|
|
35
|
-
get layoutOrient(): IOrientType;
|
|
36
|
-
set layoutOrient(v: IOrientType);
|
|
37
36
|
protected _autoIndentOnce: boolean;
|
|
38
37
|
protected _hasAutoIndent: boolean;
|
|
39
38
|
set autoIndentOnce(v: boolean);
|
|
40
39
|
protected _scales: IBaseScale[];
|
|
41
40
|
getScales(): IBaseScale[];
|
|
42
41
|
protected _theme: ICartesianAxisCommonTheme;
|
|
43
|
-
protected _statisticsDomain: {
|
|
44
|
-
domain: any[];
|
|
45
|
-
index: {
|
|
46
|
-
[key in StringOrNumber]: number;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
getStatisticsDomain(): {
|
|
50
|
-
domain: any[];
|
|
51
|
-
index: {
|
|
52
|
-
[x: string]: number;
|
|
53
|
-
[x: number]: number;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
42
|
protected _tick: ITick | undefined;
|
|
57
43
|
private _axisStyle;
|
|
58
44
|
private _latestBounds;
|
|
@@ -66,6 +52,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
66
52
|
constructor(spec: T, options: IComponentOption);
|
|
67
53
|
static createAxis(spec: any, options: IComponentOption, isHorizontal?: boolean): IAxis;
|
|
68
54
|
static createComponent(spec: any, options: IComponentOption): IAxis | IAxis[];
|
|
55
|
+
initLayout(): void;
|
|
69
56
|
setLayout3dBox(box3d: {
|
|
70
57
|
width: number;
|
|
71
58
|
height: number;
|
|
@@ -98,9 +85,12 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
98
85
|
values: any[];
|
|
99
86
|
}[];
|
|
100
87
|
protected updateSeriesScale(): void;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
_transformLayoutPosition: (pos: Partial<IPoint>) => {
|
|
89
|
+
x: number;
|
|
90
|
+
y: number;
|
|
91
|
+
};
|
|
92
|
+
_transformLayoutRect: (result: ILayoutRect) => ILayoutRect;
|
|
93
|
+
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
104
94
|
updateLayoutAttribute(): void;
|
|
105
95
|
private _getTitleLimit;
|
|
106
96
|
private _getUpdateAttribute;
|
|
@@ -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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ILayoutNumber, ILayoutPaddingSpec } from '../../../../typings/layout';
|
|
2
2
|
import type { ITick, IGrid } from '../../interface';
|
|
3
3
|
import type { ICartesianAxisUnit, ICartesianDomainLine, ICartesianLabel, ICartesianTitle } from './common';
|
|
4
4
|
import type { ICartesianAxisCommonSpec } from './spec';
|
|
@@ -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;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IBaseScale } from '@visactor/vscale';
|
|
2
|
-
import type { LayoutItem } from '../../../model/layout-item';
|
|
3
2
|
import type { IPolarAxis, IPolarAxisCommonSpec, IPolarAxisCommonTheme } from './interface';
|
|
4
3
|
import type { IComponentOption } from '../../interface';
|
|
5
4
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
6
5
|
import type { IPolarSeries } from '../../../series/interface';
|
|
7
|
-
import type { IPoint, IPolarOrientType, IPolarPoint, StringOrNumber } from '../../../typings';
|
|
6
|
+
import type { IPoint, IPolarOrientType, IPolarPoint, StringOrNumber, ILayoutType } from '../../../typings';
|
|
8
7
|
import type { IEffect } from '../../../model/interface';
|
|
9
8
|
import { AxisComponent } from '../base-axis';
|
|
10
9
|
import type { ITick } from '../interface';
|
|
@@ -15,7 +14,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
15
14
|
protected readonly _defaultBandPosition = 0;
|
|
16
15
|
protected readonly _defaultBandInnerPadding = 0;
|
|
17
16
|
protected readonly _defaultBandOuterPadding = 0;
|
|
18
|
-
layoutType:
|
|
17
|
+
layoutType: ILayoutType;
|
|
19
18
|
layoutZIndex: number;
|
|
20
19
|
protected _tick: ITick | undefined;
|
|
21
20
|
protected _center: IPoint | null;
|
|
@@ -37,7 +36,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
37
36
|
static createComponent(spec: any, options: IComponentOption): IPolarAxis | IPolarAxis[];
|
|
38
37
|
effect: IEffect;
|
|
39
38
|
setAttrFromSpec(): void;
|
|
40
|
-
|
|
39
|
+
_transformLayoutPosition: (pos: Partial<IPoint>) => Partial<IPoint>;
|
|
41
40
|
onLayoutEnd(ctx: any): void;
|
|
42
41
|
onRender(ctx: any): void;
|
|
43
42
|
changeRegions(): void;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { IGraphic, IGroup } from '@visactor/vrender-core';
|
|
2
|
-
import { BaseModel } from '../../model/base-model';
|
|
3
2
|
import type { IRegion } from '../../region/interface';
|
|
4
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
5
4
|
import type { BaseEventParams } from '../../event/interface';
|
|
6
5
|
import type { IComponentPluginService, IComponentPlugin } from '../../plugin/components/interface';
|
|
6
|
+
import type { IBoundsLike } from '@visactor/vutils';
|
|
7
7
|
import type { IGroupMark } from '@visactor/vgrammar-core';
|
|
8
8
|
import type { IAnimate } from '../../animation/interface';
|
|
9
|
-
import type { Datum } from '../../typings';
|
|
9
|
+
import type { Datum, ILayoutRect } from '../../typings';
|
|
10
10
|
import type { IComponentSpec } from './interface';
|
|
11
|
-
|
|
11
|
+
import { LayoutModel } from '../../model/layout-model';
|
|
12
|
+
export declare abstract class BaseComponent<T extends IComponentSpec = IComponentSpec> extends LayoutModel<T> implements IComponent {
|
|
12
13
|
name: string;
|
|
13
14
|
readonly modelType: string;
|
|
14
15
|
pluginService?: IComponentPluginService;
|
|
@@ -19,6 +20,7 @@ export declare abstract class BaseComponent<T extends IComponentSpec = IComponen
|
|
|
19
20
|
created(): void;
|
|
20
21
|
animate?: IAnimate;
|
|
21
22
|
constructor(spec: T, options: IComponentOption);
|
|
23
|
+
initLayout(): void;
|
|
22
24
|
abstract changeRegions(regions: IRegion[]): void;
|
|
23
25
|
abstract getVRenderComponents(): IGraphic[];
|
|
24
26
|
protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
|
|
@@ -41,5 +43,11 @@ export declare abstract class BaseComponent<T extends IComponentSpec = IComponen
|
|
|
41
43
|
compile(): void;
|
|
42
44
|
compileMarks(group?: string | IGroupMark): void;
|
|
43
45
|
protected _delegateEvent: (component: IGraphic, event: any, type: string, item?: any, datum?: Datum) => void;
|
|
44
|
-
getGraphicBounds
|
|
46
|
+
getGraphicBounds: () => {
|
|
47
|
+
x1: number;
|
|
48
|
+
y1: number;
|
|
49
|
+
x2: number;
|
|
50
|
+
y2: number;
|
|
51
|
+
};
|
|
52
|
+
getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike;
|
|
45
53
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { LayoutItem } from '../../model/layout-item';
|
|
2
1
|
import { BaseComponent } from '../base/base-component';
|
|
3
2
|
import type { IComponentOption } from '../interface';
|
|
4
3
|
import { ComponentTypeEnum } from '../interface/type';
|
|
@@ -10,12 +9,11 @@ import type { ISeries } from '../../series/interface';
|
|
|
10
9
|
import type { IElement } from '@visactor/vgrammar-core';
|
|
11
10
|
import type { BrushInteractiveRangeAttr, IBrush, IBrushSpec } from './interface';
|
|
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;
|
|
17
|
-
layoutZIndex:
|
|
18
|
-
static speckey: string;
|
|
16
|
+
layoutZIndex: number;
|
|
19
17
|
protected _brushComponents: BrushComponent[];
|
|
20
18
|
protected _relativeRegions: IRegion[];
|
|
21
19
|
protected _linkedSeries: ISeries[];
|
|
@@ -3,7 +3,6 @@ import type { IModelLayoutOption, IModelRenderOption } from '../../model/interfa
|
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import { BaseComponent } from '../base/base-component';
|
|
5
5
|
import type { IPadding, Maybe, StringOrNumber } from '../../typings';
|
|
6
|
-
import type { LayoutItem } from '../../model/layout-item';
|
|
7
6
|
import type { IComponentOption } from '../interface';
|
|
8
7
|
import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairTheme, ICrosshairCategoryFieldSpec } from './interface';
|
|
9
8
|
import type { IAxis } from '../axis/interface';
|
|
@@ -32,9 +31,9 @@ export interface IHair {
|
|
|
32
31
|
};
|
|
33
32
|
}
|
|
34
33
|
export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec | IPolarCrosshairSpec> extends BaseComponent<T> implements ICrossHair {
|
|
35
|
-
layoutType:
|
|
36
|
-
gridZIndex:
|
|
37
|
-
labelZIndex:
|
|
34
|
+
layoutType: 'none';
|
|
35
|
+
gridZIndex: number;
|
|
36
|
+
labelZIndex: number;
|
|
38
37
|
trigger: CrossHairTrigger;
|
|
39
38
|
enable: boolean;
|
|
40
39
|
showDefault: boolean;
|
|
@@ -7,6 +7,8 @@ import type { IGraphic } from '@visactor/vrender-core';
|
|
|
7
7
|
import type { IAxis } from '../axis/interface';
|
|
8
8
|
import type { StringOrNumber } from '../../typings';
|
|
9
9
|
export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICartesianCrosshairSpec> extends BaseCrossHair<T> {
|
|
10
|
+
static specKey: string;
|
|
11
|
+
specKey: string;
|
|
10
12
|
static type: ComponentTypeEnum;
|
|
11
13
|
type: ComponentTypeEnum;
|
|
12
14
|
name: string;
|
|
@@ -59,7 +59,7 @@ export interface ICrosshairLabelBackgroundSpec {
|
|
|
59
59
|
minWidth?: number;
|
|
60
60
|
maxWidth?: number;
|
|
61
61
|
padding?: IPadding | number | number[];
|
|
62
|
-
style
|
|
62
|
+
style?: Partial<IRectMarkSpec>;
|
|
63
63
|
}
|
|
64
64
|
export interface ICrosshairDataBindSpec {
|
|
65
65
|
bindingAxesIndex?: number[];
|
|
@@ -16,6 +16,8 @@ type IAxisInfo = Map<number, IBound & {
|
|
|
16
16
|
axis: IPolarAxis;
|
|
17
17
|
}>;
|
|
18
18
|
export declare class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrosshairSpec> extends BaseCrossHair<T> {
|
|
19
|
+
static specKey: string;
|
|
20
|
+
specKey: string;
|
|
19
21
|
static type: ComponentTypeEnum;
|
|
20
22
|
type: ComponentTypeEnum;
|
|
21
23
|
name: string;
|
|
@@ -3,15 +3,14 @@ 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 { LayoutItem } from '../../model/layout-item';
|
|
7
6
|
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec } from '../../typings';
|
|
8
7
|
import type { MarkTypeEnum } from '../../mark/interface';
|
|
9
8
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
10
9
|
export declare class CustomMark extends BaseComponent<any> {
|
|
11
10
|
static type: ComponentTypeEnum;
|
|
12
11
|
type: ComponentTypeEnum;
|
|
13
|
-
layoutType:
|
|
14
|
-
layoutZIndex:
|
|
12
|
+
layoutType: 'none';
|
|
13
|
+
layoutZIndex: number;
|
|
15
14
|
layoutLevel: number;
|
|
16
15
|
protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | ICustomMarkGroupSpec)[];
|
|
17
16
|
static createComponent(spec: any, options: IComponentOption): CustomMark[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
|
-
import type { IEffect, IModelInitOption
|
|
3
|
-
import type { LayoutItem } from '../../model/layout-item';
|
|
2
|
+
import type { IEffect, IModelInitOption } from '../../model/interface';
|
|
4
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
5
|
-
import type { AdaptiveSpec, IOrientType, StringOrNumber } from '../../typings';
|
|
4
|
+
import type { AdaptiveSpec, ILayoutRect, ILayoutType, IOrientType, StringOrNumber } from '../../typings';
|
|
6
5
|
import type { IBaseScale } from '@visactor/vscale';
|
|
7
6
|
import type { ICartesianBandAxisSpec } from '../axis/cartesian';
|
|
8
7
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
@@ -10,8 +9,9 @@ import { IFilterMode } from './constant';
|
|
|
10
9
|
import type { IDataFilterComponent, IDataFilterComponentSpec, IRoamDragSpec, IRoamScrollSpec, IRoamZoomSpec } from './interface';
|
|
11
10
|
import type { BaseEventParams } from '../../event/interface';
|
|
12
11
|
import type { AbstractComponent } from '@visactor/vrender-components';
|
|
12
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
13
13
|
export declare abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec = IDataFilterComponentSpec> extends BaseComponent<AdaptiveSpec<T, 'width' | 'height'>> implements IDataFilterComponent {
|
|
14
|
-
layoutType:
|
|
14
|
+
layoutType: ILayoutType | 'none';
|
|
15
15
|
protected _component: AbstractComponent;
|
|
16
16
|
protected _orient: IOrientType;
|
|
17
17
|
protected _isHorizontal: boolean;
|
|
@@ -20,8 +20,6 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
20
20
|
protected _cacheRect?: ILayoutRect;
|
|
21
21
|
protected _cacheVisibility?: boolean;
|
|
22
22
|
get orient(): IOrientType;
|
|
23
|
-
get layoutOrient(): IOrientType;
|
|
24
|
-
set layoutOrient(v: IOrientType);
|
|
25
23
|
protected _stateScale: IBaseScale;
|
|
26
24
|
protected _relatedAxisComponent: IComponent;
|
|
27
25
|
protected _originalStateFields: Record<number, string | number>;
|
|
@@ -68,6 +66,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
68
66
|
get visible(): boolean;
|
|
69
67
|
constructor(spec: T, options: IComponentOption);
|
|
70
68
|
created(): void;
|
|
69
|
+
initLayout(): void;
|
|
71
70
|
protected _setAxisFromSpec(): void;
|
|
72
71
|
protected _setRegionsFromSpec(): void;
|
|
73
72
|
onDataUpdate(): void;
|
|
@@ -96,7 +95,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
96
95
|
protected update(ctx: IComponentOption): void;
|
|
97
96
|
protected resize(ctx: IComponentOption): void;
|
|
98
97
|
protected _parseDomainFromState(startValue: number | string, endValue: number | string): any;
|
|
99
|
-
protected _handleStateChange: (startValue: number, endValue: number) => boolean;
|
|
98
|
+
protected _handleStateChange: (startValue: number, endValue: number, tag?: string) => boolean;
|
|
100
99
|
protected _handleChartZoom: (params: {
|
|
101
100
|
zoomDelta: number;
|
|
102
101
|
zoomX?: number;
|
|
@@ -110,7 +109,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
110
109
|
protected _handleChartMove: (value: number, rate: number) => void;
|
|
111
110
|
protected _initCommonEvent(): void;
|
|
112
111
|
updateLayoutAttribute(): void;
|
|
113
|
-
|
|
112
|
+
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
114
113
|
hide(): void;
|
|
115
114
|
show(): void;
|
|
116
115
|
protected _getAxisBandSize(axisSpec?: ICartesianBandAxisSpec): {
|
|
@@ -119,4 +118,5 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
119
118
|
minBandSize: number;
|
|
120
119
|
};
|
|
121
120
|
protected _autoUpdate(rect?: ILayoutRect): boolean;
|
|
121
|
+
getVRenderComponents(): IGraphic[];
|
|
122
122
|
}
|