@visactor/vchart-types 1.15.5-alpha.8 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/animate-manager.d.ts +0 -12
- package/types/animation/animation-planner.d.ts +13 -0
- package/types/animation/config.d.ts +5 -5
- package/types/animation/grammar-dector.d.ts +22 -0
- package/types/animation/index.d.ts +7 -0
- package/types/animation/interface.d.ts +98 -7
- package/types/animation/sequential-animate.d.ts +1 -0
- package/types/animation/spec.d.ts +27 -3
- package/types/animation/state-transition.d.ts +1 -0
- package/types/animation/strategy/common.d.ts +17 -0
- package/types/animation/strategy/horizontal-bar-split.d.ts +11 -0
- package/types/animation/strategy/vertical-bar-split.d.ts +11 -0
- package/types/animation/utils.d.ts +3 -4
- package/types/chart/area/area.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +1 -0
- package/types/chart/bar/index.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +1 -5
- package/types/chart/base/base-chart.d.ts +22 -9
- package/types/chart/box-plot/box-plot.d.ts +1 -0
- package/types/chart/common/common.d.ts +1 -0
- package/types/chart/common/interface.d.ts +5 -5
- package/types/chart/funnel/index.d.ts +0 -1
- package/types/chart/funnel/interface.d.ts +1 -4
- package/types/chart/funnel/util.d.ts +2 -0
- package/types/chart/histogram/histogram.d.ts +1 -0
- package/types/chart/histogram/index.d.ts +0 -1
- package/types/chart/histogram/interface.d.ts +1 -4
- package/types/chart/index.d.ts +19 -17
- package/types/chart/interface/chart.d.ts +14 -5
- package/types/chart/interface/common.d.ts +2 -9
- package/types/chart/interface/type.d.ts +1 -8
- package/types/chart/line/line.d.ts +1 -0
- package/types/chart/mosaic/mosaic.d.ts +1 -0
- package/types/chart/pictogram/interface.d.ts +1 -1
- package/types/chart/pie/index.d.ts +0 -1
- package/types/chart/pie/interface.d.ts +1 -5
- package/types/chart/progress/circular/circular.d.ts +1 -0
- package/types/chart/progress/linear/linear.d.ts +1 -0
- package/types/chart/radar/radar.d.ts +1 -0
- package/types/chart/range-area/range-area.d.ts +1 -0
- package/types/chart/range-column/index.d.ts +0 -1
- package/types/chart/range-column/interface.d.ts +1 -5
- package/types/chart/range-column/range-column.d.ts +1 -0
- package/types/chart/rose/rose.d.ts +1 -0
- package/types/chart/sankey/sankey.d.ts +1 -1
- package/types/chart/scatter/scatter.d.ts +1 -0
- package/types/chart/waterfall/waterfall.d.ts +1 -0
- package/types/chart/word-cloud/index.d.ts +0 -1
- package/types/chart/word-cloud/interface.d.ts +1 -5
- package/types/chart/word-cloud/word-cloud.d.ts +4 -8
- package/types/compile/compilable-base.d.ts +1 -1
- package/types/compile/compiler.d.ts +35 -25
- package/types/compile/data/compilable-data.d.ts +7 -7
- package/types/compile/data/interface.d.ts +4 -1
- package/types/compile/grammar-item.d.ts +7 -13
- package/types/compile/interface/compilable-item.d.ts +22 -28
- package/types/compile/interface/compiler.d.ts +14 -4
- package/types/compile/mark/compilable-mark.d.ts +1 -0
- package/types/compile/mark/index.d.ts +0 -1
- package/types/compile/mark/interface.d.ts +48 -34
- package/types/compile/mark/mark-state-manager.d.ts +12 -13
- package/types/compile/mark/util.d.ts +1 -1
- package/types/compile/morph.d.ts +3 -0
- package/types/compile/state-manager.d.ts +11 -0
- package/types/compile/util.d.ts +14 -0
- package/types/component/axis/base-axis.d.ts +10 -3
- package/types/component/axis/cartesian/axis.d.ts +7 -14
- package/types/component/axis/cartesian/band-axis.d.ts +6 -0
- package/types/component/axis/cartesian/linear-axis.d.ts +2 -1
- package/types/component/axis/cartesian/log-axis.d.ts +6 -0
- package/types/component/axis/cartesian/symlog-axis.d.ts +6 -0
- package/types/component/axis/cartesian/time-axis.d.ts +6 -0
- package/types/component/axis/cartesian/util/common.d.ts +3 -1
- package/types/component/axis/interface/common.d.ts +8 -0
- package/types/component/axis/interface/spec.d.ts +7 -2
- package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
- package/types/component/axis/polar/band-axis.d.ts +6 -0
- package/types/component/axis/polar/linear-axis.d.ts +6 -0
- package/types/component/axis/polar/util/common.d.ts +4 -1
- package/types/component/axis/util.d.ts +2 -6
- package/types/component/base/base-component.d.ts +1 -5
- package/types/component/base/util.d.ts +1 -2
- package/types/component/brush/brush.d.ts +35 -30
- package/types/component/brush/interface.d.ts +2 -0
- package/types/component/common/trigger/desktop.d.ts +0 -2
- package/types/component/common/trigger/interface.d.ts +0 -2
- package/types/component/common/trigger/mobile.d.ts +0 -2
- package/types/component/crosshair/base.d.ts +25 -36
- package/types/component/crosshair/cartesian.d.ts +9 -29
- package/types/component/crosshair/interface/common.d.ts +67 -2
- package/types/component/crosshair/interface/index.d.ts +0 -2
- package/types/component/crosshair/interface/spec.d.ts +8 -4
- package/types/component/crosshair/polar.d.ts +10 -23
- package/types/component/crosshair/utils/cartesian.d.ts +10 -21
- package/types/component/crosshair/utils/common.d.ts +2 -3
- package/types/component/crosshair/utils/polar.d.ts +18 -11
- package/types/component/custom-mark/custom-mark.d.ts +1 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/types/component/data-zoom/interface.d.ts +11 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +4 -2
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/geo/interface.d.ts +1 -1
- package/types/component/index.d.ts +14 -8
- package/types/component/indicator/indicator.d.ts +3 -0
- package/types/component/interface/common.d.ts +0 -2
- package/types/component/interface/theme.d.ts +1 -3
- package/types/component/interface/type.d.ts +0 -1
- package/types/component/label/base-label.d.ts +9 -4
- package/types/component/label/interface.d.ts +14 -8
- package/types/component/label/label.d.ts +5 -3
- package/types/component/label/total-label.d.ts +4 -1
- package/types/component/label/util.d.ts +9 -10
- package/types/component/legend/continuous/legend.d.ts +4 -0
- package/types/component/legend/discrete/legend.d.ts +3 -0
- package/types/component/legend/util.d.ts +2 -2
- package/types/component/marker/base-marker.d.ts +1 -1
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +3 -0
- package/types/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-area/polar-mark-area.d.ts +3 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +3 -0
- package/types/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-line/polar-mark-line.d.ts +3 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/interface/theme.d.ts +5 -2
- package/types/component/marker/mark-point/polar-mark-point.d.ts +3 -0
- package/types/component/marker/utils.d.ts +12 -0
- package/types/component/player/player.d.ts +3 -0
- package/types/component/title/title.d.ts +3 -0
- package/types/component/tooltip/constant.d.ts +6 -2
- package/types/component/tooltip/interface/common.d.ts +2 -1
- package/types/component/tooltip/processor/base.d.ts +4 -5
- package/types/component/tooltip/processor/dimension-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/group-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +12 -1
- package/types/component/tooltip/processor/mark-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +8 -5
- package/types/component/util.d.ts +1 -2
- package/types/constant/data.d.ts +1 -0
- package/types/constant/event.d.ts +55 -2
- package/types/core/factory.d.ts +31 -2
- package/types/core/index.d.ts +18 -2
- package/types/core/interface.d.ts +19 -5
- package/types/core/vchart.d.ts +8 -7
- package/types/data/transforms/circle-packing.d.ts +1 -1
- package/types/data/transforms/data-key.d.ts +1 -1
- package/types/data/transforms/flatten.d.ts +1 -1
- package/types/data/transforms/funnel.d.ts +1 -6
- package/types/data/transforms/pictogram.d.ts +2 -10
- package/types/data/transforms/sankey-links.d.ts +1 -2
- package/types/data/transforms/sankey-nodes.d.ts +1 -2
- package/types/data/transforms/sankey.d.ts +4 -4
- package/types/data/transforms/sunburst.d.ts +1 -1
- package/types/data/transforms/treemap.d.ts +5 -6
- package/types/data/transforms/venn.d.ts +10 -0
- package/types/data/transforms/waterfall.d.ts +1 -0
- package/types/event/event-dispatcher.d.ts +4 -1
- package/types/event/event.d.ts +4 -1
- package/types/event/events/base.d.ts +1 -2
- package/types/event/events/dimension/util/cartesian.d.ts +2 -1
- package/types/event/events/index.d.ts +1 -5
- package/types/event/index.d.ts +1 -0
- package/types/event/interface.d.ts +19 -13
- package/types/index-harmony-simple.d.ts +4 -4
- package/types/index-harmony.d.ts +1 -1
- package/types/index.d.ts +11 -0
- package/types/interaction/config.d.ts +13 -0
- package/types/interaction/index.d.ts +10 -1
- package/types/interaction/interaction.d.ts +17 -25
- package/types/interaction/interface/common.d.ts +22 -0
- package/types/interaction/interface/spec.d.ts +53 -0
- package/types/interaction/interface/trigger.d.ts +87 -0
- package/types/interaction/triggers/base.d.ts +28 -0
- package/types/interaction/triggers/dimension-hover.d.ts +22 -0
- package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
- package/types/interaction/triggers/element-active.d.ts +20 -0
- package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
- package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
- package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
- package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
- package/types/interaction/triggers/element-highlight.d.ts +25 -0
- package/types/interaction/triggers/element-select.d.ts +24 -0
- package/types/interaction/triggers/enum.d.ts +6 -0
- package/types/interaction/triggers/util.d.ts +12 -0
- package/types/interaction/zoom/zoomable.d.ts +5 -0
- package/types/layout/base-layout.d.ts +12 -9
- package/types/layout/index.d.ts +4 -4
- package/types/layout/interface.d.ts +8 -3
- package/types/layout/layout-item.d.ts +7 -3
- package/types/layout/util.d.ts +17 -4
- package/types/mark/arc.d.ts +3 -3
- package/types/mark/area.d.ts +2 -0
- package/types/mark/base/base-line.d.ts +25 -2
- package/types/mark/base/base-mark.d.ts +160 -13
- package/types/mark/box-plot.d.ts +11 -5
- package/types/mark/cell.d.ts +6 -3
- package/types/mark/component.d.ts +12 -3
- package/types/mark/glyph.d.ts +30 -0
- package/types/mark/group.d.ts +11 -6
- package/types/mark/index.d.ts +10 -7
- package/types/mark/interface/common.d.ts +81 -9
- package/types/mark/interface/enum.d.ts +6 -0
- package/types/mark/interface/index.d.ts +1 -0
- package/types/mark/interface/mark.d.ts +20 -5
- package/types/mark/interface/type.d.ts +1 -3
- package/types/mark/label.d.ts +4 -3
- package/types/mark/link-path.d.ts +35 -5
- package/types/mark/liquid.d.ts +47 -5
- package/types/mark/ripple.d.ts +39 -4
- package/types/mark/rule.d.ts +4 -1
- package/types/mark/symbol.d.ts +4 -5
- package/types/mark/text.d.ts +5 -3
- package/types/mark/transform/data-sampling.d.ts +10 -0
- package/types/mark/transform/filter.d.ts +1 -0
- package/types/mark/transform/map.d.ts +1 -0
- package/types/mark/transform/symbol-overlap.d.ts +13 -0
- package/types/mark/utils/common.d.ts +4 -1
- package/types/mark/utils/glyph.d.ts +2 -0
- package/types/mark/utils/index.d.ts +2 -0
- package/types/mark/utils/line.d.ts +3 -0
- package/types/model/base-model.d.ts +11 -10
- package/types/model/interface.d.ts +11 -10
- package/types/model/layout-model.d.ts +4 -3
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -14
- package/types/plugin/other.d.ts +3 -4
- package/types/region/interface.d.ts +0 -4
- package/types/region/region.d.ts +3 -11
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area.d.ts +3 -2
- package/types/series/bar/animation.d.ts +1 -2
- package/types/series/bar/bar.d.ts +9 -9
- package/types/series/bar/constant.d.ts +0 -1
- package/types/series/bar/interface.d.ts +1 -7
- package/types/series/base/base-series-transformer.d.ts +1 -1
- package/types/series/base/base-series.d.ts +23 -40
- package/types/series/base/tooltip-helper.d.ts +1 -2
- package/types/series/box-plot/animation.d.ts +52 -0
- package/types/series/box-plot/box-plot.d.ts +6 -3
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/animation.d.ts +1 -1
- package/types/series/circle-packing/circle-packing.d.ts +4 -1
- package/types/series/correlation/animation.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +6 -4
- package/types/series/dot/dot.d.ts +5 -2
- package/types/series/funnel/constant.d.ts +0 -1
- package/types/series/funnel/funnel.d.ts +10 -11
- package/types/series/funnel/interface.d.ts +2 -13
- package/types/series/funnel/tooltip-helper.d.ts +4 -2
- package/types/series/gauge/animation.d.ts +1 -1
- package/types/series/gauge/gauge-pointer.d.ts +7 -1
- package/types/series/gauge/gauge.d.ts +5 -2
- package/types/series/geo/geo.d.ts +3 -4
- package/types/series/heatmap/animation.d.ts +1 -1
- package/types/series/heatmap/heatmap.d.ts +7 -1
- package/types/series/index.d.ts +24 -19
- package/types/series/interface/common.d.ts +1 -4
- package/types/series/interface/series.d.ts +6 -1
- package/types/series/interface/theme.d.ts +5 -16
- package/types/series/interface/type.d.ts +1 -11
- package/types/series/line/animation.d.ts +1 -1
- package/types/series/line/line.d.ts +4 -1
- package/types/series/link/link.d.ts +8 -2
- package/types/series/liquid/animation.d.ts +1 -1
- package/types/series/liquid/liquid.d.ts +7 -1
- package/types/series/map/interface.d.ts +10 -0
- package/types/series/map/map.d.ts +3 -0
- package/types/series/mixin/line-mixin.d.ts +5 -5
- package/types/series/mosaic/mosaic.d.ts +2 -0
- package/types/series/pictogram/pictogram.d.ts +2 -0
- package/types/series/pictogram/tooltip-helper.d.ts +2 -2
- package/types/series/pie/animation/animation.d.ts +4 -4
- package/types/series/pie/animation/centerOffset.d.ts +1 -1
- package/types/series/pie/constant.d.ts +0 -1
- package/types/series/pie/interface.d.ts +3 -13
- package/types/series/pie/pie.d.ts +13 -11
- package/types/series/polar/animation.d.ts +2 -4
- package/types/series/polar/progress-like/animation.d.ts +1 -1
- package/types/series/polar/progress-like/interface.d.ts +1 -0
- package/types/series/polar/progress-like/progress-like.d.ts +1 -2
- package/types/series/progress/circular/circular.d.ts +7 -1
- package/types/series/progress/linear/animation.d.ts +2 -2
- package/types/series/progress/linear/interface.d.ts +1 -0
- package/types/series/progress/linear/linear.d.ts +7 -1
- package/types/series/radar/animation.d.ts +12 -10
- package/types/series/radar/radar.d.ts +5 -2
- package/types/series/range-column/animation.d.ts +1 -1
- package/types/series/range-column/constant.d.ts +0 -1
- package/types/series/range-column/interface.d.ts +0 -3
- package/types/series/range-column/range-column.d.ts +5 -4
- package/types/series/rose/animation.d.ts +1 -1
- package/types/series/rose/rose.d.ts +3 -0
- package/types/series/sankey/animation.d.ts +14 -1
- package/types/series/sankey/interface.d.ts +0 -1
- package/types/series/sankey/sankey.d.ts +14 -12
- package/types/series/sankey/tooltip-helper.d.ts +1 -1
- package/types/series/scatter/animation.d.ts +1 -1
- package/types/series/scatter/scatter.d.ts +3 -0
- package/types/series/sunburst/animation/enter.d.ts +1 -1
- package/types/series/sunburst/animation/exit.d.ts +1 -1
- package/types/series/sunburst/animation/preset.d.ts +1 -1
- package/types/series/sunburst/animation/utils.d.ts +2 -2
- package/types/series/sunburst/interface.d.ts +1 -1
- package/types/series/sunburst/sunburst.d.ts +4 -1
- package/types/series/treemap/animation.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +4 -2
- package/types/series/venn/animation.d.ts +12 -1
- package/types/series/venn/venn.d.ts +5 -1
- package/types/series/waterfall/animation.d.ts +1 -1
- package/types/series/waterfall/waterfall.d.ts +6 -2
- package/types/series/word-cloud/animation.d.ts +2 -4
- package/types/series/word-cloud/base.d.ts +4 -3
- package/types/series/word-cloud/interface.d.ts +2 -20
- package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +0 -1
- package/types/theme/builtin/common/series/funnel.d.ts +2 -2
- package/types/theme/builtin/common/series/word-cloud.d.ts +1 -2
- package/types/theme/builtin/index.d.ts +3 -1
- package/types/theme/color-scheme/util.d.ts +1 -1
- package/types/typings/common.d.ts +13 -0
- package/types/typings/spec/chart.d.ts +6 -12
- package/types/typings/spec/common.d.ts +40 -41
- package/types/typings/tooltip/position.d.ts +1 -1
- package/types/typings/visual.d.ts +11 -13
- package/types/util/array.d.ts +1 -0
- package/types/util/index.d.ts +1 -0
- package/types/util/mark.d.ts +5 -0
- package/types/util/math.d.ts +1 -1
- package/types/util/region.d.ts +5 -0
- package/types/util/scale.d.ts +1 -0
- package/types/util/theme/common.d.ts +1 -1
- package/types/util/theme/merge-theme.d.ts +2 -2
- package/types/util/theme/preprocess.d.ts +1 -2
- package/types/vrender-tools.d.ts +1 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { IEvent } from '../../event/interface';
|
|
2
2
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
|
-
import type { IView } from '@visactor/vgrammar-core';
|
|
4
3
|
import type { IParserOptions } from '@visactor/vdataset';
|
|
5
4
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
6
5
|
import type { IMark } from '../../mark/interface';
|
|
7
|
-
import type { IModel, IModelConstructor, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
6
|
+
import type { IModel, IModelConstructor, IModelOption, IModelSpecInfo, IUpdateSpecResult } from '../../model/interface';
|
|
8
7
|
import type { IRegion, IRegionConstructor } from '../../region/interface';
|
|
9
8
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
10
|
-
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartRenderOption, IChartSpecInfo, IChartSpecTransformerOption
|
|
9
|
+
import type { IChartEvaluateOption, IChartLayoutOption, IChartOption, IChartRenderOption, IChartSpecInfo, IChartSpecTransformerOption } from './common';
|
|
11
10
|
import type { IBoundsLike, IPadding, Maybe } from '@visactor/vutils';
|
|
12
11
|
import type { ICompilable } from '../../compile/interface';
|
|
13
12
|
import type { IRegionQuerier, MaybeArray, Datum, IMarkStateSpec, StringOrNumber, IShowTooltipOption, IDataValues, ILayoutRect, IData } from '../../typings';
|
|
14
13
|
import type { DataView } from '@visactor/vdataset';
|
|
15
14
|
import type { IGlobalScale } from '../../scale/interface';
|
|
16
15
|
import type { IMorphConfig } from '../../animation/spec';
|
|
16
|
+
import type { IMarkGraphic } from '../../mark/interface/common';
|
|
17
17
|
export type DimensionIndexOption = {
|
|
18
18
|
filter?: (cmp: IComponent) => boolean;
|
|
19
19
|
tooltip?: boolean;
|
|
@@ -37,12 +37,14 @@ export interface IChart extends ICompilable {
|
|
|
37
37
|
getCanvasRect: () => ILayoutRect;
|
|
38
38
|
getViewRect: () => ILayoutRect;
|
|
39
39
|
getOption: () => IChartOption;
|
|
40
|
+
getModelOption: () => IModelOption;
|
|
40
41
|
getEvent: () => IEvent;
|
|
41
42
|
getGlobalScale: () => IGlobalScale;
|
|
42
43
|
setLayout: (layout: LayoutCallBack) => void;
|
|
43
|
-
layout: (
|
|
44
|
+
layout: () => void;
|
|
44
45
|
getLayoutTag: () => boolean;
|
|
45
46
|
setLayoutTag: (tag: boolean, morphConfig?: IMorphConfig, renderNextTick?: boolean) => boolean;
|
|
47
|
+
resetLayoutItemTag: () => void;
|
|
46
48
|
updateData: (id: StringOrNumber, data: unknown, updateGlobalScale?: boolean, options?: IParserOptions) => void;
|
|
47
49
|
updateFullData: (data: IDataValues | IDataValues[]) => void;
|
|
48
50
|
updateGlobalScaleDomain: () => void;
|
|
@@ -53,7 +55,7 @@ export interface IChart extends ICompilable {
|
|
|
53
55
|
onEvaluateEnd: (ctx: IChartEvaluateOption) => void;
|
|
54
56
|
onRender: (ctx: IChartRenderOption) => void;
|
|
55
57
|
onResize: (width: number, height: number, reRender: boolean) => void;
|
|
56
|
-
onLayout: (
|
|
58
|
+
onLayout: () => void;
|
|
57
59
|
reInit: () => void;
|
|
58
60
|
getAllSeries: () => ISeries[];
|
|
59
61
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
@@ -93,6 +95,13 @@ export interface IChart extends ICompilable {
|
|
|
93
95
|
setCurrentTheme: () => void;
|
|
94
96
|
getSeriesData: (id: StringOrNumber | undefined, index: number | undefined) => DataView | undefined;
|
|
95
97
|
setDimensionIndex: (value: StringOrNumber, opt: DimensionIndexOption) => void;
|
|
98
|
+
filterGraphicsByDatum: (datum: MaybeArray<Datum> | null, opt?: {
|
|
99
|
+
filter?: (series: ISeries, mark: IMark) => boolean;
|
|
100
|
+
region?: IRegionQuerier;
|
|
101
|
+
getDatum?: (el: IMarkGraphic, mark: IMark, s: ISeries, r: IRegion) => Datum;
|
|
102
|
+
callback?: (el: IMarkGraphic, mark: IMark, s: ISeries, r: IRegion) => void;
|
|
103
|
+
regionCallback?: (pickElements: IMarkGraphic[], r: IRegion) => void;
|
|
104
|
+
}) => IMarkGraphic[];
|
|
96
105
|
}
|
|
97
106
|
export interface IChartSpecTransformer {
|
|
98
107
|
readonly type: string;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
2
2
|
import type { IRenderOption } from '../../compile/interface';
|
|
3
3
|
import type { IModelOption, IModelSpecInfo } from '../../model/interface';
|
|
4
|
-
import type { IView } from '@visactor/vgrammar-core';
|
|
5
4
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
6
5
|
import type { ISeriesSpecInfo } from '../../series/interface';
|
|
7
6
|
import type { IRegionSpecInfo } from '../../region/interface';
|
|
8
|
-
|
|
9
|
-
srView?: IView;
|
|
10
|
-
group?: any;
|
|
11
|
-
}
|
|
12
|
-
export interface IAttributeParams {
|
|
13
|
-
srView?: IView;
|
|
14
|
-
group?: any;
|
|
15
|
-
}
|
|
7
|
+
import type { IPerformanceHook } from '../../typings';
|
|
16
8
|
export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'getChartLayoutRect' | 'globalScale' | 'getChart' | 'getSeriesData'> {
|
|
17
9
|
container: HTMLElement | null;
|
|
18
10
|
canvas?: HTMLCanvasElement | OffscreenCanvas | string;
|
|
@@ -20,6 +12,7 @@ export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'g
|
|
|
20
12
|
viewBox?: IBoundsLike;
|
|
21
13
|
layout?: LayoutCallBack;
|
|
22
14
|
disableTriggerEvent?: boolean;
|
|
15
|
+
performanceHook?: IPerformanceHook;
|
|
23
16
|
}
|
|
24
17
|
export interface IChartSpecTransformerOption extends Partial<IChartOption> {
|
|
25
18
|
seriesType?: string;
|
|
@@ -4,15 +4,11 @@ export declare const enum ChartTypeEnum {
|
|
|
4
4
|
area = "area",
|
|
5
5
|
line = "line",
|
|
6
6
|
bar = "bar",
|
|
7
|
-
bar3d = "bar3d",
|
|
8
7
|
histogram = "histogram",
|
|
9
|
-
histogram3d = "histogram3d",
|
|
10
8
|
rangeColumn = "rangeColumn",
|
|
11
|
-
rangeColumn3d = "rangeColumn3d",
|
|
12
9
|
rangeArea = "rangeArea",
|
|
13
10
|
map = "map",
|
|
14
11
|
pie = "pie",
|
|
15
|
-
pie3d = "pie3d",
|
|
16
12
|
radar = "radar",
|
|
17
13
|
rose = "rose",
|
|
18
14
|
scatter = "scatter",
|
|
@@ -20,9 +16,7 @@ export declare const enum ChartTypeEnum {
|
|
|
20
16
|
circularProgress = "circularProgress",
|
|
21
17
|
linearProgress = "linearProgress",
|
|
22
18
|
wordCloud = "wordCloud",
|
|
23
|
-
wordCloud3d = "wordCloud3d",
|
|
24
19
|
funnel = "funnel",
|
|
25
|
-
funnel3d = "funnel3d",
|
|
26
20
|
waterfall = "waterfall",
|
|
27
21
|
boxPlot = "boxPlot",
|
|
28
22
|
gauge = "gauge",
|
|
@@ -34,6 +28,5 @@ export declare const enum ChartTypeEnum {
|
|
|
34
28
|
correlation = "correlation",
|
|
35
29
|
liquid = "liquid",
|
|
36
30
|
venn = "venn",
|
|
37
|
-
mosaic = "mosaic"
|
|
38
|
-
pictogram = "pictogram"
|
|
31
|
+
mosaic = "mosaic"
|
|
39
32
|
}
|
|
@@ -8,5 +8,6 @@ export declare class LineChart<T extends ILineChartSpec> extends BaseChart<T> {
|
|
|
8
8
|
readonly transformerConstructor: typeof LineChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerLineChart: () => void;
|
|
@@ -17,5 +17,6 @@ export declare class MosaicChart<T extends IMosaicChartSpec = IMosaicChartSpec>
|
|
|
17
17
|
handleAfterStackRegion: (region: IRegion, stackValueGroup: {
|
|
18
18
|
[key: string]: IStackCacheRoot;
|
|
19
19
|
}) => void;
|
|
20
|
+
protected _setModelOption(): void;
|
|
20
21
|
}
|
|
21
22
|
export declare const registerMosaicChart: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPictogramSeriesSpec } from '../../series/pictogram/interface';
|
|
1
|
+
import type { IPictogramSeriesSpec } from '../../series/pictogram/interface';
|
|
2
2
|
import type { IChartExtendsSeriesSpec, IChartSpec } from '../../typings/spec/common';
|
|
3
3
|
export interface IPictogramChartSpec extends IChartSpec, IChartExtendsSeriesSpec<any> {
|
|
4
4
|
type: 'pictogram';
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { IPieSeriesSpec
|
|
1
|
+
import type { IPieSeriesSpec } from '../../series/pie/interface';
|
|
2
2
|
import type { IIndicatorSpec } from '../../component/indicator/interface';
|
|
3
3
|
import type { IChartExtendsSeriesSpec, IChartSpec } from '../../typings/spec/common';
|
|
4
4
|
export interface IPieChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IPieSeriesSpec> {
|
|
5
5
|
type: 'pie';
|
|
6
6
|
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
7
7
|
}
|
|
8
|
-
export interface IPie3dChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IPie3dSeriesSpec> {
|
|
9
|
-
type: 'pie3d';
|
|
10
|
-
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
11
|
-
}
|
|
@@ -9,5 +9,6 @@ export declare class CircularProgressChart<T extends ICircularProgressChartSpec
|
|
|
9
9
|
readonly transformerConstructor: typeof CircularProgressChartSpecTransformer;
|
|
10
10
|
readonly type: string;
|
|
11
11
|
readonly seriesType: string;
|
|
12
|
+
protected _setModelOption(): void;
|
|
12
13
|
}
|
|
13
14
|
export declare const registerCircularProgressChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class LinearProgressChart<T extends ILinearProgressChartSpec = IL
|
|
|
8
8
|
readonly transformerConstructor: typeof LinearProgressChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerLinearProgressChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class RadarChart<T extends IRoseChartSpec = IRoseChartSpec> exten
|
|
|
8
8
|
readonly transformerConstructor: typeof RadarChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerRadarChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class RangeAreaChart<T extends IRangeAreaChartSpec = IRangeAreaCh
|
|
|
8
8
|
readonly transformerConstructor: typeof RangeAreaChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerRangeAreaChart: () => void;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { IChartExtendsSeriesSpec } from '../../typings/spec/common';
|
|
2
|
-
import type { IRangeColumnSeriesSpec
|
|
2
|
+
import type { IRangeColumnSeriesSpec } from '../../series/range-column/interface';
|
|
3
3
|
import type { ICartesianChartSpec } from '../cartesian/interface';
|
|
4
4
|
export interface IRangeColumnChartSpec extends ICartesianChartSpec, IChartExtendsSeriesSpec<IRangeColumnSeriesSpec> {
|
|
5
5
|
type: 'rangeColumn';
|
|
6
6
|
series?: IRangeColumnSeriesSpec[];
|
|
7
7
|
}
|
|
8
|
-
export interface IRangeColumn3dChartSpec extends ICartesianChartSpec, IChartExtendsSeriesSpec<IRangeColumn3dSeriesSpec> {
|
|
9
|
-
type: 'rangeColumn3d';
|
|
10
|
-
series?: IRangeColumn3dSeriesSpec[];
|
|
11
|
-
}
|
|
@@ -8,5 +8,6 @@ export declare class RangeColumnChart<T extends IRangeColumnChartSpec = IRangeCo
|
|
|
8
8
|
readonly transformerConstructor: typeof RangeColumnChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerRangeColumnChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class RoseChart<T extends IRoseChartSpec = IRoseChartSpec> extend
|
|
|
8
8
|
readonly transformerConstructor: typeof RoseChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerRoseChart: () => void;
|
|
@@ -12,6 +12,6 @@ export declare class SankeyChart<T extends ISankeyChartSpec = ISankeyChartSpec>
|
|
|
12
12
|
readonly transformerConstructor: typeof SankeyChartSpecTransformer;
|
|
13
13
|
readonly type: string;
|
|
14
14
|
readonly seriesType: string;
|
|
15
|
-
protected _setStateInDatum(stateKey: string,
|
|
15
|
+
protected _setStateInDatum(stateKey: string, datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
16
16
|
}
|
|
17
17
|
export declare const registerSankeyChart: () => void;
|
|
@@ -8,5 +8,6 @@ export declare class ScatterChart<T extends IScatterChartSpec = IScatterChartSpe
|
|
|
8
8
|
readonly transformerConstructor: typeof ScatterChartSpecTransformer;
|
|
9
9
|
readonly type: string;
|
|
10
10
|
readonly seriesType: string;
|
|
11
|
+
protected _setModelOption(): void;
|
|
11
12
|
}
|
|
12
13
|
export declare const registerScatterChart: () => void;
|
|
@@ -9,5 +9,6 @@ export declare class WaterfallChart<T extends IWaterfallChartSpec = IWaterfallCh
|
|
|
9
9
|
readonly transformerConstructor: typeof WaterfallChartSpecTransformer;
|
|
10
10
|
readonly type: string;
|
|
11
11
|
readonly seriesType: string;
|
|
12
|
+
protected _setModelOption(): void;
|
|
12
13
|
}
|
|
13
14
|
export declare const registerWaterfallChart: () => void;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IWordCloudSeriesSpec } from '../../series/word-cloud/interface';
|
|
2
2
|
import type { IChartExtendsSeriesSpec, IChartSpec } from '../../typings/spec/common';
|
|
3
3
|
export interface IWordCloudChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IWordCloudSeriesSpec> {
|
|
4
4
|
type: 'wordCloud';
|
|
5
5
|
series?: IWordCloudSeriesSpec[];
|
|
6
6
|
}
|
|
7
|
-
export interface IWordCloud3dChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IWordCloud3dSeriesSpec> {
|
|
8
|
-
type: 'wordCloud3d';
|
|
9
|
-
series?: IWordCloud3dSeriesSpec[];
|
|
10
|
-
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { IWordCloudChartSpec } from './interface';
|
|
1
|
+
import type { IWordCloudChartSpec } from './interface';
|
|
2
2
|
import { BaseWordCloudChart } from './base/base';
|
|
3
3
|
import { BaseWordCloudChartSpecTransformer } from './base/word-cloud-base-transformer';
|
|
4
|
-
export declare class WordCloudChart
|
|
4
|
+
export declare class WordCloudChart extends BaseWordCloudChart<IWordCloudChartSpec> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly transformerConstructor:
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
readonly transformerConstructor: {
|
|
11
|
-
new (option: import("../interface").IChartSpecTransformerOption): BaseWordCloudChartSpecTransformer<IWordCloudChartSpec>;
|
|
12
|
-
};
|
|
7
|
+
static readonly transformerConstructor: typeof BaseWordCloudChartSpecTransformer;
|
|
8
|
+
readonly transformerConstructor: typeof BaseWordCloudChartSpecTransformer;
|
|
13
9
|
readonly type: string;
|
|
14
10
|
readonly seriesType: string;
|
|
15
11
|
}
|
|
@@ -4,7 +4,7 @@ export declare abstract class CompilableBase implements ICompilable {
|
|
|
4
4
|
getOption(): ICompilableInitOption;
|
|
5
5
|
getCompiler: () => ICompiler;
|
|
6
6
|
constructor(option: ICompilableInitOption);
|
|
7
|
-
getVGrammarView(): import("@visactor/vgrammar-core").IView;
|
|
8
7
|
abstract compile(): void;
|
|
8
|
+
getStage(): import("@visactor/vrender-core").IStage;
|
|
9
9
|
release(): void;
|
|
10
10
|
}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
1
|
+
import type { CompilerListenerParameters, ICompiler, IRenderContainer, IRenderOption } from './interface';
|
|
2
|
+
import { LayoutState } from './interface';
|
|
3
3
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
4
4
|
import type { EventSourceType } from '../event/interface';
|
|
5
5
|
import type { IChart } from '../chart/interface';
|
|
6
|
-
import type { IColor, IStage } from '@visactor/vrender-core';
|
|
6
|
+
import type { IColor, IGroup, IStage } from '@visactor/vrender-core';
|
|
7
7
|
import type { IMorphConfig } from '../animation/spec';
|
|
8
|
-
import type { IVChart } from '../core/interface';
|
|
8
|
+
import type { IVChart, IVChartRenderOption } from '../core/interface';
|
|
9
|
+
import { type IMark } from '../mark/interface';
|
|
10
|
+
import type { Gesture } from '@visactor/vrender-kits';
|
|
9
11
|
type EventListener = {
|
|
10
12
|
type: string;
|
|
11
13
|
callback: (...args: any[]) => void;
|
|
12
14
|
};
|
|
13
15
|
export declare class Compiler implements ICompiler {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
private _count;
|
|
17
|
+
private _cachedMarks;
|
|
18
|
+
private _progressiveMarks?;
|
|
19
|
+
private _progressiveRafId?;
|
|
20
|
+
protected _rootMarks: IMark[];
|
|
21
|
+
protected _stage: IStage;
|
|
22
|
+
protected _rootGroup: IGroup;
|
|
23
|
+
getRootGroup(): IGroup;
|
|
16
24
|
protected _viewListeners: Map<(...args: any[]) => any, EventListener>;
|
|
17
25
|
protected _windowListeners: Map<(...args: any[]) => any, EventListener>;
|
|
18
26
|
protected _canvasListeners: Map<(...args: any[]) => any, EventListener>;
|
|
@@ -23,31 +31,34 @@ export declare class Compiler implements ICompiler {
|
|
|
23
31
|
protected _container: IRenderContainer;
|
|
24
32
|
protected _option: IRenderOption;
|
|
25
33
|
private _released;
|
|
26
|
-
|
|
27
|
-
protected _interactions: (InteractionSpec & {
|
|
28
|
-
seriesId?: number;
|
|
29
|
-
regionId?: number;
|
|
30
|
-
})[];
|
|
31
|
-
getModel(): ICompilerModel;
|
|
34
|
+
private _layoutState?;
|
|
32
35
|
private _compileChart;
|
|
33
36
|
constructor(container: IRenderContainer, option: IRenderOption);
|
|
34
|
-
getRenderer(): import("@visactor/vgrammar-core").IRenderer;
|
|
35
37
|
getCanvas(): HTMLCanvasElement | undefined;
|
|
38
|
+
_gestureController?: Gesture;
|
|
36
39
|
getStage(): IStage | undefined;
|
|
37
40
|
initView(): void;
|
|
41
|
+
getLayoutState(): LayoutState;
|
|
42
|
+
updateLayoutTag(): void;
|
|
43
|
+
protected handleLayoutEnd: () => void;
|
|
38
44
|
protected handleStageRender: () => void;
|
|
39
45
|
private _setCanvasStyle;
|
|
40
|
-
protected compileInteractions(): void;
|
|
41
46
|
compile(ctx: {
|
|
42
47
|
chart: IChart;
|
|
43
48
|
vChart: IVChart;
|
|
44
|
-
}, option
|
|
49
|
+
}, option?: IVChartRenderOption): void;
|
|
45
50
|
protected clearNextRender(): boolean;
|
|
46
51
|
clear(ctx: {
|
|
47
52
|
chart: IChart;
|
|
48
53
|
vChart: IVChart;
|
|
49
|
-
}
|
|
54
|
+
}): void;
|
|
50
55
|
renderNextTick(morphConfig?: IMorphConfig): void;
|
|
56
|
+
protected _commitedAll(): boolean;
|
|
57
|
+
protected _hasCommitedMark(): boolean;
|
|
58
|
+
private _handleAfterNextRender;
|
|
59
|
+
private _doRender;
|
|
60
|
+
renderMarks(): void;
|
|
61
|
+
reuseOrMorphing(morphConfig?: IMorphConfig): void;
|
|
51
62
|
render(morphConfig?: IMorphConfig): void;
|
|
52
63
|
updateViewBox(viewBox: IBoundsLike, reRender?: boolean): void;
|
|
53
64
|
resize(width: number, height: number, reRender?: boolean): void;
|
|
@@ -59,15 +70,14 @@ export declare class Compiler implements ICompiler {
|
|
|
59
70
|
protected releaseEvent(): void;
|
|
60
71
|
release(): void;
|
|
61
72
|
releaseGrammar(removeGraphicItems?: boolean): void;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
addInteraction(interaction: InteractionSpec & {
|
|
66
|
-
seriesId?: number;
|
|
67
|
-
regionId?: number;
|
|
68
|
-
}): void;
|
|
69
|
-
removeInteraction(seriesId: number): void;
|
|
70
|
-
updateDepend(items?: IGrammarItem[]): boolean;
|
|
73
|
+
addRootMark(mark: IMark): void;
|
|
74
|
+
getRootMarks(): IMark[];
|
|
75
|
+
removeRootMark(mark: IMark): boolean;
|
|
71
76
|
private _getGlobalThis;
|
|
77
|
+
private _combineIncrementalLayers;
|
|
78
|
+
private findProgressiveMarks;
|
|
79
|
+
private doPreProgressive;
|
|
80
|
+
private handleProgressiveFrame;
|
|
81
|
+
private clearProgressive;
|
|
72
82
|
}
|
|
73
83
|
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
|
-
import type { IData as IVGrammarData } from '@visactor/vgrammar-core';
|
|
3
2
|
import { GrammarItem } from '../grammar-item';
|
|
4
3
|
import type { Maybe } from '../../typings';
|
|
5
4
|
import type { ICompilableData } from './interface';
|
|
6
5
|
import type { GrammarItemInitOption } from '../interface';
|
|
7
|
-
import {
|
|
6
|
+
import type { ICompilableMark } from '../mark';
|
|
8
7
|
export declare class CompilableData extends GrammarItem implements ICompilableData {
|
|
9
|
-
|
|
10
|
-
protected
|
|
11
|
-
getProduct
|
|
8
|
+
protected _product: Maybe<any>;
|
|
9
|
+
protected _prevProduct: Maybe<any>;
|
|
10
|
+
getProduct(): any;
|
|
12
11
|
protected _data: Maybe<DataView>;
|
|
13
12
|
getDataView(): DataView;
|
|
14
13
|
setDataView(d?: DataView): void;
|
|
15
14
|
getLatestData(): any;
|
|
16
15
|
constructor(option: GrammarItemInitOption, dataView?: DataView);
|
|
16
|
+
removeProduct(): void;
|
|
17
17
|
release(): void;
|
|
18
|
+
protected _relatedMarks?: Record<string, ICompilableMark>;
|
|
19
|
+
addRelatedMark(mark: ICompilableMark): void;
|
|
18
20
|
updateData(noRender?: boolean): void;
|
|
19
21
|
protected _compileProduct(): void;
|
|
20
|
-
protected _initProduct(data: any[]): void;
|
|
21
22
|
generateProductId(): string;
|
|
22
|
-
protected _lookupGrammar(id: string): IVGrammarData;
|
|
23
23
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
import type { IGrammarItem } from '../interface';
|
|
3
|
+
import type { ICompilableMark } from '../mark';
|
|
3
4
|
export interface ICompilableData extends IGrammarItem {
|
|
4
5
|
getDataView: () => DataView;
|
|
5
6
|
setDataView: (d?: DataView) => void;
|
|
6
|
-
|
|
7
|
+
getProduct: () => any;
|
|
7
8
|
updateData: (noRender?: boolean) => void;
|
|
9
|
+
getLatestData: () => any;
|
|
10
|
+
addRelatedMark: (mark: ICompilableMark) => void;
|
|
8
11
|
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import type { IGrammarBase } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { Maybe } from '../typings';
|
|
3
2
|
import { CompilableBase } from './compilable-base';
|
|
4
|
-
import type { GrammarItemCompileOption,
|
|
3
|
+
import type { GrammarItemCompileOption, IGrammarItem, GrammarItemInitOption, ITransformSpec } from './interface';
|
|
5
4
|
export declare abstract class GrammarItem extends CompilableBase implements IGrammarItem {
|
|
6
|
-
grammarType: GrammarType;
|
|
7
5
|
protected _option: GrammarItemInitOption;
|
|
8
6
|
readonly id: number;
|
|
9
|
-
protected _product: Maybe<
|
|
10
|
-
getProduct():
|
|
11
|
-
protected abstract _lookupGrammar(id: string): IGrammarBase;
|
|
7
|
+
protected _product: Maybe<any>;
|
|
8
|
+
abstract getProduct(): Maybe<any>;
|
|
12
9
|
protected _compiledProductId: string;
|
|
13
10
|
abstract generateProductId(): string;
|
|
14
11
|
getProductId(): string;
|
|
15
|
-
protected _depend: IGrammarItem[];
|
|
16
|
-
getDepend(): IGrammarItem[];
|
|
17
|
-
setDepend(...depend: IGrammarItem[]): void;
|
|
18
12
|
compile(option?: GrammarItemCompileOption): void;
|
|
19
13
|
protected abstract _compileProduct(option?: GrammarItemCompileOption): void;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
abstract removeProduct(): void;
|
|
15
|
+
protected _transform: ITransformSpec[];
|
|
16
|
+
setTransform(transform: ITransformSpec[]): void;
|
|
17
|
+
runTransforms<T = any>(transforms: ITransformSpec[], data: T): T;
|
|
24
18
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { IColor, IStage } from '@visactor/vrender-core';
|
|
1
|
+
import type { StringOrNumber } from '../../typings';
|
|
2
|
+
import type { IColor, IGroup, IStage } from '@visactor/vrender-core';
|
|
4
3
|
import type { IChart } from '../../chart/interface/chart';
|
|
5
|
-
import type { IVChart } from '../../core/interface';
|
|
4
|
+
import type { IVChart, IVChartRenderOption } from '../../core/interface';
|
|
6
5
|
import type { IMorphConfig } from '../../animation/spec';
|
|
7
6
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
8
7
|
import type { EventSourceType, EventType } from '../../event/interface';
|
|
8
|
+
import type { IMark, IMarkGraphic } from '../../mark/interface';
|
|
9
|
+
import type { LayoutState } from '../interface/compiler';
|
|
9
10
|
export type CompilerListenerParameters = {
|
|
10
11
|
type: EventType;
|
|
11
12
|
event: Event;
|
|
12
13
|
source: EventSourceType;
|
|
13
|
-
item:
|
|
14
|
+
item: IMarkGraphic | null;
|
|
14
15
|
datum: any | null;
|
|
15
16
|
markId: number | null;
|
|
16
17
|
modelId: number | null;
|
|
@@ -26,15 +27,12 @@ export interface IGrammarItemMap<T extends IGrammarItem> {
|
|
|
26
27
|
export type ICompilerModel = Record<GrammarType, IProductMap<IGrammarItem>>;
|
|
27
28
|
export interface ICompiler {
|
|
28
29
|
isInited?: boolean;
|
|
29
|
-
getVGrammarView: () => IView;
|
|
30
|
-
getModel: () => ICompilerModel;
|
|
31
|
-
getRenderer: () => IRenderer;
|
|
32
30
|
getCanvas: () => HTMLCanvasElement | undefined;
|
|
33
31
|
getStage: () => IStage | undefined;
|
|
34
32
|
compile: (ctx: {
|
|
35
33
|
chart: IChart;
|
|
36
34
|
vChart: IVChart;
|
|
37
|
-
}, option
|
|
35
|
+
}, option?: IVChartRenderOption) => void;
|
|
38
36
|
clear: (ctx: {
|
|
39
37
|
chart: IChart;
|
|
40
38
|
vChart: IVChart;
|
|
@@ -50,45 +48,41 @@ export interface ICompiler {
|
|
|
50
48
|
removeEventListener: (source: EventSourceType, type: string, callback: (params: CompilerListenerParameters) => void) => void;
|
|
51
49
|
release: () => void;
|
|
52
50
|
releaseGrammar: (removeGraphicItems: boolean) => void;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
removeInteraction: (seriesId: number) => void;
|
|
60
|
-
updateDepend: (items?: IGrammarItem[]) => boolean;
|
|
51
|
+
addRootMark: (mark: IMark) => any;
|
|
52
|
+
removeRootMark: (mark: IMark) => any;
|
|
53
|
+
getRootMarks: () => IMark[];
|
|
54
|
+
updateLayoutTag: () => void;
|
|
55
|
+
getLayoutState: () => LayoutState;
|
|
56
|
+
getRootGroup: () => IGroup;
|
|
61
57
|
}
|
|
62
58
|
export interface ICompilable {
|
|
63
59
|
getCompiler: () => ICompiler;
|
|
64
|
-
|
|
60
|
+
getStage: () => IStage;
|
|
65
61
|
compile: () => void;
|
|
66
|
-
compileMarks?: (group?:
|
|
62
|
+
compileMarks?: (group?: IGroup) => void;
|
|
67
63
|
compileData?: () => void;
|
|
68
|
-
compileSignal?: () => void;
|
|
69
64
|
clear?: () => void;
|
|
70
65
|
afterCompile?: () => void;
|
|
71
66
|
release: () => void;
|
|
72
67
|
}
|
|
73
68
|
export interface ICompilableInitOption {
|
|
74
69
|
getCompiler: () => ICompiler;
|
|
75
|
-
performanceHook?: IPerformanceHook;
|
|
76
70
|
}
|
|
77
71
|
export declare enum GrammarType {
|
|
78
72
|
data = "data",
|
|
79
|
-
signal = "signal",
|
|
80
73
|
mark = "mark"
|
|
81
74
|
}
|
|
75
|
+
export interface ITransformSpec {
|
|
76
|
+
type: string;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}
|
|
82
79
|
export interface IGrammarItem extends ICompilable {
|
|
83
80
|
id: number;
|
|
84
|
-
grammarType: GrammarType;
|
|
85
|
-
getProduct: () => Maybe<IGrammarBase>;
|
|
86
81
|
generateProductId: () => string;
|
|
87
82
|
getProductId: () => string;
|
|
88
|
-
removeProduct: (
|
|
89
|
-
|
|
90
|
-
setDepend: (...depend: IGrammarItem[]) => void;
|
|
91
|
-
updateDepend: () => boolean;
|
|
83
|
+
removeProduct: () => void;
|
|
84
|
+
setTransform: (transform: ITransformSpec[]) => void;
|
|
92
85
|
}
|
|
93
86
|
export type GrammarItemInitOption = ICompilableInitOption;
|
|
94
87
|
export type GrammarItemCompileOption = Record<string, any>;
|
|
88
|
+
export type StateValueMap = Record<string, unknown>;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { RenderMode } from '../../typings/spec/common';
|
|
1
|
+
import type { IColor, IStageParams, IStage, ILayer, IOption3D, ITicker } from '@visactor/vrender-core';
|
|
2
|
+
import type { IPerformanceHook, RenderMode } from '../../typings/spec/common';
|
|
4
3
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
5
4
|
import type { StringOrNumber } from '../../typings';
|
|
5
|
+
export declare enum LayoutState {
|
|
6
|
+
before = "before",
|
|
7
|
+
layouting = "layouting",
|
|
8
|
+
reevaluate = "reevaluate",
|
|
9
|
+
after = "after"
|
|
10
|
+
}
|
|
6
11
|
export interface IRenderContainer {
|
|
7
12
|
dom?: HTMLElement | 'none';
|
|
8
13
|
canvas?: HTMLCanvasElement | string;
|
|
@@ -46,6 +51,7 @@ export interface IRenderOption {
|
|
|
46
51
|
disableDirtyBounds?: boolean;
|
|
47
52
|
enableView3dTransform?: boolean;
|
|
48
53
|
pluginList?: string[];
|
|
54
|
+
ticker?: ITicker;
|
|
49
55
|
optimize?: IOptimizeType;
|
|
50
56
|
enableHtmlAttribute?: boolean;
|
|
51
57
|
supportsTouchEvents?: boolean;
|
|
@@ -53,5 +59,9 @@ export interface IRenderOption {
|
|
|
53
59
|
ReactDOM?: any;
|
|
54
60
|
clickInterval?: number;
|
|
55
61
|
autoPreventDefault?: boolean;
|
|
56
|
-
performanceHook?:
|
|
62
|
+
performanceHook?: IPerformanceHook;
|
|
63
|
+
options3d?: {
|
|
64
|
+
enable?: boolean;
|
|
65
|
+
enableView3dTranform?: boolean;
|
|
66
|
+
} & IOption3D;
|
|
57
67
|
}
|
|
@@ -83,5 +83,6 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
83
83
|
pauseAnimationByState(state?: string): import("@visactor/vgrammar-core").IAnimate;
|
|
84
84
|
resumeAnimationByState(state?: string): import("@visactor/vgrammar-core").IAnimate;
|
|
85
85
|
getProductElements(): IElement[];
|
|
86
|
+
clear(): void;
|
|
86
87
|
release(): void;
|
|
87
88
|
}
|