@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
|
@@ -3,15 +3,12 @@ import type { DataSet, DataView } from '@visactor/vdataset';
|
|
|
3
3
|
import type { IEvent, IEventDispatcher } from '../event/interface';
|
|
4
4
|
import type { IMark, IMarkRaw, IMarkStyle, MarkTypeEnum } from '../mark/interface';
|
|
5
5
|
import type { RenderMode } from '../typings/spec/common';
|
|
6
|
-
import type { IData } from '@visactor/vgrammar-core';
|
|
7
6
|
import type { StringOrNumber } from '../typings/common';
|
|
8
7
|
import type { IGroupMarkSpec, ConvertToMarkStyleSpec, ICommonSpec } from '../typings/visual';
|
|
9
8
|
import type { IRect } from '../typings/space';
|
|
10
9
|
import type { IPoint, CoordinateType } from '../typings/coordinate';
|
|
11
|
-
import type { ITheme } from '../theme/interface';
|
|
12
10
|
import type { StateValueType } from '../typings/spec';
|
|
13
11
|
import type { ICompilable, ICompilableInitOption } from '../compile/interface';
|
|
14
|
-
import type { ICompilableData } from '../compile/data/interface';
|
|
15
12
|
import type { IGlobalScale } from '../scale/interface';
|
|
16
13
|
import type { IChart, IChartSpecInfo, IChartSpecTransformerOption } from '../chart/interface';
|
|
17
14
|
import type { IThemeColorScheme } from '../theme/color-scheme/interface';
|
|
@@ -22,6 +19,9 @@ import type { SeriesTypeEnum } from '../series/interface';
|
|
|
22
19
|
import type { ITooltipSpec } from '../component/tooltip/interface';
|
|
23
20
|
import type { TooltipActiveType } from '../typings';
|
|
24
21
|
import type { IVChart } from '../core/interface';
|
|
22
|
+
import type { ICompilableData } from '../compile/data/interface';
|
|
23
|
+
import type { IDimensionData, IDimensionInfo } from '../event/events/dimension/interface';
|
|
24
|
+
import type { IAxis } from '../component/axis';
|
|
25
25
|
export interface IModelInitOption {
|
|
26
26
|
}
|
|
27
27
|
export interface IModelLayoutOption {
|
|
@@ -53,9 +53,6 @@ export interface IUpdateSpecResult {
|
|
|
53
53
|
export interface IUpdateDataResult {
|
|
54
54
|
reAnimate?: boolean;
|
|
55
55
|
}
|
|
56
|
-
export interface IModelProduct {
|
|
57
|
-
srData: IData;
|
|
58
|
-
}
|
|
59
56
|
export interface IModel extends ICompilable {
|
|
60
57
|
readonly modelType: string;
|
|
61
58
|
readonly type: string;
|
|
@@ -84,11 +81,11 @@ export interface IModel extends ICompilable {
|
|
|
84
81
|
getSpec?: () => any;
|
|
85
82
|
getSpecIndex: () => number;
|
|
86
83
|
getSpecPath: () => Array<string | number>;
|
|
87
|
-
onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect
|
|
88
|
-
onLayoutEnd: (
|
|
84
|
+
onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect) => void;
|
|
85
|
+
onLayoutEnd: () => void;
|
|
89
86
|
getColorScheme: () => IThemeColorScheme | undefined;
|
|
90
87
|
setMarkStyle: <T extends ICommonSpec>(mark?: IMarkRaw<T>, style?: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>, state?: StateValueType, level?: number) => void;
|
|
91
|
-
initMarkStyleWithSpec: (mark?: IMark, spec?: any
|
|
88
|
+
initMarkStyleWithSpec: (mark?: IMark, spec?: any) => void;
|
|
92
89
|
getSpecInfo: () => IModelSpecInfo;
|
|
93
90
|
}
|
|
94
91
|
export interface ILayoutModel extends IModel {
|
|
@@ -111,7 +108,7 @@ export interface IModelOption extends ICompilableInitOption {
|
|
|
111
108
|
specKey?: string;
|
|
112
109
|
specPath?: Array<string | number>;
|
|
113
110
|
specInfoPath?: Array<string | number>;
|
|
114
|
-
getTheme?: () =>
|
|
111
|
+
getTheme?: (...keys: string[]) => any;
|
|
115
112
|
getSpecInfo?: () => IChartSpecInfo;
|
|
116
113
|
getChartLayoutRect: () => IRect;
|
|
117
114
|
getChartViewRect: () => ILayoutRect;
|
|
@@ -121,6 +118,9 @@ export interface IModelOption extends ICompilableInitOption {
|
|
|
121
118
|
animation: boolean;
|
|
122
119
|
onError: (...args: any[]) => void;
|
|
123
120
|
disableTriggerEvent?: boolean;
|
|
121
|
+
getDimensionInfo?: (chart: IChart | undefined, pos: ILayoutPoint, isTooltip?: boolean) => IDimensionInfo[] | null;
|
|
122
|
+
getDimensionInfoByValue?: (axis: IAxis, value: any) => IDimensionInfo | null;
|
|
123
|
+
getRectByDimensionData?: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => any;
|
|
124
124
|
}
|
|
125
125
|
export interface IModelSpecInfo<T extends Record<string, unknown> = any> {
|
|
126
126
|
type: string | ComponentTypeEnum | SeriesTypeEnum;
|
|
@@ -132,6 +132,7 @@ export interface IModelSpecInfo<T extends Record<string, unknown> = any> {
|
|
|
132
132
|
seriesIndexes?: number[];
|
|
133
133
|
}
|
|
134
134
|
export interface IModelConstructor {
|
|
135
|
+
readonly builtInTheme?: any;
|
|
135
136
|
readonly transformerConstructor: new (option: IBaseModelSpecTransformerOption) => IBaseModelSpecTransformer;
|
|
136
137
|
}
|
|
137
138
|
export type ILayoutModelState = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
2
|
import type { ILayoutItem } from '../layout/interface';
|
|
3
|
-
import type { IOrientType, IPolarOrientType, IRect } from '../typings/space';
|
|
3
|
+
import type { IOrientType, IPadding, IPolarOrientType, IRect } from '../typings/space';
|
|
4
4
|
import { BaseModel } from './base-model';
|
|
5
5
|
import type { IModelSpec } from './interface';
|
|
6
6
|
import type { IPoint } from '../typings/coordinate';
|
|
@@ -19,8 +19,8 @@ export declare abstract class LayoutModel<T extends IModelSpec> extends BaseMode
|
|
|
19
19
|
protected _layoutStartPos: IPoint;
|
|
20
20
|
protected _isLayout: boolean;
|
|
21
21
|
initLayout(): void;
|
|
22
|
-
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect
|
|
23
|
-
onLayoutEnd(
|
|
22
|
+
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
23
|
+
onLayoutEnd(): void;
|
|
24
24
|
afterSetLayoutStartPoint(_pos: ILayoutPoint): void;
|
|
25
25
|
protected _forceLayout(): void;
|
|
26
26
|
getLayoutStartPoint(): IPoint;
|
|
@@ -38,4 +38,5 @@ export declare abstract class LayoutModel<T extends IModelSpec> extends BaseMode
|
|
|
38
38
|
abstract getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike;
|
|
39
39
|
protected _transformLayoutRect: (rect: ILayoutRect) => ILayoutRect;
|
|
40
40
|
protected _transformLayoutPosition: (rect: Partial<IPoint>) => Partial<IPoint>;
|
|
41
|
+
protected _transformLayoutPadding: (padding: IPadding) => IPadding;
|
|
41
42
|
}
|
|
@@ -19,7 +19,7 @@ export declare abstract class BaseTooltipHandler extends BasePlugin implements I
|
|
|
19
19
|
protected _option: ITooltipHandlerOptions;
|
|
20
20
|
protected _chartOption: IChartOption;
|
|
21
21
|
protected _env: RenderMode;
|
|
22
|
-
get env(): "
|
|
22
|
+
get env(): "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
|
|
23
23
|
protected _component: Tooltip;
|
|
24
24
|
protected _chartContainer: Maybe<HTMLElement>;
|
|
25
25
|
protected _compiler: ICompiler;
|
|
@@ -37,7 +37,7 @@ export declare abstract class BaseTooltipHandler extends BasePlugin implements I
|
|
|
37
37
|
protected _getDefaultOption(): ITooltipHandlerOptions;
|
|
38
38
|
protected _getActualTooltipPosition: (actualTooltip: ITooltipActual, params: TooltipHandlerParams, tooltipBoxSize: IContainerSize | undefined) => ITooltipPositionActual;
|
|
39
39
|
protected _getParentElement(spec: ITooltipSpec): HTMLElement;
|
|
40
|
-
getTooltipContainer():
|
|
40
|
+
getTooltipContainer(): IGroup | HTMLElement;
|
|
41
41
|
protected _initFromSpec(): void;
|
|
42
42
|
reInit(): void;
|
|
43
43
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TooltipPanelAttrs, TooltipRichTextAttrs } from '@visactor/vrender-components';
|
|
2
2
|
import type { ITooltipActual, MaybeArray } from '../../../../typings';
|
|
3
3
|
import type { ITooltipAttributes, ITooltipTextStyle } from '../interface';
|
|
4
|
-
import type { ITheme } from '../../../../theme';
|
|
5
4
|
import type { ITooltipSpec, ITooltipTextTheme, ITooltipTheme } from '../../../../component/tooltip';
|
|
6
5
|
interface ITooltipTextInfo {
|
|
7
6
|
width: number;
|
|
@@ -9,7 +8,7 @@ interface ITooltipTextInfo {
|
|
|
9
8
|
text: MaybeArray<number> | MaybeArray<string> | TooltipRichTextAttrs;
|
|
10
9
|
}
|
|
11
10
|
export declare const measureTooltipText: (text: string | TooltipRichTextAttrs, style: ITooltipTextStyle) => ITooltipTextInfo;
|
|
12
|
-
export declare function getTextAttributes(style?: ITooltipTextTheme,
|
|
11
|
+
export declare function getTextAttributes(style?: ITooltipTextTheme, globalFontFamily?: string, defaultAttributes?: Partial<ITooltipTextStyle>): ITooltipTextStyle;
|
|
13
12
|
export declare const getPanelAttributes: (style: ITooltipTheme['panel']) => TooltipPanelAttrs;
|
|
14
|
-
export declare const getTooltipAttributes: (actualTooltip: ITooltipActual, spec: ITooltipSpec,
|
|
13
|
+
export declare const getTooltipAttributes: (actualTooltip: ITooltipActual, spec: ITooltipSpec, globalFontFamily?: string) => ITooltipAttributes;
|
|
15
14
|
export {};
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import type { IDimensionData } from '../../../../event';
|
|
2
|
-
import { type ILayoutPoint } from '../../../../typings';
|
|
3
1
|
import type { IFixedTooltipPositionPattern, IGlobalTooltipPositionPattern, TooltipFixedPosition } from '../../../../typings/tooltip/position';
|
|
4
2
|
export declare const getActualTooltipPositionValue: (position: number | ((event: MouseEvent) => number), event: MouseEvent) => number;
|
|
5
|
-
export type TooltipPositionType = -2 | -1 | 0 | 1 | 2;
|
|
3
|
+
export type TooltipPositionType = -2 | -1.5 | -1 | 0 | 1 | 1.5 | 2;
|
|
6
4
|
export declare const positionType: Record<TooltipFixedPosition, [TooltipPositionType, TooltipPositionType]>;
|
|
7
5
|
export declare const getPositionType: (position: TooltipFixedPosition, dim: 'x' | 'y', defaultCase?: TooltipPositionType) => TooltipPositionType;
|
|
8
|
-
export declare const getCartesianCrosshairRect: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => {
|
|
9
|
-
visible: boolean;
|
|
10
|
-
start: {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
};
|
|
14
|
-
end: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
6
|
export declare const isGlobalTooltipPositionPattern: (obj: any) => obj is IGlobalTooltipPositionPattern;
|
|
20
7
|
export declare const isFixedTooltipPositionPattern: (obj: any) => obj is IFixedTooltipPositionPattern;
|
package/types/plugin/other.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { registerHtmlAttributePlugin, registerReactAttributePlugin } from '@visactor/vrender-core';
|
|
2
|
-
import { registerDragPlugin, registerGesturePlugin } from '@visactor/vgrammar-core';
|
|
3
|
-
export declare const register3DPlugin: () => void;
|
|
4
2
|
export declare const registerAnimate: () => void;
|
|
5
|
-
export
|
|
6
|
-
export declare const
|
|
3
|
+
export declare const registerDragPlugin: () => void;
|
|
4
|
+
export declare const registerGesturePlugin: () => void;
|
|
5
|
+
export { registerReactAttributePlugin, registerHtmlAttributePlugin };
|
|
@@ -2,15 +2,11 @@ import type { IMark, IGroupMark } from '../mark/interface';
|
|
|
2
2
|
import type { ILayoutModel, IModelConstructor, IModelOption, IModelSpecInfo } from '../model/interface';
|
|
3
3
|
import type { ISeries, SeriesType } from '../series/interface';
|
|
4
4
|
import type { CoordinateType } from '../typings/coordinate';
|
|
5
|
-
import type { IInteraction } from '../interaction/interface';
|
|
6
5
|
import type { IProjectionSpec } from '../component/geo/interface';
|
|
7
6
|
import type { ConvertToMarkStyleSpec, IRectMarkSpec } from '../typings/visual';
|
|
8
|
-
import type { IAnimate } from '../animation/interface';
|
|
9
7
|
import type { StringOrNumber } from '../typings';
|
|
10
8
|
import type { ILayoutItemSpec } from '../layout/interface';
|
|
11
9
|
export interface IRegion extends ILayoutModel {
|
|
12
|
-
animate?: IAnimate;
|
|
13
|
-
interaction: IInteraction;
|
|
14
10
|
getStackInverse: () => boolean;
|
|
15
11
|
getStackSort: () => boolean;
|
|
16
12
|
getMaxWidth: () => number | undefined;
|
package/types/region/region.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import type { IGroupMark as IVGrammarGroupMark } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { ISeries } from '../series/interface';
|
|
3
2
|
import type { IModelOption } from '../model/interface';
|
|
4
3
|
import type { CoordinateType } from '../typings/coordinate';
|
|
5
4
|
import type { IRegion, IRegionSpec, IRegionSpecInfo } from './interface';
|
|
6
|
-
import type { IInteraction, ITrigger } from '../interaction/interface';
|
|
7
|
-
import type { IAnimate } from '../animation/interface';
|
|
8
5
|
import type { ILayoutType, StringOrNumber } from '../typings';
|
|
9
6
|
import { LayoutModel } from '../model/layout-model';
|
|
10
7
|
import { RegionSpecTransformer } from './region-transformer';
|
|
11
8
|
import type { IGroupMark, IRectMark } from '../mark/interface/mark';
|
|
9
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
12
10
|
export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutModel<T> implements IRegion {
|
|
13
11
|
static type: string;
|
|
14
12
|
static readonly transformerConstructor: typeof RegionSpecTransformer;
|
|
@@ -20,8 +18,6 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
20
18
|
protected _series: ISeries[];
|
|
21
19
|
layoutType: ILayoutType;
|
|
22
20
|
layoutZIndex: number;
|
|
23
|
-
animate?: IAnimate;
|
|
24
|
-
interaction: IInteraction;
|
|
25
21
|
getSpecInfo: () => IRegionSpecInfo;
|
|
26
22
|
getMaxWidth(): number;
|
|
27
23
|
setMaxWidth(value: number): void;
|
|
@@ -35,7 +31,6 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
35
31
|
getStackSort(): boolean;
|
|
36
32
|
protected _backgroundMark?: IRectMark;
|
|
37
33
|
protected _foregroundMark?: IRectMark;
|
|
38
|
-
protected _trigger: ITrigger;
|
|
39
34
|
constructor(spec: T, ctx: IModelOption);
|
|
40
35
|
protected _getClipDefaultValue(): boolean;
|
|
41
36
|
created(): void;
|
|
@@ -73,10 +68,7 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
73
68
|
initSeriesDataflow(): void;
|
|
74
69
|
seriesDataFilterOver: () => void;
|
|
75
70
|
release(): void;
|
|
76
|
-
|
|
77
|
-
initTrigger(): void;
|
|
78
|
-
initInteraction(): void;
|
|
79
|
-
compileMarks(group?: string | IVGrammarGroupMark): void;
|
|
71
|
+
compileMarks(group?: IGroup): void;
|
|
80
72
|
compile(): void;
|
|
81
73
|
getBoundsInRect: () => {
|
|
82
74
|
x1: number;
|
|
@@ -84,5 +76,5 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
|
|
|
84
76
|
x2: number;
|
|
85
77
|
y2: number;
|
|
86
78
|
};
|
|
87
|
-
onLayoutEnd(
|
|
79
|
+
onLayoutEnd(): void;
|
|
88
80
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAnimationTypeConfig } from '
|
|
1
|
+
import type { IAnimationTypeConfig } from '../../animation/interface';
|
|
2
2
|
import type { AreaAppearPreset, IAreaAnimationParams } from './interface';
|
|
3
3
|
export declare function areaPresetAnimation(params: IAreaAnimationParams, preset: AreaAppearPreset | boolean): IAnimationTypeConfig;
|
|
4
4
|
export declare const registerAreaSeriesAnimation: () => void;
|
|
@@ -4,7 +4,7 @@ import { CartesianSeries } from '../cartesian/cartesian';
|
|
|
4
4
|
import type { Datum } from '../../typings';
|
|
5
5
|
import type { SeriesMarkMap } from '../interface';
|
|
6
6
|
import { SeriesTypeEnum } from '../interface/type';
|
|
7
|
-
import type { IAreaSeriesSpec } from './interface';
|
|
7
|
+
import type { IAreaSeriesSpec, IAreaSeriesTheme } from './interface';
|
|
8
8
|
import type { IMark, IAreaMark } from '../../mark/interface';
|
|
9
9
|
import { AreaSeriesSpecTransformer } from './area-transformer';
|
|
10
10
|
export interface AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends Pick<LineLikeSeriesMixin, 'initLineMark' | 'initSymbolMark' | 'initLabelMarkStyle' | 'initLineMarkStyle' | 'initSymbolMarkStyle' | 'encodeDefined' | '_lineMark' | '_symbolMark' | 'addSamplingCompile' | 'addOverlapCompile' | 'reCompileSampling' | 'initLineLabelMarkStyle'>, CartesianSeries<T> {
|
|
@@ -12,6 +12,7 @@ export interface AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends
|
|
|
12
12
|
export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends CartesianSeries<T> {
|
|
13
13
|
static readonly type: string;
|
|
14
14
|
type: SeriesTypeEnum;
|
|
15
|
+
static readonly builtInTheme: Record<string, IAreaSeriesTheme>;
|
|
15
16
|
static readonly mark: SeriesMarkMap;
|
|
16
17
|
static readonly transformerConstructor: any;
|
|
17
18
|
readonly transformerConstructor: typeof AreaSeriesSpecTransformer;
|
|
@@ -28,7 +29,7 @@ export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> ext
|
|
|
28
29
|
compile(): void;
|
|
29
30
|
getDefaultShapeType(): string;
|
|
30
31
|
getActiveMarks(): IMark[];
|
|
31
|
-
onLayoutEnd(
|
|
32
|
+
onLayoutEnd(): void;
|
|
32
33
|
getSeriesStyle(datum: Datum): (attribute: string) => any;
|
|
33
34
|
}
|
|
34
35
|
export declare const registerAreaSeries: () => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { BarAppearPreset, IBarAnimationParams } from './interface';
|
|
2
|
+
import type { IAnimationTypeConfig } from '../../animation/interface';
|
|
3
3
|
export declare const barGrowIn: (params: IBarAnimationParams, isOverall?: boolean) => IAnimationTypeConfig;
|
|
4
4
|
export declare const barGrowOut: (params: IBarAnimationParams, isOverall?: boolean) => IAnimationTypeConfig;
|
|
5
5
|
export declare function barPresetAnimation(params: IBarAnimationParams, preset: BarAppearPreset | boolean): IAnimationTypeConfig;
|
|
6
6
|
export declare const registerBarAnimation: () => void;
|
|
7
|
-
export declare const registerBar3dAnimation: () => void;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import type { IBaseScale } from '@visactor/vscale';
|
|
2
2
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
3
3
|
import type { IMark, IRectMark, ITextMark } from '../../mark/interface';
|
|
4
|
-
import { MarkTypeEnum } from '../../mark/interface/type';
|
|
5
4
|
import type { Datum, DirectionType } from '../../typings';
|
|
6
|
-
import type { IBarSeriesSpec } from './interface';
|
|
5
|
+
import type { IBarSeriesSpec, IBarSeriesTheme } from './interface';
|
|
7
6
|
import type { IAxisHelper } from '../../component/axis/cartesian/interface';
|
|
8
7
|
import type { IModelInitOption } from '../../model/interface';
|
|
9
8
|
import type { SeriesMarkMap } from '../interface';
|
|
10
|
-
import { SeriesMarkNameEnum
|
|
11
|
-
import { SeriesData } from '../base/series-data';
|
|
9
|
+
import { SeriesMarkNameEnum } from '../interface/type';
|
|
12
10
|
import { DataView } from '@visactor/vdataset';
|
|
13
11
|
import { BarSeriesSpecTransformer } from './bar-transformer';
|
|
12
|
+
import type { ICompilableData } from '../../compile/data';
|
|
14
13
|
export declare const DefaultBandWidth = 6;
|
|
15
14
|
export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extends CartesianSeries<T> {
|
|
16
15
|
static readonly type: string;
|
|
17
|
-
type:
|
|
18
|
-
protected _barMarkName:
|
|
19
|
-
protected _barMarkType:
|
|
16
|
+
type: string;
|
|
17
|
+
protected _barMarkName: string;
|
|
18
|
+
protected _barMarkType: string;
|
|
19
|
+
static readonly builtInTheme: Record<string, IBarSeriesTheme>;
|
|
20
20
|
static readonly mark: SeriesMarkMap;
|
|
21
21
|
static readonly transformerConstructor: any;
|
|
22
22
|
readonly transformerConstructor: typeof BarSeriesSpecTransformer;
|
|
23
23
|
protected _bandPosition: number;
|
|
24
24
|
protected _barMark: IRectMark;
|
|
25
25
|
protected _barBackgroundMark: IRectMark;
|
|
26
|
-
protected _barBackgroundViewData:
|
|
26
|
+
protected _barBackgroundViewData: ICompilableData;
|
|
27
27
|
initMark(): void;
|
|
28
28
|
protected _initBarBackgroundMark(): void;
|
|
29
29
|
initMarkStyle(): void;
|
|
@@ -61,7 +61,7 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
|
|
|
61
61
|
protected _getBarBackgroundPositionYEncoder: () => (datum: Datum) => number;
|
|
62
62
|
protected _setBarBackgroundPositionYEncoder: (encoder: (datum: Datum) => number) => void;
|
|
63
63
|
dataToBarBackgroundPositionY(datum: Datum, scaleDepth?: number): number;
|
|
64
|
-
onLayoutEnd(
|
|
64
|
+
onLayoutEnd(): void;
|
|
65
65
|
compile(): void;
|
|
66
66
|
getDefaultShapeType(): string;
|
|
67
67
|
getActiveMarks(): IMark[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ICartesianSeriesSpec, ICartesianSeriesTheme } from '../cartesian/interface';
|
|
2
2
|
import type { IMarkSpec, IMarkTheme } from '../../typings/spec/common';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IRectMarkSpec } from '../../typings/visual';
|
|
4
4
|
import type { IAnimationSpec } from '../../animation/spec';
|
|
5
5
|
import type { ILabelSpec, IMultiLabelSpec } from '../../component/label/interface';
|
|
6
6
|
import type { IDataSamping, IMarkProgressiveConfig } from '../../mark/interface';
|
|
@@ -44,10 +44,4 @@ export interface IBarSeriesTheme extends ICartesianSeriesTheme {
|
|
|
44
44
|
barMinWidth?: number;
|
|
45
45
|
barMaxWidth?: number;
|
|
46
46
|
}
|
|
47
|
-
export type IBar3dSeriesSpec = {
|
|
48
|
-
type: 'bar3d';
|
|
49
|
-
} & Omit<IBarSeriesSpec, 'type'> & ICartesianSeriesSpec & IAnimationSpec<BarMarks, BarAppearPreset>;
|
|
50
|
-
export interface IBar3dSeriesTheme extends ICartesianSeriesTheme {
|
|
51
|
-
[SeriesMarkNameEnum.bar3d]?: Partial<IMarkTheme<IRect3dMarkSpec>>;
|
|
52
|
-
}
|
|
53
47
|
export {};
|
|
@@ -15,7 +15,7 @@ export declare class BaseSeriesSpecTransformer<T extends ISeriesSpec, K> extends
|
|
|
15
15
|
transformSpec(spec: T, chartSpec: any, chartSpecInfo?: IChartSpecInfo): ISeriesSpecTransformerResult<T, K>;
|
|
16
16
|
protected _transformLabelSpec(spec: T): void;
|
|
17
17
|
protected _transformStack(spec: T): void;
|
|
18
|
-
protected _addMarkLabelSpec<V extends ISeries = ISeries>(spec: T, markName:
|
|
18
|
+
protected _addMarkLabelSpec<V extends ISeries = ISeries>(spec: T, markName: string | ((spec: ILabelSpec) => string), labelSpecKey?: keyof T, styleHandlerName?: keyof V, hasAnimation?: boolean, head?: boolean): void;
|
|
19
19
|
protected _getDefaultSpecFromChart(chartSpec: any): any;
|
|
20
20
|
protected _mergeThemeToSpec(spec: T, chartSpec: any): {
|
|
21
21
|
spec: T;
|
|
@@ -7,14 +7,15 @@ import { BaseModel } from '../../model/base-model';
|
|
|
7
7
|
import type { ISeriesOption, ISeries, ISeriesMarkInitOption, ISeriesStackData, ISeriesTooltipHelper, SeriesMarkMap, ISeriesMarkInfo, ISeriesSpecInfo, ISeriesStackDataLeaf, ISeriesStackDataMeta, ISeriesSeriesInfo } from '../interface';
|
|
8
8
|
import type { IModelEvaluateOption, IModelRenderOption, IUpdateSpecResult } from '../../model/interface';
|
|
9
9
|
import type { AddVChartPropertyContext } from '../../data/transforms/add-property';
|
|
10
|
-
import type {
|
|
11
|
-
import { SeriesData } from './series-data';
|
|
10
|
+
import type { IHoverSpec, ISelectSpec } from '../../interaction/interface/spec';
|
|
12
11
|
import type { ISeriesMarkAttributeContext } from '../../compile/mark';
|
|
13
12
|
import { STATE_VALUE_ENUM } from '../../compile/mark';
|
|
14
13
|
import { BaseSeriesSpecTransformer } from './base-series-transformer';
|
|
15
|
-
import type { EventType } from '@visactor/vgrammar-core';
|
|
16
14
|
import type { ILabelSpec } from '../../component/label/interface';
|
|
17
15
|
import type { StatisticOperations } from '../../data/transforms/interface';
|
|
16
|
+
import type { GraphicEventType } from '@visactor/vrender-core';
|
|
17
|
+
import type { ICompilableData } from '../../compile/data';
|
|
18
|
+
import type { IBaseTriggerOptions } from '../../interaction/interface/trigger';
|
|
18
19
|
export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel<T> implements ISeries {
|
|
19
20
|
readonly specKey: string;
|
|
20
21
|
readonly type: string;
|
|
@@ -49,7 +50,7 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
49
50
|
protected _viewDataMap: Map<number, DataView>;
|
|
50
51
|
protected _viewDataFilter: DataView;
|
|
51
52
|
getViewDataFilter(): DataView;
|
|
52
|
-
protected _data:
|
|
53
|
+
protected _data: ICompilableData;
|
|
53
54
|
getViewData(): DataView;
|
|
54
55
|
getViewDataProductId(): string;
|
|
55
56
|
protected _viewDataStatistics: DataView;
|
|
@@ -125,55 +126,37 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
125
126
|
private _getExtensionMarkNamePrefix;
|
|
126
127
|
protected _initExtensionMark(options: {
|
|
127
128
|
hasAnimation: boolean;
|
|
128
|
-
depend?: IMark[];
|
|
129
129
|
}): void;
|
|
130
130
|
private _createExtensionMark;
|
|
131
131
|
protected _updateExtensionMarkSpec(): void;
|
|
132
132
|
getStackData(): ISeriesStackData;
|
|
133
|
-
protected
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
type: string;
|
|
139
|
-
trigger: EventType;
|
|
140
|
-
triggerOff: EventType;
|
|
141
|
-
blurState: STATE_VALUE_ENUM;
|
|
142
|
-
highlightState: STATE_VALUE_ENUM;
|
|
143
|
-
} | {
|
|
144
|
-
type: string;
|
|
145
|
-
seriesId: number;
|
|
146
|
-
regionId: number;
|
|
147
|
-
selector: string[];
|
|
148
|
-
trigger: EventType;
|
|
149
|
-
triggerOff: EventType;
|
|
150
|
-
reverseState: STATE_VALUE_ENUM;
|
|
151
|
-
state: STATE_VALUE_ENUM;
|
|
152
|
-
isMultiple: boolean;
|
|
153
|
-
})[];
|
|
154
|
-
protected _defaultHoverConfig(selector: string[], finalHoverSpec: IHoverSpec): {
|
|
155
|
-
seriesId: number;
|
|
156
|
-
regionId: number;
|
|
157
|
-
selector: string[];
|
|
133
|
+
protected _parseDefaultInteractionConfig(mainMarks?: IMark[]): {
|
|
134
|
+
trigger: Partial<IBaseTriggerOptions>;
|
|
135
|
+
marks: IMark[];
|
|
136
|
+
}[];
|
|
137
|
+
protected _defaultHoverConfig(finalHoverSpec: IHoverSpec): {
|
|
158
138
|
type: string;
|
|
159
|
-
trigger:
|
|
160
|
-
triggerOff:
|
|
139
|
+
trigger: GraphicEventType;
|
|
140
|
+
triggerOff: GraphicEventType;
|
|
161
141
|
blurState: STATE_VALUE_ENUM;
|
|
162
142
|
highlightState: STATE_VALUE_ENUM;
|
|
163
143
|
};
|
|
164
|
-
protected _defaultSelectConfig(
|
|
144
|
+
protected _defaultSelectConfig(finalSelectSpec: ISelectSpec): {
|
|
165
145
|
type: string;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
selector: string[];
|
|
169
|
-
trigger: EventType;
|
|
170
|
-
triggerOff: EventType;
|
|
146
|
+
trigger: GraphicEventType;
|
|
147
|
+
triggerOff: GraphicEventType;
|
|
171
148
|
reverseState: STATE_VALUE_ENUM;
|
|
172
149
|
state: STATE_VALUE_ENUM;
|
|
173
150
|
isMultiple: boolean;
|
|
174
151
|
};
|
|
175
|
-
protected _parseInteractionConfig(mainMarks?: IMark[]):
|
|
176
|
-
|
|
152
|
+
protected _parseInteractionConfig(mainMarks?: IMark[]): {
|
|
153
|
+
trigger: Partial<IBaseTriggerOptions>;
|
|
154
|
+
marks: IMark[];
|
|
155
|
+
}[];
|
|
156
|
+
getInteractionTriggers(): {
|
|
157
|
+
trigger: Partial<IBaseTriggerOptions>;
|
|
158
|
+
marks: IMark[];
|
|
159
|
+
}[];
|
|
177
160
|
initAnimation(): void;
|
|
178
161
|
initMarkState(): void;
|
|
179
162
|
initSeriesStyleState(): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ISeriesTooltipSpec, ITooltipSpec, TooltipHandlerParams } from '../../component/tooltip/interface';
|
|
2
|
-
import type { ITooltipActual, ITooltipLineActual, ITooltipLinePattern, ITooltipPattern, MaybeArray, ShapeType, TooltipActiveType, TooltipContentProperty, TooltipData, TooltipPatternProperty } from '../../typings';
|
|
2
|
+
import type { Datum, ITooltipActual, ITooltipLineActual, ITooltipLinePattern, ITooltipPattern, MaybeArray, ShapeType, TooltipActiveType, TooltipContentProperty, TooltipData, TooltipPatternProperty } from '../../typings';
|
|
3
3
|
import type { ISeries, ISeriesTooltipHelper } from '../interface';
|
|
4
|
-
import type { Datum } from '@visactor/vgrammar-core';
|
|
5
4
|
import type { IMark } from '../../mark/interface/common';
|
|
6
5
|
interface ISeriesCacheInfo {
|
|
7
6
|
seriesFields: string[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { EasingType } from '@visactor/vrender-core';
|
|
2
|
+
import { ACustomAnimate } from '@visactor/vrender-animate';
|
|
3
|
+
export interface IBoxplotScaleAnimationOptions {
|
|
4
|
+
center?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class BoxplotScaleIn extends ACustomAnimate<Record<string, number>> {
|
|
7
|
+
constructor(from: null, to: null, duration: number, easing: EasingType, params?: IBoxplotScaleAnimationOptions);
|
|
8
|
+
onBind(): void;
|
|
9
|
+
computeAttribute(): {
|
|
10
|
+
from?: {
|
|
11
|
+
[channel: string]: any;
|
|
12
|
+
};
|
|
13
|
+
to?: {
|
|
14
|
+
[channel: string]: any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class BoxplotScaleOut extends ACustomAnimate<Record<string, number>> {
|
|
20
|
+
constructor(from: null, to: null, duration: number, easing: EasingType, params?: IBoxplotScaleAnimationOptions);
|
|
21
|
+
onBind(): void;
|
|
22
|
+
computeAttribute(): {
|
|
23
|
+
from?: {
|
|
24
|
+
[channel: string]: any;
|
|
25
|
+
};
|
|
26
|
+
to?: {
|
|
27
|
+
[channel: string]: any;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
31
|
+
}
|
|
32
|
+
export declare class BarBoxplotScaleIn extends BoxplotScaleIn {
|
|
33
|
+
computeAttribute(): {
|
|
34
|
+
from?: {
|
|
35
|
+
[channel: string]: any;
|
|
36
|
+
};
|
|
37
|
+
to?: {
|
|
38
|
+
[channel: string]: any;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export declare class BarBoxplotScaleOut extends BoxplotScaleOut {
|
|
43
|
+
computeAttribute(): {
|
|
44
|
+
from?: {
|
|
45
|
+
[channel: string]: any;
|
|
46
|
+
};
|
|
47
|
+
to?: {
|
|
48
|
+
[channel: string]: any;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export declare const registeBoxPlotScaleAnimation: () => void;
|
|
@@ -4,13 +4,16 @@ import { CartesianSeries } from '../cartesian/cartesian';
|
|
|
4
4
|
import type { SeriesMarkMap } from '../interface';
|
|
5
5
|
import { SeriesTypeEnum } from '../interface/type';
|
|
6
6
|
import type { IBoxPlotSeriesSpec } from './interface';
|
|
7
|
-
import { SeriesData } from '../base/series-data';
|
|
8
7
|
import type { IMark } from '../../mark/interface';
|
|
8
|
+
import type { ICompilableData } from '../../compile/data';
|
|
9
9
|
export declare const DEFAULT_FILL_COLOR = "#FFF";
|
|
10
10
|
export declare const DEFAULT_STROKE_COLOR = "#000";
|
|
11
11
|
export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeriesSpec> extends CartesianSeries<T> {
|
|
12
12
|
static readonly type: string;
|
|
13
13
|
type: SeriesTypeEnum;
|
|
14
|
+
static readonly builtInTheme: {
|
|
15
|
+
boxPlot: import("./interface").IBoxPlotSeriesTheme;
|
|
16
|
+
};
|
|
14
17
|
static readonly mark: SeriesMarkMap;
|
|
15
18
|
protected _minField: string;
|
|
16
19
|
getMinField(): string;
|
|
@@ -36,7 +39,7 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
36
39
|
protected _shaftFillOpacity: number;
|
|
37
40
|
protected _outliersStyle: IOutlierMarkSpec;
|
|
38
41
|
getOutliersStyle(): IOutlierMarkSpec;
|
|
39
|
-
protected _outlierDataView:
|
|
42
|
+
protected _outlierDataView: ICompilableData;
|
|
40
43
|
private _autoBoxWidth;
|
|
41
44
|
setAttrFromSpec(): void;
|
|
42
45
|
private _boxPlotMark?;
|
|
@@ -48,7 +51,7 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
48
51
|
compileData(): void;
|
|
49
52
|
init(option: IModelInitOption): void;
|
|
50
53
|
private _getMarkWidth;
|
|
51
|
-
onLayoutEnd(
|
|
54
|
+
onLayoutEnd(): void;
|
|
52
55
|
private _initAnimationSpec;
|
|
53
56
|
initAnimation(): void;
|
|
54
57
|
protected initTooltip(): void;
|
|
@@ -31,7 +31,7 @@ export declare abstract class CartesianSeries<T extends ICartesianSeriesSpec = I
|
|
|
31
31
|
protected _specXField: string[];
|
|
32
32
|
protected _specYField: string[];
|
|
33
33
|
protected _direction: DirectionType;
|
|
34
|
-
get direction(): "
|
|
34
|
+
get direction(): "horizontal" | "vertical";
|
|
35
35
|
protected _scaleX: IBaseScale;
|
|
36
36
|
get scaleX(): IBaseScale;
|
|
37
37
|
setScaleX(s: IBaseScale): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAnimationTypeConfig } from '
|
|
1
|
+
import type { IAnimationTypeConfig } from '../../animation/interface';
|
|
2
2
|
import type { CirclePackingAppearPreset } from './interface';
|
|
3
3
|
export declare const circlePackingPresetAnimation: (preset: CirclePackingAppearPreset) => IAnimationTypeConfig;
|
|
4
4
|
export declare const registerCirclePackingAnimation: () => void;
|
|
@@ -8,6 +8,9 @@ export declare class CirclePackingSeries<T extends ICirclePackingSeriesSpec = IC
|
|
|
8
8
|
static readonly type: string;
|
|
9
9
|
type: SeriesTypeEnum;
|
|
10
10
|
static readonly mark: SeriesMarkMap;
|
|
11
|
+
static readonly builtInTheme: {
|
|
12
|
+
circlePacking: import("./interface").ICirclePackingSeriesTheme;
|
|
13
|
+
};
|
|
11
14
|
protected _categoryField: string;
|
|
12
15
|
protected _valueField: string;
|
|
13
16
|
private _layoutPadding;
|
|
@@ -38,7 +41,7 @@ export declare class CirclePackingSeries<T extends ICirclePackingSeriesSpec = IC
|
|
|
38
41
|
protected initTooltip(): void;
|
|
39
42
|
initAnimation(): void;
|
|
40
43
|
initEvent(): void;
|
|
41
|
-
onLayoutEnd(
|
|
44
|
+
onLayoutEnd(): void;
|
|
42
45
|
protected _noAnimationDataKey(datum: Datum, index: number): unknown | undefined;
|
|
43
46
|
getActiveMarks(): IMark[];
|
|
44
47
|
getMarkData(datum: Datum): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { CorrelationAppearPreset, ICorrelationAnimationParams } from './interface';
|
|
2
|
+
import type { IAnimationTypeConfig } from '../../animation/interface';
|
|
3
3
|
export declare const correlationPresetAnimation: (_params: ICorrelationAnimationParams, preset: CorrelationAppearPreset) => IAnimationTypeConfig;
|
|
4
4
|
export declare const registerCorrelationAnimation: () => void;
|