@visactor/vchart-types 2.0.0-alpha.0 → 2.0.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/animate-manager.d.ts +0 -10
- package/types/animation/animation-planner.d.ts +13 -0
- package/types/animation/config.d.ts +5 -5
- package/types/animation/grammar-dector.d.ts +22 -0
- package/types/animation/index.d.ts +7 -0
- package/types/animation/interface.d.ts +14 -7
- package/types/animation/sequential-animate.d.ts +1 -0
- package/types/animation/state-transition.d.ts +1 -0
- package/types/animation/strategy/common.d.ts +17 -0
- package/types/animation/strategy/horizontal-bar-split.d.ts +11 -0
- package/types/animation/strategy/vertical-bar-split.d.ts +11 -0
- package/types/animation/utils.d.ts +2 -2
- package/types/chart/area/area.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +1 -0
- package/types/chart/bar/index.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +1 -5
- package/types/chart/base/base-chart.d.ts +12 -2
- package/types/chart/box-plot/box-plot.d.ts +1 -0
- package/types/chart/common/common.d.ts +1 -0
- package/types/chart/common/interface.d.ts +5 -5
- package/types/chart/funnel/index.d.ts +0 -1
- package/types/chart/funnel/interface.d.ts +1 -4
- package/types/chart/histogram/histogram.d.ts +1 -0
- package/types/chart/histogram/index.d.ts +0 -1
- package/types/chart/histogram/interface.d.ts +1 -4
- package/types/chart/index.d.ts +19 -17
- package/types/chart/interface/chart.d.ts +11 -1
- package/types/chart/interface/type.d.ts +1 -8
- package/types/chart/line/line.d.ts +1 -0
- package/types/chart/mosaic/mosaic.d.ts +1 -0
- package/types/chart/pictogram/interface.d.ts +1 -1
- package/types/chart/pie/index.d.ts +0 -1
- package/types/chart/pie/interface.d.ts +1 -5
- package/types/chart/progress/circular/circular.d.ts +1 -0
- package/types/chart/progress/linear/linear.d.ts +1 -0
- package/types/chart/radar/radar.d.ts +1 -0
- package/types/chart/range-area/range-area.d.ts +1 -0
- package/types/chart/range-column/index.d.ts +0 -1
- package/types/chart/range-column/interface.d.ts +1 -5
- package/types/chart/range-column/range-column.d.ts +1 -0
- package/types/chart/rose/rose.d.ts +1 -0
- package/types/chart/scatter/scatter.d.ts +1 -0
- package/types/chart/waterfall/waterfall.d.ts +1 -0
- package/types/chart/word-cloud/index.d.ts +0 -1
- package/types/chart/word-cloud/interface.d.ts +1 -5
- package/types/chart/word-cloud/word-cloud.d.ts +4 -8
- package/types/compile/interface/compiler.d.ts +2 -1
- package/types/compile/mark/compilable-mark.d.ts +1 -0
- package/types/compile/mark/interface.d.ts +9 -4
- package/types/compile/mark/mark-state-manager.d.ts +1 -0
- package/types/compile/morph.d.ts +3 -0
- package/types/component/axis/base-axis.d.ts +5 -0
- package/types/component/axis/cartesian/axis.d.ts +6 -13
- package/types/component/axis/cartesian/band-axis.d.ts +6 -0
- package/types/component/axis/cartesian/linear-axis.d.ts +2 -1
- package/types/component/axis/cartesian/log-axis.d.ts +6 -0
- package/types/component/axis/cartesian/symlog-axis.d.ts +6 -0
- package/types/component/axis/cartesian/time-axis.d.ts +5 -0
- package/types/component/axis/cartesian/util/common.d.ts +3 -1
- package/types/component/axis/interface/spec.d.ts +7 -2
- package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
- package/types/component/axis/polar/band-axis.d.ts +6 -0
- package/types/component/axis/polar/linear-axis.d.ts +6 -0
- package/types/component/axis/polar/util/common.d.ts +4 -1
- package/types/component/axis/util.d.ts +2 -6
- package/types/component/base/base-component.d.ts +0 -3
- package/types/component/base/util.d.ts +1 -2
- package/types/component/brush/brush.d.ts +29 -26
- package/types/component/brush/interface.d.ts +2 -0
- package/types/component/common/trigger/desktop.d.ts +0 -2
- package/types/component/common/trigger/interface.d.ts +0 -2
- package/types/component/common/trigger/mobile.d.ts +0 -2
- package/types/component/crosshair/base.d.ts +1 -1
- package/types/component/crosshair/cartesian.d.ts +4 -1
- package/types/component/crosshair/interface/spec.d.ts +1 -1
- package/types/component/crosshair/polar.d.ts +4 -1
- package/types/component/crosshair/utils/cartesian.d.ts +11 -1
- package/types/component/crosshair/utils/common.d.ts +2 -3
- package/types/component/custom-mark/custom-mark.d.ts +1 -0
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +3 -0
- package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -0
- package/types/component/index.d.ts +14 -8
- package/types/component/indicator/indicator.d.ts +3 -0
- package/types/component/interface/common.d.ts +0 -2
- package/types/component/interface/theme.d.ts +1 -3
- package/types/component/interface/type.d.ts +0 -1
- package/types/component/label/base-label.d.ts +4 -4
- package/types/component/label/interface.d.ts +10 -5
- package/types/component/label/total-label.d.ts +4 -1
- package/types/component/label/util.d.ts +1 -1
- package/types/component/legend/continuous/legend.d.ts +4 -0
- package/types/component/legend/discrete/legend.d.ts +3 -0
- package/types/component/legend/util.d.ts +1 -1
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +3 -0
- package/types/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-area/polar-mark-area.d.ts +3 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +3 -0
- package/types/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-line/polar-mark-line.d.ts +3 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/interface/theme.d.ts +5 -2
- package/types/component/marker/mark-point/polar-mark-point.d.ts +3 -0
- package/types/component/marker/utils.d.ts +12 -0
- package/types/component/player/player.d.ts +3 -0
- package/types/component/title/title.d.ts +3 -0
- package/types/component/tooltip/constant.d.ts +6 -2
- package/types/component/tooltip/interface/common.d.ts +2 -1
- package/types/component/tooltip/processor/base.d.ts +4 -5
- package/types/component/tooltip/processor/dimension-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/group-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +11 -0
- package/types/component/tooltip/processor/mark-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +5 -2
- package/types/component/util.d.ts +1 -2
- package/types/constant/event.d.ts +2 -0
- package/types/core/factory.d.ts +16 -12
- package/types/core/index.d.ts +16 -1
- package/types/core/interface.d.ts +6 -1
- package/types/core/vchart.d.ts +2 -1
- package/types/data/transforms/circle-packing.d.ts +1 -1
- package/types/data/transforms/data-key.d.ts +1 -1
- package/types/data/transforms/flatten.d.ts +1 -1
- package/types/data/transforms/funnel.d.ts +1 -6
- package/types/data/transforms/pictogram.d.ts +2 -10
- package/types/data/transforms/sankey-links.d.ts +1 -2
- package/types/data/transforms/sankey-nodes.d.ts +1 -2
- package/types/data/transforms/sankey.d.ts +4 -4
- package/types/data/transforms/sunburst.d.ts +1 -1
- package/types/data/transforms/treemap.d.ts +1 -1
- package/types/data/transforms/venn.d.ts +1 -1
- package/types/event/event-dispatcher.d.ts +4 -1
- package/types/event/event.d.ts +4 -1
- package/types/event/events/dimension/util/cartesian.d.ts +2 -1
- package/types/event/events/index.d.ts +1 -5
- package/types/event/index.d.ts +1 -1
- package/types/event/interface.d.ts +13 -4
- package/types/index-harmony-simple.d.ts +2 -3
- package/types/index-harmony.d.ts +1 -1
- package/types/index.d.ts +12 -0
- package/types/interaction/index.d.ts +3 -2
- package/types/interaction/triggers/enum.d.ts +1 -3
- package/types/interaction/zoom/zoomable.d.ts +4 -0
- package/types/layout/base-layout.d.ts +12 -9
- package/types/layout/index.d.ts +4 -4
- package/types/layout/interface.d.ts +6 -1
- package/types/layout/layout-item.d.ts +5 -0
- package/types/layout/util.d.ts +17 -4
- package/types/mark/arc.d.ts +1 -1
- package/types/mark/base/base-line.d.ts +11 -2
- package/types/mark/base/base-mark.d.ts +46 -17
- package/types/mark/cell.d.ts +2 -2
- package/types/mark/component.d.ts +1 -0
- package/types/mark/glyph.d.ts +1 -0
- package/types/mark/group.d.ts +2 -1
- package/types/mark/index.d.ts +8 -7
- package/types/mark/interface/common.d.ts +20 -0
- package/types/mark/interface/mark.d.ts +2 -4
- package/types/mark/interface/type.d.ts +0 -3
- package/types/mark/rule.d.ts +2 -2
- package/types/mark/symbol.d.ts +2 -3
- package/types/mark/text.d.ts +2 -2
- package/types/mark/transform/symbol-overlap.d.ts +0 -1
- package/types/mark/utils/common.d.ts +0 -1
- package/types/model/base-model.d.ts +3 -2
- package/types/model/interface.d.ts +7 -2
- package/types/model/layout-model.d.ts +2 -1
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -12
- package/types/plugin/other.d.ts +0 -1
- package/types/region/interface.d.ts +0 -2
- package/types/region/region.d.ts +0 -2
- package/types/series/area/area.d.ts +2 -1
- package/types/series/bar/animation.d.ts +0 -1
- package/types/series/bar/bar.d.ts +6 -6
- package/types/series/bar/constant.d.ts +0 -1
- package/types/series/bar/interface.d.ts +1 -7
- package/types/series/base/base-series-transformer.d.ts +1 -1
- package/types/series/base/base-series.d.ts +2 -3
- package/types/series/box-plot/animation.d.ts +52 -0
- package/types/series/box-plot/box-plot.d.ts +3 -0
- package/types/series/circle-packing/circle-packing.d.ts +3 -0
- package/types/series/correlation/correlation.d.ts +3 -0
- package/types/series/dot/dot.d.ts +3 -0
- package/types/series/funnel/constant.d.ts +0 -1
- package/types/series/funnel/funnel.d.ts +7 -9
- package/types/series/funnel/interface.d.ts +2 -13
- package/types/series/funnel/tooltip-helper.d.ts +3 -1
- package/types/series/gauge/gauge-pointer.d.ts +3 -0
- package/types/series/gauge/gauge.d.ts +3 -0
- package/types/series/geo/geo.d.ts +1 -2
- package/types/series/heatmap/heatmap.d.ts +3 -0
- package/types/series/index.d.ts +24 -19
- package/types/series/interface/theme.d.ts +5 -16
- package/types/series/interface/type.d.ts +1 -11
- package/types/series/line/line.d.ts +3 -0
- package/types/series/link/link.d.ts +3 -0
- package/types/series/liquid/liquid.d.ts +3 -0
- package/types/series/map/map.d.ts +3 -0
- package/types/series/mosaic/mosaic.d.ts +2 -0
- package/types/series/pictogram/pictogram.d.ts +19 -13
- package/types/series/pictogram/tooltip-helper.d.ts +2 -2
- package/types/series/pie/animation/animation.d.ts +2 -3
- package/types/series/pie/constant.d.ts +0 -1
- package/types/series/pie/interface.d.ts +1 -11
- package/types/series/pie/pie.d.ts +5 -5
- package/types/series/polar/animation.d.ts +2 -4
- package/types/series/polar/progress-like/interface.d.ts +1 -0
- package/types/series/progress/circular/circular.d.ts +3 -0
- package/types/series/progress/linear/animation.d.ts +1 -1
- package/types/series/progress/linear/interface.d.ts +1 -0
- package/types/series/progress/linear/linear.d.ts +3 -0
- package/types/series/radar/animation.d.ts +1 -1
- package/types/series/radar/radar.d.ts +3 -0
- package/types/series/range-column/constant.d.ts +0 -1
- package/types/series/range-column/interface.d.ts +0 -3
- package/types/series/range-column/range-column.d.ts +5 -4
- package/types/series/rose/rose.d.ts +3 -0
- package/types/series/sankey/animation.d.ts +13 -0
- package/types/series/sankey/interface.d.ts +0 -1
- package/types/series/sankey/sankey.d.ts +3 -0
- package/types/series/scatter/scatter.d.ts +3 -0
- package/types/series/sunburst/interface.d.ts +1 -1
- package/types/series/sunburst/sunburst.d.ts +3 -0
- package/types/series/treemap/interface.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +3 -0
- package/types/series/venn/animation.d.ts +11 -0
- package/types/series/venn/venn.d.ts +3 -0
- package/types/series/waterfall/waterfall.d.ts +4 -0
- package/types/series/word-cloud/animation.d.ts +1 -3
- package/types/series/word-cloud/base.d.ts +3 -2
- package/types/series/word-cloud/interface.d.ts +1 -19
- package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +0 -1
- package/types/theme/builtin/common/series/funnel.d.ts +2 -2
- package/types/theme/builtin/common/series/word-cloud.d.ts +1 -2
- package/types/theme/builtin/index.d.ts +3 -1
- package/types/theme/color-scheme/util.d.ts +1 -1
- package/types/typings/spec/chart.d.ts +6 -12
- package/types/typings/spec/common.d.ts +3 -5
- package/types/typings/tooltip/position.d.ts +1 -1
- package/types/typings/visual.d.ts +2 -11
- package/types/util/mark.d.ts +1 -1
- package/types/util/region.d.ts +5 -0
- package/types/util/scale.d.ts +1 -0
- package/types/util/theme/common.d.ts +1 -1
- package/types/util/theme/merge-theme.d.ts +2 -2
- package/types/util/theme/preprocess.d.ts +1 -2
- package/types/vrender-tools.d.ts +1 -0
- package/types/interaction/triggers/element-highlight-by-graphic-name.d.ts +0 -13
- package/types/interaction/triggers/element-select-by-graphic-name.d.ts +0 -8
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StateManager } from '../compile/state-manager';
|
|
2
|
-
import type { IAnimate, IAnimateState } from './interface';
|
|
3
|
-
import { AnimationStateEnum } from './interface';
|
|
4
|
-
import type { StateValueMap } from '../compile/interface/compilable-item';
|
|
5
|
-
export declare class AnimateManager extends StateManager implements IAnimate {
|
|
6
|
-
protected _stateMap: IAnimateState & StateValueMap;
|
|
7
|
-
readonly id: number;
|
|
8
|
-
updateAnimateState(state: AnimationStateEnum, noRender?: boolean): void;
|
|
9
|
-
protected _getDefaultStateMap(): IAnimateState & StateValueMap;
|
|
10
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IMarkGraphic } from '../mark/interface';
|
|
2
|
+
import type { IAnimationConfig } from './interface';
|
|
3
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
4
|
+
export declare class AnimationPlanner {
|
|
5
|
+
state: string;
|
|
6
|
+
graphics: IMarkGraphic[];
|
|
7
|
+
private config;
|
|
8
|
+
private beforeExecute?;
|
|
9
|
+
private afterExecute?;
|
|
10
|
+
constructor(state: string, graphics: IMarkGraphic[], config: IAnimationConfig[], beforeExecute?: (graphics: IMarkGraphic[]) => void, afterExecute?: (graphics: IMarkGraphic[]) => void);
|
|
11
|
+
execute(product?: IGroup, onComplete?: () => void): void;
|
|
12
|
+
executeOnGroup(product: IGroup, onComplete?: () => void): void;
|
|
13
|
+
}
|
|
@@ -58,8 +58,8 @@ export declare const registerFadeInOutAnimation: () => void;
|
|
|
58
58
|
export declare const registerCartesianGroupClipAnimation: () => void;
|
|
59
59
|
export declare const registerLineAnimation: () => void;
|
|
60
60
|
export declare const registerAreaAnimation: () => void;
|
|
61
|
-
export declare const
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
65
|
-
export declare const
|
|
61
|
+
export declare const registerBuiltInAnimation: () => void;
|
|
62
|
+
export declare const registerRectAnimation: () => void;
|
|
63
|
+
export declare const registerArcAnimation: () => void;
|
|
64
|
+
export declare const registerLineOrAreaAnimation: () => void;
|
|
65
|
+
export declare const registerPolygonAnimation: () => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AnimationPlanner } from './animation-planner';
|
|
2
|
+
import type { IMarkGraphic } from '../mark/interface';
|
|
3
|
+
import type { IAnimationConfig, IAnimationSplitStrategy } from './interface';
|
|
4
|
+
import type { BaseMark } from '../mark';
|
|
5
|
+
export interface IDetectionResult {
|
|
6
|
+
hasExit: boolean;
|
|
7
|
+
hasUpdate: boolean;
|
|
8
|
+
hasEnter: boolean;
|
|
9
|
+
hasAppear: boolean;
|
|
10
|
+
exitGraphics: IMarkGraphic[];
|
|
11
|
+
updateGraphics: IMarkGraphic[];
|
|
12
|
+
enterGraphics: IMarkGraphic[];
|
|
13
|
+
appearGraphics: IMarkGraphic[];
|
|
14
|
+
}
|
|
15
|
+
export declare class GrammarDetector {
|
|
16
|
+
private mark;
|
|
17
|
+
private splitStrategies;
|
|
18
|
+
constructor(mark: BaseMark<any>);
|
|
19
|
+
registerStrategy(strategy: IAnimationSplitStrategy): void;
|
|
20
|
+
detect(graphics: IMarkGraphic[], graphicMap: Map<string, IMarkGraphic>): IDetectionResult;
|
|
21
|
+
createPlanners(result: IDetectionResult, animationConfig: Record<string, IAnimationConfig[]>): AnimationPlanner[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { registerAnimate as registerVRenderAnimate, registerCustomAnimate } from '@visactor/vrender-animate';
|
|
2
|
+
export { registerStateTransition } from './state-transition';
|
|
3
|
+
export { registerSequentialAnimate } from './sequential-animate';
|
|
4
|
+
export { registerPolygonAnimation, registerRectAnimation, registerArcAnimation, DEFAULT_ANIMATION_CONFIG } from './config';
|
|
5
|
+
export { animationConfig, userAnimationConfig, shouldMarkDoMorph } from './utils';
|
|
6
|
+
export type { IAnimationSpec } from './spec';
|
|
7
|
+
export type { IAnimationTypeConfig, IAnimationConfig } from './interface';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ACustomAnimate
|
|
2
|
-
import type {
|
|
3
|
-
import type { IMark } from '../mark/interface/common';
|
|
1
|
+
import type { ACustomAnimate } from '@visactor/vrender-animate';
|
|
2
|
+
import type { IGraphic, EasingType } from '@visactor/vrender-core';
|
|
3
|
+
import type { IMark, IMarkGraphic } from '../mark/interface/common';
|
|
4
|
+
import type { BaseMark } from '../mark';
|
|
4
5
|
export declare enum AnimationStateEnum {
|
|
5
6
|
appear = "appear",
|
|
6
7
|
disappear = "disappear",
|
|
@@ -17,10 +18,6 @@ export interface IAnimateState {
|
|
|
17
18
|
callback: (datum: any, element: any) => AnimationStateEnum;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
|
-
export interface IAnimate extends ICompilable {
|
|
21
|
-
id: number;
|
|
22
|
-
updateAnimateState: (state: AnimationStateEnum, noRender?: boolean) => void;
|
|
23
|
-
}
|
|
24
21
|
export interface ICartesianGroupAnimationParams {
|
|
25
22
|
direction: () => 'x' | 'y';
|
|
26
23
|
orient: () => 'positive' | 'negative';
|
|
@@ -104,6 +101,7 @@ export interface IAnimationTimeline {
|
|
|
104
101
|
}
|
|
105
102
|
export type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;
|
|
106
103
|
export interface MarkAnimationSpec {
|
|
104
|
+
disappear?: IAnimationConfig | IAnimationConfig[];
|
|
107
105
|
appear?: IAnimationConfig | IAnimationConfig[];
|
|
108
106
|
enter?: IAnimationConfig | IAnimationConfig[];
|
|
109
107
|
exit?: IAnimationConfig | IAnimationConfig[];
|
|
@@ -111,3 +109,12 @@ export interface MarkAnimationSpec {
|
|
|
111
109
|
normal?: IAnimationConfig | IAnimationConfig[];
|
|
112
110
|
state?: IStateAnimationConfig;
|
|
113
111
|
}
|
|
112
|
+
export type MarkAnimationType = keyof MarkAnimationSpec;
|
|
113
|
+
export interface IAnimationSplitStrategy {
|
|
114
|
+
name: string;
|
|
115
|
+
shouldApply: (mark: BaseMark<any>, graphic: IMarkGraphic) => boolean;
|
|
116
|
+
split: (mark: BaseMark<any>, graphic: IMarkGraphic) => Array<{
|
|
117
|
+
attrs: Record<string, any>;
|
|
118
|
+
order: number;
|
|
119
|
+
}>;
|
|
120
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerSequentialAnimate(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerStateTransition(): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
2
|
+
import type { BaseMark } from '../../mark';
|
|
3
|
+
import type { IAnimationSplitStrategy } from '../interface';
|
|
4
|
+
export declare class CustomSplitStrategy implements IAnimationSplitStrategy {
|
|
5
|
+
name: string;
|
|
6
|
+
private checkFn;
|
|
7
|
+
private splitFn;
|
|
8
|
+
constructor(name: string, checkFn: (mark: BaseMark<any>, graphic: IMarkGraphic) => boolean, splitFn: (mark: BaseMark<any>, graphic: IMarkGraphic) => Array<{
|
|
9
|
+
attrs: Record<string, any>;
|
|
10
|
+
order: number;
|
|
11
|
+
}>);
|
|
12
|
+
shouldApply(mark: BaseMark<any>, graphic: IMarkGraphic): boolean;
|
|
13
|
+
split(mark: BaseMark<any>, graphic: IMarkGraphic): Array<{
|
|
14
|
+
attrs: Record<string, any>;
|
|
15
|
+
order: number;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
2
|
+
import type { BaseMark } from '../../mark';
|
|
3
|
+
import type { IAnimationSplitStrategy } from '../interface';
|
|
4
|
+
export declare class HorizontalBarSplitStrategy implements IAnimationSplitStrategy {
|
|
5
|
+
name: string;
|
|
6
|
+
shouldApply(mark: BaseMark<any>, graphic: IMarkGraphic): boolean;
|
|
7
|
+
split(mark: BaseMark<any>, graphic: IMarkGraphic): Array<{
|
|
8
|
+
attrs: Record<string, any>;
|
|
9
|
+
order: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IMarkGraphic } from '../../mark/interface';
|
|
2
|
+
import type { BaseMark } from '../../mark';
|
|
3
|
+
import type { IAnimationSplitStrategy } from '../interface';
|
|
4
|
+
export declare class VerticalBarSplitStrategy implements IAnimationSplitStrategy {
|
|
5
|
+
name: string;
|
|
6
|
+
shouldApply(mark: BaseMark<any>, graphic: IMarkGraphic): boolean;
|
|
7
|
+
split(mark: BaseMark<any>, graphic: IMarkGraphic): Array<{
|
|
8
|
+
attrs: Record<string, any>;
|
|
9
|
+
order: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
@@ -9,9 +9,9 @@ export declare function animationConfig<Preset extends string>(defaultConfig?: M
|
|
|
9
9
|
dataIndex: (datum: any, params: any) => number;
|
|
10
10
|
dataCount: () => number;
|
|
11
11
|
}): MarkAnimationSpec;
|
|
12
|
-
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "
|
|
12
|
+
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "enter" | "exit" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
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: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "
|
|
16
|
+
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "update" | "appear" | "enter" | "exit" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
17
17
|
export declare function isAnimationEnabledForSeries(series: ISeries): boolean;
|
|
@@ -8,5 +8,6 @@ export declare class AreaChart<T extends IAreaChartSpec = IAreaChartSpec> extend
|
|
|
8
8
|
readonly transformerConstructor: typeof AreaChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerAreaChart: () => void;
|
package/types/chart/bar/bar.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export declare class BarChart<T extends IBarChartSpec = IBarChartSpec> extends B
|
|
|
8
8
|
readonly transformerConstructor: typeof BarChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerBarChart: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBarSeriesSpec
|
|
1
|
+
import type { IBarSeriesSpec } from '../../series/bar/interface';
|
|
2
2
|
import type { IChartExtendsSeriesSpec } from '../../typings/spec/common';
|
|
3
3
|
import type { ICartesianChartSpec } from '../cartesian/interface';
|
|
4
4
|
export interface IBarChartSpec extends ICartesianChartSpec, IChartExtendsSeriesSpec<IBarSeriesSpec> {
|
|
@@ -8,7 +8,3 @@ export interface IBarChartSpec extends ICartesianChartSpec, IChartExtendsSeriesS
|
|
|
8
8
|
extend: number;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
export interface IBar3dChartSpec extends ICartesianChartSpec, IChartExtendsSeriesSpec<IBar3dSeriesSpec> {
|
|
12
|
-
type: 'bar3d';
|
|
13
|
-
series?: IBar3dSeriesSpec[];
|
|
14
|
-
}
|
|
@@ -7,7 +7,7 @@ import type { IChart, IChartRenderOption, IChartOption, IChartEvaluateOption, Di
|
|
|
7
7
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
8
8
|
import type { IRegion } from '../../region/interface';
|
|
9
9
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
10
|
-
import type { IMark, IRectMark } from '../../mark/interface';
|
|
10
|
+
import type { IMark, IMarkGraphic, IRectMark } from '../../mark/interface';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
12
12
|
import type { DataView } from '@visactor/vdataset';
|
|
13
13
|
import type { DataSet } from '@visactor/vdataset';
|
|
@@ -38,7 +38,9 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
38
38
|
protected _layoutTag: boolean;
|
|
39
39
|
getLayoutTag(): boolean;
|
|
40
40
|
setLayoutTag(tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean): boolean;
|
|
41
|
+
resetLayoutItemTag(): void;
|
|
41
42
|
protected _modelOption: IModelOption;
|
|
43
|
+
getModelOption(): IModelOption;
|
|
42
44
|
protected _globalScale: IGlobalScale;
|
|
43
45
|
getGlobalScale(): IGlobalScale;
|
|
44
46
|
protected _idMap: Map<number, IModel | IMark>;
|
|
@@ -54,6 +56,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
54
56
|
protected _canvasRect: ILayoutRect;
|
|
55
57
|
protected _backgroundMark: IRectMark;
|
|
56
58
|
protected _interaction: IInteraction;
|
|
59
|
+
protected _setModelOption(): void;
|
|
57
60
|
constructor(spec: T, option: IChartOption);
|
|
58
61
|
created(transformer: Maybe<IChartSpecTransformer>): void;
|
|
59
62
|
_initInteractions(): void;
|
|
@@ -149,7 +152,14 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
149
152
|
private _initEvent;
|
|
150
153
|
protected _enableMarkAnimation(states: string | string[]): void;
|
|
151
154
|
protected _disableMarkAnimation(states: string | string[]): void;
|
|
155
|
+
filterGraphicsByDatum(datum: MaybeArray<Datum> | null, opt?: {
|
|
156
|
+
filter?: (series: ISeries, mark: IMark) => boolean;
|
|
157
|
+
region?: IRegionQuerier;
|
|
158
|
+
getDatum?: (el: IMarkGraphic, mark: IMark, s: ISeries, r: IRegion) => Datum;
|
|
159
|
+
callback?: (el: IMarkGraphic, mark: IMark, s: ISeries, r: IRegion) => void;
|
|
160
|
+
regionCallback?: (pickElements: IMarkGraphic[], r: IRegion) => void;
|
|
161
|
+
}): IMarkGraphic[];
|
|
152
162
|
protected _setStateInDatum(stateKey: string, d: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
153
163
|
setDimensionIndex(value: StringOrNumber, opt: DimensionIndexOption): void;
|
|
154
|
-
getColorScheme():
|
|
164
|
+
getColorScheme(): any;
|
|
155
165
|
}
|
|
@@ -8,5 +8,6 @@ export declare class BoxPlotChart<T extends IBoxPlotChartSpec = IBoxPlotChartSpe
|
|
|
8
8
|
readonly transformerConstructor: typeof BoxPlotChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerBoxplotChart: () => void;
|
|
@@ -7,5 +7,6 @@ export declare class CommonChart<T extends ICommonChartSpec = ICommonChartSpec>
|
|
|
7
7
|
static readonly transformerConstructor: typeof CommonChartSpecTransformer;
|
|
8
8
|
readonly transformerConstructor: typeof CommonChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
|
+
protected _setModelOption(): void;
|
|
10
11
|
}
|
|
11
12
|
export declare const registerCommonChart: () => void;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { ILineSeriesSpec } from '../../series/line/interface';
|
|
2
2
|
import type { IAreaSeriesSpec } from '../../series/area/interface';
|
|
3
3
|
import type { IChartSpec } from '../../typings/spec/common';
|
|
4
|
-
import type {
|
|
4
|
+
import type { IBarSeriesSpec } from '../../series/bar/interface';
|
|
5
5
|
import type { IRangeColumnChartSpec } from '../range-column/interface';
|
|
6
6
|
import type { IRangeAreaChartSpec } from '../range-area/interface';
|
|
7
7
|
import type { IDotSeriesSpec } from '../../series/dot/interface';
|
|
8
8
|
import type { IMapSeriesSpec } from '../../series/map/interface';
|
|
9
|
-
import type {
|
|
9
|
+
import type { IPieSeriesSpec } from '../../series/pie/interface';
|
|
10
10
|
import type { ILinkSeriesSpec } from '../../series/link/interface';
|
|
11
11
|
import type { IRadarSeriesSpec } from '../../series/radar/interface';
|
|
12
12
|
import type { IRoseSeriesSpec } from '../../series/rose/interface';
|
|
13
13
|
import type { IScatterSeriesSpec } from '../../series/scatter/interface';
|
|
14
|
-
import type {
|
|
14
|
+
import type { IWordCloudSeriesSpec } from '../../series/word-cloud/interface';
|
|
15
15
|
import type { IGaugePointerSeriesSpec, IGaugeSeriesSpec } from '../../series/gauge/interface';
|
|
16
16
|
import type { IBoxPlotSeriesSpec } from '../../series/box-plot/interface';
|
|
17
17
|
import type { ICirclePackingSeriesSpec } from '../../series/circle-packing/interface';
|
|
18
|
-
import type { IFunnelSeriesSpec
|
|
18
|
+
import type { IFunnelSeriesSpec } from '../../series/funnel/interface';
|
|
19
19
|
import type { IHeatmapSeriesSpec } from '../../series/heatmap/interface';
|
|
20
20
|
import type { ICircularProgressSeriesSpec } from '../../series/progress/circular/interface';
|
|
21
21
|
import type { ILinearProgressSeriesSpec } from '../../series/progress/linear/interface';
|
|
@@ -33,7 +33,7 @@ import type { IMarkPointSpec } from '../../component/marker/mark-point/interface
|
|
|
33
33
|
export interface ICommonChartSpec extends Omit<IChartSpec, 'series'> {
|
|
34
34
|
type: 'common';
|
|
35
35
|
seriesField?: string;
|
|
36
|
-
series?: (IAreaSeriesSpec | ILineSeriesSpec |
|
|
36
|
+
series?: (IAreaSeriesSpec | ILineSeriesSpec | IBarSeriesSpec | IRangeColumnChartSpec | IRangeAreaChartSpec | IDotSeriesSpec | IMapSeriesSpec | IPieSeriesSpec | ILinkSeriesSpec | IRadarSeriesSpec | IRoseSeriesSpec | IScatterSeriesSpec | ICircularProgressSeriesSpec | ILinearProgressSeriesSpec | IWordCloudSeriesSpec | IFunnelSeriesSpec | IBoxPlotSeriesSpec | IGaugeSeriesSpec | ISankeySeriesSpec | ITreemapSeriesSpec | ISunburstSeriesSpec | ICirclePackingSeriesSpec | IWaterfallSeriesSpec | IHeatmapSeriesSpec | IGaugePointerSeriesSpec | ICorrelationSeriesSpec)[];
|
|
37
37
|
axes?: ICartesianAxisSpec[] | IPolarAxisSpec[];
|
|
38
38
|
crosshair?: ICartesianCrosshairSpec | ICartesianCrosshairSpec[] | IPolarCrosshairSpec | IPolarCrosshairSpec[];
|
|
39
39
|
markLine?: IMarkLineSpec | IMarkLineSpec[];
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { IChartExtendsSeriesSpec } from '../../typings';
|
|
2
|
-
import type { IFunnelSeriesSpec
|
|
2
|
+
import type { IFunnelSeriesSpec } from '../../series/funnel/interface';
|
|
3
3
|
import type { IChartSpec } from '../../typings/spec';
|
|
4
4
|
export interface IFunnelChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IFunnelSeriesSpec> {
|
|
5
5
|
type: 'funnel';
|
|
6
6
|
}
|
|
7
|
-
export interface IFunnel3dChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IFunnel3dSeriesSpec> {
|
|
8
|
-
type: 'funnel3d';
|
|
9
|
-
}
|
|
@@ -8,5 +8,6 @@ export declare class HistogramChart<T extends IHistogramChartSpec = IHistogramCh
|
|
|
8
8
|
readonly transformerConstructor: typeof HistogramChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerHistogramChart: () => void;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { IBarSeriesSpec
|
|
1
|
+
import type { IBarSeriesSpec } from '../../series/bar/interface';
|
|
2
2
|
import type { IChartExtendsSeriesSpec } from '../../typings';
|
|
3
3
|
import type { ICartesianChartSpec } from '../cartesian/interface';
|
|
4
4
|
export interface IHistogramChartSpec extends ICartesianChartSpec, Omit<IChartExtendsSeriesSpec<IBarSeriesSpec>, 'type'> {
|
|
5
5
|
type: 'histogram';
|
|
6
6
|
}
|
|
7
|
-
export interface IHistogram3dChartSpec extends ICartesianChartSpec, Omit<IChartExtendsSeriesSpec<IBar3dSeriesSpec>, 'type'> {
|
|
8
|
-
type: 'histogram3d';
|
|
9
|
-
}
|
package/types/chart/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { IAreaChartSpec } from './area';
|
|
2
2
|
import { AreaChart, registerAreaChart } from './area';
|
|
3
|
-
import type { IBarChartSpec
|
|
4
|
-
import { BarChart,
|
|
3
|
+
import type { IBarChartSpec } from './bar';
|
|
4
|
+
import { BarChart, registerBarChart, BarChartSpecTransformer } from './bar';
|
|
5
5
|
import type { IBoxPlotChartSpec } from './box-plot';
|
|
6
6
|
import { BoxPlotChart, registerBoxplotChart } from './box-plot';
|
|
7
7
|
import type { ICirclePackingChartSpec } from './circle-packing';
|
|
8
8
|
import { CirclePackingChart, registerCirclePackingChart } from './circle-packing';
|
|
9
9
|
import type { ICommonChartSpec } from './common';
|
|
10
10
|
import { CommonChart, registerCommonChart } from './common';
|
|
11
|
-
import type { IFunnelChartSpec
|
|
12
|
-
import { FunnelChart,
|
|
11
|
+
import type { IFunnelChartSpec } from './funnel';
|
|
12
|
+
import { FunnelChart, registerFunnelChart, FunnelChartSpecTransformer } from './funnel';
|
|
13
13
|
import type { IGaugeChartSpec } from './gauge';
|
|
14
14
|
import { GaugeChart, registerGaugeChart } from './gauge';
|
|
15
15
|
import type { IHeatmapChartSpec } from './heatmap';
|
|
16
16
|
import { HeatmapChart, registerHeatmapChart } from './heatmap';
|
|
17
|
-
import type { IHistogramChartSpec
|
|
18
|
-
import {
|
|
17
|
+
import type { IHistogramChartSpec } from './histogram';
|
|
18
|
+
import { HistogramChartSpecTransformer, HistogramChart, registerHistogramChart } from './histogram';
|
|
19
19
|
import type { ILineChartSpec } from './line';
|
|
20
20
|
import { LineChart, registerLineChart } from './line';
|
|
21
21
|
import type { IMapChartSpec } from './map';
|
|
22
22
|
import { MapChart, registerMapChart } from './map';
|
|
23
|
-
import type { IPieChartSpec
|
|
24
|
-
import {
|
|
23
|
+
import type { IPieChartSpec } from './pie';
|
|
24
|
+
import { BasePieChart, BasePieChartSpecTransformer, PieChart, registerPieChart } from './pie';
|
|
25
25
|
import type { ICircularProgressChartSpec } from './progress/circular';
|
|
26
26
|
import { CircularProgressChart, registerCircularProgressChart } from './progress/circular';
|
|
27
27
|
import type { ILinearProgressChartSpec } from './progress/linear';
|
|
@@ -30,8 +30,8 @@ import type { IRadarChartSpec } from './radar';
|
|
|
30
30
|
import { RadarChart, registerRadarChart } from './radar';
|
|
31
31
|
import type { IRangeAreaChartSpec } from './range-area';
|
|
32
32
|
import { RangeAreaChart, registerRangeAreaChart } from './range-area';
|
|
33
|
-
import type { IRangeColumnChartSpec
|
|
34
|
-
import { RangeColumnChart,
|
|
33
|
+
import type { IRangeColumnChartSpec } from './range-column';
|
|
34
|
+
import { RangeColumnChart, registerRangeColumnChart } from './range-column';
|
|
35
35
|
import type { IRoseChartSpec } from './rose';
|
|
36
36
|
import { RoseChart, registerRoseChart } from './rose';
|
|
37
37
|
import type { ISankeyChartSpec } from './sankey';
|
|
@@ -50,8 +50,8 @@ import type { ICorrelationChartSpec } from './correlation';
|
|
|
50
50
|
import { CorrelationChart, registerCorrelationChart } from './correlation';
|
|
51
51
|
import type { ILiquidChartSpec } from './liquid';
|
|
52
52
|
import { LiquidChart, registerLiquidChart } from './liquid';
|
|
53
|
-
import type { IWordCloudChartSpec
|
|
54
|
-
import { WordCloudChart,
|
|
53
|
+
import type { IWordCloudChartSpec } from './word-cloud';
|
|
54
|
+
import { WordCloudChart, registerWordCloudChart, registerWordCloudShapeChart } from './word-cloud';
|
|
55
55
|
import { BaseChart } from './base/base-chart';
|
|
56
56
|
import type { ICartesianChartSpec } from './cartesian';
|
|
57
57
|
import type { IPolarChartSpec } from './polar';
|
|
@@ -59,8 +59,10 @@ import type { IVennChartSpec } from './venn';
|
|
|
59
59
|
import { VennChart, registerVennChart } from './venn';
|
|
60
60
|
import type { IMosaicChartSpec } from './mosaic';
|
|
61
61
|
import { MosaicChart, registerMosaicChart } from './mosaic';
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export
|
|
62
|
+
import type { IChart } from './interface/chart';
|
|
63
|
+
import { BaseWordCloudChart } from './word-cloud/base/base';
|
|
64
|
+
import { BaseWordCloudChartSpecTransformer } from './word-cloud/base/word-cloud-base-transformer';
|
|
65
|
+
import { BaseHistogramChart } from './histogram/base/base';
|
|
66
|
+
export { AreaChart, BarChart, BarChartSpecTransformer, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChartSpecTransformer, FunnelChart, GaugeChart, HeatmapChart, HistogramChartSpecTransformer, BaseHistogramChart, HistogramChart, LineChart, MapChart, BasePieChartSpecTransformer, BasePieChart, PieChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, BaseWordCloudChartSpecTransformer, BaseWordCloudChart, WordCloudChart, TreemapChart, VennChart, BaseChart, MosaicChart };
|
|
67
|
+
export { registerLineChart, registerAreaChart, registerBarChart, registerBoxplotChart, registerCirclePackingChart, registerCircularProgressChart, registerCommonChart, registerFunnelChart, registerGaugeChart, registerHeatmapChart, registerHistogramChart, registerLinearProgressChart, registerMapChart, registerPieChart, registerRadarChart, registerRangeAreaChart, registerRangeColumnChart, registerRoseChart, registerSankeyChart, registerScatterChart, registerSequenceChart, registerSunburstChart, registerTreemapChart, registerWaterfallChart, registerWordCloudChart, registerCorrelationChart, registerLiquidChart, registerWordCloudShapeChart, registerVennChart, registerMosaicChart };
|
|
68
|
+
export type { IChart, IAreaChartSpec, IBarChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, IVennChartSpec, IMosaicChartSpec };
|
|
@@ -3,7 +3,7 @@ import type { LayoutCallBack } from '../../layout/interface';
|
|
|
3
3
|
import type { IParserOptions } from '@visactor/vdataset';
|
|
4
4
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
5
5
|
import type { IMark } from '../../mark/interface';
|
|
6
|
-
import type { IModel, IModelConstructor, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
6
|
+
import type { IModel, IModelConstructor, IModelOption, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
7
7
|
import type { IRegion, IRegionConstructor } from '../../region/interface';
|
|
8
8
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
9
9
|
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartRenderOption, IChartSpecInfo, IChartSpecTransformerOption } from './common';
|
|
@@ -13,6 +13,7 @@ import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber,
|
|
|
13
13
|
import type { DataView } from '@visactor/vdataset';
|
|
14
14
|
import type { IGlobalScale } from '../../scale/interface';
|
|
15
15
|
import type { IMorphConfig } from '../../animation/spec';
|
|
16
|
+
import type { IMarkGraphic } from '../../mark/interface/common';
|
|
16
17
|
export type DimensionIndexOption = {
|
|
17
18
|
filter?: (cmp: IComponent) => boolean;
|
|
18
19
|
tooltip?: boolean;
|
|
@@ -36,12 +37,14 @@ export interface IChart extends ICompilable {
|
|
|
36
37
|
getCanvasRect: () => ILayoutRect;
|
|
37
38
|
getViewRect: () => ILayoutRect;
|
|
38
39
|
getOption: () => IChartOption;
|
|
40
|
+
getModelOption: () => IModelOption;
|
|
39
41
|
getEvent: () => IEvent;
|
|
40
42
|
getGlobalScale: () => IGlobalScale;
|
|
41
43
|
setLayout: (layout: LayoutCallBack) => void;
|
|
42
44
|
layout: () => void;
|
|
43
45
|
getLayoutTag: () => boolean;
|
|
44
46
|
setLayoutTag: (tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean) => boolean;
|
|
47
|
+
resetLayoutItemTag: () => void;
|
|
45
48
|
updateData: (id: StringOrNumber, data: unknown, updateGlobalScale?: boolean, options?: IParserOptions) => void;
|
|
46
49
|
updateFullData: (data: IDataValues | IDataValues[]) => void;
|
|
47
50
|
updateGlobalScaleDomain: () => void;
|
|
@@ -92,6 +95,13 @@ export interface IChart extends ICompilable {
|
|
|
92
95
|
setCurrentTheme: () => void;
|
|
93
96
|
getSeriesData: (id: StringOrNumber | undefined, index: number | undefined) => DataView | undefined;
|
|
94
97
|
setDimensionIndex: (value: StringOrNumber, opt: DimensionIndexOption) => void;
|
|
98
|
+
filterGraphicsByDatum: (datum: MaybeArray<Datum> | null, opt?: {
|
|
99
|
+
filter?: (series: ISeries, mark: IMark) => boolean;
|
|
100
|
+
region?: IRegionQuerier;
|
|
101
|
+
getDatum?: (el: IMarkGraphic, mark: IMark, s: ISeries, r: IRegion) => Datum;
|
|
102
|
+
callback?: (el: IMarkGraphic, mark: IMark, s: ISeries, r: IRegion) => void;
|
|
103
|
+
regionCallback?: (pickElements: IMarkGraphic[], r: IRegion) => void;
|
|
104
|
+
}) => IMarkGraphic[];
|
|
95
105
|
}
|
|
96
106
|
export interface IChartSpecTransformer {
|
|
97
107
|
readonly type: string;
|
|
@@ -4,15 +4,11 @@ export declare const enum ChartTypeEnum {
|
|
|
4
4
|
area = "area",
|
|
5
5
|
line = "line",
|
|
6
6
|
bar = "bar",
|
|
7
|
-
bar3d = "bar3d",
|
|
8
7
|
histogram = "histogram",
|
|
9
|
-
histogram3d = "histogram3d",
|
|
10
8
|
rangeColumn = "rangeColumn",
|
|
11
|
-
rangeColumn3d = "rangeColumn3d",
|
|
12
9
|
rangeArea = "rangeArea",
|
|
13
10
|
map = "map",
|
|
14
11
|
pie = "pie",
|
|
15
|
-
pie3d = "pie3d",
|
|
16
12
|
radar = "radar",
|
|
17
13
|
rose = "rose",
|
|
18
14
|
scatter = "scatter",
|
|
@@ -20,9 +16,7 @@ export declare const enum ChartTypeEnum {
|
|
|
20
16
|
circularProgress = "circularProgress",
|
|
21
17
|
linearProgress = "linearProgress",
|
|
22
18
|
wordCloud = "wordCloud",
|
|
23
|
-
wordCloud3d = "wordCloud3d",
|
|
24
19
|
funnel = "funnel",
|
|
25
|
-
funnel3d = "funnel3d",
|
|
26
20
|
waterfall = "waterfall",
|
|
27
21
|
boxPlot = "boxPlot",
|
|
28
22
|
gauge = "gauge",
|
|
@@ -34,6 +28,5 @@ export declare const enum ChartTypeEnum {
|
|
|
34
28
|
correlation = "correlation",
|
|
35
29
|
liquid = "liquid",
|
|
36
30
|
venn = "venn",
|
|
37
|
-
mosaic = "mosaic"
|
|
38
|
-
pictogram = "pictogram"
|
|
31
|
+
mosaic = "mosaic"
|
|
39
32
|
}
|
|
@@ -8,5 +8,6 @@ export declare class LineChart<T extends ILineChartSpec> extends BaseChart<T> {
|
|
|
8
8
|
readonly transformerConstructor: typeof LineChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerLineChart: () => void;
|
|
@@ -17,5 +17,6 @@ export declare class MosaicChart<T extends IMosaicChartSpec = IMosaicChartSpec>
|
|
|
17
17
|
handleAfterStackRegion: (region: IRegion, stackValueGroup: {
|
|
18
18
|
[key: string]: IStackCacheRoot;
|
|
19
19
|
}) => void;
|
|
20
|
+
protected _setModelOption(): void;
|
|
20
21
|
}
|
|
21
22
|
export declare const registerMosaicChart: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPictogramSeriesSpec } from '../../series/pictogram/interface';
|
|
1
|
+
import type { IPictogramSeriesSpec } from '../../series/pictogram/interface';
|
|
2
2
|
import type { IChartExtendsSeriesSpec, IChartSpec } from '../../typings/spec/common';
|
|
3
3
|
export interface IPictogramChartSpec extends IChartSpec, IChartExtendsSeriesSpec<any> {
|
|
4
4
|
type: 'pictogram';
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { IPieSeriesSpec
|
|
1
|
+
import type { IPieSeriesSpec } from '../../series/pie/interface';
|
|
2
2
|
import type { IIndicatorSpec } from '../../component/indicator/interface';
|
|
3
3
|
import type { IChartExtendsSeriesSpec, IChartSpec } from '../../typings/spec/common';
|
|
4
4
|
export interface IPieChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IPieSeriesSpec> {
|
|
5
5
|
type: 'pie';
|
|
6
6
|
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
7
7
|
}
|
|
8
|
-
export interface IPie3dChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IPie3dSeriesSpec> {
|
|
9
|
-
type: 'pie3d';
|
|
10
|
-
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
11
|
-
}
|
|
@@ -9,5 +9,6 @@ export declare class CircularProgressChart<T extends ICircularProgressChartSpec
|
|
|
9
9
|
readonly transformerConstructor: typeof CircularProgressChartSpecTransformer;
|
|
10
10
|
readonly type: string;
|
|
11
11
|
readonly seriesType: string;
|
|
12
|
+
protected _setModelOption(): void;
|
|
12
13
|
}
|
|
13
14
|
export declare const registerCircularProgressChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class LinearProgressChart<T extends ILinearProgressChartSpec = IL
|
|
|
8
8
|
readonly transformerConstructor: typeof LinearProgressChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerLinearProgressChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class RadarChart<T extends IRoseChartSpec = IRoseChartSpec> exten
|
|
|
8
8
|
readonly transformerConstructor: typeof RadarChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerRadarChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class RangeAreaChart<T extends IRangeAreaChartSpec = IRangeAreaCh
|
|
|
8
8
|
readonly transformerConstructor: typeof RangeAreaChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerRangeAreaChart: () => void;
|