@visactor/vchart-types 0.10.0-alpha.3 → 0.11.6-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/config.d.ts +1 -0
- package/types/animation/utils.d.ts +4 -4
- package/types/chart/area/area.d.ts +0 -1
- package/types/chart/bar/3d/bar-3d.d.ts +0 -1
- package/types/chart/bar/bar-transformer.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +3 -0
- package/types/chart/base/base-chart-transformer.d.ts +9 -1
- package/types/chart/base/base-chart.d.ts +9 -4
- package/types/chart/base/util.d.ts +2 -2
- package/types/chart/box-plot/box-plot.d.ts +0 -1
- package/types/chart/cartesian/cartesian-transformer.d.ts +1 -0
- package/types/chart/circle-packing/circle-packing.d.ts +0 -1
- package/types/chart/common/common-transformer.d.ts +1 -0
- package/types/chart/common/common.d.ts +0 -1
- package/types/chart/common/interface.d.ts +5 -2
- package/types/chart/correlation/correlation.d.ts +0 -1
- package/types/chart/funnel/3d/funnel-3d.d.ts +0 -1
- package/types/chart/funnel/funnel.d.ts +0 -1
- package/types/chart/gauge/gauge.d.ts +0 -1
- package/types/chart/heatmap/heatmap.d.ts +0 -1
- package/types/chart/histogram/3d/histogram-3d.d.ts +0 -1
- package/types/chart/histogram/histogram.d.ts +0 -1
- package/types/chart/index.d.ts +6 -4
- package/types/chart/interface/chart.d.ts +10 -3
- package/types/chart/interface/common.d.ts +1 -5
- package/types/chart/interface/type.d.ts +2 -1
- package/types/chart/line/line.d.ts +0 -1
- package/types/chart/liquid/liquid.d.ts +0 -1
- package/types/chart/map/map.d.ts +0 -1
- package/types/chart/pie/3d/pie-3d.d.ts +0 -1
- package/types/chart/pie/pie.d.ts +0 -1
- package/types/chart/polar/interface.d.ts +2 -1
- package/types/chart/progress/circular/circular.d.ts +0 -1
- package/types/chart/progress/linear/linear.d.ts +0 -1
- package/types/chart/radar/radar.d.ts +0 -1
- package/types/chart/range-area/range-area.d.ts +0 -1
- package/types/chart/range-column/3d/range-column-3d.d.ts +0 -1
- package/types/chart/range-column/range-column.d.ts +0 -1
- package/types/chart/rose/rose.d.ts +0 -1
- package/types/chart/sankey/sankey.d.ts +5 -1
- package/types/chart/scatter/scatter.d.ts +0 -1
- package/types/chart/sequence/interface.d.ts +2 -2
- package/types/chart/sequence/sequence.d.ts +0 -1
- package/types/chart/sunburst/sunburst.d.ts +0 -1
- package/types/chart/treemap/treemap.d.ts +0 -1
- package/types/chart/venn/index.d.ts +3 -0
- package/types/chart/venn/interface.d.ts +6 -0
- package/types/chart/venn/venn-transformer.d.ts +7 -0
- package/types/chart/venn/venn.d.ts +13 -0
- package/types/chart/waterfall/waterfall.d.ts +0 -1
- package/types/chart/word-cloud/3d/word-cloud-3d.d.ts +0 -1
- package/types/chart/word-cloud/word-cloud.d.ts +0 -1
- package/types/compile/compiler.d.ts +5 -3
- package/types/compile/interface/compiler.d.ts +1 -0
- package/types/compile/mark/compilable-mark.d.ts +6 -2
- package/types/compile/mark/interface.d.ts +8 -2
- package/types/component/axis/base-axis.d.ts +13 -60
- package/types/component/axis/cartesian/axis.d.ts +3 -8
- package/types/component/axis/cartesian/band-axis.d.ts +7 -2
- package/types/component/axis/cartesian/interface/common.d.ts +1 -0
- package/types/component/axis/cartesian/interface/spec.d.ts +5 -0
- package/types/component/axis/cartesian/time-axis.d.ts +1 -1
- package/types/component/axis/cartesian/util/index.d.ts +0 -1
- package/types/component/axis/interface/common.d.ts +2 -1
- package/types/component/axis/interface/spec.d.ts +9 -6
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +12 -3
- package/types/component/axis/polar/axis.d.ts +13 -10
- package/types/component/axis/polar/band-axis.d.ts +2 -1
- package/types/component/axis/polar/interface/common.d.ts +2 -0
- package/types/component/axis/polar/interface/spec.d.ts +6 -2
- package/types/component/axis/polar/linear-axis.d.ts +5 -1
- package/types/component/axis/polar/util/common.d.ts +1 -0
- package/types/component/base/base-component.d.ts +2 -1
- package/types/component/base/util.d.ts +5 -0
- package/types/component/brush/brush.d.ts +8 -3
- package/types/component/brush/interface.d.ts +4 -3
- package/types/component/crosshair/base.d.ts +14 -5
- package/types/component/crosshair/cartesian.d.ts +3 -9
- package/types/component/crosshair/interface/cartesian.d.ts +33 -0
- package/types/component/crosshair/interface/common.d.ts +7 -0
- package/types/component/crosshair/interface/index.d.ts +3 -0
- package/types/component/crosshair/interface/polar.d.ts +25 -0
- package/types/component/crosshair/interface/spec.d.ts +3 -0
- package/types/component/crosshair/polar.d.ts +4 -3
- package/types/component/crosshair/utils/cartesian.d.ts +34 -0
- package/types/component/crosshair/utils/common.d.ts +9 -0
- package/types/component/crosshair/utils/index.d.ts +1 -0
- package/types/component/crosshair/utils/polar.d.ts +37 -0
- package/types/component/custom-mark/custom-mark.d.ts +16 -5
- package/types/component/data-zoom/data-filter-base-component.d.ts +7 -9
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +6 -8
- package/types/component/data-zoom/index.d.ts +1 -0
- package/types/component/data-zoom/interface.d.ts +3 -0
- package/types/component/data-zoom/scroll-bar/interface.d.ts +3 -5
- package/types/component/data-zoom/util.d.ts +0 -4
- package/types/component/index.d.ts +8 -7
- package/types/component/indicator/interface.d.ts +5 -5
- package/types/component/interface/theme.d.ts +12 -0
- package/types/component/interface/type.d.ts +4 -0
- package/types/component/label/base-label.d.ts +6 -5
- package/types/component/label/interface.d.ts +9 -10
- package/types/component/label/label.d.ts +1 -2
- package/types/component/label/total-label.d.ts +1 -0
- package/types/component/label/util.d.ts +10 -2
- package/types/component/legend/continuous/interface.d.ts +7 -12
- package/types/component/legend/discrete/interface.d.ts +21 -6
- package/types/component/legend/discrete/legend.d.ts +5 -1
- package/types/component/legend/util.d.ts +14 -5
- package/types/component/marker/base-marker.d.ts +37 -44
- package/types/component/marker/interface.d.ts +45 -18
- package/types/component/marker/mark-area/base-mark-area.d.ts +18 -0
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +19 -0
- package/types/component/marker/mark-area/index.d.ts +2 -1
- package/types/component/marker/mark-area/interface/spec.d.ts +16 -1
- package/types/component/marker/mark-area/interface/theme.d.ts +5 -7
- package/types/component/marker/mark-area/polar-mark-area.d.ts +25 -0
- package/types/component/marker/mark-line/base-mark-line.d.ts +19 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +20 -0
- package/types/component/marker/mark-line/index.d.ts +2 -1
- package/types/component/marker/mark-line/interface/spec.d.ts +26 -2
- package/types/component/marker/mark-line/interface/theme.d.ts +5 -7
- package/types/component/marker/mark-line/polar-mark-line.d.ts +23 -0
- package/types/component/marker/mark-point/base-mark-point.d.ts +17 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +16 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +14 -0
- package/types/component/marker/mark-point/index.d.ts +3 -1
- package/types/component/marker/mark-point/interface/spec.d.ts +9 -1
- package/types/component/marker/mark-point/interface/theme.d.ts +19 -18
- package/types/component/marker/mark-point/polar-mark-point.d.ts +18 -0
- package/types/component/marker/utils.d.ts +40 -5
- package/types/component/player/interface/theme.d.ts +1 -1
- package/types/component/player/player.d.ts +2 -1
- package/types/component/poptip/interface.d.ts +5 -2
- package/types/component/title/interface/spec.d.ts +18 -7
- package/types/component/title/interface/theme.d.ts +2 -1
- package/types/component/tooltip/constant.d.ts +8 -0
- package/types/component/tooltip/index.d.ts +1 -0
- package/types/component/tooltip/interface/common.d.ts +13 -8
- package/types/component/tooltip/interface/event.d.ts +1 -2
- package/types/component/tooltip/interface/index.d.ts +1 -0
- package/types/component/tooltip/interface/spec.d.ts +6 -5
- package/types/component/tooltip/interface/theme.d.ts +7 -5
- package/types/component/tooltip/processor/base.d.ts +10 -5
- package/types/component/tooltip/processor/group-tooltip.d.ts +11 -0
- package/types/component/tooltip/processor/index.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +4 -3
- package/types/component/tooltip/processor/mark-tooltip.d.ts +2 -2
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip-transformer.d.ts +2 -0
- package/types/component/tooltip/tooltip.d.ts +7 -11
- package/types/component/tooltip/utils/compose.d.ts +4 -0
- package/types/component/tooltip/utils/get-spec.d.ts +5 -0
- package/types/component/tooltip/utils/get-value.d.ts +6 -0
- package/types/component/tooltip/utils/index.d.ts +4 -0
- package/types/component/tooltip/utils/pattern.d.ts +4 -0
- package/types/component/tooltip/utils/show-tooltip.d.ts +21 -3
- package/types/component/util.d.ts +8 -0
- package/types/constant/index.d.ts +1 -0
- package/types/core/factory.d.ts +3 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +10 -3
- package/types/core/vchart.d.ts +12 -5
- package/types/data/transforms/aggregation.d.ts +12 -7
- package/types/data/transforms/dimension-statistics.d.ts +2 -0
- package/types/data/transforms/funnel.d.ts +1 -1
- package/types/data/transforms/invalid-travel.d.ts +1 -1
- package/types/data/transforms/legend-data/continuous/interface.d.ts +1 -0
- package/types/data/transforms/legend-data/discrete/interface.d.ts +2 -0
- package/types/env/env.d.ts +2 -0
- package/types/event/event-dispatcher.d.ts +3 -0
- package/types/event/events/dimension/interface.d.ts +4 -2
- package/types/event/interface.d.ts +14 -2
- package/types/index.d.ts +2 -0
- package/types/interaction/dimension-trigger.d.ts +1 -6
- package/types/interaction/index.d.ts +1 -0
- package/types/interaction/interaction.d.ts +5 -0
- package/types/interaction/interface.d.ts +12 -9
- package/types/layout/grid-layout/grid-layout.d.ts +1 -1
- package/types/mark/base/base-mark.d.ts +3 -3
- package/types/mark/index.d.ts +20 -21
- package/types/mark/interface/type.d.ts +0 -1
- package/types/mark/label.d.ts +2 -2
- package/types/mark/text.d.ts +16 -7
- package/types/model/interface.d.ts +4 -8
- package/types/model/tooltip-helper.d.ts +4 -2
- package/types/plugin/base/base-plugin-service.d.ts +4 -2
- package/types/plugin/base/base-plugin.d.ts +1 -0
- package/types/plugin/base/interface.d.ts +6 -3
- package/types/plugin/chart/formatter/formatter.d.ts +28 -0
- package/types/plugin/chart/formatter/index.d.ts +1 -0
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/chart/media-query/media-query.d.ts +1 -1
- package/types/plugin/chart/plugin-service.d.ts +1 -0
- package/types/plugin/components/index.d.ts +2 -5
- package/types/plugin/components/plugin-service.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +8 -13
- package/types/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.d.ts +1 -2
- package/types/plugin/components/tooltip-handler/constants.d.ts +0 -8
- package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +8 -4
- package/types/plugin/components/tooltip-handler/dom/interface.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/dom/model/base-tooltip-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-column-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -3
- package/types/plugin/components/tooltip-handler/dom/model/interface.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/interface/style.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/common.d.ts +1 -7
- package/types/plugin/components/tooltip-handler/utils/compose.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/index.d.ts +0 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +19 -3
- package/types/plugin/index.d.ts +1 -0
- package/types/region/interface.d.ts +4 -1
- package/types/region/region.d.ts +1 -0
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area-transformer.d.ts +1 -0
- package/types/series/area/area.d.ts +1 -1
- package/types/series/area/interface.d.ts +7 -1
- package/types/series/bar/bar-transformer.d.ts +1 -0
- package/types/series/bar/bar.d.ts +11 -3
- package/types/series/bar/interface.d.ts +4 -3
- package/types/series/base/base-series-transformer.d.ts +9 -3
- package/types/series/base/base-series.d.ts +16 -23
- package/types/series/base/tooltip-helper.d.ts +12 -8
- package/types/series/box-plot/tooltip-helper.d.ts +1 -1
- package/types/series/cartesian/cartesian.d.ts +3 -4
- package/types/series/circle-packing/tooltip-helper.d.ts +1 -1
- package/types/series/correlation/interface.d.ts +3 -3
- package/types/series/dot/interface.d.ts +2 -2
- package/types/series/funnel/funnel.d.ts +1 -1
- package/types/series/funnel/interface.d.ts +6 -4
- package/types/series/funnel/tooltip-helper.d.ts +3 -3
- package/types/series/gauge/gauge-pointer-transformer.d.ts +5 -0
- package/types/series/gauge/gauge-pointer.d.ts +3 -1
- package/types/series/gauge/gauge-transformer.d.ts +1 -0
- package/types/series/gauge/gauge.d.ts +0 -1
- package/types/series/gauge/interface.d.ts +3 -3
- package/types/series/geo/geo.d.ts +2 -1
- package/types/series/index.d.ts +7 -3
- package/types/series/interface/common.d.ts +12 -5
- package/types/series/interface/series.d.ts +12 -3
- package/types/series/interface/theme.d.ts +19 -1
- package/types/series/interface/tooltip-helper.d.ts +8 -5
- package/types/series/interface/type.d.ts +6 -2
- package/types/series/line/interface.d.ts +3 -2
- package/types/series/map/geo-source.d.ts +4 -2
- package/types/series/map/interface.d.ts +3 -5
- package/types/series/map/tooltip-helper.d.ts +1 -1
- package/types/series/mixin/line-mixin.d.ts +1 -0
- package/types/series/pie/3d/pie-3d.d.ts +1 -1
- package/types/series/pie/interface.d.ts +5 -4
- package/types/series/pie/pie-transformer.d.ts +1 -0
- package/types/series/pie/pie.d.ts +2 -4
- package/types/series/polar/interface.d.ts +2 -2
- package/types/series/polar/polar.d.ts +3 -3
- package/types/series/polar/progress-like/progress-like.d.ts +0 -1
- package/types/series/progress/circular/circular-transformer.d.ts +5 -0
- package/types/series/progress/circular/circular.d.ts +3 -0
- package/types/series/progress/circular/interface.d.ts +5 -5
- package/types/series/radar/interface.d.ts +2 -1
- package/types/series/range-area/range-area.d.ts +2 -2
- package/types/series/range-column/interface.d.ts +5 -5
- package/types/series/range-column/range-column-transformer.d.ts +1 -0
- package/types/series/range-column/range-column.d.ts +0 -1
- package/types/series/rose/interface.d.ts +2 -1
- package/types/series/rose/rose-transformer.d.ts +1 -0
- package/types/series/rose/rose.d.ts +0 -1
- package/types/series/sankey/interface.d.ts +7 -2
- package/types/series/sankey/sankey.d.ts +13 -4
- package/types/series/scatter/interface.d.ts +2 -1
- package/types/series/sunburst/sunburst.d.ts +1 -1
- package/types/series/sunburst/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +3 -2
- package/types/series/treemap/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +3 -0
- package/types/series/venn/animation.d.ts +6 -0
- package/types/series/venn/constant.d.ts +2 -0
- package/types/series/venn/interface.d.ts +21 -0
- package/types/series/venn/tooltip-helper.d.ts +5 -0
- package/types/series/venn/util.d.ts +1 -0
- package/types/series/venn/venn-transform.d.ts +6 -0
- package/types/series/venn/venn.d.ts +63 -0
- package/types/series/waterfall/interface.d.ts +6 -1
- package/types/series/waterfall/waterfall-transformer.d.ts +1 -0
- package/types/series/waterfall/waterfall.d.ts +9 -1
- package/types/series/word-cloud/base.d.ts +2 -0
- package/types/series/word-cloud/interface.d.ts +2 -6
- package/types/theme/builtin/common/series/venn.d.ts +2 -0
- package/types/theme/index.d.ts +1 -0
- package/types/theme/interface.d.ts +3 -19
- package/types/theme/theme-manager.d.ts +1 -1
- package/types/theme/token/builtin/default.d.ts +2 -0
- package/types/theme/token/builtin/index.d.ts +2 -0
- package/types/theme/token/builtin/interface.d.ts +17 -0
- package/types/theme/token/index.d.ts +3 -0
- package/types/theme/token/interface.d.ts +6 -0
- package/types/theme/token/util.d.ts +3 -0
- package/types/typings/spec/chart.d.ts +2 -0
- package/types/typings/spec/common.d.ts +41 -26
- package/types/typings/spec/index.d.ts +1 -1
- package/types/typings/tooltip/handler.d.ts +1 -1
- package/types/typings/tooltip/line.d.ts +9 -2
- package/types/typings/tooltip/position.d.ts +18 -24
- package/types/typings/tooltip/shape.d.ts +2 -2
- package/types/typings/tooltip/tooltip.d.ts +13 -8
- package/types/typings/visual.d.ts +15 -11
- package/types/util/data.d.ts +22 -4
- package/types/util/hierarchy.d.ts +2 -0
- package/types/util/index.d.ts +2 -2
- package/types/util/math.d.ts +4 -5
- package/types/util/space.d.ts +1 -1
- package/types/util/spec/common.d.ts +0 -2
- package/types/util/spec/index.d.ts +0 -5
- package/types/util/theme/common.d.ts +2 -0
- package/types/util/theme/index.d.ts +3 -0
- package/types/util/theme/merge-theme.d.ts +6 -0
- package/types/util/theme/preprocess.d.ts +4 -0
|
@@ -53,6 +53,7 @@ export declare const registerScaleInOutAnimation: () => void;
|
|
|
53
53
|
export declare const registerFadeInOutAnimation: () => void;
|
|
54
54
|
export declare const registerCartesianGroupClipAnimation: () => void;
|
|
55
55
|
export declare const registerLineAnimation: () => void;
|
|
56
|
+
export declare const registerAreaAnimation: () => void;
|
|
56
57
|
export declare const registerVGrammarCommonAnimation: () => void;
|
|
57
58
|
export declare const registerVGrammarRectAnimation: () => void;
|
|
58
59
|
export declare const registerVGrammarArcAnimation: () => void;
|
|
@@ -4,15 +4,15 @@ import type { IStateAnimateSpec, IAnimationSpec } from './spec';
|
|
|
4
4
|
import type { SeriesMarkNameEnum } from '../series/interface/type';
|
|
5
5
|
import type { ISeries } from '../series';
|
|
6
6
|
import type { ISeriesSpec } from '../typings';
|
|
7
|
-
import type {
|
|
7
|
+
import type { IModelMarkAttributeContext } from '../compile/mark';
|
|
8
8
|
export declare const AnimationStates: string[];
|
|
9
9
|
export declare function animationConfig<Preset extends string>(defaultConfig?: MarkAnimationSpec, userConfig?: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, params?: {
|
|
10
|
-
dataIndex: (datum: any) => number;
|
|
10
|
+
dataIndex: (datum: any, params: any) => number;
|
|
11
11
|
dataCount: () => number;
|
|
12
12
|
}): MarkAnimationSpec;
|
|
13
|
-
export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx:
|
|
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" | "appear" | "enter" | "exit" | "disappear" | "update", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
14
14
|
export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
|
|
15
15
|
export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
|
|
16
16
|
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:
|
|
17
|
+
export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "appear" | "enter" | "exit" | "disappear" | "update", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
|
|
18
18
|
export declare function isAnimationEnabledForSeries(series: ISeries): boolean;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class AreaChart<T extends IAreaChartSpec = IAreaChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof AreaChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof AreaChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -5,7 +5,6 @@ import { Bar3dChartSpecTransformer } from './bar-3d-transformer';
|
|
|
5
5
|
export declare class Bar3dChart<T extends IBar3dChartSpec = IBar3dChartSpec> extends BarChart<AdaptiveSpec<T, 'type' | 'series'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof Bar3dChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof Bar3dChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -3,4 +3,5 @@ import type { IBarChartSpec } from './interface';
|
|
|
3
3
|
export declare class BarChartSpecTransformer<T extends IBarChartSpec = IBarChartSpec> extends CartesianChartSpecTransformer<T> {
|
|
4
4
|
protected _getDefaultSeriesSpec(spec: T): any;
|
|
5
5
|
transformSpec(spec: T): void;
|
|
6
|
+
protected _transformAxisSpec(spec: T): void;
|
|
6
7
|
}
|
package/types/chart/bar/bar.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class BarChart<T extends IBarChartSpec = IBarChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof BarChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof BarChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,6 +4,9 @@ import type { ICartesianChartSpec } from '../cartesian/interface';
|
|
|
4
4
|
export interface IBarChartSpec extends ICartesianChartSpec, IChartExtendsSeriesSpec<IBarSeriesSpec> {
|
|
5
5
|
type: 'bar';
|
|
6
6
|
series?: IBarSeriesSpec[];
|
|
7
|
+
autoBandSize?: boolean | {
|
|
8
|
+
extend: number;
|
|
9
|
+
};
|
|
7
10
|
}
|
|
8
11
|
export interface IBar3dChartSpec extends ICartesianChartSpec, IChartExtendsSeriesSpec<IBar3dSeriesSpec> {
|
|
9
12
|
type: 'bar3d';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { IChartSpec } from '../../typings';
|
|
1
|
+
import type { IChartSpec, ISeriesSpec } from '../../typings';
|
|
2
2
|
import type { IChartSpecInfo, IChartSpecTransformer, IChartSpecTransformerOption } from '../interface';
|
|
3
3
|
import type { IModelConstructor, IModelSpecInfo } from '../../model/interface';
|
|
4
4
|
import type { IRegionConstructor } from '../../region/interface';
|
|
5
5
|
import type { ISeriesConstructor } from '../../series';
|
|
6
6
|
import type { IComponentConstructor } from '../../component/interface/common';
|
|
7
|
+
import type { ICartesianBandAxisSpec } from '../..//component/axis/cartesian/interface';
|
|
7
8
|
export declare class BaseChartSpecTransformer<T extends IChartSpec> implements IChartSpecTransformer {
|
|
8
9
|
readonly type: string;
|
|
9
10
|
readonly seriesType: string;
|
|
@@ -19,4 +20,11 @@ export declare class BaseChartSpecTransformer<T extends IChartSpec> implements I
|
|
|
19
20
|
forEachSeriesInSpec<K>(chartSpec: T, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
|
|
20
21
|
forEachComponentInSpec<K>(chartSpec: T, callbackfn: (constructor: IComponentConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
|
|
21
22
|
transformSeriesSpec(spec: T): void;
|
|
23
|
+
protected _findBandAxisBySeries(seriesSpec: ISeriesSpec, seriesIndex: number, axesSpec: any): any;
|
|
24
|
+
protected _applyAxisBandSize(axis: ICartesianBandAxisSpec, extend: number, barWidthSpec: {
|
|
25
|
+
barMaxWidth: number | string;
|
|
26
|
+
barMinWidth: number | string;
|
|
27
|
+
barWidth: number | string;
|
|
28
|
+
barGapInGroup: number | string | (number | string)[];
|
|
29
|
+
}): void;
|
|
22
30
|
}
|
|
@@ -10,9 +10,9 @@ import type { IComponent, IComponentConstructor } from '../../component/interfac
|
|
|
10
10
|
import type { IMark } from '../../mark/interface';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
12
12
|
import type { DataView } from '@visactor/vdataset';
|
|
13
|
-
import type { DataSet } from '@visactor/vdataset
|
|
13
|
+
import type { DataSet } from '@visactor/vdataset';
|
|
14
14
|
import { Stack } from '../stack';
|
|
15
|
-
import type { IParserOptions } from '@visactor/vdataset
|
|
15
|
+
import type { IParserOptions } from '@visactor/vdataset';
|
|
16
16
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
17
17
|
import type { IRunningConfig as IMorphConfig, IView } from '@visactor/vgrammar-core';
|
|
18
18
|
import { CompilableBase } from '../../compile/compilable-base';
|
|
@@ -39,9 +39,10 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
39
39
|
protected _viewBox: IBoundsLike;
|
|
40
40
|
protected _layoutTag: boolean;
|
|
41
41
|
getLayoutTag(): boolean;
|
|
42
|
-
setLayoutTag(tag: boolean, morphConfig?: IMorphConfig,
|
|
42
|
+
setLayoutTag(tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean): boolean;
|
|
43
43
|
protected _modelOption: IModelOption;
|
|
44
44
|
protected _globalScale: IGlobalScale;
|
|
45
|
+
getGlobalScale(): IGlobalScale;
|
|
45
46
|
protected _idMap: Map<number, IModel | IMark>;
|
|
46
47
|
protected _event: IEvent;
|
|
47
48
|
getEvent(): IEvent;
|
|
@@ -120,13 +121,14 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
120
121
|
reCompile: boolean;
|
|
121
122
|
};
|
|
122
123
|
updateChartConfig(result: IUpdateSpecResult, oldSpec: IChartSpec): void;
|
|
123
|
-
updateDataSpec(
|
|
124
|
+
updateDataSpec(): void;
|
|
124
125
|
updateRegionSpec(result: IUpdateSpecResult): void;
|
|
125
126
|
updateComponentSpec(result: IUpdateSpecResult): void;
|
|
126
127
|
updateSeriesSpec(result: IUpdateSpecResult): void;
|
|
127
128
|
getCanvas(): HTMLCanvasElement;
|
|
128
129
|
private _updateLayoutRect;
|
|
129
130
|
setCurrentTheme(): void;
|
|
131
|
+
reInit(): void;
|
|
130
132
|
clear(): void;
|
|
131
133
|
compile(): void;
|
|
132
134
|
afterCompile(): void;
|
|
@@ -140,6 +142,9 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
140
142
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
141
143
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
142
144
|
setHovered(datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
145
|
+
clearState(state: string): void;
|
|
146
|
+
clearSelected(): void;
|
|
147
|
+
clearHovered(): void;
|
|
143
148
|
private _initEvent;
|
|
144
149
|
protected _enableMarkAnimation(states: string | string[]): void;
|
|
145
150
|
protected _disableMarkAnimation(states: string | string[]): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RegionSpec, IRegionSpecInfo } from '../../region/interface';
|
|
3
3
|
import type { IChartSpecInfo } from '../interface';
|
|
4
4
|
import type { ISeriesSpecInfo } from '../../series/interface';
|
|
5
5
|
import type { ISeriesSpec } from '../../typings';
|
|
6
|
-
export declare const getRelatedRegionInfo: (modelInfo: IModelSpecInfo, currentChartSpecInfo: IChartSpecInfo) => IRegionSpecInfo<
|
|
6
|
+
export declare const getRelatedRegionInfo: (modelInfo: IModelSpecInfo, currentChartSpecInfo: IChartSpecInfo) => Array<IRegionSpecInfo<RegionSpec>> | undefined;
|
|
7
7
|
export declare const getRelatedSeriesInfo: (modelInfo: IModelSpecInfo, currentChartSpecInfo: IChartSpecInfo) => Array<ISeriesSpecInfo<ISeriesSpec>> | undefined;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class BoxPlotChart<T extends IBoxPlotChartSpec = IBoxPlotChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof BoxPlotChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof BoxPlotChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { CirclePackingChartSpecTransformer } from './circle-packing-transformer'
|
|
|
4
4
|
export declare class CirclePackingChart<T extends ICirclePackingChartSpec = ICirclePackingChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof CirclePackingChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof CirclePackingChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -3,5 +3,6 @@ import { BaseChartSpecTransformer } from '../base';
|
|
|
3
3
|
import type { ICommonChartSpec } from './interface';
|
|
4
4
|
export declare class CommonChartSpecTransformer<T extends ICommonChartSpec = ICommonChartSpec> extends BaseChartSpecTransformer<AdaptiveSpec<T, 'series'>> {
|
|
5
5
|
protected _getDefaultSeriesSpec(spec: AdaptiveSpec<T, 'series'>): any;
|
|
6
|
+
protected _transformAxisSpec(spec: AdaptiveSpec<T, 'series'>): void;
|
|
6
7
|
transformSpec(spec: AdaptiveSpec<T, 'series'>): void;
|
|
7
8
|
}
|
|
@@ -4,7 +4,6 @@ import type { AdaptiveSpec } from '../../typings';
|
|
|
4
4
|
import { CommonChartSpecTransformer } from './common-transformer';
|
|
5
5
|
export declare class CommonChart<T extends ICommonChartSpec = ICommonChartSpec> extends BaseChart<AdaptiveSpec<T, 'series'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof CommonChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof CommonChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -36,6 +36,9 @@ export interface ICommonChartSpec extends Omit<IChartSpec, 'series'> {
|
|
|
36
36
|
axes?: ICartesianAxisSpec[] | IPolarAxisSpec[];
|
|
37
37
|
crosshair?: ICartesianCrosshairSpec | ICartesianCrosshairSpec[] | IPolarCrosshairSpec | IPolarCrosshairSpec[];
|
|
38
38
|
markLine?: IMarkLineSpec | IMarkLineSpec[];
|
|
39
|
-
markArea?: IMarkAreaSpec;
|
|
40
|
-
markPoint?: IMarkPointSpec;
|
|
39
|
+
markArea?: IMarkAreaSpec | IMarkAreaSpec[];
|
|
40
|
+
markPoint?: IMarkPointSpec | IMarkPointSpec[];
|
|
41
|
+
autoBandSize?: boolean | {
|
|
42
|
+
extend: number;
|
|
43
|
+
};
|
|
41
44
|
}
|
|
@@ -4,7 +4,6 @@ import { CorrelationChartSpecTransformer } from './correlation-transformer';
|
|
|
4
4
|
export declare class CorrelationChart<T extends ICorrelationChartSpec = ICorrelationChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof CorrelationChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof CorrelationChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -5,7 +5,6 @@ import { BaseChart } from '../../base';
|
|
|
5
5
|
export declare class Funnel3dChart<T extends IFunnel3dChartSpec = IFunnel3dChartSpec> extends BaseChart<AdaptiveSpec<T, 'type'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof FunnelChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof FunnelChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class FunnelChart<T extends IFunnelChartSpec = IFunnelChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof FunnelChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof FunnelChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -5,7 +5,6 @@ import { BaseChart } from '../base';
|
|
|
5
5
|
export declare class GaugeChart<T extends IGaugeChartSpec = IGaugeChartSpec> extends BaseChart<AdaptiveSpec<T, 'axes'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof GaugeChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof GaugeChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class HeatmapChart<T extends IHeatmapChartSpec = IHeatmapChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof HeatmapChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof HeatmapChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -5,7 +5,6 @@ import { HistogramChartSpecTransformer } from '../histogram-transformer';
|
|
|
5
5
|
export declare class Histogram3dChart<T extends IHistogram3dChartSpec> extends BaseHistogramChart<AdaptiveSpec<T, 'type'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof HistogramChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof HistogramChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { HistogramChartSpecTransformer } from './histogram-transformer';
|
|
|
4
4
|
export declare class HistogramChart<T extends IHistogramChartSpec = IHistogramChartSpec> extends BaseHistogramChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof HistogramChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof HistogramChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
package/types/chart/index.d.ts
CHANGED
|
@@ -51,10 +51,12 @@ import { CorrelationChart, registerCorrelationChart } from './correlation';
|
|
|
51
51
|
import type { ILiquidChartSpec } from './liquid';
|
|
52
52
|
import { LiquidChart, registerLiquidChart } from './liquid';
|
|
53
53
|
import type { IWordCloudChartSpec, IWordCloud3dChartSpec } from './word-cloud';
|
|
54
|
-
import { WordCloudChart, WordCloud3dChart, registerWordCloudChart, registerWordCloud3dChart } from './word-cloud';
|
|
54
|
+
import { WordCloudChart, WordCloud3dChart, registerWordCloudChart, registerWordCloudShapeChart, registerWordCloud3dChart } 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';
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export
|
|
58
|
+
import type { IVennChartSpec } from './venn';
|
|
59
|
+
import { VennChart, registerVennChart } from './venn';
|
|
60
|
+
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, WordCloudChart, WordCloud3dChart, TreemapChart, VennChart, BaseChart };
|
|
61
|
+
export { registerLineChart, registerAreaChart, registerBarChart, registerBar3dChart, registerBoxplotChart, registerCirclePackingChart, registerCircularProgressChart, registerCommonChart, registerFunnelChart, registerFunnel3dChart, registerGaugeChart, registerHeatmapChart, registerHistogramChart, registerHistogram3dChart, registerLinearProgressChart, registerMapChart, registerPie3dChart, registerPieChart, registerRadarChart, registerRangeAreaChart, registerRangeColumn3dChart, registerRangeColumnChart, registerRoseChart, registerSankeyChart, registerScatterChart, registerSequenceChart, registerSunburstChart, registerTreemapChart, registerWaterfallChart, registerWordCloud3dChart, registerWordCloudChart, registerCorrelationChart, registerLiquidChart, registerWordCloudShapeChart, registerVennChart };
|
|
62
|
+
export type { IAreaChartSpec, IBarChartSpec, IBar3dChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IFunnel3dChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, IHistogram3dChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, IPie3dChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeColumn3dChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloud3dChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, IVennChartSpec };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IEvent } from '../../event/interface';
|
|
2
2
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
3
|
import type { IView } from '@visactor/vgrammar-core';
|
|
4
|
-
import type { IParserOptions } from '@visactor/vdataset
|
|
4
|
+
import type { IParserOptions } from '@visactor/vdataset';
|
|
5
5
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
6
6
|
import type { IMark } from '../../mark/interface';
|
|
7
7
|
import type { IModel, IModelConstructor, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
@@ -12,6 +12,8 @@ import type { IBoundsLike, IPadding } from '@visactor/vutils';
|
|
|
12
12
|
import type { ICompilable } from '../../compile/interface';
|
|
13
13
|
import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber, IShowTooltipOption, IDataValues, ILayoutRect, IData } from '../../typings';
|
|
14
14
|
import type { DataView } from '@visactor/vdataset';
|
|
15
|
+
import type { IGlobalScale } from '../../scale/interface';
|
|
16
|
+
import type { IMorphConfig } from '../../animation/spec';
|
|
15
17
|
export type DimensionIndexOption = {
|
|
16
18
|
filter?: (cmp: IComponent) => boolean;
|
|
17
19
|
tooltip?: boolean;
|
|
@@ -33,12 +35,14 @@ export interface IChart extends ICompilable {
|
|
|
33
35
|
reDataFlow: () => void;
|
|
34
36
|
setCanvasRect: (width: number, height: number) => void;
|
|
35
37
|
getCanvasRect: () => ILayoutRect;
|
|
38
|
+
getViewRect: () => ILayoutRect;
|
|
36
39
|
getOption: () => IChartOption;
|
|
37
40
|
getEvent: () => IEvent;
|
|
41
|
+
getGlobalScale: () => IGlobalScale;
|
|
38
42
|
setLayout: (layout: LayoutCallBack) => void;
|
|
39
43
|
layout: (context: ILayoutParams) => void;
|
|
40
44
|
getLayoutTag: () => boolean;
|
|
41
|
-
setLayoutTag: (tag: boolean) => boolean;
|
|
45
|
+
setLayoutTag: (tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean) => boolean;
|
|
42
46
|
updateData: (id: StringOrNumber, data: unknown, updateGlobalScale?: boolean, options?: IParserOptions) => void;
|
|
43
47
|
updateFullData: (data: IDataValues | IDataValues[]) => void;
|
|
44
48
|
updateGlobalScaleDomain: () => void;
|
|
@@ -50,6 +54,7 @@ export interface IChart extends ICompilable {
|
|
|
50
54
|
onRender: (ctx: IChartRenderOption) => void;
|
|
51
55
|
onResize: (width: number, height: number, reRender: boolean) => void;
|
|
52
56
|
onLayout: (view: IView) => void;
|
|
57
|
+
reInit: () => void;
|
|
53
58
|
getAllSeries: () => ISeries[];
|
|
54
59
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
55
60
|
getRegionsInIds: (ids: number[]) => IRegion[];
|
|
@@ -78,6 +83,9 @@ export interface IChart extends ICompilable {
|
|
|
78
83
|
updateState: (state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean) => void;
|
|
79
84
|
setSelected: (datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
80
85
|
setHovered: (datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
86
|
+
clearState: (state: string) => void;
|
|
87
|
+
clearSelected: () => void;
|
|
88
|
+
clearHovered: () => void;
|
|
81
89
|
updateViewBox: (viewBox: IBoundsLike, reLayout: boolean) => void;
|
|
82
90
|
getCanvas: () => HTMLCanvasElement | undefined;
|
|
83
91
|
setCurrentTheme: () => void;
|
|
@@ -99,7 +107,6 @@ export interface IChartConstructor {
|
|
|
99
107
|
readonly type: string;
|
|
100
108
|
readonly seriesType?: string;
|
|
101
109
|
readonly series?: string | string[];
|
|
102
|
-
readonly view: string;
|
|
103
110
|
readonly transformerConstructor: new (option: IChartSpecTransformerOption) => IChartSpecTransformer;
|
|
104
111
|
new (spec: any, options: IChartOption): IChart;
|
|
105
112
|
}
|
|
@@ -3,7 +3,6 @@ import type { IRenderOption } from '../../compile/interface';
|
|
|
3
3
|
import type { IModelOption, IModelSpecInfo } from '../../model/interface';
|
|
4
4
|
import type { IView } from '@visactor/vgrammar-core';
|
|
5
5
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
6
|
-
import type { ITheme } from '../../theme';
|
|
7
6
|
import type { ISeriesSpecInfo } from '../../series';
|
|
8
7
|
import type { IRegionSpecInfo } from '../../region';
|
|
9
8
|
export interface ILayoutParams {
|
|
@@ -22,11 +21,8 @@ export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'g
|
|
|
22
21
|
layout?: LayoutCallBack;
|
|
23
22
|
disableTriggerEvent?: boolean;
|
|
24
23
|
}
|
|
25
|
-
export interface IChartSpecTransformerOption {
|
|
26
|
-
type: string;
|
|
24
|
+
export interface IChartSpecTransformerOption extends Partial<IChartOption> {
|
|
27
25
|
seriesType?: string;
|
|
28
|
-
animation?: boolean;
|
|
29
|
-
getTheme: () => ITheme;
|
|
30
26
|
}
|
|
31
27
|
export interface IChartSpecInfo {
|
|
32
28
|
region?: IRegionSpecInfo[];
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class LineChart<T extends ILineChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof LineChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof LineChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { LiquidChartSpecTransformer } from './liquid-transformer';
|
|
|
4
4
|
export declare class LiquidChart<T extends ILiquidChartSpec = ILiquidChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof LiquidChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof LiquidChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
package/types/chart/map/map.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { MapChartSpecTransformer } from './map-transformer';
|
|
|
4
4
|
export declare class MapChart<T extends IMapChartSpec = IMapChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof MapChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof MapChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -8,7 +8,6 @@ export declare class Pie3dChartSpecTransformer<T extends IPie3dChartSpec = IPie3
|
|
|
8
8
|
export declare class Pie3dChart<T extends IPie3dChartSpec = IPie3dChartSpec> extends BasePieChart<AdaptiveSpec<T, 'type'>> {
|
|
9
9
|
static readonly type: string;
|
|
10
10
|
static readonly seriesType: string;
|
|
11
|
-
static readonly view: string;
|
|
12
11
|
static readonly transformerConstructor: typeof Pie3dChartSpecTransformer;
|
|
13
12
|
readonly transformerConstructor: typeof Pie3dChartSpecTransformer;
|
|
14
13
|
readonly type: string;
|
package/types/chart/pie/pie.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { BasePieChartSpecTransformer } from './base';
|
|
|
4
4
|
export declare class PieChart<T extends IPieChartSpec = IPieChartSpec> extends BasePieChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof BasePieChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof BasePieChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IPolarAxisSpec } from '../../component/axis/polar/interface';
|
|
2
2
|
import type { IPolarCrosshairSpec } from '../../component/crosshair/interface';
|
|
3
|
-
import type { IChartSpec } from '../../typings';
|
|
3
|
+
import type { IChartSpec, ILayoutRect, IPoint } from '../../typings';
|
|
4
4
|
export interface IPolarChartSpec extends IChartSpec {
|
|
5
5
|
axes?: IPolarAxisSpec[];
|
|
6
6
|
crosshair?: IPolarCrosshairSpec | IPolarCrosshairSpec[];
|
|
7
|
+
layoutRadius?: 'auto' | number | ((layoutRect: ILayoutRect, center: IPoint) => number);
|
|
7
8
|
}
|
|
@@ -5,7 +5,6 @@ import { BaseChart } from '../../base';
|
|
|
5
5
|
export declare class CircularProgressChart<T extends ICircularProgressChartSpec = ICircularProgressChartSpec> extends BaseChart<AdaptiveSpec<T, 'axes'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof CircularProgressChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof CircularProgressChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../../base';
|
|
|
4
4
|
export declare class LinearProgressChart<T extends ILinearProgressChartSpec = ILinearProgressChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof LinearProgressChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof LinearProgressChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class RadarChart<T extends IRoseChartSpec = IRoseChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof RadarChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof RadarChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class RangeAreaChart<T extends IRangeAreaChartSpec = IRangeAreaChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof RangeAreaChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof RangeAreaChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../../base';
|
|
|
4
4
|
export declare class RangeColumn3dChart<T extends IRangeColumn3dChartSpec = IRangeColumn3dChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof RangeColumn3dChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof RangeColumn3dChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class RangeColumnChart<T extends IRangeColumnChartSpec = IRangeColumnChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof RangeColumnChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof RangeColumnChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class RoseChart<T extends IRoseChartSpec = IRoseChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof RoseChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof RoseChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { BaseChart } from '../base/base-chart';
|
|
2
2
|
import type { ISankeyChartSpec } from './interface';
|
|
3
3
|
import { SankeyChartSpecTransformer } from './sankey-transformer';
|
|
4
|
+
import type { Datum, MaybeArray } from '../../typings/common';
|
|
5
|
+
import type { ISeries } from '../../series/interface';
|
|
6
|
+
import type { IMark } from '../../mark/interface/common';
|
|
7
|
+
import type { IRegionQuerier } from '../../typings/params';
|
|
4
8
|
export declare class SankeyChart<T extends ISankeyChartSpec = ISankeyChartSpec> extends BaseChart<T> {
|
|
5
9
|
static readonly type: string;
|
|
6
10
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
11
|
static readonly transformerConstructor: typeof SankeyChartSpecTransformer;
|
|
9
12
|
readonly transformerConstructor: typeof SankeyChartSpecTransformer;
|
|
10
13
|
readonly type: string;
|
|
11
14
|
readonly seriesType: string;
|
|
15
|
+
protected _setStateInDatum(stateKey: string, checkReverse: boolean, datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
12
16
|
}
|
|
13
17
|
export declare const registerSankeyChart: () => void;
|
|
@@ -4,7 +4,6 @@ import { BaseChart } from '../base';
|
|
|
4
4
|
export declare class ScatterChart<T extends IScatterChartSpec = IScatterChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof ScatterChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof ScatterChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -3,7 +3,7 @@ import type { ICartesianAxisSpec } from '../../component/axis/cartesian/interfac
|
|
|
3
3
|
import type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';
|
|
4
4
|
import type { ICartesianCrosshairSpec } from '../../component/crosshair/interface';
|
|
5
5
|
import type { ILayoutSpec } from '../../layout/interface';
|
|
6
|
-
import type {
|
|
6
|
+
import type { RegionSpec } from '../../region/interface';
|
|
7
7
|
import type { IPadding } from '../../typings';
|
|
8
8
|
export interface ISequenceChartSpec extends IChartSpec {
|
|
9
9
|
type: 'sequence';
|
|
@@ -13,7 +13,7 @@ export interface ISequenceChartSpec extends IChartSpec {
|
|
|
13
13
|
scrollBars?: IScrollBarSpec[];
|
|
14
14
|
crosshair?: ICartesianCrosshairSpec | ICartesianCrosshairSpec[];
|
|
15
15
|
layout?: ILayoutSpec;
|
|
16
|
-
region?:
|
|
16
|
+
region?: RegionSpec[];
|
|
17
17
|
}
|
|
18
18
|
export interface ISequenceSeriesSpec extends ISeriesSpec {
|
|
19
19
|
height?: number;
|
|
@@ -5,7 +5,6 @@ import type { IModelSpecInfo } from '../../model/interface';
|
|
|
5
5
|
import { SequenceChartSpecTransformer } from './sequence-transformer';
|
|
6
6
|
export declare class SequenceChart<T extends ISequenceChartSpec = ISequenceChartSpec> extends BaseChart<T> {
|
|
7
7
|
static readonly type: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof SequenceChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof SequenceChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { SunburstChartSpecTransformer } from './sunburst-transformer';
|
|
|
4
4
|
export declare class SunburstChart<T extends ISunburstChartSpec = ISunburstChartSpec> extends BaseChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof SunburstChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof SunburstChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -5,7 +5,6 @@ import { TreemapChartSpecTransformer } from './treemap-transformer';
|
|
|
5
5
|
export declare class TreemapChart<T extends ITreemapChartSpec = ITreemapChartSpec> extends BaseChart<AdaptiveSpec<T, 'data' | 'series'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof TreemapChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof TreemapChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|