@visactor/vchart-types 1.15.5-alpha.8 → 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 +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/animate-manager.d.ts +0 -12
- 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 +98 -7
- package/types/animation/sequential-animate.d.ts +1 -0
- package/types/animation/spec.d.ts +27 -3
- 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 +3 -4
- 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 +22 -9
- 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/funnel/util.d.ts +2 -0
- 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 +14 -5
- package/types/chart/interface/common.d.ts +2 -9
- 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/sankey/sankey.d.ts +1 -1
- 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/compilable-base.d.ts +1 -1
- package/types/compile/compiler.d.ts +35 -25
- package/types/compile/data/compilable-data.d.ts +7 -7
- package/types/compile/data/interface.d.ts +4 -1
- package/types/compile/grammar-item.d.ts +7 -13
- package/types/compile/interface/compilable-item.d.ts +22 -28
- package/types/compile/interface/compiler.d.ts +14 -4
- package/types/compile/mark/compilable-mark.d.ts +1 -0
- package/types/compile/mark/index.d.ts +0 -1
- package/types/compile/mark/interface.d.ts +48 -34
- package/types/compile/mark/mark-state-manager.d.ts +12 -13
- package/types/compile/mark/util.d.ts +1 -1
- package/types/compile/morph.d.ts +3 -0
- package/types/compile/state-manager.d.ts +11 -0
- package/types/compile/util.d.ts +14 -0
- package/types/component/axis/base-axis.d.ts +10 -3
- package/types/component/axis/cartesian/axis.d.ts +7 -14
- 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 +6 -0
- package/types/component/axis/cartesian/util/common.d.ts +3 -1
- package/types/component/axis/interface/common.d.ts +8 -0
- 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 +1 -5
- package/types/component/base/util.d.ts +1 -2
- package/types/component/brush/brush.d.ts +35 -30
- 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 +25 -36
- package/types/component/crosshair/cartesian.d.ts +9 -29
- package/types/component/crosshair/interface/common.d.ts +67 -2
- package/types/component/crosshair/interface/index.d.ts +0 -2
- package/types/component/crosshair/interface/spec.d.ts +8 -4
- package/types/component/crosshair/polar.d.ts +10 -23
- package/types/component/crosshair/utils/cartesian.d.ts +10 -21
- package/types/component/crosshair/utils/common.d.ts +2 -3
- package/types/component/crosshair/utils/polar.d.ts +18 -11
- package/types/component/custom-mark/custom-mark.d.ts +1 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/types/component/data-zoom/interface.d.ts +11 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +4 -2
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/geo/interface.d.ts +1 -1
- 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 +9 -4
- package/types/component/label/interface.d.ts +14 -8
- package/types/component/label/label.d.ts +5 -3
- package/types/component/label/total-label.d.ts +4 -1
- package/types/component/label/util.d.ts +9 -10
- 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 +2 -2
- package/types/component/marker/base-marker.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 +12 -1
- 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 +8 -5
- package/types/component/util.d.ts +1 -2
- package/types/constant/data.d.ts +1 -0
- package/types/constant/event.d.ts +55 -2
- package/types/core/factory.d.ts +31 -2
- package/types/core/index.d.ts +18 -2
- package/types/core/interface.d.ts +19 -5
- package/types/core/vchart.d.ts +8 -7
- 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 +5 -6
- package/types/data/transforms/venn.d.ts +10 -0
- package/types/data/transforms/waterfall.d.ts +1 -0
- package/types/event/event-dispatcher.d.ts +4 -1
- package/types/event/event.d.ts +4 -1
- package/types/event/events/base.d.ts +1 -2
- 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 -0
- package/types/event/interface.d.ts +19 -13
- package/types/index-harmony-simple.d.ts +4 -4
- package/types/index-harmony.d.ts +1 -1
- package/types/index.d.ts +11 -0
- package/types/interaction/config.d.ts +13 -0
- package/types/interaction/index.d.ts +10 -1
- package/types/interaction/interaction.d.ts +17 -25
- package/types/interaction/interface/common.d.ts +22 -0
- package/types/interaction/interface/spec.d.ts +53 -0
- package/types/interaction/interface/trigger.d.ts +87 -0
- package/types/interaction/triggers/base.d.ts +28 -0
- package/types/interaction/triggers/dimension-hover.d.ts +22 -0
- package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
- package/types/interaction/triggers/element-active.d.ts +20 -0
- package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
- package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
- package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
- package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
- package/types/interaction/triggers/element-highlight.d.ts +25 -0
- package/types/interaction/triggers/element-select.d.ts +24 -0
- package/types/interaction/triggers/enum.d.ts +6 -0
- package/types/interaction/triggers/util.d.ts +12 -0
- package/types/interaction/zoom/zoomable.d.ts +5 -0
- package/types/layout/base-layout.d.ts +12 -9
- package/types/layout/index.d.ts +4 -4
- package/types/layout/interface.d.ts +8 -3
- package/types/layout/layout-item.d.ts +7 -3
- package/types/layout/util.d.ts +17 -4
- package/types/mark/arc.d.ts +3 -3
- package/types/mark/area.d.ts +2 -0
- package/types/mark/base/base-line.d.ts +25 -2
- package/types/mark/base/base-mark.d.ts +160 -13
- package/types/mark/box-plot.d.ts +11 -5
- package/types/mark/cell.d.ts +6 -3
- package/types/mark/component.d.ts +12 -3
- package/types/mark/glyph.d.ts +30 -0
- package/types/mark/group.d.ts +11 -6
- package/types/mark/index.d.ts +10 -7
- package/types/mark/interface/common.d.ts +81 -9
- package/types/mark/interface/enum.d.ts +6 -0
- package/types/mark/interface/index.d.ts +1 -0
- package/types/mark/interface/mark.d.ts +20 -5
- package/types/mark/interface/type.d.ts +1 -3
- package/types/mark/label.d.ts +4 -3
- package/types/mark/link-path.d.ts +35 -5
- package/types/mark/liquid.d.ts +47 -5
- package/types/mark/ripple.d.ts +39 -4
- package/types/mark/rule.d.ts +4 -1
- package/types/mark/symbol.d.ts +4 -5
- package/types/mark/text.d.ts +5 -3
- package/types/mark/transform/data-sampling.d.ts +10 -0
- package/types/mark/transform/filter.d.ts +1 -0
- package/types/mark/transform/map.d.ts +1 -0
- package/types/mark/transform/symbol-overlap.d.ts +13 -0
- package/types/mark/utils/common.d.ts +4 -1
- package/types/mark/utils/glyph.d.ts +2 -0
- package/types/mark/utils/index.d.ts +2 -0
- package/types/mark/utils/line.d.ts +3 -0
- package/types/model/base-model.d.ts +11 -10
- package/types/model/interface.d.ts +11 -10
- package/types/model/layout-model.d.ts +4 -3
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -14
- package/types/plugin/other.d.ts +3 -4
- package/types/region/interface.d.ts +0 -4
- package/types/region/region.d.ts +3 -11
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area.d.ts +3 -2
- package/types/series/bar/animation.d.ts +1 -2
- package/types/series/bar/bar.d.ts +9 -9
- 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 +23 -40
- package/types/series/base/tooltip-helper.d.ts +1 -2
- package/types/series/box-plot/animation.d.ts +52 -0
- package/types/series/box-plot/box-plot.d.ts +6 -3
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/animation.d.ts +1 -1
- package/types/series/circle-packing/circle-packing.d.ts +4 -1
- package/types/series/correlation/animation.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +6 -4
- package/types/series/dot/dot.d.ts +5 -2
- package/types/series/funnel/constant.d.ts +0 -1
- package/types/series/funnel/funnel.d.ts +10 -11
- package/types/series/funnel/interface.d.ts +2 -13
- package/types/series/funnel/tooltip-helper.d.ts +4 -2
- package/types/series/gauge/animation.d.ts +1 -1
- package/types/series/gauge/gauge-pointer.d.ts +7 -1
- package/types/series/gauge/gauge.d.ts +5 -2
- package/types/series/geo/geo.d.ts +3 -4
- package/types/series/heatmap/animation.d.ts +1 -1
- package/types/series/heatmap/heatmap.d.ts +7 -1
- package/types/series/index.d.ts +24 -19
- package/types/series/interface/common.d.ts +1 -4
- package/types/series/interface/series.d.ts +6 -1
- package/types/series/interface/theme.d.ts +5 -16
- package/types/series/interface/type.d.ts +1 -11
- package/types/series/line/animation.d.ts +1 -1
- package/types/series/line/line.d.ts +4 -1
- package/types/series/link/link.d.ts +8 -2
- package/types/series/liquid/animation.d.ts +1 -1
- package/types/series/liquid/liquid.d.ts +7 -1
- package/types/series/map/interface.d.ts +10 -0
- package/types/series/map/map.d.ts +3 -0
- package/types/series/mixin/line-mixin.d.ts +5 -5
- package/types/series/mosaic/mosaic.d.ts +2 -0
- package/types/series/pictogram/pictogram.d.ts +2 -0
- package/types/series/pictogram/tooltip-helper.d.ts +2 -2
- package/types/series/pie/animation/animation.d.ts +4 -4
- package/types/series/pie/animation/centerOffset.d.ts +1 -1
- package/types/series/pie/constant.d.ts +0 -1
- package/types/series/pie/interface.d.ts +3 -13
- package/types/series/pie/pie.d.ts +13 -11
- package/types/series/polar/animation.d.ts +2 -4
- package/types/series/polar/progress-like/animation.d.ts +1 -1
- package/types/series/polar/progress-like/interface.d.ts +1 -0
- package/types/series/polar/progress-like/progress-like.d.ts +1 -2
- package/types/series/progress/circular/circular.d.ts +7 -1
- package/types/series/progress/linear/animation.d.ts +2 -2
- package/types/series/progress/linear/interface.d.ts +1 -0
- package/types/series/progress/linear/linear.d.ts +7 -1
- package/types/series/radar/animation.d.ts +12 -10
- package/types/series/radar/radar.d.ts +5 -2
- package/types/series/range-column/animation.d.ts +1 -1
- 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/animation.d.ts +1 -1
- package/types/series/rose/rose.d.ts +3 -0
- package/types/series/sankey/animation.d.ts +14 -1
- package/types/series/sankey/interface.d.ts +0 -1
- package/types/series/sankey/sankey.d.ts +14 -12
- package/types/series/sankey/tooltip-helper.d.ts +1 -1
- package/types/series/scatter/animation.d.ts +1 -1
- package/types/series/scatter/scatter.d.ts +3 -0
- package/types/series/sunburst/animation/enter.d.ts +1 -1
- package/types/series/sunburst/animation/exit.d.ts +1 -1
- package/types/series/sunburst/animation/preset.d.ts +1 -1
- package/types/series/sunburst/animation/utils.d.ts +2 -2
- package/types/series/sunburst/interface.d.ts +1 -1
- package/types/series/sunburst/sunburst.d.ts +4 -1
- package/types/series/treemap/animation.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +4 -2
- package/types/series/venn/animation.d.ts +12 -1
- package/types/series/venn/venn.d.ts +5 -1
- package/types/series/waterfall/animation.d.ts +1 -1
- package/types/series/waterfall/waterfall.d.ts +6 -2
- package/types/series/word-cloud/animation.d.ts +2 -4
- package/types/series/word-cloud/base.d.ts +4 -3
- package/types/series/word-cloud/interface.d.ts +2 -20
- 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/common.d.ts +13 -0
- package/types/typings/spec/chart.d.ts +6 -12
- package/types/typings/spec/common.d.ts +40 -41
- package/types/typings/tooltip/position.d.ts +1 -1
- package/types/typings/visual.d.ts +11 -13
- package/types/util/array.d.ts +1 -0
- package/types/util/index.d.ts +1 -0
- package/types/util/mark.d.ts +5 -0
- package/types/util/math.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
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StateManager } from '../compile/signal/state-manager';
|
|
2
|
-
import type { StateValueMap } from '../compile/signal/interface';
|
|
3
|
-
import type { IAnimate, IAnimateState } from './interface';
|
|
4
|
-
import { AnimationStateEnum } from './interface';
|
|
5
|
-
export declare class AnimateManager extends StateManager implements IAnimate {
|
|
6
|
-
protected _stateMap: IAnimateState & StateValueMap;
|
|
7
|
-
readonly id: number;
|
|
8
|
-
protected stateKeyToSignalName: (key: string) => string;
|
|
9
|
-
getAnimationStateSignalName(): string;
|
|
10
|
-
updateAnimateState(state: AnimationStateEnum, noRender?: boolean): void;
|
|
11
|
-
protected _getDefaultStateMap(): IAnimateState & StateValueMap;
|
|
12
|
-
}
|
|
@@ -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,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
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';
|
|
3
5
|
export declare enum AnimationStateEnum {
|
|
4
6
|
appear = "appear",
|
|
5
7
|
disappear = "disappear",
|
|
@@ -16,14 +18,103 @@ export interface IAnimateState {
|
|
|
16
18
|
callback: (datum: any, element: any) => AnimationStateEnum;
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
|
-
export interface IAnimate extends ICompilable {
|
|
20
|
-
id: number;
|
|
21
|
-
updateAnimateState: (state: AnimationStateEnum, noRender?: boolean) => void;
|
|
22
|
-
getAnimationStateSignalName: () => string;
|
|
23
|
-
}
|
|
24
21
|
export interface ICartesianGroupAnimationParams {
|
|
25
22
|
direction: () => 'x' | 'y';
|
|
26
23
|
orient: () => 'positive' | 'negative';
|
|
27
24
|
width: () => number;
|
|
28
25
|
height: () => number;
|
|
29
26
|
}
|
|
27
|
+
export interface IAnimationParameters {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
mark: IMark;
|
|
31
|
+
group: IMark | null;
|
|
32
|
+
elementIndex: number;
|
|
33
|
+
elementCount: number;
|
|
34
|
+
view: any;
|
|
35
|
+
}
|
|
36
|
+
export type IAnimationChannelInterpolator = (ratio: number, from: any, to: any, nextAttributes: any, datum: any, g: IGraphic, parameters: IAnimationParameters) => boolean | void;
|
|
37
|
+
export type GraphicFunctionCallback<T> = (datum: any, g: IGraphic, params: any) => T;
|
|
38
|
+
export type GraphicFunctionValueType<T> = GraphicFunctionCallback<T> | T;
|
|
39
|
+
export interface IStateAnimationConfig {
|
|
40
|
+
duration?: number;
|
|
41
|
+
easing?: EasingType;
|
|
42
|
+
}
|
|
43
|
+
export interface IAnimationControlOptions {
|
|
44
|
+
stopWhenStateChange?: boolean;
|
|
45
|
+
immediatelyApply?: boolean;
|
|
46
|
+
ignoreLoopFinalAttributes?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface CommonAnimationConfigItem {
|
|
49
|
+
custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;
|
|
50
|
+
customParameters?: GraphicFunctionValueType<any>;
|
|
51
|
+
easing?: EasingType;
|
|
52
|
+
duration?: GraphicFunctionValueType<number>;
|
|
53
|
+
delay?: GraphicFunctionValueType<number>;
|
|
54
|
+
delayAfter?: GraphicFunctionValueType<number>;
|
|
55
|
+
oneByOne?: GraphicFunctionValueType<boolean | number>;
|
|
56
|
+
startTime?: GraphicFunctionValueType<number>;
|
|
57
|
+
totalTime?: GraphicFunctionValueType<number>;
|
|
58
|
+
loop?: boolean | number;
|
|
59
|
+
options?: GraphicFunctionValueType<any>;
|
|
60
|
+
controlOptions?: IAnimationControlOptions;
|
|
61
|
+
}
|
|
62
|
+
export interface TypeAnimationConfig extends CommonAnimationConfigItem {
|
|
63
|
+
type: string;
|
|
64
|
+
}
|
|
65
|
+
export type IAnimationChannelFunction = (datum: any, g: IGraphic, mark: IMark) => any;
|
|
66
|
+
export type IAnimationChannelAttrs = Record<string, {
|
|
67
|
+
from?: any | IAnimationChannelFunction;
|
|
68
|
+
to?: any | IAnimationChannelFunction;
|
|
69
|
+
}>;
|
|
70
|
+
export interface ChannelAnimationConfig extends CommonAnimationConfigItem {
|
|
71
|
+
channel: IAnimationChannelAttrs | string[];
|
|
72
|
+
}
|
|
73
|
+
export type IAnimationTypeConfig = TypeAnimationConfig | ChannelAnimationConfig | CommonAnimationConfigItem;
|
|
74
|
+
export interface IAnimationCustomConstructor {
|
|
75
|
+
new (from: any, to: any, duration: number, ease: EasingType, parameters?: any): ACustomAnimate<any>;
|
|
76
|
+
}
|
|
77
|
+
export type IAnimationEffect = {
|
|
78
|
+
type?: string;
|
|
79
|
+
channel?: IAnimationChannelAttrs | string[];
|
|
80
|
+
custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;
|
|
81
|
+
customParameters?: GraphicFunctionValueType<any>;
|
|
82
|
+
easing?: EasingType;
|
|
83
|
+
options?: GraphicFunctionValueType<any>;
|
|
84
|
+
};
|
|
85
|
+
export interface IAnimationTimeSlice {
|
|
86
|
+
effects: IAnimationEffect | IAnimationEffect[];
|
|
87
|
+
duration?: GraphicFunctionValueType<number>;
|
|
88
|
+
delay?: GraphicFunctionValueType<number>;
|
|
89
|
+
delayAfter?: GraphicFunctionValueType<number>;
|
|
90
|
+
}
|
|
91
|
+
export interface IAnimationTimeline {
|
|
92
|
+
id?: string;
|
|
93
|
+
timeSlices: IAnimationTimeSlice | IAnimationTimeSlice[];
|
|
94
|
+
startTime?: GraphicFunctionValueType<number>;
|
|
95
|
+
totalTime?: GraphicFunctionValueType<number>;
|
|
96
|
+
oneByOne?: GraphicFunctionValueType<number | boolean>;
|
|
97
|
+
loop?: GraphicFunctionValueType<number | boolean>;
|
|
98
|
+
partitioner?: GraphicFunctionCallback<boolean>;
|
|
99
|
+
sort?: (datumA: any, datumB: any, graphicA: IGraphic, graphicB: IGraphic) => number;
|
|
100
|
+
controlOptions?: IAnimationControlOptions;
|
|
101
|
+
}
|
|
102
|
+
export type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;
|
|
103
|
+
export interface MarkAnimationSpec {
|
|
104
|
+
disappear?: IAnimationConfig | IAnimationConfig[];
|
|
105
|
+
appear?: IAnimationConfig | IAnimationConfig[];
|
|
106
|
+
enter?: IAnimationConfig | IAnimationConfig[];
|
|
107
|
+
exit?: IAnimationConfig | IAnimationConfig[];
|
|
108
|
+
update?: IAnimationConfig | IAnimationConfig[];
|
|
109
|
+
normal?: IAnimationConfig | IAnimationConfig[];
|
|
110
|
+
state?: IStateAnimationConfig;
|
|
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;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type { IRunningConfig as IMorphConfig, IMorphAnimationConfig } from '@visactor/vgrammar-core';
|
|
1
|
+
import type { EasingType, IGraphic } from '@visactor/vrender-core';
|
|
2
|
+
import type { IAnimationConfig, IStateAnimationConfig } from './interface';
|
|
4
3
|
export interface ICommonStateAnimateSpec {
|
|
5
4
|
duration?: number;
|
|
6
5
|
delay?: number;
|
|
@@ -25,3 +24,28 @@ export interface IMorphSeriesSpec {
|
|
|
25
24
|
morphKey?: string;
|
|
26
25
|
morphElementKey?: string;
|
|
27
26
|
}
|
|
27
|
+
export type MorphData = {
|
|
28
|
+
prev: any[];
|
|
29
|
+
next: any[];
|
|
30
|
+
};
|
|
31
|
+
export type MorphElements = {
|
|
32
|
+
prev: IGraphic[];
|
|
33
|
+
next: IGraphic[];
|
|
34
|
+
};
|
|
35
|
+
export type MorphFunctionCallback<T> = (datum: MorphData, element: MorphElements, parameters: any) => T;
|
|
36
|
+
export type MorphFunctionType<T> = T | MorphFunctionCallback<T>;
|
|
37
|
+
export type MorphFunctionValueType<T> = MorphFunctionType<T> | T;
|
|
38
|
+
export interface IMorphAnimationConfig {
|
|
39
|
+
easing?: EasingType;
|
|
40
|
+
delay?: MorphFunctionValueType<number>;
|
|
41
|
+
duration?: MorphFunctionValueType<number>;
|
|
42
|
+
oneByOne?: MorphFunctionValueType<boolean | number>;
|
|
43
|
+
splitPath?: MorphFunctionValueType<'clone' | null | undefined>;
|
|
44
|
+
}
|
|
45
|
+
export interface IMorphConfig {
|
|
46
|
+
reuse?: boolean;
|
|
47
|
+
morph?: boolean;
|
|
48
|
+
morphAll?: boolean;
|
|
49
|
+
animation?: IMorphAnimationConfig;
|
|
50
|
+
enableExitAnimation?: boolean;
|
|
51
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { IAnimationConfig } from '
|
|
2
|
-
import type { MarkAnimationSpec, IAnimationState } from './interface';
|
|
1
|
+
import type { MarkAnimationSpec, IAnimationState, IAnimationConfig } from './interface';
|
|
3
2
|
import type { IStateAnimateSpec, IAnimationSpec } from './spec';
|
|
4
3
|
import type { SeriesMarkNameEnum } from '../series/interface/type';
|
|
5
4
|
import type { ISeries } from '../series';
|
|
@@ -10,9 +9,9 @@ export declare function animationConfig<Preset extends string>(defaultConfig?: M
|
|
|
10
9
|
dataIndex: (datum: any, params: any) => number;
|
|
11
10
|
dataCount: () => number;
|
|
12
11
|
}): MarkAnimationSpec;
|
|
13
|
-
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>>>;
|
|
14
13
|
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
|
|
15
14
|
export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
|
|
16
15
|
export declare function isChannelAnimation(animationConfig: IAnimationConfig): boolean;
|
|
17
|
-
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>>>;
|
|
18
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
|
-
}
|
|
@@ -3,19 +3,20 @@ import { ChartData } from '../chart-meta/data';
|
|
|
3
3
|
import type { Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec, IDataValues, ILayoutRect, ILayoutOrientPadding } from '../../typings';
|
|
4
4
|
import type { ILayoutItem, LayoutCallBack } from '../../layout/interface';
|
|
5
5
|
import type { ILayoutModelState, IModel, IModelOption, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
6
|
-
import type { IChart,
|
|
6
|
+
import type { IChart, IChartRenderOption, IChartOption, IChartEvaluateOption, DimensionIndexOption, IChartSpecTransformerOption, IChartSpecTransformer } from '../interface';
|
|
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';
|
|
14
14
|
import type { IParserOptions } from '@visactor/vdataset';
|
|
15
15
|
import type { IBoundsLike, Maybe } from '@visactor/vutils';
|
|
16
|
-
import type { IRunningConfig as IMorphConfig, IView } from '@visactor/vgrammar-core';
|
|
17
16
|
import { CompilableBase } from '../../compile/compilable-base';
|
|
18
17
|
import type { IGlobalScale } from '../../scale/interface';
|
|
18
|
+
import type { IMorphConfig } from '../../animation/spec';
|
|
19
|
+
import type { IInteraction } from '../../interaction/interface/common';
|
|
19
20
|
export declare class BaseChart<T extends IChartSpec> extends CompilableBase implements IChart {
|
|
20
21
|
readonly type: string;
|
|
21
22
|
readonly seriesType: string;
|
|
@@ -37,7 +38,9 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
37
38
|
protected _layoutTag: boolean;
|
|
38
39
|
getLayoutTag(): boolean;
|
|
39
40
|
setLayoutTag(tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean): boolean;
|
|
41
|
+
resetLayoutItemTag(): void;
|
|
40
42
|
protected _modelOption: IModelOption;
|
|
43
|
+
getModelOption(): IModelOption;
|
|
41
44
|
protected _globalScale: IGlobalScale;
|
|
42
45
|
getGlobalScale(): IGlobalScale;
|
|
43
46
|
protected _idMap: Map<number, IModel | IMark>;
|
|
@@ -52,8 +55,11 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
52
55
|
protected _paddingSpec: ILayoutOrientPadding;
|
|
53
56
|
protected _canvasRect: ILayoutRect;
|
|
54
57
|
protected _backgroundMark: IRectMark;
|
|
58
|
+
protected _interaction: IInteraction;
|
|
59
|
+
protected _setModelOption(): void;
|
|
55
60
|
constructor(spec: T, option: IChartOption);
|
|
56
61
|
created(transformer: Maybe<IChartSpecTransformer>): void;
|
|
62
|
+
_initInteractions(): void;
|
|
57
63
|
init(): void;
|
|
58
64
|
reDataFlow(): void;
|
|
59
65
|
onResize(width: number, height: number, reRender?: boolean): void;
|
|
@@ -73,9 +79,9 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
73
79
|
private _createLayout;
|
|
74
80
|
setLayout(layout: LayoutCallBack): void;
|
|
75
81
|
private _initLayoutFunc;
|
|
76
|
-
layout(
|
|
77
|
-
onLayoutStart(
|
|
78
|
-
onLayoutEnd(
|
|
82
|
+
layout(): void;
|
|
83
|
+
onLayoutStart(): void;
|
|
84
|
+
onLayoutEnd(): void;
|
|
79
85
|
onEvaluateEnd(option: IChartEvaluateOption): void;
|
|
80
86
|
getLayoutElements(): ILayoutItem[];
|
|
81
87
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
@@ -135,7 +141,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
135
141
|
compileSeries(): void;
|
|
136
142
|
compileComponents(): void;
|
|
137
143
|
release(): void;
|
|
138
|
-
onLayout(
|
|
144
|
+
onLayout(): void;
|
|
139
145
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
140
146
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
141
147
|
setHovered(datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
@@ -146,7 +152,14 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
146
152
|
private _initEvent;
|
|
147
153
|
protected _enableMarkAnimation(states: string | string[]): void;
|
|
148
154
|
protected _disableMarkAnimation(states: string | string[]): void;
|
|
149
|
-
|
|
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[];
|
|
162
|
+
protected _setStateInDatum(stateKey: string, d: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
150
163
|
setDimensionIndex(value: StringOrNumber, opt: DimensionIndexOption): void;
|
|
151
|
-
getColorScheme():
|
|
164
|
+
getColorScheme(): any;
|
|
152
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 };
|