@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ScaleEnum } from "@visactor/vscale";
|
|
2
|
+
|
|
3
|
+
import { GrammarMarkType } from "../graph/enums";
|
|
4
|
+
|
|
5
|
+
import { invokeEncoder } from "../graph/mark/encode";
|
|
6
|
+
|
|
7
|
+
import { isScaleEncode } from "../parse/mark";
|
|
8
|
+
|
|
9
|
+
import { getGrammarOutput, isFunctionType } from "../parse/util";
|
|
10
|
+
|
|
11
|
+
import { Mark } from "../view/mark";
|
|
12
|
+
|
|
13
|
+
import { isNil } from "@visactor/vutils";
|
|
14
|
+
|
|
15
|
+
import { createGraphicItem } from "../graph/util/graphic";
|
|
16
|
+
|
|
17
|
+
import { transformsByType } from "../graph/attributes";
|
|
18
|
+
|
|
19
|
+
export class Interval extends Mark {
|
|
20
|
+
encodeState(state, channel, value) {
|
|
21
|
+
return super.encodeState(state, channel, value), this._updateComponentEncoders(state),
|
|
22
|
+
this;
|
|
23
|
+
}
|
|
24
|
+
_updateComponentEncoders(state) {
|
|
25
|
+
this._encoders || (this._encoders = {});
|
|
26
|
+
const userEncoder = this.spec.encode[state];
|
|
27
|
+
if (userEncoder && "update" === state) {
|
|
28
|
+
const params = this.parameters(), scales = isFunctionType(userEncoder) ? null : Object.keys(userEncoder).reduce(((res, channel) => (isScaleEncode(userEncoder[channel]) && (res[channel] = getGrammarOutput(userEncoder[channel].scale, params)),
|
|
29
|
+
res)), {});
|
|
30
|
+
this._encoders[state] = {
|
|
31
|
+
callback: (datum, element, parameters) => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
const userEncodeRes = invokeEncoder(userEncoder, datum, element, parameters);
|
|
34
|
+
if (this.disableCoordinateTransform = !1, scales && scales.x && scales.x.type === ScaleEnum.Band) {
|
|
35
|
+
if (!isNil(scales.y)) {
|
|
36
|
+
const domain = scales.y.domain(), min = Math.min.apply(null, domain), max = Math.max.apply(null, domain), baseValue = min > 0 ? min : max < 0 ? max : 0;
|
|
37
|
+
userEncodeRes.y1 = scales.y.scale(baseValue);
|
|
38
|
+
}
|
|
39
|
+
const bandWidth = scales.x.bandwidth();
|
|
40
|
+
userEncodeRes.x = userEncodeRes.x + bandWidth / 4, userEncodeRes.x1 = userEncodeRes.x + bandWidth / 2;
|
|
41
|
+
} else if (scales && scales.y && scales.y.type === ScaleEnum.Band) {
|
|
42
|
+
if (!isNil(scales.x)) {
|
|
43
|
+
const domain = scales.x.domain(), min = Math.min.apply(null, domain), max = Math.max.apply(null, domain), baseValue = min > 0 ? min : max < 0 ? max : 0;
|
|
44
|
+
userEncodeRes.x1 = scales.x.scale(baseValue);
|
|
45
|
+
}
|
|
46
|
+
const bandWidth = scales.y.bandwidth();
|
|
47
|
+
userEncodeRes.y = userEncodeRes.y + bandWidth / 4, userEncodeRes.y1 = userEncodeRes.y + bandWidth / 2;
|
|
48
|
+
}
|
|
49
|
+
if (scales) {
|
|
50
|
+
const coord = (null !== (_b = this.view.getScaleById(null === (_a = userEncoder.x) || void 0 === _a ? void 0 : _a.scale)) && void 0 !== _b ? _b : this.view.getScaleById(null === (_c = userEncoder.y) || void 0 === _c ? void 0 : _c.scale)).getCoordinate();
|
|
51
|
+
if (coord && "polar" === coord.type) {
|
|
52
|
+
this.disableCoordinateTransform = !0;
|
|
53
|
+
const origin = coord.origin();
|
|
54
|
+
userEncodeRes.cx = origin.x, userEncodeRes.cy = origin.y;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return userEncodeRes;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
} else this._encoders[state] = userEncoder;
|
|
61
|
+
}
|
|
62
|
+
_getEncoders() {
|
|
63
|
+
var _a;
|
|
64
|
+
return null !== (_a = this._encoders) && void 0 !== _a ? _a : {};
|
|
65
|
+
}
|
|
66
|
+
getAttributeTransforms() {
|
|
67
|
+
return this.coord && "polar" === this.coord.output().type ? [ {
|
|
68
|
+
channels: [ "x", "y", "x1", "y1", "cx", "cy" ],
|
|
69
|
+
transform: (graphicAttributes, nextAttrs, storedAttrs) => {
|
|
70
|
+
graphicAttributes.x = storedAttrs.cx, graphicAttributes.y = storedAttrs.cy, this.coord.output().isTransposed() ? (graphicAttributes.startAngle = storedAttrs.y,
|
|
71
|
+
graphicAttributes.endAngle = storedAttrs.y1, graphicAttributes.innerRadius = storedAttrs.x,
|
|
72
|
+
graphicAttributes.outerRadius = storedAttrs.x1) : (graphicAttributes.startAngle = storedAttrs.x,
|
|
73
|
+
graphicAttributes.endAngle = storedAttrs.x1, graphicAttributes.innerRadius = storedAttrs.y,
|
|
74
|
+
graphicAttributes.outerRadius = storedAttrs.y1);
|
|
75
|
+
},
|
|
76
|
+
storedAttrs: "sizeAttrs"
|
|
77
|
+
} ] : transformsByType.rect;
|
|
78
|
+
}
|
|
79
|
+
addGraphicItem(attrs, groupKey) {
|
|
80
|
+
const graphicItem = createGraphicItem(this, this.coord && "polar" === this.coord.output().type ? GrammarMarkType.arc : GrammarMarkType.rect, attrs);
|
|
81
|
+
return super.addGraphicItem(attrs, groupKey, graphicItem);
|
|
82
|
+
}
|
|
83
|
+
release() {
|
|
84
|
+
super.release(), this._encoders = null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=interval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/semantic-marks/interval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAUjE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uB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AW;iBACzB;aACsB,CAAC;SAC3B;QAED,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,cAAc,CAAC,KAAU,EAAE,QAAiB;QAC1C,MAAM,WAAW,GAAG,iBAAiB,CACnC,IAAI,EACJ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,EAC/F,KAAK,CACN,CAAC;QAEF,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF","file":"interval.js","sourcesContent":["import type { IBandLikeScale, IBaseScale } from '@visactor/vscale';\n// eslint-disable-next-line no-duplicate-imports\nimport { ScaleEnum } from '@visactor/vscale';\nimport { GrammarMarkType } from '../graph/enums';\nimport { invokeEncoder } from '../graph/mark/encode';\nimport { isScaleEncode } from '../parse/mark';\nimport { getGrammarOutput, isFunctionType } from '../parse/util';\nimport type {\n StateEncodeSpec,\n MarkSpec,\n IElement,\n MarkFunctionType,\n AttributeTransform,\n GetSignleEncodeSpecByType,\n BaseSignleEncodeSpec\n} from '../types';\nimport { Mark } from '../view/mark';\nimport { isNil } from '@visactor/vutils';\nimport { createGraphicItem } from '../graph/util/graphic';\nimport type { IPolarCoordinate } from '@visactor/vgrammar-coordinate';\nimport { transformsByType } from '../graph/attributes';\n\nexport class Interval extends Mark {\n declare markType: GrammarMarkType.interval;\n protected declare spec: MarkSpec;\n\n protected _encoders: StateEncodeSpec;\n\n encodeState(state: string, channel: string | BaseSignleEncodeSpec, value?: MarkFunctionType<any>) {\n super.encodeState(state, channel, value);\n\n this._updateComponentEncoders(state);\n\n return this;\n }\n\n protected _updateComponentEncoders(state: string) {\n if (!this._encoders) {\n this._encoders = {};\n }\n\n const userEncoder = this.spec.encode[state] as GetSignleEncodeSpecByType<'interval'>;\n\n if (userEncoder && state === 'update') {\n const params = this.parameters();\n const scales: Record<string, IBaseScale> = isFunctionType(userEncoder)\n ? null\n : Object.keys(userEncoder).reduce((res, channel) => {\n if (isScaleEncode(userEncoder[channel])) {\n res[channel] = getGrammarOutput(userEncoder[channel].scale, params);\n }\n return res;\n }, {});\n\n this._encoders[state] = {\n callback: (datum: any, element: IElement, parameters: any) => {\n const userEncodeRes = invokeEncoder(userEncoder, datum, element, parameters);\n\n this.disableCoordinateTransform = false;\n if (scales && scales.x && scales.x.type === ScaleEnum.Band) {\n if (!isNil(scales.y)) {\n const domain = scales.y.domain();\n const min = Math.min.apply(null, domain);\n const max = Math.max.apply(null, domain);\n const baseValue = min > 0 ? min : max < 0 ? max : 0;\n\n userEncodeRes.y1 = scales.y.scale(baseValue);\n }\n const bandWidth = (scales.x as IBandLikeScale).bandwidth();\n\n // TODO: handle bandWidth dynamically\n userEncodeRes.x = userEncodeRes.x + bandWidth / 4;\n userEncodeRes.x1 = userEncodeRes.x + bandWidth / 2;\n } else if (scales && scales.y && scales.y.type === ScaleEnum.Band) {\n if (!isNil(scales.x)) {\n const domain = scales.x.domain();\n const min = Math.min.apply(null, domain);\n const max = Math.max.apply(null, domain);\n const baseValue = min > 0 ? min : max < 0 ? max : 0;\n\n userEncodeRes.x1 = scales.x.scale(baseValue);\n }\n const bandWidth = (scales.y as IBandLikeScale).bandwidth();\n\n userEncodeRes.y = userEncodeRes.y + bandWidth / 4;\n userEncodeRes.y1 = userEncodeRes.y + bandWidth / 2;\n }\n\n if (scales) {\n const scaleGrammar =\n this.view.getScaleById((userEncoder as any).x?.scale) ??\n this.view.getScaleById((userEncoder as any).y?.scale);\n const coord = scaleGrammar.getCoordinate();\n\n if (coord && coord.type === 'polar') {\n this.disableCoordinateTransform = true;\n const origin = (coord as IPolarCoordinate).origin();\n userEncodeRes.cx = origin.x;\n userEncodeRes.cy = origin.y;\n }\n }\n\n return userEncodeRes;\n }\n } as GetSignleEncodeSpecByType<'interval'>;\n } else {\n this._encoders[state] = userEncoder;\n }\n }\n\n protected _getEncoders() {\n return this._encoders ?? {};\n }\n\n getAttributeTransforms() {\n if (this.coord && this.coord.output().type === 'polar') {\n return [\n {\n channels: ['x', 'y', 'x1', 'y1', 'cx', 'cy'],\n transform: (graphicAttributes: any, nextAttrs: any, storedAttrs: any) => {\n graphicAttributes.x = storedAttrs.cx;\n graphicAttributes.y = storedAttrs.cy;\n if (this.coord.output().isTransposed()) {\n graphicAttributes.startAngle = storedAttrs.y;\n graphicAttributes.endAngle = storedAttrs.y1;\n graphicAttributes.innerRadius = storedAttrs.x;\n graphicAttributes.outerRadius = storedAttrs.x1;\n } else {\n //\n graphicAttributes.startAngle = storedAttrs.x;\n graphicAttributes.endAngle = storedAttrs.x1;\n graphicAttributes.innerRadius = storedAttrs.y;\n graphicAttributes.outerRadius = storedAttrs.y1;\n }\n },\n storedAttrs: 'sizeAttrs'\n }\n ] as AttributeTransform[];\n }\n\n return transformsByType.rect;\n }\n\n addGraphicItem(attrs: any, groupKey?: string) {\n const graphicItem = createGraphicItem(\n this,\n this.coord && this.coord.output().type === 'polar' ? GrammarMarkType.arc : GrammarMarkType.rect,\n attrs\n );\n\n return super.addGraphicItem(attrs, groupKey, graphicItem);\n }\n\n release(): void {\n super.release();\n this._encoders = null;\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GrammarMarkType } from '../graph/enums';
|
|
2
|
+
import type { MarkSpec } from '../types';
|
|
3
|
+
import { Mark } from '../view/mark';
|
|
4
|
+
export declare class Text extends Mark {
|
|
5
|
+
markType: GrammarMarkType.text;
|
|
6
|
+
protected spec: MarkSpec;
|
|
7
|
+
addGraphicItem(initAttrs: any, groupKey?: string): any;
|
|
8
|
+
getAttributeTransforms(): import("../types").AttributeTransform[];
|
|
9
|
+
release(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GrammarMarkType } from "../graph/enums";
|
|
2
|
+
|
|
3
|
+
import { Mark } from "../view/mark";
|
|
4
|
+
|
|
5
|
+
import { createGraphicItem } from "../graph/util/graphic";
|
|
6
|
+
|
|
7
|
+
import { transformsByType } from "../graph/attributes";
|
|
8
|
+
|
|
9
|
+
export class Text extends Mark {
|
|
10
|
+
addGraphicItem(initAttrs, groupKey) {
|
|
11
|
+
const textConfig = null == initAttrs ? void 0 : initAttrs.text, isRich = "rich" === (null == textConfig ? void 0 : textConfig.type), graphicItem = createGraphicItem(this, isRich ? GrammarMarkType.richtext : GrammarMarkType.text, initAttrs);
|
|
12
|
+
return isRich && (initAttrs.textConfig = []), super.addGraphicItem(initAttrs, groupKey, graphicItem);
|
|
13
|
+
}
|
|
14
|
+
getAttributeTransforms() {
|
|
15
|
+
var _a;
|
|
16
|
+
return "richtext" === (null === (_a = this.getGroupGraphicItem()) || void 0 === _a ? void 0 : _a.type) ? transformsByType.richtext : transformsByType.text;
|
|
17
|
+
}
|
|
18
|
+
release() {
|
|
19
|
+
super.release();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/semantic-marks/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,OAAO,IAAK,SAAQ,IAAI;IAI5B,cAAc,CAAC,SAAc,EAAE,QAAiB;QAC9C,MAAM,UAAU,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,CAAC;QACnC,MAAM,MAAM,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,MAAK,MAAM,CAAC;QAC3C,MAAM,WAAW,GAAG,iBAAiB,CACnC,IAAa,EACb,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,EACxD,SAAS,CACV,CAAC;QAEF,IAAI,MAAM,EAAE;YACV,SAAS,CAAC,UAAU,GAAG,EAAE,CAAC;SAC3B;QAED,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC;IAED,sBAAsB;;QACpB,OAAO,CAAA,MAAA,IAAI,CAAC,mBAAmB,EAAE,0CAAE,IAAI,MAAK,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC;IAC7G,CAAC;IAED,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF","file":"text.js","sourcesContent":["import { GrammarMarkType } from '../graph/enums';\nimport type { IMark, MarkSpec } from '../types';\nimport { Mark } from '../view/mark';\nimport { createGraphicItem } from '../graph/util/graphic';\nimport { transformsByType } from '../graph/attributes';\n\nexport class Text extends Mark {\n declare markType: GrammarMarkType.text;\n protected declare spec: MarkSpec;\n\n addGraphicItem(initAttrs: any, groupKey?: string) {\n const textConfig = initAttrs?.text;\n const isRich = textConfig?.type === 'rich';\n const graphicItem = createGraphicItem(\n this as IMark,\n isRich ? GrammarMarkType.richtext : GrammarMarkType.text,\n initAttrs\n );\n\n if (isRich) {\n initAttrs.textConfig = [];\n }\n\n return super.addGraphicItem(initAttrs, groupKey, graphicItem);\n }\n\n getAttributeTransforms() {\n return this.getGroupGraphicItem()?.type === 'richtext' ? transformsByType.richtext : transformsByType.text;\n }\n\n release(): void {\n super.release();\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContinuousPlayerAttributes, DataLabelAttrs, DataZoomAttributes, DiscretePlayerAttributes, LineLabelAttrs, RectLabelAttrs, SymbolLabelAttrs, ArcLabelAttrs, TooltipAttributes, BaseLabelAttrs, TitleAttrs, ScrollBarAttributes } from '@visactor/vrender-components';
|
|
2
|
+
import type { IComponentTheme, RecursivePartial } from '../../types';
|
|
3
|
+
export declare const dataLabel: RecursivePartial<DataLabelAttrs>;
|
|
4
|
+
export declare const lineLabel: RecursivePartial<LineLabelAttrs>;
|
|
5
|
+
export declare const rectLabel: RecursivePartial<RectLabelAttrs>;
|
|
6
|
+
export declare const symbolLabel: RecursivePartial<SymbolLabelAttrs>;
|
|
7
|
+
export declare const arcLabel: RecursivePartial<ArcLabelAttrs>;
|
|
8
|
+
export declare const pointLabel: RecursivePartial<BaseLabelAttrs>;
|
|
9
|
+
export declare const datazoom: RecursivePartial<DataZoomAttributes>;
|
|
10
|
+
export declare const continuousPlayer: RecursivePartial<ContinuousPlayerAttributes>;
|
|
11
|
+
export declare const discretePlayer: RecursivePartial<DiscretePlayerAttributes>;
|
|
12
|
+
export declare const tooltip: RecursivePartial<TooltipAttributes>;
|
|
13
|
+
export declare const title: RecursivePartial<TitleAttrs>;
|
|
14
|
+
export declare const scrollbar: RecursivePartial<ScrollBarAttributes>;
|
|
15
|
+
export declare const defaultComponentTheme: IComponentTheme;
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
const axis = {
|
|
2
|
+
label: {
|
|
3
|
+
visible: !0,
|
|
4
|
+
inside: !1,
|
|
5
|
+
space: 4,
|
|
6
|
+
style: {
|
|
7
|
+
fontSize: 12,
|
|
8
|
+
fill: "#89909d",
|
|
9
|
+
fontWeight: "normal",
|
|
10
|
+
fillOpacity: 1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
tick: {
|
|
14
|
+
visible: !0,
|
|
15
|
+
inside: !1,
|
|
16
|
+
alignWithLabel: !0,
|
|
17
|
+
length: 4,
|
|
18
|
+
style: {
|
|
19
|
+
lineWidth: 1,
|
|
20
|
+
stroke: "#D9DDE4",
|
|
21
|
+
strokeOpacity: 1
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
subTick: {
|
|
25
|
+
visible: !1,
|
|
26
|
+
inside: !1,
|
|
27
|
+
count: 4,
|
|
28
|
+
length: 2,
|
|
29
|
+
style: {
|
|
30
|
+
lineWidth: 1,
|
|
31
|
+
stroke: "#D9DDE4",
|
|
32
|
+
strokeOpacity: 1
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
line: {
|
|
36
|
+
visible: !0,
|
|
37
|
+
style: {
|
|
38
|
+
lineWidth: 1,
|
|
39
|
+
stroke: "#D9DDE4",
|
|
40
|
+
strokeOpacity: 1
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
items: [],
|
|
44
|
+
start: {
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0
|
|
47
|
+
},
|
|
48
|
+
end: {
|
|
49
|
+
x: 100,
|
|
50
|
+
y: 0
|
|
51
|
+
},
|
|
52
|
+
x: 0,
|
|
53
|
+
y: 0
|
|
54
|
+
}, circleAxis = {
|
|
55
|
+
title: {
|
|
56
|
+
space: 4,
|
|
57
|
+
padding: [ 0, 0, 0, 0 ],
|
|
58
|
+
textStyle: {
|
|
59
|
+
fontSize: 12,
|
|
60
|
+
fill: "#333333",
|
|
61
|
+
fontWeight: "normal",
|
|
62
|
+
fillOpacity: 1
|
|
63
|
+
},
|
|
64
|
+
text: "theta"
|
|
65
|
+
},
|
|
66
|
+
label: {
|
|
67
|
+
visible: !0,
|
|
68
|
+
inside: !1,
|
|
69
|
+
space: 4,
|
|
70
|
+
style: {
|
|
71
|
+
fontSize: 12,
|
|
72
|
+
fill: "#6F6F6F",
|
|
73
|
+
fontWeight: "normal",
|
|
74
|
+
fillOpacity: 1
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
tick: {
|
|
78
|
+
visible: !0,
|
|
79
|
+
inside: !1,
|
|
80
|
+
alignWithLabel: !0,
|
|
81
|
+
length: 4,
|
|
82
|
+
style: {
|
|
83
|
+
lineWidth: 1,
|
|
84
|
+
stroke: "#D9DDE4",
|
|
85
|
+
strokeOpacity: 1
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
subTick: {
|
|
89
|
+
visible: !1,
|
|
90
|
+
inside: !1,
|
|
91
|
+
count: 4,
|
|
92
|
+
length: 2,
|
|
93
|
+
style: {
|
|
94
|
+
lineWidth: 1,
|
|
95
|
+
stroke: "#D9DDE4",
|
|
96
|
+
strokeOpacity: 1
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
line: {
|
|
100
|
+
visible: !0,
|
|
101
|
+
style: {
|
|
102
|
+
lineWidth: 1,
|
|
103
|
+
stroke: "#D9DDE4",
|
|
104
|
+
strokeOpacity: 1
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
items: [],
|
|
108
|
+
startAngle: 0,
|
|
109
|
+
endAngle: 2 * Math.PI,
|
|
110
|
+
radius: 100,
|
|
111
|
+
innerRadius: 0,
|
|
112
|
+
center: {
|
|
113
|
+
x: 0,
|
|
114
|
+
y: 0
|
|
115
|
+
},
|
|
116
|
+
x: 0,
|
|
117
|
+
y: 0
|
|
118
|
+
}, grid = {
|
|
119
|
+
style: {
|
|
120
|
+
stroke: "#f1f2f5"
|
|
121
|
+
}
|
|
122
|
+
}, circleGrid = {
|
|
123
|
+
style: {
|
|
124
|
+
stroke: "#f1f2f5"
|
|
125
|
+
}
|
|
126
|
+
}, discreteLegend = {
|
|
127
|
+
layout: "vertical",
|
|
128
|
+
title: {
|
|
129
|
+
align: "start",
|
|
130
|
+
space: 12,
|
|
131
|
+
textStyle: {
|
|
132
|
+
fontSize: 12,
|
|
133
|
+
fontWeight: "bold",
|
|
134
|
+
fill: "#2C3542"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
item: {
|
|
138
|
+
spaceCol: 10,
|
|
139
|
+
spaceRow: 10,
|
|
140
|
+
shape: {
|
|
141
|
+
space: 4,
|
|
142
|
+
style: {
|
|
143
|
+
size: 10,
|
|
144
|
+
cursor: "pointer"
|
|
145
|
+
},
|
|
146
|
+
state: {
|
|
147
|
+
selectedHover: {
|
|
148
|
+
opacity: .85
|
|
149
|
+
},
|
|
150
|
+
unSelected: {
|
|
151
|
+
fill: "#D8D8D8",
|
|
152
|
+
stroke: "#D8D8D8",
|
|
153
|
+
fillOpacity: .5
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
label: {
|
|
158
|
+
space: 4,
|
|
159
|
+
style: {
|
|
160
|
+
fontSize: 12,
|
|
161
|
+
fill: "black",
|
|
162
|
+
cursor: "pointer"
|
|
163
|
+
},
|
|
164
|
+
state: {
|
|
165
|
+
selectedHover: {
|
|
166
|
+
opacity: .85
|
|
167
|
+
},
|
|
168
|
+
unSelected: {
|
|
169
|
+
fill: "#D8D8D8",
|
|
170
|
+
fillOpacity: .5
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
value: {
|
|
175
|
+
alignRight: !1,
|
|
176
|
+
style: {
|
|
177
|
+
fontSize: 12,
|
|
178
|
+
fill: "#ccc",
|
|
179
|
+
cursor: "pointer"
|
|
180
|
+
},
|
|
181
|
+
state: {
|
|
182
|
+
selectedHover: {
|
|
183
|
+
opacity: .85
|
|
184
|
+
},
|
|
185
|
+
unSelected: {
|
|
186
|
+
fill: "#D8D8D8"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
background: {
|
|
191
|
+
style: {
|
|
192
|
+
cursor: "pointer"
|
|
193
|
+
},
|
|
194
|
+
state: {
|
|
195
|
+
selectedHover: {
|
|
196
|
+
fillOpacity: .7,
|
|
197
|
+
fill: "gray"
|
|
198
|
+
},
|
|
199
|
+
unSelectedHover: {
|
|
200
|
+
fillOpacity: .2,
|
|
201
|
+
fill: "gray"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
focus: !1,
|
|
206
|
+
focusIconStyle: {
|
|
207
|
+
size: 10,
|
|
208
|
+
fill: "#333",
|
|
209
|
+
cursor: "pointer"
|
|
210
|
+
},
|
|
211
|
+
visible: !0,
|
|
212
|
+
padding: {
|
|
213
|
+
top: 2,
|
|
214
|
+
bottom: 2,
|
|
215
|
+
left: 2,
|
|
216
|
+
right: 2
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
autoPage: !0,
|
|
220
|
+
pager: {
|
|
221
|
+
space: 12,
|
|
222
|
+
handler: {
|
|
223
|
+
style: {
|
|
224
|
+
size: 10
|
|
225
|
+
},
|
|
226
|
+
space: 4
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
hover: !0,
|
|
230
|
+
select: !0,
|
|
231
|
+
selectMode: "multiple",
|
|
232
|
+
allowAllCanceled: !1,
|
|
233
|
+
items: [ {
|
|
234
|
+
index: 0,
|
|
235
|
+
id: "",
|
|
236
|
+
label: "",
|
|
237
|
+
shape: {
|
|
238
|
+
fill: "#6690F2",
|
|
239
|
+
stroke: "#6690F2",
|
|
240
|
+
symbolType: "circle"
|
|
241
|
+
}
|
|
242
|
+
} ]
|
|
243
|
+
}, colorLegend = {
|
|
244
|
+
title: {
|
|
245
|
+
visible: !1,
|
|
246
|
+
text: ""
|
|
247
|
+
},
|
|
248
|
+
colors: [],
|
|
249
|
+
layout: "horizontal",
|
|
250
|
+
railWidth: 200,
|
|
251
|
+
railHeight: 8,
|
|
252
|
+
railStyle: {
|
|
253
|
+
cornerRadius: 5
|
|
254
|
+
}
|
|
255
|
+
}, sizeLegend = {
|
|
256
|
+
title: {
|
|
257
|
+
visible: !1,
|
|
258
|
+
text: ""
|
|
259
|
+
},
|
|
260
|
+
trackStyle: {
|
|
261
|
+
fill: "#ccc"
|
|
262
|
+
},
|
|
263
|
+
layout: "horizontal",
|
|
264
|
+
align: "bottom",
|
|
265
|
+
railWidth: 200,
|
|
266
|
+
railHeight: 6,
|
|
267
|
+
min: 0,
|
|
268
|
+
max: 1,
|
|
269
|
+
value: [ 0, 1 ]
|
|
270
|
+
}, lineCrosshair = {
|
|
271
|
+
start: {
|
|
272
|
+
x: 0,
|
|
273
|
+
y: 0
|
|
274
|
+
},
|
|
275
|
+
end: {
|
|
276
|
+
x: 0,
|
|
277
|
+
y: 0
|
|
278
|
+
}
|
|
279
|
+
}, rectCrosshair = {
|
|
280
|
+
start: {
|
|
281
|
+
x: 0,
|
|
282
|
+
y: 0
|
|
283
|
+
},
|
|
284
|
+
end: {
|
|
285
|
+
x: 0,
|
|
286
|
+
y: 0
|
|
287
|
+
},
|
|
288
|
+
rectStyle: {
|
|
289
|
+
width: 10,
|
|
290
|
+
height: 10
|
|
291
|
+
}
|
|
292
|
+
}, sectorCrosshair = {
|
|
293
|
+
center: {
|
|
294
|
+
x: 0,
|
|
295
|
+
y: 0
|
|
296
|
+
},
|
|
297
|
+
radius: 100,
|
|
298
|
+
startAngle: 0,
|
|
299
|
+
endAngle: Math.PI / 6
|
|
300
|
+
}, circleCrosshair = {
|
|
301
|
+
center: {
|
|
302
|
+
x: 0,
|
|
303
|
+
y: 0
|
|
304
|
+
},
|
|
305
|
+
radius: 100,
|
|
306
|
+
startAngle: 0,
|
|
307
|
+
endAngle: 2 * Math.PI
|
|
308
|
+
}, polygonCrosshair = {
|
|
309
|
+
center: {
|
|
310
|
+
x: 0,
|
|
311
|
+
y: 0
|
|
312
|
+
},
|
|
313
|
+
radius: 100,
|
|
314
|
+
startAngle: 0,
|
|
315
|
+
endAngle: 2 * Math.PI,
|
|
316
|
+
sides: 6
|
|
317
|
+
}, slider = {
|
|
318
|
+
layout: "horizontal",
|
|
319
|
+
railWidth: 200,
|
|
320
|
+
railHeight: 10,
|
|
321
|
+
railStyle: {
|
|
322
|
+
cornerRadius: 5
|
|
323
|
+
},
|
|
324
|
+
range: {
|
|
325
|
+
draggableTrack: !0
|
|
326
|
+
},
|
|
327
|
+
startText: {
|
|
328
|
+
visible: !0,
|
|
329
|
+
text: "",
|
|
330
|
+
space: 8
|
|
331
|
+
},
|
|
332
|
+
endText: {
|
|
333
|
+
visible: !0,
|
|
334
|
+
text: "",
|
|
335
|
+
space: 8
|
|
336
|
+
},
|
|
337
|
+
min: 0,
|
|
338
|
+
max: 1,
|
|
339
|
+
value: [ 0, 1 ]
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export const dataLabel = {
|
|
343
|
+
size: {
|
|
344
|
+
width: 400,
|
|
345
|
+
height: 400
|
|
346
|
+
},
|
|
347
|
+
dataLabels: []
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
export const lineLabel = {
|
|
351
|
+
type: "line",
|
|
352
|
+
data: [ {
|
|
353
|
+
text: "",
|
|
354
|
+
data: {}
|
|
355
|
+
} ],
|
|
356
|
+
position: "start",
|
|
357
|
+
overlap: {
|
|
358
|
+
avoidBaseMark: !0,
|
|
359
|
+
clampForce: !1,
|
|
360
|
+
size: {
|
|
361
|
+
width: 1e3,
|
|
362
|
+
height: 1e3
|
|
363
|
+
},
|
|
364
|
+
strategy: [ {
|
|
365
|
+
type: "position"
|
|
366
|
+
} ]
|
|
367
|
+
},
|
|
368
|
+
smartInvert: !1
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
export const rectLabel = {
|
|
372
|
+
type: "rect",
|
|
373
|
+
data: [ {
|
|
374
|
+
text: "",
|
|
375
|
+
fill: "#606773",
|
|
376
|
+
data: {}
|
|
377
|
+
} ],
|
|
378
|
+
position: "top",
|
|
379
|
+
overlap: {
|
|
380
|
+
size: {
|
|
381
|
+
width: 1e3,
|
|
382
|
+
height: 1e3
|
|
383
|
+
},
|
|
384
|
+
strategy: [ {
|
|
385
|
+
type: "position"
|
|
386
|
+
} ]
|
|
387
|
+
},
|
|
388
|
+
smartInvert: !1
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export const symbolLabel = {
|
|
392
|
+
type: "symbol",
|
|
393
|
+
data: [ {
|
|
394
|
+
text: "",
|
|
395
|
+
fill: "#606773",
|
|
396
|
+
data: {}
|
|
397
|
+
} ],
|
|
398
|
+
position: "top",
|
|
399
|
+
overlap: {
|
|
400
|
+
avoidBaseMark: !0,
|
|
401
|
+
size: {
|
|
402
|
+
width: 1e3,
|
|
403
|
+
height: 1e3
|
|
404
|
+
},
|
|
405
|
+
strategy: [ {
|
|
406
|
+
type: "position"
|
|
407
|
+
} ]
|
|
408
|
+
},
|
|
409
|
+
smartInvert: !1
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export const arcLabel = {
|
|
413
|
+
type: "arc",
|
|
414
|
+
data: [ {
|
|
415
|
+
text: "",
|
|
416
|
+
fill: "#606773",
|
|
417
|
+
data: {}
|
|
418
|
+
} ],
|
|
419
|
+
width: 800,
|
|
420
|
+
height: 600,
|
|
421
|
+
position: "outside",
|
|
422
|
+
zIndex: 302
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
export const pointLabel = {
|
|
426
|
+
data: [ {
|
|
427
|
+
text: "",
|
|
428
|
+
fill: "#606773",
|
|
429
|
+
data: {}
|
|
430
|
+
} ],
|
|
431
|
+
overlap: {
|
|
432
|
+
avoidBaseMark: !1,
|
|
433
|
+
clampForce: !1,
|
|
434
|
+
size: {
|
|
435
|
+
width: 1e3,
|
|
436
|
+
height: 1e3
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
smartInvert: !1
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export const datazoom = {
|
|
443
|
+
orient: "bottom",
|
|
444
|
+
showDetail: "auto",
|
|
445
|
+
brushSelect: !0,
|
|
446
|
+
start: 0,
|
|
447
|
+
end: 1,
|
|
448
|
+
position: {
|
|
449
|
+
x: 0,
|
|
450
|
+
y: 0
|
|
451
|
+
},
|
|
452
|
+
size: {
|
|
453
|
+
width: 500,
|
|
454
|
+
height: 40
|
|
455
|
+
},
|
|
456
|
+
previewData: []
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export const continuousPlayer = {};
|
|
460
|
+
|
|
461
|
+
export const discretePlayer = {};
|
|
462
|
+
|
|
463
|
+
export const tooltip = {};
|
|
464
|
+
|
|
465
|
+
export const title = {
|
|
466
|
+
textStyle: {
|
|
467
|
+
fill: "#21252c"
|
|
468
|
+
},
|
|
469
|
+
subtextStyle: {
|
|
470
|
+
fill: "#606773"
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
export const scrollbar = {
|
|
475
|
+
width: 12,
|
|
476
|
+
height: 12,
|
|
477
|
+
padding: [ 2, 2 ],
|
|
478
|
+
railStyle: {
|
|
479
|
+
fill: "rgba(0, 0, 0, .1)"
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
export const defaultComponentTheme = {
|
|
484
|
+
axis: axis,
|
|
485
|
+
circleAxis: circleAxis,
|
|
486
|
+
grid: grid,
|
|
487
|
+
circleGrid: circleGrid,
|
|
488
|
+
discreteLegend: discreteLegend,
|
|
489
|
+
colorLegend: colorLegend,
|
|
490
|
+
sizeLegend: sizeLegend,
|
|
491
|
+
lineCrosshair: lineCrosshair,
|
|
492
|
+
rectCrosshair: rectCrosshair,
|
|
493
|
+
sectorCrosshair: sectorCrosshair,
|
|
494
|
+
circleCrosshair: circleCrosshair,
|
|
495
|
+
polygonCrosshair: polygonCrosshair,
|
|
496
|
+
slider: slider,
|
|
497
|
+
dataLabel: dataLabel,
|
|
498
|
+
pointLabel: pointLabel,
|
|
499
|
+
lineLabel: lineLabel,
|
|
500
|
+
rectLabel: rectLabel,
|
|
501
|
+
symbolLabel: symbolLabel,
|
|
502
|
+
arcLabel: arcLabel,
|
|
503
|
+
datazoom: datazoom,
|
|
504
|
+
continuousPlayer: continuousPlayer,
|
|
505
|
+
discretePlayer: discretePlayer,
|
|
506
|
+
tooltip: tooltip,
|
|
507
|
+
title: title,
|
|
508
|
+
scrollbar: scrollbar
|
|
509
|
+
};
|
|
510
|
+
//# sourceMappingURL=component.js.map
|