@visactor/vgrammar-core 0.7.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/README.md +160 -0
- package/README.zh-CN.md +11 -0
- package/cjs/component/axis.d.ts +26 -0
- package/cjs/component/axis.js +164 -0
- package/cjs/component/axis.js.map +1 -0
- package/cjs/component/crosshair.d.ts +50 -0
- package/cjs/component/crosshair.js +281 -0
- package/cjs/component/crosshair.js.map +1 -0
- package/cjs/component/datazoom.d.ts +19 -0
- package/cjs/component/datazoom.js +166 -0
- package/cjs/component/datazoom.js.map +1 -0
- package/cjs/component/grid.d.ts +27 -0
- package/cjs/component/grid.js +190 -0
- package/cjs/component/grid.js.map +1 -0
- package/cjs/component/index.d.ts +11 -0
- package/cjs/component/index.js +105 -0
- package/cjs/component/index.js.map +1 -0
- package/cjs/component/label.d.ts +19 -0
- package/cjs/component/label.js +121 -0
- package/cjs/component/label.js.map +1 -0
- package/cjs/component/legend.d.ts +26 -0
- package/cjs/component/legend.js +170 -0
- package/cjs/component/legend.js.map +1 -0
- package/cjs/component/player.d.ts +25 -0
- package/cjs/component/player.js +138 -0
- package/cjs/component/player.js.map +1 -0
- package/cjs/component/scale.d.ts +8 -0
- package/cjs/component/scale.js +25 -0
- package/cjs/component/scale.js.map +1 -0
- package/cjs/component/scrollbar.d.ts +23 -0
- package/cjs/component/scrollbar.js +187 -0
- package/cjs/component/scrollbar.js.map +1 -0
- package/cjs/component/slider.d.ts +19 -0
- package/cjs/component/slider.js +86 -0
- package/cjs/component/slider.js.map +1 -0
- package/cjs/component/title.d.ts +15 -0
- package/cjs/component/title.js +56 -0
- package/cjs/component/title.js.map +1 -0
- package/cjs/component/tooltip.d.ts +62 -0
- package/cjs/component/tooltip.js +305 -0
- package/cjs/component/tooltip.js.map +1 -0
- package/cjs/core/factory.d.ts +35 -0
- package/cjs/core/factory.js +73 -0
- package/cjs/core/factory.js.map +1 -0
- package/cjs/glyph/boxplot.d.ts +10 -0
- package/cjs/glyph/boxplot.js +418 -0
- package/cjs/glyph/boxplot.js.map +1 -0
- package/cjs/glyph/index.d.ts +7 -0
- package/cjs/glyph/index.js +64 -0
- package/cjs/glyph/index.js.map +1 -0
- package/cjs/glyph/link-path.d.ts +7 -0
- package/cjs/glyph/link-path.js +138 -0
- package/cjs/glyph/link-path.js.map +1 -0
- package/cjs/glyph/ripple.d.ts +1 -0
- package/cjs/glyph/ripple.js +44 -0
- package/cjs/glyph/ripple.js.map +1 -0
- package/cjs/glyph/tree-path.d.ts +7 -0
- package/cjs/glyph/tree-path.js +152 -0
- package/cjs/glyph/tree-path.js.map +1 -0
- package/cjs/glyph/violin.d.ts +1 -0
- package/cjs/glyph/violin.js +165 -0
- package/cjs/glyph/violin.js.map +1 -0
- package/cjs/glyph/wave.d.ts +1 -0
- package/cjs/glyph/wave.js +67 -0
- package/cjs/glyph/wave.js.map +1 -0
- package/cjs/graph/animation/animate.d.ts +48 -0
- package/cjs/graph/animation/animate.js +250 -0
- package/cjs/graph/animation/animate.js.map +1 -0
- package/cjs/graph/animation/animation/clip.d.ts +4 -0
- package/cjs/graph/animation/animation/clip.js +54 -0
- package/cjs/graph/animation/animation/clip.js.map +1 -0
- package/cjs/graph/animation/animation/fade.d.ts +4 -0
- package/cjs/graph/animation/animation/fade.js +42 -0
- package/cjs/graph/animation/animation/fade.js.map +1 -0
- package/cjs/graph/animation/animation/grow-cartesian.d.ts +7 -0
- package/cjs/graph/animation/animation/grow-cartesian.js +288 -0
- package/cjs/graph/animation/animation/grow-cartesian.js.map +1 -0
- package/cjs/graph/animation/animation/grow-interval.d.ts +3 -0
- package/cjs/graph/animation/animation/grow-interval.js +194 -0
- package/cjs/graph/animation/animation/grow-interval.js.map +1 -0
- package/cjs/graph/animation/animation/grow-points.d.ts +7 -0
- package/cjs/graph/animation/animation/grow-points.js +118 -0
- package/cjs/graph/animation/animation/grow-points.js.map +1 -0
- package/cjs/graph/animation/animation/grow-polar.d.ts +5 -0
- package/cjs/graph/animation/animation/grow-polar.js +164 -0
- package/cjs/graph/animation/animation/grow-polar.js.map +1 -0
- package/cjs/graph/animation/animation/index.d.ts +11 -0
- package/cjs/graph/animation/animation/index.js +191 -0
- package/cjs/graph/animation/animation/index.js.map +1 -0
- package/cjs/graph/animation/animation/move.d.ts +3 -0
- package/cjs/graph/animation/animation/move.js +90 -0
- package/cjs/graph/animation/animation/move.js.map +1 -0
- package/cjs/graph/animation/animation/rotate.d.ts +3 -0
- package/cjs/graph/animation/animation/rotate.js +42 -0
- package/cjs/graph/animation/animation/rotate.js.map +1 -0
- package/cjs/graph/animation/animation/scale.d.ts +3 -0
- package/cjs/graph/animation/animation/scale.js +84 -0
- package/cjs/graph/animation/animation/scale.js.map +1 -0
- package/cjs/graph/animation/animation/update.d.ts +6 -0
- package/cjs/graph/animation/animation/update.js +22 -0
- package/cjs/graph/animation/animation/update.js.map +1 -0
- package/cjs/graph/animation/animator.d.ts +26 -0
- package/cjs/graph/animation/animator.js +88 -0
- package/cjs/graph/animation/animator.js.map +1 -0
- package/cjs/graph/animation/arranger.d.ts +13 -0
- package/cjs/graph/animation/arranger.js +38 -0
- package/cjs/graph/animation/arranger.js.map +1 -0
- package/cjs/graph/animation/attribute.d.ts +27 -0
- package/cjs/graph/animation/attribute.js +124 -0
- package/cjs/graph/animation/attribute.js.map +1 -0
- package/cjs/graph/animation/config.d.ts +5 -0
- package/cjs/graph/animation/config.js +92 -0
- package/cjs/graph/animation/config.js.map +1 -0
- package/cjs/graph/animation/morph.d.ts +12 -0
- package/cjs/graph/animation/morph.js +174 -0
- package/cjs/graph/animation/morph.js.map +1 -0
- package/cjs/graph/attributes/common.d.ts +2 -0
- package/cjs/graph/attributes/common.js +22 -0
- package/cjs/graph/attributes/common.js.map +1 -0
- package/cjs/graph/attributes/helpers.d.ts +17 -0
- package/cjs/graph/attributes/helpers.js +86 -0
- package/cjs/graph/attributes/helpers.js.map +1 -0
- package/cjs/graph/attributes/index.d.ts +10 -0
- package/cjs/graph/attributes/index.js +257 -0
- package/cjs/graph/attributes/index.js.map +1 -0
- package/cjs/graph/canvas-renderer.d.ts +34 -0
- package/cjs/graph/canvas-renderer.js +121 -0
- package/cjs/graph/canvas-renderer.js.map +1 -0
- package/cjs/graph/constants.d.ts +23 -0
- package/cjs/graph/constants.js +21 -0
- package/cjs/graph/constants.js.map +1 -0
- package/cjs/graph/element.d.ts +66 -0
- package/cjs/graph/element.js +297 -0
- package/cjs/graph/element.js.map +1 -0
- package/cjs/graph/enums.d.ts +153 -0
- package/cjs/graph/enums.js +85 -0
- package/cjs/graph/enums.js.map +1 -0
- package/cjs/graph/glyph-element.d.ts +53 -0
- package/cjs/graph/glyph-element.js +202 -0
- package/cjs/graph/glyph-element.js.map +1 -0
- package/cjs/graph/index.d.ts +3 -0
- package/cjs/graph/index.js +44 -0
- package/cjs/graph/index.js.map +1 -0
- package/cjs/graph/layout/grid.d.ts +3 -0
- package/cjs/graph/layout/grid.js +75 -0
- package/cjs/graph/layout/grid.js.map +1 -0
- package/cjs/graph/layout/layout.d.ts +3 -0
- package/cjs/graph/layout/layout.js +33 -0
- package/cjs/graph/layout/layout.js.map +1 -0
- package/cjs/graph/layout/relative.d.ts +3 -0
- package/cjs/graph/layout/relative.js +86 -0
- package/cjs/graph/layout/relative.js.map +1 -0
- package/cjs/graph/mark/differ.d.ts +20 -0
- package/cjs/graph/mark/differ.js +110 -0
- package/cjs/graph/mark/differ.js.map +1 -0
- package/cjs/graph/mark/encode.d.ts +10 -0
- package/cjs/graph/mark/encode.js +95 -0
- package/cjs/graph/mark/encode.js.map +1 -0
- package/cjs/graph/mark/large-rects.d.ts +10 -0
- package/cjs/graph/mark/large-rects.js +31 -0
- package/cjs/graph/mark/large-rects.js.map +1 -0
- package/cjs/graph/mark/large-symbols.d.ts +11 -0
- package/cjs/graph/mark/large-symbols.js +33 -0
- package/cjs/graph/mark/large-symbols.js.map +1 -0
- package/cjs/graph/mark-tree.d.ts +2 -0
- package/cjs/graph/mark-tree.js +21 -0
- package/cjs/graph/mark-tree.js.map +1 -0
- package/cjs/graph/util/element.d.ts +2 -0
- package/cjs/graph/util/element.js +10 -0
- package/cjs/graph/util/element.js.map +1 -0
- package/cjs/graph/util/env.d.ts +2 -0
- package/cjs/graph/util/env.js +14 -0
- package/cjs/graph/util/env.js.map +1 -0
- package/cjs/graph/util/events-extend.d.ts +5 -0
- package/cjs/graph/util/events-extend.js +18 -0
- package/cjs/graph/util/events-extend.js.map +1 -0
- package/cjs/graph/util/graphic.d.ts +9 -0
- package/cjs/graph/util/graphic.js +59 -0
- package/cjs/graph/util/graphic.js.map +1 -0
- package/cjs/graph/util/point.d.ts +1 -0
- package/cjs/graph/util/point.js +75 -0
- package/cjs/graph/util/point.js.map +1 -0
- package/cjs/index.d.ts +14 -0
- package/cjs/index.js +111 -0
- package/cjs/index.js.map +1 -0
- package/cjs/parse/coordinate.d.ts +7 -0
- package/cjs/parse/coordinate.js +70 -0
- package/cjs/parse/coordinate.js.map +1 -0
- package/cjs/parse/event.d.ts +8 -0
- package/cjs/parse/event.js +33 -0
- package/cjs/parse/event.js.map +1 -0
- package/cjs/parse/mark.d.ts +4 -0
- package/cjs/parse/mark.js +25 -0
- package/cjs/parse/mark.js.map +1 -0
- package/cjs/parse/option.d.ts +3 -0
- package/cjs/parse/option.js +19 -0
- package/cjs/parse/option.js.map +1 -0
- package/cjs/parse/scale.d.ts +8 -0
- package/cjs/parse/scale.js +365 -0
- package/cjs/parse/scale.js.map +1 -0
- package/cjs/parse/transform.d.ts +5 -0
- package/cjs/parse/transform.js +103 -0
- package/cjs/parse/transform.js.map +1 -0
- package/cjs/parse/util.d.ts +13 -0
- package/cjs/parse/util.js +82 -0
- package/cjs/parse/util.js.map +1 -0
- package/cjs/parse/view.d.ts +17 -0
- package/cjs/parse/view.js +108 -0
- package/cjs/parse/view.js.map +1 -0
- package/cjs/semantic-marks/cell.d.ts +13 -0
- package/cjs/semantic-marks/cell.js +61 -0
- package/cjs/semantic-marks/cell.js.map +1 -0
- package/cjs/semantic-marks/interval.d.ts +14 -0
- package/cjs/semantic-marks/interval.js +80 -0
- package/cjs/semantic-marks/interval.js.map +1 -0
- package/cjs/semantic-marks/text.d.ts +10 -0
- package/cjs/semantic-marks/text.js +25 -0
- package/cjs/semantic-marks/text.js.map +1 -0
- package/cjs/theme/common/component.d.ts +15 -0
- package/cjs/theme/common/component.js +493 -0
- package/cjs/theme/common/component.js.map +1 -0
- package/cjs/theme/common/constants.d.ts +1 -0
- package/cjs/theme/common/constants.js +6 -0
- package/cjs/theme/common/constants.js.map +1 -0
- package/cjs/theme/common/mark.d.ts +2 -0
- package/cjs/theme/common/mark.js +15 -0
- package/cjs/theme/common/mark.js.map +1 -0
- package/cjs/theme/dark.d.ts +2 -0
- package/cjs/theme/dark.js +94 -0
- package/cjs/theme/dark.js.map +1 -0
- package/cjs/theme/default.d.ts +2 -0
- package/cjs/theme/default.js +18 -0
- package/cjs/theme/default.js.map +1 -0
- package/cjs/theme/theme-manager.d.ts +8 -0
- package/cjs/theme/theme-manager.js +26 -0
- package/cjs/theme/theme-manager.js.map +1 -0
- package/cjs/transforms/data/bin.d.ts +2 -0
- package/cjs/transforms/data/bin.js +21 -0
- package/cjs/transforms/data/bin.js.map +1 -0
- package/cjs/transforms/data/circular-relation.d.ts +2 -0
- package/cjs/transforms/data/circular-relation.js +56 -0
- package/cjs/transforms/data/circular-relation.js.map +1 -0
- package/cjs/transforms/data/contour.d.ts +2 -0
- package/cjs/transforms/data/contour.js +115 -0
- package/cjs/transforms/data/contour.js.map +1 -0
- package/cjs/transforms/data/filter.d.ts +2 -0
- package/cjs/transforms/data/filter.js +10 -0
- package/cjs/transforms/data/filter.js.map +1 -0
- package/cjs/transforms/data/fold.d.ts +2 -0
- package/cjs/transforms/data/fold.js +24 -0
- package/cjs/transforms/data/fold.js.map +1 -0
- package/cjs/transforms/data/funnel.d.ts +2 -0
- package/cjs/transforms/data/funnel.js +25 -0
- package/cjs/transforms/data/funnel.js.map +1 -0
- package/cjs/transforms/data/join.d.ts +2 -0
- package/cjs/transforms/data/join.js +33 -0
- package/cjs/transforms/data/join.js.map +1 -0
- package/cjs/transforms/data/kde.d.ts +2 -0
- package/cjs/transforms/data/kde.js +90 -0
- package/cjs/transforms/data/kde.js.map +1 -0
- package/cjs/transforms/data/map.d.ts +2 -0
- package/cjs/transforms/data/map.js +23 -0
- package/cjs/transforms/data/map.js.map +1 -0
- package/cjs/transforms/data/pick.d.ts +2 -0
- package/cjs/transforms/data/pick.js +20 -0
- package/cjs/transforms/data/pick.js.map +1 -0
- package/cjs/transforms/data/pie.d.ts +2 -0
- package/cjs/transforms/data/pie.js +24 -0
- package/cjs/transforms/data/pie.js.map +1 -0
- package/cjs/transforms/data/range.d.ts +4 -0
- package/cjs/transforms/data/range.js +15 -0
- package/cjs/transforms/data/range.js.map +1 -0
- package/cjs/transforms/data/sort.d.ts +2 -0
- package/cjs/transforms/data/sort.js +17 -0
- package/cjs/transforms/data/sort.js.map +1 -0
- package/cjs/transforms/data/stack.d.ts +2 -0
- package/cjs/transforms/data/stack.js +74 -0
- package/cjs/transforms/data/stack.js.map +1 -0
- package/cjs/transforms/data/unfold.d.ts +2 -0
- package/cjs/transforms/data/unfold.js +49 -0
- package/cjs/transforms/data/unfold.js.map +1 -0
- package/cjs/transforms/index.d.ts +23 -0
- package/cjs/transforms/index.js +213 -0
- package/cjs/transforms/index.js.map +1 -0
- package/cjs/transforms/mark/dodge.d.ts +2 -0
- package/cjs/transforms/mark/dodge.js +81 -0
- package/cjs/transforms/mark/dodge.js.map +1 -0
- package/cjs/transforms/mark/jitter.d.ts +4 -0
- package/cjs/transforms/mark/jitter.js +53 -0
- package/cjs/transforms/mark/jitter.js.map +1 -0
- package/cjs/transforms/mark/lttb-sample.d.ts +2 -0
- package/cjs/transforms/mark/lttb-sample.js +68 -0
- package/cjs/transforms/mark/lttb-sample.js.map +1 -0
- package/cjs/transforms/mark/mark-overlap.d.ts +2 -0
- package/cjs/transforms/mark/mark-overlap.js +79 -0
- package/cjs/transforms/mark/mark-overlap.js.map +1 -0
- package/cjs/transforms/mark/symmetry.d.ts +2 -0
- package/cjs/transforms/mark/symmetry.js +25 -0
- package/cjs/transforms/mark/symmetry.js.map +1 -0
- package/cjs/transforms/util/util.d.ts +5 -0
- package/cjs/transforms/util/util.js +41 -0
- package/cjs/transforms/util/util.js.map +1 -0
- package/cjs/transforms/view/identifier.d.ts +2 -0
- package/cjs/transforms/view/identifier.js +17 -0
- package/cjs/transforms/view/identifier.js.map +1 -0
- package/cjs/types/animate.d.ts +224 -0
- package/cjs/types/animate.js +6 -0
- package/cjs/types/animate.js.map +1 -0
- package/cjs/types/base.d.ts +36 -0
- package/cjs/types/base.js +6 -0
- package/cjs/types/base.js.map +1 -0
- package/cjs/types/component.d.ts +240 -0
- package/cjs/types/component.js +6 -0
- package/cjs/types/component.js.map +1 -0
- package/cjs/types/coordinate.d.ts +15 -0
- package/cjs/types/coordinate.js +6 -0
- package/cjs/types/coordinate.js.map +1 -0
- package/cjs/types/data.d.ts +55 -0
- package/cjs/types/data.js +5 -0
- package/cjs/types/data.js.map +1 -0
- package/cjs/types/dataflow.d.ts +13 -0
- package/cjs/types/dataflow.js +6 -0
- package/cjs/types/dataflow.js.map +1 -0
- package/cjs/types/element.d.ts +117 -0
- package/cjs/types/element.js +6 -0
- package/cjs/types/element.js.map +1 -0
- package/cjs/types/event.d.ts +58 -0
- package/cjs/types/event.js +6 -0
- package/cjs/types/event.js.map +1 -0
- package/cjs/types/glyph.d.ts +29 -0
- package/cjs/types/glyph.js +6 -0
- package/cjs/types/glyph.js.map +1 -0
- package/cjs/types/grammar.d.ts +184 -0
- package/cjs/types/grammar.js +6 -0
- package/cjs/types/grammar.js.map +1 -0
- package/cjs/types/hooks.d.ts +45 -0
- package/cjs/types/hooks.js +6 -0
- package/cjs/types/hooks.js.map +1 -0
- package/cjs/types/index.d.ts +22 -0
- package/cjs/types/index.js +31 -0
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/layout.d.ts +5 -0
- package/cjs/types/layout.js +6 -0
- package/cjs/types/layout.js.map +1 -0
- package/cjs/types/mark.d.ts +344 -0
- package/cjs/types/mark.js +6 -0
- package/cjs/types/mark.js.map +1 -0
- package/cjs/types/morph.d.ts +29 -0
- package/cjs/types/morph.js +6 -0
- package/cjs/types/morph.js.map +1 -0
- package/cjs/types/plot.d.ts +326 -0
- package/cjs/types/plot.js +6 -0
- package/cjs/types/plot.js.map +1 -0
- package/cjs/types/projection.d.ts +61 -0
- package/cjs/types/projection.js +6 -0
- package/cjs/types/projection.js.map +1 -0
- package/cjs/types/renderer.d.ts +19 -0
- package/cjs/types/renderer.js +6 -0
- package/cjs/types/renderer.js.map +1 -0
- package/cjs/types/scale.d.ts +111 -0
- package/cjs/types/scale.js +6 -0
- package/cjs/types/scale.js.map +1 -0
- package/cjs/types/signal.d.ts +20 -0
- package/cjs/types/signal.js +6 -0
- package/cjs/types/signal.js.map +1 -0
- package/cjs/types/theme.d.ts +41 -0
- package/cjs/types/theme.js +6 -0
- package/cjs/types/theme.js.map +1 -0
- package/cjs/types/transform.d.ts +291 -0
- package/cjs/types/transform.js +6 -0
- package/cjs/types/transform.js.map +1 -0
- package/cjs/types/view.d.ts +217 -0
- package/cjs/types/view.js +6 -0
- package/cjs/types/view.js.map +1 -0
- package/cjs/util/data.d.ts +3 -0
- package/cjs/util/data.js +64 -0
- package/cjs/util/data.js.map +1 -0
- package/cjs/util/grammar-heap.d.ts +14 -0
- package/cjs/util/grammar-heap.js +66 -0
- package/cjs/util/grammar-heap.js.map +1 -0
- package/cjs/util/text.d.ts +19 -0
- package/cjs/util/text.js +32 -0
- package/cjs/util/text.js.map +1 -0
- package/cjs/util/unique-list.d.ts +12 -0
- package/cjs/util/unique-list.js +37 -0
- package/cjs/util/unique-list.js.map +1 -0
- package/cjs/view/View.d.ts +157 -0
- package/cjs/view/View.js +800 -0
- package/cjs/view/View.js.map +1 -0
- package/cjs/view/animate.d.ts +20 -0
- package/cjs/view/animate.js +106 -0
- package/cjs/view/animate.js.map +1 -0
- package/cjs/view/component.d.ts +26 -0
- package/cjs/view/component.js +64 -0
- package/cjs/view/component.js.map +1 -0
- package/cjs/view/constants.d.ts +17 -0
- package/cjs/view/constants.js +13 -0
- package/cjs/view/constants.js.map +1 -0
- package/cjs/view/coordinate.d.ts +23 -0
- package/cjs/view/coordinate.js +59 -0
- package/cjs/view/coordinate.js.map +1 -0
- package/cjs/view/data.d.ts +37 -0
- package/cjs/view/data.js +198 -0
- package/cjs/view/data.js.map +1 -0
- package/cjs/view/dataflow.d.ts +32 -0
- package/cjs/view/dataflow.js +146 -0
- package/cjs/view/dataflow.js.map +1 -0
- package/cjs/view/events.d.ts +4 -0
- package/cjs/view/events.js +34 -0
- package/cjs/view/events.js.map +1 -0
- package/cjs/view/glyph-meta.d.ts +29 -0
- package/cjs/view/glyph-meta.js +45 -0
- package/cjs/view/glyph-meta.js.map +1 -0
- package/cjs/view/glyph.d.ts +14 -0
- package/cjs/view/glyph.js +29 -0
- package/cjs/view/glyph.js.map +1 -0
- package/cjs/view/grammar-base.d.ts +46 -0
- package/cjs/view/grammar-base.js +171 -0
- package/cjs/view/grammar-base.js.map +1 -0
- package/cjs/view/grammar-record.d.ts +39 -0
- package/cjs/view/grammar-record.js +180 -0
- package/cjs/view/grammar-record.js.map +1 -0
- package/cjs/view/group.d.ts +13 -0
- package/cjs/view/group.js +39 -0
- package/cjs/view/group.js.map +1 -0
- package/cjs/view/index.d.ts +1 -0
- package/cjs/view/index.js +21 -0
- package/cjs/view/index.js.map +1 -0
- package/cjs/view/mark.d.ts +112 -0
- package/cjs/view/mark.js +600 -0
- package/cjs/view/mark.js.map +1 -0
- package/cjs/view/scale.d.ts +26 -0
- package/cjs/view/scale.js +86 -0
- package/cjs/view/scale.js.map +1 -0
- package/cjs/view/signal.d.ts +18 -0
- package/cjs/view/signal.js +56 -0
- package/cjs/view/signal.js.map +1 -0
- package/es/component/axis.d.ts +26 -0
- package/es/component/axis.js +162 -0
- package/es/component/axis.js.map +1 -0
- package/es/component/crosshair.d.ts +50 -0
- package/es/component/crosshair.js +275 -0
- package/es/component/crosshair.js.map +1 -0
- package/es/component/datazoom.d.ts +19 -0
- package/es/component/datazoom.js +161 -0
- package/es/component/datazoom.js.map +1 -0
- package/es/component/grid.d.ts +27 -0
- package/es/component/grid.js +193 -0
- package/es/component/grid.js.map +1 -0
- package/es/component/index.d.ts +11 -0
- package/es/component/index.js +22 -0
- package/es/component/index.js.map +1 -0
- package/es/component/label.d.ts +19 -0
- package/es/component/label.js +124 -0
- package/es/component/label.js.map +1 -0
- package/es/component/legend.d.ts +26 -0
- package/es/component/legend.js +169 -0
- package/es/component/legend.js.map +1 -0
- package/es/component/player.d.ts +25 -0
- package/es/component/player.js +136 -0
- package/es/component/player.js.map +1 -0
- package/es/component/scale.d.ts +8 -0
- package/es/component/scale.js +19 -0
- package/es/component/scale.js.map +1 -0
- package/es/component/scrollbar.d.ts +23 -0
- package/es/component/scrollbar.js +184 -0
- package/es/component/scrollbar.js.map +1 -0
- package/es/component/slider.d.ts +19 -0
- package/es/component/slider.js +86 -0
- package/es/component/slider.js.map +1 -0
- package/es/component/title.d.ts +15 -0
- package/es/component/title.js +58 -0
- package/es/component/title.js.map +1 -0
- package/es/component/tooltip.d.ts +62 -0
- package/es/component/tooltip.js +303 -0
- package/es/component/tooltip.js.map +1 -0
- package/es/core/factory.d.ts +35 -0
- package/es/core/factory.js +67 -0
- package/es/core/factory.js.map +1 -0
- package/es/glyph/boxplot.d.ts +10 -0
- package/es/glyph/boxplot.js +410 -0
- package/es/glyph/boxplot.js.map +1 -0
- package/es/glyph/index.d.ts +7 -0
- package/es/glyph/index.js +11 -0
- package/es/glyph/index.js.map +1 -0
- package/es/glyph/link-path.d.ts +7 -0
- package/es/glyph/link-path.js +132 -0
- package/es/glyph/link-path.js.map +1 -0
- package/es/glyph/ripple.d.ts +1 -0
- package/es/glyph/ripple.js +38 -0
- package/es/glyph/ripple.js.map +1 -0
- package/es/glyph/tree-path.d.ts +7 -0
- package/es/glyph/tree-path.js +146 -0
- package/es/glyph/tree-path.js.map +1 -0
- package/es/glyph/violin.d.ts +1 -0
- package/es/glyph/violin.js +163 -0
- package/es/glyph/violin.js.map +1 -0
- package/es/glyph/wave.d.ts +1 -0
- package/es/glyph/wave.js +61 -0
- package/es/glyph/wave.js.map +1 -0
- package/es/graph/animation/animate.d.ts +48 -0
- package/es/graph/animation/animate.js +247 -0
- package/es/graph/animation/animate.js.map +1 -0
- package/es/graph/animation/animation/clip.d.ts +4 -0
- package/es/graph/animation/animation/clip.js +44 -0
- package/es/graph/animation/animation/clip.js.map +1 -0
- package/es/graph/animation/animation/fade.d.ts +4 -0
- package/es/graph/animation/animation/fade.js +32 -0
- package/es/graph/animation/animation/fade.js.map +1 -0
- package/es/graph/animation/animation/grow-cartesian.d.ts +7 -0
- package/es/graph/animation/animation/grow-cartesian.js +272 -0
- package/es/graph/animation/animation/grow-cartesian.js.map +1 -0
- package/es/graph/animation/animation/grow-interval.d.ts +3 -0
- package/es/graph/animation/animation/grow-interval.js +184 -0
- package/es/graph/animation/animation/grow-interval.js.map +1 -0
- package/es/graph/animation/animation/grow-points.d.ts +7 -0
- package/es/graph/animation/animation/grow-points.js +107 -0
- package/es/graph/animation/animation/grow-points.js.map +1 -0
- package/es/graph/animation/animation/grow-polar.d.ts +5 -0
- package/es/graph/animation/animation/grow-polar.js +160 -0
- package/es/graph/animation/animation/grow-polar.js.map +1 -0
- package/es/graph/animation/animation/index.d.ts +11 -0
- package/es/graph/animation/animation/index.js +22 -0
- package/es/graph/animation/animation/index.js.map +1 -0
- package/es/graph/animation/animation/move.d.ts +3 -0
- package/es/graph/animation/animation/move.js +78 -0
- package/es/graph/animation/animation/move.js.map +1 -0
- package/es/graph/animation/animation/rotate.d.ts +3 -0
- package/es/graph/animation/animation/rotate.js +32 -0
- package/es/graph/animation/animation/rotate.js.map +1 -0
- package/es/graph/animation/animation/scale.d.ts +3 -0
- package/es/graph/animation/animation/scale.js +74 -0
- package/es/graph/animation/animation/scale.js.map +1 -0
- package/es/graph/animation/animation/update.d.ts +6 -0
- package/es/graph/animation/animation/update.js +20 -0
- package/es/graph/animation/animation/update.js.map +1 -0
- package/es/graph/animation/animator.d.ts +26 -0
- package/es/graph/animation/animator.js +83 -0
- package/es/graph/animation/animator.js.map +1 -0
- package/es/graph/animation/arranger.d.ts +13 -0
- package/es/graph/animation/arranger.js +29 -0
- package/es/graph/animation/arranger.js.map +1 -0
- package/es/graph/animation/attribute.d.ts +27 -0
- package/es/graph/animation/attribute.js +114 -0
- package/es/graph/animation/attribute.js.map +1 -0
- package/es/graph/animation/config.d.ts +5 -0
- package/es/graph/animation/config.js +84 -0
- package/es/graph/animation/config.js.map +1 -0
- package/es/graph/animation/morph.d.ts +12 -0
- package/es/graph/animation/morph.js +171 -0
- package/es/graph/animation/morph.js.map +1 -0
- package/es/graph/attributes/common.d.ts +2 -0
- package/es/graph/attributes/common.js +13 -0
- package/es/graph/attributes/common.js.map +1 -0
- package/es/graph/attributes/helpers.d.ts +17 -0
- package/es/graph/attributes/helpers.js +75 -0
- package/es/graph/attributes/helpers.js.map +1 -0
- package/es/graph/attributes/index.d.ts +10 -0
- package/es/graph/attributes/index.js +231 -0
- package/es/graph/attributes/index.js.map +1 -0
- package/es/graph/canvas-renderer.d.ts +34 -0
- package/es/graph/canvas-renderer.js +115 -0
- package/es/graph/canvas-renderer.js.map +1 -0
- package/es/graph/constants.d.ts +23 -0
- package/es/graph/constants.js +47 -0
- package/es/graph/constants.js.map +1 -0
- package/es/graph/element.d.ts +66 -0
- package/es/graph/element.js +292 -0
- package/es/graph/element.js.map +1 -0
- package/es/graph/enums.d.ts +153 -0
- package/es/graph/enums.js +129 -0
- package/es/graph/enums.js.map +1 -0
- package/es/graph/glyph-element.d.ts +53 -0
- package/es/graph/glyph-element.js +206 -0
- package/es/graph/glyph-element.js.map +1 -0
- package/es/graph/index.d.ts +3 -0
- package/es/graph/index.js +6 -0
- package/es/graph/index.js.map +1 -0
- package/es/graph/layout/grid.d.ts +3 -0
- package/es/graph/layout/grid.js +66 -0
- package/es/graph/layout/grid.js.map +1 -0
- package/es/graph/layout/layout.d.ts +3 -0
- package/es/graph/layout/layout.js +33 -0
- package/es/graph/layout/layout.js.map +1 -0
- package/es/graph/layout/relative.d.ts +3 -0
- package/es/graph/layout/relative.js +85 -0
- package/es/graph/layout/relative.js.map +1 -0
- package/es/graph/mark/differ.d.ts +20 -0
- package/es/graph/mark/differ.js +104 -0
- package/es/graph/mark/differ.js.map +1 -0
- package/es/graph/mark/encode.d.ts +10 -0
- package/es/graph/mark/encode.js +92 -0
- package/es/graph/mark/encode.js.map +1 -0
- package/es/graph/mark/large-rects.d.ts +10 -0
- package/es/graph/mark/large-rects.js +23 -0
- package/es/graph/mark/large-rects.js.map +1 -0
- package/es/graph/mark/large-symbols.d.ts +11 -0
- package/es/graph/mark/large-symbols.js +27 -0
- package/es/graph/mark/large-symbols.js.map +1 -0
- package/es/graph/mark-tree.d.ts +2 -0
- package/es/graph/mark-tree.js +15 -0
- package/es/graph/mark-tree.js.map +1 -0
- package/es/graph/util/element.d.ts +2 -0
- package/es/graph/util/element.js +8 -0
- package/es/graph/util/element.js.map +1 -0
- package/es/graph/util/env.d.ts +2 -0
- package/es/graph/util/env.js +6 -0
- package/es/graph/util/env.js.map +1 -0
- package/es/graph/util/events-extend.d.ts +5 -0
- package/es/graph/util/events-extend.js +12 -0
- package/es/graph/util/events-extend.js.map +1 -0
- package/es/graph/util/graphic.d.ts +9 -0
- package/es/graph/util/graphic.js +59 -0
- package/es/graph/util/graphic.js.map +1 -0
- package/es/graph/util/point.d.ts +1 -0
- package/es/graph/util/point.js +67 -0
- package/es/graph/util/point.js.map +1 -0
- package/es/index.d.ts +14 -0
- package/es/index.js +27 -0
- package/es/index.js.map +1 -0
- package/es/parse/coordinate.d.ts +7 -0
- package/es/parse/coordinate.js +65 -0
- package/es/parse/coordinate.js.map +1 -0
- package/es/parse/event.d.ts +8 -0
- package/es/parse/event.js +23 -0
- package/es/parse/event.js.map +1 -0
- package/es/parse/mark.d.ts +4 -0
- package/es/parse/mark.js +19 -0
- package/es/parse/mark.js.map +1 -0
- package/es/parse/option.d.ts +3 -0
- package/es/parse/option.js +10 -0
- package/es/parse/option.js.map +1 -0
- package/es/parse/scale.d.ts +8 -0
- package/es/parse/scale.js +347 -0
- package/es/parse/scale.js.map +1 -0
- package/es/parse/transform.d.ts +5 -0
- package/es/parse/transform.js +102 -0
- package/es/parse/transform.js.map +1 -0
- package/es/parse/util.d.ts +13 -0
- package/es/parse/util.js +65 -0
- package/es/parse/util.js.map +1 -0
- package/es/parse/view.d.ts +17 -0
- package/es/parse/view.js +98 -0
- package/es/parse/view.js.map +1 -0
- package/es/semantic-marks/cell.d.ts +13 -0
- package/es/semantic-marks/cell.js +57 -0
- package/es/semantic-marks/cell.js.map +1 -0
- package/es/semantic-marks/interval.d.ts +14 -0
- package/es/semantic-marks/interval.js +87 -0
- package/es/semantic-marks/interval.js.map +1 -0
- package/es/semantic-marks/text.d.ts +10 -0
- package/es/semantic-marks/text.js +22 -0
- package/es/semantic-marks/text.js.map +1 -0
- package/es/theme/common/component.d.ts +15 -0
- package/es/theme/common/component.js +510 -0
- package/es/theme/common/component.js.map +1 -0
- package/es/theme/common/constants.d.ts +1 -0
- package/es/theme/common/constants.js +2 -0
- package/es/theme/common/constants.js.map +1 -0
- package/es/theme/common/mark.d.ts +2 -0
- package/es/theme/common/mark.js +11 -0
- package/es/theme/common/mark.js.map +1 -0
- package/es/theme/dark.d.ts +2 -0
- package/es/theme/dark.js +96 -0
- package/es/theme/dark.js.map +1 -0
- package/es/theme/default.d.ts +2 -0
- package/es/theme/default.js +16 -0
- package/es/theme/default.js.map +1 -0
- package/es/theme/theme-manager.d.ts +8 -0
- package/es/theme/theme-manager.js +22 -0
- package/es/theme/theme-manager.js.map +1 -0
- package/es/transforms/data/bin.d.ts +2 -0
- package/es/transforms/data/bin.js +16 -0
- package/es/transforms/data/bin.js.map +1 -0
- package/es/transforms/data/circular-relation.d.ts +2 -0
- package/es/transforms/data/circular-relation.js +44 -0
- package/es/transforms/data/circular-relation.js.map +1 -0
- package/es/transforms/data/contour.d.ts +2 -0
- package/es/transforms/data/contour.js +111 -0
- package/es/transforms/data/contour.js.map +1 -0
- package/es/transforms/data/filter.d.ts +2 -0
- package/es/transforms/data/filter.js +2 -0
- package/es/transforms/data/filter.js.map +1 -0
- package/es/transforms/data/fold.d.ts +2 -0
- package/es/transforms/data/fold.js +16 -0
- package/es/transforms/data/fold.js.map +1 -0
- package/es/transforms/data/funnel.d.ts +2 -0
- package/es/transforms/data/funnel.js +17 -0
- package/es/transforms/data/funnel.js.map +1 -0
- package/es/transforms/data/join.d.ts +2 -0
- package/es/transforms/data/join.js +26 -0
- package/es/transforms/data/join.js.map +1 -0
- package/es/transforms/data/kde.d.ts +2 -0
- package/es/transforms/data/kde.js +80 -0
- package/es/transforms/data/kde.js.map +1 -0
- package/es/transforms/data/map.d.ts +2 -0
- package/es/transforms/data/map.js +16 -0
- package/es/transforms/data/map.js.map +1 -0
- package/es/transforms/data/pick.d.ts +2 -0
- package/es/transforms/data/pick.js +15 -0
- package/es/transforms/data/pick.js.map +1 -0
- package/es/transforms/data/pie.d.ts +2 -0
- package/es/transforms/data/pie.js +18 -0
- package/es/transforms/data/pie.js.map +1 -0
- package/es/transforms/data/range.d.ts +4 -0
- package/es/transforms/data/range.js +9 -0
- package/es/transforms/data/range.js.map +1 -0
- package/es/transforms/data/sort.d.ts +2 -0
- package/es/transforms/data/sort.js +13 -0
- package/es/transforms/data/sort.js.map +1 -0
- package/es/transforms/data/stack.d.ts +2 -0
- package/es/transforms/data/stack.js +72 -0
- package/es/transforms/data/stack.js.map +1 -0
- package/es/transforms/data/unfold.d.ts +2 -0
- package/es/transforms/data/unfold.js +45 -0
- package/es/transforms/data/unfold.js.map +1 -0
- package/es/transforms/index.d.ts +23 -0
- package/es/transforms/index.js +205 -0
- package/es/transforms/index.js.map +1 -0
- package/es/transforms/mark/dodge.d.ts +2 -0
- package/es/transforms/mark/dodge.js +74 -0
- package/es/transforms/mark/dodge.js.map +1 -0
- package/es/transforms/mark/jitter.d.ts +4 -0
- package/es/transforms/mark/jitter.js +48 -0
- package/es/transforms/mark/jitter.js.map +1 -0
- package/es/transforms/mark/lttb-sample.d.ts +2 -0
- package/es/transforms/mark/lttb-sample.js +60 -0
- package/es/transforms/mark/lttb-sample.js.map +1 -0
- package/es/transforms/mark/mark-overlap.d.ts +2 -0
- package/es/transforms/mark/mark-overlap.js +71 -0
- package/es/transforms/mark/mark-overlap.js.map +1 -0
- package/es/transforms/mark/symmetry.d.ts +2 -0
- package/es/transforms/mark/symmetry.js +20 -0
- package/es/transforms/mark/symmetry.js.map +1 -0
- package/es/transforms/util/util.d.ts +5 -0
- package/es/transforms/util/util.js +33 -0
- package/es/transforms/util/util.js.map +1 -0
- package/es/transforms/view/identifier.d.ts +2 -0
- package/es/transforms/view/identifier.js +13 -0
- package/es/transforms/view/identifier.js.map +1 -0
- package/es/types/animate.d.ts +224 -0
- package/es/types/animate.js +2 -0
- package/es/types/animate.js.map +1 -0
- package/es/types/base.d.ts +36 -0
- package/es/types/base.js +2 -0
- package/es/types/base.js.map +1 -0
- package/es/types/component.d.ts +240 -0
- package/es/types/component.js +2 -0
- package/es/types/component.js.map +1 -0
- package/es/types/coordinate.d.ts +15 -0
- package/es/types/coordinate.js +2 -0
- package/es/types/coordinate.js.map +1 -0
- package/es/types/data.d.ts +55 -0
- package/es/types/data.js +1 -0
- package/es/types/data.js.map +1 -0
- package/es/types/dataflow.d.ts +13 -0
- package/es/types/dataflow.js +2 -0
- package/es/types/dataflow.js.map +1 -0
- package/es/types/element.d.ts +117 -0
- package/es/types/element.js +2 -0
- package/es/types/element.js.map +1 -0
- package/es/types/event.d.ts +58 -0
- package/es/types/event.js +2 -0
- package/es/types/event.js.map +1 -0
- package/es/types/glyph.d.ts +29 -0
- package/es/types/glyph.js +2 -0
- package/es/types/glyph.js.map +1 -0
- package/es/types/grammar.d.ts +184 -0
- package/es/types/grammar.js +2 -0
- package/es/types/grammar.js.map +1 -0
- package/es/types/hooks.d.ts +45 -0
- package/es/types/hooks.js +2 -0
- package/es/types/hooks.js.map +1 -0
- package/es/types/index.d.ts +22 -0
- package/es/types/index.js +44 -0
- package/es/types/index.js.map +1 -0
- package/es/types/layout.d.ts +5 -0
- package/es/types/layout.js +2 -0
- package/es/types/layout.js.map +1 -0
- package/es/types/mark.d.ts +344 -0
- package/es/types/mark.js +2 -0
- package/es/types/mark.js.map +1 -0
- package/es/types/morph.d.ts +29 -0
- package/es/types/morph.js +2 -0
- package/es/types/morph.js.map +1 -0
- package/es/types/plot.d.ts +326 -0
- package/es/types/plot.js +2 -0
- package/es/types/plot.js.map +1 -0
- package/es/types/projection.d.ts +61 -0
- package/es/types/projection.js +2 -0
- package/es/types/projection.js.map +1 -0
- package/es/types/renderer.d.ts +19 -0
- package/es/types/renderer.js +2 -0
- package/es/types/renderer.js.map +1 -0
- package/es/types/scale.d.ts +111 -0
- package/es/types/scale.js +2 -0
- package/es/types/scale.js.map +1 -0
- package/es/types/signal.d.ts +20 -0
- package/es/types/signal.js +2 -0
- package/es/types/signal.js.map +1 -0
- package/es/types/theme.d.ts +41 -0
- package/es/types/theme.js +2 -0
- package/es/types/theme.js.map +1 -0
- package/es/types/transform.d.ts +291 -0
- package/es/types/transform.js +2 -0
- package/es/types/transform.js.map +1 -0
- package/es/types/view.d.ts +217 -0
- package/es/types/view.js +2 -0
- package/es/types/view.js.map +1 -0
- package/es/util/data.d.ts +3 -0
- package/es/util/data.js +60 -0
- package/es/util/data.js.map +1 -0
- package/es/util/grammar-heap.d.ts +14 -0
- package/es/util/grammar-heap.js +58 -0
- package/es/util/grammar-heap.js.map +1 -0
- package/es/util/text.d.ts +19 -0
- package/es/util/text.js +25 -0
- package/es/util/text.js.map +1 -0
- package/es/util/unique-list.d.ts +12 -0
- package/es/util/unique-list.js +29 -0
- package/es/util/unique-list.js.map +1 -0
- package/es/view/View.d.ts +157 -0
- package/es/view/View.js +836 -0
- package/es/view/View.js.map +1 -0
- package/es/view/animate.d.ts +20 -0
- package/es/view/animate.js +98 -0
- package/es/view/animate.js.map +1 -0
- package/es/view/component.d.ts +26 -0
- package/es/view/component.js +64 -0
- package/es/view/component.js.map +1 -0
- package/es/view/constants.d.ts +17 -0
- package/es/view/constants.js +32 -0
- package/es/view/constants.js.map +1 -0
- package/es/view/coordinate.d.ts +23 -0
- package/es/view/coordinate.js +52 -0
- package/es/view/coordinate.js.map +1 -0
- package/es/view/data.d.ts +37 -0
- package/es/view/data.js +195 -0
- package/es/view/data.js.map +1 -0
- package/es/view/dataflow.d.ts +32 -0
- package/es/view/dataflow.js +141 -0
- package/es/view/dataflow.js.map +1 -0
- package/es/view/events.d.ts +4 -0
- package/es/view/events.js +26 -0
- package/es/view/events.js.map +1 -0
- package/es/view/glyph-meta.d.ts +29 -0
- package/es/view/glyph-meta.js +37 -0
- package/es/view/glyph-meta.js.map +1 -0
- package/es/view/glyph.d.ts +14 -0
- package/es/view/glyph.js +27 -0
- package/es/view/glyph.js.map +1 -0
- package/es/view/grammar-base.d.ts +46 -0
- package/es/view/grammar-base.js +165 -0
- package/es/view/grammar-base.js.map +1 -0
- package/es/view/grammar-record.d.ts +39 -0
- package/es/view/grammar-record.js +170 -0
- package/es/view/grammar-record.js.map +1 -0
- package/es/view/group.d.ts +13 -0
- package/es/view/group.js +39 -0
- package/es/view/group.js.map +1 -0
- package/es/view/index.d.ts +1 -0
- package/es/view/index.js +2 -0
- package/es/view/index.js.map +1 -0
- package/es/view/mark.d.ts +112 -0
- package/es/view/mark.js +604 -0
- package/es/view/mark.js.map +1 -0
- package/es/view/scale.d.ts +26 -0
- package/es/view/scale.js +82 -0
- package/es/view/scale.js.map +1 -0
- package/es/view/signal.d.ts +18 -0
- package/es/view/signal.js +52 -0
- package/es/view/signal.js.map +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# @visactor/vgrammar
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
@visactor/vgrammar is the core package of VGrammar, which is a visual grammar library based on visual rendering engine [VRender](https://github.com/VisActor/VRender).
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Installation
|
|
10
|
+
|
|
11
|
+
[npm package](https://www.npmjs.com/package/@visactor/vgrammar)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
// npm
|
|
15
|
+
npm install @visactor/vgrammar
|
|
16
|
+
|
|
17
|
+
// yarn
|
|
18
|
+
yarn add @visactor/vgrammar
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Quick Start
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
import { View } from '@visactor/vgrammar-core';
|
|
25
|
+
|
|
26
|
+
const spec = {
|
|
27
|
+
padding: { top: 5, right: 5, bottom: 30, left: 60 },
|
|
28
|
+
data: [
|
|
29
|
+
{
|
|
30
|
+
id: 'table',
|
|
31
|
+
values: [
|
|
32
|
+
{
|
|
33
|
+
name: 'A',
|
|
34
|
+
value: 214480
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'B',
|
|
38
|
+
value: 155506
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'C',
|
|
42
|
+
value: 100764
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'D',
|
|
46
|
+
value: 92715
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
scales: [
|
|
52
|
+
{
|
|
53
|
+
id: 'xscale',
|
|
54
|
+
type: 'band',
|
|
55
|
+
domain: { data: 'table', field: 'name' },
|
|
56
|
+
dependency: ['viewBox'],
|
|
57
|
+
range: (scale, params) => {
|
|
58
|
+
return [params.viewBox.x1, params.viewBox.x2];
|
|
59
|
+
},
|
|
60
|
+
padding: 0.05,
|
|
61
|
+
round: true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'yscale',
|
|
65
|
+
type: 'linear',
|
|
66
|
+
domain: { data: 'table', field: 'value' },
|
|
67
|
+
dependency: ['viewBox'],
|
|
68
|
+
range: (scale, params) => {
|
|
69
|
+
return [params.viewBox.y2, params.viewBox.y1];
|
|
70
|
+
},
|
|
71
|
+
nice: true
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
marks: [
|
|
76
|
+
{
|
|
77
|
+
type: 'component',
|
|
78
|
+
componentType: 'axis',
|
|
79
|
+
scale: 'xscale',
|
|
80
|
+
tickCount: -1,
|
|
81
|
+
dependency: ['viewBox'],
|
|
82
|
+
encode: {
|
|
83
|
+
update: (scale, elment, params) => {
|
|
84
|
+
return {
|
|
85
|
+
x: params.viewBox.x1,
|
|
86
|
+
y: params.viewBox.y2,
|
|
87
|
+
start: { x: 0, y: 0 },
|
|
88
|
+
end: { x: params.viewBox.width(), y: 0 }
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'component',
|
|
95
|
+
componentType: 'axis',
|
|
96
|
+
scale: 'yscale',
|
|
97
|
+
dependency: ['viewBox'],
|
|
98
|
+
encode: {
|
|
99
|
+
update: (scale, elment, params) => {
|
|
100
|
+
return {
|
|
101
|
+
x: params.viewBox.x1,
|
|
102
|
+
y: params.viewBox.y1,
|
|
103
|
+
start: { x: 0, y: params.viewBox.height() },
|
|
104
|
+
end: { x: 0, y: 0 },
|
|
105
|
+
verticalFactor: -1
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: 'component',
|
|
112
|
+
componentType: 'crosshair',
|
|
113
|
+
scale: 'xscale',
|
|
114
|
+
crosshairShape: 'rect',
|
|
115
|
+
crosshairType: 'x',
|
|
116
|
+
dependency: ['viewBox'],
|
|
117
|
+
encode: {
|
|
118
|
+
update: (scale, elment, params) => {
|
|
119
|
+
return {
|
|
120
|
+
start: { y: params.viewBox.y1 },
|
|
121
|
+
rectStyle: { height: params.viewBox.height() }
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'rect',
|
|
128
|
+
from: { data: 'table' },
|
|
129
|
+
encode: {
|
|
130
|
+
update: {
|
|
131
|
+
x: { scale: 'xscale', field: 'name' },
|
|
132
|
+
width: { scale: 'xscale', band: 1 },
|
|
133
|
+
y: { scale: 'yscale', field: 'value' },
|
|
134
|
+
y1: {
|
|
135
|
+
callback: (datum, element, params) => {
|
|
136
|
+
return params.yscale.scale(params.yscale.domain()[0]);
|
|
137
|
+
},
|
|
138
|
+
dependency: ['yscale']
|
|
139
|
+
},
|
|
140
|
+
fill: '#6690F2'
|
|
141
|
+
},
|
|
142
|
+
hover: {
|
|
143
|
+
fill: 'red'
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const vGrammarView = new View({
|
|
151
|
+
autoFit: true,
|
|
152
|
+
width: spec.width,
|
|
153
|
+
height: spec.height,
|
|
154
|
+
container: 'chart',
|
|
155
|
+
hover: true
|
|
156
|
+
});
|
|
157
|
+
vGrammarView.parseSpec(spec);
|
|
158
|
+
|
|
159
|
+
vGrammarView.runAsync();
|
|
160
|
+
```
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CircleAxisAttributes, LineAxisAttributes } from '@visactor/vrender-components';
|
|
2
|
+
import type { IBaseScale } from '@visactor/vscale';
|
|
3
|
+
import type { IGroupMark, IScale, ITheme, IView, MarkFunctionType, MarkRelativeItemSpec, Nil, RecursivePartial } from '../types';
|
|
4
|
+
import type { AxisSpec, AxisType, IAxis } from '../types/component';
|
|
5
|
+
import { ScaleComponent } from './scale';
|
|
6
|
+
import type { IBaseCoordinate } from '@visactor/vgrammar-coordinate';
|
|
7
|
+
export declare const generateLineAxisAttributes: (scale: IBaseScale, theme?: ITheme, addition?: RecursivePartial<LineAxisAttributes>, tickCount?: number) => LineAxisAttributes;
|
|
8
|
+
export declare const generateCircleAxisAttributes: (scale: IBaseScale, theme?: ITheme, addition?: RecursivePartial<CircleAxisAttributes>, tickCount?: number) => CircleAxisAttributes;
|
|
9
|
+
export declare const generateCoordinateAxisAttribute: (scale: IScale, coordinate: IBaseCoordinate, inside: boolean, baseValue: number, layout: MarkRelativeItemSpec, isGrid?: boolean) => any;
|
|
10
|
+
export declare class Axis extends ScaleComponent implements IAxis {
|
|
11
|
+
static readonly componentType: string;
|
|
12
|
+
protected spec: AxisSpec;
|
|
13
|
+
private _axisComponentType;
|
|
14
|
+
constructor(view: IView, group?: IGroupMark, mode?: '2d' | '3d');
|
|
15
|
+
protected parseAddition(spec: AxisSpec): this;
|
|
16
|
+
scale(scale?: IScale | string | Nil): this;
|
|
17
|
+
axisType(axisType: AxisType | Nil): this;
|
|
18
|
+
addGraphicItem(attrs: any, groupKey?: string): any;
|
|
19
|
+
tickCount(tickCount: MarkFunctionType<number> | Nil): this;
|
|
20
|
+
inside(inside: MarkFunctionType<boolean> | Nil): this;
|
|
21
|
+
baseValue(baseValue: MarkFunctionType<number> | Nil): this;
|
|
22
|
+
getAxisComponentType(): "lineAxis" | "circleAxis";
|
|
23
|
+
protected _updateComponentEncoders(): void;
|
|
24
|
+
private _getAxisComponentType;
|
|
25
|
+
}
|
|
26
|
+
export declare const registerAxis: () => void;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.registerAxis = exports.Axis = exports.generateCoordinateAxisAttribute = exports.generateCircleAxisAttributes = exports.generateLineAxisAttributes = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), vrender_components_1 = require("@visactor/vrender-components"), graph_1 = require("../graph"), scale_1 = require("./scale"), encode_1 = require("../graph/mark/encode"), util_1 = require("../parse/util"), factory_1 = require("../core/factory"), generateLineAxisAttributes = (scale, theme, addition, tickCount) => {
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
const axisTheme = null !== (_b = null === (_a = null == theme ? void 0 : theme.components) || void 0 === _a ? void 0 : _a.axis) && void 0 !== _b ? _b : {};
|
|
10
|
+
if (!scale) return (0, vutils_1.merge)({}, axisTheme, null != addition ? addition : {});
|
|
11
|
+
const items = [ (null !== (_d = null === (_c = scale.tickData) || void 0 === _c ? void 0 : _c.call(scale, tickCount)) && void 0 !== _d ? _d : []).map((tick => ({
|
|
12
|
+
id: tick.index,
|
|
13
|
+
label: tick.tick,
|
|
14
|
+
value: tick.value,
|
|
15
|
+
rawValue: tick.tick
|
|
16
|
+
}))) ];
|
|
17
|
+
return (0, vutils_1.merge)({}, axisTheme, {
|
|
18
|
+
items: items
|
|
19
|
+
}, null != addition ? addition : {});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.generateLineAxisAttributes = generateLineAxisAttributes;
|
|
23
|
+
|
|
24
|
+
const generateCircleAxisAttributes = (scale, theme, addition, tickCount) => {
|
|
25
|
+
var _a, _b, _c, _d;
|
|
26
|
+
const axisTheme = null !== (_b = null === (_a = null == theme ? void 0 : theme.components) || void 0 === _a ? void 0 : _a.circleAxis) && void 0 !== _b ? _b : {};
|
|
27
|
+
if (!scale) return (0, vutils_1.merge)({}, axisTheme, null != addition ? addition : {});
|
|
28
|
+
const items = [ (null !== (_d = null === (_c = scale.tickData) || void 0 === _c ? void 0 : _c.call(scale, tickCount)) && void 0 !== _d ? _d : []).map((tick => ({
|
|
29
|
+
id: tick.index,
|
|
30
|
+
label: tick.tick,
|
|
31
|
+
value: tick.value,
|
|
32
|
+
rawValue: tick.tick
|
|
33
|
+
}))) ];
|
|
34
|
+
return (0, vutils_1.merge)({}, axisTheme, {
|
|
35
|
+
items: items
|
|
36
|
+
}, null != addition ? addition : {});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.generateCircleAxisAttributes = generateCircleAxisAttributes;
|
|
40
|
+
|
|
41
|
+
const generateCoordinateAxisAttribute = (scale, coordinate, inside, baseValue, layout, isGrid) => {
|
|
42
|
+
var _a;
|
|
43
|
+
const axisPosition = scale.getCoordinateAxisPosition();
|
|
44
|
+
"auto" === (null == layout ? void 0 : layout.position) && (layout.position = inside ? "content" : axisPosition);
|
|
45
|
+
const axisPoints = scale.getCoordinateAxisPoints(baseValue);
|
|
46
|
+
if (axisPoints) {
|
|
47
|
+
const res = {
|
|
48
|
+
start: axisPoints[0],
|
|
49
|
+
end: axisPoints[1],
|
|
50
|
+
verticalFactor: ("top" === axisPosition || "left" === axisPosition ? -1 : 1) * (inside ? -1 : 1) * ((null === (_a = scale.getSpec().range) || void 0 === _a ? void 0 : _a.reversed) ? -1 : 1)
|
|
51
|
+
};
|
|
52
|
+
if (isGrid && "polar" === coordinate.type) {
|
|
53
|
+
const angle = coordinate.angle();
|
|
54
|
+
res.center = coordinate.origin(), res.startAngle = angle[0], res.endAngle = angle[1];
|
|
55
|
+
}
|
|
56
|
+
return res;
|
|
57
|
+
}
|
|
58
|
+
const radius = coordinate.radius(), angle = coordinate.angle();
|
|
59
|
+
return {
|
|
60
|
+
center: coordinate.origin(),
|
|
61
|
+
radius: radius[1],
|
|
62
|
+
innerRadius: radius[0],
|
|
63
|
+
inside: inside,
|
|
64
|
+
startAngle: angle[0],
|
|
65
|
+
endAngle: angle[1]
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.generateCoordinateAxisAttribute = generateCoordinateAxisAttribute;
|
|
70
|
+
|
|
71
|
+
class Axis extends scale_1.ScaleComponent {
|
|
72
|
+
constructor(view, group, mode) {
|
|
73
|
+
super(view, graph_1.ComponentEnum.axis, group), this.spec.componentType = graph_1.ComponentEnum.axis,
|
|
74
|
+
this.mode = mode;
|
|
75
|
+
}
|
|
76
|
+
parseAddition(spec) {
|
|
77
|
+
return super.parseAddition(spec), this.axisType(spec.axisType), this.tickCount(spec.tickCount),
|
|
78
|
+
this.inside(spec.inside), this.baseValue(spec.baseValue), this;
|
|
79
|
+
}
|
|
80
|
+
scale(scale) {
|
|
81
|
+
return super.scale(scale), this._axisComponentType = null, this;
|
|
82
|
+
}
|
|
83
|
+
axisType(axisType) {
|
|
84
|
+
return this.spec.axisType = axisType, this._axisComponentType = null, this._prepareRejoin(),
|
|
85
|
+
this.commit(), this;
|
|
86
|
+
}
|
|
87
|
+
addGraphicItem(attrs, groupKey) {
|
|
88
|
+
const initialAttributes = (0, vutils_1.merge)({
|
|
89
|
+
x: 0,
|
|
90
|
+
y: 0,
|
|
91
|
+
start: {
|
|
92
|
+
x: 0,
|
|
93
|
+
y: 0
|
|
94
|
+
},
|
|
95
|
+
end: {
|
|
96
|
+
x: 0,
|
|
97
|
+
y: 0
|
|
98
|
+
}
|
|
99
|
+
}, attrs), graphicItem = factory_1.Factory.createGraphicComponent(this._getAxisComponentType(), initialAttributes, this.mode);
|
|
100
|
+
return super.addGraphicItem(initialAttributes, groupKey, graphicItem);
|
|
101
|
+
}
|
|
102
|
+
tickCount(tickCount) {
|
|
103
|
+
return this.setFunctionSpec(tickCount, "tickCount");
|
|
104
|
+
}
|
|
105
|
+
inside(inside) {
|
|
106
|
+
return this.setFunctionSpec(inside, "inside");
|
|
107
|
+
}
|
|
108
|
+
baseValue(baseValue) {
|
|
109
|
+
return this.setFunctionSpec(baseValue, "baseValue");
|
|
110
|
+
}
|
|
111
|
+
getAxisComponentType() {
|
|
112
|
+
return this._axisComponentType;
|
|
113
|
+
}
|
|
114
|
+
_updateComponentEncoders() {
|
|
115
|
+
const scaleGrammar = (0, vutils_1.isString)(this.spec.scale) ? this.view.getScaleById(this.spec.scale) : this.spec.scale, encoders = Object.assign({
|
|
116
|
+
update: {}
|
|
117
|
+
}, this.spec.encode), componentEncoders = Object.keys(encoders).reduce(((res, state) => {
|
|
118
|
+
const encoder = encoders[state];
|
|
119
|
+
return encoder && (res[state] = {
|
|
120
|
+
callback: (datum, element, parameters) => {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const theme = this.view.getCurrentTheme();
|
|
123
|
+
let addition = (0, encode_1.invokeEncoder)(encoder, datum, element, parameters);
|
|
124
|
+
const inside = (0, util_1.invokeFunctionType)(this.spec.inside, parameters, datum, element), baseValue = (0,
|
|
125
|
+
util_1.invokeFunctionType)(this.spec.baseValue, parameters, datum, element), coordinate = null === (_a = null == scaleGrammar ? void 0 : scaleGrammar.getCoordinate) || void 0 === _a ? void 0 : _a.call(scaleGrammar);
|
|
126
|
+
coordinate && (addition = Object.assign((0, exports.generateCoordinateAxisAttribute)(scaleGrammar, coordinate, inside, baseValue, this.spec.layout), addition));
|
|
127
|
+
const scale = null === (_b = null == scaleGrammar ? void 0 : scaleGrammar.getScale) || void 0 === _b ? void 0 : _b.call(scaleGrammar), tickCount = (0,
|
|
128
|
+
util_1.invokeFunctionType)(this.spec.tickCount, parameters, datum, element);
|
|
129
|
+
switch (this._getAxisComponentType()) {
|
|
130
|
+
case graph_1.AxisEnum.lineAxis:
|
|
131
|
+
return (0, exports.generateLineAxisAttributes)(scale, theme, addition, tickCount);
|
|
132
|
+
|
|
133
|
+
case graph_1.AxisEnum.circleAxis:
|
|
134
|
+
return (0, exports.generateCircleAxisAttributes)(scale, theme, addition, tickCount);
|
|
135
|
+
}
|
|
136
|
+
return addition;
|
|
137
|
+
}
|
|
138
|
+
}), res;
|
|
139
|
+
}), {});
|
|
140
|
+
this._encoders = componentEncoders;
|
|
141
|
+
}
|
|
142
|
+
_getAxisComponentType() {
|
|
143
|
+
var _a;
|
|
144
|
+
if (this._axisComponentType) return this._axisComponentType;
|
|
145
|
+
let type = this.spec.axisType;
|
|
146
|
+
if ((0, vutils_1.isNil)(type)) {
|
|
147
|
+
const scaleGrammar = (0, vutils_1.isString)(this.spec.scale) ? this.view.getScaleById(this.spec.scale) : this.spec.scale;
|
|
148
|
+
type = (null === (_a = null == scaleGrammar ? void 0 : scaleGrammar.getCoordinate) || void 0 === _a ? void 0 : _a.call(scaleGrammar)) ? scaleGrammar.getCoordinateAxisPoints() ? "line" : "circle" : "line";
|
|
149
|
+
}
|
|
150
|
+
return this._axisComponentType = "circle" === type ? graph_1.AxisEnum.circleAxis : graph_1.AxisEnum.lineAxis,
|
|
151
|
+
this._axisComponentType;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
exports.Axis = Axis, Axis.componentType = graph_1.ComponentEnum.axis;
|
|
156
|
+
|
|
157
|
+
const registerAxis = () => {
|
|
158
|
+
factory_1.Factory.registerGraphicComponent(graph_1.AxisEnum.lineAxis, ((attrs, mode) => new vrender_components_1.LineAxis(attrs, mode))),
|
|
159
|
+
factory_1.Factory.registerGraphicComponent(graph_1.AxisEnum.circleAxis, (attrs => new vrender_components_1.CircleAxis(attrs))),
|
|
160
|
+
factory_1.Factory.registerComponent(graph_1.ComponentEnum.axis, Axis);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
exports.registerAxis = registerAxis;
|
|
164
|
+
//# sourceMappingURL=axis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/component/axis.ts"],"names":[],"mappings":";;;AAAA,6CAA0D;AAI1D,qEAAgH;AAehH,oCAAmD;AAEnD,mCAAyC;AACzC,iDAAqD;AACrD,wCAAmD;AAEnD,6CAA0C;AAEnC,MAAM,0BAA0B,GAAG,CACxC,KAAiB,EACjB,KAAc,EACd,QAA+C,EAC/C,SAAkB,EACE,EAAE;;IACtB,MAAM,SAAS,GAAG,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,IAAI,mCAAI,EAAE,CAAC;IAChD,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,IAAA,cAAK,EAAC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vB","file":"axis.js","sourcesContent":["import { isNil, isString, merge } from '@visactor/vutils';\nimport type { IGraphic } from '@visactor/vrender';\nimport type { CircleAxisAttributes, LineAxisAttributes } from '@visactor/vrender-components';\n// eslint-disable-next-line no-duplicate-imports\nimport { CircleAxis as CircleAxisComponent, LineAxis as LineAxisComponent } from '@visactor/vrender-components';\nimport type { IBaseScale } from '@visactor/vscale';\nimport type {\n BaseSignleEncodeSpec,\n IElement,\n IGroupMark,\n IScale,\n ITheme,\n IView,\n MarkFunctionType,\n MarkRelativeItemSpec,\n Nil,\n RecursivePartial,\n StateEncodeSpec\n} from '../types';\nimport { AxisEnum, ComponentEnum } from '../graph';\nimport type { AxisSpec, AxisType, IAxis } from '../types/component';\nimport { ScaleComponent } from './scale';\nimport { invokeEncoder } from '../graph/mark/encode';\nimport { invokeFunctionType } from '../parse/util';\nimport type { IPolarCoordinate, IBaseCoordinate } from '@visactor/vgrammar-coordinate';\nimport { Factory } from '../core/factory';\n\nexport const generateLineAxisAttributes = (\n scale: IBaseScale,\n theme?: ITheme,\n addition?: RecursivePartial<LineAxisAttributes>,\n tickCount?: number\n): LineAxisAttributes => {\n const axisTheme = theme?.components?.axis ?? {};\n if (!scale) {\n return merge({}, axisTheme, addition ?? {});\n }\n const tickData = scale.tickData?.(tickCount) ?? [];\n const items = [\n tickData.map(tick => ({\n id: tick.index,\n label: tick.tick,\n value: tick.value,\n rawValue: tick.tick\n }))\n ];\n return merge({}, axisTheme, { items }, addition ?? {});\n};\n\nexport const generateCircleAxisAttributes = (\n scale: IBaseScale,\n theme?: ITheme,\n addition?: RecursivePartial<CircleAxisAttributes>,\n tickCount?: number\n): CircleAxisAttributes => {\n const axisTheme = theme?.components?.circleAxis ?? {};\n if (!scale) {\n return merge({}, axisTheme, addition ?? {});\n }\n const tickData = scale.tickData?.(tickCount) ?? [];\n const items = [\n tickData.map(tick => ({\n id: tick.index,\n label: tick.tick,\n value: tick.value,\n rawValue: tick.tick\n }))\n ];\n return merge({}, axisTheme, { items }, addition ?? {});\n};\n\nexport const generateCoordinateAxisAttribute = (\n scale: IScale,\n coordinate: IBaseCoordinate,\n inside: boolean,\n baseValue: number,\n layout: MarkRelativeItemSpec,\n isGrid?: boolean\n) => {\n const axisPosition = scale.getCoordinateAxisPosition();\n if (layout?.position === 'auto') {\n // FIXME: too hack\n layout.position = inside ? 'content' : axisPosition;\n }\n\n const axisPoints = scale.getCoordinateAxisPoints(baseValue);\n\n if (axisPoints) {\n const start = axisPoints[0];\n const end = axisPoints[1];\n const res: any = {\n start,\n end,\n verticalFactor:\n (axisPosition === 'top' || axisPosition === 'left' ? -1 : 1) *\n (inside ? -1 : 1) *\n (scale.getSpec().range?.reversed ? -1 : 1)\n };\n\n if (isGrid && coordinate.type === 'polar') {\n const angle = (coordinate as IPolarCoordinate).angle();\n\n res.center = (coordinate as IPolarCoordinate).origin();\n res.startAngle = angle[0];\n res.endAngle = angle[1];\n }\n\n return res;\n }\n\n const radius = (coordinate as IPolarCoordinate).radius();\n const angle = (coordinate as IPolarCoordinate).angle();\n return {\n center: (coordinate as IPolarCoordinate).origin(),\n radius: radius[1],\n innerRadius: radius[0],\n inside: inside,\n startAngle: angle[0],\n endAngle: angle[1]\n };\n};\n\nexport class Axis extends ScaleComponent implements IAxis {\n static readonly componentType: string = ComponentEnum.axis;\n\n protected declare spec: AxisSpec;\n\n private _axisComponentType: keyof typeof AxisEnum;\n\n constructor(view: IView, group?: IGroupMark, mode?: '2d' | '3d') {\n super(view, ComponentEnum.axis, group);\n this.spec.componentType = ComponentEnum.axis;\n this.mode = mode;\n }\n\n protected parseAddition(spec: AxisSpec) {\n super.parseAddition(spec);\n\n this.axisType(spec.axisType);\n this.tickCount(spec.tickCount);\n this.inside(spec.inside);\n this.baseValue(spec.baseValue);\n\n return this;\n }\n\n scale(scale?: IScale | string | Nil) {\n super.scale(scale);\n this._axisComponentType = null;\n return this;\n }\n\n axisType(axisType: AxisType | Nil) {\n this.spec.axisType = axisType;\n this._axisComponentType = null;\n this._prepareRejoin();\n this.commit();\n return this;\n }\n\n addGraphicItem(attrs: any, groupKey?: string) {\n const defaultAttributes = { x: 0, y: 0, start: { x: 0, y: 0 }, end: { x: 0, y: 0 } };\n const initialAttributes = merge(defaultAttributes, attrs);\n const graphicItem = Factory.createGraphicComponent(this._getAxisComponentType(), initialAttributes, this.mode);\n return super.addGraphicItem(initialAttributes, groupKey, graphicItem);\n }\n\n tickCount(tickCount: MarkFunctionType<number> | Nil) {\n return this.setFunctionSpec(tickCount, 'tickCount');\n }\n\n inside(inside: MarkFunctionType<boolean> | Nil) {\n return this.setFunctionSpec(inside, 'inside');\n }\n\n baseValue(baseValue: MarkFunctionType<number> | Nil) {\n return this.setFunctionSpec(baseValue, 'baseValue');\n }\n\n getAxisComponentType() {\n return this._axisComponentType;\n }\n\n protected _updateComponentEncoders() {\n const scaleGrammar = isString(this.spec.scale) ? this.view.getScaleById(this.spec.scale) : this.spec.scale;\n const encoders = Object.assign({ update: {} }, this.spec.encode);\n const componentEncoders: StateEncodeSpec = Object.keys(encoders).reduce((res, state) => {\n const encoder = encoders[state];\n if (encoder) {\n res[state] = {\n callback: (datum: any, element: IElement, parameters: any) => {\n const theme = this.view.getCurrentTheme();\n let addition = invokeEncoder(encoder as BaseSignleEncodeSpec, datum, element, parameters);\n const inside = invokeFunctionType(this.spec.inside, parameters, datum, element);\n const baseValue = invokeFunctionType(this.spec.baseValue, parameters, datum, element);\n\n const coordinate = scaleGrammar?.getCoordinate?.();\n if (coordinate) {\n addition = Object.assign(\n generateCoordinateAxisAttribute(\n scaleGrammar,\n coordinate,\n inside,\n baseValue,\n this.spec.layout as MarkRelativeItemSpec\n ),\n addition\n );\n }\n\n const scale = scaleGrammar?.getScale?.();\n const tickCount = invokeFunctionType(this.spec.tickCount, parameters, datum, element);\n switch (this._getAxisComponentType()) {\n case AxisEnum.lineAxis:\n return generateLineAxisAttributes(scale, theme, addition, tickCount);\n case AxisEnum.circleAxis:\n return generateCircleAxisAttributes(scale, theme, addition, tickCount);\n }\n return addition;\n }\n };\n }\n return res;\n }, {});\n this._encoders = componentEncoders;\n }\n\n private _getAxisComponentType() {\n if (this._axisComponentType) {\n return this._axisComponentType;\n }\n\n let type = this.spec.axisType;\n\n if (isNil(type)) {\n const scaleGrammar = isString(this.spec.scale) ? this.view.getScaleById(this.spec.scale) : this.spec.scale;\n\n type = scaleGrammar?.getCoordinate?.() ? (scaleGrammar.getCoordinateAxisPoints() ? 'line' : 'circle') : 'line';\n }\n\n this._axisComponentType = type === 'circle' ? AxisEnum.circleAxis : AxisEnum.lineAxis;\n\n return this._axisComponentType;\n }\n}\n\nexport const registerAxis = () => {\n Factory.registerGraphicComponent(\n AxisEnum.lineAxis,\n (attrs: LineAxisAttributes, mode?: '2d' | '3d') => new LineAxisComponent(attrs, mode) as unknown as IGraphic\n );\n Factory.registerGraphicComponent(\n AxisEnum.circleAxis,\n (attrs: CircleAxisAttributes) => new CircleAxisComponent(attrs) as unknown as IGraphic\n );\n\n Factory.registerComponent(ComponentEnum.axis, Axis);\n};\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IPointLike } from '@visactor/vutils';
|
|
2
|
+
import type { CircleCrosshairAttrs, LineCrosshairAttrs, PolygonCrosshairAttrs, RectCrosshairAttrs, SectorCrosshairAttrs } from '@visactor/vrender-components';
|
|
3
|
+
import type { IBaseScale } from '@visactor/vscale';
|
|
4
|
+
import type { CrosshairType, CrosshairSpec, CrosshairShape, ICrosshair } from '../types/component';
|
|
5
|
+
import type { IGroupMark, ITheme, IView, RecursivePartial } from '../types';
|
|
6
|
+
import { ScaleComponent } from './scale';
|
|
7
|
+
export declare const generateLineCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}, config: CrosshairSpec['componentConfig'], theme?: ITheme, addition?: RecursivePartial<LineCrosshairAttrs> & CrosshairSpec['componentConfig']) => LineCrosshairAttrs;
|
|
11
|
+
export declare const generateRectCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}, config: CrosshairSpec['componentConfig'], theme?: ITheme, addition?: RecursivePartial<RectCrosshairAttrs>) => RectCrosshairAttrs;
|
|
15
|
+
export declare const generateRingCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
}, config: CrosshairSpec['componentConfig'], theme?: ITheme, addition?: RecursivePartial<SectorCrosshairAttrs>) => SectorCrosshairAttrs;
|
|
19
|
+
export declare const generateSectorCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}, config: CrosshairSpec['componentConfig'], theme?: ITheme, addition?: RecursivePartial<SectorCrosshairAttrs>) => SectorCrosshairAttrs;
|
|
23
|
+
export declare const generateCircleCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}, config: CrosshairSpec['componentConfig'], theme?: ITheme, addition?: RecursivePartial<CircleCrosshairAttrs>) => CircleCrosshairAttrs;
|
|
27
|
+
export declare const generatePolygonCrosshairAttributes: (point: IPointLike, scale: IBaseScale, type: CrosshairType, groupSize: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}, config: CrosshairSpec['componentConfig'], theme?: ITheme, addition?: RecursivePartial<PolygonCrosshairAttrs>) => PolygonCrosshairAttrs;
|
|
31
|
+
export declare class Crosshair extends ScaleComponent implements ICrosshair {
|
|
32
|
+
static readonly componentType: string;
|
|
33
|
+
protected spec: CrosshairSpec;
|
|
34
|
+
private _crosshairComponentType?;
|
|
35
|
+
private _additionalEncodeResult;
|
|
36
|
+
private _lastGroup;
|
|
37
|
+
constructor(view: IView, group?: IGroupMark);
|
|
38
|
+
protected parseAddition(spec: CrosshairSpec): this;
|
|
39
|
+
crosshairType(crosshairType?: CrosshairType): this;
|
|
40
|
+
crosshairShape(crosshairShape?: CrosshairShape): this;
|
|
41
|
+
addGraphicItem(attrs: any, groupKey?: string): any;
|
|
42
|
+
release(): void;
|
|
43
|
+
protected init(stage: any, parameters: any): void;
|
|
44
|
+
protected _updateComponentEncoders(): void;
|
|
45
|
+
private _onCrosshairShow;
|
|
46
|
+
private _onCrosshairHide;
|
|
47
|
+
private _getCrosshairComponentType;
|
|
48
|
+
private _getDefaultCrosshairAttribute;
|
|
49
|
+
}
|
|
50
|
+
export declare const registerCrosshair: () => void;
|