@visactor/vchart-types 1.6.0
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/.eslintrc.js +7 -0
- package/.rush/temp/shrinkwrap-deps.json +4 -0
- package/README.md +30 -0
- package/package.json +29 -0
- package/tsconfig.eslint.json +9 -0
- package/tsconfig.json +3 -0
- package/tsconfig.test.json +5 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/types/animation/animate-manager.d.ts +12 -0
- package/types/animation/config.d.ts +56 -0
- package/types/animation/interface.d.ts +29 -0
- package/types/animation/spec.d.ts +24 -0
- package/types/animation/utils.d.ts +17 -0
- package/types/chart/area/area.d.ts +12 -0
- package/types/chart/area/index.d.ts +2 -0
- package/types/chart/area/interface.d.ts +7 -0
- package/types/chart/bar/bar-3d.d.ts +9 -0
- package/types/chart/bar/bar.d.ts +11 -0
- package/types/chart/bar/index.d.ts +3 -0
- package/types/chart/bar/interface.d.ts +11 -0
- package/types/chart/base-chart.d.ts +154 -0
- package/types/chart/box-plot/box-plot.d.ts +11 -0
- package/types/chart/box-plot/index.d.ts +2 -0
- package/types/chart/box-plot/interface.d.ts +7 -0
- package/types/chart/cartesian/cartesian.d.ts +8 -0
- package/types/chart/cartesian/index.d.ts +2 -0
- package/types/chart/cartesian/interface.d.ts +15 -0
- package/types/chart/chart-meta/data.d.ts +15 -0
- package/types/chart/circle-packing/circle-packing.d.ts +12 -0
- package/types/chart/circle-packing/index.d.ts +2 -0
- package/types/chart/circle-packing/interface.d.ts +6 -0
- package/types/chart/common/common.d.ts +10 -0
- package/types/chart/common/index.d.ts +2 -0
- package/types/chart/common/interface.d.ts +41 -0
- package/types/chart/correlation/correlation.d.ts +11 -0
- package/types/chart/correlation/index.d.ts +2 -0
- package/types/chart/correlation/interface.d.ts +6 -0
- package/types/chart/funnel/base.d.ts +9 -0
- package/types/chart/funnel/funnel-3d.d.ts +8 -0
- package/types/chart/funnel/funnel.d.ts +8 -0
- package/types/chart/funnel/index.d.ts +3 -0
- package/types/chart/funnel/interface.d.ts +9 -0
- package/types/chart/gauge/gauge.d.ts +12 -0
- package/types/chart/gauge/index.d.ts +2 -0
- package/types/chart/gauge/interface.d.ts +10 -0
- package/types/chart/heatmap/heatmap.d.ts +9 -0
- package/types/chart/heatmap/index.d.ts +2 -0
- package/types/chart/heatmap/interface.d.ts +7 -0
- package/types/chart/histogram/base.d.ts +6 -0
- package/types/chart/histogram/histogram-3d.d.ts +8 -0
- package/types/chart/histogram/histogram.d.ts +9 -0
- package/types/chart/histogram/index.d.ts +3 -0
- package/types/chart/histogram/interface.d.ts +9 -0
- package/types/chart/index.d.ts +60 -0
- package/types/chart/interface/chart.d.ts +87 -0
- package/types/chart/interface/common.d.ts +32 -0
- package/types/chart/interface/index.d.ts +3 -0
- package/types/chart/interface/type.d.ts +35 -0
- package/types/chart/line/index.d.ts +2 -0
- package/types/chart/line/interface.d.ts +7 -0
- package/types/chart/line/line.d.ts +12 -0
- package/types/chart/map/index.d.ts +2 -0
- package/types/chart/map/interface.d.ts +6 -0
- package/types/chart/map/map.d.ts +13 -0
- package/types/chart/pie/base.d.ts +5 -0
- package/types/chart/pie/index.d.ts +3 -0
- package/types/chart/pie/interface.d.ts +11 -0
- package/types/chart/pie/pie-3d.d.ts +9 -0
- package/types/chart/pie/pie.d.ts +8 -0
- package/types/chart/polar/index.d.ts +4 -0
- package/types/chart/polar/interface.d.ts +7 -0
- package/types/chart/polar/polar.d.ts +9 -0
- package/types/chart/polar/progress-like.d.ts +7 -0
- package/types/chart/polar/rose-like.d.ts +7 -0
- package/types/chart/progress/circular/circular.d.ts +11 -0
- package/types/chart/progress/circular/index.d.ts +2 -0
- package/types/chart/progress/circular/interface.d.ts +7 -0
- package/types/chart/progress/interface.d.ts +8 -0
- package/types/chart/progress/linear/index.d.ts +2 -0
- package/types/chart/progress/linear/interface.d.ts +9 -0
- package/types/chart/progress/linear/linear.d.ts +13 -0
- package/types/chart/radar/index.d.ts +2 -0
- package/types/chart/radar/interface.d.ts +7 -0
- package/types/chart/radar/radar.d.ts +10 -0
- package/types/chart/range-area/index.d.ts +2 -0
- package/types/chart/range-area/interface.d.ts +7 -0
- package/types/chart/range-area/range-area.d.ts +10 -0
- package/types/chart/range-column/index.d.ts +3 -0
- package/types/chart/range-column/interface.d.ts +11 -0
- package/types/chart/range-column/range-column-3d.d.ts +9 -0
- package/types/chart/range-column/range-column.d.ts +10 -0
- package/types/chart/rose/index.d.ts +2 -0
- package/types/chart/rose/interface.d.ts +7 -0
- package/types/chart/rose/rose.d.ts +10 -0
- package/types/chart/sankey/index.d.ts +2 -0
- package/types/chart/sankey/interface.d.ts +6 -0
- package/types/chart/sankey/sankey.d.ts +11 -0
- package/types/chart/scatter/index.d.ts +2 -0
- package/types/chart/scatter/interface.d.ts +7 -0
- package/types/chart/scatter/scatter.d.ts +11 -0
- package/types/chart/sequence/index.d.ts +2 -0
- package/types/chart/sequence/interface.d.ts +24 -0
- package/types/chart/sequence/sequence.d.ts +12 -0
- package/types/chart/stack.d.ts +11 -0
- package/types/chart/sunburst/index.d.ts +2 -0
- package/types/chart/sunburst/interface.d.ts +6 -0
- package/types/chart/sunburst/sunburst.d.ts +12 -0
- package/types/chart/treemap/index.d.ts +2 -0
- package/types/chart/treemap/interface.d.ts +6 -0
- package/types/chart/treemap/treemap.d.ts +11 -0
- package/types/chart/util.d.ts +12 -0
- package/types/chart/waterfall/index.d.ts +2 -0
- package/types/chart/waterfall/interface.d.ts +7 -0
- package/types/chart/waterfall/waterfall.d.ts +11 -0
- package/types/chart/word-cloud/base.d.ts +6 -0
- package/types/chart/word-cloud/index.d.ts +3 -0
- package/types/chart/word-cloud/interface.d.ts +10 -0
- package/types/chart/word-cloud/word-cloud-3d.d.ts +11 -0
- package/types/chart/word-cloud/word-cloud.d.ts +11 -0
- package/types/compile/compilable-base.d.ts +11 -0
- package/types/compile/compiler.d.ts +60 -0
- package/types/compile/data/compilable-data.d.ts +23 -0
- package/types/compile/data/index.d.ts +2 -0
- package/types/compile/data/interface.d.ts +8 -0
- package/types/compile/grammar-item.d.ts +24 -0
- package/types/compile/interface/compilable-item.d.ts +36 -0
- package/types/compile/interface/compiler.d.ts +49 -0
- package/types/compile/interface/index.d.ts +2 -0
- package/types/compile/mark/compilable-mark.d.ts +111 -0
- package/types/compile/mark/index.d.ts +3 -0
- package/types/compile/mark/interface.d.ts +154 -0
- package/types/compile/mark/mark-data.d.ts +9 -0
- package/types/compile/mark/mark-state-manager.d.ts +26 -0
- package/types/compile/mark/util.d.ts +7 -0
- package/types/compile/signal/compilable-signal.d.ts +21 -0
- package/types/compile/signal/index.d.ts +4 -0
- package/types/compile/signal/interface.d.ts +12 -0
- package/types/compile/signal/signal-manager.d.ts +11 -0
- package/types/compile/signal/state-manager.d.ts +12 -0
- package/types/compile/util.d.ts +2 -0
- package/types/component/axis/base-axis.d.ts +149 -0
- package/types/component/axis/cartesian/axis.d.ts +112 -0
- package/types/component/axis/cartesian/band-axis.d.ts +40 -0
- package/types/component/axis/cartesian/config.d.ts +3 -0
- package/types/component/axis/cartesian/index.d.ts +7 -0
- package/types/component/axis/cartesian/interface/common.d.ts +56 -0
- package/types/component/axis/cartesian/interface/index.d.ts +3 -0
- package/types/component/axis/cartesian/interface/spec.d.ts +45 -0
- package/types/component/axis/cartesian/interface/theme.d.ts +22 -0
- package/types/component/axis/cartesian/linear-axis.d.ts +28 -0
- package/types/component/axis/cartesian/log-axis.d.ts +17 -0
- package/types/component/axis/cartesian/symlog-axis.d.ts +17 -0
- package/types/component/axis/cartesian/time-axis.d.ts +22 -0
- package/types/component/axis/cartesian/util/common.d.ts +13 -0
- package/types/component/axis/cartesian/util/index.d.ts +2 -0
- package/types/component/axis/cartesian/util/time.d.ts +80 -0
- package/types/component/axis/index.d.ts +3 -0
- package/types/component/axis/interface/common.d.ts +38 -0
- package/types/component/axis/interface/index.d.ts +3 -0
- package/types/component/axis/interface/spec.d.ts +91 -0
- package/types/component/axis/interface/theme.d.ts +15 -0
- package/types/component/axis/interface.d.ts +137 -0
- package/types/component/axis/mixin/band-axis-mixin.d.ts +42 -0
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +57 -0
- package/types/component/axis/polar/axis.d.ts +85 -0
- package/types/component/axis/polar/band-axis.d.ts +33 -0
- package/types/component/axis/polar/config.d.ts +3 -0
- package/types/component/axis/polar/index.d.ts +4 -0
- package/types/component/axis/polar/interface/common.d.ts +34 -0
- package/types/component/axis/polar/interface/index.d.ts +4 -0
- package/types/component/axis/polar/interface/spec.d.ts +21 -0
- package/types/component/axis/polar/interface/theme.d.ts +11 -0
- package/types/component/axis/polar/linear-axis.d.ts +23 -0
- package/types/component/axis/util.d.ts +28 -0
- package/types/component/base/base-component.d.ts +45 -0
- package/types/component/base/index.d.ts +1 -0
- package/types/component/base/interface.d.ts +8 -0
- package/types/component/base/util.d.ts +3 -0
- package/types/component/brush/brush.d.ts +79 -0
- package/types/component/brush/index.d.ts +2 -0
- package/types/component/brush/interface.d.ts +48 -0
- package/types/component/common/trigger/config.d.ts +22 -0
- package/types/component/common/trigger/desktop.d.ts +10 -0
- package/types/component/common/trigger/interface.d.ts +8 -0
- package/types/component/common/trigger/mobile.d.ts +11 -0
- package/types/component/crosshair/base.d.ts +77 -0
- package/types/component/crosshair/cartesian.d.ts +67 -0
- package/types/component/crosshair/config.d.ts +12 -0
- package/types/component/crosshair/index.d.ts +3 -0
- package/types/component/crosshair/interface/index.d.ts +2 -0
- package/types/component/crosshair/interface/spec.d.ts +71 -0
- package/types/component/crosshair/interface/theme.d.ts +9 -0
- package/types/component/crosshair/polar.d.ts +78 -0
- package/types/component/crosshair/util.d.ts +10 -0
- package/types/component/custom-mark/custom-mark.d.ts +34 -0
- package/types/component/custom-mark/index.d.ts +1 -0
- package/types/component/data-zoom/constant.d.ts +4 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +122 -0
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +65 -0
- package/types/component/data-zoom/data-zoom/index.d.ts +2 -0
- package/types/component/data-zoom/data-zoom/interface.d.ts +59 -0
- package/types/component/data-zoom/index.d.ts +2 -0
- package/types/component/data-zoom/interface.d.ts +59 -0
- package/types/component/data-zoom/scroll-bar/index.d.ts +2 -0
- package/types/component/data-zoom/scroll-bar/interface.d.ts +23 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +29 -0
- package/types/component/data-zoom/util.d.ts +19 -0
- package/types/component/geo/geo-coordinate.d.ts +62 -0
- package/types/component/geo/index.d.ts +2 -0
- package/types/component/geo/interface.d.ts +27 -0
- package/types/component/geo/projection.d.ts +17 -0
- package/types/component/index.d.ts +46 -0
- package/types/component/indicator/index.d.ts +2 -0
- package/types/component/indicator/indicator.d.ts +42 -0
- package/types/component/indicator/interface.d.ts +32 -0
- package/types/component/indicator/util.d.ts +13 -0
- package/types/component/interface/common.d.ts +36 -0
- package/types/component/interface/index.d.ts +4 -0
- package/types/component/interface/theme.d.ts +42 -0
- package/types/component/interface/tooltip-helper.d.ts +5 -0
- package/types/component/interface/type.d.ts +35 -0
- package/types/component/label/base-label.d.ts +40 -0
- package/types/component/label/index.d.ts +2 -0
- package/types/component/label/interface.d.ts +32 -0
- package/types/component/label/label.d.ts +47 -0
- package/types/component/label/totalLabel.d.ts +28 -0
- package/types/component/label/util.d.ts +57 -0
- package/types/component/legend/base-legend.d.ts +63 -0
- package/types/component/legend/continuous/index.d.ts +2 -0
- package/types/component/legend/continuous/interface.d.ts +58 -0
- package/types/component/legend/continuous/legend.d.ts +27 -0
- package/types/component/legend/continuous/util.d.ts +8 -0
- package/types/component/legend/discrete/index.d.ts +2 -0
- package/types/component/legend/discrete/interface.d.ts +61 -0
- package/types/component/legend/discrete/legend.d.ts +26 -0
- package/types/component/legend/discrete/util.d.ts +3 -0
- package/types/component/legend/index.d.ts +3 -0
- package/types/component/legend/interface.d.ts +39 -0
- package/types/component/legend/util.d.ts +26 -0
- package/types/component/map-label/component.d.ts +54 -0
- package/types/component/map-label/index.d.ts +2 -0
- package/types/component/map-label/interface.d.ts +40 -0
- package/types/component/map-label/layout.d.ts +23 -0
- package/types/component/marker/base-marker.d.ts +66 -0
- package/types/component/marker/interface.d.ts +65 -0
- package/types/component/marker/mark-area/index.d.ts +2 -0
- package/types/component/marker/mark-area/interface/index.d.ts +2 -0
- package/types/component/marker/mark-area/interface/spec.d.ts +26 -0
- package/types/component/marker/mark-area/interface/theme.d.ts +11 -0
- package/types/component/marker/mark-area/mark-area.d.ts +20 -0
- package/types/component/marker/mark-line/index.d.ts +2 -0
- package/types/component/marker/mark-line/interface/index.d.ts +2 -0
- package/types/component/marker/mark-line/interface/spec.d.ts +53 -0
- package/types/component/marker/mark-line/interface/theme.d.ts +13 -0
- package/types/component/marker/mark-line/mark-line.d.ts +20 -0
- package/types/component/marker/mark-line/util.d.ts +9 -0
- package/types/component/marker/mark-point/index.d.ts +2 -0
- package/types/component/marker/mark-point/interface/index.d.ts +2 -0
- package/types/component/marker/mark-point/interface/spec.d.ts +14 -0
- package/types/component/marker/mark-point/interface/theme.d.ts +37 -0
- package/types/component/marker/mark-point/mark-point.d.ts +20 -0
- package/types/component/marker/utils.d.ts +6 -0
- package/types/component/player/index.d.ts +2 -0
- package/types/component/player/interface/index.d.ts +2 -0
- package/types/component/player/interface/spec.d.ts +18 -0
- package/types/component/player/interface/theme.d.ts +32 -0
- package/types/component/player/player.d.ts +54 -0
- package/types/component/player/utils/index.d.ts +1 -0
- package/types/component/player/utils/orient.d.ts +3 -0
- package/types/component/player/utils/transform.d.ts +4 -0
- package/types/component/poptip/index.d.ts +1 -0
- package/types/component/poptip/interface.d.ts +15 -0
- package/types/component/title/index.d.ts +2 -0
- package/types/component/title/interface/index.d.ts +2 -0
- package/types/component/title/interface/spec.d.ts +45 -0
- package/types/component/title/interface/theme.d.ts +19 -0
- package/types/component/title/title.d.ts +49 -0
- package/types/component/title/utils.d.ts +2 -0
- package/types/component/tooltip/handler/base.d.ts +50 -0
- package/types/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +19 -0
- package/types/component/tooltip/handler/canvas/index.d.ts +1 -0
- package/types/component/tooltip/handler/constants.d.ts +17 -0
- package/types/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +25 -0
- package/types/component/tooltip/handler/dom/index.d.ts +1 -0
- package/types/component/tooltip/handler/dom/interface.d.ts +57 -0
- package/types/component/tooltip/handler/dom/model/base-tooltip-model.d.ts +25 -0
- package/types/component/tooltip/handler/dom/model/content-column-model.d.ts +23 -0
- package/types/component/tooltip/handler/dom/model/content-model.d.ts +15 -0
- package/types/component/tooltip/handler/dom/model/interface.d.ts +9 -0
- package/types/component/tooltip/handler/dom/model/shape-model.d.ts +22 -0
- package/types/component/tooltip/handler/dom/model/style-constants.d.ts +8 -0
- package/types/component/tooltip/handler/dom/model/text-model.d.ts +5 -0
- package/types/component/tooltip/handler/dom/model/title-model.d.ts +15 -0
- package/types/component/tooltip/handler/dom/model/tooltip-model.d.ts +21 -0
- package/types/component/tooltip/handler/dom/util.d.ts +6 -0
- package/types/component/tooltip/handler/index.d.ts +2 -0
- package/types/component/tooltip/handler/interface/index.d.ts +1 -0
- package/types/component/tooltip/handler/interface/style.d.ts +8 -0
- package/types/component/tooltip/handler/utils/attribute.d.ts +9 -0
- package/types/component/tooltip/handler/utils/common.d.ts +18 -0
- package/types/component/tooltip/handler/utils/compose.d.ts +5 -0
- package/types/component/tooltip/handler/utils/get-spec.d.ts +5 -0
- package/types/component/tooltip/handler/utils/index.d.ts +6 -0
- package/types/component/tooltip/handler/utils/pattern.d.ts +4 -0
- package/types/component/tooltip/handler/utils/position.d.ts +7 -0
- package/types/component/tooltip/index.d.ts +2 -0
- package/types/component/tooltip/interface/common.d.ts +24 -0
- package/types/component/tooltip/interface/event.d.ts +8 -0
- package/types/component/tooltip/interface/index.d.ts +3 -0
- package/types/component/tooltip/interface/spec.d.ts +29 -0
- package/types/component/tooltip/interface/theme.d.ts +49 -0
- package/types/component/tooltip/processor/base.d.ts +18 -0
- package/types/component/tooltip/processor/dimension-tooltip.d.ts +10 -0
- package/types/component/tooltip/processor/index.d.ts +5 -0
- package/types/component/tooltip/processor/interface.d.ts +16 -0
- package/types/component/tooltip/processor/mark-tooltip.d.ts +10 -0
- package/types/component/tooltip/processor/util.d.ts +4 -0
- package/types/component/tooltip/tooltip.d.ts +64 -0
- package/types/component/tooltip/utils/common.d.ts +5 -0
- package/types/component/tooltip/utils/index.d.ts +2 -0
- package/types/component/tooltip/utils/show-tooltip.d.ts +3 -0
- package/types/component/util.d.ts +4 -0
- package/types/constant/base.d.ts +3 -0
- package/types/constant/box-plot.d.ts +10 -0
- package/types/constant/correlation.d.ts +3 -0
- package/types/constant/event.d.ts +57 -0
- package/types/constant/funnel.d.ts +14 -0
- package/types/constant/hierarchy.d.ts +3 -0
- package/types/constant/index.d.ts +110 -0
- package/types/constant/label.d.ts +6 -0
- package/types/constant/layout.d.ts +2 -0
- package/types/constant/marker.d.ts +4 -0
- package/types/constant/polar.d.ts +23 -0
- package/types/constant/scatter.d.ts +7 -0
- package/types/constant/scroll-bar.d.ts +1 -0
- package/types/constant/sunburst.d.ts +1 -0
- package/types/constant/waterfall.d.ts +1 -0
- package/types/constant/word-cloud.d.ts +7 -0
- package/types/core/factory.d.ts +48 -0
- package/types/core/index.d.ts +12 -0
- package/types/core/instance-manager.d.ts +10 -0
- package/types/core/interface.d.ts +92 -0
- package/types/core/util.d.ts +3 -0
- package/types/core/vchart.d.ts +149 -0
- package/types/data/initialize.d.ts +21 -0
- package/types/data/parser/array.d.ts +2 -0
- package/types/data/parser/scale.d.ts +2 -0
- package/types/data/register.d.ts +3 -0
- package/types/data/transforms/add-property.d.ts +12 -0
- package/types/data/transforms/aggregation.d.ts +33 -0
- package/types/data/transforms/box-plot.d.ts +5 -0
- package/types/data/transforms/circle-packing.d.ts +7 -0
- package/types/data/transforms/copy-data-view.d.ts +5 -0
- package/types/data/transforms/correlation-center.d.ts +4 -0
- package/types/data/transforms/correlation.d.ts +17 -0
- package/types/data/transforms/data-key.d.ts +20 -0
- package/types/data/transforms/dimension-data.d.ts +10 -0
- package/types/data/transforms/dimension-statistics.d.ts +24 -0
- package/types/data/transforms/drill.d.ts +14 -0
- package/types/data/transforms/flatten.d.ts +9 -0
- package/types/data/transforms/funnel.d.ts +51 -0
- package/types/data/transforms/hierarchy-dimension-statistics.d.ts +3 -0
- package/types/data/transforms/invalid-travel.d.ts +8 -0
- package/types/data/transforms/legend-data/continuous/continuous.d.ts +4 -0
- package/types/data/transforms/legend-data/continuous/index.d.ts +2 -0
- package/types/data/transforms/legend-data/continuous/interface.d.ts +13 -0
- package/types/data/transforms/legend-data/discrete/discrete.d.ts +4 -0
- package/types/data/transforms/legend-data/discrete/index.d.ts +2 -0
- package/types/data/transforms/legend-data/discrete/interface.d.ts +15 -0
- package/types/data/transforms/link-dot-info.d.ts +13 -0
- package/types/data/transforms/lookup.d.ts +12 -0
- package/types/data/transforms/map.d.ts +7 -0
- package/types/data/transforms/obj-flat.d.ts +2 -0
- package/types/data/transforms/pie.d.ts +17 -0
- package/types/data/transforms/regression.d.ts +6 -0
- package/types/data/transforms/sankey-links.d.ts +2 -0
- package/types/data/transforms/sankey-nodes.d.ts +2 -0
- package/types/data/transforms/sankey.d.ts +22 -0
- package/types/data/transforms/stack-split.d.ts +6 -0
- package/types/data/transforms/sunburst.d.ts +7 -0
- package/types/data/transforms/treemap.d.ts +11 -0
- package/types/data/transforms/waterfall.d.ts +25 -0
- package/types/env/env.d.ts +7 -0
- package/types/env/index.d.ts +1 -0
- package/types/event/bubble.d.ts +15 -0
- package/types/event/event-dispatcher.d.ts +27 -0
- package/types/event/event.d.ts +18 -0
- package/types/event/events/dimension/base.d.ts +19 -0
- package/types/event/events/dimension/dimension-click.d.ts +7 -0
- package/types/event/events/dimension/dimension-hover.d.ts +9 -0
- package/types/event/events/dimension/index.d.ts +3 -0
- package/types/event/events/dimension/interface.d.ts +22 -0
- package/types/event/events/dimension/util/cartesian.d.ts +8 -0
- package/types/event/events/dimension/util/common.d.ts +8 -0
- package/types/event/events/dimension/util/index.d.ts +3 -0
- package/types/event/events/dimension/util/polar.d.ts +4 -0
- package/types/event/events/index.d.ts +5 -0
- package/types/event/interface.d.ts +160 -0
- package/types/index-lark.d.ts +4 -0
- package/types/index-wx.d.ts +4 -0
- package/types/index.d.ts +9 -0
- package/types/interaction/config.d.ts +22 -0
- package/types/interaction/dimension-trigger.d.ts +32 -0
- package/types/interaction/drill/drillable.d.ts +28 -0
- package/types/interaction/drill/index.d.ts +1 -0
- package/types/interaction/interaction.d.ts +20 -0
- package/types/interaction/interface.d.ts +49 -0
- package/types/interaction/trigger.d.ts +38 -0
- package/types/interaction/zoom/index.d.ts +1 -0
- package/types/interaction/zoom/zoomable.d.ts +80 -0
- package/types/layout/base-layout.d.ts +35 -0
- package/types/layout/grid-layout/grid-layout.d.ts +51 -0
- package/types/layout/index.d.ts +6 -0
- package/types/layout/interface.d.ts +45 -0
- package/types/layout/layout3d/index.d.ts +31 -0
- package/types/layout/util.d.ts +6 -0
- package/types/mark/arc-3d.d.ts +9 -0
- package/types/mark/arc.d.ts +20 -0
- package/types/mark/area.d.ts +11 -0
- package/types/mark/base/base-line.d.ts +8 -0
- package/types/mark/base/base-mark.d.ts +38 -0
- package/types/mark/base/index.d.ts +2 -0
- package/types/mark/box-plot.d.ts +12 -0
- package/types/mark/cell.d.ts +10 -0
- package/types/mark/component.d.ts +14 -0
- package/types/mark/group.d.ts +31 -0
- package/types/mark/image.d.ts +10 -0
- package/types/mark/index.d.ts +22 -0
- package/types/mark/interface/common.d.ts +77 -0
- package/types/mark/interface/index.d.ts +2 -0
- package/types/mark/interface/type.d.ts +24 -0
- package/types/mark/label.d.ts +27 -0
- package/types/mark/line.d.ts +11 -0
- package/types/mark/link-path.d.ts +12 -0
- package/types/mark/mark-set/index.d.ts +22 -0
- package/types/mark/path.d.ts +10 -0
- package/types/mark/polygon/base-polygon.d.ts +6 -0
- package/types/mark/polygon/polygon.d.ts +10 -0
- package/types/mark/polygon/pyramid-3d.d.ts +9 -0
- package/types/mark/progress-arc.d.ts +13 -0
- package/types/mark/rect-3d.d.ts +10 -0
- package/types/mark/rect.d.ts +10 -0
- package/types/mark/ripple.d.ts +12 -0
- package/types/mark/rule.d.ts +10 -0
- package/types/mark/symbol.d.ts +12 -0
- package/types/mark/text.d.ts +10 -0
- package/types/mark/utils/common.d.ts +3 -0
- package/types/mark/utils/index.d.ts +1 -0
- package/types/model/base-model.d.ts +84 -0
- package/types/model/interface.d.ts +188 -0
- package/types/model/layout-item.d.ts +59 -0
- package/types/model/tooltip-helper.d.ts +25 -0
- package/types/plugin/chart/interface.d.ts +6 -0
- package/types/plugin/components/axis-sync-plugin/axis-sync.d.ts +11 -0
- package/types/plugin/components/axis-sync-plugin/index.d.ts +1 -0
- package/types/plugin/components/axis-sync-plugin/tick-align-transform.d.ts +7 -0
- package/types/plugin/components/axis-sync-plugin/zero-align-transform.d.ts +15 -0
- package/types/plugin/components/basic-plugin.d.ts +9 -0
- package/types/plugin/components/index.d.ts +5 -0
- package/types/plugin/components/interface.d.ts +33 -0
- package/types/plugin/components/plugin-service.d.ts +15 -0
- package/types/plugin/interface.d.ts +4 -0
- package/types/plugin/series/interface.d.ts +9 -0
- package/types/region/interface.d.ts +59 -0
- package/types/region/region.d.ts +75 -0
- package/types/scale/color-ordinal-scale.d.ts +8 -0
- package/types/scale/global-scale.d.ts +37 -0
- package/types/scale/interface.d.ts +18 -0
- package/types/series/area/animation.d.ts +8 -0
- package/types/series/area/area.d.ts +32 -0
- package/types/series/area/constant.d.ts +2 -0
- package/types/series/area/interface.d.ts +22 -0
- package/types/series/area/tooltip-helpter.d.ts +5 -0
- package/types/series/bar/animation.d.ts +14 -0
- package/types/series/bar/bar-3d.d.ts +14 -0
- package/types/series/bar/bar.d.ts +52 -0
- package/types/series/bar/constant.d.ts +3 -0
- package/types/series/bar/interface.d.ts +39 -0
- package/types/series/base/base-series.d.ts +189 -0
- package/types/series/base/constant.d.ts +2 -0
- package/types/series/base/group.d.ts +12 -0
- package/types/series/base/series-data.d.ts +5 -0
- package/types/series/base/tooltip-helper.d.ts +29 -0
- package/types/series/box-plot/box-plot.d.ts +63 -0
- package/types/series/box-plot/constant.d.ts +2 -0
- package/types/series/box-plot/interface.d.ts +23 -0
- package/types/series/box-plot/tooltip-helper.d.ts +12 -0
- package/types/series/cartesian/cartesian.d.ts +95 -0
- package/types/series/cartesian/index.d.ts +2 -0
- package/types/series/cartesian/interface.d.ts +15 -0
- package/types/series/circle-packing/animation.d.ts +5 -0
- package/types/series/circle-packing/circle-packing.d.ts +45 -0
- package/types/series/circle-packing/constant.d.ts +2 -0
- package/types/series/circle-packing/interface.d.ts +21 -0
- package/types/series/circle-packing/tooltip-helper.d.ts +5 -0
- package/types/series/correlation/animation.d.ts +8 -0
- package/types/series/correlation/constant.d.ts +2 -0
- package/types/series/correlation/correlation.d.ts +55 -0
- package/types/series/correlation/interface.d.ts +37 -0
- package/types/series/dot/config.d.ts +4 -0
- package/types/series/dot/constant.d.ts +2 -0
- package/types/series/dot/dot.d.ts +73 -0
- package/types/series/dot/interface.d.ts +40 -0
- package/types/series/dot/tooltip-helper.d.ts +7 -0
- package/types/series/funnel/constant.d.ts +3 -0
- package/types/series/funnel/funnel-3d.d.ts +22 -0
- package/types/series/funnel/funnel.d.ts +95 -0
- package/types/series/funnel/interface.d.ts +61 -0
- package/types/series/funnel/tooltip-helper.d.ts +9 -0
- package/types/series/gauge/constant.d.ts +3 -0
- package/types/series/gauge/gauge-pointer.d.ts +37 -0
- package/types/series/gauge/gauge.d.ts +33 -0
- package/types/series/gauge/index.d.ts +3 -0
- package/types/series/gauge/interface.d.ts +48 -0
- package/types/series/geo/geo.d.ts +55 -0
- package/types/series/geo/interface.d.ts +4 -0
- package/types/series/heatmap/animation.d.ts +4 -0
- package/types/series/heatmap/constant.d.ts +2 -0
- package/types/series/heatmap/heatmap.d.ts +39 -0
- package/types/series/heatmap/interface.d.ts +23 -0
- package/types/series/heatmap/tooltip-helper.d.ts +6 -0
- package/types/series/index.d.ts +70 -0
- package/types/series/interface/common.d.ts +73 -0
- package/types/series/interface/index.d.ts +5 -0
- package/types/series/interface/series.d.ts +177 -0
- package/types/series/interface/theme.d.ts +104 -0
- package/types/series/interface/tooltip-helper.d.ts +13 -0
- package/types/series/interface/type.d.ts +91 -0
- package/types/series/line/animation.d.ts +7 -0
- package/types/series/line/constant.d.ts +2 -0
- package/types/series/line/interface.d.ts +21 -0
- package/types/series/line/line.d.ts +26 -0
- package/types/series/link/constant.d.ts +2 -0
- package/types/series/link/interface.d.ts +25 -0
- package/types/series/link/link.d.ts +53 -0
- package/types/series/link/tooltip-helper.d.ts +6 -0
- package/types/series/map/constant.d.ts +2 -0
- package/types/series/map/geo-source.d.ts +20 -0
- package/types/series/map/interface.d.ts +31 -0
- package/types/series/map/map.d.ts +48 -0
- package/types/series/map/tooltip-helper.d.ts +5 -0
- package/types/series/mixin/constant.d.ts +2 -0
- package/types/series/mixin/line-mixin.d.ts +60 -0
- package/types/series/pie/animation/animation.d.ts +25 -0
- package/types/series/pie/animation/centerOffset.d.ts +6 -0
- package/types/series/pie/constant.d.ts +3 -0
- package/types/series/pie/interface.d.ts +67 -0
- package/types/series/pie/pie-3d.d.ts +16 -0
- package/types/series/pie/pie.d.ts +83 -0
- package/types/series/polar/animation.d.ts +41 -0
- package/types/series/polar/interface.d.ts +22 -0
- package/types/series/polar/polar.d.ts +59 -0
- package/types/series/polar/progress-like/animation.d.ts +7 -0
- package/types/series/polar/progress-like/constant.d.ts +2 -0
- package/types/series/polar/progress-like/index.d.ts +3 -0
- package/types/series/polar/progress-like/interface.d.ts +21 -0
- package/types/series/polar/progress-like/progress-like.d.ts +34 -0
- package/types/series/polar/rose-like/index.d.ts +2 -0
- package/types/series/polar/rose-like/interface.d.ts +3 -0
- package/types/series/polar/rose-like/rose-like.d.ts +13 -0
- package/types/series/progress/circular/circular.d.ts +28 -0
- package/types/series/progress/circular/constant.d.ts +2 -0
- package/types/series/progress/circular/index.d.ts +1 -0
- package/types/series/progress/circular/interface.d.ts +20 -0
- package/types/series/progress/interface.d.ts +7 -0
- package/types/series/progress/linear/animation.d.ts +10 -0
- package/types/series/progress/linear/constant.d.ts +2 -0
- package/types/series/progress/linear/index.d.ts +1 -0
- package/types/series/progress/linear/interface.d.ts +26 -0
- package/types/series/progress/linear/linear.d.ts +27 -0
- package/types/series/progress/linear/tooltip-helper.d.ts +7 -0
- package/types/series/radar/animation.d.ts +73 -0
- package/types/series/radar/constant.d.ts +2 -0
- package/types/series/radar/interface.d.ts +22 -0
- package/types/series/radar/radar.d.ts +29 -0
- package/types/series/range-area/constant.d.ts +2 -0
- package/types/series/range-area/interface.d.ts +7 -0
- package/types/series/range-area/range-area.d.ts +15 -0
- package/types/series/range-area/tooltip-helper.d.ts +7 -0
- package/types/series/range-column/animation.d.ts +10 -0
- package/types/series/range-column/constant.d.ts +3 -0
- package/types/series/range-column/interface.d.ts +56 -0
- package/types/series/range-column/range-column-3d.d.ts +15 -0
- package/types/series/range-column/range-column.d.ts +26 -0
- package/types/series/range-column/tooltip-helper.d.ts +6 -0
- package/types/series/rose/animation.d.ts +13 -0
- package/types/series/rose/constant.d.ts +2 -0
- package/types/series/rose/interface.d.ts +19 -0
- package/types/series/rose/rose.d.ts +28 -0
- package/types/series/sankey/animation.d.ts +13 -0
- package/types/series/sankey/constant.d.ts +2 -0
- package/types/series/sankey/interface.d.ts +108 -0
- package/types/series/sankey/sankey.d.ts +61 -0
- package/types/series/sankey/tooltip-helper.d.ts +7 -0
- package/types/series/scatter/animation.d.ts +8 -0
- package/types/series/scatter/constant.d.ts +2 -0
- package/types/series/scatter/interface.d.ts +24 -0
- package/types/series/scatter/scatter.d.ts +37 -0
- package/types/series/sunburst/animation/enter.d.ts +3 -0
- package/types/series/sunburst/animation/exit.d.ts +3 -0
- package/types/series/sunburst/animation/index.d.ts +6 -0
- package/types/series/sunburst/animation/interface.d.ts +12 -0
- package/types/series/sunburst/animation/preset.d.ts +3 -0
- package/types/series/sunburst/animation/utils.d.ts +3 -0
- package/types/series/sunburst/constant.d.ts +2 -0
- package/types/series/sunburst/interface.d.ts +41 -0
- package/types/series/sunburst/sunburst.d.ts +60 -0
- package/types/series/sunburst/tooltip-helper.d.ts +5 -0
- package/types/series/treemap/animation.d.ts +5 -0
- package/types/series/treemap/constant.d.ts +2 -0
- package/types/series/treemap/interface.d.ts +41 -0
- package/types/series/treemap/tooltip-helper.d.ts +5 -0
- package/types/series/treemap/treemap.d.ts +58 -0
- package/types/series/util/label-mark.d.ts +4 -0
- package/types/series/util/spec.d.ts +2 -0
- package/types/series/util/stack.d.ts +9 -0
- package/types/series/util/utils.d.ts +5 -0
- package/types/series/waterfall/animation.d.ts +5 -0
- package/types/series/waterfall/constant.d.ts +2 -0
- package/types/series/waterfall/interface.d.ts +60 -0
- package/types/series/waterfall/waterfall.d.ts +40 -0
- package/types/series/word-cloud/animation.d.ts +14 -0
- package/types/series/word-cloud/base.d.ts +62 -0
- package/types/series/word-cloud/config.d.ts +16 -0
- package/types/series/word-cloud/constant.d.ts +2 -0
- package/types/series/word-cloud/interface.d.ts +120 -0
- package/types/series/word-cloud/word-cloud-3d.d.ts +13 -0
- package/types/series/word-cloud/word-cloud.d.ts +9 -0
- package/types/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
- package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +3 -0
- package/types/theme/builtin/common/component/axis/common-axis.d.ts +2 -0
- package/types/theme/builtin/common/component/axis/linear-axis.d.ts +2 -0
- package/types/theme/builtin/common/component/axis/polar-axis.d.ts +3 -0
- package/types/theme/builtin/common/component/brush.d.ts +2 -0
- package/types/theme/builtin/common/component/crosshair.d.ts +2 -0
- package/types/theme/builtin/common/component/data-zoom.d.ts +2 -0
- package/types/theme/builtin/common/component/index.d.ts +2 -0
- package/types/theme/builtin/common/component/indicator.d.ts +2 -0
- package/types/theme/builtin/common/component/legend/color-legend.d.ts +2 -0
- package/types/theme/builtin/common/component/legend/continuous.d.ts +2 -0
- package/types/theme/builtin/common/component/legend/discrete-legend.d.ts +2 -0
- package/types/theme/builtin/common/component/legend/size-legend.d.ts +2 -0
- package/types/theme/builtin/common/component/map-label.d.ts +2 -0
- package/types/theme/builtin/common/component/mark-area.d.ts +2 -0
- package/types/theme/builtin/common/component/mark-line.d.ts +2 -0
- package/types/theme/builtin/common/component/mark-point.d.ts +2 -0
- package/types/theme/builtin/common/component/player.d.ts +2 -0
- package/types/theme/builtin/common/component/poptip.d.ts +2 -0
- package/types/theme/builtin/common/component/scroll-bar.d.ts +2 -0
- package/types/theme/builtin/common/component/title.d.ts +2 -0
- package/types/theme/builtin/common/component/tooltip.d.ts +2 -0
- package/types/theme/builtin/common/component/total-label.d.ts +2 -0
- package/types/theme/builtin/common/constants.d.ts +2 -0
- package/types/theme/builtin/common/legacy/index.d.ts +1 -0
- package/types/theme/builtin/common/legacy/legend/color-legend.d.ts +2 -0
- package/types/theme/builtin/common/legacy/legend/continuous.d.ts +2 -0
- package/types/theme/builtin/common/legacy/legend/index.d.ts +2 -0
- package/types/theme/builtin/common/legacy/legend/size-legend.d.ts +2 -0
- package/types/theme/builtin/common/mark.d.ts +3 -0
- package/types/theme/builtin/common/series/area.d.ts +2 -0
- package/types/theme/builtin/common/series/bar.d.ts +2 -0
- package/types/theme/builtin/common/series/bar3d.d.ts +2 -0
- package/types/theme/builtin/common/series/box-plot.d.ts +2 -0
- package/types/theme/builtin/common/series/circle-packing.d.ts +2 -0
- package/types/theme/builtin/common/series/circular-progress.d.ts +2 -0
- package/types/theme/builtin/common/series/correlation.d.ts +2 -0
- package/types/theme/builtin/common/series/dot.d.ts +2 -0
- package/types/theme/builtin/common/series/funnel.d.ts +2 -0
- package/types/theme/builtin/common/series/funnel3d.d.ts +2 -0
- package/types/theme/builtin/common/series/gauge-pointer.d.ts +2 -0
- package/types/theme/builtin/common/series/gauge.d.ts +2 -0
- package/types/theme/builtin/common/series/heatmap.d.ts +2 -0
- package/types/theme/builtin/common/series/index.d.ts +2 -0
- package/types/theme/builtin/common/series/line.d.ts +2 -0
- package/types/theme/builtin/common/series/linear-progress.d.ts +2 -0
- package/types/theme/builtin/common/series/link.d.ts +2 -0
- package/types/theme/builtin/common/series/map.d.ts +2 -0
- package/types/theme/builtin/common/series/pie.d.ts +2 -0
- package/types/theme/builtin/common/series/pie3d.d.ts +2 -0
- package/types/theme/builtin/common/series/radar.d.ts +2 -0
- package/types/theme/builtin/common/series/rangeColumn.d.ts +2 -0
- package/types/theme/builtin/common/series/rose.d.ts +2 -0
- package/types/theme/builtin/common/series/sankey.d.ts +2 -0
- package/types/theme/builtin/common/series/scatter.d.ts +2 -0
- package/types/theme/builtin/common/series/sunburst.d.ts +2 -0
- package/types/theme/builtin/common/series/treemap.d.ts +2 -0
- package/types/theme/builtin/common/series/waterfall.d.ts +2 -0
- package/types/theme/builtin/common/series/word-cloud.d.ts +2 -0
- package/types/theme/builtin/common/series/word-cloud3d.d.ts +2 -0
- package/types/theme/builtin/dark/color-scheme.d.ts +2 -0
- package/types/theme/builtin/dark/index.d.ts +2 -0
- package/types/theme/builtin/index.d.ts +15 -0
- package/types/theme/builtin/light/color-scheme.d.ts +2 -0
- package/types/theme/builtin/light/index.d.ts +2 -0
- package/types/theme/color-scheme/builtin/default.d.ts +2 -0
- package/types/theme/color-scheme/builtin/index.d.ts +2 -0
- package/types/theme/color-scheme/builtin/interface.d.ts +23 -0
- package/types/theme/color-scheme/index.d.ts +3 -0
- package/types/theme/color-scheme/interface.d.ts +30 -0
- package/types/theme/color-scheme/util.d.ts +10 -0
- package/types/theme/index.d.ts +4 -0
- package/types/theme/interface.d.ts +57 -0
- package/types/theme/theme-manager.d.ts +13 -0
- package/types/theme/util.d.ts +5 -0
- package/types/typings/common.d.ts +7 -0
- package/types/typings/coordinate.d.ts +9 -0
- package/types/typings/cursor.d.ts +1 -0
- package/types/typings/data.d.ts +2 -0
- package/types/typings/event.d.ts +1 -0
- package/types/typings/geo.d.ts +3 -0
- package/types/typings/group.d.ts +8 -0
- package/types/typings/index.d.ts +14 -0
- package/types/typings/interpolate.d.ts +5 -0
- package/types/typings/line-stroke.d.ts +3 -0
- package/types/typings/params.d.ts +17 -0
- package/types/typings/scale.d.ts +33 -0
- package/types/typings/shape.d.ts +27 -0
- package/types/typings/space.d.ts +19 -0
- package/types/typings/spec/chart.d.ts +61 -0
- package/types/typings/spec/common.d.ts +267 -0
- package/types/typings/spec/index.d.ts +4 -0
- package/types/typings/tooltip/common.d.ts +8 -0
- package/types/typings/tooltip/handler.d.ts +8 -0
- package/types/typings/tooltip/index.d.ts +6 -0
- package/types/typings/tooltip/label.d.ts +10 -0
- package/types/typings/tooltip/line.d.ts +18 -0
- package/types/typings/tooltip/position.d.ts +31 -0
- package/types/typings/tooltip/shape.d.ts +23 -0
- package/types/typings/tooltip/tooltip.d.ts +26 -0
- package/types/typings/visual.d.ts +285 -0
- package/types/util/array.d.ts +3 -0
- package/types/util/color.d.ts +3 -0
- package/types/util/data.d.ts +38 -0
- package/types/util/debug.d.ts +9 -0
- package/types/util/env.d.ts +7 -0
- package/types/util/hierarchy.d.ts +3 -0
- package/types/util/id.d.ts +2 -0
- package/types/util/image.d.ts +4 -0
- package/types/util/index.d.ts +22 -0
- package/types/util/math.d.ts +27 -0
- package/types/util/model.d.ts +4 -0
- package/types/util/object.d.ts +3 -0
- package/types/util/scale.d.ts +20 -0
- package/types/util/space.d.ts +14 -0
- package/types/util/spec/background.d.ts +4 -0
- package/types/util/spec/clone-deep.d.ts +1 -0
- package/types/util/spec/common.d.ts +5 -0
- package/types/util/spec/index.d.ts +7 -0
- package/types/util/spec/merge-spec.d.ts +5 -0
- package/types/util/spec/merge-theme.d.ts +6 -0
- package/types/util/spec/preprocess.d.ts +3 -0
- package/types/util/spec/transform.d.ts +3 -0
- package/types/util/style.d.ts +4 -0
- package/types/util/text.d.ts +5 -0
- package/types/util/type.d.ts +7 -0
- package/types/vchart-all.d.ts +2 -0
- package/types/vchart-simple.d.ts +3 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { IMarkProgressiveConfig, IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
2
|
+
import type { IModel } from '../../model/interface';
|
|
3
|
+
import type { GrammarItemCompileOption, GrammarItemInitOption } from '../interface';
|
|
4
|
+
import type { IGrammarItem } from '../interface';
|
|
5
|
+
import type { MarkStateManager } from './mark-state-manager';
|
|
6
|
+
import type { DataView } from '@visactor/vdataset';
|
|
7
|
+
import type { IAnimate, IAnimateArranger, IElement, IGroupMark, IMark, MarkAnimationSpec, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
8
|
+
import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
9
|
+
import type { MarkData } from './mark-data';
|
|
10
|
+
import type { ILabelSpec } from '../../component/label';
|
|
11
|
+
import type { IRegion } from '../../region/interface';
|
|
12
|
+
export interface ICompilableMarkOption extends GrammarItemInitOption {
|
|
13
|
+
key?: string | ((datum: Datum) => string);
|
|
14
|
+
groupKey?: string;
|
|
15
|
+
skipBeforeLayouted?: boolean;
|
|
16
|
+
support3d?: boolean;
|
|
17
|
+
mode?: '2d' | '3d';
|
|
18
|
+
}
|
|
19
|
+
export interface ICompilableMark extends IGrammarItem {
|
|
20
|
+
readonly type: MarkType;
|
|
21
|
+
readonly id: number;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly key?: string | ((datum: Datum) => string);
|
|
24
|
+
readonly model: IModel;
|
|
25
|
+
getData: () => MarkData | undefined;
|
|
26
|
+
setData: (d: MarkData) => void;
|
|
27
|
+
getDataView: () => DataView | undefined;
|
|
28
|
+
setDataView: (d?: DataView, productId?: string) => void;
|
|
29
|
+
getFacet: () => string | undefined;
|
|
30
|
+
setFacet: (facet: string) => void;
|
|
31
|
+
getLabelSpec: () => ILabelSpec[];
|
|
32
|
+
setLabelSpec: (label: ILabelSpec | ILabelSpec[]) => void;
|
|
33
|
+
addLabelSpec: (label: ILabelSpec) => void;
|
|
34
|
+
state: MarkStateManager;
|
|
35
|
+
readonly stateStyle: IMarkStateStyle<any>;
|
|
36
|
+
hasState: (state: string) => boolean;
|
|
37
|
+
getState: (state: string) => any;
|
|
38
|
+
updateState: (newState: Record<string, unknown>) => Promise<void>;
|
|
39
|
+
updateStaticEncode: () => void;
|
|
40
|
+
compileEncode: () => void;
|
|
41
|
+
updateLayoutState: (noRender?: boolean, recursion?: boolean) => Promise<void>;
|
|
42
|
+
updateMarkState: (key: string) => void;
|
|
43
|
+
setTransform: (transform: TransformSpec[] | Nil) => void;
|
|
44
|
+
getInteractive: () => boolean;
|
|
45
|
+
setInteractive: (interactive: boolean) => void;
|
|
46
|
+
setAnimationConfig: (config: Partial<MarkAnimationSpec>) => void;
|
|
47
|
+
getAnimationConfig: () => Partial<MarkAnimationSpec>;
|
|
48
|
+
getZIndex: () => number;
|
|
49
|
+
setZIndex: (zIndex: number) => void;
|
|
50
|
+
getVisible: () => boolean;
|
|
51
|
+
setVisible: (visible: boolean) => void;
|
|
52
|
+
getMorph: () => boolean;
|
|
53
|
+
setMorph: (morph: boolean) => void;
|
|
54
|
+
getProgressiveConfig: () => IMarkProgressiveConfig;
|
|
55
|
+
setProgressiveConfig: (config: IMarkProgressiveConfig) => void;
|
|
56
|
+
getMorphKey: () => string | undefined;
|
|
57
|
+
setMorphKey: (morphKey: string) => void;
|
|
58
|
+
getMorphElementKey: () => string | undefined;
|
|
59
|
+
setMorphElementKey: (morphKey: string) => void;
|
|
60
|
+
getGroupKey: () => string | undefined;
|
|
61
|
+
setGroupKey: (groupKey: string) => void;
|
|
62
|
+
getUserId: () => StringOrNumber | undefined;
|
|
63
|
+
setUserId: (id: StringOrNumber) => void;
|
|
64
|
+
getSupport3d: () => boolean | undefined;
|
|
65
|
+
compile: (option?: IMarkCompileOption) => void;
|
|
66
|
+
getProduct: () => Maybe<IMark>;
|
|
67
|
+
getMarks: () => ICompilableMark[];
|
|
68
|
+
setSkipBeforeLayouted: (skip: boolean) => void;
|
|
69
|
+
getSkipBeforeLayouted: () => boolean;
|
|
70
|
+
runAnimationByState: (animationState?: string) => IAnimateArranger;
|
|
71
|
+
stopAnimationByState: (animationState?: string) => IAnimate;
|
|
72
|
+
pauseAnimationByState: (animationState: string) => IAnimate;
|
|
73
|
+
resumeAnimationByState: (animationState: string) => IAnimate;
|
|
74
|
+
}
|
|
75
|
+
export interface IMarkDataInitOption extends ICompilableMarkOption {
|
|
76
|
+
mark: ICompilableMark;
|
|
77
|
+
}
|
|
78
|
+
export interface IMarkCompileOption extends GrammarItemCompileOption {
|
|
79
|
+
group?: string | IGroupMark;
|
|
80
|
+
ignoreChildren?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface IStateInfo {
|
|
83
|
+
stateValue: StateValue;
|
|
84
|
+
fields?: any | null | undefined;
|
|
85
|
+
datums?: any[] | null | undefined;
|
|
86
|
+
datumKeys?: string[] | null | undefined;
|
|
87
|
+
items?: any[] | null | undefined;
|
|
88
|
+
filter?: ((datum: any, options: Record<string, any>) => boolean) | null | undefined;
|
|
89
|
+
cache?: {
|
|
90
|
+
[key: string]: {
|
|
91
|
+
[key: string]: boolean;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
level?: number | undefined;
|
|
95
|
+
}
|
|
96
|
+
export interface IStateSpec {
|
|
97
|
+
stateValue: StateValue;
|
|
98
|
+
datums?: any[] | null | undefined;
|
|
99
|
+
datumKeys?: string[] | null | undefined;
|
|
100
|
+
level?: number | undefined;
|
|
101
|
+
}
|
|
102
|
+
export interface IMarkState {
|
|
103
|
+
readonly id: number;
|
|
104
|
+
getStates: () => IStateInfo[];
|
|
105
|
+
getState: (stateValue: StateValue) => IStateInfo | undefined;
|
|
106
|
+
addState: (stateInfo: IStateInfo) => void;
|
|
107
|
+
changeState: (stateInfo: Partial<IStateInfo>, update?: boolean) => void;
|
|
108
|
+
checkState: (item: any, datum: any) => string[];
|
|
109
|
+
clearState: (stateValues: StateValue[], update?: boolean) => void;
|
|
110
|
+
update: () => void;
|
|
111
|
+
}
|
|
112
|
+
export declare enum STATE_VALUE_ENUM {
|
|
113
|
+
STATE_NORMAL = "normal",
|
|
114
|
+
STATE_HOVER = "hover",
|
|
115
|
+
STATE_HOVER_REVERSE = "hover_reverse",
|
|
116
|
+
STATE_DIMENSION_HOVER = "dimension_hover",
|
|
117
|
+
STATE_DIMENSION_HOVER_REVERSE = "dimension_hover_reverse",
|
|
118
|
+
STATE_SELECTED = "selected",
|
|
119
|
+
STATE_SELECTED_REVERSE = "selected_reverse"
|
|
120
|
+
}
|
|
121
|
+
export declare enum STATE_VALUE_ENUM_REVERSE {
|
|
122
|
+
STATE_HOVER_REVERSE = "hover_reverse",
|
|
123
|
+
STATE_DIMENSION_HOVER_REVERSE = "dimension_hover_reverse",
|
|
124
|
+
STATE_SELECTED_REVERSE = "selected_reverse"
|
|
125
|
+
}
|
|
126
|
+
export type STATE_NORMAL = typeof STATE_VALUE_ENUM.STATE_NORMAL;
|
|
127
|
+
export type STATE_HOVER = typeof STATE_VALUE_ENUM.STATE_HOVER;
|
|
128
|
+
export type STATE_HOVER_REVERSE = typeof STATE_VALUE_ENUM.STATE_HOVER_REVERSE;
|
|
129
|
+
export type STATE_CUSTOM = string;
|
|
130
|
+
export type StateValueNot = STATE_HOVER_REVERSE | STATE_CUSTOM;
|
|
131
|
+
export type StateValue = STATE_NORMAL | STATE_HOVER | STATE_CUSTOM;
|
|
132
|
+
export type StateValueType = StateValue | StateValueNot;
|
|
133
|
+
export declare enum STATE_LEVEL {
|
|
134
|
+
NORMAL = 0,
|
|
135
|
+
DIMENSION_SELECTED = 1,
|
|
136
|
+
RELATIONAL_SELECTED = 2,
|
|
137
|
+
SELECTED = 3,
|
|
138
|
+
DIMENSION_HOVER = 4,
|
|
139
|
+
RELATIONAL_HOVER = 5,
|
|
140
|
+
HOVER = 6
|
|
141
|
+
}
|
|
142
|
+
export interface IAttributeOpt {
|
|
143
|
+
element: IElement;
|
|
144
|
+
mark: IElement['mark'];
|
|
145
|
+
parent: IElement['mark']['group'];
|
|
146
|
+
}
|
|
147
|
+
export interface IModelMarkAttributeContext {
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
export interface ISeriesMarkAttributeContext extends IModelMarkAttributeContext {
|
|
151
|
+
globalScale: (scaleKey: string, value: string | number) => unknown;
|
|
152
|
+
seriesColor: (seriesValue?: string | number) => string;
|
|
153
|
+
getRegion: () => IRegion;
|
|
154
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CompilableData } from '../data/compilable-data';
|
|
2
|
+
import type { ICompilableMark, IMarkDataInitOption } from './interface';
|
|
3
|
+
export declare class MarkData extends CompilableData {
|
|
4
|
+
protected _mark: ICompilableMark;
|
|
5
|
+
constructor(option: IMarkDataInitOption);
|
|
6
|
+
setCompiledProductId(name: string): void;
|
|
7
|
+
generateProductId(): string;
|
|
8
|
+
protected _compileProduct(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IElement, IMark as IVGrammarMark } from '@visactor/vgrammar-core';
|
|
2
|
+
import type { Datum, StringOrNumber } from '../../typings';
|
|
3
|
+
import type { IStateManagerOption } from '../signal/interface';
|
|
4
|
+
import { StateManager } from '../signal/state-manager';
|
|
5
|
+
import type { CompilableMark } from './compilable-mark';
|
|
6
|
+
import type { IStateInfo, StateValue } from './interface';
|
|
7
|
+
export declare class MarkStateManager extends StateManager {
|
|
8
|
+
protected _mark: CompilableMark;
|
|
9
|
+
private _stateInfoList;
|
|
10
|
+
getStateInfoList(): IStateInfo[];
|
|
11
|
+
constructor(option: IStateManagerOption, mark: CompilableMark);
|
|
12
|
+
protected _getDefaultStateMap(): Record<string, unknown>;
|
|
13
|
+
getStateInfo(stateValue: StateValue): IStateInfo;
|
|
14
|
+
addStateInfo(stateInfo: IStateInfo): void;
|
|
15
|
+
private _clearStateBeforeSet;
|
|
16
|
+
changeStateInfo(stateInfo: Partial<IStateInfo>): void;
|
|
17
|
+
clearStateInfo(stateValues: StateValue[]): void;
|
|
18
|
+
checkOneState(renderNode: IElement, datum: Datum | Datum[], state: IStateInfo, isMultiMark?: boolean): 'in' | 'out' | 'skip';
|
|
19
|
+
checkState(renderNode: IElement, datum: Datum | Datum[]): StateValue[];
|
|
20
|
+
checkDatumState(state: IStateInfo, datum: Datum | Datum[], isMultiMark: boolean): boolean;
|
|
21
|
+
checkItemsState(state: IStateInfo, item: any): boolean | undefined;
|
|
22
|
+
checkFieldsState(state: IStateInfo, datum: Datum | Datum[], item: any, isMultiMark: boolean): boolean;
|
|
23
|
+
checkLinearFieldState(domain: StringOrNumber[], key: string, datum: any, item: any, isMultiMark: boolean): boolean;
|
|
24
|
+
updateLayoutState(noRender?: boolean): Promise<void>;
|
|
25
|
+
compileState(product: IVGrammarMark): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IAttrs, IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
2
|
+
export declare function isAttrChangeable<T>(key: string, stateStyle: IMarkStateStyle<T>): boolean;
|
|
3
|
+
export declare function isStateAttrChangeable<T>(key: string, stateStyle: Partial<IAttrs<T>>, facetField: string): boolean;
|
|
4
|
+
export declare function needAttrTransform(type: MarkType, attr: string): boolean;
|
|
5
|
+
export declare function attrTransform(type: MarkType, attr: string, value: any): any;
|
|
6
|
+
export declare function stateInDefaultEnum(state: string): boolean;
|
|
7
|
+
export declare function stateToReverse(state: string): any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ISignal, SignalFunctionType } from '@visactor/vgrammar-core';
|
|
2
|
+
import { GrammarItem } from '../grammar-item';
|
|
3
|
+
import type { Maybe } from '../../typings';
|
|
4
|
+
import type { GrammarItemInitOption } from '../interface';
|
|
5
|
+
import { GrammarType } from '../interface/compilable-item';
|
|
6
|
+
import type { ICompilableSignal } from './interface';
|
|
7
|
+
export declare class CompilableSignal<T> extends GrammarItem implements ICompilableSignal<T> {
|
|
8
|
+
readonly grammarType = GrammarType.signal;
|
|
9
|
+
protected _product: Maybe<ISignal<T>>;
|
|
10
|
+
getProduct: () => Maybe<ISignal<T>>;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
protected _value: Maybe<T>;
|
|
13
|
+
getValue(): T;
|
|
14
|
+
protected _updateFunc: Maybe<SignalFunctionType<T>>;
|
|
15
|
+
getUpdateFunc(): SignalFunctionType<T>;
|
|
16
|
+
constructor(option: GrammarItemInitOption, name: string, value?: T, updateFunc?: SignalFunctionType<T>);
|
|
17
|
+
updateSignal(value?: T, updateFunc?: SignalFunctionType<T>): void;
|
|
18
|
+
protected _compileProduct(): void;
|
|
19
|
+
generateProductId(): string;
|
|
20
|
+
protected _lookupGrammar(id: string): ISignal<unknown>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SignalFunctionType } from '@visactor/vgrammar-core';
|
|
2
|
+
import type { Maybe } from '../../typings';
|
|
3
|
+
import type { IGrammarItem, ICompilableInitOption } from '../interface';
|
|
4
|
+
export interface IStateManagerOption extends ICompilableInitOption {
|
|
5
|
+
stateKeyToSignalName?: (key: string) => string;
|
|
6
|
+
}
|
|
7
|
+
export type StateValueMap = Record<string, unknown>;
|
|
8
|
+
export interface ICompilableSignal<T> extends IGrammarItem {
|
|
9
|
+
updateSignal: (value?: T, updateFunc?: SignalFunctionType<T>) => void;
|
|
10
|
+
getValue: () => Maybe<T>;
|
|
11
|
+
getUpdateFunc: () => Maybe<SignalFunctionType<T>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SignalFunctionType } from '@visactor/vgrammar-core';
|
|
2
|
+
import { CompilableSignal } from './compilable-signal';
|
|
3
|
+
import { CompilableBase } from '../compilable-base';
|
|
4
|
+
export declare class SignalManager extends CompilableBase {
|
|
5
|
+
protected _signalMap: Record<string, CompilableSignal<any>>;
|
|
6
|
+
getSignalMap(): Record<string, CompilableSignal<any>>;
|
|
7
|
+
getSignal(name: string): CompilableSignal<any>;
|
|
8
|
+
updateSignal(name: string, value: any, updateFunc?: SignalFunctionType<any>): void;
|
|
9
|
+
compile(): void;
|
|
10
|
+
release(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IStateManagerOption, StateValueMap } from './interface';
|
|
2
|
+
import { SignalManager } from './signal-manager';
|
|
3
|
+
export declare class StateManager extends SignalManager {
|
|
4
|
+
protected _stateMap: StateValueMap;
|
|
5
|
+
getStateMap(): StateValueMap;
|
|
6
|
+
protected _getDefaultStateMap(): StateValueMap;
|
|
7
|
+
protected stateKeyToSignalName: (key: string) => string;
|
|
8
|
+
constructor(option: IStateManagerOption);
|
|
9
|
+
initStateMap(state?: StateValueMap): void;
|
|
10
|
+
compile(stateMap?: StateValueMap): void;
|
|
11
|
+
updateState(newState: Partial<StateValueMap>, noRender?: boolean): Promise<any>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { IBaseScale } from '@visactor/vscale';
|
|
2
|
+
import type { IGroup, IGraphic } from '@visactor/vrender-core';
|
|
3
|
+
import type { AxisItem } from '@visactor/vrender-components';
|
|
4
|
+
import type { IOrientType, IPolarOrientType, StringOrNumber } from '../../typings';
|
|
5
|
+
import { BaseComponent } from '../base/base-component';
|
|
6
|
+
import type { IPolarAxisCommonTheme } from './polar/interface';
|
|
7
|
+
import type { ICartesianAxisCommonTheme } from './cartesian/interface';
|
|
8
|
+
import type { CompilableData } from '../../compile/data';
|
|
9
|
+
import type { IAxis, ICommonAxisSpec, ITick, StatisticsDomain } from './interface';
|
|
10
|
+
import type { IComponentOption } from '../interface';
|
|
11
|
+
import type { ISeries } from '../../series/interface';
|
|
12
|
+
import type { ITransformOptions } from '@visactor/vdataset';
|
|
13
|
+
import { type IComponentMark } from '../../mark/component';
|
|
14
|
+
export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<string, any> = any> extends BaseComponent<T> implements IAxis {
|
|
15
|
+
static specKey: string;
|
|
16
|
+
protected _orient: IPolarOrientType | IOrientType;
|
|
17
|
+
getOrient(): IOrientType | IPolarOrientType;
|
|
18
|
+
protected _scale: IBaseScale;
|
|
19
|
+
getScale(): IBaseScale;
|
|
20
|
+
protected _scales: IBaseScale[];
|
|
21
|
+
getScales(): IBaseScale[];
|
|
22
|
+
protected _theme: ICartesianAxisCommonTheme | IPolarAxisCommonTheme;
|
|
23
|
+
protected _tickData: CompilableData;
|
|
24
|
+
getTickData(): CompilableData;
|
|
25
|
+
protected _statisticsDomain: StatisticsDomain;
|
|
26
|
+
getStatisticsDomain(): StatisticsDomain;
|
|
27
|
+
protected _seriesUserId?: StringOrNumber[];
|
|
28
|
+
protected _seriesIndex?: number[];
|
|
29
|
+
protected _regionUserId?: StringOrNumber[];
|
|
30
|
+
protected _regionIndex?: number[];
|
|
31
|
+
protected _visible: boolean;
|
|
32
|
+
get visible(): boolean;
|
|
33
|
+
protected _tick: ITick | undefined;
|
|
34
|
+
protected abstract computeDomain(data: {
|
|
35
|
+
min: number;
|
|
36
|
+
max: number;
|
|
37
|
+
values: any[];
|
|
38
|
+
}[]): StringOrNumber[];
|
|
39
|
+
abstract valueToPosition(value: any): number;
|
|
40
|
+
protected abstract axisHelper(): any;
|
|
41
|
+
protected abstract getSeriesStatisticsField(s: ISeries): string[];
|
|
42
|
+
protected abstract updateSeriesScale(): void;
|
|
43
|
+
protected abstract collectData(depth: number): {
|
|
44
|
+
min: number;
|
|
45
|
+
max: number;
|
|
46
|
+
values: any[];
|
|
47
|
+
}[];
|
|
48
|
+
protected abstract _initData(): void;
|
|
49
|
+
abstract transformScaleDomain(): void;
|
|
50
|
+
protected _dataFieldText: string;
|
|
51
|
+
protected _axisMark: IComponentMark;
|
|
52
|
+
protected _gridMark: IComponentMark;
|
|
53
|
+
constructor(spec: T, options: IComponentOption);
|
|
54
|
+
getVRenderComponents(): IGraphic[];
|
|
55
|
+
created(): void;
|
|
56
|
+
protected isSeriesDataEnable(): boolean;
|
|
57
|
+
protected setSeriesAndRegionsFromSpec(): void;
|
|
58
|
+
getBindSeriesFilter(): {
|
|
59
|
+
userId: StringOrNumber[];
|
|
60
|
+
specIndex: number[];
|
|
61
|
+
};
|
|
62
|
+
protected computeStatisticsDomain: () => void;
|
|
63
|
+
protected initEvent(): void;
|
|
64
|
+
protected updateScaleDomain(): void;
|
|
65
|
+
protected computeData(): void;
|
|
66
|
+
protected initScales(): void;
|
|
67
|
+
_compareSpec(): {
|
|
68
|
+
change: boolean;
|
|
69
|
+
reMake: boolean;
|
|
70
|
+
reRender: boolean;
|
|
71
|
+
reSize: boolean;
|
|
72
|
+
reCompile: boolean;
|
|
73
|
+
};
|
|
74
|
+
protected getLabelFormatMethod(): (value: any, datum: any, index: number) => any;
|
|
75
|
+
protected getLabelItems(length: number): any[];
|
|
76
|
+
protected _delegateAxisContainerEvent(component: IGroup): void;
|
|
77
|
+
protected _getAxisAttributes(): {
|
|
78
|
+
orient: IOrientType | IPolarOrientType;
|
|
79
|
+
select: boolean;
|
|
80
|
+
hover: boolean;
|
|
81
|
+
line: any;
|
|
82
|
+
label: {
|
|
83
|
+
style: any;
|
|
84
|
+
formatMethod: (value: any, datum: any, index: number) => any;
|
|
85
|
+
state: {};
|
|
86
|
+
};
|
|
87
|
+
tick: {
|
|
88
|
+
visible: boolean;
|
|
89
|
+
length: number;
|
|
90
|
+
inside: boolean;
|
|
91
|
+
alignWithLabel: boolean;
|
|
92
|
+
style: any;
|
|
93
|
+
state: {};
|
|
94
|
+
dataFilter: (data: AxisItem[]) => AxisItem[];
|
|
95
|
+
};
|
|
96
|
+
subTick: {
|
|
97
|
+
visible: boolean;
|
|
98
|
+
length: number;
|
|
99
|
+
inside: boolean;
|
|
100
|
+
count: number;
|
|
101
|
+
style: any;
|
|
102
|
+
state: {};
|
|
103
|
+
};
|
|
104
|
+
title: {
|
|
105
|
+
visible: any;
|
|
106
|
+
position: any;
|
|
107
|
+
space: any;
|
|
108
|
+
autoRotate: boolean;
|
|
109
|
+
angle: number;
|
|
110
|
+
textStyle: any;
|
|
111
|
+
padding: any;
|
|
112
|
+
shape: {
|
|
113
|
+
visible: any;
|
|
114
|
+
space: any;
|
|
115
|
+
style: any;
|
|
116
|
+
};
|
|
117
|
+
background: {
|
|
118
|
+
visible: any;
|
|
119
|
+
style: any;
|
|
120
|
+
};
|
|
121
|
+
state: {
|
|
122
|
+
text: {};
|
|
123
|
+
shape: {};
|
|
124
|
+
background: {};
|
|
125
|
+
};
|
|
126
|
+
pickable: boolean;
|
|
127
|
+
childrenPickable: boolean;
|
|
128
|
+
};
|
|
129
|
+
panel: {
|
|
130
|
+
visible: any;
|
|
131
|
+
style: any;
|
|
132
|
+
state: {};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
protected _getGridAttributes(): {
|
|
136
|
+
alternateColor: any;
|
|
137
|
+
alignWithLabel: any;
|
|
138
|
+
style: any;
|
|
139
|
+
subGrid: {
|
|
140
|
+
type: string;
|
|
141
|
+
visible: any;
|
|
142
|
+
alternateColor: any;
|
|
143
|
+
style: any;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
addTransformToTickData(options: ITransformOptions, execute?: boolean): void;
|
|
147
|
+
dataToPosition(values: any[]): number;
|
|
148
|
+
}
|
|
149
|
+
export declare const registerAxis: () => void;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
|
+
import type { IEffect, IModelInitOption, ILayoutRect } from '../../../model/interface';
|
|
3
|
+
import type { ICartesianSeries } from '../../../series/interface';
|
|
4
|
+
import type { IRegion } from '../../../region/interface';
|
|
5
|
+
import type { ICartesianAxisCommonSpec, IAxisHelper, ICartesianAxisCommonTheme } from './interface';
|
|
6
|
+
import type { IOrientType } from '../../../typings/space';
|
|
7
|
+
import type { IBaseScale } from '@visactor/vscale';
|
|
8
|
+
import type { LayoutItem } from '../../../model/layout-item';
|
|
9
|
+
import type { IPoint, StringOrNumber } from '../../../typings';
|
|
10
|
+
import type { IComponentOption } from '../../interface';
|
|
11
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
12
|
+
import type { IAxis, ITick } from '../interface';
|
|
13
|
+
import type { DataSet } from '@visactor/vdataset';
|
|
14
|
+
import { AxisComponent } from '../base-axis';
|
|
15
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
16
|
+
export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec = ICartesianAxisCommonSpec> extends AxisComponent<T> implements IAxis {
|
|
17
|
+
static type: ComponentTypeEnum;
|
|
18
|
+
type: ComponentTypeEnum;
|
|
19
|
+
name: string;
|
|
20
|
+
protected readonly _defaultBandPosition = 0.5;
|
|
21
|
+
protected readonly _defaultBandInnerPadding = 0.1;
|
|
22
|
+
protected readonly _defaultBandOuterPadding = 0.3;
|
|
23
|
+
directionStr?: 'l2r' | 'r2l' | 't2b' | 'b2t';
|
|
24
|
+
layoutType: LayoutItem['layoutType'];
|
|
25
|
+
layoutZIndex: number;
|
|
26
|
+
layoutLevel: number;
|
|
27
|
+
protected _dataSet: DataSet;
|
|
28
|
+
layout3dBox?: {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
length: number;
|
|
32
|
+
};
|
|
33
|
+
protected _orient: IOrientType;
|
|
34
|
+
getOrient(): IOrientType;
|
|
35
|
+
get layoutOrient(): IOrientType;
|
|
36
|
+
set layoutOrient(v: IOrientType);
|
|
37
|
+
protected _scales: IBaseScale[];
|
|
38
|
+
getScales(): IBaseScale[];
|
|
39
|
+
protected _theme: ICartesianAxisCommonTheme;
|
|
40
|
+
protected _statisticsDomain: {
|
|
41
|
+
domain: any[];
|
|
42
|
+
index: {
|
|
43
|
+
[key in StringOrNumber]: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
getStatisticsDomain(): {
|
|
47
|
+
domain: any[];
|
|
48
|
+
index: {
|
|
49
|
+
[x: string]: number;
|
|
50
|
+
[x: number]: number;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
protected _tick: ITick | undefined;
|
|
54
|
+
private _axisStyle;
|
|
55
|
+
private _latestBounds;
|
|
56
|
+
private _verticalLimitSize;
|
|
57
|
+
private _unitText;
|
|
58
|
+
protected _layoutCache: {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
_lastComputeOutBounds: IBoundsLike;
|
|
62
|
+
};
|
|
63
|
+
constructor(spec: T, options: IComponentOption);
|
|
64
|
+
static createAxis(spec: any, options: IComponentOption, isHorizontal?: boolean): IAxis;
|
|
65
|
+
static createComponent(spec: any, options: IComponentOption): IAxis | IAxis[];
|
|
66
|
+
setLayout3dBox(box3d: {
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
length: number;
|
|
70
|
+
}): void;
|
|
71
|
+
effect: IEffect;
|
|
72
|
+
protected abstract computeDomain(data: {
|
|
73
|
+
min: number;
|
|
74
|
+
max: number;
|
|
75
|
+
values: any[];
|
|
76
|
+
}[]): StringOrNumber[];
|
|
77
|
+
abstract valueToPosition(value: any): number;
|
|
78
|
+
protected updateScaleRange(): boolean;
|
|
79
|
+
init(option: IModelInitOption): void;
|
|
80
|
+
setAttrFromSpec(): void;
|
|
81
|
+
protected getSeriesStatisticsField(s: ICartesianSeries): string[];
|
|
82
|
+
protected _initTickData(sampling: boolean): void;
|
|
83
|
+
protected _initData(): void;
|
|
84
|
+
protected axisHelper(): IAxisHelper;
|
|
85
|
+
afterCompile(): void;
|
|
86
|
+
onLayoutEnd(ctx: any): void;
|
|
87
|
+
onRender(ctx: any): void;
|
|
88
|
+
changeRegions(regions: IRegion[]): void;
|
|
89
|
+
update(ctx: IComponentOption): void;
|
|
90
|
+
resize(ctx: IComponentOption): void;
|
|
91
|
+
protected collectScale(): IBaseScale[];
|
|
92
|
+
protected collectData(depth?: number): {
|
|
93
|
+
min: number;
|
|
94
|
+
max: number;
|
|
95
|
+
values: any[];
|
|
96
|
+
}[];
|
|
97
|
+
protected updateSeriesScale(): void;
|
|
98
|
+
setLayoutStartPosition(pos: Partial<IPoint>): void;
|
|
99
|
+
computeBoundsInRect(rect: ILayoutRect): ILayoutRect;
|
|
100
|
+
_boundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
101
|
+
updateLayoutAttribute(): void;
|
|
102
|
+
private _getTitleLimit;
|
|
103
|
+
private _getUpdateAttribute;
|
|
104
|
+
protected initEvent(): void;
|
|
105
|
+
private _fixAxisOnZero;
|
|
106
|
+
protected _layoutCacheProcessing(rect: ILayoutRect): ILayoutRect;
|
|
107
|
+
_clearLayoutCache(): void;
|
|
108
|
+
onDataUpdate(): void;
|
|
109
|
+
protected _transformSpec(): void;
|
|
110
|
+
private _appendAxisUnit;
|
|
111
|
+
getVRenderComponents(): IGraphic[];
|
|
112
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BandScale } from '@visactor/vscale';
|
|
2
|
+
import { CartesianAxis } from './axis';
|
|
3
|
+
import type { ICartesianBandAxisSpec } from './interface';
|
|
4
|
+
import { ComponentTypeEnum } from '../../interface';
|
|
5
|
+
import { BandAxisMixin } from '../mixin/band-axis-mixin';
|
|
6
|
+
import type { StringOrNumber } from '../../../typings';
|
|
7
|
+
export interface CartesianBandAxis<T extends ICartesianBandAxisSpec = ICartesianBandAxisSpec> extends Pick<BandAxisMixin, 'valueToPosition' | 'updateGroupScaleRange' | 'getPosition' | 'calcScales' | 'computeBandDomain'>, CartesianAxis<T> {
|
|
8
|
+
}
|
|
9
|
+
export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICartesianBandAxisSpec> extends CartesianAxis<T> {
|
|
10
|
+
static type: ComponentTypeEnum;
|
|
11
|
+
type: ComponentTypeEnum;
|
|
12
|
+
protected _scale: BandScale;
|
|
13
|
+
protected _scales: BandScale[];
|
|
14
|
+
protected computeDomain(data: {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
values: any[];
|
|
18
|
+
}[]): StringOrNumber[];
|
|
19
|
+
protected updateScaleRange(): boolean;
|
|
20
|
+
protected initScales(): void;
|
|
21
|
+
protected axisHelper(): {
|
|
22
|
+
isContinuous: boolean;
|
|
23
|
+
dataToPosition: (values: any[]) => number;
|
|
24
|
+
getScale: (depth: number) => BandScale;
|
|
25
|
+
getBandwidth: (depth: number) => number;
|
|
26
|
+
getStatisticsDomain: () => {
|
|
27
|
+
domain: any[];
|
|
28
|
+
index: {
|
|
29
|
+
[x: string]: number;
|
|
30
|
+
[x: number]: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
getAxisType: () => ComponentTypeEnum;
|
|
34
|
+
getAxisId: () => number;
|
|
35
|
+
isInverse: () => boolean;
|
|
36
|
+
};
|
|
37
|
+
transformScaleDomain(): void;
|
|
38
|
+
updateFixedWholeLength(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare const registerCartesianBandAxis: () => void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { SegmentAttributes, AxisLabelOverlap } from '@visactor/vrender-components';
|
|
2
|
+
import type { IBaseScale } from '@visactor/vscale';
|
|
3
|
+
import type { IAxis, IAxisLocationCfg, IDomainLine, ILabel, ITickCallbackOption, ITitle } from '../../interface';
|
|
4
|
+
import type { ITextMarkSpec, StringOrNumber } from '../../../../typings';
|
|
5
|
+
export type ICartesianDomainLineSpec = {
|
|
6
|
+
startSymbol?: SegmentAttributes['startSymbol'];
|
|
7
|
+
endSymbol?: SegmentAttributes['endSymbol'];
|
|
8
|
+
onZero?: boolean;
|
|
9
|
+
onZeroAxisIndex?: number;
|
|
10
|
+
onZeroAxisId?: StringOrNumber;
|
|
11
|
+
};
|
|
12
|
+
export type ICartesianDomainLine = IDomainLine & ICartesianDomainLineSpec;
|
|
13
|
+
export type ICartesianTitle = ITitle & {
|
|
14
|
+
autoRotate?: boolean;
|
|
15
|
+
inside?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type ICartesianLabel = ILabel & {
|
|
18
|
+
flush?: boolean;
|
|
19
|
+
lastVisible?: boolean | null;
|
|
20
|
+
containerAlign?: 'left' | 'right' | 'center' | 'top' | 'bottom' | 'middle';
|
|
21
|
+
} & AxisLabelOverlap;
|
|
22
|
+
export interface ILinearAxis extends IAxis {
|
|
23
|
+
readonly zero: boolean;
|
|
24
|
+
readonly nice: boolean;
|
|
25
|
+
setExtendDomain: (key: string, value: number | undefined) => void;
|
|
26
|
+
}
|
|
27
|
+
export interface IAxisHelper {
|
|
28
|
+
isContinuous: boolean;
|
|
29
|
+
dataToPosition: (values: any[], cfg?: IAxisLocationCfg) => number;
|
|
30
|
+
valueToPosition?: (value: any, cfg?: IAxisLocationCfg) => number;
|
|
31
|
+
getScale?: (depth: number) => IBaseScale;
|
|
32
|
+
getBandwidth?: (depth: number) => number;
|
|
33
|
+
setExtendDomain?: (key: string, value: number | undefined) => void;
|
|
34
|
+
getStatisticsDomain?: () => {
|
|
35
|
+
domain: any[];
|
|
36
|
+
index: {
|
|
37
|
+
[key in StringOrNumber]: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
getAxisType: () => string;
|
|
41
|
+
getAxisId: () => number;
|
|
42
|
+
isInverse: () => boolean;
|
|
43
|
+
getFields?: () => string[];
|
|
44
|
+
}
|
|
45
|
+
export interface ITimeLayerType {
|
|
46
|
+
tickStep?: number;
|
|
47
|
+
timeFormat?: string;
|
|
48
|
+
timeFormatMode?: 'utc' | 'local';
|
|
49
|
+
tickCount?: number | ((option: ITickCallbackOption) => number);
|
|
50
|
+
forceTickCount?: number;
|
|
51
|
+
}
|
|
52
|
+
export type ICartesianAxisUnit = {
|
|
53
|
+
visible: boolean;
|
|
54
|
+
text?: string | number | number[] | string[];
|
|
55
|
+
style?: ITextMarkSpec;
|
|
56
|
+
};
|