@antv/g2 4.2.6 → 5.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +3 -3
- package/README.en-US.md +47 -74
- package/README.md +47 -72
- package/dist/g2.min.js +10 -16
- package/esm/adjust/index.d.ts +1 -0
- package/esm/adjust/index.js +2 -0
- package/esm/adjust/index.js.map +1 -0
- package/esm/adjust/pack.d.ts +8 -0
- package/esm/adjust/pack.js +55 -0
- package/esm/adjust/pack.js.map +1 -0
- package/esm/animation/fadeIn.d.ts +7 -0
- package/esm/animation/fadeIn.js +21 -0
- package/esm/animation/fadeIn.js.map +1 -0
- package/esm/animation/fadeOut.d.ts +7 -0
- package/esm/animation/fadeOut.js +21 -0
- package/esm/animation/fadeOut.js.map +1 -0
- package/esm/animation/index.d.ts +7 -0
- package/esm/animation/index.js +8 -0
- package/esm/animation/index.js.map +1 -0
- package/esm/animation/morphing.d.ts +13 -0
- package/esm/animation/morphing.js +160 -0
- package/esm/animation/morphing.js.map +1 -0
- package/esm/animation/scaleInX.d.ts +7 -0
- package/esm/animation/scaleInX.js +45 -0
- package/esm/animation/scaleInX.js.map +1 -0
- package/esm/animation/scaleInY.d.ts +7 -0
- package/esm/animation/scaleInY.js +45 -0
- package/esm/animation/scaleInY.js.map +1 -0
- package/esm/animation/scaleOutX.d.ts +7 -0
- package/esm/animation/scaleOutX.js +45 -0
- package/esm/animation/scaleOutX.js.map +1 -0
- package/esm/animation/scaleOutY.d.ts +7 -0
- package/esm/animation/scaleOutY.js +45 -0
- package/esm/animation/scaleOutY.js.map +1 -0
- package/esm/animation/utils.d.ts +2 -0
- package/esm/animation/utils.js +17 -0
- package/esm/animation/utils.js.map +1 -0
- package/esm/api/chart.d.ts +33 -0
- package/esm/api/chart.js +110 -0
- package/esm/api/chart.js.map +1 -0
- package/esm/api/composition/circle.d.ts +21 -0
- package/esm/api/composition/circle.js +30 -0
- package/esm/api/composition/circle.js.map +1 -0
- package/esm/api/composition/flex.d.ts +17 -0
- package/esm/api/composition/flex.js +26 -0
- package/esm/api/composition/flex.js.map +1 -0
- package/esm/api/composition/index.d.ts +26 -0
- package/esm/api/composition/index.js +27 -0
- package/esm/api/composition/index.js.map +1 -0
- package/esm/api/composition/keyframe.d.ts +17 -0
- package/esm/api/composition/keyframe.js +26 -0
- package/esm/api/composition/keyframe.js.map +1 -0
- package/esm/api/composition/layer.d.ts +14 -0
- package/esm/api/composition/layer.js +23 -0
- package/esm/api/composition/layer.js.map +1 -0
- package/esm/api/composition/matrix.d.ts +21 -0
- package/esm/api/composition/matrix.js +30 -0
- package/esm/api/composition/matrix.js.map +1 -0
- package/esm/api/composition/rect.d.ts +23 -0
- package/esm/api/composition/rect.js +32 -0
- package/esm/api/composition/rect.js.map +1 -0
- package/esm/api/composition/view.d.ts +20 -0
- package/esm/api/composition/view.js +30 -0
- package/esm/api/composition/view.js.map +1 -0
- package/esm/api/index.d.ts +2 -0
- package/esm/api/index.js +3 -0
- package/esm/api/index.js.map +1 -0
- package/esm/api/library.d.ts +3 -0
- package/esm/api/library.js +7 -0
- package/esm/api/library.js.map +1 -0
- package/esm/api/mark/index.d.ts +41 -0
- package/esm/api/mark/index.js +22 -0
- package/esm/api/mark/index.js.map +1 -0
- package/esm/api/mark/mark.d.ts +114 -0
- package/esm/api/mark/mark.js +190 -0
- package/esm/api/mark/mark.js.map +1 -0
- package/esm/api/mark/types.d.ts +21 -0
- package/esm/{util → api/mark}/types.js +0 -0
- package/esm/api/mark/types.js.map +1 -0
- package/esm/api/node.d.ts +31 -0
- package/esm/api/node.js +55 -0
- package/esm/api/node.js.map +1 -0
- package/esm/api/props.d.ts +12 -0
- package/esm/api/props.js +75 -0
- package/esm/api/props.js.map +1 -0
- package/esm/api/types.d.ts +10 -0
- package/esm/api/types.js +2 -0
- package/esm/api/types.js.map +1 -0
- package/esm/component/axis.d.ts +13 -0
- package/esm/component/axis.js +294 -0
- package/esm/component/axis.js.map +1 -0
- package/esm/component/axisX.d.ts +7 -0
- package/esm/component/axisX.js +9 -0
- package/esm/component/axisX.js.map +1 -0
- package/esm/component/axisY.d.ts +7 -0
- package/esm/component/axisY.js +9 -0
- package/esm/component/axisY.js.map +1 -0
- package/esm/component/index.d.ts +5 -0
- package/esm/component/index.js +6 -0
- package/esm/component/index.js.map +1 -0
- package/esm/component/legendCategory.d.ts +10 -0
- package/esm/component/legendCategory.js +84 -0
- package/esm/component/legendCategory.js.map +1 -0
- package/esm/component/legendContinuous.d.ts +9 -0
- package/esm/component/legendContinuous.js +38 -0
- package/esm/component/legendContinuous.js.map +1 -0
- package/esm/component/title.d.ts +6 -0
- package/esm/component/title.js +54 -0
- package/esm/component/title.js.map +1 -0
- package/esm/component/utils.d.ts +8 -0
- package/esm/component/utils.js +27 -0
- package/esm/component/utils.js.map +1 -0
- package/esm/composition/circle.d.ts +7 -0
- package/esm/composition/circle.js +85 -0
- package/esm/composition/circle.js.map +1 -0
- package/esm/composition/flex.d.ts +7 -0
- package/esm/composition/flex.js +40 -0
- package/esm/composition/flex.js.map +1 -0
- package/esm/composition/index.d.ts +8 -0
- package/esm/composition/index.js +9 -0
- package/esm/composition/index.js.map +1 -0
- package/esm/composition/keyframe.d.ts +7 -0
- package/esm/composition/keyframe.js +75 -0
- package/esm/composition/keyframe.js.map +1 -0
- package/esm/composition/layer.d.ts +7 -0
- package/esm/composition/layer.js +32 -0
- package/esm/composition/layer.js.map +1 -0
- package/esm/composition/mark.d.ts +4 -0
- package/esm/composition/mark.js +41 -0
- package/esm/composition/mark.js.map +1 -0
- package/esm/composition/matrix.d.ts +8 -0
- package/esm/composition/matrix.js +151 -0
- package/esm/composition/matrix.js.map +1 -0
- package/esm/composition/rect.d.ts +30 -0
- package/esm/composition/rect.js +286 -0
- package/esm/composition/rect.js.map +1 -0
- package/esm/composition/utils.d.ts +16 -0
- package/esm/composition/utils.js +33 -0
- package/esm/composition/utils.js.map +1 -0
- package/esm/composition/view.d.ts +9 -0
- package/esm/composition/view.js +33 -0
- package/esm/composition/view.js.map +1 -0
- package/esm/coordinate/cartesian.d.ts +7 -0
- package/esm/coordinate/cartesian.js +6 -0
- package/esm/coordinate/cartesian.js.map +1 -0
- package/esm/coordinate/fisheye.d.ts +7 -0
- package/esm/coordinate/fisheye.js +6 -0
- package/esm/coordinate/fisheye.js.map +1 -0
- package/esm/coordinate/fisheyeX.d.ts +7 -0
- package/esm/coordinate/fisheyeX.js +6 -0
- package/esm/coordinate/fisheyeX.js.map +1 -0
- package/esm/coordinate/fisheyeY.d.ts +7 -0
- package/esm/coordinate/fisheyeY.js +6 -0
- package/esm/coordinate/fisheyeY.js.map +1 -0
- package/esm/coordinate/helix.d.ts +7 -0
- package/esm/coordinate/helix.js +11 -0
- package/esm/coordinate/helix.js.map +1 -0
- package/esm/coordinate/index.d.ts +12 -0
- package/esm/coordinate/index.js +13 -0
- package/esm/coordinate/index.js.map +1 -0
- package/esm/coordinate/parallel.d.ts +7 -0
- package/esm/coordinate/parallel.js +6 -0
- package/esm/coordinate/parallel.js.map +1 -0
- package/esm/coordinate/polar.d.ts +8 -0
- package/esm/coordinate/polar.js +12 -0
- package/esm/coordinate/polar.js.map +1 -0
- package/esm/coordinate/reflect.d.ts +7 -0
- package/esm/coordinate/reflect.js +10 -0
- package/esm/coordinate/reflect.js.map +1 -0
- package/esm/coordinate/reflectX.d.ts +7 -0
- package/esm/coordinate/reflectX.js +10 -0
- package/esm/coordinate/reflectX.js.map +1 -0
- package/esm/coordinate/reflectY.d.ts +7 -0
- package/esm/coordinate/reflectY.js +10 -0
- package/esm/coordinate/reflectY.js.map +1 -0
- package/esm/coordinate/theta.d.ts +7 -0
- package/esm/coordinate/theta.js +11 -0
- package/esm/coordinate/theta.js.map +1 -0
- package/esm/coordinate/transpose.d.ts +7 -0
- package/esm/coordinate/transpose.js +11 -0
- package/esm/coordinate/transpose.js.map +1 -0
- package/esm/data/arc.d.ts +0 -0
- package/esm/data/arc.js +19 -0
- package/esm/data/arc.js.map +1 -0
- package/esm/data/cluster.d.ts +0 -0
- package/esm/data/cluster.js +47 -0
- package/esm/data/cluster.js.map +1 -0
- package/esm/data/connector.d.ts +7 -0
- package/esm/data/connector.js +9 -0
- package/esm/data/connector.js.map +1 -0
- package/esm/data/fetch.d.ts +4 -0
- package/esm/data/fetch.js +27 -0
- package/esm/data/fetch.js.map +1 -0
- package/esm/data/filterBy.d.ts +8 -0
- package/esm/data/filterBy.js +13 -0
- package/esm/data/filterBy.js.map +1 -0
- package/esm/data/fold.d.ts +10 -0
- package/esm/data/fold.js +24 -0
- package/esm/data/fold.js.map +1 -0
- package/esm/data/index.d.ts +9 -0
- package/esm/data/index.js +10 -0
- package/esm/data/index.js.map +1 -0
- package/esm/data/inline.d.ts +4 -0
- package/esm/data/inline.js +6 -0
- package/esm/data/inline.js.map +1 -0
- package/esm/data/pick.d.ts +7 -0
- package/esm/data/pick.js +10 -0
- package/esm/data/pick.js.map +1 -0
- package/esm/data/rename.d.ts +8 -0
- package/esm/data/rename.js +17 -0
- package/esm/data/rename.js.map +1 -0
- package/esm/data/sankey.d.ts +0 -0
- package/esm/data/sankey.js +96 -0
- package/esm/data/sankey.js.map +1 -0
- package/esm/data/sortBy.d.ts +7 -0
- package/esm/data/sortBy.js +14 -0
- package/esm/data/sortBy.js.map +1 -0
- package/esm/data/subset.d.ts +7 -0
- package/esm/data/subset.js +26 -0
- package/esm/data/subset.js.map +1 -0
- package/esm/data/tree.d.ts +0 -0
- package/esm/data/tree.js +10 -0
- package/esm/data/tree.js.map +1 -0
- package/esm/data/utils/arc/arc.d.ts +8 -0
- package/esm/data/utils/arc/arc.js +161 -0
- package/esm/data/utils/arc/arc.js.map +1 -0
- package/esm/data/utils/arc/index.d.ts +2 -0
- package/esm/data/utils/arc/index.js +2 -0
- package/esm/data/utils/arc/index.js.map +1 -0
- package/esm/data/utils/arc/sort.d.ts +4 -0
- package/esm/data/utils/arc/sort.js +13 -0
- package/esm/data/utils/arc/sort.js.map +1 -0
- package/esm/data/utils/arc/types.d.ts +26 -0
- package/esm/data/utils/arc/types.js +2 -0
- package/esm/data/utils/arc/types.js.map +1 -0
- package/esm/data/utils/d3-cloud/index.d.ts +1 -0
- package/esm/data/utils/d3-cloud/index.js +395 -0
- package/esm/data/utils/d3-cloud/index.js.map +1 -0
- package/esm/data/utils/d3-sankey/align.d.ts +4 -0
- package/esm/data/utils/d3-sankey/align.js +21 -0
- package/esm/data/utils/d3-sankey/align.js.map +1 -0
- package/esm/data/utils/d3-sankey/constant.d.ts +1 -0
- package/esm/data/utils/d3-sankey/constant.js +6 -0
- package/esm/data/utils/d3-sankey/constant.js.map +1 -0
- package/esm/data/utils/d3-sankey/index.d.ts +12 -0
- package/esm/data/utils/d3-sankey/index.js +13 -0
- package/esm/data/utils/d3-sankey/index.js.map +1 -0
- package/esm/data/utils/d3-sankey/sankey.d.ts +24 -0
- package/esm/data/utils/d3-sankey/sankey.js +388 -0
- package/esm/data/utils/d3-sankey/sankey.js.map +1 -0
- package/esm/data/utils/flow.d.ts +9 -0
- package/esm/data/utils/flow.js +45 -0
- package/esm/data/utils/flow.js.map +1 -0
- package/esm/data/utils/memo.d.ts +17 -0
- package/esm/data/utils/memo.js +79 -0
- package/esm/data/utils/memo.js.map +1 -0
- package/esm/data/voronoi.d.ts +0 -0
- package/esm/data/voronoi.js +27 -0
- package/esm/data/voronoi.js.map +1 -0
- package/esm/data/wordCloud.d.ts +0 -0
- package/esm/data/wordCloud.js +100 -0
- package/esm/data/wordCloud.js.map +1 -0
- package/esm/encode/column.d.ts +7 -0
- package/esm/encode/column.js +8 -0
- package/esm/encode/column.js.map +1 -0
- package/esm/encode/constant.d.ts +7 -0
- package/esm/encode/constant.js +8 -0
- package/esm/encode/constant.js.map +1 -0
- package/esm/encode/field.d.ts +7 -0
- package/esm/encode/field.js +8 -0
- package/esm/encode/field.js.map +1 -0
- package/esm/encode/index.d.ts +4 -0
- package/esm/encode/index.js +5 -0
- package/esm/encode/index.js.map +1 -0
- package/esm/encode/transform.d.ts +9 -0
- package/esm/encode/transform.js +10 -0
- package/esm/encode/transform.js.map +1 -0
- package/esm/index.d.ts +4 -107
- package/esm/index.js +3 -588
- package/esm/index.js.map +1 -1
- package/esm/interaction/action/index.d.ts +23 -2
- package/esm/interaction/action/index.js +23 -2
- package/esm/interaction/action/index.js.map +1 -1
- package/esm/interaction/action/service/elementSelection.d.ts +4 -0
- package/esm/interaction/action/service/elementSelection.js +90 -0
- package/esm/interaction/action/service/elementSelection.js.map +1 -0
- package/esm/interaction/action/service/fisheyeFocus.d.ts +4 -0
- package/esm/interaction/action/service/fisheyeFocus.js +51 -0
- package/esm/interaction/action/service/fisheyeFocus.js.map +1 -0
- package/esm/interaction/action/service/legendItemSelection.d.ts +4 -0
- package/esm/interaction/action/service/legendItemSelection.js +17 -0
- package/esm/interaction/action/service/legendItemSelection.js.map +1 -0
- package/esm/interaction/action/service/recordCurrentPoint.d.ts +4 -0
- package/esm/interaction/action/service/recordCurrentPoint.js +16 -0
- package/esm/interaction/action/service/recordCurrentPoint.js.map +1 -0
- package/esm/interaction/action/service/recordPoint.d.ts +4 -0
- package/esm/interaction/action/service/recordPoint.js +28 -0
- package/esm/interaction/action/service/recordPoint.js.map +1 -0
- package/esm/interaction/action/service/recordRegion.d.ts +4 -0
- package/esm/interaction/action/service/recordRegion.js +30 -0
- package/esm/interaction/action/service/recordRegion.js.map +1 -0
- package/esm/interaction/action/service/recordState.d.ts +4 -0
- package/esm/interaction/action/service/recordState.js +10 -0
- package/esm/interaction/action/service/recordState.js.map +1 -0
- package/esm/interaction/action/service/recordTip.d.ts +8 -0
- package/esm/interaction/action/service/recordTip.js +15 -0
- package/esm/interaction/action/service/recordTip.js.map +1 -0
- package/esm/interaction/action/service/surfacePointSelection.d.ts +4 -0
- package/esm/interaction/action/service/surfacePointSelection.js +19 -0
- package/esm/interaction/action/service/surfacePointSelection.js.map +1 -0
- package/esm/interaction/action/service/triggerInfoSelection.d.ts +4 -0
- package/esm/interaction/action/service/triggerInfoSelection.js +18 -0
- package/esm/interaction/action/service/triggerInfoSelection.js.map +1 -0
- package/esm/interaction/action/transformer/activeElement.d.ts +4 -0
- package/esm/interaction/action/transformer/activeElement.js +23 -0
- package/esm/interaction/action/transformer/activeElement.js.map +1 -0
- package/esm/interaction/action/transformer/activeRegion.d.ts +4 -0
- package/esm/interaction/action/transformer/activeRegion.js +52 -0
- package/esm/interaction/action/transformer/activeRegion.js.map +1 -0
- package/esm/interaction/action/transformer/button.d.ts +4 -0
- package/esm/interaction/action/transformer/button.js +76 -0
- package/esm/interaction/action/transformer/button.js.map +1 -0
- package/esm/interaction/action/transformer/cursor.d.ts +4 -0
- package/esm/interaction/action/transformer/cursor.js +15 -0
- package/esm/interaction/action/transformer/cursor.js.map +1 -0
- package/esm/interaction/action/transformer/filter.d.ts +7 -0
- package/esm/interaction/action/transformer/filter.js +45 -0
- package/esm/interaction/action/transformer/filter.js.map +1 -0
- package/esm/interaction/action/transformer/filterElement.d.ts +4 -0
- package/esm/interaction/action/transformer/filterElement.js +41 -0
- package/esm/interaction/action/transformer/filterElement.js.map +1 -0
- package/esm/interaction/action/transformer/highlightElement.d.ts +4 -0
- package/esm/interaction/action/transformer/highlightElement.js +48 -0
- package/esm/interaction/action/transformer/highlightElement.js.map +1 -0
- package/esm/interaction/action/transformer/mask.d.ts +7 -0
- package/esm/interaction/action/transformer/mask.js +106 -0
- package/esm/interaction/action/transformer/mask.js.map +1 -0
- package/esm/interaction/action/transformer/move.d.ts +7 -0
- package/esm/interaction/action/transformer/move.js +70 -0
- package/esm/interaction/action/transformer/move.js.map +1 -0
- package/esm/interaction/action/transformer/plot.d.ts +4 -0
- package/esm/interaction/action/transformer/plot.js +10 -0
- package/esm/interaction/action/transformer/plot.js.map +1 -0
- package/esm/interaction/action/transformer/poptip.d.ts +4 -0
- package/esm/interaction/action/transformer/poptip.js +39 -0
- package/esm/interaction/action/transformer/poptip.js.map +1 -0
- package/esm/interaction/action/transformer/setItemState.d.ts +4 -0
- package/esm/interaction/action/transformer/setItemState.js +31 -0
- package/esm/interaction/action/transformer/setItemState.js.map +1 -0
- package/esm/interaction/action/transformer/tooltip.d.ts +9 -0
- package/esm/interaction/action/transformer/tooltip.js +289 -0
- package/esm/interaction/action/transformer/tooltip.js.map +1 -0
- package/esm/interaction/builtin/activeRegion.d.ts +19 -0
- package/esm/interaction/builtin/activeRegion.js +18 -0
- package/esm/interaction/builtin/activeRegion.js.map +1 -0
- package/esm/interaction/builtin/brush.d.ts +132 -0
- package/esm/interaction/builtin/brush.js +93 -0
- package/esm/interaction/builtin/brush.js.map +1 -0
- package/esm/interaction/builtin/brushHighlight.d.ts +98 -0
- package/esm/interaction/builtin/brushHighlight.js +111 -0
- package/esm/interaction/builtin/brushHighlight.js.map +1 -0
- package/esm/interaction/builtin/brushVisible.d.ts +88 -0
- package/esm/interaction/builtin/brushVisible.js +62 -0
- package/esm/interaction/builtin/brushVisible.js.map +1 -0
- package/esm/interaction/builtin/elementActive.d.ts +22 -0
- package/esm/interaction/builtin/elementActive.js +25 -0
- package/esm/interaction/builtin/elementActive.js.map +1 -0
- package/esm/interaction/builtin/elementHighlight.d.ts +19 -0
- package/esm/interaction/builtin/elementHighlight.js +24 -0
- package/esm/interaction/builtin/elementHighlight.js.map +1 -0
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +23 -0
- package/esm/interaction/builtin/elementHighlightByColor.js +24 -0
- package/esm/interaction/builtin/elementHighlightByColor.js.map +1 -0
- package/esm/interaction/builtin/elementHighlightByX.d.ts +23 -0
- package/esm/interaction/builtin/elementHighlightByX.js +24 -0
- package/esm/interaction/builtin/elementHighlightByX.js.map +1 -0
- package/esm/interaction/builtin/elementListHighlight.d.ts +43 -0
- package/esm/interaction/builtin/elementListHighlight.js +28 -0
- package/esm/interaction/builtin/elementListHighlight.js.map +1 -0
- package/esm/interaction/builtin/elementSelected.d.ts +20 -0
- package/esm/interaction/builtin/elementSelected.js +18 -0
- package/esm/interaction/builtin/elementSelected.js.map +1 -0
- package/esm/interaction/builtin/ellipsisText.d.ts +19 -0
- package/esm/interaction/builtin/ellipsisText.js +17 -0
- package/esm/interaction/builtin/ellipsisText.js.map +1 -0
- package/esm/interaction/builtin/fisheye.d.ts +35 -0
- package/esm/interaction/builtin/fisheye.js +20 -0
- package/esm/interaction/builtin/fisheye.js.map +1 -0
- package/esm/interaction/builtin/legendActive.d.ts +43 -0
- package/esm/interaction/builtin/legendActive.js +30 -0
- package/esm/interaction/builtin/legendActive.js.map +1 -0
- package/esm/interaction/builtin/legendHighlight.d.ts +43 -0
- package/esm/interaction/builtin/legendHighlight.js +30 -0
- package/esm/interaction/builtin/legendHighlight.js.map +1 -0
- package/esm/interaction/builtin/tooltip.d.ts +44 -0
- package/esm/interaction/builtin/tooltip.js +28 -0
- package/esm/interaction/builtin/tooltip.js.map +1 -0
- package/esm/interaction/create.d.ts +3 -0
- package/esm/interaction/create.js +96 -0
- package/esm/interaction/create.js.map +1 -0
- package/esm/interaction/index.d.ts +18 -25
- package/esm/interaction/index.js +18 -42
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/interactor/index.d.ts +2 -0
- package/esm/interaction/interactor/index.js +3 -0
- package/esm/interaction/interactor/index.js.map +1 -0
- package/esm/interaction/interactor/mousePosition.d.ts +3 -0
- package/esm/interaction/interactor/mousePosition.js +10 -0
- package/esm/interaction/interactor/mousePosition.js.map +1 -0
- package/esm/interaction/interactor/touchPosition.d.ts +3 -0
- package/esm/interaction/interactor/touchPosition.js +10 -0
- package/esm/interaction/interactor/touchPosition.js.map +1 -0
- package/esm/interaction/stdlib.d.ts +2 -0
- package/esm/interaction/stdlib.js +32 -0
- package/esm/interaction/stdlib.js.map +1 -0
- package/esm/interaction/types.d.ts +57 -0
- package/esm/interaction/types.js +2 -0
- package/esm/interaction/types.js.map +1 -0
- package/esm/interaction/utils.d.ts +3 -0
- package/esm/interaction/utils.js +40 -0
- package/esm/interaction/utils.js.map +1 -0
- package/esm/labelLayout/hideOverlap.d.ts +2 -0
- package/esm/labelLayout/hideOverlap.js +38 -0
- package/esm/labelLayout/hideOverlap.js.map +1 -0
- package/esm/labelLayout/index.d.ts +1 -0
- package/esm/labelLayout/index.js +2 -0
- package/esm/labelLayout/index.js.map +1 -0
- package/esm/mark/annotation/connector.d.ts +4 -0
- package/esm/mark/annotation/connector.js +18 -0
- package/esm/mark/annotation/connector.js.map +1 -0
- package/esm/mark/annotation/index.d.ts +7 -0
- package/esm/mark/annotation/index.js +8 -0
- package/esm/mark/annotation/index.js.map +1 -0
- package/esm/mark/annotation/lineX.d.ts +4 -0
- package/esm/mark/annotation/lineX.js +21 -0
- package/esm/mark/annotation/lineX.js.map +1 -0
- package/esm/mark/annotation/lineY.d.ts +4 -0
- package/esm/mark/annotation/lineY.js +21 -0
- package/esm/mark/annotation/lineY.js.map +1 -0
- package/esm/mark/annotation/range.d.ts +8 -0
- package/esm/mark/annotation/range.js +44 -0
- package/esm/mark/annotation/range.js.map +1 -0
- package/esm/mark/annotation/rangeX.d.ts +4 -0
- package/esm/mark/annotation/rangeX.js +14 -0
- package/esm/mark/annotation/rangeX.js.map +1 -0
- package/esm/mark/annotation/rangeY.d.ts +4 -0
- package/esm/mark/annotation/rangeY.js +14 -0
- package/esm/mark/annotation/rangeY.js.map +1 -0
- package/esm/mark/annotation/text.d.ts +4 -0
- package/esm/mark/annotation/text.js +21 -0
- package/esm/mark/annotation/text.js.map +1 -0
- package/esm/mark/geometry/area.d.ts +4 -0
- package/esm/mark/geometry/area.js +70 -0
- package/esm/mark/geometry/area.js.map +1 -0
- package/esm/mark/geometry/edge.d.ts +13 -0
- package/esm/mark/geometry/edge.js +31 -0
- package/esm/mark/geometry/edge.js.map +1 -0
- package/esm/mark/geometry/grid.d.ts +9 -0
- package/esm/mark/geometry/grid.js +46 -0
- package/esm/mark/geometry/grid.js.map +1 -0
- package/esm/mark/geometry/image.d.ts +4 -0
- package/esm/mark/geometry/image.js +34 -0
- package/esm/mark/geometry/image.js.map +1 -0
- package/esm/mark/geometry/index.d.ts +13 -0
- package/esm/mark/geometry/index.js +14 -0
- package/esm/mark/geometry/index.js.map +1 -0
- package/esm/mark/geometry/interval.d.ts +12 -0
- package/esm/mark/geometry/interval.js +59 -0
- package/esm/mark/geometry/interval.js.map +1 -0
- package/esm/mark/geometry/line.d.ts +7 -0
- package/esm/mark/geometry/line.js +76 -0
- package/esm/mark/geometry/line.js.map +1 -0
- package/esm/mark/geometry/link.d.ts +7 -0
- package/esm/mark/geometry/link.js +33 -0
- package/esm/mark/geometry/link.js.map +1 -0
- package/esm/mark/geometry/node.d.ts +8 -0
- package/esm/mark/geometry/node.js +27 -0
- package/esm/mark/geometry/node.js.map +1 -0
- package/esm/mark/geometry/point.d.ts +10 -0
- package/esm/mark/geometry/point.js +71 -0
- package/esm/mark/geometry/point.js.map +1 -0
- package/esm/mark/geometry/polygon.d.ts +7 -0
- package/esm/mark/geometry/polygon.js +43 -0
- package/esm/mark/geometry/polygon.js.map +1 -0
- package/esm/mark/geometry/schema.d.ts +34 -0
- package/esm/mark/geometry/schema.js +90 -0
- package/esm/mark/geometry/schema.js.map +1 -0
- package/esm/mark/geometry/text.d.ts +4 -0
- package/esm/mark/geometry/text.js +35 -0
- package/esm/mark/geometry/text.js.map +1 -0
- package/esm/mark/geometry/vector.d.ts +8 -0
- package/esm/mark/geometry/vector.js +43 -0
- package/esm/mark/geometry/vector.js.map +1 -0
- package/esm/mark/utils.d.ts +8 -0
- package/esm/mark/utils.js +30 -0
- package/esm/mark/utils.js.map +1 -0
- package/esm/palette/category10.d.ts +7 -0
- package/esm/palette/category10.js +19 -0
- package/esm/palette/category10.js.map +1 -0
- package/esm/palette/category20.d.ts +7 -0
- package/esm/palette/category20.js +29 -0
- package/esm/palette/category20.js.map +1 -0
- package/esm/palette/index.d.ts +2 -0
- package/esm/palette/index.js +3 -0
- package/esm/palette/index.js.map +1 -0
- package/esm/renderer/canvas.d.ts +10 -0
- package/esm/renderer/canvas.js +18 -0
- package/esm/renderer/canvas.js.map +1 -0
- package/esm/renderer/index.d.ts +1 -0
- package/esm/renderer/index.js +2 -0
- package/esm/renderer/index.js.map +1 -0
- package/esm/runtime/component.d.ts +5 -0
- package/esm/runtime/component.js +140 -0
- package/esm/runtime/component.js.map +1 -0
- package/esm/runtime/coordinate.d.ts +11 -0
- package/esm/runtime/coordinate.js +50 -0
- package/esm/runtime/coordinate.js.map +1 -0
- package/esm/runtime/index.d.ts +8 -0
- package/esm/runtime/index.js +9 -0
- package/esm/runtime/index.js.map +1 -0
- package/esm/runtime/layout.d.ts +5 -0
- package/esm/runtime/layout.js +115 -0
- package/esm/runtime/layout.js.map +1 -0
- package/esm/runtime/library.d.ts +3 -0
- package/esm/runtime/library.js +26 -0
- package/esm/runtime/library.js.map +1 -0
- package/esm/runtime/mark.d.ts +6 -0
- package/esm/runtime/mark.js +127 -0
- package/esm/runtime/mark.js.map +1 -0
- package/esm/runtime/plot.d.ts +3 -0
- package/esm/runtime/plot.js +560 -0
- package/esm/runtime/plot.js.map +1 -0
- package/esm/runtime/render.d.ts +2 -0
- package/esm/runtime/render.js +67 -0
- package/esm/runtime/render.js.map +1 -0
- package/esm/runtime/scale.d.ts +8 -0
- package/esm/runtime/scale.js +335 -0
- package/esm/runtime/scale.js.map +1 -0
- package/esm/runtime/transform.d.ts +9 -0
- package/esm/runtime/transform.js +144 -0
- package/esm/runtime/transform.js.map +1 -0
- package/esm/runtime/types/common.d.ts +127 -0
- package/esm/runtime/types/common.js +2 -0
- package/esm/runtime/types/common.js.map +1 -0
- package/esm/runtime/types/component.d.ts +76 -0
- package/esm/runtime/types/component.js +2 -0
- package/esm/runtime/types/component.js.map +1 -0
- package/esm/runtime/types/data.d.ts +7 -0
- package/esm/runtime/types/data.js +2 -0
- package/esm/runtime/types/data.js.map +1 -0
- package/esm/runtime/types/encode.d.ts +23 -0
- package/esm/runtime/types/encode.js +2 -0
- package/esm/runtime/types/encode.js.map +1 -0
- package/esm/runtime/types/mark.d.ts +20 -0
- package/esm/runtime/types/mark.js +2 -0
- package/esm/runtime/types/mark.js.map +1 -0
- package/esm/runtime/types/options.d.ts +109 -0
- package/esm/runtime/types/options.js +2 -0
- package/esm/runtime/types/options.js.map +1 -0
- package/esm/runtime/types/transform.d.ts +17 -0
- package/esm/runtime/types/transform.js +2 -0
- package/esm/runtime/types/transform.js.map +1 -0
- package/esm/scale/band.d.ts +4 -0
- package/esm/scale/band.js +6 -0
- package/esm/scale/band.js.map +1 -0
- package/esm/scale/identity.d.ts +4 -0
- package/esm/scale/identity.js +6 -0
- package/esm/scale/identity.js.map +1 -0
- package/esm/scale/index.d.ts +11 -0
- package/esm/scale/index.js +12 -0
- package/esm/scale/index.js.map +1 -0
- package/esm/scale/linear.d.ts +4 -0
- package/esm/scale/linear.js +6 -0
- package/esm/scale/linear.js.map +1 -0
- package/esm/scale/log.d.ts +4 -0
- package/esm/scale/log.js +6 -0
- package/esm/scale/log.js.map +1 -0
- package/esm/scale/ordinal.d.ts +4 -0
- package/esm/scale/ordinal.js +6 -0
- package/esm/scale/ordinal.js.map +1 -0
- package/esm/scale/point.d.ts +4 -0
- package/esm/scale/point.js +6 -0
- package/esm/scale/point.js.map +1 -0
- package/esm/scale/pow.d.ts +4 -0
- package/esm/scale/pow.js +6 -0
- package/esm/scale/pow.js.map +1 -0
- package/esm/scale/quantile.d.ts +4 -0
- package/esm/scale/quantile.js +6 -0
- package/esm/scale/quantile.js.map +1 -0
- package/esm/scale/quantize.d.ts +4 -0
- package/esm/scale/quantize.js +6 -0
- package/esm/scale/quantize.js.map +1 -0
- package/esm/scale/threshold.d.ts +4 -0
- package/esm/scale/threshold.js +6 -0
- package/esm/scale/threshold.js.map +1 -0
- package/esm/scale/time.d.ts +4 -0
- package/esm/scale/time.js +6 -0
- package/esm/scale/time.js.map +1 -0
- package/esm/shape/annotation/badge.d.ts +14 -0
- package/esm/shape/annotation/badge.js +93 -0
- package/esm/shape/annotation/badge.js.map +1 -0
- package/esm/shape/annotation/connector.d.ts +15 -0
- package/esm/shape/annotation/connector.js +101 -0
- package/esm/shape/annotation/connector.js.map +1 -0
- package/esm/shape/annotation/line.d.ts +3 -0
- package/esm/shape/annotation/line.js +56 -0
- package/esm/shape/annotation/line.js.map +1 -0
- package/esm/shape/annotation/text.d.ts +20 -0
- package/esm/shape/annotation/text.js +162 -0
- package/esm/shape/annotation/text.js.map +1 -0
- package/esm/shape/area/area.d.ts +3 -0
- package/esm/shape/area/area.js +11 -0
- package/esm/shape/area/area.js.map +1 -0
- package/esm/shape/area/curveArea.d.ts +8 -0
- package/esm/shape/area/curveArea.js +60 -0
- package/esm/shape/area/curveArea.js.map +1 -0
- package/esm/shape/area/smoothArea.d.ts +5 -0
- package/esm/shape/area/smoothArea.js +23 -0
- package/esm/shape/area/smoothArea.js.map +1 -0
- package/esm/shape/edge/arc.d.ts +8 -0
- package/esm/shape/edge/arc.js +51 -0
- package/esm/shape/edge/arc.js.map +1 -0
- package/esm/shape/edge/edge.d.ts +6 -0
- package/esm/shape/edge/edge.js +11 -0
- package/esm/shape/edge/edge.js.map +1 -0
- package/esm/shape/edge/ribbon.d.ts +15 -0
- package/esm/shape/edge/ribbon.js +69 -0
- package/esm/shape/edge/ribbon.js.map +1 -0
- package/esm/shape/edge/smoothEdge.d.ts +6 -0
- package/esm/shape/edge/smoothEdge.js +39 -0
- package/esm/shape/edge/smoothEdge.js.map +1 -0
- package/esm/shape/edge/vhv.d.ts +12 -0
- package/esm/shape/edge/vhv.js +69 -0
- package/esm/shape/edge/vhv.js.map +1 -0
- package/esm/shape/image/image.d.ts +3 -0
- package/esm/shape/image/image.js +38 -0
- package/esm/shape/image/image.js.map +1 -0
- package/esm/shape/index.d.ts +48 -0
- package/esm/shape/index.js +50 -0
- package/esm/shape/index.js.map +1 -0
- package/esm/shape/interval/colorRect.d.ts +14 -0
- package/esm/shape/interval/colorRect.js +62 -0
- package/esm/shape/interval/colorRect.js.map +1 -0
- package/esm/shape/interval/funnel.d.ts +10 -0
- package/esm/shape/interval/funnel.js +43 -0
- package/esm/shape/interval/funnel.js.map +1 -0
- package/esm/shape/interval/hollowRect.d.ts +6 -0
- package/esm/shape/interval/hollowRect.js +9 -0
- package/esm/shape/interval/hollowRect.js.map +1 -0
- package/esm/shape/interval/pyramid.d.ts +6 -0
- package/esm/shape/interval/pyramid.js +38 -0
- package/esm/shape/interval/pyramid.js.map +1 -0
- package/esm/shape/interval/rect.d.ts +7 -0
- package/esm/shape/interval/rect.js +10 -0
- package/esm/shape/interval/rect.js.map +1 -0
- package/esm/shape/label/label.d.ts +7 -0
- package/esm/shape/label/label.js +100 -0
- package/esm/shape/label/label.js.map +1 -0
- package/esm/shape/line/curveLine.d.ts +8 -0
- package/esm/shape/line/curveLine.js +41 -0
- package/esm/shape/line/curveLine.js.map +1 -0
- package/esm/shape/line/hv.d.ts +3 -0
- package/esm/shape/line/hv.js +7 -0
- package/esm/shape/line/hv.js.map +1 -0
- package/esm/shape/line/hvh.d.ts +3 -0
- package/esm/shape/line/hvh.js +7 -0
- package/esm/shape/line/hvh.js.map +1 -0
- package/esm/shape/line/line.d.ts +3 -0
- package/esm/shape/line/line.js +7 -0
- package/esm/shape/line/line.js.map +1 -0
- package/esm/shape/line/smooth.d.ts +5 -0
- package/esm/shape/line/smooth.js +19 -0
- package/esm/shape/line/smooth.js.map +1 -0
- package/esm/shape/line/vh.d.ts +3 -0
- package/esm/shape/line/vh.js +7 -0
- package/esm/shape/line/vh.js.map +1 -0
- package/esm/shape/link/link.d.ts +13 -0
- package/esm/shape/link/link.js +49 -0
- package/esm/shape/link/link.js.map +1 -0
- package/esm/shape/node/point.d.ts +6 -0
- package/esm/shape/node/point.js +27 -0
- package/esm/shape/node/point.js.map +1 -0
- package/esm/shape/node/polygon.d.ts +3 -0
- package/esm/shape/node/polygon.js +8 -0
- package/esm/shape/node/polygon.js.map +1 -0
- package/esm/shape/point/bowtie.d.ts +6 -0
- package/esm/shape/point/bowtie.js +9 -0
- package/esm/shape/point/bowtie.js.map +1 -0
- package/esm/shape/point/colorPoint.d.ts +11 -0
- package/esm/shape/point/colorPoint.js +59 -0
- package/esm/shape/point/colorPoint.js.map +1 -0
- package/esm/shape/point/cross.d.ts +6 -0
- package/esm/shape/point/cross.js +9 -0
- package/esm/shape/point/cross.js.map +1 -0
- package/esm/shape/point/diamond.d.ts +6 -0
- package/esm/shape/point/diamond.js +9 -0
- package/esm/shape/point/diamond.js.map +1 -0
- package/esm/shape/point/hexagon.d.ts +6 -0
- package/esm/shape/point/hexagon.js +9 -0
- package/esm/shape/point/hexagon.js.map +1 -0
- package/esm/shape/point/hollowBowtie.d.ts +6 -0
- package/esm/shape/point/hollowBowtie.js +9 -0
- package/esm/shape/point/hollowBowtie.js.map +1 -0
- package/esm/shape/point/hollowDiamond.d.ts +6 -0
- package/esm/shape/point/hollowDiamond.js +9 -0
- package/esm/shape/point/hollowDiamond.js.map +1 -0
- package/esm/shape/point/hollowHexagon.d.ts +6 -0
- package/esm/shape/point/hollowHexagon.js +9 -0
- package/esm/shape/point/hollowHexagon.js.map +1 -0
- package/esm/shape/point/hollowPoint.d.ts +6 -0
- package/esm/shape/point/hollowPoint.js +9 -0
- package/esm/shape/point/hollowPoint.js.map +1 -0
- package/esm/shape/point/hollowSquare.d.ts +6 -0
- package/esm/shape/point/hollowSquare.js +9 -0
- package/esm/shape/point/hollowSquare.js.map +1 -0
- package/esm/shape/point/hollowTriangle.d.ts +6 -0
- package/esm/shape/point/hollowTriangle.js +9 -0
- package/esm/shape/point/hollowTriangle.js.map +1 -0
- package/esm/shape/point/hollowTriangleDown.d.ts +6 -0
- package/esm/shape/point/hollowTriangleDown.js +9 -0
- package/esm/shape/point/hollowTriangleDown.js.map +1 -0
- package/esm/shape/point/hyphen.d.ts +6 -0
- package/esm/shape/point/hyphen.js +9 -0
- package/esm/shape/point/hyphen.js.map +1 -0
- package/esm/shape/point/line.d.ts +6 -0
- package/esm/shape/point/line.js +9 -0
- package/esm/shape/point/line.js.map +1 -0
- package/esm/shape/point/plus.d.ts +6 -0
- package/esm/shape/point/plus.js +9 -0
- package/esm/shape/point/plus.js.map +1 -0
- package/esm/shape/point/point.d.ts +6 -0
- package/esm/shape/point/point.js +9 -0
- package/esm/shape/point/point.js.map +1 -0
- package/esm/shape/point/square.d.ts +6 -0
- package/esm/shape/point/square.js +9 -0
- package/esm/shape/point/square.js.map +1 -0
- package/esm/shape/point/symbol.d.ts +49 -0
- package/esm/shape/point/symbol.js +142 -0
- package/esm/shape/point/symbol.js.map +1 -0
- package/esm/shape/point/tick.d.ts +6 -0
- package/esm/shape/point/tick.js +9 -0
- package/esm/shape/point/tick.js.map +1 -0
- package/esm/shape/point/triangle.d.ts +6 -0
- package/esm/shape/point/triangle.js +9 -0
- package/esm/shape/point/triangle.js.map +1 -0
- package/esm/shape/point/triangleDown.d.ts +6 -0
- package/esm/shape/point/triangleDown.js +9 -0
- package/esm/shape/point/triangleDown.js.map +1 -0
- package/esm/shape/polygon/polygon.d.ts +3 -0
- package/esm/shape/polygon/polygon.js +67 -0
- package/esm/shape/polygon/polygon.js.map +1 -0
- package/esm/shape/schema/box.d.ts +3 -0
- package/esm/shape/schema/box.js +87 -0
- package/esm/shape/schema/box.js.map +1 -0
- package/esm/shape/text/text.d.ts +6 -0
- package/esm/shape/text/text.js +41 -0
- package/esm/shape/text/text.js.map +1 -0
- package/esm/shape/utils.d.ts +59 -0
- package/esm/shape/utils.js +90 -0
- package/esm/shape/utils.js.map +1 -0
- package/esm/shape/vector/vector.d.ts +13 -0
- package/esm/shape/vector/vector.js +48 -0
- package/esm/shape/vector/vector.js.map +1 -0
- package/esm/spec/action.d.ts +122 -0
- package/esm/spec/action.js +2 -0
- package/esm/spec/action.js.map +1 -0
- package/esm/spec/animate.d.ts +8 -0
- package/esm/spec/animate.js +2 -0
- package/esm/spec/animate.js.map +1 -0
- package/esm/spec/composition.d.ts +127 -0
- package/esm/spec/composition.js +2 -0
- package/esm/spec/composition.js.map +1 -0
- package/esm/spec/coordinate.d.ts +74 -0
- package/esm/spec/coordinate.js +2 -0
- package/esm/spec/coordinate.js.map +1 -0
- package/esm/spec/data.d.ts +54 -0
- package/esm/spec/data.js +2 -0
- package/esm/spec/data.js.map +1 -0
- package/esm/spec/encode.d.ts +23 -0
- package/esm/spec/encode.js +2 -0
- package/esm/spec/encode.js.map +1 -0
- package/esm/spec/geometry.d.ts +61 -0
- package/esm/spec/geometry.js +2 -0
- package/esm/spec/geometry.js.map +1 -0
- package/esm/spec/index.d.ts +17 -0
- package/esm/spec/index.js +13 -0
- package/esm/spec/index.js.map +1 -0
- package/esm/spec/interaction.d.ts +66 -0
- package/esm/spec/interaction.js +2 -0
- package/esm/spec/interaction.js.map +1 -0
- package/esm/spec/labelLayout.d.ts +4 -0
- package/esm/spec/labelLayout.js +2 -0
- package/esm/spec/labelLayout.js.map +1 -0
- package/esm/spec/palette.d.ts +13 -0
- package/esm/spec/palette.js +2 -0
- package/esm/spec/palette.js.map +1 -0
- package/esm/spec/scale.d.ts +27 -0
- package/esm/spec/scale.js +2 -0
- package/esm/spec/scale.js.map +1 -0
- package/esm/spec/theme.d.ts +12 -0
- package/esm/spec/theme.js +2 -0
- package/esm/spec/theme.js.map +1 -0
- package/esm/spec/title.d.ts +2 -0
- package/esm/spec/title.js +2 -0
- package/esm/spec/title.js.map +1 -0
- package/esm/spec/transform.d.ts +69 -0
- package/esm/spec/transform.js +135 -0
- package/esm/spec/transform.js.map +1 -0
- package/esm/stdlib/index.d.ts +2 -0
- package/esm/stdlib/index.js +196 -0
- package/esm/stdlib/index.js.map +1 -0
- package/esm/theme/index.d.ts +1 -12
- package/esm/theme/index.js +1 -22
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.d.ts +7 -0
- package/esm/theme/light.js +31 -0
- package/esm/theme/light.js.map +1 -0
- package/esm/transform/Select.d.ts +9 -0
- package/esm/transform/Select.js +53 -0
- package/esm/transform/Select.js.map +1 -0
- package/esm/transform/SelectX.d.ts +7 -0
- package/esm/transform/SelectX.js +21 -0
- package/esm/transform/SelectX.js.map +1 -0
- package/esm/transform/SelectY.d.ts +7 -0
- package/esm/transform/SelectY.js +21 -0
- package/esm/transform/SelectY.js.map +1 -0
- package/esm/transform/dodgeX.d.ts +9 -0
- package/esm/transform/dodgeX.js +56 -0
- package/esm/transform/dodgeX.js.map +1 -0
- package/esm/transform/groupX.d.ts +9 -0
- package/esm/transform/groupX.js +89 -0
- package/esm/transform/groupX.js.map +1 -0
- package/esm/transform/index.d.ts +21 -0
- package/esm/transform/index.js +22 -0
- package/esm/transform/index.js.map +1 -0
- package/esm/transform/jitter.d.ts +9 -0
- package/esm/transform/jitter.js +36 -0
- package/esm/transform/jitter.js.map +1 -0
- package/esm/transform/jitterY.d.ts +8 -0
- package/esm/transform/jitterY.js +21 -0
- package/esm/transform/jitterY.js.map +1 -0
- package/esm/transform/maybeKey.d.ts +6 -0
- package/esm/transform/maybeKey.js +32 -0
- package/esm/transform/maybeKey.js.map +1 -0
- package/esm/transform/maybeSeries.d.ts +6 -0
- package/esm/transform/maybeSeries.js +17 -0
- package/esm/transform/maybeSeries.js.map +1 -0
- package/esm/transform/maybeSize.d.ts +7 -0
- package/esm/transform/maybeSize.js +20 -0
- package/esm/transform/maybeSize.js.map +1 -0
- package/esm/transform/maybeStackY.d.ts +9 -0
- package/esm/transform/maybeStackY.js +30 -0
- package/esm/transform/maybeStackY.js.map +1 -0
- package/esm/transform/maybeTitleX.d.ts +6 -0
- package/esm/transform/maybeTitleX.js +17 -0
- package/esm/transform/maybeTitleX.js.map +1 -0
- package/esm/transform/maybeTooltip.d.ts +8 -0
- package/esm/transform/maybeTooltip.js +29 -0
- package/esm/transform/maybeTooltip.js.map +1 -0
- package/esm/transform/maybeTooltipPosition.d.ts +7 -0
- package/esm/transform/maybeTooltipPosition.js +10 -0
- package/esm/transform/maybeTooltipPosition.js.map +1 -0
- package/esm/transform/maybeTooltipY.d.ts +6 -0
- package/esm/transform/maybeTooltipY.js +9 -0
- package/esm/transform/maybeTooltipY.js.map +1 -0
- package/esm/transform/maybeZeroX.d.ts +7 -0
- package/esm/transform/maybeZeroX.js +22 -0
- package/esm/transform/maybeZeroX.js.map +1 -0
- package/esm/transform/maybeZeroY.d.ts +6 -0
- package/esm/transform/maybeZeroY.js +21 -0
- package/esm/transform/maybeZeroY.js.map +1 -0
- package/esm/transform/maybeZeroY1.d.ts +6 -0
- package/esm/transform/maybeZeroY1.js +21 -0
- package/esm/transform/maybeZeroY1.js.map +1 -0
- package/esm/transform/normalizeY.d.ts +9 -0
- package/esm/transform/normalizeY.js +69 -0
- package/esm/transform/normalizeY.js.map +1 -0
- package/esm/transform/stackEnter.d.ts +13 -0
- package/esm/transform/stackEnter.js +62 -0
- package/esm/transform/stackEnter.js.map +1 -0
- package/esm/transform/stackY.d.ts +9 -0
- package/esm/transform/stackY.js +56 -0
- package/esm/transform/stackY.js.map +1 -0
- package/esm/transform/symmetryY.d.ts +8 -0
- package/esm/transform/symmetryY.js +60 -0
- package/esm/transform/symmetryY.js.map +1 -0
- package/esm/transform/utils/helper.d.ts +15 -0
- package/esm/transform/utils/helper.js +34 -0
- package/esm/transform/utils/helper.js.map +1 -0
- package/esm/transform/utils/order.d.ts +9 -0
- package/esm/transform/utils/order.js +72 -0
- package/esm/transform/utils/order.js.map +1 -0
- package/esm/utils/array.d.ts +14 -0
- package/esm/utils/array.js +42 -0
- package/esm/utils/array.js.map +1 -0
- package/esm/utils/container.d.ts +8 -0
- package/esm/utils/container.js +16 -0
- package/esm/utils/container.js.map +1 -0
- package/esm/utils/coordinate.d.ts +6 -0
- package/esm/utils/coordinate.js +24 -0
- package/esm/utils/coordinate.js.map +1 -0
- package/esm/utils/helper.d.ts +17 -0
- package/esm/utils/helper.js +63 -0
- package/esm/utils/helper.js.map +1 -0
- package/esm/utils/selection.d.ts +64 -0
- package/esm/utils/selection.js +285 -0
- package/esm/utils/selection.js.map +1 -0
- package/esm/utils/vector.d.ts +13 -0
- package/esm/utils/vector.js +42 -0
- package/esm/utils/vector.js.map +1 -0
- package/lib/adjust/index.d.ts +1 -0
- package/lib/adjust/index.js +6 -0
- package/lib/adjust/index.js.map +1 -0
- package/lib/adjust/pack.d.ts +8 -0
- package/lib/adjust/pack.js +59 -0
- package/lib/adjust/pack.js.map +1 -0
- package/lib/animation/fadeIn.d.ts +7 -0
- package/lib/animation/fadeIn.js +25 -0
- package/lib/animation/fadeIn.js.map +1 -0
- package/lib/animation/fadeOut.d.ts +7 -0
- package/lib/animation/fadeOut.js +25 -0
- package/lib/animation/fadeOut.js.map +1 -0
- package/lib/animation/index.d.ts +7 -0
- package/lib/animation/index.js +18 -0
- package/lib/animation/index.js.map +1 -0
- package/lib/animation/morphing.d.ts +13 -0
- package/lib/animation/morphing.js +164 -0
- package/lib/animation/morphing.js.map +1 -0
- package/lib/animation/scaleInX.d.ts +7 -0
- package/lib/animation/scaleInX.js +49 -0
- package/lib/animation/scaleInX.js.map +1 -0
- package/lib/animation/scaleInY.d.ts +7 -0
- package/lib/animation/scaleInY.js +49 -0
- package/lib/animation/scaleInY.js.map +1 -0
- package/lib/animation/scaleOutX.d.ts +7 -0
- package/lib/animation/scaleOutX.js +49 -0
- package/lib/animation/scaleOutX.js.map +1 -0
- package/lib/animation/scaleOutY.d.ts +7 -0
- package/lib/animation/scaleOutY.js +49 -0
- package/lib/animation/scaleOutY.js.map +1 -0
- package/lib/animation/utils.d.ts +2 -0
- package/lib/animation/utils.js +21 -0
- package/lib/animation/utils.js.map +1 -0
- package/lib/api/chart.d.ts +33 -0
- package/lib/api/chart.js +114 -0
- package/lib/api/chart.js.map +1 -0
- package/lib/api/composition/circle.d.ts +21 -0
- package/lib/api/composition/circle.js +33 -0
- package/lib/api/composition/circle.js.map +1 -0
- package/lib/api/composition/flex.d.ts +17 -0
- package/lib/api/composition/flex.js +29 -0
- package/lib/api/composition/flex.js.map +1 -0
- package/lib/api/composition/index.d.ts +26 -0
- package/lib/api/composition/index.js +36 -0
- package/lib/api/composition/index.js.map +1 -0
- package/lib/api/composition/keyframe.d.ts +17 -0
- package/lib/api/composition/keyframe.js +29 -0
- package/lib/api/composition/keyframe.js.map +1 -0
- package/lib/api/composition/layer.d.ts +14 -0
- package/lib/api/composition/layer.js +26 -0
- package/lib/api/composition/layer.js.map +1 -0
- package/lib/api/composition/matrix.d.ts +21 -0
- package/lib/api/composition/matrix.js +33 -0
- package/lib/api/composition/matrix.js.map +1 -0
- package/lib/api/composition/rect.d.ts +23 -0
- package/lib/api/composition/rect.js +35 -0
- package/lib/api/composition/rect.js.map +1 -0
- package/lib/api/composition/view.d.ts +20 -0
- package/lib/api/composition/view.js +33 -0
- package/lib/api/composition/view.js.map +1 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +8 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/library.d.ts +3 -0
- package/lib/api/library.js +11 -0
- package/lib/api/library.js.map +1 -0
- package/lib/api/mark/index.d.ts +41 -0
- package/lib/api/mark/index.js +25 -0
- package/lib/api/mark/index.js.map +1 -0
- package/lib/api/mark/mark.d.ts +114 -0
- package/lib/api/mark/mark.js +193 -0
- package/lib/api/mark/mark.js.map +1 -0
- package/lib/api/mark/types.d.ts +21 -0
- package/lib/{util → api/mark}/types.js +0 -0
- package/lib/api/mark/types.js.map +1 -0
- package/lib/api/node.d.ts +31 -0
- package/lib/api/node.js +59 -0
- package/lib/api/node.js.map +1 -0
- package/lib/api/props.d.ts +12 -0
- package/lib/api/props.js +81 -0
- package/lib/api/props.js.map +1 -0
- package/lib/api/types.d.ts +10 -0
- package/lib/api/types.js +3 -0
- package/lib/api/types.js.map +1 -0
- package/lib/component/axis.d.ts +13 -0
- package/lib/component/axis.js +298 -0
- package/lib/component/axis.js.map +1 -0
- package/lib/component/axisX.d.ts +7 -0
- package/lib/component/axisX.js +13 -0
- package/lib/component/axisX.js.map +1 -0
- package/lib/component/axisY.d.ts +7 -0
- package/lib/component/axisY.js +13 -0
- package/lib/component/axisY.js.map +1 -0
- package/lib/component/index.d.ts +5 -0
- package/lib/component/index.js +14 -0
- package/lib/component/index.js.map +1 -0
- package/lib/component/legendCategory.d.ts +10 -0
- package/lib/component/legendCategory.js +88 -0
- package/lib/component/legendCategory.js.map +1 -0
- package/lib/component/legendContinuous.d.ts +9 -0
- package/lib/component/legendContinuous.js +42 -0
- package/lib/component/legendContinuous.js.map +1 -0
- package/lib/component/title.d.ts +6 -0
- package/lib/component/title.js +58 -0
- package/lib/component/title.js.map +1 -0
- package/lib/component/utils.d.ts +8 -0
- package/lib/component/utils.js +32 -0
- package/lib/component/utils.js.map +1 -0
- package/lib/composition/circle.d.ts +7 -0
- package/lib/composition/circle.js +89 -0
- package/lib/composition/circle.js.map +1 -0
- package/lib/composition/flex.d.ts +7 -0
- package/lib/composition/flex.js +44 -0
- package/lib/composition/flex.js.map +1 -0
- package/lib/composition/index.d.ts +8 -0
- package/lib/composition/index.js +20 -0
- package/lib/composition/index.js.map +1 -0
- package/lib/composition/keyframe.d.ts +7 -0
- package/lib/composition/keyframe.js +79 -0
- package/lib/composition/keyframe.js.map +1 -0
- package/lib/composition/layer.d.ts +7 -0
- package/lib/composition/layer.js +36 -0
- package/lib/composition/layer.js.map +1 -0
- package/lib/composition/mark.d.ts +4 -0
- package/lib/composition/mark.js +45 -0
- package/lib/composition/mark.js.map +1 -0
- package/lib/composition/matrix.d.ts +8 -0
- package/lib/composition/matrix.js +155 -0
- package/lib/composition/matrix.js.map +1 -0
- package/lib/composition/rect.d.ts +30 -0
- package/lib/composition/rect.js +291 -0
- package/lib/composition/rect.js.map +1 -0
- package/lib/composition/utils.d.ts +16 -0
- package/lib/composition/utils.js +39 -0
- package/lib/composition/utils.js.map +1 -0
- package/lib/composition/view.d.ts +9 -0
- package/lib/composition/view.js +37 -0
- package/lib/composition/view.js.map +1 -0
- package/lib/coordinate/cartesian.d.ts +7 -0
- package/lib/coordinate/cartesian.js +10 -0
- package/lib/coordinate/cartesian.js.map +1 -0
- package/lib/coordinate/fisheye.d.ts +7 -0
- package/lib/coordinate/fisheye.js +10 -0
- package/lib/coordinate/fisheye.js.map +1 -0
- package/lib/coordinate/fisheyeX.d.ts +7 -0
- package/lib/coordinate/fisheyeX.js +10 -0
- package/lib/coordinate/fisheyeX.js.map +1 -0
- package/lib/coordinate/fisheyeY.d.ts +7 -0
- package/lib/coordinate/fisheyeY.js +10 -0
- package/lib/coordinate/fisheyeY.js.map +1 -0
- package/lib/coordinate/helix.d.ts +7 -0
- package/lib/coordinate/helix.js +15 -0
- package/lib/coordinate/helix.js.map +1 -0
- package/lib/coordinate/index.d.ts +12 -0
- package/lib/coordinate/index.js +28 -0
- package/lib/coordinate/index.js.map +1 -0
- package/lib/coordinate/parallel.d.ts +7 -0
- package/lib/coordinate/parallel.js +10 -0
- package/lib/coordinate/parallel.js.map +1 -0
- package/lib/coordinate/polar.d.ts +8 -0
- package/lib/coordinate/polar.js +16 -0
- package/lib/coordinate/polar.js.map +1 -0
- package/lib/coordinate/reflect.d.ts +7 -0
- package/lib/coordinate/reflect.js +14 -0
- package/lib/coordinate/reflect.js.map +1 -0
- package/lib/coordinate/reflectX.d.ts +7 -0
- package/lib/coordinate/reflectX.js +14 -0
- package/lib/coordinate/reflectX.js.map +1 -0
- package/lib/coordinate/reflectY.d.ts +7 -0
- package/lib/coordinate/reflectY.js +14 -0
- package/lib/coordinate/reflectY.js.map +1 -0
- package/lib/coordinate/theta.d.ts +7 -0
- package/lib/coordinate/theta.js +15 -0
- package/lib/coordinate/theta.js.map +1 -0
- package/lib/coordinate/transpose.d.ts +7 -0
- package/lib/coordinate/transpose.js +15 -0
- package/lib/coordinate/transpose.js.map +1 -0
- package/lib/data/arc.d.ts +0 -0
- package/lib/data/arc.js +19 -0
- package/lib/data/arc.js.map +1 -0
- package/lib/data/cluster.d.ts +0 -0
- package/lib/data/cluster.js +47 -0
- package/lib/data/cluster.js.map +1 -0
- package/lib/data/connector.d.ts +7 -0
- package/lib/data/connector.js +13 -0
- package/lib/data/connector.js.map +1 -0
- package/lib/data/fetch.d.ts +4 -0
- package/lib/data/fetch.js +31 -0
- package/lib/data/fetch.js.map +1 -0
- package/lib/data/filterBy.d.ts +8 -0
- package/lib/data/filterBy.js +17 -0
- package/lib/data/filterBy.js.map +1 -0
- package/lib/data/fold.d.ts +10 -0
- package/lib/data/fold.js +29 -0
- package/lib/data/fold.js.map +1 -0
- package/lib/data/index.d.ts +9 -0
- package/lib/data/index.js +22 -0
- package/lib/data/index.js.map +1 -0
- package/lib/data/inline.d.ts +4 -0
- package/lib/data/inline.js +10 -0
- package/lib/data/inline.js.map +1 -0
- package/lib/data/pick.d.ts +7 -0
- package/lib/data/pick.js +14 -0
- package/lib/data/pick.js.map +1 -0
- package/lib/data/rename.d.ts +8 -0
- package/lib/data/rename.js +22 -0
- package/lib/data/rename.js.map +1 -0
- package/lib/data/sankey.d.ts +0 -0
- package/lib/data/sankey.js +96 -0
- package/lib/data/sankey.js.map +1 -0
- package/lib/data/sortBy.d.ts +7 -0
- package/lib/data/sortBy.js +18 -0
- package/lib/data/sortBy.js.map +1 -0
- package/lib/data/subset.d.ts +7 -0
- package/lib/data/subset.js +30 -0
- package/lib/data/subset.js.map +1 -0
- package/lib/data/tree.d.ts +0 -0
- package/lib/data/tree.js +10 -0
- package/lib/data/tree.js.map +1 -0
- package/lib/data/utils/arc/arc.d.ts +8 -0
- package/lib/data/utils/arc/arc.js +188 -0
- package/lib/data/utils/arc/arc.js.map +1 -0
- package/lib/data/utils/arc/index.d.ts +2 -0
- package/lib/data/utils/arc/index.js +6 -0
- package/lib/data/utils/arc/index.js.map +1 -0
- package/lib/data/utils/arc/sort.d.ts +4 -0
- package/lib/data/utils/arc/sort.js +20 -0
- package/lib/data/utils/arc/sort.js.map +1 -0
- package/lib/data/utils/arc/types.d.ts +26 -0
- package/lib/data/utils/arc/types.js +3 -0
- package/lib/data/utils/arc/types.js.map +1 -0
- package/lib/data/utils/d3-cloud/index.d.ts +1 -0
- package/lib/data/utils/d3-cloud/index.js +399 -0
- package/lib/data/utils/d3-cloud/index.js.map +1 -0
- package/lib/data/utils/d3-sankey/align.d.ts +4 -0
- package/lib/data/utils/d3-sankey/align.js +28 -0
- package/lib/data/utils/d3-sankey/align.js.map +1 -0
- package/lib/data/utils/d3-sankey/constant.d.ts +1 -0
- package/lib/data/utils/d3-sankey/constant.js +10 -0
- package/lib/data/utils/d3-sankey/constant.js.map +1 -0
- package/lib/data/utils/d3-sankey/index.d.ts +12 -0
- package/lib/data/utils/d3-sankey/index.js +20 -0
- package/lib/data/utils/d3-sankey/index.js.map +1 -0
- package/lib/data/utils/d3-sankey/sankey.d.ts +24 -0
- package/lib/data/utils/d3-sankey/sankey.js +392 -0
- package/lib/data/utils/d3-sankey/sankey.js.map +1 -0
- package/lib/data/utils/flow.d.ts +9 -0
- package/lib/data/utils/flow.js +49 -0
- package/lib/data/utils/flow.js.map +1 -0
- package/lib/data/utils/memo.d.ts +17 -0
- package/lib/data/utils/memo.js +85 -0
- package/lib/data/utils/memo.js.map +1 -0
- package/lib/data/voronoi.d.ts +0 -0
- package/lib/data/voronoi.js +27 -0
- package/lib/data/voronoi.js.map +1 -0
- package/lib/data/wordCloud.d.ts +0 -0
- package/lib/data/wordCloud.js +100 -0
- package/lib/data/wordCloud.js.map +1 -0
- package/lib/encode/column.d.ts +7 -0
- package/lib/encode/column.js +12 -0
- package/lib/encode/column.js.map +1 -0
- package/lib/encode/constant.d.ts +7 -0
- package/lib/encode/constant.js +12 -0
- package/lib/encode/constant.js.map +1 -0
- package/lib/encode/field.d.ts +7 -0
- package/lib/encode/field.js +12 -0
- package/lib/encode/field.js.map +1 -0
- package/lib/encode/index.d.ts +4 -0
- package/lib/encode/index.js +12 -0
- package/lib/encode/index.js.map +1 -0
- package/lib/encode/transform.d.ts +9 -0
- package/lib/encode/transform.js +14 -0
- package/lib/encode/transform.js.map +1 -0
- package/lib/index.d.ts +4 -107
- package/lib/index.js +21 -591
- package/lib/index.js.map +1 -1
- package/lib/interaction/action/index.d.ts +23 -2
- package/lib/interaction/action/index.js +47 -10
- package/lib/interaction/action/index.js.map +1 -1
- package/lib/interaction/action/service/elementSelection.d.ts +4 -0
- package/lib/interaction/action/service/elementSelection.js +94 -0
- package/lib/interaction/action/service/elementSelection.js.map +1 -0
- package/lib/interaction/action/service/fisheyeFocus.d.ts +4 -0
- package/lib/interaction/action/service/fisheyeFocus.js +55 -0
- package/lib/interaction/action/service/fisheyeFocus.js.map +1 -0
- package/lib/interaction/action/service/legendItemSelection.d.ts +4 -0
- package/lib/interaction/action/service/legendItemSelection.js +21 -0
- package/lib/interaction/action/service/legendItemSelection.js.map +1 -0
- package/lib/interaction/action/service/recordCurrentPoint.d.ts +4 -0
- package/lib/interaction/action/service/recordCurrentPoint.js +20 -0
- package/lib/interaction/action/service/recordCurrentPoint.js.map +1 -0
- package/lib/interaction/action/service/recordPoint.d.ts +4 -0
- package/lib/interaction/action/service/recordPoint.js +32 -0
- package/lib/interaction/action/service/recordPoint.js.map +1 -0
- package/lib/interaction/action/service/recordRegion.d.ts +4 -0
- package/lib/interaction/action/service/recordRegion.js +34 -0
- package/lib/interaction/action/service/recordRegion.js.map +1 -0
- package/lib/interaction/action/service/recordState.d.ts +4 -0
- package/lib/interaction/action/service/recordState.js +14 -0
- package/lib/interaction/action/service/recordState.js.map +1 -0
- package/lib/interaction/action/service/recordTip.d.ts +8 -0
- package/lib/interaction/action/service/recordTip.js +19 -0
- package/lib/interaction/action/service/recordTip.js.map +1 -0
- package/lib/interaction/action/service/surfacePointSelection.d.ts +4 -0
- package/lib/interaction/action/service/surfacePointSelection.js +23 -0
- package/lib/interaction/action/service/surfacePointSelection.js.map +1 -0
- package/lib/interaction/action/service/triggerInfoSelection.d.ts +4 -0
- package/lib/interaction/action/service/triggerInfoSelection.js +22 -0
- package/lib/interaction/action/service/triggerInfoSelection.js.map +1 -0
- package/lib/interaction/action/transformer/activeElement.d.ts +4 -0
- package/lib/interaction/action/transformer/activeElement.js +27 -0
- package/lib/interaction/action/transformer/activeElement.js.map +1 -0
- package/lib/interaction/action/transformer/activeRegion.d.ts +4 -0
- package/lib/interaction/action/transformer/activeRegion.js +56 -0
- package/lib/interaction/action/transformer/activeRegion.js.map +1 -0
- package/lib/interaction/action/transformer/button.d.ts +4 -0
- package/lib/interaction/action/transformer/button.js +80 -0
- package/lib/interaction/action/transformer/button.js.map +1 -0
- package/lib/interaction/action/transformer/cursor.d.ts +4 -0
- package/lib/interaction/action/transformer/cursor.js +19 -0
- package/lib/interaction/action/transformer/cursor.js.map +1 -0
- package/lib/interaction/action/transformer/filter.d.ts +7 -0
- package/lib/interaction/action/transformer/filter.js +49 -0
- package/lib/interaction/action/transformer/filter.js.map +1 -0
- package/lib/interaction/action/transformer/filterElement.d.ts +4 -0
- package/lib/interaction/action/transformer/filterElement.js +45 -0
- package/lib/interaction/action/transformer/filterElement.js.map +1 -0
- package/lib/interaction/action/transformer/highlightElement.d.ts +4 -0
- package/lib/interaction/action/transformer/highlightElement.js +52 -0
- package/lib/interaction/action/transformer/highlightElement.js.map +1 -0
- package/lib/interaction/action/transformer/mask.d.ts +7 -0
- package/lib/interaction/action/transformer/mask.js +110 -0
- package/lib/interaction/action/transformer/mask.js.map +1 -0
- package/lib/interaction/action/transformer/move.d.ts +7 -0
- package/lib/interaction/action/transformer/move.js +74 -0
- package/lib/interaction/action/transformer/move.js.map +1 -0
- package/lib/interaction/action/transformer/plot.d.ts +4 -0
- package/lib/interaction/action/transformer/plot.js +14 -0
- package/lib/interaction/action/transformer/plot.js.map +1 -0
- package/lib/interaction/action/transformer/poptip.d.ts +4 -0
- package/lib/interaction/action/transformer/poptip.js +43 -0
- package/lib/interaction/action/transformer/poptip.js.map +1 -0
- package/lib/interaction/action/transformer/setItemState.d.ts +4 -0
- package/lib/interaction/action/transformer/setItemState.js +35 -0
- package/lib/interaction/action/transformer/setItemState.js.map +1 -0
- package/lib/interaction/action/transformer/tooltip.d.ts +9 -0
- package/lib/interaction/action/transformer/tooltip.js +293 -0
- package/lib/interaction/action/transformer/tooltip.js.map +1 -0
- package/lib/interaction/builtin/activeRegion.d.ts +19 -0
- package/lib/interaction/builtin/activeRegion.js +22 -0
- package/lib/interaction/builtin/activeRegion.js.map +1 -0
- package/lib/interaction/builtin/brush.d.ts +132 -0
- package/lib/interaction/builtin/brush.js +97 -0
- package/lib/interaction/builtin/brush.js.map +1 -0
- package/lib/interaction/builtin/brushHighlight.d.ts +98 -0
- package/lib/interaction/builtin/brushHighlight.js +115 -0
- package/lib/interaction/builtin/brushHighlight.js.map +1 -0
- package/lib/interaction/builtin/brushVisible.d.ts +88 -0
- package/lib/interaction/builtin/brushVisible.js +66 -0
- package/lib/interaction/builtin/brushVisible.js.map +1 -0
- package/lib/interaction/builtin/elementActive.d.ts +22 -0
- package/lib/interaction/builtin/elementActive.js +29 -0
- package/lib/interaction/builtin/elementActive.js.map +1 -0
- package/lib/interaction/builtin/elementHighlight.d.ts +19 -0
- package/lib/interaction/builtin/elementHighlight.js +28 -0
- package/lib/interaction/builtin/elementHighlight.js.map +1 -0
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +23 -0
- package/lib/interaction/builtin/elementHighlightByColor.js +28 -0
- package/lib/interaction/builtin/elementHighlightByColor.js.map +1 -0
- package/lib/interaction/builtin/elementHighlightByX.d.ts +23 -0
- package/lib/interaction/builtin/elementHighlightByX.js +28 -0
- package/lib/interaction/builtin/elementHighlightByX.js.map +1 -0
- package/lib/interaction/builtin/elementListHighlight.d.ts +43 -0
- package/lib/interaction/builtin/elementListHighlight.js +32 -0
- package/lib/interaction/builtin/elementListHighlight.js.map +1 -0
- package/lib/interaction/builtin/elementSelected.d.ts +20 -0
- package/lib/interaction/builtin/elementSelected.js +22 -0
- package/lib/interaction/builtin/elementSelected.js.map +1 -0
- package/lib/interaction/builtin/ellipsisText.d.ts +19 -0
- package/lib/interaction/builtin/ellipsisText.js +21 -0
- package/lib/interaction/builtin/ellipsisText.js.map +1 -0
- package/lib/interaction/builtin/fisheye.d.ts +35 -0
- package/lib/interaction/builtin/fisheye.js +24 -0
- package/lib/interaction/builtin/fisheye.js.map +1 -0
- package/lib/interaction/builtin/legendActive.d.ts +43 -0
- package/lib/interaction/builtin/legendActive.js +34 -0
- package/lib/interaction/builtin/legendActive.js.map +1 -0
- package/lib/interaction/builtin/legendHighlight.d.ts +43 -0
- package/lib/interaction/builtin/legendHighlight.js +34 -0
- package/lib/interaction/builtin/legendHighlight.js.map +1 -0
- package/lib/interaction/builtin/tooltip.d.ts +44 -0
- package/lib/interaction/builtin/tooltip.js +32 -0
- package/lib/interaction/builtin/tooltip.js.map +1 -0
- package/lib/interaction/create.d.ts +3 -0
- package/lib/interaction/create.js +100 -0
- package/lib/interaction/create.js.map +1 -0
- package/lib/interaction/index.d.ts +18 -25
- package/lib/interaction/index.js +50 -51
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/interactor/index.d.ts +2 -0
- package/lib/interaction/interactor/index.js +8 -0
- package/lib/interaction/interactor/index.js.map +1 -0
- package/lib/interaction/interactor/mousePosition.d.ts +3 -0
- package/lib/interaction/interactor/mousePosition.js +14 -0
- package/lib/interaction/interactor/mousePosition.js.map +1 -0
- package/lib/interaction/interactor/touchPosition.d.ts +3 -0
- package/lib/interaction/interactor/touchPosition.js +14 -0
- package/lib/interaction/interactor/touchPosition.js.map +1 -0
- package/lib/interaction/stdlib.d.ts +2 -0
- package/lib/interaction/stdlib.js +36 -0
- package/lib/interaction/stdlib.js.map +1 -0
- package/lib/interaction/types.d.ts +57 -0
- package/lib/interaction/types.js +3 -0
- package/lib/interaction/types.js.map +1 -0
- package/lib/interaction/utils.d.ts +3 -0
- package/lib/interaction/utils.js +45 -0
- package/lib/interaction/utils.js.map +1 -0
- package/lib/labelLayout/hideOverlap.d.ts +2 -0
- package/lib/labelLayout/hideOverlap.js +42 -0
- package/lib/labelLayout/hideOverlap.js.map +1 -0
- package/lib/labelLayout/index.d.ts +1 -0
- package/lib/labelLayout/index.js +6 -0
- package/lib/labelLayout/index.js.map +1 -0
- package/lib/mark/annotation/connector.d.ts +4 -0
- package/lib/mark/annotation/connector.js +22 -0
- package/lib/mark/annotation/connector.js.map +1 -0
- package/lib/mark/annotation/index.d.ts +7 -0
- package/lib/mark/annotation/index.js +18 -0
- package/lib/mark/annotation/index.js.map +1 -0
- package/lib/mark/annotation/lineX.d.ts +4 -0
- package/lib/mark/annotation/lineX.js +25 -0
- package/lib/mark/annotation/lineX.js.map +1 -0
- package/lib/mark/annotation/lineY.d.ts +4 -0
- package/lib/mark/annotation/lineY.js +25 -0
- package/lib/mark/annotation/lineY.js.map +1 -0
- package/lib/mark/annotation/range.d.ts +8 -0
- package/lib/mark/annotation/range.js +49 -0
- package/lib/mark/annotation/range.js.map +1 -0
- package/lib/mark/annotation/rangeX.d.ts +4 -0
- package/lib/mark/annotation/rangeX.js +18 -0
- package/lib/mark/annotation/rangeX.js.map +1 -0
- package/lib/mark/annotation/rangeY.d.ts +4 -0
- package/lib/mark/annotation/rangeY.js +18 -0
- package/lib/mark/annotation/rangeY.js.map +1 -0
- package/lib/mark/annotation/text.d.ts +4 -0
- package/lib/mark/annotation/text.js +25 -0
- package/lib/mark/annotation/text.js.map +1 -0
- package/lib/mark/geometry/area.d.ts +4 -0
- package/lib/mark/geometry/area.js +74 -0
- package/lib/mark/geometry/area.js.map +1 -0
- package/lib/mark/geometry/edge.d.ts +13 -0
- package/lib/mark/geometry/edge.js +35 -0
- package/lib/mark/geometry/edge.js.map +1 -0
- package/lib/mark/geometry/grid.d.ts +9 -0
- package/lib/mark/geometry/grid.js +50 -0
- package/lib/mark/geometry/grid.js.map +1 -0
- package/lib/mark/geometry/image.d.ts +4 -0
- package/lib/mark/geometry/image.js +38 -0
- package/lib/mark/geometry/image.js.map +1 -0
- package/lib/mark/geometry/index.d.ts +13 -0
- package/lib/mark/geometry/index.js +30 -0
- package/lib/mark/geometry/index.js.map +1 -0
- package/lib/mark/geometry/interval.d.ts +12 -0
- package/lib/mark/geometry/interval.js +63 -0
- package/lib/mark/geometry/interval.js.map +1 -0
- package/lib/mark/geometry/line.d.ts +7 -0
- package/lib/mark/geometry/line.js +80 -0
- package/lib/mark/geometry/line.js.map +1 -0
- package/lib/mark/geometry/link.d.ts +7 -0
- package/lib/mark/geometry/link.js +37 -0
- package/lib/mark/geometry/link.js.map +1 -0
- package/lib/mark/geometry/node.d.ts +8 -0
- package/lib/mark/geometry/node.js +31 -0
- package/lib/mark/geometry/node.js.map +1 -0
- package/lib/mark/geometry/point.d.ts +10 -0
- package/lib/mark/geometry/point.js +75 -0
- package/lib/mark/geometry/point.js.map +1 -0
- package/lib/mark/geometry/polygon.d.ts +7 -0
- package/lib/mark/geometry/polygon.js +47 -0
- package/lib/mark/geometry/polygon.js.map +1 -0
- package/lib/mark/geometry/schema.d.ts +34 -0
- package/lib/mark/geometry/schema.js +94 -0
- package/lib/mark/geometry/schema.js.map +1 -0
- package/lib/mark/geometry/text.d.ts +4 -0
- package/lib/mark/geometry/text.js +39 -0
- package/lib/mark/geometry/text.js.map +1 -0
- package/lib/mark/geometry/vector.d.ts +8 -0
- package/lib/mark/geometry/vector.js +47 -0
- package/lib/mark/geometry/vector.js.map +1 -0
- package/lib/mark/utils.d.ts +8 -0
- package/lib/mark/utils.js +38 -0
- package/lib/mark/utils.js.map +1 -0
- package/lib/palette/category10.d.ts +7 -0
- package/lib/palette/category10.js +23 -0
- package/lib/palette/category10.js.map +1 -0
- package/lib/palette/category20.d.ts +7 -0
- package/lib/palette/category20.js +33 -0
- package/lib/palette/category20.js.map +1 -0
- package/lib/palette/index.d.ts +2 -0
- package/lib/palette/index.js +8 -0
- package/lib/palette/index.js.map +1 -0
- package/lib/renderer/canvas.d.ts +10 -0
- package/lib/renderer/canvas.js +22 -0
- package/lib/renderer/canvas.js.map +1 -0
- package/lib/renderer/index.d.ts +1 -0
- package/lib/renderer/index.js +6 -0
- package/lib/renderer/index.js.map +1 -0
- package/lib/runtime/component.d.ts +5 -0
- package/lib/runtime/component.js +145 -0
- package/lib/runtime/component.js.map +1 -0
- package/lib/runtime/coordinate.d.ts +11 -0
- package/lib/runtime/coordinate.js +61 -0
- package/lib/runtime/coordinate.js.map +1 -0
- package/lib/runtime/index.d.ts +8 -0
- package/lib/runtime/index.js +27 -0
- package/lib/runtime/index.js.map +1 -0
- package/lib/runtime/layout.d.ts +5 -0
- package/lib/runtime/layout.js +120 -0
- package/lib/runtime/layout.js.map +1 -0
- package/lib/runtime/library.d.ts +3 -0
- package/lib/runtime/library.js +30 -0
- package/lib/runtime/library.js.map +1 -0
- package/lib/runtime/mark.d.ts +6 -0
- package/lib/runtime/mark.js +132 -0
- package/lib/runtime/mark.js.map +1 -0
- package/lib/runtime/plot.d.ts +3 -0
- package/lib/runtime/plot.js +564 -0
- package/lib/runtime/plot.js.map +1 -0
- package/lib/runtime/render.d.ts +2 -0
- package/lib/runtime/render.js +71 -0
- package/lib/runtime/render.js.map +1 -0
- package/lib/runtime/scale.d.ts +8 -0
- package/lib/runtime/scale.js +342 -0
- package/lib/runtime/scale.js.map +1 -0
- package/lib/runtime/transform.d.ts +9 -0
- package/lib/runtime/transform.js +154 -0
- package/lib/runtime/transform.js.map +1 -0
- package/lib/runtime/types/common.d.ts +127 -0
- package/lib/runtime/types/common.js +3 -0
- package/lib/runtime/types/common.js.map +1 -0
- package/lib/runtime/types/component.d.ts +76 -0
- package/lib/runtime/types/component.js +3 -0
- package/lib/runtime/types/component.js.map +1 -0
- package/lib/runtime/types/data.d.ts +7 -0
- package/lib/runtime/types/data.js +3 -0
- package/lib/runtime/types/data.js.map +1 -0
- package/lib/runtime/types/encode.d.ts +23 -0
- package/lib/runtime/types/encode.js +3 -0
- package/lib/runtime/types/encode.js.map +1 -0
- package/lib/runtime/types/mark.d.ts +20 -0
- package/lib/runtime/types/mark.js +3 -0
- package/lib/runtime/types/mark.js.map +1 -0
- package/lib/runtime/types/options.d.ts +109 -0
- package/lib/runtime/types/options.js +3 -0
- package/lib/runtime/types/options.js.map +1 -0
- package/lib/runtime/types/transform.d.ts +17 -0
- package/lib/runtime/types/transform.js +3 -0
- package/lib/runtime/types/transform.js.map +1 -0
- package/lib/scale/band.d.ts +4 -0
- package/lib/scale/band.js +10 -0
- package/lib/scale/band.js.map +1 -0
- package/lib/scale/identity.d.ts +4 -0
- package/lib/scale/identity.js +10 -0
- package/lib/scale/identity.js.map +1 -0
- package/lib/scale/index.d.ts +11 -0
- package/lib/scale/index.js +26 -0
- package/lib/scale/index.js.map +1 -0
- package/lib/scale/linear.d.ts +4 -0
- package/lib/scale/linear.js +10 -0
- package/lib/scale/linear.js.map +1 -0
- package/lib/scale/log.d.ts +4 -0
- package/lib/scale/log.js +10 -0
- package/lib/scale/log.js.map +1 -0
- package/lib/scale/ordinal.d.ts +4 -0
- package/lib/scale/ordinal.js +10 -0
- package/lib/scale/ordinal.js.map +1 -0
- package/lib/scale/point.d.ts +4 -0
- package/lib/scale/point.js +10 -0
- package/lib/scale/point.js.map +1 -0
- package/lib/scale/pow.d.ts +4 -0
- package/lib/scale/pow.js +10 -0
- package/lib/scale/pow.js.map +1 -0
- package/lib/scale/quantile.d.ts +4 -0
- package/lib/scale/quantile.js +10 -0
- package/lib/scale/quantile.js.map +1 -0
- package/lib/scale/quantize.d.ts +4 -0
- package/lib/scale/quantize.js +10 -0
- package/lib/scale/quantize.js.map +1 -0
- package/lib/scale/threshold.d.ts +4 -0
- package/lib/scale/threshold.js +10 -0
- package/lib/scale/threshold.js.map +1 -0
- package/lib/scale/time.d.ts +4 -0
- package/lib/scale/time.js +10 -0
- package/lib/scale/time.js.map +1 -0
- package/lib/shape/annotation/badge.d.ts +14 -0
- package/lib/shape/annotation/badge.js +97 -0
- package/lib/shape/annotation/badge.js.map +1 -0
- package/lib/shape/annotation/connector.d.ts +15 -0
- package/lib/shape/annotation/connector.js +105 -0
- package/lib/shape/annotation/connector.js.map +1 -0
- package/lib/shape/annotation/line.d.ts +3 -0
- package/lib/shape/annotation/line.js +60 -0
- package/lib/shape/annotation/line.js.map +1 -0
- package/lib/shape/annotation/text.d.ts +20 -0
- package/lib/shape/annotation/text.js +166 -0
- package/lib/shape/annotation/text.js.map +1 -0
- package/lib/shape/area/area.d.ts +3 -0
- package/lib/shape/area/area.js +15 -0
- package/lib/shape/area/area.js.map +1 -0
- package/lib/shape/area/curveArea.d.ts +8 -0
- package/lib/shape/area/curveArea.js +64 -0
- package/lib/shape/area/curveArea.js.map +1 -0
- package/lib/shape/area/smoothArea.d.ts +5 -0
- package/lib/shape/area/smoothArea.js +27 -0
- package/lib/shape/area/smoothArea.js.map +1 -0
- package/lib/shape/edge/arc.d.ts +8 -0
- package/lib/shape/edge/arc.js +55 -0
- package/lib/shape/edge/arc.js.map +1 -0
- package/lib/shape/edge/edge.d.ts +6 -0
- package/lib/shape/edge/edge.js +15 -0
- package/lib/shape/edge/edge.js.map +1 -0
- package/lib/shape/edge/ribbon.d.ts +15 -0
- package/lib/shape/edge/ribbon.js +73 -0
- package/lib/shape/edge/ribbon.js.map +1 -0
- package/lib/shape/edge/smoothEdge.d.ts +6 -0
- package/lib/shape/edge/smoothEdge.js +43 -0
- package/lib/shape/edge/smoothEdge.js.map +1 -0
- package/lib/shape/edge/vhv.d.ts +12 -0
- package/lib/shape/edge/vhv.js +73 -0
- package/lib/shape/edge/vhv.js.map +1 -0
- package/lib/shape/image/image.d.ts +3 -0
- package/lib/shape/image/image.js +42 -0
- package/lib/shape/image/image.js.map +1 -0
- package/lib/shape/index.d.ts +48 -0
- package/lib/shape/index.js +101 -0
- package/lib/shape/index.js.map +1 -0
- package/lib/shape/interval/colorRect.d.ts +14 -0
- package/lib/shape/interval/colorRect.js +66 -0
- package/lib/shape/interval/colorRect.js.map +1 -0
- package/lib/shape/interval/funnel.d.ts +10 -0
- package/lib/shape/interval/funnel.js +47 -0
- package/lib/shape/interval/funnel.js.map +1 -0
- package/lib/shape/interval/hollowRect.d.ts +6 -0
- package/lib/shape/interval/hollowRect.js +13 -0
- package/lib/shape/interval/hollowRect.js.map +1 -0
- package/lib/shape/interval/pyramid.d.ts +6 -0
- package/lib/shape/interval/pyramid.js +42 -0
- package/lib/shape/interval/pyramid.js.map +1 -0
- package/lib/shape/interval/rect.d.ts +7 -0
- package/lib/shape/interval/rect.js +14 -0
- package/lib/shape/interval/rect.js.map +1 -0
- package/lib/shape/label/label.d.ts +7 -0
- package/lib/shape/label/label.js +104 -0
- package/lib/shape/label/label.js.map +1 -0
- package/lib/shape/line/curveLine.d.ts +8 -0
- package/lib/shape/line/curveLine.js +45 -0
- package/lib/shape/line/curveLine.js.map +1 -0
- package/lib/shape/line/hv.d.ts +3 -0
- package/lib/shape/line/hv.js +11 -0
- package/lib/shape/line/hv.js.map +1 -0
- package/lib/shape/line/hvh.d.ts +3 -0
- package/lib/shape/line/hvh.js +11 -0
- package/lib/shape/line/hvh.js.map +1 -0
- package/lib/shape/line/line.d.ts +3 -0
- package/lib/shape/line/line.js +11 -0
- package/lib/shape/line/line.js.map +1 -0
- package/lib/shape/line/smooth.d.ts +5 -0
- package/lib/shape/line/smooth.js +23 -0
- package/lib/shape/line/smooth.js.map +1 -0
- package/lib/shape/line/vh.d.ts +3 -0
- package/lib/shape/line/vh.js +11 -0
- package/lib/shape/line/vh.js.map +1 -0
- package/lib/shape/link/link.d.ts +13 -0
- package/lib/shape/link/link.js +53 -0
- package/lib/shape/link/link.js.map +1 -0
- package/lib/shape/node/point.d.ts +6 -0
- package/lib/shape/node/point.js +31 -0
- package/lib/shape/node/point.js.map +1 -0
- package/lib/shape/node/polygon.d.ts +3 -0
- package/lib/shape/node/polygon.js +12 -0
- package/lib/shape/node/polygon.js.map +1 -0
- package/lib/shape/point/bowtie.d.ts +6 -0
- package/lib/shape/point/bowtie.js +13 -0
- package/lib/shape/point/bowtie.js.map +1 -0
- package/lib/shape/point/colorPoint.d.ts +11 -0
- package/lib/shape/point/colorPoint.js +86 -0
- package/lib/shape/point/colorPoint.js.map +1 -0
- package/lib/shape/point/cross.d.ts +6 -0
- package/lib/shape/point/cross.js +13 -0
- package/lib/shape/point/cross.js.map +1 -0
- package/lib/shape/point/diamond.d.ts +6 -0
- package/lib/shape/point/diamond.js +13 -0
- package/lib/shape/point/diamond.js.map +1 -0
- package/lib/shape/point/hexagon.d.ts +6 -0
- package/lib/shape/point/hexagon.js +13 -0
- package/lib/shape/point/hexagon.js.map +1 -0
- package/lib/shape/point/hollowBowtie.d.ts +6 -0
- package/lib/shape/point/hollowBowtie.js +13 -0
- package/lib/shape/point/hollowBowtie.js.map +1 -0
- package/lib/shape/point/hollowDiamond.d.ts +6 -0
- package/lib/shape/point/hollowDiamond.js +13 -0
- package/lib/shape/point/hollowDiamond.js.map +1 -0
- package/lib/shape/point/hollowHexagon.d.ts +6 -0
- package/lib/shape/point/hollowHexagon.js +13 -0
- package/lib/shape/point/hollowHexagon.js.map +1 -0
- package/lib/shape/point/hollowPoint.d.ts +6 -0
- package/lib/shape/point/hollowPoint.js +13 -0
- package/lib/shape/point/hollowPoint.js.map +1 -0
- package/lib/shape/point/hollowSquare.d.ts +6 -0
- package/lib/shape/point/hollowSquare.js +13 -0
- package/lib/shape/point/hollowSquare.js.map +1 -0
- package/lib/shape/point/hollowTriangle.d.ts +6 -0
- package/lib/shape/point/hollowTriangle.js +13 -0
- package/lib/shape/point/hollowTriangle.js.map +1 -0
- package/lib/shape/point/hollowTriangleDown.d.ts +6 -0
- package/lib/shape/point/hollowTriangleDown.js +13 -0
- package/lib/shape/point/hollowTriangleDown.js.map +1 -0
- package/lib/shape/point/hyphen.d.ts +6 -0
- package/lib/shape/point/hyphen.js +13 -0
- package/lib/shape/point/hyphen.js.map +1 -0
- package/lib/shape/point/line.d.ts +6 -0
- package/lib/shape/point/line.js +13 -0
- package/lib/shape/point/line.js.map +1 -0
- package/lib/shape/point/plus.d.ts +6 -0
- package/lib/shape/point/plus.js +13 -0
- package/lib/shape/point/plus.js.map +1 -0
- package/lib/shape/point/point.d.ts +6 -0
- package/lib/shape/point/point.js +13 -0
- package/lib/shape/point/point.js.map +1 -0
- package/lib/shape/point/square.d.ts +6 -0
- package/lib/shape/point/square.js +13 -0
- package/lib/shape/point/square.js.map +1 -0
- package/lib/shape/point/symbol.d.ts +49 -0
- package/lib/shape/point/symbol.js +157 -0
- package/lib/shape/point/symbol.js.map +1 -0
- package/lib/shape/point/tick.d.ts +6 -0
- package/lib/shape/point/tick.js +13 -0
- package/lib/shape/point/tick.js.map +1 -0
- package/lib/shape/point/triangle.d.ts +6 -0
- package/lib/shape/point/triangle.js +13 -0
- package/lib/shape/point/triangle.js.map +1 -0
- package/lib/shape/point/triangleDown.d.ts +6 -0
- package/lib/shape/point/triangleDown.js +13 -0
- package/lib/shape/point/triangleDown.js.map +1 -0
- package/lib/shape/polygon/polygon.d.ts +3 -0
- package/lib/shape/polygon/polygon.js +71 -0
- package/lib/shape/polygon/polygon.js.map +1 -0
- package/lib/shape/schema/box.d.ts +3 -0
- package/lib/shape/schema/box.js +91 -0
- package/lib/shape/schema/box.js.map +1 -0
- package/lib/shape/text/text.d.ts +6 -0
- package/lib/shape/text/text.js +45 -0
- package/lib/shape/text/text.js.map +1 -0
- package/lib/shape/utils.d.ts +59 -0
- package/lib/shape/utils.js +99 -0
- package/lib/shape/utils.js.map +1 -0
- package/lib/shape/vector/vector.d.ts +13 -0
- package/lib/shape/vector/vector.js +52 -0
- package/lib/shape/vector/vector.js.map +1 -0
- package/lib/spec/action.d.ts +122 -0
- package/lib/spec/action.js +3 -0
- package/lib/spec/action.js.map +1 -0
- package/lib/spec/animate.d.ts +8 -0
- package/lib/spec/animate.js +3 -0
- package/lib/spec/animate.js.map +1 -0
- package/lib/spec/composition.d.ts +127 -0
- package/lib/spec/composition.js +3 -0
- package/lib/spec/composition.js.map +1 -0
- package/lib/spec/coordinate.d.ts +74 -0
- package/lib/spec/coordinate.js +3 -0
- package/lib/spec/coordinate.js.map +1 -0
- package/lib/spec/data.d.ts +54 -0
- package/lib/spec/data.js +3 -0
- package/lib/spec/data.js.map +1 -0
- package/lib/spec/encode.d.ts +23 -0
- package/lib/spec/encode.js +3 -0
- package/lib/spec/encode.js.map +1 -0
- package/lib/spec/geometry.d.ts +61 -0
- package/lib/spec/geometry.js +3 -0
- package/lib/spec/geometry.js.map +1 -0
- package/lib/spec/index.d.ts +17 -0
- package/lib/spec/index.js +29 -0
- package/lib/spec/index.js.map +1 -0
- package/lib/spec/interaction.d.ts +66 -0
- package/lib/spec/interaction.js +3 -0
- package/lib/spec/interaction.js.map +1 -0
- package/lib/spec/labelLayout.d.ts +4 -0
- package/lib/spec/labelLayout.js +3 -0
- package/lib/spec/labelLayout.js.map +1 -0
- package/lib/spec/palette.d.ts +13 -0
- package/lib/spec/palette.js +3 -0
- package/lib/spec/palette.js.map +1 -0
- package/lib/spec/scale.d.ts +27 -0
- package/lib/spec/scale.js +3 -0
- package/lib/spec/scale.js.map +1 -0
- package/lib/spec/theme.d.ts +12 -0
- package/lib/spec/theme.js +3 -0
- package/lib/spec/theme.js.map +1 -0
- package/lib/spec/title.d.ts +2 -0
- package/lib/spec/title.js +3 -0
- package/lib/spec/title.js.map +1 -0
- package/lib/spec/transform.d.ts +69 -0
- package/lib/spec/transform.js +136 -0
- package/lib/spec/transform.js.map +1 -0
- package/lib/stdlib/index.d.ts +2 -0
- package/lib/stdlib/index.js +200 -0
- package/lib/stdlib/index.js.map +1 -0
- package/lib/theme/index.d.ts +1 -12
- package/lib/theme/index.js +3 -25
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.d.ts +7 -0
- package/lib/theme/light.js +35 -0
- package/lib/theme/light.js.map +1 -0
- package/lib/transform/Select.d.ts +9 -0
- package/lib/transform/Select.js +57 -0
- package/lib/transform/Select.js.map +1 -0
- package/lib/transform/SelectX.d.ts +7 -0
- package/lib/transform/SelectX.js +25 -0
- package/lib/transform/SelectX.js.map +1 -0
- package/lib/transform/SelectY.d.ts +7 -0
- package/lib/transform/SelectY.js +25 -0
- package/lib/transform/SelectY.js.map +1 -0
- package/lib/transform/dodgeX.d.ts +9 -0
- package/lib/transform/dodgeX.js +60 -0
- package/lib/transform/dodgeX.js.map +1 -0
- package/lib/transform/groupX.d.ts +9 -0
- package/lib/transform/groupX.js +93 -0
- package/lib/transform/groupX.js.map +1 -0
- package/lib/transform/index.d.ts +21 -0
- package/lib/transform/index.js +46 -0
- package/lib/transform/index.js.map +1 -0
- package/lib/transform/jitter.d.ts +9 -0
- package/lib/transform/jitter.js +41 -0
- package/lib/transform/jitter.js.map +1 -0
- package/lib/transform/jitterY.d.ts +8 -0
- package/lib/transform/jitterY.js +25 -0
- package/lib/transform/jitterY.js.map +1 -0
- package/lib/transform/maybeKey.d.ts +6 -0
- package/lib/transform/maybeKey.js +36 -0
- package/lib/transform/maybeKey.js.map +1 -0
- package/lib/transform/maybeSeries.d.ts +6 -0
- package/lib/transform/maybeSeries.js +21 -0
- package/lib/transform/maybeSeries.js.map +1 -0
- package/lib/transform/maybeSize.d.ts +7 -0
- package/lib/transform/maybeSize.js +24 -0
- package/lib/transform/maybeSize.js.map +1 -0
- package/lib/transform/maybeStackY.d.ts +9 -0
- package/lib/transform/maybeStackY.js +34 -0
- package/lib/transform/maybeStackY.js.map +1 -0
- package/lib/transform/maybeTitleX.d.ts +6 -0
- package/lib/transform/maybeTitleX.js +21 -0
- package/lib/transform/maybeTitleX.js.map +1 -0
- package/lib/transform/maybeTooltip.d.ts +8 -0
- package/lib/transform/maybeTooltip.js +33 -0
- package/lib/transform/maybeTooltip.js.map +1 -0
- package/lib/transform/maybeTooltipPosition.d.ts +7 -0
- package/lib/transform/maybeTooltipPosition.js +14 -0
- package/lib/transform/maybeTooltipPosition.js.map +1 -0
- package/lib/transform/maybeTooltipY.d.ts +6 -0
- package/lib/transform/maybeTooltipY.js +13 -0
- package/lib/transform/maybeTooltipY.js.map +1 -0
- package/lib/transform/maybeZeroX.d.ts +7 -0
- package/lib/transform/maybeZeroX.js +26 -0
- package/lib/transform/maybeZeroX.js.map +1 -0
- package/lib/transform/maybeZeroY.d.ts +6 -0
- package/lib/transform/maybeZeroY.js +25 -0
- package/lib/transform/maybeZeroY.js.map +1 -0
- package/lib/transform/maybeZeroY1.d.ts +6 -0
- package/lib/transform/maybeZeroY1.js +25 -0
- package/lib/transform/maybeZeroY1.js.map +1 -0
- package/lib/transform/normalizeY.d.ts +9 -0
- package/lib/transform/normalizeY.js +73 -0
- package/lib/transform/normalizeY.js.map +1 -0
- package/lib/transform/stackEnter.d.ts +13 -0
- package/lib/transform/stackEnter.js +66 -0
- package/lib/transform/stackEnter.js.map +1 -0
- package/lib/transform/stackY.d.ts +9 -0
- package/lib/transform/stackY.js +60 -0
- package/lib/transform/stackY.js.map +1 -0
- package/lib/transform/symmetryY.d.ts +8 -0
- package/lib/transform/symmetryY.js +64 -0
- package/lib/transform/symmetryY.js.map +1 -0
- package/lib/transform/utils/helper.d.ts +15 -0
- package/lib/transform/utils/helper.js +42 -0
- package/lib/transform/utils/helper.js.map +1 -0
- package/lib/transform/utils/order.d.ts +9 -0
- package/lib/transform/utils/order.js +79 -0
- package/lib/transform/utils/order.js.map +1 -0
- package/lib/utils/array.d.ts +14 -0
- package/lib/utils/array.js +52 -0
- package/lib/utils/array.js.map +1 -0
- package/lib/utils/container.d.ts +8 -0
- package/lib/utils/container.js +19 -0
- package/lib/utils/container.js.map +1 -0
- package/lib/utils/coordinate.d.ts +6 -0
- package/lib/utils/coordinate.js +32 -0
- package/lib/utils/coordinate.js.map +1 -0
- package/lib/utils/helper.d.ts +17 -0
- package/lib/utils/helper.js +76 -0
- package/lib/utils/helper.js.map +1 -0
- package/lib/utils/selection.d.ts +64 -0
- package/lib/utils/selection.js +290 -0
- package/lib/utils/selection.js.map +1 -0
- package/lib/utils/vector.d.ts +13 -0
- package/lib/utils/vector.js +51 -0
- package/lib/utils/vector.js.map +1 -0
- package/package.json +86 -120
- package/src/adjust/index.ts +1 -0
- package/src/adjust/pack.ts +67 -0
- package/src/animation/fadeIn.ts +28 -0
- package/src/animation/fadeOut.ts +26 -0
- package/src/animation/index.ts +7 -0
- package/src/animation/morphing.ts +211 -0
- package/src/animation/scaleInX.ts +64 -0
- package/src/animation/scaleInY.ts +64 -0
- package/src/animation/scaleOutX.ts +64 -0
- package/src/animation/scaleOutY.ts +64 -0
- package/src/animation/utils.ts +26 -0
- package/src/api/chart.ts +135 -0
- package/src/api/composition/circle.ts +43 -0
- package/src/api/composition/flex.ts +30 -0
- package/src/api/composition/index.ts +39 -0
- package/src/api/composition/keyframe.ts +30 -0
- package/src/api/composition/layer.ts +24 -0
- package/src/api/composition/matrix.ts +43 -0
- package/src/api/composition/rect.ts +47 -0
- package/src/api/composition/view.ts +42 -0
- package/src/api/index.ts +2 -0
- package/src/api/library.ts +12 -0
- package/src/api/mark/index.ts +62 -0
- package/src/api/mark/mark.ts +249 -0
- package/src/api/mark/types.ts +22 -0
- package/src/api/node.ts +79 -0
- package/src/api/props.ts +86 -0
- package/src/api/types.ts +20 -0
- package/src/component/axis.ts +391 -0
- package/src/component/axisX.ts +16 -0
- package/src/component/axisY.ts +16 -0
- package/src/component/index.ts +5 -0
- package/src/component/legendCategory.ts +99 -0
- package/src/component/legendContinuous.ts +54 -0
- package/src/component/title.ts +76 -0
- package/src/component/utils.ts +38 -0
- package/src/composition/circle.ts +102 -0
- package/src/composition/flex.ts +49 -0
- package/src/composition/index.ts +8 -0
- package/src/composition/keyframe.ts +90 -0
- package/src/composition/layer.ts +26 -0
- package/src/composition/mark.ts +55 -0
- package/src/composition/matrix.ts +170 -0
- package/src/composition/rect.ts +339 -0
- package/src/composition/utils.ts +27 -0
- package/src/composition/view.ts +28 -0
- package/src/coordinate/cartesian.ts +11 -0
- package/src/coordinate/fisheye.ts +17 -0
- package/src/coordinate/fisheyeX.ts +15 -0
- package/src/coordinate/fisheyeY.ts +15 -0
- package/src/coordinate/helix.ts +21 -0
- package/src/coordinate/index.ts +12 -0
- package/src/coordinate/parallel.ts +11 -0
- package/src/coordinate/polar.ts +22 -0
- package/src/coordinate/reflect.ts +15 -0
- package/src/coordinate/reflectX.ts +15 -0
- package/src/coordinate/reflectY.ts +15 -0
- package/src/coordinate/theta.ts +21 -0
- package/src/coordinate/transpose.ts +16 -0
- package/src/data/arc.ts +21 -0
- package/src/data/cluster.ts +56 -0
- package/src/data/connector.ts +14 -0
- package/src/data/fetch.ts +23 -0
- package/src/data/filterBy.ts +19 -0
- package/src/data/fold.ts +29 -0
- package/src/data/index.ts +9 -0
- package/src/data/inline.ts +11 -0
- package/src/data/pick.ts +15 -0
- package/src/data/rename.ts +26 -0
- package/src/data/sankey.ts +105 -0
- package/src/data/sortBy.ts +23 -0
- package/src/data/subset.ts +35 -0
- package/src/data/tree.ts +12 -0
- package/src/data/utils/arc/arc.ts +210 -0
- package/src/data/utils/arc/index.ts +2 -0
- package/src/data/utils/arc/sort.ts +15 -0
- package/src/data/utils/arc/types.ts +27 -0
- package/src/data/utils/d3-cloud/index.ts +499 -0
- package/src/data/utils/d3-sankey/align.ts +25 -0
- package/src/data/utils/d3-sankey/constant.ts +5 -0
- package/src/data/utils/d3-sankey/index.ts +12 -0
- package/src/data/utils/d3-sankey/sankey.ts +436 -0
- package/src/data/utils/flow.ts +36 -0
- package/src/data/utils/memo.ts +80 -0
- package/src/data/voronoi.ts +30 -0
- package/src/data/wordCloud.ts +115 -0
- package/src/encode/column.ts +13 -0
- package/src/encode/constant.ts +13 -0
- package/src/encode/field.ts +13 -0
- package/src/encode/index.ts +4 -0
- package/src/encode/transform.ts +15 -0
- package/src/index.ts +4 -738
- package/src/interaction/action/index.ts +47 -2
- package/src/interaction/action/service/elementSelection.ts +125 -0
- package/src/interaction/action/service/fisheyeFocus.ts +75 -0
- package/src/interaction/action/service/legendItemSelection.ts +34 -0
- package/src/interaction/action/service/recordCurrentPoint.ts +22 -0
- package/src/interaction/action/service/recordPoint.ts +35 -0
- package/src/interaction/action/service/recordRegion.ts +41 -0
- package/src/interaction/action/service/recordState.ts +15 -0
- package/src/interaction/action/service/recordTip.ts +20 -0
- package/src/interaction/action/service/surfacePointSelection.ts +28 -0
- package/src/interaction/action/service/triggerInfoSelection.ts +33 -0
- package/src/interaction/action/transformer/activeElement.ts +32 -0
- package/src/interaction/action/transformer/activeRegion.ts +73 -0
- package/src/interaction/action/transformer/button.ts +113 -0
- package/src/interaction/action/transformer/cursor.ts +21 -0
- package/src/interaction/action/transformer/filter.ts +57 -0
- package/src/interaction/action/transformer/filterElement.ts +54 -0
- package/src/interaction/action/transformer/highlightElement.ts +61 -0
- package/src/interaction/action/transformer/mask.ts +115 -0
- package/src/interaction/action/transformer/move.ts +76 -0
- package/src/interaction/action/transformer/plot.ts +15 -0
- package/src/interaction/action/transformer/poptip.ts +51 -0
- package/src/interaction/action/transformer/setItemState.ts +39 -0
- package/src/interaction/action/transformer/tooltip.ts +404 -0
- package/src/interaction/builtin/activeRegion.ts +25 -0
- package/src/interaction/builtin/brush.ts +99 -0
- package/src/interaction/builtin/brushHighlight.ts +122 -0
- package/src/interaction/builtin/brushVisible.ts +69 -0
- package/src/interaction/builtin/elementActive.ts +32 -0
- package/src/interaction/builtin/elementHighlight.ts +31 -0
- package/src/interaction/builtin/elementHighlightByColor.ts +35 -0
- package/src/interaction/builtin/elementHighlightByX.ts +35 -0
- package/src/interaction/builtin/elementListHighlight.ts +39 -0
- package/src/interaction/builtin/elementSelected.ts +25 -0
- package/src/interaction/builtin/ellipsisText.ts +24 -0
- package/src/interaction/builtin/fisheye.ts +25 -0
- package/src/interaction/builtin/legendActive.ts +37 -0
- package/src/interaction/builtin/legendHighlight.ts +37 -0
- package/src/interaction/builtin/tooltip.ts +33 -0
- package/src/interaction/create.ts +153 -0
- package/src/interaction/index.ts +18 -48
- package/src/interaction/interactor/index.ts +2 -0
- package/src/interaction/interactor/mousePosition.ts +13 -0
- package/src/interaction/interactor/touchPosition.ts +13 -0
- package/src/interaction/stdlib.ts +57 -0
- package/src/interaction/types.ts +80 -0
- package/src/interaction/utils.ts +65 -0
- package/src/labelLayout/hideOverlap.ts +47 -0
- package/src/labelLayout/index.ts +1 -0
- package/src/mark/annotation/connector.ts +27 -0
- package/src/mark/annotation/index.ts +25 -0
- package/src/mark/annotation/lineX.ts +31 -0
- package/src/mark/annotation/lineY.ts +31 -0
- package/src/mark/annotation/range.ts +55 -0
- package/src/mark/annotation/rangeX.ts +23 -0
- package/src/mark/annotation/rangeY.ts +23 -0
- package/src/mark/annotation/text.ts +30 -0
- package/src/mark/geometry/area.ts +85 -0
- package/src/mark/geometry/edge.ts +40 -0
- package/src/mark/geometry/grid.ts +56 -0
- package/src/mark/geometry/image.ts +41 -0
- package/src/mark/geometry/index.ts +13 -0
- package/src/mark/geometry/interval.ts +71 -0
- package/src/mark/geometry/line.ts +94 -0
- package/src/mark/geometry/link.ts +44 -0
- package/src/mark/geometry/node.ts +36 -0
- package/src/mark/geometry/point.ts +80 -0
- package/src/mark/geometry/polygon.ts +54 -0
- package/src/mark/geometry/schema.ts +105 -0
- package/src/mark/geometry/text.ts +43 -0
- package/src/mark/geometry/vector.ts +56 -0
- package/src/mark/utils.ts +35 -0
- package/src/palette/category10.ts +24 -0
- package/src/palette/category20.ts +34 -0
- package/src/palette/index.ts +2 -0
- package/src/renderer/canvas.ts +27 -0
- package/src/renderer/index.ts +1 -0
- package/src/runtime/component.ts +209 -0
- package/src/runtime/coordinate.ts +71 -0
- package/src/runtime/index.ts +8 -0
- package/src/runtime/layout.ts +180 -0
- package/src/runtime/library.ts +27 -0
- package/src/runtime/mark.ts +183 -0
- package/src/runtime/plot.ts +839 -0
- package/src/runtime/render.ts +80 -0
- package/src/runtime/scale.ts +453 -0
- package/src/runtime/transform.ts +159 -0
- package/src/runtime/types/common.ts +158 -0
- package/src/runtime/types/component.ts +223 -0
- package/src/runtime/types/data.ts +10 -0
- package/src/runtime/types/encode.ts +36 -0
- package/src/runtime/types/mark.ts +31 -0
- package/src/runtime/types/options.ts +164 -0
- package/src/runtime/types/transform.ts +29 -0
- package/src/scale/band.ts +11 -0
- package/src/scale/identity.ts +11 -0
- package/src/scale/index.ts +11 -0
- package/src/scale/linear.ts +11 -0
- package/src/scale/log.ts +11 -0
- package/src/scale/ordinal.ts +11 -0
- package/src/scale/point.ts +12 -0
- package/src/scale/pow.ts +11 -0
- package/src/scale/quantile.ts +11 -0
- package/src/scale/quantize.ts +11 -0
- package/src/scale/threshold.ts +11 -0
- package/src/scale/time.ts +11 -0
- package/src/shape/annotation/badge.ts +114 -0
- package/src/shape/annotation/connector.ts +138 -0
- package/src/shape/annotation/line.ts +55 -0
- package/src/shape/annotation/text.ts +224 -0
- package/src/shape/area/area.ts +17 -0
- package/src/shape/area/curveArea.ts +61 -0
- package/src/shape/area/smoothArea.ts +25 -0
- package/src/shape/edge/arc.ts +46 -0
- package/src/shape/edge/edge.ts +15 -0
- package/src/shape/edge/ribbon.ts +93 -0
- package/src/shape/edge/smoothEdge.ts +41 -0
- package/src/shape/edge/vhv.ts +85 -0
- package/src/shape/image/image.ts +33 -0
- package/src/shape/index.ts +66 -0
- package/src/shape/interval/colorRect.ts +62 -0
- package/src/shape/interval/funnel.ts +58 -0
- package/src/shape/interval/hollowRect.ts +15 -0
- package/src/shape/interval/pyramid.ts +50 -0
- package/src/shape/interval/rect.ts +16 -0
- package/src/shape/label/label.ts +116 -0
- package/src/shape/line/curveLine.ts +44 -0
- package/src/shape/line/hv.ts +13 -0
- package/src/shape/line/hvh.ts +13 -0
- package/src/shape/line/line.ts +13 -0
- package/src/shape/line/smooth.ts +16 -0
- package/src/shape/line/vh.ts +13 -0
- package/src/shape/link/link.ts +51 -0
- package/src/shape/node/point.ts +32 -0
- package/src/shape/node/polygon.ts +12 -0
- package/src/shape/point/bowtie.ts +15 -0
- package/src/shape/point/colorPoint.ts +65 -0
- package/src/shape/point/cross.ts +15 -0
- package/src/shape/point/diamond.ts +15 -0
- package/src/shape/point/hexagon.ts +15 -0
- package/src/shape/point/hollowBowtie.ts +15 -0
- package/src/shape/point/hollowDiamond.ts +19 -0
- package/src/shape/point/hollowHexagon.ts +19 -0
- package/src/shape/point/hollowPoint.ts +15 -0
- package/src/shape/point/hollowSquare.ts +15 -0
- package/src/shape/point/hollowTriangle.ts +19 -0
- package/src/shape/point/hollowTriangleDown.ts +19 -0
- package/src/shape/point/hyphen.ts +15 -0
- package/src/shape/point/line.ts +15 -0
- package/src/shape/point/plus.ts +15 -0
- package/src/shape/point/point.ts +15 -0
- package/src/shape/point/square.ts +15 -0
- package/src/shape/point/symbol.ts +153 -0
- package/src/shape/point/tick.ts +15 -0
- package/src/shape/point/triangle.ts +15 -0
- package/src/shape/point/triangleDown.ts +19 -0
- package/src/shape/polygon/polygon.ts +67 -0
- package/src/shape/schema/box.ts +96 -0
- package/src/shape/text/text.ts +43 -0
- package/src/shape/utils.ts +160 -0
- package/src/shape/vector/vector.ts +51 -0
- package/src/spec/action.ts +196 -0
- package/src/spec/animate.ts +16 -0
- package/src/spec/composition.ts +145 -0
- package/src/spec/coordinate.ts +113 -0
- package/src/spec/data.ts +81 -0
- package/src/spec/encode.ts +46 -0
- package/src/spec/geometry.ts +168 -0
- package/src/spec/index.ts +19 -0
- package/src/spec/interaction.ts +115 -0
- package/src/spec/labelLayout.ts +5 -0
- package/src/spec/palette.ts +18 -0
- package/src/spec/scale.ts +78 -0
- package/src/spec/theme.ts +20 -0
- package/src/spec/title.ts +3 -0
- package/src/spec/transform.ts +274 -0
- package/src/stdlib/index.ts +364 -0
- package/src/theme/index.ts +1 -28
- package/src/theme/light.ts +35 -0
- package/src/transform/dodgeX.ts +59 -0
- package/src/transform/groupX.ts +92 -0
- package/src/transform/index.ts +24 -0
- package/src/transform/jitter.ts +45 -0
- package/src/transform/jitterY.ts +26 -0
- package/src/transform/maybeKey.ts +26 -0
- package/src/transform/maybeSeries.ts +20 -0
- package/src/transform/maybeSize.ts +23 -0
- package/src/transform/maybeStackY.ts +37 -0
- package/src/transform/maybeTitleX.ts +20 -0
- package/src/transform/maybeTooltip.ts +34 -0
- package/src/transform/maybeTooltipPosition.ts +14 -0
- package/src/transform/maybeTooltipY.ts +13 -0
- package/src/transform/maybeZeroX.ts +25 -0
- package/src/transform/maybeZeroY.ts +24 -0
- package/src/transform/maybeZeroY1.ts +24 -0
- package/src/transform/normalizeY.ts +70 -0
- package/src/transform/select.ts +53 -0
- package/src/transform/selectX.ts +15 -0
- package/src/transform/selectY.ts +15 -0
- package/src/transform/stackEnter.ts +73 -0
- package/src/transform/stackY.ts +59 -0
- package/src/transform/symmetryY.ts +60 -0
- package/src/transform/utils/helper.ts +37 -0
- package/src/transform/utils/order.ts +123 -0
- package/src/utils/array.ts +50 -0
- package/src/utils/container.ts +21 -0
- package/src/utils/coordinate.ts +29 -0
- package/src/utils/helper.ts +69 -0
- package/src/utils/selection.ts +403 -0
- package/src/utils/vector.ts +47 -0
- package/dist/g2.min.js.map +0 -1
- package/esm/animate/animation/fade.d.ts +0 -21
- package/esm/animate/animation/fade.js +0 -42
- package/esm/animate/animation/fade.js.map +0 -1
- package/esm/animate/animation/grow-in.d.ts +0 -30
- package/esm/animate/animation/grow-in.js +0 -38
- package/esm/animate/animation/grow-in.js.map +0 -1
- package/esm/animate/animation/index.d.ts +0 -16
- package/esm/animate/animation/index.js +0 -17
- package/esm/animate/animation/index.js.map +0 -1
- package/esm/animate/animation/path-in.d.ts +0 -12
- package/esm/animate/animation/path-in.js +0 -21
- package/esm/animate/animation/path-in.js.map +0 -1
- package/esm/animate/animation/position-update.d.ts +0 -11
- package/esm/animate/animation/position-update.js +0 -24
- package/esm/animate/animation/position-update.js.map +0 -1
- package/esm/animate/animation/scale-in.d.ts +0 -19
- package/esm/animate/animation/scale-in.js +0 -60
- package/esm/animate/animation/scale-in.js.map +0 -1
- package/esm/animate/animation/sector-path-update.d.ts +0 -27
- package/esm/animate/animation/sector-path-update.js +0 -132
- package/esm/animate/animation/sector-path-update.js.map +0 -1
- package/esm/animate/animation/util.d.ts +0 -19
- package/esm/animate/animation/util.js +0 -89
- package/esm/animate/animation/util.js.map +0 -1
- package/esm/animate/animation/wave-in.d.ts +0 -13
- package/esm/animate/animation/wave-in.js +0 -30
- package/esm/animate/animation/wave-in.js.map +0 -1
- package/esm/animate/animation/zoom.d.ts +0 -21
- package/esm/animate/animation/zoom.js +0 -66
- package/esm/animate/animation/zoom.js.map +0 -1
- package/esm/animate/index.d.ts +0 -48
- package/esm/animate/index.js +0 -249
- package/esm/animate/index.js.map +0 -1
- package/esm/animate/interface.d.ts +0 -18
- package/esm/animate/interface.js +0 -2
- package/esm/animate/interface.js.map +0 -1
- package/esm/api.d.ts +0 -2
- package/esm/api.js +0 -3
- package/esm/api.js.map +0 -1
- package/esm/base.d.ts +0 -33
- package/esm/base.js +0 -55
- package/esm/base.js.map +0 -1
- package/esm/chart/chart.d.ts +0 -61
- package/esm/chart/chart.js +0 -157
- package/esm/chart/chart.js.map +0 -1
- package/esm/chart/controller/annotation.d.ts +0 -162
- package/esm/chart/controller/annotation.js +0 -592
- package/esm/chart/controller/annotation.js.map +0 -1
- package/esm/chart/controller/axis.d.ts +0 -93
- package/esm/chart/controller/axis.js +0 -578
- package/esm/chart/controller/axis.js.map +0 -1
- package/esm/chart/controller/base.d.ts +0 -64
- package/esm/chart/controller/base.js +0 -62
- package/esm/chart/controller/base.js.map +0 -1
- package/esm/chart/controller/coordinate.d.ts +0 -74
- package/esm/chart/controller/coordinate.js +0 -145
- package/esm/chart/controller/coordinate.js.map +0 -1
- package/esm/chart/controller/gesture.d.ts +0 -37
- package/esm/chart/controller/gesture.js +0 -258
- package/esm/chart/controller/gesture.js.map +0 -1
- package/esm/chart/controller/index.d.ts +0 -25
- package/esm/chart/controller/index.js +0 -34
- package/esm/chart/controller/index.js.map +0 -1
- package/esm/chart/controller/legend.d.ts +0 -106
- package/esm/chart/controller/legend.js +0 -484
- package/esm/chart/controller/legend.js.map +0 -1
- package/esm/chart/controller/scrollbar.d.ts +0 -64
- package/esm/chart/controller/scrollbar.js +0 -316
- package/esm/chart/controller/scrollbar.js.map +0 -1
- package/esm/chart/controller/slider.d.ts +0 -88
- package/esm/chart/controller/slider.js +0 -296
- package/esm/chart/controller/slider.js.map +0 -1
- package/esm/chart/controller/tooltip.d.ts +0 -68
- package/esm/chart/controller/tooltip.js +0 -696
- package/esm/chart/controller/tooltip.js.map +0 -1
- package/esm/chart/event.d.ts +0 -47
- package/esm/chart/event.js +0 -91
- package/esm/chart/event.js.map +0 -1
- package/esm/chart/index.d.ts +0 -4
- package/esm/chart/index.js +0 -5
- package/esm/chart/index.js.map +0 -1
- package/esm/chart/layout/auto.d.ts +0 -8
- package/esm/chart/layout/auto.js +0 -64
- package/esm/chart/layout/auto.js.map +0 -1
- package/esm/chart/layout/constraint/bounds.d.ts +0 -32
- package/esm/chart/layout/constraint/bounds.js +0 -30
- package/esm/chart/layout/constraint/bounds.js.map +0 -1
- package/esm/chart/layout/constraint/constraint.d.ts +0 -31
- package/esm/chart/layout/constraint/constraint.js +0 -82
- package/esm/chart/layout/constraint/constraint.js.map +0 -1
- package/esm/chart/layout/constraint/gauss.d.ts +0 -11
- package/esm/chart/layout/constraint/gauss.js +0 -63
- package/esm/chart/layout/constraint/gauss.js.map +0 -1
- package/esm/chart/layout/constraint/index.d.ts +0 -5
- package/esm/chart/layout/constraint/index.js +0 -30
- package/esm/chart/layout/constraint/index.js.map +0 -1
- package/esm/chart/layout/constraint/solver.d.ts +0 -40
- package/esm/chart/layout/constraint/solver.js +0 -78
- package/esm/chart/layout/constraint/solver.js.map +0 -1
- package/esm/chart/layout/constraint/types.d.ts +0 -21
- package/esm/chart/layout/constraint/types.js +0 -13
- package/esm/chart/layout/constraint/types.js.map +0 -1
- package/esm/chart/layout/constraint/variable.d.ts +0 -24
- package/esm/chart/layout/constraint/variable.js +0 -28
- package/esm/chart/layout/constraint/variable.js.map +0 -1
- package/esm/chart/layout/index.d.ts +0 -15
- package/esm/chart/layout/index.js +0 -26
- package/esm/chart/layout/index.js.map +0 -1
- package/esm/chart/layout/padding-cal.d.ts +0 -53
- package/esm/chart/layout/padding-cal.js +0 -108
- package/esm/chart/layout/padding-cal.js.map +0 -1
- package/esm/chart/util/scale-pool.d.ts +0 -57
- package/esm/chart/util/scale-pool.js +0 -212
- package/esm/chart/util/scale-pool.js.map +0 -1
- package/esm/chart/util/sync-view-padding.d.ts +0 -9
- package/esm/chart/util/sync-view-padding.js +0 -14
- package/esm/chart/util/sync-view-padding.js.map +0 -1
- package/esm/chart/view.d.ts +0 -747
- package/esm/chart/view.js +0 -1636
- package/esm/chart/view.js.map +0 -1
- package/esm/component/labels.d.ts +0 -46
- package/esm/component/labels.js +0 -306
- package/esm/component/labels.js.map +0 -1
- package/esm/component/update-label.d.ts +0 -21
- package/esm/component/update-label.js +0 -57
- package/esm/component/update-label.js.map +0 -1
- package/esm/constant.d.ts +0 -124
- package/esm/constant.js +0 -136
- package/esm/constant.js.map +0 -1
- package/esm/core.d.ts +0 -46
- package/esm/core.js +0 -60
- package/esm/core.js.map +0 -1
- package/esm/dependents.d.ts +0 -21
- package/esm/dependents.js +0 -33
- package/esm/dependents.js.map +0 -1
- package/esm/engine/index.d.ts +0 -13
- package/esm/engine/index.js +0 -22
- package/esm/engine/index.js.map +0 -1
- package/esm/facet/circle.d.ts +0 -36
- package/esm/facet/circle.js +0 -119
- package/esm/facet/circle.js.map +0 -1
- package/esm/facet/facet.d.ts +0 -165
- package/esm/facet/facet.js +0 -292
- package/esm/facet/facet.js.map +0 -1
- package/esm/facet/index.d.ts +0 -13
- package/esm/facet/index.js +0 -22
- package/esm/facet/index.js.map +0 -1
- package/esm/facet/list.d.ts +0 -46
- package/esm/facet/list.js +0 -134
- package/esm/facet/list.js.map +0 -1
- package/esm/facet/matrix.d.ts +0 -34
- package/esm/facet/matrix.js +0 -119
- package/esm/facet/matrix.js.map +0 -1
- package/esm/facet/mirror.d.ts +0 -31
- package/esm/facet/mirror.js +0 -144
- package/esm/facet/mirror.js.map +0 -1
- package/esm/facet/rect.d.ts +0 -35
- package/esm/facet/rect.js +0 -141
- package/esm/facet/rect.js.map +0 -1
- package/esm/facet/tree.d.ts +0 -40
- package/esm/facet/tree.js +0 -298
- package/esm/facet/tree.js.map +0 -1
- package/esm/geometry/area.d.ts +0 -46
- package/esm/geometry/area.js +0 -62
- package/esm/geometry/area.js.map +0 -1
- package/esm/geometry/base.d.ts +0 -796
- package/esm/geometry/base.js +0 -1556
- package/esm/geometry/base.js.map +0 -1
- package/esm/geometry/edge.d.ts +0 -15
- package/esm/geometry/edge.js +0 -24
- package/esm/geometry/edge.js.map +0 -1
- package/esm/geometry/element/index.d.ts +0 -127
- package/esm/geometry/element/index.js +0 -438
- package/esm/geometry/element/index.js.map +0 -1
- package/esm/geometry/heatmap.d.ts +0 -31
- package/esm/geometry/heatmap.js +0 -200
- package/esm/geometry/heatmap.js.map +0 -1
- package/esm/geometry/interval.d.ts +0 -41
- package/esm/geometry/interval.js +0 -98
- package/esm/geometry/interval.js.map +0 -1
- package/esm/geometry/label/base.d.ts +0 -76
- package/esm/geometry/label/base.js +0 -416
- package/esm/geometry/label/base.js.map +0 -1
- package/esm/geometry/label/index.d.ts +0 -38
- package/esm/geometry/label/index.js +0 -35
- package/esm/geometry/label/index.js.map +0 -1
- package/esm/geometry/label/interface.d.ts +0 -66
- package/esm/geometry/label/interface.js +0 -2
- package/esm/geometry/label/interface.js.map +0 -1
- package/esm/geometry/label/interval.d.ts +0 -27
- package/esm/geometry/label/interval.js +0 -146
- package/esm/geometry/label/interval.js.map +0 -1
- package/esm/geometry/label/layout/adjust-color.d.ts +0 -3
- package/esm/geometry/label/layout/adjust-color.js +0 -36
- package/esm/geometry/label/layout/adjust-color.js.map +0 -1
- package/esm/geometry/label/layout/hide-overlap.d.ts +0 -8
- package/esm/geometry/label/layout/hide-overlap.js +0 -75
- package/esm/geometry/label/layout/hide-overlap.js.map +0 -1
- package/esm/geometry/label/layout/interval/adjust-position.d.ts +0 -9
- package/esm/geometry/label/layout/interval/adjust-position.js +0 -61
- package/esm/geometry/label/layout/interval/adjust-position.js.map +0 -1
- package/esm/geometry/label/layout/interval/hide-overlap.d.ts +0 -9
- package/esm/geometry/label/layout/interval/hide-overlap.js +0 -79
- package/esm/geometry/label/layout/interval/hide-overlap.js.map +0 -1
- package/esm/geometry/label/layout/limit-in-canvas.d.ts +0 -9
- package/esm/geometry/label/layout/limit-in-canvas.js +0 -44
- package/esm/geometry/label/layout/limit-in-canvas.js.map +0 -1
- package/esm/geometry/label/layout/limit-in-plot.d.ts +0 -18
- package/esm/geometry/label/layout/limit-in-plot.js +0 -75
- package/esm/geometry/label/layout/limit-in-plot.js.map +0 -1
- package/esm/geometry/label/layout/limit-in-shape.d.ts +0 -7
- package/esm/geometry/label/layout/limit-in-shape.js +0 -18
- package/esm/geometry/label/layout/limit-in-shape.js.map +0 -1
- package/esm/geometry/label/layout/overlap.d.ts +0 -15
- package/esm/geometry/label/layout/overlap.js +0 -223
- package/esm/geometry/label/layout/overlap.js.map +0 -1
- package/esm/geometry/label/layout/path/adjust-position.d.ts +0 -17
- package/esm/geometry/label/layout/path/adjust-position.js +0 -95
- package/esm/geometry/label/layout/path/adjust-position.js.map +0 -1
- package/esm/geometry/label/layout/pie/distribute.d.ts +0 -3
- package/esm/geometry/label/layout/pie/distribute.js +0 -196
- package/esm/geometry/label/layout/pie/distribute.js.map +0 -1
- package/esm/geometry/label/layout/pie/outer.d.ts +0 -6
- package/esm/geometry/label/layout/pie/outer.js +0 -218
- package/esm/geometry/label/layout/pie/outer.js.map +0 -1
- package/esm/geometry/label/layout/pie/spider.d.ts +0 -7
- package/esm/geometry/label/layout/pie/spider.js +0 -193
- package/esm/geometry/label/layout/pie/spider.js.map +0 -1
- package/esm/geometry/label/layout/pie/util.d.ts +0 -10
- package/esm/geometry/label/layout/pie/util.js +0 -73
- package/esm/geometry/label/layout/pie/util.js.map +0 -1
- package/esm/geometry/label/layout/point/adjust-position.d.ts +0 -17
- package/esm/geometry/label/layout/point/adjust-position.js +0 -95
- package/esm/geometry/label/layout/point/adjust-position.js.map +0 -1
- package/esm/geometry/label/layout/worker/hide-overlap.d.ts +0 -2
- package/esm/geometry/label/layout/worker/hide-overlap.js +0 -155
- package/esm/geometry/label/layout/worker/hide-overlap.js.map +0 -1
- package/esm/geometry/label/pie.d.ts +0 -22
- package/esm/geometry/label/pie.js +0 -95
- package/esm/geometry/label/pie.js.map +0 -1
- package/esm/geometry/label/polar.d.ts +0 -64
- package/esm/geometry/label/polar.js +0 -221
- package/esm/geometry/label/polar.js.map +0 -1
- package/esm/geometry/label/util/createWorker.d.ts +0 -1
- package/esm/geometry/label/util/createWorker.js +0 -16
- package/esm/geometry/label/util/createWorker.js.map +0 -1
- package/esm/geometry/label/util/index.d.ts +0 -28
- package/esm/geometry/label/util/index.js +0 -62
- package/esm/geometry/label/util/index.js.map +0 -1
- package/esm/geometry/line.d.ts +0 -11
- package/esm/geometry/line.js +0 -21
- package/esm/geometry/line.js.map +0 -1
- package/esm/geometry/path.d.ts +0 -40
- package/esm/geometry/path.js +0 -150
- package/esm/geometry/path.js.map +0 -1
- package/esm/geometry/point.d.ts +0 -19
- package/esm/geometry/point.js +0 -30
- package/esm/geometry/point.js.map +0 -1
- package/esm/geometry/polygon.d.ts +0 -19
- package/esm/geometry/polygon.js +0 -62
- package/esm/geometry/polygon.js.map +0 -1
- package/esm/geometry/schema.d.ts +0 -18
- package/esm/geometry/schema.js +0 -48
- package/esm/geometry/schema.js.map +0 -1
- package/esm/geometry/shape/area/index.d.ts +0 -2
- package/esm/geometry/shape/area/index.js +0 -45
- package/esm/geometry/shape/area/index.js.map +0 -1
- package/esm/geometry/shape/area/line.d.ts +0 -1
- package/esm/geometry/shape/area/line.js +0 -31
- package/esm/geometry/shape/area/line.js.map +0 -1
- package/esm/geometry/shape/area/smooth-line.d.ts +0 -1
- package/esm/geometry/shape/area/smooth-line.js +0 -30
- package/esm/geometry/shape/area/smooth-line.js.map +0 -1
- package/esm/geometry/shape/area/smooth.d.ts +0 -1
- package/esm/geometry/shape/area/smooth.js +0 -32
- package/esm/geometry/shape/area/smooth.js.map +0 -1
- package/esm/geometry/shape/area/util.d.ts +0 -22
- package/esm/geometry/shape/area/util.js +0 -88
- package/esm/geometry/shape/area/util.js.map +0 -1
- package/esm/geometry/shape/base.d.ts +0 -22
- package/esm/geometry/shape/base.js +0 -162
- package/esm/geometry/shape/base.js.map +0 -1
- package/esm/geometry/shape/constant.d.ts +0 -4
- package/esm/geometry/shape/constant.js +0 -5
- package/esm/geometry/shape/constant.js.map +0 -1
- package/esm/geometry/shape/edge/arc.d.ts +0 -1
- package/esm/geometry/shape/edge/arc.js +0 -84
- package/esm/geometry/shape/edge/arc.js.map +0 -1
- package/esm/geometry/shape/edge/index.d.ts +0 -2
- package/esm/geometry/shape/edge/index.js +0 -31
- package/esm/geometry/shape/edge/index.js.map +0 -1
- package/esm/geometry/shape/edge/smooth.d.ts +0 -1
- package/esm/geometry/shape/edge/smooth.js +0 -30
- package/esm/geometry/shape/edge/smooth.js.map +0 -1
- package/esm/geometry/shape/edge/util.d.ts +0 -17
- package/esm/geometry/shape/edge/util.js +0 -32
- package/esm/geometry/shape/edge/util.js.map +0 -1
- package/esm/geometry/shape/edge/vhv.d.ts +0 -1
- package/esm/geometry/shape/edge/vhv.js +0 -42
- package/esm/geometry/shape/edge/vhv.js.map +0 -1
- package/esm/geometry/shape/interval/funnel.d.ts +0 -1
- package/esm/geometry/shape/interval/funnel.js +0 -31
- package/esm/geometry/shape/interval/funnel.js.map +0 -1
- package/esm/geometry/shape/interval/hollow-rect.d.ts +0 -1
- package/esm/geometry/shape/interval/hollow-rect.js +0 -51
- package/esm/geometry/shape/interval/hollow-rect.js.map +0 -1
- package/esm/geometry/shape/interval/index.d.ts +0 -3
- package/esm/geometry/shape/interval/index.js +0 -65
- package/esm/geometry/shape/interval/index.js.map +0 -1
- package/esm/geometry/shape/interval/line.d.ts +0 -1
- package/esm/geometry/shape/interval/line.js +0 -54
- package/esm/geometry/shape/interval/line.js.map +0 -1
- package/esm/geometry/shape/interval/pyramid.d.ts +0 -1
- package/esm/geometry/shape/interval/pyramid.js +0 -31
- package/esm/geometry/shape/interval/pyramid.js.map +0 -1
- package/esm/geometry/shape/interval/tick.d.ts +0 -1
- package/esm/geometry/shape/interval/tick.js +0 -78
- package/esm/geometry/shape/interval/tick.js.map +0 -1
- package/esm/geometry/shape/interval/util.d.ts +0 -55
- package/esm/geometry/shape/interval/util.js +0 -318
- package/esm/geometry/shape/interval/util.js.map +0 -1
- package/esm/geometry/shape/line/index.d.ts +0 -8
- package/esm/geometry/shape/line/index.js +0 -105
- package/esm/geometry/shape/line/index.js.map +0 -1
- package/esm/geometry/shape/line/step.d.ts +0 -1
- package/esm/geometry/shape/line/step.js +0 -84
- package/esm/geometry/shape/line/step.js.map +0 -1
- package/esm/geometry/shape/line/util.d.ts +0 -16
- package/esm/geometry/shape/line/util.js +0 -83
- package/esm/geometry/shape/line/util.js.map +0 -1
- package/esm/geometry/shape/point/hollow.d.ts +0 -1
- package/esm/geometry/shape/point/hollow.js +0 -24
- package/esm/geometry/shape/point/hollow.js.map +0 -1
- package/esm/geometry/shape/point/image.d.ts +0 -1
- package/esm/geometry/shape/point/image.js +0 -59
- package/esm/geometry/shape/point/image.js.map +0 -1
- package/esm/geometry/shape/point/index.d.ts +0 -2
- package/esm/geometry/shape/point/index.js +0 -32
- package/esm/geometry/shape/point/index.js.map +0 -1
- package/esm/geometry/shape/point/solid.d.ts +0 -1
- package/esm/geometry/shape/point/solid.js +0 -23
- package/esm/geometry/shape/point/solid.js.map +0 -1
- package/esm/geometry/shape/point/util.d.ts +0 -15
- package/esm/geometry/shape/point/util.js +0 -49
- package/esm/geometry/shape/point/util.js.map +0 -1
- package/esm/geometry/shape/polygon/index.d.ts +0 -2
- package/esm/geometry/shape/polygon/index.js +0 -65
- package/esm/geometry/shape/polygon/index.js.map +0 -1
- package/esm/geometry/shape/polygon/square.d.ts +0 -1
- package/esm/geometry/shape/polygon/square.js +0 -44
- package/esm/geometry/shape/polygon/square.js.map +0 -1
- package/esm/geometry/shape/schema/box.d.ts +0 -1
- package/esm/geometry/shape/schema/box.js +0 -142
- package/esm/geometry/shape/schema/box.js.map +0 -1
- package/esm/geometry/shape/schema/candle.d.ts +0 -1
- package/esm/geometry/shape/schema/candle.js +0 -80
- package/esm/geometry/shape/schema/candle.js.map +0 -1
- package/esm/geometry/shape/schema/index.d.ts +0 -2
- package/esm/geometry/shape/schema/index.js +0 -6
- package/esm/geometry/shape/schema/index.js.map +0 -1
- package/esm/geometry/shape/util/get-path-points.d.ts +0 -38
- package/esm/geometry/shape/util/get-path-points.js +0 -131
- package/esm/geometry/shape/util/get-path-points.js.map +0 -1
- package/esm/geometry/shape/util/get-style.d.ts +0 -18
- package/esm/geometry/shape/util/get-style.js +0 -47
- package/esm/geometry/shape/util/get-style.js.map +0 -1
- package/esm/geometry/shape/util/path.d.ts +0 -32
- package/esm/geometry/shape/util/path.js +0 -313
- package/esm/geometry/shape/util/path.js.map +0 -1
- package/esm/geometry/shape/util/split-points.d.ts +0 -13
- package/esm/geometry/shape/util/split-points.js +0 -24
- package/esm/geometry/shape/util/split-points.js.map +0 -1
- package/esm/geometry/shape/violin/hollow.d.ts +0 -1
- package/esm/geometry/shape/violin/hollow.js +0 -51
- package/esm/geometry/shape/violin/hollow.js.map +0 -1
- package/esm/geometry/shape/violin/index.d.ts +0 -2
- package/esm/geometry/shape/violin/index.js +0 -60
- package/esm/geometry/shape/violin/index.js.map +0 -1
- package/esm/geometry/shape/violin/smooth.d.ts +0 -1
- package/esm/geometry/shape/violin/smooth.js +0 -28
- package/esm/geometry/shape/violin/smooth.js.map +0 -1
- package/esm/geometry/util/diff.d.ts +0 -11
- package/esm/geometry/util/diff.js +0 -30
- package/esm/geometry/util/diff.js.map +0 -1
- package/esm/geometry/util/get-shape-type.d.ts +0 -8
- package/esm/geometry/util/get-shape-type.js +0 -16
- package/esm/geometry/util/get-shape-type.js.map +0 -1
- package/esm/geometry/util/group-data.d.ts +0 -3
- package/esm/geometry/util/group-data.js +0 -42
- package/esm/geometry/util/group-data.js.map +0 -1
- package/esm/geometry/util/is-model-change.d.ts +0 -9
- package/esm/geometry/util/is-model-change.js +0 -14
- package/esm/geometry/util/is-model-change.js.map +0 -1
- package/esm/geometry/util/parse-fields.d.ts +0 -2
- package/esm/geometry/util/parse-fields.js +0 -9
- package/esm/geometry/util/parse-fields.js.map +0 -1
- package/esm/geometry/util/shape-size.d.ts +0 -2
- package/esm/geometry/util/shape-size.js +0 -124
- package/esm/geometry/util/shape-size.js.map +0 -1
- package/esm/geometry/violin.d.ts +0 -25
- package/esm/geometry/violin.js +0 -67
- package/esm/geometry/violin.js.map +0 -1
- package/esm/interaction/action/active-region.d.ts +0 -33
- package/esm/interaction/action/active-region.js +0 -226
- package/esm/interaction/action/active-region.js.map +0 -1
- package/esm/interaction/action/base.d.ts +0 -29
- package/esm/interaction/action/base.js +0 -36
- package/esm/interaction/action/base.js.map +0 -1
- package/esm/interaction/action/callback.d.ts +0 -17
- package/esm/interaction/action/callback.js +0 -27
- package/esm/interaction/action/callback.js.map +0 -1
- package/esm/interaction/action/component/axis/axis-description.d.ts +0 -9
- package/esm/interaction/action/component/axis/axis-description.js +0 -73
- package/esm/interaction/action/component/axis/axis-description.js.map +0 -1
- package/esm/interaction/action/component/list-active.d.ts +0 -14
- package/esm/interaction/action/component/list-active.js +0 -24
- package/esm/interaction/action/component/list-active.js.map +0 -1
- package/esm/interaction/action/component/list-checked.d.ts +0 -30
- package/esm/interaction/action/component/list-checked.js +0 -82
- package/esm/interaction/action/component/list-checked.js.map +0 -1
- package/esm/interaction/action/component/list-focus.d.ts +0 -5
- package/esm/interaction/action/component/list-focus.js +0 -92
- package/esm/interaction/action/component/list-focus.js.map +0 -1
- package/esm/interaction/action/component/list-highlight-util.d.ts +0 -7
- package/esm/interaction/action/component/list-highlight-util.js +0 -20
- package/esm/interaction/action/component/list-highlight-util.js.map +0 -1
- package/esm/interaction/action/component/list-highlight.d.ts +0 -20
- package/esm/interaction/action/component/list-highlight.js +0 -97
- package/esm/interaction/action/component/list-highlight.js.map +0 -1
- package/esm/interaction/action/component/list-radio.d.ts +0 -24
- package/esm/interaction/action/component/list-radio.js +0 -116
- package/esm/interaction/action/component/list-radio.js.map +0 -1
- package/esm/interaction/action/component/list-selected.d.ts +0 -10
- package/esm/interaction/action/component/list-selected.js +0 -20
- package/esm/interaction/action/component/list-selected.js.map +0 -1
- package/esm/interaction/action/component/list-state.d.ts +0 -46
- package/esm/interaction/action/component/list-state.js +0 -167
- package/esm/interaction/action/component/list-state.js.map +0 -1
- package/esm/interaction/action/component/list-unchecked.d.ts +0 -13
- package/esm/interaction/action/component/list-unchecked.js +0 -23
- package/esm/interaction/action/component/list-unchecked.js.map +0 -1
- package/esm/interaction/action/component/tooltip/ellipsis-text.d.ts +0 -25
- package/esm/interaction/action/component/tooltip/ellipsis-text.js +0 -93
- package/esm/interaction/action/component/tooltip/ellipsis-text.js.map +0 -1
- package/esm/interaction/action/component/tooltip/geometry.d.ts +0 -24
- package/esm/interaction/action/component/tooltip/geometry.js +0 -71
- package/esm/interaction/action/component/tooltip/geometry.js.map +0 -1
- package/esm/interaction/action/component/tooltip/sibling.d.ts +0 -21
- package/esm/interaction/action/component/tooltip/sibling.js +0 -39
- package/esm/interaction/action/component/tooltip/sibling.js.map +0 -1
- package/esm/interaction/action/cursor.d.ts +0 -77
- package/esm/interaction/action/cursor.js +0 -125
- package/esm/interaction/action/cursor.js.map +0 -1
- package/esm/interaction/action/data/filter.d.ts +0 -13
- package/esm/interaction/action/data/filter.js +0 -66
- package/esm/interaction/action/data/filter.js.map +0 -1
- package/esm/interaction/action/data/range-filter.d.ts +0 -56
- package/esm/interaction/action/data/range-filter.js +0 -163
- package/esm/interaction/action/data/range-filter.js.map +0 -1
- package/esm/interaction/action/data/sibling-filter.d.ts +0 -22
- package/esm/interaction/action/data/sibling-filter.js +0 -39
- package/esm/interaction/action/data/sibling-filter.js.map +0 -1
- package/esm/interaction/action/element/active.d.ts +0 -14
- package/esm/interaction/action/element/active.js +0 -24
- package/esm/interaction/action/element/active.js.map +0 -1
- package/esm/interaction/action/element/filter.d.ts +0 -20
- package/esm/interaction/action/element/filter.js +0 -89
- package/esm/interaction/action/element/filter.js.map +0 -1
- package/esm/interaction/action/element/highlight-by-color.d.ts +0 -10
- package/esm/interaction/action/element/highlight-by-color.js +0 -30
- package/esm/interaction/action/element/highlight-by-color.js.map +0 -1
- package/esm/interaction/action/element/highlight-by-x.d.ts +0 -15
- package/esm/interaction/action/element/highlight-by-x.js +0 -51
- package/esm/interaction/action/element/highlight-by-x.js.map +0 -1
- package/esm/interaction/action/element/highlight-util.d.ts +0 -18
- package/esm/interaction/action/element/highlight-util.js +0 -45
- package/esm/interaction/action/element/highlight-util.js.map +0 -1
- package/esm/interaction/action/element/highlight.d.ts +0 -21
- package/esm/interaction/action/element/highlight.js +0 -93
- package/esm/interaction/action/element/highlight.js.map +0 -1
- package/esm/interaction/action/element/link-by-color.d.ts +0 -51
- package/esm/interaction/action/element/link-by-color.js +0 -156
- package/esm/interaction/action/element/link-by-color.js.map +0 -1
- package/esm/interaction/action/element/range-active.d.ts +0 -13
- package/esm/interaction/action/element/range-active.js +0 -23
- package/esm/interaction/action/element/range-active.js.map +0 -1
- package/esm/interaction/action/element/range-highlight.d.ts +0 -27
- package/esm/interaction/action/element/range-highlight.js +0 -54
- package/esm/interaction/action/element/range-highlight.js.map +0 -1
- package/esm/interaction/action/element/range-selected.d.ts +0 -13
- package/esm/interaction/action/element/range-selected.js +0 -23
- package/esm/interaction/action/element/range-selected.js.map +0 -1
- package/esm/interaction/action/element/range-state.d.ts +0 -38
- package/esm/interaction/action/element/range-state.js +0 -164
- package/esm/interaction/action/element/range-state.js.map +0 -1
- package/esm/interaction/action/element/selected.d.ts +0 -14
- package/esm/interaction/action/element/selected.js +0 -24
- package/esm/interaction/action/element/selected.js.map +0 -1
- package/esm/interaction/action/element/sibling-filter.d.ts +0 -19
- package/esm/interaction/action/element/sibling-filter.js +0 -93
- package/esm/interaction/action/element/sibling-filter.js.map +0 -1
- package/esm/interaction/action/element/single-active.d.ts +0 -13
- package/esm/interaction/action/element/single-active.js +0 -23
- package/esm/interaction/action/element/single-active.js.map +0 -1
- package/esm/interaction/action/element/single-highlight.d.ts +0 -16
- package/esm/interaction/action/element/single-highlight.js +0 -35
- package/esm/interaction/action/element/single-highlight.js.map +0 -1
- package/esm/interaction/action/element/single-selected.d.ts +0 -13
- package/esm/interaction/action/element/single-selected.js +0 -23
- package/esm/interaction/action/element/single-selected.js.map +0 -1
- package/esm/interaction/action/element/single-state.d.ts +0 -18
- package/esm/interaction/action/element/single-state.js +0 -53
- package/esm/interaction/action/element/single-state.js.map +0 -1
- package/esm/interaction/action/element/state-base.d.ts +0 -39
- package/esm/interaction/action/element/state-base.js +0 -59
- package/esm/interaction/action/element/state-base.js.map +0 -1
- package/esm/interaction/action/element/state.d.ts +0 -28
- package/esm/interaction/action/element/state.js +0 -99
- package/esm/interaction/action/element/state.js.map +0 -1
- package/esm/interaction/action/mask/base.d.ts +0 -62
- package/esm/interaction/action/mask/base.js +0 -169
- package/esm/interaction/action/mask/base.js.map +0 -1
- package/esm/interaction/action/mask/circle.d.ts +0 -14
- package/esm/interaction/action/mask/circle.js +0 -37
- package/esm/interaction/action/mask/circle.js.map +0 -1
- package/esm/interaction/action/mask/dim-rect.d.ts +0 -11
- package/esm/interaction/action/mask/dim-rect.js +0 -62
- package/esm/interaction/action/mask/dim-rect.js.map +0 -1
- package/esm/interaction/action/mask/path.d.ts +0 -16
- package/esm/interaction/action/mask/path.js +0 -44
- package/esm/interaction/action/mask/path.js.map +0 -1
- package/esm/interaction/action/mask/rect.d.ts +0 -17
- package/esm/interaction/action/mask/rect.js +0 -39
- package/esm/interaction/action/mask/rect.js.map +0 -1
- package/esm/interaction/action/mask/smooth-path.d.ts +0 -9
- package/esm/interaction/action/mask/smooth-path.js +0 -21
- package/esm/interaction/action/mask/smooth-path.js.map +0 -1
- package/esm/interaction/action/register.d.ts +0 -36
- package/esm/interaction/action/register.js +0 -60
- package/esm/interaction/action/register.js.map +0 -1
- package/esm/interaction/action/util.d.ts +0 -140
- package/esm/interaction/action/util.js +0 -361
- package/esm/interaction/action/util.js.map +0 -1
- package/esm/interaction/action/view/button.d.ts +0 -25
- package/esm/interaction/action/view/button.js +0 -116
- package/esm/interaction/action/view/button.js.map +0 -1
- package/esm/interaction/action/view/drag.d.ts +0 -24
- package/esm/interaction/action/view/drag.js +0 -73
- package/esm/interaction/action/view/drag.js.map +0 -1
- package/esm/interaction/action/view/mousewheel-scroll.d.ts +0 -5
- package/esm/interaction/action/view/mousewheel-scroll.js +0 -35
- package/esm/interaction/action/view/mousewheel-scroll.js.map +0 -1
- package/esm/interaction/action/view/move.d.ts +0 -28
- package/esm/interaction/action/view/move.js +0 -80
- package/esm/interaction/action/view/move.js.map +0 -1
- package/esm/interaction/action/view/scale-transform.d.ts +0 -18
- package/esm/interaction/action/view/scale-transform.js +0 -51
- package/esm/interaction/action/view/scale-transform.js.map +0 -1
- package/esm/interaction/action/view/scale-translate.d.ts +0 -30
- package/esm/interaction/action/view/scale-translate.js +0 -112
- package/esm/interaction/action/view/scale-translate.js.map +0 -1
- package/esm/interaction/action/view/scale-zoom.d.ts +0 -20
- package/esm/interaction/action/view/scale-zoom.js +0 -83
- package/esm/interaction/action/view/scale-zoom.js.map +0 -1
- package/esm/interaction/context.d.ts +0 -65
- package/esm/interaction/context.js +0 -142
- package/esm/interaction/context.js.map +0 -1
- package/esm/interaction/grammar-interaction.d.ts +0 -158
- package/esm/interaction/grammar-interaction.js +0 -285
- package/esm/interaction/grammar-interaction.js.map +0 -1
- package/esm/interaction/interaction.d.ts +0 -29
- package/esm/interaction/interaction.js +0 -32
- package/esm/interaction/interaction.js.map +0 -1
- package/esm/interface.d.ts +0 -3686
- package/esm/interface.js +0 -2
- package/esm/interface.js.map +0 -1
- package/esm/theme/style-sheet/dark.d.ts +0 -545
- package/esm/theme/style-sheet/dark.js +0 -500
- package/esm/theme/style-sheet/dark.js.map +0 -1
- package/esm/theme/style-sheet/light.d.ts +0 -541
- package/esm/theme/style-sheet/light.js +0 -496
- package/esm/theme/style-sheet/light.js.map +0 -1
- package/esm/theme/util/create-by-style-sheet.d.ts +0 -6
- package/esm/theme/util/create-by-style-sheet.js +0 -1425
- package/esm/theme/util/create-by-style-sheet.js.map +0 -1
- package/esm/theme/util/create-theme.d.ts +0 -6
- package/esm/theme/util/create-theme.js +0 -12
- package/esm/theme/util/create-theme.js.map +0 -1
- package/esm/theme/util/index.d.ts +0 -1
- package/esm/theme/util/index.js +0 -2
- package/esm/theme/util/index.js.map +0 -1
- package/esm/util/annotation.d.ts +0 -7
- package/esm/util/annotation.js +0 -39
- package/esm/util/annotation.js.map +0 -1
- package/esm/util/attr.d.ts +0 -10
- package/esm/util/attr.js +0 -25
- package/esm/util/attr.js.map +0 -1
- package/esm/util/axis.d.ts +0 -100
- package/esm/util/axis.js +0 -236
- package/esm/util/axis.js.map +0 -1
- package/esm/util/bbox.d.ts +0 -105
- package/esm/util/bbox.js +0 -283
- package/esm/util/bbox.js.map +0 -1
- package/esm/util/collision-detect.d.ts +0 -20
- package/esm/util/collision-detect.js +0 -129
- package/esm/util/collision-detect.js.map +0 -1
- package/esm/util/color.d.ts +0 -1
- package/esm/util/color.js +0 -19
- package/esm/util/color.js.map +0 -1
- package/esm/util/context.d.ts +0 -4
- package/esm/util/context.js +0 -11
- package/esm/util/context.js.map +0 -1
- package/esm/util/coordinate.d.ts +0 -86
- package/esm/util/coordinate.js +0 -147
- package/esm/util/coordinate.js.map +0 -1
- package/esm/util/direction.d.ts +0 -19
- package/esm/util/direction.js +0 -120
- package/esm/util/direction.js.map +0 -1
- package/esm/util/dom.d.ts +0 -19
- package/esm/util/dom.js +0 -61
- package/esm/util/dom.js.map +0 -1
- package/esm/util/event.d.ts +0 -8
- package/esm/util/event.js +0 -14
- package/esm/util/event.js.map +0 -1
- package/esm/util/facet.d.ts +0 -16
- package/esm/util/facet.js +0 -43
- package/esm/util/facet.js.map +0 -1
- package/esm/util/graphics.d.ts +0 -58
- package/esm/util/graphics.js +0 -203
- package/esm/util/graphics.js.map +0 -1
- package/esm/util/grid.d.ts +0 -36
- package/esm/util/grid.js +0 -118
- package/esm/util/grid.js.map +0 -1
- package/esm/util/helper.d.ts +0 -34
- package/esm/util/helper.js +0 -83
- package/esm/util/helper.js.map +0 -1
- package/esm/util/legend.d.ts +0 -45
- package/esm/util/legend.js +0 -145
- package/esm/util/legend.js.map +0 -1
- package/esm/util/marker.d.ts +0 -10
- package/esm/util/marker.js +0 -58
- package/esm/util/marker.js.map +0 -1
- package/esm/util/padding.d.ts +0 -14
- package/esm/util/padding.js +0 -40
- package/esm/util/padding.js.map +0 -1
- package/esm/util/scale.d.ts +0 -42
- package/esm/util/scale.js +0 -129
- package/esm/util/scale.js.map +0 -1
- package/esm/util/stat.d.ts +0 -10
- package/esm/util/stat.js +0 -36
- package/esm/util/stat.js.map +0 -1
- package/esm/util/text.d.ts +0 -23
- package/esm/util/text.js +0 -84
- package/esm/util/text.js.map +0 -1
- package/esm/util/tooltip.d.ts +0 -26
- package/esm/util/tooltip.js +0 -469
- package/esm/util/tooltip.js.map +0 -1
- package/esm/util/transform.d.ts +0 -33
- package/esm/util/transform.js +0 -61
- package/esm/util/transform.js.map +0 -1
- package/esm/util/types.d.ts +0 -6
- package/esm/util/types.js.map +0 -1
- package/lib/animate/animation/fade.d.ts +0 -21
- package/lib/animate/animation/fade.js +0 -47
- package/lib/animate/animation/fade.js.map +0 -1
- package/lib/animate/animation/grow-in.d.ts +0 -30
- package/lib/animate/animation/grow-in.js +0 -44
- package/lib/animate/animation/grow-in.js.map +0 -1
- package/lib/animate/animation/index.d.ts +0 -16
- package/lib/animate/animation/index.js +0 -22
- package/lib/animate/animation/index.js.map +0 -1
- package/lib/animate/animation/path-in.d.ts +0 -12
- package/lib/animate/animation/path-in.js +0 -25
- package/lib/animate/animation/path-in.js.map +0 -1
- package/lib/animate/animation/position-update.d.ts +0 -11
- package/lib/animate/animation/position-update.js +0 -28
- package/lib/animate/animation/position-update.js.map +0 -1
- package/lib/animate/animation/scale-in.d.ts +0 -19
- package/lib/animate/animation/scale-in.js +0 -65
- package/lib/animate/animation/scale-in.js.map +0 -1
- package/lib/animate/animation/sector-path-update.d.ts +0 -27
- package/lib/animate/animation/sector-path-update.js +0 -137
- package/lib/animate/animation/sector-path-update.js.map +0 -1
- package/lib/animate/animation/util.d.ts +0 -19
- package/lib/animate/animation/util.js +0 -94
- package/lib/animate/animation/util.js.map +0 -1
- package/lib/animate/animation/wave-in.d.ts +0 -13
- package/lib/animate/animation/wave-in.js +0 -34
- package/lib/animate/animation/wave-in.js.map +0 -1
- package/lib/animate/animation/zoom.d.ts +0 -21
- package/lib/animate/animation/zoom.js +0 -71
- package/lib/animate/animation/zoom.js.map +0 -1
- package/lib/animate/index.d.ts +0 -48
- package/lib/animate/index.js +0 -255
- package/lib/animate/index.js.map +0 -1
- package/lib/animate/interface.d.ts +0 -18
- package/lib/animate/interface.js +0 -3
- package/lib/animate/interface.js.map +0 -1
- package/lib/api.d.ts +0 -2
- package/lib/api.js +0 -7
- package/lib/api.js.map +0 -1
- package/lib/base.d.ts +0 -33
- package/lib/base.js +0 -57
- package/lib/base.js.map +0 -1
- package/lib/chart/chart.d.ts +0 -61
- package/lib/chart/chart.js +0 -159
- package/lib/chart/chart.js.map +0 -1
- package/lib/chart/controller/annotation.d.ts +0 -162
- package/lib/chart/controller/annotation.js +0 -594
- package/lib/chart/controller/annotation.js.map +0 -1
- package/lib/chart/controller/axis.d.ts +0 -93
- package/lib/chart/controller/axis.js +0 -580
- package/lib/chart/controller/axis.js.map +0 -1
- package/lib/chart/controller/base.d.ts +0 -64
- package/lib/chart/controller/base.js +0 -65
- package/lib/chart/controller/base.js.map +0 -1
- package/lib/chart/controller/coordinate.d.ts +0 -74
- package/lib/chart/controller/coordinate.js +0 -147
- package/lib/chart/controller/coordinate.js.map +0 -1
- package/lib/chart/controller/gesture.d.ts +0 -37
- package/lib/chart/controller/gesture.js +0 -260
- package/lib/chart/controller/gesture.js.map +0 -1
- package/lib/chart/controller/index.d.ts +0 -25
- package/lib/chart/controller/index.js +0 -41
- package/lib/chart/controller/index.js.map +0 -1
- package/lib/chart/controller/legend.d.ts +0 -106
- package/lib/chart/controller/legend.js +0 -486
- package/lib/chart/controller/legend.js.map +0 -1
- package/lib/chart/controller/scrollbar.d.ts +0 -64
- package/lib/chart/controller/scrollbar.js +0 -318
- package/lib/chart/controller/scrollbar.js.map +0 -1
- package/lib/chart/controller/slider.d.ts +0 -88
- package/lib/chart/controller/slider.js +0 -298
- package/lib/chart/controller/slider.js.map +0 -1
- package/lib/chart/controller/tooltip.d.ts +0 -68
- package/lib/chart/controller/tooltip.js +0 -698
- package/lib/chart/controller/tooltip.js.map +0 -1
- package/lib/chart/event.d.ts +0 -47
- package/lib/chart/event.js +0 -93
- package/lib/chart/event.js.map +0 -1
- package/lib/chart/index.d.ts +0 -4
- package/lib/chart/index.js +0 -16
- package/lib/chart/index.js.map +0 -1
- package/lib/chart/layout/auto.d.ts +0 -8
- package/lib/chart/layout/auto.js +0 -68
- package/lib/chart/layout/auto.js.map +0 -1
- package/lib/chart/layout/constraint/bounds.d.ts +0 -32
- package/lib/chart/layout/constraint/bounds.js +0 -33
- package/lib/chart/layout/constraint/bounds.js.map +0 -1
- package/lib/chart/layout/constraint/constraint.d.ts +0 -31
- package/lib/chart/layout/constraint/constraint.js +0 -85
- package/lib/chart/layout/constraint/constraint.js.map +0 -1
- package/lib/chart/layout/constraint/gauss.d.ts +0 -11
- package/lib/chart/layout/constraint/gauss.js +0 -68
- package/lib/chart/layout/constraint/gauss.js.map +0 -1
- package/lib/chart/layout/constraint/index.d.ts +0 -5
- package/lib/chart/layout/constraint/index.js +0 -38
- package/lib/chart/layout/constraint/index.js.map +0 -1
- package/lib/chart/layout/constraint/solver.d.ts +0 -40
- package/lib/chart/layout/constraint/solver.js +0 -81
- package/lib/chart/layout/constraint/solver.js.map +0 -1
- package/lib/chart/layout/constraint/types.d.ts +0 -21
- package/lib/chart/layout/constraint/types.js +0 -16
- package/lib/chart/layout/constraint/types.js.map +0 -1
- package/lib/chart/layout/constraint/variable.d.ts +0 -24
- package/lib/chart/layout/constraint/variable.js +0 -31
- package/lib/chart/layout/constraint/variable.js.map +0 -1
- package/lib/chart/layout/index.d.ts +0 -15
- package/lib/chart/layout/index.js +0 -29
- package/lib/chart/layout/index.js.map +0 -1
- package/lib/chart/layout/padding-cal.d.ts +0 -53
- package/lib/chart/layout/padding-cal.js +0 -111
- package/lib/chart/layout/padding-cal.js.map +0 -1
- package/lib/chart/util/scale-pool.d.ts +0 -57
- package/lib/chart/util/scale-pool.js +0 -215
- package/lib/chart/util/scale-pool.js.map +0 -1
- package/lib/chart/util/sync-view-padding.d.ts +0 -9
- package/lib/chart/util/sync-view-padding.js +0 -18
- package/lib/chart/util/sync-view-padding.js.map +0 -1
- package/lib/chart/view.d.ts +0 -747
- package/lib/chart/view.js +0 -1640
- package/lib/chart/view.js.map +0 -1
- package/lib/component/labels.d.ts +0 -46
- package/lib/component/labels.js +0 -308
- package/lib/component/labels.js.map +0 -1
- package/lib/component/update-label.d.ts +0 -21
- package/lib/component/update-label.js +0 -61
- package/lib/component/update-label.js.map +0 -1
- package/lib/constant.d.ts +0 -124
- package/lib/constant.js +0 -139
- package/lib/constant.js.map +0 -1
- package/lib/core.d.ts +0 -46
- package/lib/core.js +0 -101
- package/lib/core.js.map +0 -1
- package/lib/dependents.d.ts +0 -21
- package/lib/dependents.js +0 -55
- package/lib/dependents.js.map +0 -1
- package/lib/engine/index.d.ts +0 -13
- package/lib/engine/index.js +0 -27
- package/lib/engine/index.js.map +0 -1
- package/lib/facet/circle.d.ts +0 -36
- package/lib/facet/circle.js +0 -121
- package/lib/facet/circle.js.map +0 -1
- package/lib/facet/facet.d.ts +0 -165
- package/lib/facet/facet.js +0 -295
- package/lib/facet/facet.js.map +0 -1
- package/lib/facet/index.d.ts +0 -13
- package/lib/facet/index.js +0 -28
- package/lib/facet/index.js.map +0 -1
- package/lib/facet/list.d.ts +0 -46
- package/lib/facet/list.js +0 -136
- package/lib/facet/list.js.map +0 -1
- package/lib/facet/matrix.d.ts +0 -34
- package/lib/facet/matrix.js +0 -121
- package/lib/facet/matrix.js.map +0 -1
- package/lib/facet/mirror.d.ts +0 -31
- package/lib/facet/mirror.js +0 -146
- package/lib/facet/mirror.js.map +0 -1
- package/lib/facet/rect.d.ts +0 -35
- package/lib/facet/rect.js +0 -143
- package/lib/facet/rect.js.map +0 -1
- package/lib/facet/tree.d.ts +0 -40
- package/lib/facet/tree.js +0 -300
- package/lib/facet/tree.js.map +0 -1
- package/lib/geometry/area.d.ts +0 -46
- package/lib/geometry/area.js +0 -64
- package/lib/geometry/area.js.map +0 -1
- package/lib/geometry/base.d.ts +0 -796
- package/lib/geometry/base.js +0 -1558
- package/lib/geometry/base.js.map +0 -1
- package/lib/geometry/edge.d.ts +0 -15
- package/lib/geometry/edge.js +0 -26
- package/lib/geometry/edge.js.map +0 -1
- package/lib/geometry/element/index.d.ts +0 -127
- package/lib/geometry/element/index.js +0 -440
- package/lib/geometry/element/index.js.map +0 -1
- package/lib/geometry/heatmap.d.ts +0 -31
- package/lib/geometry/heatmap.js +0 -202
- package/lib/geometry/heatmap.js.map +0 -1
- package/lib/geometry/interval.d.ts +0 -41
- package/lib/geometry/interval.js +0 -100
- package/lib/geometry/interval.js.map +0 -1
- package/lib/geometry/label/base.d.ts +0 -76
- package/lib/geometry/label/base.js +0 -418
- package/lib/geometry/label/base.js.map +0 -1
- package/lib/geometry/label/index.d.ts +0 -38
- package/lib/geometry/label/index.js +0 -42
- package/lib/geometry/label/index.js.map +0 -1
- package/lib/geometry/label/interface.d.ts +0 -66
- package/lib/geometry/label/interface.js +0 -3
- package/lib/geometry/label/interface.js.map +0 -1
- package/lib/geometry/label/interval.d.ts +0 -27
- package/lib/geometry/label/interval.js +0 -148
- package/lib/geometry/label/interval.js.map +0 -1
- package/lib/geometry/label/layout/adjust-color.d.ts +0 -3
- package/lib/geometry/label/layout/adjust-color.js +0 -40
- package/lib/geometry/label/layout/adjust-color.js.map +0 -1
- package/lib/geometry/label/layout/hide-overlap.d.ts +0 -8
- package/lib/geometry/label/layout/hide-overlap.js +0 -79
- package/lib/geometry/label/layout/hide-overlap.js.map +0 -1
- package/lib/geometry/label/layout/interval/adjust-position.d.ts +0 -9
- package/lib/geometry/label/layout/interval/adjust-position.js +0 -65
- package/lib/geometry/label/layout/interval/adjust-position.js.map +0 -1
- package/lib/geometry/label/layout/interval/hide-overlap.d.ts +0 -9
- package/lib/geometry/label/layout/interval/hide-overlap.js +0 -83
- package/lib/geometry/label/layout/interval/hide-overlap.js.map +0 -1
- package/lib/geometry/label/layout/limit-in-canvas.d.ts +0 -9
- package/lib/geometry/label/layout/limit-in-canvas.js +0 -48
- package/lib/geometry/label/layout/limit-in-canvas.js.map +0 -1
- package/lib/geometry/label/layout/limit-in-plot.d.ts +0 -18
- package/lib/geometry/label/layout/limit-in-plot.js +0 -79
- package/lib/geometry/label/layout/limit-in-plot.js.map +0 -1
- package/lib/geometry/label/layout/limit-in-shape.d.ts +0 -7
- package/lib/geometry/label/layout/limit-in-shape.js +0 -22
- package/lib/geometry/label/layout/limit-in-shape.js.map +0 -1
- package/lib/geometry/label/layout/overlap.d.ts +0 -15
- package/lib/geometry/label/layout/overlap.js +0 -228
- package/lib/geometry/label/layout/overlap.js.map +0 -1
- package/lib/geometry/label/layout/path/adjust-position.d.ts +0 -17
- package/lib/geometry/label/layout/path/adjust-position.js +0 -99
- package/lib/geometry/label/layout/path/adjust-position.js.map +0 -1
- package/lib/geometry/label/layout/pie/distribute.d.ts +0 -3
- package/lib/geometry/label/layout/pie/distribute.js +0 -200
- package/lib/geometry/label/layout/pie/distribute.js.map +0 -1
- package/lib/geometry/label/layout/pie/outer.d.ts +0 -6
- package/lib/geometry/label/layout/pie/outer.js +0 -222
- package/lib/geometry/label/layout/pie/outer.js.map +0 -1
- package/lib/geometry/label/layout/pie/spider.d.ts +0 -7
- package/lib/geometry/label/layout/pie/spider.js +0 -197
- package/lib/geometry/label/layout/pie/spider.js.map +0 -1
- package/lib/geometry/label/layout/pie/util.d.ts +0 -10
- package/lib/geometry/label/layout/pie/util.js +0 -77
- package/lib/geometry/label/layout/pie/util.js.map +0 -1
- package/lib/geometry/label/layout/point/adjust-position.d.ts +0 -17
- package/lib/geometry/label/layout/point/adjust-position.js +0 -99
- package/lib/geometry/label/layout/point/adjust-position.js.map +0 -1
- package/lib/geometry/label/layout/worker/hide-overlap.d.ts +0 -2
- package/lib/geometry/label/layout/worker/hide-overlap.js +0 -158
- package/lib/geometry/label/layout/worker/hide-overlap.js.map +0 -1
- package/lib/geometry/label/pie.d.ts +0 -22
- package/lib/geometry/label/pie.js +0 -97
- package/lib/geometry/label/pie.js.map +0 -1
- package/lib/geometry/label/polar.d.ts +0 -64
- package/lib/geometry/label/polar.js +0 -223
- package/lib/geometry/label/polar.js.map +0 -1
- package/lib/geometry/label/util/createWorker.d.ts +0 -1
- package/lib/geometry/label/util/createWorker.js +0 -20
- package/lib/geometry/label/util/createWorker.js.map +0 -1
- package/lib/geometry/label/util/index.d.ts +0 -28
- package/lib/geometry/label/util/index.js +0 -69
- package/lib/geometry/label/util/index.js.map +0 -1
- package/lib/geometry/line.d.ts +0 -11
- package/lib/geometry/line.js +0 -23
- package/lib/geometry/line.js.map +0 -1
- package/lib/geometry/path.d.ts +0 -40
- package/lib/geometry/path.js +0 -152
- package/lib/geometry/path.js.map +0 -1
- package/lib/geometry/point.d.ts +0 -19
- package/lib/geometry/point.js +0 -32
- package/lib/geometry/point.js.map +0 -1
- package/lib/geometry/polygon.d.ts +0 -19
- package/lib/geometry/polygon.js +0 -64
- package/lib/geometry/polygon.js.map +0 -1
- package/lib/geometry/schema.d.ts +0 -18
- package/lib/geometry/schema.js +0 -50
- package/lib/geometry/schema.js.map +0 -1
- package/lib/geometry/shape/area/index.d.ts +0 -2
- package/lib/geometry/shape/area/index.js +0 -47
- package/lib/geometry/shape/area/index.js.map +0 -1
- package/lib/geometry/shape/area/line.d.ts +0 -1
- package/lib/geometry/shape/area/line.js +0 -33
- package/lib/geometry/shape/area/line.js.map +0 -1
- package/lib/geometry/shape/area/smooth-line.d.ts +0 -1
- package/lib/geometry/shape/area/smooth-line.js +0 -32
- package/lib/geometry/shape/area/smooth-line.js.map +0 -1
- package/lib/geometry/shape/area/smooth.d.ts +0 -1
- package/lib/geometry/shape/area/smooth.js +0 -34
- package/lib/geometry/shape/area/smooth.js.map +0 -1
- package/lib/geometry/shape/area/util.d.ts +0 -22
- package/lib/geometry/shape/area/util.js +0 -93
- package/lib/geometry/shape/area/util.js.map +0 -1
- package/lib/geometry/shape/base.d.ts +0 -22
- package/lib/geometry/shape/base.js +0 -168
- package/lib/geometry/shape/base.js.map +0 -1
- package/lib/geometry/shape/constant.d.ts +0 -4
- package/lib/geometry/shape/constant.js +0 -8
- package/lib/geometry/shape/constant.js.map +0 -1
- package/lib/geometry/shape/edge/arc.d.ts +0 -1
- package/lib/geometry/shape/edge/arc.js +0 -86
- package/lib/geometry/shape/edge/arc.js.map +0 -1
- package/lib/geometry/shape/edge/index.d.ts +0 -2
- package/lib/geometry/shape/edge/index.js +0 -33
- package/lib/geometry/shape/edge/index.js.map +0 -1
- package/lib/geometry/shape/edge/smooth.d.ts +0 -1
- package/lib/geometry/shape/edge/smooth.js +0 -32
- package/lib/geometry/shape/edge/smooth.js.map +0 -1
- package/lib/geometry/shape/edge/util.d.ts +0 -17
- package/lib/geometry/shape/edge/util.js +0 -37
- package/lib/geometry/shape/edge/util.js.map +0 -1
- package/lib/geometry/shape/edge/vhv.d.ts +0 -1
- package/lib/geometry/shape/edge/vhv.js +0 -44
- package/lib/geometry/shape/edge/vhv.js.map +0 -1
- package/lib/geometry/shape/interval/funnel.d.ts +0 -1
- package/lib/geometry/shape/interval/funnel.js +0 -33
- package/lib/geometry/shape/interval/funnel.js.map +0 -1
- package/lib/geometry/shape/interval/hollow-rect.d.ts +0 -1
- package/lib/geometry/shape/interval/hollow-rect.js +0 -53
- package/lib/geometry/shape/interval/hollow-rect.js.map +0 -1
- package/lib/geometry/shape/interval/index.d.ts +0 -3
- package/lib/geometry/shape/interval/index.js +0 -67
- package/lib/geometry/shape/interval/index.js.map +0 -1
- package/lib/geometry/shape/interval/line.d.ts +0 -1
- package/lib/geometry/shape/interval/line.js +0 -56
- package/lib/geometry/shape/interval/line.js.map +0 -1
- package/lib/geometry/shape/interval/pyramid.d.ts +0 -1
- package/lib/geometry/shape/interval/pyramid.js +0 -33
- package/lib/geometry/shape/interval/pyramid.js.map +0 -1
- package/lib/geometry/shape/interval/tick.d.ts +0 -1
- package/lib/geometry/shape/interval/tick.js +0 -80
- package/lib/geometry/shape/interval/tick.js.map +0 -1
- package/lib/geometry/shape/interval/util.d.ts +0 -55
- package/lib/geometry/shape/interval/util.js +0 -328
- package/lib/geometry/shape/interval/util.js.map +0 -1
- package/lib/geometry/shape/line/index.d.ts +0 -8
- package/lib/geometry/shape/line/index.js +0 -109
- package/lib/geometry/shape/line/index.js.map +0 -1
- package/lib/geometry/shape/line/step.d.ts +0 -1
- package/lib/geometry/shape/line/step.js +0 -86
- package/lib/geometry/shape/line/step.js.map +0 -1
- package/lib/geometry/shape/line/util.d.ts +0 -16
- package/lib/geometry/shape/line/util.js +0 -87
- package/lib/geometry/shape/line/util.js.map +0 -1
- package/lib/geometry/shape/point/hollow.d.ts +0 -1
- package/lib/geometry/shape/point/hollow.js +0 -26
- package/lib/geometry/shape/point/hollow.js.map +0 -1
- package/lib/geometry/shape/point/image.d.ts +0 -1
- package/lib/geometry/shape/point/image.js +0 -61
- package/lib/geometry/shape/point/image.js.map +0 -1
- package/lib/geometry/shape/point/index.d.ts +0 -2
- package/lib/geometry/shape/point/index.js +0 -34
- package/lib/geometry/shape/point/index.js.map +0 -1
- package/lib/geometry/shape/point/solid.d.ts +0 -1
- package/lib/geometry/shape/point/solid.js +0 -25
- package/lib/geometry/shape/point/solid.js.map +0 -1
- package/lib/geometry/shape/point/util.d.ts +0 -15
- package/lib/geometry/shape/point/util.js +0 -53
- package/lib/geometry/shape/point/util.js.map +0 -1
- package/lib/geometry/shape/polygon/index.d.ts +0 -2
- package/lib/geometry/shape/polygon/index.js +0 -67
- package/lib/geometry/shape/polygon/index.js.map +0 -1
- package/lib/geometry/shape/polygon/square.d.ts +0 -1
- package/lib/geometry/shape/polygon/square.js +0 -46
- package/lib/geometry/shape/polygon/square.js.map +0 -1
- package/lib/geometry/shape/schema/box.d.ts +0 -1
- package/lib/geometry/shape/schema/box.js +0 -144
- package/lib/geometry/shape/schema/box.js.map +0 -1
- package/lib/geometry/shape/schema/candle.d.ts +0 -1
- package/lib/geometry/shape/schema/candle.js +0 -82
- package/lib/geometry/shape/schema/candle.js.map +0 -1
- package/lib/geometry/shape/schema/index.d.ts +0 -2
- package/lib/geometry/shape/schema/index.js +0 -8
- package/lib/geometry/shape/schema/index.js.map +0 -1
- package/lib/geometry/shape/util/get-path-points.d.ts +0 -38
- package/lib/geometry/shape/util/get-path-points.js +0 -137
- package/lib/geometry/shape/util/get-path-points.js.map +0 -1
- package/lib/geometry/shape/util/get-style.d.ts +0 -18
- package/lib/geometry/shape/util/get-style.js +0 -52
- package/lib/geometry/shape/util/get-style.js.map +0 -1
- package/lib/geometry/shape/util/path.d.ts +0 -32
- package/lib/geometry/shape/util/path.js +0 -322
- package/lib/geometry/shape/util/path.js.map +0 -1
- package/lib/geometry/shape/util/split-points.d.ts +0 -13
- package/lib/geometry/shape/util/split-points.js +0 -28
- package/lib/geometry/shape/util/split-points.js.map +0 -1
- package/lib/geometry/shape/violin/hollow.d.ts +0 -1
- package/lib/geometry/shape/violin/hollow.js +0 -53
- package/lib/geometry/shape/violin/hollow.js.map +0 -1
- package/lib/geometry/shape/violin/index.d.ts +0 -2
- package/lib/geometry/shape/violin/index.js +0 -62
- package/lib/geometry/shape/violin/index.js.map +0 -1
- package/lib/geometry/shape/violin/smooth.d.ts +0 -1
- package/lib/geometry/shape/violin/smooth.js +0 -30
- package/lib/geometry/shape/violin/smooth.js.map +0 -1
- package/lib/geometry/util/diff.d.ts +0 -11
- package/lib/geometry/util/diff.js +0 -34
- package/lib/geometry/util/diff.js.map +0 -1
- package/lib/geometry/util/get-shape-type.d.ts +0 -8
- package/lib/geometry/util/get-shape-type.js +0 -20
- package/lib/geometry/util/get-shape-type.js.map +0 -1
- package/lib/geometry/util/group-data.d.ts +0 -3
- package/lib/geometry/util/group-data.js +0 -46
- package/lib/geometry/util/group-data.js.map +0 -1
- package/lib/geometry/util/is-model-change.d.ts +0 -9
- package/lib/geometry/util/is-model-change.js +0 -18
- package/lib/geometry/util/is-model-change.js.map +0 -1
- package/lib/geometry/util/parse-fields.d.ts +0 -2
- package/lib/geometry/util/parse-fields.js +0 -13
- package/lib/geometry/util/parse-fields.js.map +0 -1
- package/lib/geometry/util/shape-size.d.ts +0 -2
- package/lib/geometry/util/shape-size.js +0 -128
- package/lib/geometry/util/shape-size.js.map +0 -1
- package/lib/geometry/violin.d.ts +0 -25
- package/lib/geometry/violin.js +0 -69
- package/lib/geometry/violin.js.map +0 -1
- package/lib/interaction/action/active-region.d.ts +0 -33
- package/lib/interaction/action/active-region.js +0 -230
- package/lib/interaction/action/active-region.js.map +0 -1
- package/lib/interaction/action/base.d.ts +0 -29
- package/lib/interaction/action/base.js +0 -38
- package/lib/interaction/action/base.js.map +0 -1
- package/lib/interaction/action/callback.d.ts +0 -17
- package/lib/interaction/action/callback.js +0 -29
- package/lib/interaction/action/callback.js.map +0 -1
- package/lib/interaction/action/component/axis/axis-description.d.ts +0 -9
- package/lib/interaction/action/component/axis/axis-description.js +0 -75
- package/lib/interaction/action/component/axis/axis-description.js.map +0 -1
- package/lib/interaction/action/component/list-active.d.ts +0 -14
- package/lib/interaction/action/component/list-active.js +0 -26
- package/lib/interaction/action/component/list-active.js.map +0 -1
- package/lib/interaction/action/component/list-checked.d.ts +0 -30
- package/lib/interaction/action/component/list-checked.js +0 -84
- package/lib/interaction/action/component/list-checked.js.map +0 -1
- package/lib/interaction/action/component/list-focus.d.ts +0 -5
- package/lib/interaction/action/component/list-focus.js +0 -94
- package/lib/interaction/action/component/list-focus.js.map +0 -1
- package/lib/interaction/action/component/list-highlight-util.d.ts +0 -7
- package/lib/interaction/action/component/list-highlight-util.js +0 -24
- package/lib/interaction/action/component/list-highlight-util.js.map +0 -1
- package/lib/interaction/action/component/list-highlight.d.ts +0 -20
- package/lib/interaction/action/component/list-highlight.js +0 -99
- package/lib/interaction/action/component/list-highlight.js.map +0 -1
- package/lib/interaction/action/component/list-radio.d.ts +0 -24
- package/lib/interaction/action/component/list-radio.js +0 -118
- package/lib/interaction/action/component/list-radio.js.map +0 -1
- package/lib/interaction/action/component/list-selected.d.ts +0 -10
- package/lib/interaction/action/component/list-selected.js +0 -22
- package/lib/interaction/action/component/list-selected.js.map +0 -1
- package/lib/interaction/action/component/list-state.d.ts +0 -46
- package/lib/interaction/action/component/list-state.js +0 -169
- package/lib/interaction/action/component/list-state.js.map +0 -1
- package/lib/interaction/action/component/list-unchecked.d.ts +0 -13
- package/lib/interaction/action/component/list-unchecked.js +0 -25
- package/lib/interaction/action/component/list-unchecked.js.map +0 -1
- package/lib/interaction/action/component/tooltip/ellipsis-text.d.ts +0 -25
- package/lib/interaction/action/component/tooltip/ellipsis-text.js +0 -95
- package/lib/interaction/action/component/tooltip/ellipsis-text.js.map +0 -1
- package/lib/interaction/action/component/tooltip/geometry.d.ts +0 -24
- package/lib/interaction/action/component/tooltip/geometry.js +0 -73
- package/lib/interaction/action/component/tooltip/geometry.js.map +0 -1
- package/lib/interaction/action/component/tooltip/sibling.d.ts +0 -21
- package/lib/interaction/action/component/tooltip/sibling.js +0 -41
- package/lib/interaction/action/component/tooltip/sibling.js.map +0 -1
- package/lib/interaction/action/cursor.d.ts +0 -77
- package/lib/interaction/action/cursor.js +0 -127
- package/lib/interaction/action/cursor.js.map +0 -1
- package/lib/interaction/action/data/filter.d.ts +0 -13
- package/lib/interaction/action/data/filter.js +0 -68
- package/lib/interaction/action/data/filter.js.map +0 -1
- package/lib/interaction/action/data/range-filter.d.ts +0 -56
- package/lib/interaction/action/data/range-filter.js +0 -166
- package/lib/interaction/action/data/range-filter.js.map +0 -1
- package/lib/interaction/action/data/sibling-filter.d.ts +0 -22
- package/lib/interaction/action/data/sibling-filter.js +0 -41
- package/lib/interaction/action/data/sibling-filter.js.map +0 -1
- package/lib/interaction/action/element/active.d.ts +0 -14
- package/lib/interaction/action/element/active.js +0 -26
- package/lib/interaction/action/element/active.js.map +0 -1
- package/lib/interaction/action/element/filter.d.ts +0 -20
- package/lib/interaction/action/element/filter.js +0 -91
- package/lib/interaction/action/element/filter.js.map +0 -1
- package/lib/interaction/action/element/highlight-by-color.d.ts +0 -10
- package/lib/interaction/action/element/highlight-by-color.js +0 -32
- package/lib/interaction/action/element/highlight-by-color.js.map +0 -1
- package/lib/interaction/action/element/highlight-by-x.d.ts +0 -15
- package/lib/interaction/action/element/highlight-by-x.js +0 -53
- package/lib/interaction/action/element/highlight-by-x.js.map +0 -1
- package/lib/interaction/action/element/highlight-util.d.ts +0 -18
- package/lib/interaction/action/element/highlight-util.js +0 -50
- package/lib/interaction/action/element/highlight-util.js.map +0 -1
- package/lib/interaction/action/element/highlight.d.ts +0 -21
- package/lib/interaction/action/element/highlight.js +0 -96
- package/lib/interaction/action/element/highlight.js.map +0 -1
- package/lib/interaction/action/element/link-by-color.d.ts +0 -51
- package/lib/interaction/action/element/link-by-color.js +0 -158
- package/lib/interaction/action/element/link-by-color.js.map +0 -1
- package/lib/interaction/action/element/range-active.d.ts +0 -13
- package/lib/interaction/action/element/range-active.js +0 -25
- package/lib/interaction/action/element/range-active.js.map +0 -1
- package/lib/interaction/action/element/range-highlight.d.ts +0 -27
- package/lib/interaction/action/element/range-highlight.js +0 -57
- package/lib/interaction/action/element/range-highlight.js.map +0 -1
- package/lib/interaction/action/element/range-selected.d.ts +0 -13
- package/lib/interaction/action/element/range-selected.js +0 -25
- package/lib/interaction/action/element/range-selected.js.map +0 -1
- package/lib/interaction/action/element/range-state.d.ts +0 -38
- package/lib/interaction/action/element/range-state.js +0 -166
- package/lib/interaction/action/element/range-state.js.map +0 -1
- package/lib/interaction/action/element/selected.d.ts +0 -14
- package/lib/interaction/action/element/selected.js +0 -26
- package/lib/interaction/action/element/selected.js.map +0 -1
- package/lib/interaction/action/element/sibling-filter.d.ts +0 -19
- package/lib/interaction/action/element/sibling-filter.js +0 -95
- package/lib/interaction/action/element/sibling-filter.js.map +0 -1
- package/lib/interaction/action/element/single-active.d.ts +0 -13
- package/lib/interaction/action/element/single-active.js +0 -25
- package/lib/interaction/action/element/single-active.js.map +0 -1
- package/lib/interaction/action/element/single-highlight.d.ts +0 -16
- package/lib/interaction/action/element/single-highlight.js +0 -37
- package/lib/interaction/action/element/single-highlight.js.map +0 -1
- package/lib/interaction/action/element/single-selected.d.ts +0 -13
- package/lib/interaction/action/element/single-selected.js +0 -25
- package/lib/interaction/action/element/single-selected.js.map +0 -1
- package/lib/interaction/action/element/single-state.d.ts +0 -18
- package/lib/interaction/action/element/single-state.js +0 -55
- package/lib/interaction/action/element/single-state.js.map +0 -1
- package/lib/interaction/action/element/state-base.d.ts +0 -39
- package/lib/interaction/action/element/state-base.js +0 -61
- package/lib/interaction/action/element/state-base.js.map +0 -1
- package/lib/interaction/action/element/state.d.ts +0 -28
- package/lib/interaction/action/element/state.js +0 -101
- package/lib/interaction/action/element/state.js.map +0 -1
- package/lib/interaction/action/mask/base.d.ts +0 -62
- package/lib/interaction/action/mask/base.js +0 -171
- package/lib/interaction/action/mask/base.js.map +0 -1
- package/lib/interaction/action/mask/circle.d.ts +0 -14
- package/lib/interaction/action/mask/circle.js +0 -39
- package/lib/interaction/action/mask/circle.js.map +0 -1
- package/lib/interaction/action/mask/dim-rect.d.ts +0 -11
- package/lib/interaction/action/mask/dim-rect.js +0 -64
- package/lib/interaction/action/mask/dim-rect.js.map +0 -1
- package/lib/interaction/action/mask/path.d.ts +0 -16
- package/lib/interaction/action/mask/path.js +0 -46
- package/lib/interaction/action/mask/path.js.map +0 -1
- package/lib/interaction/action/mask/rect.d.ts +0 -17
- package/lib/interaction/action/mask/rect.js +0 -41
- package/lib/interaction/action/mask/rect.js.map +0 -1
- package/lib/interaction/action/mask/smooth-path.d.ts +0 -9
- package/lib/interaction/action/mask/smooth-path.js +0 -23
- package/lib/interaction/action/mask/smooth-path.js.map +0 -1
- package/lib/interaction/action/register.d.ts +0 -36
- package/lib/interaction/action/register.js +0 -69
- package/lib/interaction/action/register.js.map +0 -1
- package/lib/interaction/action/util.d.ts +0 -140
- package/lib/interaction/action/util.js +0 -387
- package/lib/interaction/action/util.js.map +0 -1
- package/lib/interaction/action/view/button.d.ts +0 -25
- package/lib/interaction/action/view/button.js +0 -118
- package/lib/interaction/action/view/button.js.map +0 -1
- package/lib/interaction/action/view/drag.d.ts +0 -24
- package/lib/interaction/action/view/drag.js +0 -75
- package/lib/interaction/action/view/drag.js.map +0 -1
- package/lib/interaction/action/view/mousewheel-scroll.d.ts +0 -5
- package/lib/interaction/action/view/mousewheel-scroll.js +0 -37
- package/lib/interaction/action/view/mousewheel-scroll.js.map +0 -1
- package/lib/interaction/action/view/move.d.ts +0 -28
- package/lib/interaction/action/view/move.js +0 -82
- package/lib/interaction/action/view/move.js.map +0 -1
- package/lib/interaction/action/view/scale-transform.d.ts +0 -18
- package/lib/interaction/action/view/scale-transform.js +0 -53
- package/lib/interaction/action/view/scale-transform.js.map +0 -1
- package/lib/interaction/action/view/scale-translate.d.ts +0 -30
- package/lib/interaction/action/view/scale-translate.js +0 -114
- package/lib/interaction/action/view/scale-translate.js.map +0 -1
- package/lib/interaction/action/view/scale-zoom.d.ts +0 -20
- package/lib/interaction/action/view/scale-zoom.js +0 -85
- package/lib/interaction/action/view/scale-zoom.js.map +0 -1
- package/lib/interaction/context.d.ts +0 -65
- package/lib/interaction/context.js +0 -144
- package/lib/interaction/context.js.map +0 -1
- package/lib/interaction/grammar-interaction.d.ts +0 -158
- package/lib/interaction/grammar-interaction.js +0 -289
- package/lib/interaction/grammar-interaction.js.map +0 -1
- package/lib/interaction/interaction.d.ts +0 -29
- package/lib/interaction/interaction.js +0 -34
- package/lib/interaction/interaction.js.map +0 -1
- package/lib/interface.d.ts +0 -3686
- package/lib/interface.js +0 -3
- package/lib/interface.js.map +0 -1
- package/lib/theme/style-sheet/dark.d.ts +0 -545
- package/lib/theme/style-sheet/dark.js +0 -504
- package/lib/theme/style-sheet/dark.js.map +0 -1
- package/lib/theme/style-sheet/light.d.ts +0 -541
- package/lib/theme/style-sheet/light.js +0 -500
- package/lib/theme/style-sheet/light.js.map +0 -1
- package/lib/theme/util/create-by-style-sheet.d.ts +0 -6
- package/lib/theme/util/create-by-style-sheet.js +0 -1429
- package/lib/theme/util/create-by-style-sheet.js.map +0 -1
- package/lib/theme/util/create-theme.d.ts +0 -6
- package/lib/theme/util/create-theme.js +0 -16
- package/lib/theme/util/create-theme.js.map +0 -1
- package/lib/theme/util/index.d.ts +0 -1
- package/lib/theme/util/index.js +0 -6
- package/lib/theme/util/index.js.map +0 -1
- package/lib/util/annotation.d.ts +0 -7
- package/lib/util/annotation.js +0 -43
- package/lib/util/annotation.js.map +0 -1
- package/lib/util/attr.d.ts +0 -10
- package/lib/util/attr.js +0 -29
- package/lib/util/attr.js.map +0 -1
- package/lib/util/axis.d.ts +0 -100
- package/lib/util/axis.js +0 -251
- package/lib/util/axis.js.map +0 -1
- package/lib/util/bbox.d.ts +0 -105
- package/lib/util/bbox.js +0 -288
- package/lib/util/bbox.js.map +0 -1
- package/lib/util/collision-detect.d.ts +0 -20
- package/lib/util/collision-detect.js +0 -134
- package/lib/util/collision-detect.js.map +0 -1
- package/lib/util/color.d.ts +0 -1
- package/lib/util/color.js +0 -23
- package/lib/util/color.js.map +0 -1
- package/lib/util/context.d.ts +0 -4
- package/lib/util/context.js +0 -15
- package/lib/util/context.js.map +0 -1
- package/lib/util/coordinate.d.ts +0 -86
- package/lib/util/coordinate.js +0 -157
- package/lib/util/coordinate.js.map +0 -1
- package/lib/util/direction.d.ts +0 -19
- package/lib/util/direction.js +0 -125
- package/lib/util/direction.js.map +0 -1
- package/lib/util/dom.d.ts +0 -19
- package/lib/util/dom.js +0 -68
- package/lib/util/dom.js.map +0 -1
- package/lib/util/event.d.ts +0 -8
- package/lib/util/event.js +0 -18
- package/lib/util/event.js.map +0 -1
- package/lib/util/facet.d.ts +0 -16
- package/lib/util/facet.js +0 -48
- package/lib/util/facet.js.map +0 -1
- package/lib/util/graphics.d.ts +0 -58
- package/lib/util/graphics.js +0 -212
- package/lib/util/graphics.js.map +0 -1
- package/lib/util/grid.d.ts +0 -36
- package/lib/util/grid.js +0 -125
- package/lib/util/grid.js.map +0 -1
- package/lib/util/helper.d.ts +0 -34
- package/lib/util/helper.js +0 -90
- package/lib/util/helper.js.map +0 -1
- package/lib/util/legend.d.ts +0 -45
- package/lib/util/legend.js +0 -152
- package/lib/util/legend.js.map +0 -1
- package/lib/util/marker.d.ts +0 -10
- package/lib/util/marker.js +0 -61
- package/lib/util/marker.js.map +0 -1
- package/lib/util/padding.d.ts +0 -14
- package/lib/util/padding.js +0 -45
- package/lib/util/padding.js.map +0 -1
- package/lib/util/scale.d.ts +0 -42
- package/lib/util/scale.js +0 -138
- package/lib/util/scale.js.map +0 -1
- package/lib/util/stat.d.ts +0 -10
- package/lib/util/stat.js +0 -41
- package/lib/util/stat.js.map +0 -1
- package/lib/util/text.d.ts +0 -23
- package/lib/util/text.js +0 -88
- package/lib/util/text.js.map +0 -1
- package/lib/util/tooltip.d.ts +0 -26
- package/lib/util/tooltip.js +0 -476
- package/lib/util/tooltip.js.map +0 -1
- package/lib/util/transform.d.ts +0 -33
- package/lib/util/transform.js +0 -69
- package/lib/util/transform.js.map +0 -1
- package/lib/util/types.d.ts +0 -6
- package/lib/util/types.js.map +0 -1
- package/src/animate/animation/fade.ts +0 -52
- package/src/animate/animation/grow-in.ts +0 -44
- package/src/animate/animation/index.ts +0 -29
- package/src/animate/animation/path-in.ts +0 -24
- package/src/animate/animation/position-update.ts +0 -33
- package/src/animate/animation/scale-in.ts +0 -75
- package/src/animate/animation/sector-path-update.ts +0 -159
- package/src/animate/animation/util.ts +0 -104
- package/src/animate/animation/wave-in.ts +0 -37
- package/src/animate/animation/zoom.ts +0 -78
- package/src/animate/index.ts +0 -268
- package/src/animate/interface.ts +0 -19
- package/src/api.ts +0 -3
- package/src/base.ts +0 -61
- package/src/chart/chart.ts +0 -218
- package/src/chart/controller/annotation.ts +0 -763
- package/src/chart/controller/axis.ts +0 -699
- package/src/chart/controller/base.ts +0 -105
- package/src/chart/controller/coordinate.ts +0 -177
- package/src/chart/controller/gesture.ts +0 -293
- package/src/chart/controller/index.ts +0 -39
- package/src/chart/controller/legend.ts +0 -566
- package/src/chart/controller/scrollbar.ts +0 -392
- package/src/chart/controller/slider.ts +0 -360
- package/src/chart/controller/tooltip.ts +0 -751
- package/src/chart/event.ts +0 -86
- package/src/chart/index.ts +0 -5
- package/src/chart/layout/auto.ts +0 -76
- package/src/chart/layout/constraint/bounds.ts +0 -51
- package/src/chart/layout/constraint/constraint.ts +0 -97
- package/src/chart/layout/constraint/gauss.ts +0 -71
- package/src/chart/layout/constraint/index.ts +0 -30
- package/src/chart/layout/constraint/solver.ts +0 -97
- package/src/chart/layout/constraint/types.ts +0 -29
- package/src/chart/layout/constraint/variable.ts +0 -33
- package/src/chart/layout/index.ts +0 -33
- package/src/chart/layout/padding-cal.ts +0 -123
- package/src/chart/util/scale-pool.ts +0 -250
- package/src/chart/util/sync-view-padding.ts +0 -17
- package/src/chart/view.ts +0 -2112
- package/src/component/labels.ts +0 -331
- package/src/component/update-label.ts +0 -69
- package/src/constant.ts +0 -143
- package/src/core.ts +0 -81
- package/src/dependents.ts +0 -99
- package/src/engine/index.ts +0 -27
- package/src/facet/circle.ts +0 -135
- package/src/facet/facet.ts +0 -373
- package/src/facet/index.ts +0 -25
- package/src/facet/list.ts +0 -167
- package/src/facet/matrix.ts +0 -149
- package/src/facet/mirror.ts +0 -167
- package/src/facet/rect.ts +0 -177
- package/src/facet/tree.ts +0 -317
- package/src/geometry/area.ts +0 -76
- package/src/geometry/base.ts +0 -2145
- package/src/geometry/edge.ts +0 -16
- package/src/geometry/element/index.ts +0 -519
- package/src/geometry/heatmap.ts +0 -223
- package/src/geometry/interval.ts +0 -109
- package/src/geometry/label/base.ts +0 -458
- package/src/geometry/label/index.ts +0 -59
- package/src/geometry/label/interface.ts +0 -65
- package/src/geometry/label/interval.ts +0 -160
- package/src/geometry/label/layout/adjust-color.ts +0 -40
- package/src/geometry/label/layout/hide-overlap.ts +0 -85
- package/src/geometry/label/layout/interval/adjust-position.ts +0 -72
- package/src/geometry/label/layout/interval/hide-overlap.ts +0 -86
- package/src/geometry/label/layout/limit-in-canvas.ts +0 -48
- package/src/geometry/label/layout/limit-in-plot.ts +0 -99
- package/src/geometry/label/layout/limit-in-shape.ts +0 -22
- package/src/geometry/label/layout/overlap.ts +0 -251
- package/src/geometry/label/layout/path/adjust-position.ts +0 -129
- package/src/geometry/label/layout/pie/distribute.ts +0 -203
- package/src/geometry/label/layout/pie/outer.ts +0 -247
- package/src/geometry/label/layout/pie/spider.ts +0 -201
- package/src/geometry/label/layout/pie/util.ts +0 -85
- package/src/geometry/label/layout/point/adjust-position.ts +0 -129
- package/src/geometry/label/layout/worker/hide-overlap.ts +0 -192
- package/src/geometry/label/pie.ts +0 -97
- package/src/geometry/label/polar.ts +0 -225
- package/src/geometry/label/util/createWorker.ts +0 -15
- package/src/geometry/label/util/index.ts +0 -81
- package/src/geometry/line.ts +0 -18
- package/src/geometry/path.ts +0 -140
- package/src/geometry/point.ts +0 -28
- package/src/geometry/polygon.ts +0 -55
- package/src/geometry/schema.ts +0 -43
- package/src/geometry/shape/area/index.ts +0 -50
- package/src/geometry/shape/area/line.ts +0 -33
- package/src/geometry/shape/area/smooth-line.ts +0 -33
- package/src/geometry/shape/area/smooth.ts +0 -35
- package/src/geometry/shape/area/util.ts +0 -111
- package/src/geometry/shape/base.ts +0 -191
- package/src/geometry/shape/constant.ts +0 -4
- package/src/geometry/shape/edge/arc.ts +0 -104
- package/src/geometry/shape/edge/index.ts +0 -38
- package/src/geometry/shape/edge/smooth.ts +0 -37
- package/src/geometry/shape/edge/util.ts +0 -36
- package/src/geometry/shape/edge/vhv.ts +0 -51
- package/src/geometry/shape/interval/funnel.ts +0 -36
- package/src/geometry/shape/interval/hollow-rect.ts +0 -62
- package/src/geometry/shape/interval/index.ts +0 -79
- package/src/geometry/shape/interval/line.ts +0 -63
- package/src/geometry/shape/interval/pyramid.ts +0 -37
- package/src/geometry/shape/interval/tick.ts +0 -86
- package/src/geometry/shape/interval/util.ts +0 -348
- package/src/geometry/shape/line/index.ts +0 -141
- package/src/geometry/shape/line/step.ts +0 -97
- package/src/geometry/shape/line/util.ts +0 -85
- package/src/geometry/shape/point/hollow.ts +0 -27
- package/src/geometry/shape/point/image.ts +0 -51
- package/src/geometry/shape/point/index.ts +0 -37
- package/src/geometry/shape/point/solid.ts +0 -26
- package/src/geometry/shape/point/util.ts +0 -54
- package/src/geometry/shape/polygon/index.ts +0 -78
- package/src/geometry/shape/polygon/square.ts +0 -52
- package/src/geometry/shape/schema/box.ts +0 -154
- package/src/geometry/shape/schema/candle.ts +0 -90
- package/src/geometry/shape/schema/index.ts +0 -7
- package/src/geometry/shape/util/get-path-points.ts +0 -136
- package/src/geometry/shape/util/get-style.ts +0 -56
- package/src/geometry/shape/util/path.ts +0 -348
- package/src/geometry/shape/util/split-points.ts +0 -26
- package/src/geometry/shape/violin/hollow.ts +0 -59
- package/src/geometry/shape/violin/index.ts +0 -69
- package/src/geometry/shape/violin/smooth.ts +0 -32
- package/src/geometry/util/diff.ts +0 -29
- package/src/geometry/util/get-shape-type.ts +0 -17
- package/src/geometry/util/group-data.ts +0 -30
- package/src/geometry/util/is-model-change.ts +0 -18
- package/src/geometry/util/parse-fields.ts +0 -10
- package/src/geometry/util/shape-size.ts +0 -128
- package/src/geometry/violin.ts +0 -64
- package/src/interaction/action/active-region.ts +0 -216
- package/src/interaction/action/base.ts +0 -49
- package/src/interaction/action/callback.ts +0 -25
- package/src/interaction/action/component/axis/axis-description.ts +0 -84
- package/src/interaction/action/component/list-active.ts +0 -18
- package/src/interaction/action/component/list-checked.ts +0 -84
- package/src/interaction/action/component/list-focus.ts +0 -36
- package/src/interaction/action/component/list-highlight-util.ts +0 -22
- package/src/interaction/action/component/list-highlight.ts +0 -93
- package/src/interaction/action/component/list-radio.ts +0 -128
- package/src/interaction/action/component/list-selected.ts +0 -14
- package/src/interaction/action/component/list-state.ts +0 -175
- package/src/interaction/action/component/list-unchecked.ts +0 -17
- package/src/interaction/action/component/tooltip/ellipsis-text.ts +0 -102
- package/src/interaction/action/component/tooltip/geometry.ts +0 -77
- package/src/interaction/action/component/tooltip/sibling.ts +0 -36
- package/src/interaction/action/cursor.ts +0 -129
- package/src/interaction/action/data/filter.ts +0 -59
- package/src/interaction/action/data/range-filter.ts +0 -173
- package/src/interaction/action/data/sibling-filter.ts +0 -38
- package/src/interaction/action/element/active.ts +0 -18
- package/src/interaction/action/element/filter.ts +0 -88
- package/src/interaction/action/element/highlight-by-color.ts +0 -26
- package/src/interaction/action/element/highlight-by-x.ts +0 -48
- package/src/interaction/action/element/highlight-util.ts +0 -50
- package/src/interaction/action/element/highlight.ts +0 -93
- package/src/interaction/action/element/link-by-color.ts +0 -161
- package/src/interaction/action/element/range-active.ts +0 -17
- package/src/interaction/action/element/range-highlight.ts +0 -54
- package/src/interaction/action/element/range-selected.ts +0 -17
- package/src/interaction/action/element/range-state.ts +0 -162
- package/src/interaction/action/element/selected.ts +0 -18
- package/src/interaction/action/element/sibling-filter.ts +0 -85
- package/src/interaction/action/element/single-active.ts +0 -17
- package/src/interaction/action/element/single-highlight.ts +0 -33
- package/src/interaction/action/element/single-selected.ts +0 -17
- package/src/interaction/action/element/single-state.ts +0 -49
- package/src/interaction/action/element/state-base.ts +0 -63
- package/src/interaction/action/element/state.ts +0 -110
- package/src/interaction/action/mask/base.ts +0 -182
- package/src/interaction/action/mask/circle.ts +0 -31
- package/src/interaction/action/mask/dim-rect.ts +0 -57
- package/src/interaction/action/mask/path.ts +0 -40
- package/src/interaction/action/mask/rect.ts +0 -34
- package/src/interaction/action/mask/smooth-path.ts +0 -16
- package/src/interaction/action/register.ts +0 -76
- package/src/interaction/action/util.ts +0 -386
- package/src/interaction/action/view/button.ts +0 -125
- package/src/interaction/action/view/drag.ts +0 -73
- package/src/interaction/action/view/mousewheel-scroll.ts +0 -38
- package/src/interaction/action/view/move.ts +0 -79
- package/src/interaction/action/view/scale-transform.ts +0 -49
- package/src/interaction/action/view/scale-translate.ts +0 -111
- package/src/interaction/action/view/scale-zoom.ts +0 -80
- package/src/interaction/context.ts +0 -150
- package/src/interaction/grammar-interaction.ts +0 -417
- package/src/interaction/interaction.ts +0 -43
- package/src/interface.ts +0 -3956
- package/src/theme/style-sheet/dark.ts +0 -564
- package/src/theme/style-sheet/light.ts +0 -560
- package/src/theme/util/create-by-style-sheet.ts +0 -1461
- package/src/theme/util/create-theme.ts +0 -17
- package/src/theme/util/index.ts +0 -1
- package/src/util/annotation.ts +0 -42
- package/src/util/attr.ts +0 -26
- package/src/util/axis.ts +0 -261
- package/src/util/bbox.ts +0 -271
- package/src/util/collision-detect.ts +0 -163
- package/src/util/color.ts +0 -21
- package/src/util/context.ts +0 -12
- package/src/util/coordinate.ts +0 -160
- package/src/util/direction.ts +0 -138
- package/src/util/dom.ts +0 -73
- package/src/util/event.ts +0 -14
- package/src/util/facet.ts +0 -48
- package/src/util/graphics.ts +0 -236
- package/src/util/grid.ts +0 -135
- package/src/util/helper.ts +0 -74
- package/src/util/legend.ts +0 -174
- package/src/util/marker.ts +0 -57
- package/src/util/padding.ts +0 -42
- package/src/util/scale.ts +0 -146
- package/src/util/stat.ts +0 -45
- package/src/util/text.ts +0 -106
- package/src/util/tooltip.ts +0 -482
- package/src/util/transform.ts +0 -69
- package/src/util/types.ts +0 -4
package/src/geometry/base.ts
DELETED
|
@@ -1,2145 +0,0 @@
|
|
|
1
|
-
import { Adjust, getAdjust as getAdjustClass } from '@antv/adjust';
|
|
2
|
-
import { Attribute, getAttribute as getAttributeClass } from '@antv/attr';
|
|
3
|
-
import {
|
|
4
|
-
clone,
|
|
5
|
-
deepMix,
|
|
6
|
-
each,
|
|
7
|
-
flatten,
|
|
8
|
-
get,
|
|
9
|
-
isArray,
|
|
10
|
-
isEmpty,
|
|
11
|
-
isEqual,
|
|
12
|
-
isFunction,
|
|
13
|
-
isNil,
|
|
14
|
-
isNumber,
|
|
15
|
-
isObject,
|
|
16
|
-
isPlainObject,
|
|
17
|
-
isString,
|
|
18
|
-
set,
|
|
19
|
-
} from '@antv/util';
|
|
20
|
-
import { doGroupAppearAnimate, getDefaultAnimateCfg } from '../animate';
|
|
21
|
-
import Base from '../base';
|
|
22
|
-
import { FIELD_ORIGIN, GEOMETRY_LIFE_CIRCLE, GROUP_ATTRS } from '../constant';
|
|
23
|
-
import { BBox, Coordinate, IGroup, IShape, Scale } from '../dependents';
|
|
24
|
-
import {
|
|
25
|
-
AdjustOption,
|
|
26
|
-
AdjustType,
|
|
27
|
-
AnimateOption,
|
|
28
|
-
AttributeOption,
|
|
29
|
-
ColorAttrCallback,
|
|
30
|
-
Data,
|
|
31
|
-
Datum,
|
|
32
|
-
GeometryLabelCfg,
|
|
33
|
-
GeometryTooltipOption,
|
|
34
|
-
LabelCallback,
|
|
35
|
-
LabelOption,
|
|
36
|
-
LooseObject,
|
|
37
|
-
MappingDatum,
|
|
38
|
-
ScaleOption,
|
|
39
|
-
ShapeAttrCallback,
|
|
40
|
-
ShapeFactory,
|
|
41
|
-
ShapeInfo,
|
|
42
|
-
ShapeMarkerCfg,
|
|
43
|
-
ShapeMarkerAttrs,
|
|
44
|
-
ShapePoint,
|
|
45
|
-
SizeAttrCallback,
|
|
46
|
-
StateOption,
|
|
47
|
-
StyleCallback,
|
|
48
|
-
StyleOption,
|
|
49
|
-
TooltipCallback,
|
|
50
|
-
CustomOption,
|
|
51
|
-
} from '../interface';
|
|
52
|
-
import { uniq } from '../util/helper';
|
|
53
|
-
import Element from './element';
|
|
54
|
-
import { getGeometryLabel } from './label';
|
|
55
|
-
import GeometryLabel from './label/base';
|
|
56
|
-
import { getShapeFactory } from './shape/base';
|
|
57
|
-
import { group } from './util/group-data';
|
|
58
|
-
import { isModelChange } from './util/is-model-change';
|
|
59
|
-
import { parseFields } from './util/parse-fields';
|
|
60
|
-
import { diff } from './util/diff';
|
|
61
|
-
import { inferScaleType } from '../util/scale';
|
|
62
|
-
import { getXDimensionLength } from '../util/coordinate';
|
|
63
|
-
|
|
64
|
-
/** @ignore */
|
|
65
|
-
interface AttributeInstanceCfg {
|
|
66
|
-
fields?: string[];
|
|
67
|
-
callback?: (...args) => any;
|
|
68
|
-
values?: string[] | number[];
|
|
69
|
-
scales?: Scale[];
|
|
70
|
-
}
|
|
71
|
-
interface DimValuesMapType {
|
|
72
|
-
[dim: string]: number[];
|
|
73
|
-
}
|
|
74
|
-
/** @ignore */
|
|
75
|
-
interface AdjustInstanceCfg {
|
|
76
|
-
type: AdjustType;
|
|
77
|
-
adjustNames?: string[];
|
|
78
|
-
xField?: string;
|
|
79
|
-
yField?: string;
|
|
80
|
-
|
|
81
|
-
dodgeBy?: string;
|
|
82
|
-
marginRatio?: number;
|
|
83
|
-
dodgeRatio?: number;
|
|
84
|
-
|
|
85
|
-
size?: number;
|
|
86
|
-
height?: number;
|
|
87
|
-
reverseOrder?: boolean;
|
|
88
|
-
|
|
89
|
-
/** 像素级柱间宽度,调整offset */
|
|
90
|
-
intervalPadding?: number;
|
|
91
|
-
dodgePadding?: number;
|
|
92
|
-
/** x维度长度,计算归一化padding使用 */
|
|
93
|
-
xDimensionLength?: number;
|
|
94
|
-
/** 分组数,计算offset */
|
|
95
|
-
groupNum?: number;
|
|
96
|
-
/** 用户配置宽度 size */
|
|
97
|
-
defaultSize?: number;
|
|
98
|
-
/** 最大最小宽度约束 */
|
|
99
|
-
maxColumnWidth?: number;
|
|
100
|
-
minColumnWidth?: number;
|
|
101
|
-
/** 柱宽比例 */
|
|
102
|
-
columnWidthRatio?: number;
|
|
103
|
-
/** 用户自定义的dimValuesMap */
|
|
104
|
-
dimValuesMap?: DimValuesMapType;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** geometry.init() 传入参数 */
|
|
108
|
-
export interface InitCfg {
|
|
109
|
-
/** 坐标系 */
|
|
110
|
-
coordinate?: Coordinate;
|
|
111
|
-
/** 数据 */
|
|
112
|
-
data?: Data;
|
|
113
|
-
/** 主题对象 */
|
|
114
|
-
theme?: LooseObject;
|
|
115
|
-
/** 列定义 */
|
|
116
|
-
scaleDefs?: Record<string, ScaleOption>;
|
|
117
|
-
/** 因为数据使用的引用,所以需要有一个标识位标识数据是否发生了更新 */
|
|
118
|
-
isDataChanged?: boolean;
|
|
119
|
-
isCoordinateChanged?: boolean;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/** Geometry 构造函数参数 */
|
|
123
|
-
export interface GeometryCfg {
|
|
124
|
-
/** Geometry shape 的容器。 */
|
|
125
|
-
container: IGroup;
|
|
126
|
-
/** 绘制的坐标系对象。 */
|
|
127
|
-
coordinate?: Coordinate;
|
|
128
|
-
/** 绘制数据。 */
|
|
129
|
-
data?: Data;
|
|
130
|
-
/** 需要的 scales。 */
|
|
131
|
-
scales?: Record<string, Scale>;
|
|
132
|
-
/** 列定义 */
|
|
133
|
-
scaleDefs?: Record<string, ScaleOption>;
|
|
134
|
-
/** Geometry labels 的容器 */
|
|
135
|
-
labelsContainer?: IGroup;
|
|
136
|
-
/** 是否对数据进行排序 */
|
|
137
|
-
sortable?: boolean;
|
|
138
|
-
/** elements 的 zIndex 默认按顺序提升,通过 zIndexReversed 可以反序,从而数据越前,层级越高 */
|
|
139
|
-
zIndexReversed?: boolean;
|
|
140
|
-
/** 是否需要对 zIndex 进行 sort。因为耗时长,由具体场景自行决定 */
|
|
141
|
-
sortZIndex?: boolean;
|
|
142
|
-
/** 延迟渲染 Geometry 数据标签. 设置为 true 时,会在浏览器空闲时期被调用, 也可以指定具体 timeout 时间 */
|
|
143
|
-
useDeferredLabel?: boolean | number;
|
|
144
|
-
/** 是否可见 */
|
|
145
|
-
visible?: boolean;
|
|
146
|
-
/** 主题配置 */
|
|
147
|
-
theme?: LooseObject;
|
|
148
|
-
|
|
149
|
-
/** 组间距 */
|
|
150
|
-
intervalPadding?: number;
|
|
151
|
-
/** 组内间距 */
|
|
152
|
-
dodgePadding?: number;
|
|
153
|
-
/** 柱状图最大宽度 */
|
|
154
|
-
maxColumnWidth?: number;
|
|
155
|
-
/** 柱状图最小宽度 */
|
|
156
|
-
minColumnWidth?: number;
|
|
157
|
-
/** 默认宽度占比,interval类型和schema类型通用 */
|
|
158
|
-
columnWidthRatio?: number;
|
|
159
|
-
/** 玫瑰图占比 */
|
|
160
|
-
roseWidthRatio?: number;
|
|
161
|
-
/** 多层饼图/环图占比 */
|
|
162
|
-
multiplePieWidthRatio?: number;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Geometry 几何标记基类,主要负责数据到图形属性的映射以及绘制逻辑。
|
|
167
|
-
*/
|
|
168
|
-
export default class Geometry<S extends ShapePoint = ShapePoint> extends Base {
|
|
169
|
-
/** Geometry 几何标记类型。 */
|
|
170
|
-
public readonly type: string = 'base';
|
|
171
|
-
/** ShapeFactory 对应的类型。 */
|
|
172
|
-
public readonly shapeType: string;
|
|
173
|
-
|
|
174
|
-
// 在创建 Geometry 实例时可以传入的属性
|
|
175
|
-
/** Coordinate 坐标系实例。 */
|
|
176
|
-
public coordinate: Coordinate;
|
|
177
|
-
/** 用户绘制数据。 */
|
|
178
|
-
public data: Data;
|
|
179
|
-
/** 图形绘制容器。 */
|
|
180
|
-
public readonly container: IGroup;
|
|
181
|
-
/** label 绘制容器。 */
|
|
182
|
-
public readonly labelsContainer: IGroup;
|
|
183
|
-
/** 是否对数据进行排序,默认为 false。 */
|
|
184
|
-
public sortable: boolean;
|
|
185
|
-
/** 当前 Geometry 实例主题。 */
|
|
186
|
-
public theme: LooseObject;
|
|
187
|
-
/** 存储 geometry 需要的 scales,需要外部传入。 */
|
|
188
|
-
public scales: Record<string, Scale>;
|
|
189
|
-
/** scale 定义,需要外部传入。 */
|
|
190
|
-
public scaleDefs: Record<string, ScaleOption>;
|
|
191
|
-
/** 画布区域,用于 label 布局。 */
|
|
192
|
-
public canvasRegion: BBox;
|
|
193
|
-
|
|
194
|
-
// 内部产生的属性
|
|
195
|
-
/** Attribute map */
|
|
196
|
-
public attributes: Record<string, Attribute> = {};
|
|
197
|
-
/** Element map */
|
|
198
|
-
public elements: Element[] = [];
|
|
199
|
-
/**
|
|
200
|
-
* 存储处理后的数据,
|
|
201
|
-
* + init() 及 updateData() 逻辑后, 结构为 Data[];
|
|
202
|
-
* + paint() 逻辑后,结构为 MappingDatum[][]。
|
|
203
|
-
*/
|
|
204
|
-
public dataArray: MappingDatum[][];
|
|
205
|
-
/** 存储 tooltip 配置信息。 */
|
|
206
|
-
public tooltipOption: GeometryTooltipOption | boolean;
|
|
207
|
-
/** 存储 label 配置信息。 */
|
|
208
|
-
public labelOption: LabelOption | false;
|
|
209
|
-
/** 状态量相关的配置项 */
|
|
210
|
-
public stateOption: StateOption;
|
|
211
|
-
/** 使用 key-value 结构存储 Element,key 为每个 Element 实例对应的唯一 ID */
|
|
212
|
-
public elementsMap: Record<string, Element> = {};
|
|
213
|
-
/** animate 配置项 */
|
|
214
|
-
public animateOption: AnimateOption | boolean = true;
|
|
215
|
-
/** 图形属性映射配置 */
|
|
216
|
-
protected attributeOption: Record<string, AttributeOption> = {};
|
|
217
|
-
/** adjust 配置项 */
|
|
218
|
-
protected adjustOption: AdjustOption[];
|
|
219
|
-
/** style 配置项 */
|
|
220
|
-
protected styleOption: StyleOption;
|
|
221
|
-
/** custom 自定义的配置项 */
|
|
222
|
-
protected customOption: CustomOption;
|
|
223
|
-
/** 每个 Geometry 对应的 Shape 工厂实例,用于创建各个 Shape */
|
|
224
|
-
protected shapeFactory: ShapeFactory;
|
|
225
|
-
/** 存储上一次渲染时的 element 映射表,用于更新逻辑 */
|
|
226
|
-
protected lastElementsMap: Record<string, Element> = {};
|
|
227
|
-
/** 是否生成多个点来绘制图形。 */
|
|
228
|
-
protected generatePoints: boolean = false;
|
|
229
|
-
/** 存储发生图形属性映射前的数据 */
|
|
230
|
-
protected beforeMappingData: Data[] = null;
|
|
231
|
-
/** 存储每个 shape 的默认 size,用于 Interval、Schema 几何标记 */
|
|
232
|
-
protected defaultSize: number;
|
|
233
|
-
|
|
234
|
-
// 用户通过 geometry 构造函数设置的主题
|
|
235
|
-
private userTheme: LooseObject;
|
|
236
|
-
private adjusts: Record<string, Adjust> = {};
|
|
237
|
-
private lastAttributeOption;
|
|
238
|
-
private idFields: string[] = [];
|
|
239
|
-
private geometryLabel: GeometryLabel;
|
|
240
|
-
|
|
241
|
-
// 柱状图间距相关配置
|
|
242
|
-
/** 组间距 */
|
|
243
|
-
protected intervalPadding: number;
|
|
244
|
-
/** 组内间距 */
|
|
245
|
-
protected dodgePadding: number;
|
|
246
|
-
/** 柱状图最大宽度 */
|
|
247
|
-
protected maxColumnWidth: number;
|
|
248
|
-
/** 柱状图最小宽度 */
|
|
249
|
-
protected minColumnWidth: number;
|
|
250
|
-
/** 一般柱状图宽度占比 */
|
|
251
|
-
protected columnWidthRatio: number;
|
|
252
|
-
/** 玫瑰图占比 */
|
|
253
|
-
protected roseWidthRatio: number;
|
|
254
|
-
/** 多层饼图/环图占比 */
|
|
255
|
-
protected multiplePieWidthRatio: number;
|
|
256
|
-
/** elements 的 zIndex 默认按顺序提升,通过 zIndexReversed 可以反序,从而数据越前,层级越高 */
|
|
257
|
-
public zIndexReversed?: boolean;
|
|
258
|
-
/** 是否需要对 zIndex 进行 sort。因为耗时长,由具体场景自行决定 */
|
|
259
|
-
public sortZIndex?: boolean;
|
|
260
|
-
protected useDeferredLabel?: null | number;
|
|
261
|
-
|
|
262
|
-
/** 虚拟 Group,用于图形更新 */
|
|
263
|
-
private offscreenGroup: IGroup;
|
|
264
|
-
private groupScales: Scale[];
|
|
265
|
-
private hasSorted: boolean = false;
|
|
266
|
-
protected isCoordinateChanged: boolean = false;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* 创建 Geometry 实例。
|
|
270
|
-
* @param cfg
|
|
271
|
-
*/
|
|
272
|
-
constructor(cfg: GeometryCfg) {
|
|
273
|
-
super(cfg);
|
|
274
|
-
|
|
275
|
-
const {
|
|
276
|
-
container,
|
|
277
|
-
labelsContainer,
|
|
278
|
-
coordinate,
|
|
279
|
-
data,
|
|
280
|
-
sortable = false,
|
|
281
|
-
visible = true,
|
|
282
|
-
theme,
|
|
283
|
-
scales = {},
|
|
284
|
-
scaleDefs = {},
|
|
285
|
-
// 柱状图间隔与宽度相关配置
|
|
286
|
-
intervalPadding,
|
|
287
|
-
dodgePadding,
|
|
288
|
-
maxColumnWidth,
|
|
289
|
-
minColumnWidth,
|
|
290
|
-
columnWidthRatio,
|
|
291
|
-
roseWidthRatio,
|
|
292
|
-
multiplePieWidthRatio,
|
|
293
|
-
zIndexReversed,
|
|
294
|
-
sortZIndex,
|
|
295
|
-
useDeferredLabel,
|
|
296
|
-
} = cfg;
|
|
297
|
-
|
|
298
|
-
this.container = container;
|
|
299
|
-
this.labelsContainer = labelsContainer;
|
|
300
|
-
this.coordinate = coordinate;
|
|
301
|
-
this.data = data;
|
|
302
|
-
this.sortable = sortable;
|
|
303
|
-
this.visible = visible;
|
|
304
|
-
this.userTheme = theme;
|
|
305
|
-
this.scales = scales;
|
|
306
|
-
this.scaleDefs = scaleDefs;
|
|
307
|
-
// 柱状图间隔与宽度相关配置
|
|
308
|
-
this.intervalPadding = intervalPadding;
|
|
309
|
-
this.dodgePadding = dodgePadding;
|
|
310
|
-
this.maxColumnWidth = maxColumnWidth;
|
|
311
|
-
this.minColumnWidth = minColumnWidth;
|
|
312
|
-
this.columnWidthRatio = columnWidthRatio;
|
|
313
|
-
this.roseWidthRatio = roseWidthRatio;
|
|
314
|
-
this.multiplePieWidthRatio = multiplePieWidthRatio;
|
|
315
|
-
this.zIndexReversed = zIndexReversed;
|
|
316
|
-
this.sortZIndex = sortZIndex;
|
|
317
|
-
this.useDeferredLabel = useDeferredLabel ? (typeof useDeferredLabel === 'number' ? useDeferredLabel : Infinity) : null;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* 配置 position 通道映射规则。
|
|
322
|
-
*
|
|
323
|
-
* @example
|
|
324
|
-
* ```typescript
|
|
325
|
-
* // 数据结构: [{ x: 'A', y: 10, color: 'red' }]
|
|
326
|
-
* geometry.position('x*y');
|
|
327
|
-
* geometry.position([ 'x', 'y' ]);
|
|
328
|
-
* geometry.position({
|
|
329
|
-
* fields: [ 'x', 'y' ],
|
|
330
|
-
* });
|
|
331
|
-
* ```
|
|
332
|
-
*
|
|
333
|
-
* @param cfg 映射规则
|
|
334
|
-
* @returns
|
|
335
|
-
*/
|
|
336
|
-
public position(cfg: string | string[] | AttributeOption): Geometry {
|
|
337
|
-
let positionCfg = cfg;
|
|
338
|
-
if (!isPlainObject(cfg)) {
|
|
339
|
-
// 字符串字段或者数组字段
|
|
340
|
-
positionCfg = {
|
|
341
|
-
fields: parseFields(cfg),
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
const fields = get(positionCfg, 'fields');
|
|
346
|
-
if (fields.length === 1) {
|
|
347
|
-
// 默认填充一维 1*xx
|
|
348
|
-
fields.unshift('1');
|
|
349
|
-
set(positionCfg, 'fields', fields);
|
|
350
|
-
}
|
|
351
|
-
set(this.attributeOption, 'position', positionCfg);
|
|
352
|
-
|
|
353
|
-
return this;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* 配置 color 通道映射规则。
|
|
358
|
-
*
|
|
359
|
-
* @example
|
|
360
|
-
* ```typescript
|
|
361
|
-
* // data: [{ x: 'A', y: 10, color: 'red' }, { x: 'B', y: 30, color: 'yellow' }]
|
|
362
|
-
* geometry.color({
|
|
363
|
-
* fields: [ 'x' ],
|
|
364
|
-
* values: [ '#1890ff', '#5AD8A6' ],
|
|
365
|
-
* });
|
|
366
|
-
* ```
|
|
367
|
-
*
|
|
368
|
-
* @param field 映射规则
|
|
369
|
-
* @returns
|
|
370
|
-
*/
|
|
371
|
-
public color(field: AttributeOption): Geometry;
|
|
372
|
-
/**
|
|
373
|
-
* @example
|
|
374
|
-
* ```typescript
|
|
375
|
-
* // data: [{ x: 'A', y: 10, color: 'red' }, { x: 'B', y: 30, color: 'yellow' }]
|
|
376
|
-
*
|
|
377
|
-
* // 使用 '#1890ff' 颜色渲染图形
|
|
378
|
-
* geometry.color('#1890ff');
|
|
379
|
-
*
|
|
380
|
-
* // 根据 x 字段的数据值进行颜色的映射,这时候 G2 会在内部调用默认的回调函数,读取默认提供的颜色进行数据值到颜色值的映射。
|
|
381
|
-
* geometry.color('x');
|
|
382
|
-
*
|
|
383
|
-
* // 将 'x' 字段的数据值映射至指定的颜色值 colors(可以是字符串也可以是数组),此时用于通常映射分类数据
|
|
384
|
-
* geometry.color('x', [ '#1890ff', '#5AD8A6' ]);
|
|
385
|
-
*
|
|
386
|
-
* // 使用回调函数进行颜色值的自定义;可以使用多个字段使用、*号连接
|
|
387
|
-
* geometry.color('x', (xVal) => {
|
|
388
|
-
* if (xVal === 'a') {
|
|
389
|
-
* return 'red';
|
|
390
|
-
* }
|
|
391
|
-
* return 'blue';
|
|
392
|
-
* });
|
|
393
|
-
*
|
|
394
|
-
* // 指定颜色的渐变路径,用于映射连续的数据
|
|
395
|
-
* geometry.color('x', '#BAE7FF-#1890FF-#0050B3');
|
|
396
|
-
* ```
|
|
397
|
-
*
|
|
398
|
-
* @param field 参与颜色映射的数据字段,多个字段使用 '*' 连接符进行连接。
|
|
399
|
-
* @param cfg Optional, color 映射规则。
|
|
400
|
-
* @returns
|
|
401
|
-
*/
|
|
402
|
-
public color(field: string, cfg?: string | string[] | ColorAttrCallback): Geometry;
|
|
403
|
-
public color(field: AttributeOption | string, cfg?: string | string[] | ColorAttrCallback): Geometry {
|
|
404
|
-
this.createAttrOption('color', field, cfg);
|
|
405
|
-
|
|
406
|
-
return this;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* 配置 shape 通道映射规则。
|
|
411
|
-
*
|
|
412
|
-
* @example
|
|
413
|
-
*
|
|
414
|
-
* ```typescript
|
|
415
|
-
* // data: [{ x: 'A', y: 10, color: 'red' }, { x: 'B', y: 30, color: 'yellow' }]
|
|
416
|
-
* geometry.shape({
|
|
417
|
-
* fields: [ 'x' ],
|
|
418
|
-
* });
|
|
419
|
-
* ```
|
|
420
|
-
*
|
|
421
|
-
* @param field 映射规则配置。
|
|
422
|
-
* @returns
|
|
423
|
-
*/
|
|
424
|
-
public shape(field: AttributeOption): Geometry;
|
|
425
|
-
/**
|
|
426
|
-
*
|
|
427
|
-
* @example
|
|
428
|
-
* ```typescript
|
|
429
|
-
* // data: [{ x: 'A', y: 10, color: 'red' }, { x: 'B', y: 30, color: 'yellow' }]
|
|
430
|
-
*
|
|
431
|
-
* // 指定常量,将所有数据值映射到固定的 shape
|
|
432
|
-
* geometry.shape('circle');
|
|
433
|
-
*
|
|
434
|
-
* // 将指定的字段映射到内置的 shapes 数组中
|
|
435
|
-
* geometry.shape('x');
|
|
436
|
-
*
|
|
437
|
-
* // 将指定的字段映射到指定的 shapes 数组中
|
|
438
|
-
* geometry.shape('x', [ 'circle', 'diamond', 'square' ]);
|
|
439
|
-
*
|
|
440
|
-
* // 使用回调函数获取 shape,用于个性化的 shape 定制,可以根据单个或者多个字段确定
|
|
441
|
-
* geometry.shape('x', (xVal) => {
|
|
442
|
-
* if (xVal === 'a') {
|
|
443
|
-
* return 'circle';
|
|
444
|
-
* }
|
|
445
|
-
* return 'diamond';
|
|
446
|
-
* });
|
|
447
|
-
* ```
|
|
448
|
-
*
|
|
449
|
-
* @param field 参与 shape 映射的数据字段,多个字段使用 '*' 连接符进行连接。
|
|
450
|
-
* @param cfg Optional, shape 映射规则。
|
|
451
|
-
* @returns
|
|
452
|
-
*/
|
|
453
|
-
public shape(field: string, cfg?: string[] | ShapeAttrCallback): Geometry;
|
|
454
|
-
public shape(field: AttributeOption | string, cfg?: string[] | ShapeAttrCallback): Geometry {
|
|
455
|
-
this.createAttrOption('shape', field, cfg);
|
|
456
|
-
|
|
457
|
-
return this;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* 配置 size 通道映射规则。
|
|
462
|
-
*
|
|
463
|
-
* @example
|
|
464
|
-
* ```typescript
|
|
465
|
-
* // data: [{ x: 'A', y: 10, color: 'red' }, { x: 'B', y: 30, color: 'yellow' }]
|
|
466
|
-
* geometry.size({
|
|
467
|
-
* values: [ 10 ],
|
|
468
|
-
* })
|
|
469
|
-
* ```
|
|
470
|
-
*
|
|
471
|
-
* @param field 映射规则。
|
|
472
|
-
* @returns
|
|
473
|
-
*/
|
|
474
|
-
public size(field: AttributeOption): Geometry;
|
|
475
|
-
/**
|
|
476
|
-
*
|
|
477
|
-
* @example
|
|
478
|
-
* ```typescript
|
|
479
|
-
* // data: [{ x: 'A', y: 10, color: 'red' }, { x: 'B', y: 30, color: 'yellow' }]
|
|
480
|
-
*
|
|
481
|
-
* // 直接指定像素大小
|
|
482
|
-
* geometry.size(10);
|
|
483
|
-
*
|
|
484
|
-
* // 指定映射到 size 的字段,使用内置的默认大小范围为 [1, 10]
|
|
485
|
-
* geometry.size('x');
|
|
486
|
-
*
|
|
487
|
-
* // 指定映射到 size 字段外,还提供了 size 的最大值和最小值范围
|
|
488
|
-
* geometry.size('x', [ 5, 30 ]);
|
|
489
|
-
*
|
|
490
|
-
* // 使用回调函数映射 size,用于个性化的 size 定制,可以使用多个字段进行映射
|
|
491
|
-
* geometry.size('x', (xVal) => {
|
|
492
|
-
* if (xVal === 'a') {
|
|
493
|
-
* return 10;
|
|
494
|
-
* }
|
|
495
|
-
* return 5;
|
|
496
|
-
* });
|
|
497
|
-
* ```
|
|
498
|
-
*
|
|
499
|
-
* @param field 参与 size 映射的数据字段,多个字段使用 '*' 连接符进行连接。
|
|
500
|
-
* @param cfg Optional, size 映射规则
|
|
501
|
-
* @returns
|
|
502
|
-
*/
|
|
503
|
-
public size(field: number | string, cfg?: [number, number] | SizeAttrCallback): Geometry;
|
|
504
|
-
public size(field: AttributeOption | number | string, cfg?: [number, number] | SizeAttrCallback): Geometry {
|
|
505
|
-
this.createAttrOption('size', field, cfg);
|
|
506
|
-
|
|
507
|
-
return this;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* 设置数据调整方式。G2 目前内置了四种类型:
|
|
512
|
-
* 1. dodge
|
|
513
|
-
* 2. stack
|
|
514
|
-
* 3. symmetric
|
|
515
|
-
* 4. jitter
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
* **Tip**
|
|
519
|
-
* + 对于 'dodge' 类型,可以额外进行如下属性的配置:
|
|
520
|
-
* ```typescript
|
|
521
|
-
* geometry.adjust('dodge', {
|
|
522
|
-
* marginRatio: 0, // 取 0 到 1 范围的值(相对于每个柱子宽度),用于控制一个分组中柱子之间的间距
|
|
523
|
-
* dodgeBy: 'x', // 该属性只对 'dodge' 类型生效,声明以哪个数据字段为分组依据
|
|
524
|
-
* });
|
|
525
|
-
* ```
|
|
526
|
-
*
|
|
527
|
-
* + 对于 'stack' 类型,可以额外进行如下属性的配置:
|
|
528
|
-
* ```typescript
|
|
529
|
-
* geometry.adjust('stack', {
|
|
530
|
-
* reverseOrder: false, // 用于控制是否对数据进行反序操作
|
|
531
|
-
* });
|
|
532
|
-
* ```
|
|
533
|
-
*
|
|
534
|
-
* @example
|
|
535
|
-
* ```typescript
|
|
536
|
-
* geometry.adjust('stack');
|
|
537
|
-
*
|
|
538
|
-
* geometry.adjust({
|
|
539
|
-
* type: 'stack',
|
|
540
|
-
* reverseOrder: false,
|
|
541
|
-
* });
|
|
542
|
-
*
|
|
543
|
-
* // 组合使用 adjust
|
|
544
|
-
* geometry.adjust([ 'stack', 'dodge' ]);
|
|
545
|
-
*
|
|
546
|
-
* geometry.adjust([
|
|
547
|
-
* { type: 'stack' },
|
|
548
|
-
* { type: 'dodge', dodgeBy: 'x' },
|
|
549
|
-
* ]);
|
|
550
|
-
* ```
|
|
551
|
-
*
|
|
552
|
-
* @param adjustCfg 数据调整配置
|
|
553
|
-
* @returns
|
|
554
|
-
*/
|
|
555
|
-
public adjust(adjustCfg: string | string[] | AdjustOption | AdjustOption[]): Geometry {
|
|
556
|
-
let adjusts: any = adjustCfg;
|
|
557
|
-
if (isString(adjustCfg) || isPlainObject(adjustCfg)) {
|
|
558
|
-
adjusts = [adjustCfg];
|
|
559
|
-
}
|
|
560
|
-
each(adjusts, (adjust, index) => {
|
|
561
|
-
if (!isObject(adjust)) {
|
|
562
|
-
adjusts[index] = { type: adjust };
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
|
|
566
|
-
this.adjustOption = adjusts;
|
|
567
|
-
return this;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* 图形样式配置。
|
|
572
|
-
*
|
|
573
|
-
* @example
|
|
574
|
-
* ```typescript
|
|
575
|
-
* // 配置图形样式
|
|
576
|
-
* style({
|
|
577
|
-
* lineWidth: 2,
|
|
578
|
-
* stroke: '#1890ff',
|
|
579
|
-
* });
|
|
580
|
-
*
|
|
581
|
-
* // 根据具体的数据进行详细配置
|
|
582
|
-
* style({
|
|
583
|
-
* fields: [ 'x', 'y' ], // 数据字段
|
|
584
|
-
* callback: (xVal, yVal) => {
|
|
585
|
-
* const style = { lineWidth: 2, stroke: '#1890ff' };
|
|
586
|
-
* if (xVal === 'a') {
|
|
587
|
-
* style.lineDash = [ 2, 2 ];
|
|
588
|
-
* }
|
|
589
|
-
* return style;
|
|
590
|
-
* },
|
|
591
|
-
* });
|
|
592
|
-
* ```
|
|
593
|
-
*
|
|
594
|
-
* @param field 配置样式属性或者样式规则。
|
|
595
|
-
* @returns
|
|
596
|
-
*/
|
|
597
|
-
public style(field: StyleOption | LooseObject): Geometry;
|
|
598
|
-
/**
|
|
599
|
-
* @example
|
|
600
|
-
* ```typescript
|
|
601
|
-
* style('x*y', (xVal, yVal) => {
|
|
602
|
-
* const style = { lineWidth: 2, stroke: '#1890ff' };
|
|
603
|
-
* if (xVal === 'a') {
|
|
604
|
-
* style.lineDash = [ 2, 2 ];
|
|
605
|
-
* }
|
|
606
|
-
* return style;
|
|
607
|
-
* });
|
|
608
|
-
* ```
|
|
609
|
-
*
|
|
610
|
-
* @param field 数据字段或者样式配置规则。
|
|
611
|
-
* @param styleFunc Optional, 样式配置回调函数。
|
|
612
|
-
* @returns
|
|
613
|
-
*/
|
|
614
|
-
public style(field: string, styleFunc: StyleCallback): Geometry;
|
|
615
|
-
public style(field: StyleOption | LooseObject | string, styleFunc?: StyleCallback): Geometry {
|
|
616
|
-
if (isString(field)) {
|
|
617
|
-
const fields = parseFields(field);
|
|
618
|
-
this.styleOption = {
|
|
619
|
-
fields,
|
|
620
|
-
callback: styleFunc,
|
|
621
|
-
};
|
|
622
|
-
} else {
|
|
623
|
-
const { fields, callback, cfg } = field as StyleOption;
|
|
624
|
-
if (fields || callback || cfg) {
|
|
625
|
-
this.styleOption = field;
|
|
626
|
-
} else {
|
|
627
|
-
this.styleOption = {
|
|
628
|
-
cfg: field,
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
return this;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* 配置 Geometry 显示的 tooltip 内容。
|
|
638
|
-
*
|
|
639
|
-
* `tooltip(false)` 代表关闭 tooltip。
|
|
640
|
-
* `tooltip(true)` 代表开启 tooltip。
|
|
641
|
-
*
|
|
642
|
-
* Geometry 默认允许 tooltip 展示,我们可以使用以下方法对 tooltip 的展示内容进行配置:
|
|
643
|
-
*
|
|
644
|
-
* @example
|
|
645
|
-
* ```typescript
|
|
646
|
-
* // data: [{x: 'a', y: 10}]
|
|
647
|
-
* tooltip({
|
|
648
|
-
* fields: [ 'x' ],
|
|
649
|
-
* });
|
|
650
|
-
* ```
|
|
651
|
-
* 
|
|
652
|
-
*
|
|
653
|
-
* ```typescript
|
|
654
|
-
* tooltip({
|
|
655
|
-
* fields: [ 'x', 'y' ],
|
|
656
|
-
* });
|
|
657
|
-
* ```
|
|
658
|
-
* 
|
|
659
|
-
*
|
|
660
|
-
* tooltip() 方法同样支持数据映射及回调用法:
|
|
661
|
-
*
|
|
662
|
-
* @example
|
|
663
|
-
* ```typescript
|
|
664
|
-
* chart.tooltip({
|
|
665
|
-
* itemTpl: '<li>{x}: {y}</li>',
|
|
666
|
-
* });
|
|
667
|
-
*
|
|
668
|
-
* chart.line()
|
|
669
|
-
* .position('x*y')
|
|
670
|
-
* .tooltip({
|
|
671
|
-
* fields: [ 'x', 'y' ],
|
|
672
|
-
* callback: (x, y) => {
|
|
673
|
-
* return {
|
|
674
|
-
* x,
|
|
675
|
-
* y,
|
|
676
|
-
* };
|
|
677
|
-
* },
|
|
678
|
-
* });
|
|
679
|
-
* ```
|
|
680
|
-
*
|
|
681
|
-
* 其返回的值必须为对象,该值中的属性同 chart.tooltip() 的 itemTpl 模板相对应,返回的变量可用于 itemTpl 的字符串模板。
|
|
682
|
-
*
|
|
683
|
-
* @param field tooltip 配置信息。
|
|
684
|
-
* @returns
|
|
685
|
-
*/
|
|
686
|
-
public tooltip(field: GeometryTooltipOption | boolean): Geometry;
|
|
687
|
-
/**
|
|
688
|
-
* @example
|
|
689
|
-
* ```typescript
|
|
690
|
-
* // data: [{x: 'a', y: 10}]
|
|
691
|
-
*
|
|
692
|
-
* // 等同于 tooltip({ fields: [ 'x' ] })
|
|
693
|
-
* tooltip('x');
|
|
694
|
-
*
|
|
695
|
-
* // 等同于 tooltip({ fields: [ 'x', 'y' ] })
|
|
696
|
-
* tooltip('x*y');
|
|
697
|
-
*
|
|
698
|
-
* // 等同于 tooltip({ fields: [ 'x', 'y' ], callback: (x, y) => { x, y } })
|
|
699
|
-
* tooltip('x*y', (x, y) => {
|
|
700
|
-
* return {
|
|
701
|
-
* x,
|
|
702
|
-
* y,
|
|
703
|
-
* };
|
|
704
|
-
* });
|
|
705
|
-
* ```
|
|
706
|
-
*
|
|
707
|
-
* @param field 参与映射的字段。
|
|
708
|
-
* @param cfg Optional, 回调函数
|
|
709
|
-
* @returns
|
|
710
|
-
*/
|
|
711
|
-
public tooltip(field: string, cfg?: TooltipCallback): Geometry;
|
|
712
|
-
public tooltip(field: GeometryTooltipOption | boolean | string, cfg?: TooltipCallback): Geometry {
|
|
713
|
-
if (isString(field)) {
|
|
714
|
-
const fields = parseFields(field);
|
|
715
|
-
this.tooltipOption = {
|
|
716
|
-
fields,
|
|
717
|
-
callback: cfg,
|
|
718
|
-
};
|
|
719
|
-
} else {
|
|
720
|
-
this.tooltipOption = field;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
return this;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Geometry 动画配置。
|
|
728
|
-
*
|
|
729
|
-
* + `animate(false)` 关闭动画
|
|
730
|
-
* + `animate(true)` 开启动画,默认开启。
|
|
731
|
-
*
|
|
732
|
-
* 我们将动画分为四个场景:
|
|
733
|
-
* 1. appear: 图表第一次加载时的入场动画;
|
|
734
|
-
* 2. enter: 图表绘制完成,发生更新后,产生的新图形的进场动画;
|
|
735
|
-
* 3. update: 图表绘制完成,数据发生变更后,有状态变更的图形的更新动画;
|
|
736
|
-
* 4. leave: 图表绘制完成,数据发生变更后,被销毁图形的销毁动画。
|
|
737
|
-
*
|
|
738
|
-
* @example
|
|
739
|
-
* ```typescript
|
|
740
|
-
* animate({
|
|
741
|
-
* enter: {
|
|
742
|
-
* duration: 1000, // enter 动画执行时间
|
|
743
|
-
* },
|
|
744
|
-
* leave: false, // 关闭 leave 销毁动画
|
|
745
|
-
* });
|
|
746
|
-
* ```
|
|
747
|
-
*
|
|
748
|
-
* @param cfg 动画配置
|
|
749
|
-
* @returns
|
|
750
|
-
*/
|
|
751
|
-
public animate(cfg: AnimateOption | boolean): Geometry {
|
|
752
|
-
this.animateOption = cfg;
|
|
753
|
-
return this;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Geometry label 配置。
|
|
758
|
-
*
|
|
759
|
-
* @example
|
|
760
|
-
* ```ts
|
|
761
|
-
* // data: [ {x: 1, y: 2, z: 'a'}, {x: 2, y: 2, z: 'b'} ]
|
|
762
|
-
* // 在每个图形上显示 z 字段对应的数值
|
|
763
|
-
* label({
|
|
764
|
-
* fields: [ 'z' ]
|
|
765
|
-
* });
|
|
766
|
-
*
|
|
767
|
-
* label(false); // 不展示 label
|
|
768
|
-
*
|
|
769
|
-
* // 在每个图形上显示 x 字段对应的数值,同时配置文本颜色为红色
|
|
770
|
-
* label('x', {
|
|
771
|
-
* style: {
|
|
772
|
-
* fill: 'red',
|
|
773
|
-
* },
|
|
774
|
-
* })
|
|
775
|
-
*
|
|
776
|
-
* // 以 type 类型的 label 渲染每个图形上显示 x 字段对应的数值,同时格式化文本内容
|
|
777
|
-
* label('x', (xValue) => {
|
|
778
|
-
* return {
|
|
779
|
-
* content: xValue + '%',
|
|
780
|
-
* };
|
|
781
|
-
* }, {
|
|
782
|
-
* type: 'base' // 声明 label 类型
|
|
783
|
-
* })
|
|
784
|
-
* ```
|
|
785
|
-
*
|
|
786
|
-
* @param field
|
|
787
|
-
* @returns label
|
|
788
|
-
*/
|
|
789
|
-
public label(field: LabelOption | false | string): Geometry;
|
|
790
|
-
public label(field: string, secondParam: GeometryLabelCfg | LabelCallback): Geometry;
|
|
791
|
-
public label(field: string, secondParam: LabelCallback, thirdParam: GeometryLabelCfg): Geometry;
|
|
792
|
-
public label(
|
|
793
|
-
field: string | LabelOption | false,
|
|
794
|
-
secondParam?: GeometryLabelCfg | LabelCallback,
|
|
795
|
-
thirdParam?: GeometryLabelCfg
|
|
796
|
-
): Geometry {
|
|
797
|
-
if (isString(field)) {
|
|
798
|
-
const labelOption: LabelOption = {};
|
|
799
|
-
const fields = parseFields(field);
|
|
800
|
-
labelOption.fields = fields;
|
|
801
|
-
if (isFunction(secondParam)) {
|
|
802
|
-
labelOption.callback = secondParam;
|
|
803
|
-
} else if (isPlainObject(secondParam)) {
|
|
804
|
-
labelOption.cfg = secondParam;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
if (thirdParam) {
|
|
808
|
-
labelOption.cfg = thirdParam;
|
|
809
|
-
}
|
|
810
|
-
this.labelOption = labelOption;
|
|
811
|
-
} else {
|
|
812
|
-
this.labelOption = field;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
return this;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
/**
|
|
819
|
-
* 设置状态对应的样式。
|
|
820
|
-
*
|
|
821
|
-
* @example
|
|
822
|
-
* ```ts
|
|
823
|
-
* chart.interval().state({
|
|
824
|
-
* selected: {
|
|
825
|
-
* animate: { duration: 100, easing: 'easeLinear' },
|
|
826
|
-
* style: {
|
|
827
|
-
* lineWidth: 2,
|
|
828
|
-
* stroke: '#000',
|
|
829
|
-
* },
|
|
830
|
-
* },
|
|
831
|
-
* });
|
|
832
|
-
* ```
|
|
833
|
-
*
|
|
834
|
-
* 如果图形 shape 是由多个 shape 组成,即为一个 G.Group 对象,那么针对 group 中的每个 shape,我们需要使用下列方式进行状态样式设置:
|
|
835
|
-
* 如果我们为 group 中的每个 shape 设置了 'name' 属性(shape.set('name', 'xx')),则以 'name' 作为 key,否则默认以索引值(即 shape 的 添加顺序)为 key。
|
|
836
|
-
*
|
|
837
|
-
* ```ts
|
|
838
|
-
* chart.interval().shape('groupShape').state({
|
|
839
|
-
* selected: {
|
|
840
|
-
* style: {
|
|
841
|
-
* 0: { lineWidth: 2 },
|
|
842
|
-
* 1: { fillOpacity: 1 },
|
|
843
|
-
* }
|
|
844
|
-
* }
|
|
845
|
-
* });
|
|
846
|
-
* ```
|
|
847
|
-
*
|
|
848
|
-
* @param cfg 状态样式
|
|
849
|
-
*/
|
|
850
|
-
public state(cfg: StateOption) {
|
|
851
|
-
this.stateOption = cfg;
|
|
852
|
-
return this;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* 用于向 shape 中传入自定义的数据。目前可能仅仅可能用于在自定义 shape 的时候,像自定义 shape 中传入自定义的数据,方便实现自定义 shape 的配置能力。
|
|
857
|
-
*
|
|
858
|
-
* @example
|
|
859
|
-
* ```ts
|
|
860
|
-
* chart.interval().customInfo({ yourData: 'hello, g2!' });
|
|
861
|
-
* ```
|
|
862
|
-
*
|
|
863
|
-
* 然后在自定义 shape 的时候,可以拿到这个信息。
|
|
864
|
-
*
|
|
865
|
-
* ```ts
|
|
866
|
-
* registerShape('interval', 'your-shape', {
|
|
867
|
-
* draw(shapeInfo, container) {
|
|
868
|
-
* const { customInfo } = shapeInfo;
|
|
869
|
-
* console.log(customInfo); // will log { yourData: 'hello, g2!' }.
|
|
870
|
-
* }
|
|
871
|
-
* });
|
|
872
|
-
* ```
|
|
873
|
-
*
|
|
874
|
-
* @param cfg
|
|
875
|
-
*/
|
|
876
|
-
public customInfo(cfg: any) {
|
|
877
|
-
this.customOption = cfg;
|
|
878
|
-
return this;
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* 初始化 Geomtry 实例:
|
|
883
|
-
* 创建 [[Attribute]] and [[Scale]] 实例,进行数据处理,包括分组、数值化以及数据调整。
|
|
884
|
-
*/
|
|
885
|
-
public init(cfg: InitCfg = {}) {
|
|
886
|
-
this.setCfg(cfg);
|
|
887
|
-
this.initAttributes(); // 创建图形属性
|
|
888
|
-
|
|
889
|
-
// 数据加工:分组 -> 数字化 -> adjust
|
|
890
|
-
this.processData(this.data);
|
|
891
|
-
|
|
892
|
-
// 调整 scale
|
|
893
|
-
this.adjustScale();
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* Geometry 更新。
|
|
898
|
-
* @param [cfg] 更新的配置
|
|
899
|
-
*/
|
|
900
|
-
public update(cfg: InitCfg = {}) {
|
|
901
|
-
const { data, isDataChanged, isCoordinateChanged } = cfg;
|
|
902
|
-
const { attributeOption, lastAttributeOption } = this;
|
|
903
|
-
|
|
904
|
-
if (!isEqual(attributeOption, lastAttributeOption)) {
|
|
905
|
-
// 映射发生改变,则重新创建图形属性
|
|
906
|
-
this.init(cfg);
|
|
907
|
-
} else if (data && (isDataChanged || !isEqual(data, this.data))) {
|
|
908
|
-
// 数据发生变化
|
|
909
|
-
this.setCfg(cfg);
|
|
910
|
-
this.initAttributes(); // 创建图形属性
|
|
911
|
-
this.processData(data); // 数据加工:分组 -> 数字化 -> adjust
|
|
912
|
-
} else {
|
|
913
|
-
// 有可能 coordinate 变化
|
|
914
|
-
this.setCfg(cfg);
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
// 调整 scale
|
|
918
|
-
this.adjustScale();
|
|
919
|
-
this.isCoordinateChanged = isCoordinateChanged;
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
/**
|
|
923
|
-
* 将原始数据映射至图形空间,同时创建图形对象。
|
|
924
|
-
*/
|
|
925
|
-
public paint(isUpdate: boolean = false) {
|
|
926
|
-
if (this.animateOption) {
|
|
927
|
-
this.animateOption = deepMix({}, getDefaultAnimateCfg(this.type, this.coordinate), this.animateOption);
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
this.defaultSize = undefined;
|
|
931
|
-
this.elementsMap = {};
|
|
932
|
-
this.elements = [];
|
|
933
|
-
const offscreenGroup = this.getOffscreenGroup();
|
|
934
|
-
offscreenGroup.clear();
|
|
935
|
-
|
|
936
|
-
const beforeMappingData = this.beforeMappingData;
|
|
937
|
-
const dataArray = this.beforeMapping(beforeMappingData);
|
|
938
|
-
|
|
939
|
-
this.dataArray = new Array(dataArray.length);
|
|
940
|
-
for (let i = 0; i < dataArray.length; i++) {
|
|
941
|
-
const data = dataArray[i];
|
|
942
|
-
this.dataArray[i] = this.mapping(data);
|
|
943
|
-
}
|
|
944
|
-
this.updateElements(this.dataArray, isUpdate);
|
|
945
|
-
this.lastElementsMap = this.elementsMap;
|
|
946
|
-
|
|
947
|
-
if (this.canDoGroupAnimation(isUpdate)) {
|
|
948
|
-
// 如果用户没有配置 appear.animation,就默认走整体动画
|
|
949
|
-
const container = this.container;
|
|
950
|
-
const type = this.type;
|
|
951
|
-
const coordinate = this.coordinate;
|
|
952
|
-
const animateCfg = get(this.animateOption, 'appear');
|
|
953
|
-
const yScale = this.getYScale();
|
|
954
|
-
const yMinPoint = coordinate.convert({
|
|
955
|
-
x: 0,
|
|
956
|
-
y: yScale.scale(this.getYMinValue()),
|
|
957
|
-
});
|
|
958
|
-
doGroupAppearAnimate(container, animateCfg, type, coordinate, yMinPoint);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
// 添加 label
|
|
962
|
-
if (this.labelOption) {
|
|
963
|
-
const deferred = this.useDeferredLabel;
|
|
964
|
-
const callback = (() => this.renderLabels(flatten(this.dataArray) as unknown as MappingDatum[], isUpdate)).bind(this);
|
|
965
|
-
if (typeof deferred === 'number') {
|
|
966
|
-
// Use `requestIdleCallback` to render labels in idle time (like react fiber)
|
|
967
|
-
const timeout = (typeof deferred === 'number' && deferred !== Infinity) ? deferred : 0;
|
|
968
|
-
if (!window.requestIdleCallback) {
|
|
969
|
-
setTimeout(callback, timeout);
|
|
970
|
-
} else {
|
|
971
|
-
const options = timeout && timeout !== Infinity ? { timeout } : undefined;
|
|
972
|
-
window.requestIdleCallback(callback, options);
|
|
973
|
-
}
|
|
974
|
-
} else {
|
|
975
|
-
callback();
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
// 缓存,用于更新
|
|
980
|
-
this.lastAttributeOption = {
|
|
981
|
-
...this.attributeOption,
|
|
982
|
-
};
|
|
983
|
-
|
|
984
|
-
if (this.visible === false) {
|
|
985
|
-
// 用户在初始化的时候声明 visible: false
|
|
986
|
-
this.changeVisible(false);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* 清空当前 Geometry,配置项仍保留,但是内部创建的对象全部清空。
|
|
992
|
-
* @override
|
|
993
|
-
*/
|
|
994
|
-
public clear() {
|
|
995
|
-
const { container, geometryLabel, offscreenGroup } = this;
|
|
996
|
-
if (container) {
|
|
997
|
-
container.clear();
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
if (geometryLabel) {
|
|
1001
|
-
geometryLabel.clear();
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
if (offscreenGroup) {
|
|
1005
|
-
offscreenGroup.clear();
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
// 属性恢复至出厂状态
|
|
1009
|
-
this.scaleDefs = undefined;
|
|
1010
|
-
this.attributes = {};
|
|
1011
|
-
this.scales = {};
|
|
1012
|
-
this.elementsMap = {};
|
|
1013
|
-
this.lastElementsMap = {};
|
|
1014
|
-
this.elements = [];
|
|
1015
|
-
this.adjusts = {};
|
|
1016
|
-
this.dataArray = null;
|
|
1017
|
-
this.beforeMappingData = null;
|
|
1018
|
-
this.lastAttributeOption = undefined;
|
|
1019
|
-
this.defaultSize = undefined;
|
|
1020
|
-
this.idFields = [];
|
|
1021
|
-
this.groupScales = undefined;
|
|
1022
|
-
this.hasSorted = false;
|
|
1023
|
-
this.isCoordinateChanged = false;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* 销毁 Geometry 实例。
|
|
1028
|
-
*/
|
|
1029
|
-
public destroy() {
|
|
1030
|
-
this.clear();
|
|
1031
|
-
const container = this.container;
|
|
1032
|
-
container.remove(true);
|
|
1033
|
-
|
|
1034
|
-
if (this.offscreenGroup) {
|
|
1035
|
-
this.offscreenGroup.remove(true);
|
|
1036
|
-
this.offscreenGroup = null;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
if (this.geometryLabel) {
|
|
1040
|
-
this.geometryLabel.destroy();
|
|
1041
|
-
this.geometryLabel = null;
|
|
1042
|
-
}
|
|
1043
|
-
this.theme = undefined;
|
|
1044
|
-
this.shapeFactory = undefined;
|
|
1045
|
-
|
|
1046
|
-
super.destroy();
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* 获取决定分组的图形属性对应的 scale 实例。
|
|
1051
|
-
* @returns
|
|
1052
|
-
*/
|
|
1053
|
-
public getGroupScales(): Scale[] {
|
|
1054
|
-
return this.groupScales;
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
/**
|
|
1058
|
-
* 根据名字获取图形属性实例。
|
|
1059
|
-
*/
|
|
1060
|
-
public getAttribute(name: string): Attribute {
|
|
1061
|
-
return this.attributes[name];
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/** 获取 x 轴对应的 scale 实例。 */
|
|
1065
|
-
public getXScale(): Scale {
|
|
1066
|
-
return this.getAttribute('position').scales[0];
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
/** 获取 y 轴对应的 scale 实例。 */
|
|
1070
|
-
public getYScale(): Scale {
|
|
1071
|
-
return this.getAttribute('position').scales[1];
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
/**
|
|
1075
|
-
* 获取决定分组的图形属性实例。
|
|
1076
|
-
*/
|
|
1077
|
-
public getGroupAttributes(): Attribute[] {
|
|
1078
|
-
const rst = [];
|
|
1079
|
-
each(this.attributes, (attr: Attribute) => {
|
|
1080
|
-
if (GROUP_ATTRS.includes(attr.type)) {
|
|
1081
|
-
rst.push(attr);
|
|
1082
|
-
}
|
|
1083
|
-
});
|
|
1084
|
-
return rst;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
/** 获取图形属性默认的映射值。 */
|
|
1088
|
-
public getDefaultValue(attrName: string) {
|
|
1089
|
-
let value: any;
|
|
1090
|
-
const attr = this.getAttribute(attrName);
|
|
1091
|
-
if (attr && isEmpty(attr.scales)) {
|
|
1092
|
-
// 获取映射至常量的值
|
|
1093
|
-
value = attr.values[0];
|
|
1094
|
-
}
|
|
1095
|
-
return value;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* 获取该数据发生图形映射后对应的 Attribute 图形空间数据。
|
|
1100
|
-
* @param attr Attribute 图形属性实例。
|
|
1101
|
-
* @param obj 需要进行映射的原始数据。
|
|
1102
|
-
* @returns
|
|
1103
|
-
*/
|
|
1104
|
-
public getAttributeValues(attr: Attribute, obj: Datum) {
|
|
1105
|
-
const params = [];
|
|
1106
|
-
const scales = attr.scales;
|
|
1107
|
-
for (let index = 0, length = scales.length; index < length; index++) {
|
|
1108
|
-
const scale = scales[index];
|
|
1109
|
-
const field = scale.field;
|
|
1110
|
-
if (scale.isIdentity) {
|
|
1111
|
-
params.push(scale.values);
|
|
1112
|
-
} else {
|
|
1113
|
-
params.push(obj[field]);
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
return attr.mapping(...params);
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* 获取对应的 adjust 实例
|
|
1122
|
-
* @param adjustType
|
|
1123
|
-
* @returns
|
|
1124
|
-
*/
|
|
1125
|
-
public getAdjust(adjustType: string) {
|
|
1126
|
-
return this.adjusts[adjustType];
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
/**
|
|
1130
|
-
* 获得 coordinate 实例
|
|
1131
|
-
* @returns
|
|
1132
|
-
*/
|
|
1133
|
-
public getCoordinate() {
|
|
1134
|
-
return this.coordinate;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
public getData() {
|
|
1138
|
-
return this.data;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
/**
|
|
1142
|
-
* 获取 shape 对应的 marker 样式。
|
|
1143
|
-
* @param shapeName shape 具体名字
|
|
1144
|
-
* @param cfg marker 信息
|
|
1145
|
-
* @returns
|
|
1146
|
-
*/
|
|
1147
|
-
public getShapeMarker(shapeName: string, cfg: ShapeMarkerCfg): ShapeMarkerAttrs {
|
|
1148
|
-
const shapeFactory = this.getShapeFactory();
|
|
1149
|
-
return shapeFactory.getMarker(shapeName, cfg);
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* 根据一定的规则查找 Geometry 的 Elements。
|
|
1154
|
-
*
|
|
1155
|
-
* ```typescript
|
|
1156
|
-
* getElementsBy((element) => {
|
|
1157
|
-
* const data = element.getData();
|
|
1158
|
-
*
|
|
1159
|
-
* return data.a === 'a';
|
|
1160
|
-
* });
|
|
1161
|
-
* ```
|
|
1162
|
-
*
|
|
1163
|
-
* @param condition 定义查找规则的回调函数。
|
|
1164
|
-
* @returns
|
|
1165
|
-
*/
|
|
1166
|
-
public getElementsBy(condition: (element: Element) => boolean): Element[] {
|
|
1167
|
-
return this.elements.filter((element) => condition(element));
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
/**
|
|
1171
|
-
* 获取 Geometry 的所有 Elements。
|
|
1172
|
-
*
|
|
1173
|
-
* ```typescript
|
|
1174
|
-
* getElements();
|
|
1175
|
-
* ```
|
|
1176
|
-
*/
|
|
1177
|
-
public getElements() {
|
|
1178
|
-
return this.elements;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* 获取数据对应的唯一 id。
|
|
1183
|
-
* @param data Element 对应的绘制数据
|
|
1184
|
-
* @returns
|
|
1185
|
-
*/
|
|
1186
|
-
public getElementId(data: MappingDatum | MappingDatum[]) {
|
|
1187
|
-
data = isArray(data) ? data[0] : data;
|
|
1188
|
-
const originData = data[FIELD_ORIGIN];
|
|
1189
|
-
|
|
1190
|
-
// 如果用户声明了使用哪些字段作为 id 值
|
|
1191
|
-
if (this.idFields.length) {
|
|
1192
|
-
let elementId = originData[this.idFields[0]];
|
|
1193
|
-
for (let index = 1; index < this.idFields.length; index++) {
|
|
1194
|
-
elementId += '-' + originData[this.idFields[index]];
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
return elementId;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
const type = this.type;
|
|
1201
|
-
const xScale = this.getXScale();
|
|
1202
|
-
const yScale = this.getYScale();
|
|
1203
|
-
const xField = xScale.field || 'x';
|
|
1204
|
-
const yField = yScale.field || 'y';
|
|
1205
|
-
const yVal = originData[yField];
|
|
1206
|
-
let xVal;
|
|
1207
|
-
if (xScale.type === 'identity') {
|
|
1208
|
-
xVal = xScale.values[0];
|
|
1209
|
-
} else {
|
|
1210
|
-
xVal = originData[xField];
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
let id: string;
|
|
1214
|
-
if (type === 'interval' || type === 'schema') {
|
|
1215
|
-
id = `${xVal}`;
|
|
1216
|
-
} else if (type === 'line' || type === 'area' || type === 'path') {
|
|
1217
|
-
id = type;
|
|
1218
|
-
} else {
|
|
1219
|
-
id = `${xVal}-${yVal}`;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
const groupScales = this.groupScales;
|
|
1223
|
-
|
|
1224
|
-
for (let index = 0, length = groupScales.length; index < length; index++) {
|
|
1225
|
-
const groupScale = groupScales[index];
|
|
1226
|
-
const field = groupScale.field;
|
|
1227
|
-
id = `${id}-${originData[field]}`;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
// 用户在进行 dodge 类型的 adjust 调整的时候设置了 dodgeBy 属性
|
|
1231
|
-
const dodgeAdjust = this.getAdjust('dodge');
|
|
1232
|
-
if (dodgeAdjust) {
|
|
1233
|
-
const dodgeBy = dodgeAdjust.dodgeBy;
|
|
1234
|
-
if (dodgeBy) {
|
|
1235
|
-
id = `${id}-${originData[dodgeBy]}`;
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
if (this.getAdjust('jitter')) {
|
|
1240
|
-
id = `${id}-${data.x}-${data.y}`;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
return id;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* 获取所有需要创建 scale 的字段名称。
|
|
1248
|
-
*/
|
|
1249
|
-
public getScaleFields(): string[] {
|
|
1250
|
-
const fields = [];
|
|
1251
|
-
const tmpMap = new Map();
|
|
1252
|
-
const { attributeOption, labelOption, tooltipOption } = this;
|
|
1253
|
-
// 获取图形属性上的 fields
|
|
1254
|
-
for (const attributeType in attributeOption) {
|
|
1255
|
-
if (attributeOption.hasOwnProperty(attributeType)) {
|
|
1256
|
-
const eachOpt = attributeOption[attributeType];
|
|
1257
|
-
if (eachOpt.fields) {
|
|
1258
|
-
uniq(eachOpt.fields, fields, tmpMap);
|
|
1259
|
-
} else if (eachOpt.values) {
|
|
1260
|
-
// 考虑 size(10), shape('circle') 等场景
|
|
1261
|
-
uniq(eachOpt.values, fields, tmpMap);
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
// 获取 label 上的字段
|
|
1266
|
-
if (labelOption && labelOption.fields) {
|
|
1267
|
-
uniq(labelOption.fields, fields, tmpMap);
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
// 获取 tooltip 上的字段
|
|
1271
|
-
if (isObject(tooltipOption) && tooltipOption.fields) {
|
|
1272
|
-
uniq(tooltipOption.fields, fields, tmpMap);
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
return fields;
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* 显示或者隐藏 geometry。
|
|
1280
|
-
* @param visible
|
|
1281
|
-
*/
|
|
1282
|
-
public changeVisible(visible: boolean) {
|
|
1283
|
-
super.changeVisible(visible);
|
|
1284
|
-
const elements = this.elements;
|
|
1285
|
-
for (let index = 0, length = elements.length; index < length; index++) {
|
|
1286
|
-
const element = elements[index];
|
|
1287
|
-
element.changeVisible(visible);
|
|
1288
|
-
}
|
|
1289
|
-
if (visible) {
|
|
1290
|
-
if (this.container) {
|
|
1291
|
-
this.container.show();
|
|
1292
|
-
}
|
|
1293
|
-
if (this.labelsContainer) {
|
|
1294
|
-
this.labelsContainer.show();
|
|
1295
|
-
}
|
|
1296
|
-
} else {
|
|
1297
|
-
if (this.container) {
|
|
1298
|
-
this.container.hide();
|
|
1299
|
-
}
|
|
1300
|
-
if (this.labelsContainer) {
|
|
1301
|
-
this.labelsContainer.hide();
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
/**
|
|
1307
|
-
* 获得所有的字段
|
|
1308
|
-
*/
|
|
1309
|
-
public getFields() {
|
|
1310
|
-
const uniqMap = new Map<string, boolean>();
|
|
1311
|
-
const fields = [];
|
|
1312
|
-
|
|
1313
|
-
Object.values(this.attributeOption).forEach((cfg) => {
|
|
1314
|
-
const fs = cfg?.fields || [];
|
|
1315
|
-
fs.forEach((f) => {
|
|
1316
|
-
if (!uniqMap.has(f)) {
|
|
1317
|
-
fields.push(f);
|
|
1318
|
-
}
|
|
1319
|
-
uniqMap.set(f, true);
|
|
1320
|
-
});
|
|
1321
|
-
}, []);
|
|
1322
|
-
|
|
1323
|
-
return fields;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
/**
|
|
1327
|
-
* 获取当前配置中的所有分组 & 分类的字段。
|
|
1328
|
-
* @return fields string[]
|
|
1329
|
-
*/
|
|
1330
|
-
public getGroupFields(): string[] {
|
|
1331
|
-
const groupFields = [];
|
|
1332
|
-
const tmpMap = new Map(); // 用于去重过滤
|
|
1333
|
-
for (let index = 0, length = GROUP_ATTRS.length; index < length; index++) {
|
|
1334
|
-
const attributeName = GROUP_ATTRS[index];
|
|
1335
|
-
const cfg = this.attributeOption[attributeName];
|
|
1336
|
-
if (cfg && cfg.fields) {
|
|
1337
|
-
uniq(cfg.fields, groupFields, tmpMap);
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
return groupFields;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
/**
|
|
1345
|
-
* 获得图形的 x y 字段。
|
|
1346
|
-
*/
|
|
1347
|
-
public getXYFields() {
|
|
1348
|
-
const [x, y] = this.attributeOption.position.fields;
|
|
1349
|
-
return [x, y];
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
/**
|
|
1353
|
-
* x 字段
|
|
1354
|
-
* @returns
|
|
1355
|
-
*/
|
|
1356
|
-
public getXField(): string {
|
|
1357
|
-
return get(this.getXYFields(), [0]);
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* y 字段
|
|
1362
|
-
* @returns
|
|
1363
|
-
*/
|
|
1364
|
-
public getYField(): string {
|
|
1365
|
-
return get(this.getXYFields(), [1]);
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
/**
|
|
1369
|
-
* 获取该 Geometry 下所有生成的 shapes。
|
|
1370
|
-
* @returns shapes
|
|
1371
|
-
*/
|
|
1372
|
-
public getShapes(): (IShape | IGroup)[] {
|
|
1373
|
-
return this.elements.map((element: Element) => element.shape);
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
/**
|
|
1377
|
-
* 获取虚拟 Group。
|
|
1378
|
-
* @returns
|
|
1379
|
-
*/
|
|
1380
|
-
public getOffscreenGroup() {
|
|
1381
|
-
if (!this.offscreenGroup) {
|
|
1382
|
-
const GroupCtor = this.container.getGroupBase(); // 获取分组的构造函数
|
|
1383
|
-
this.offscreenGroup = new GroupCtor({});
|
|
1384
|
-
}
|
|
1385
|
-
return this.offscreenGroup;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
// 对数据进行排序
|
|
1389
|
-
public sort(mappingArray: Data[]) {
|
|
1390
|
-
if (!this.hasSorted) {
|
|
1391
|
-
// 未发生过排序
|
|
1392
|
-
const xScale = this.getXScale();
|
|
1393
|
-
const xField = xScale.field;
|
|
1394
|
-
for (let index = 0; index < mappingArray.length; index++) {
|
|
1395
|
-
const itemArr = mappingArray[index];
|
|
1396
|
-
itemArr.sort((obj1: Datum, obj2: Datum) => {
|
|
1397
|
-
return xScale.translate(obj1[FIELD_ORIGIN][xField]) - xScale.translate(obj2[FIELD_ORIGIN][xField]);
|
|
1398
|
-
});
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
this.hasSorted = true;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* 调整度量范围。主要针对发生层叠以及一些特殊需求的 Geometry,比如 Interval 下的柱状图 Y 轴默认从 0 开始。
|
|
1407
|
-
*/
|
|
1408
|
-
protected adjustScale() {
|
|
1409
|
-
const yScale = this.getYScale();
|
|
1410
|
-
// 如果数据发生过 stack adjust,需要调整下 yScale 的数据范围
|
|
1411
|
-
if (yScale && this.getAdjust('stack')) {
|
|
1412
|
-
this.updateStackRange(yScale, this.beforeMappingData);
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
/**
|
|
1417
|
-
* 获取当前 Geometry 对应的 Shape 工厂实例。
|
|
1418
|
-
*/
|
|
1419
|
-
protected getShapeFactory() {
|
|
1420
|
-
const shapeType = this.shapeType;
|
|
1421
|
-
if (!getShapeFactory(shapeType)) {
|
|
1422
|
-
return;
|
|
1423
|
-
}
|
|
1424
|
-
if (!this.shapeFactory) {
|
|
1425
|
-
this.shapeFactory = clone(getShapeFactory(shapeType)); // 防止多个 view 共享一个 shapeFactory 实例,导致 coordinate 被篡改
|
|
1426
|
-
}
|
|
1427
|
-
// 因为这里缓存了 shapeFactory,但是外部可能会变更 coordinate,导致无法重新设置到 shapeFactory 中
|
|
1428
|
-
this.shapeFactory.coordinate = this.coordinate;
|
|
1429
|
-
// theme 原因同上
|
|
1430
|
-
this.shapeFactory.theme = this.theme.geometries[shapeType] || {};
|
|
1431
|
-
|
|
1432
|
-
return this.shapeFactory;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
/**
|
|
1436
|
-
* 获取每个 Shape 对应的关键点数据。
|
|
1437
|
-
* @param obj 经过分组 -> 数字化 -> adjust 调整后的数据记录
|
|
1438
|
-
* @returns
|
|
1439
|
-
*/
|
|
1440
|
-
protected createShapePointsCfg(obj: Datum): S {
|
|
1441
|
-
const xScale = this.getXScale();
|
|
1442
|
-
const yScale = this.getYScale();
|
|
1443
|
-
const x = this.normalizeValues(obj[xScale.field], xScale);
|
|
1444
|
-
let y; // 存在没有 y 的情况
|
|
1445
|
-
|
|
1446
|
-
if (yScale) {
|
|
1447
|
-
y = this.normalizeValues(obj[yScale.field], yScale);
|
|
1448
|
-
} else {
|
|
1449
|
-
y = obj.y ? obj.y : 0.1;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
return {
|
|
1453
|
-
x,
|
|
1454
|
-
y,
|
|
1455
|
-
y0: yScale ? yScale.scale(this.getYMinValue()) : undefined,
|
|
1456
|
-
} as S;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* 创建 Element 实例。
|
|
1461
|
-
* @param mappingDatum Element 对应的绘制数据
|
|
1462
|
-
* @param [isUpdate] 是否处于更新阶段
|
|
1463
|
-
* @returns element 返回创建的 Element 实例
|
|
1464
|
-
*/
|
|
1465
|
-
protected createElement(mappingDatum: MappingDatum, index: number, isUpdate: boolean = false): Element {
|
|
1466
|
-
const { container } = this;
|
|
1467
|
-
|
|
1468
|
-
const shapeCfg = this.getDrawCfg(mappingDatum); // 获取绘制图形的配置信息
|
|
1469
|
-
const shapeFactory = this.getShapeFactory();
|
|
1470
|
-
|
|
1471
|
-
const element = new Element({
|
|
1472
|
-
shapeFactory,
|
|
1473
|
-
container,
|
|
1474
|
-
offscreenGroup: this.getOffscreenGroup(),
|
|
1475
|
-
elementIndex: index,
|
|
1476
|
-
});
|
|
1477
|
-
element.animate = this.animateOption;
|
|
1478
|
-
element.geometry = this;
|
|
1479
|
-
element.draw(shapeCfg, isUpdate); // 绘制
|
|
1480
|
-
|
|
1481
|
-
return element;
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
/**
|
|
1485
|
-
* 获取每条数据对应的图形绘制数据。
|
|
1486
|
-
* @param mappingDatum 映射后的数据
|
|
1487
|
-
* @returns draw cfg
|
|
1488
|
-
*/
|
|
1489
|
-
protected getDrawCfg(mappingDatum: MappingDatum): ShapeInfo {
|
|
1490
|
-
const originData = mappingDatum[FIELD_ORIGIN]; // 原始数据
|
|
1491
|
-
const cfg: ShapeInfo = {
|
|
1492
|
-
mappingData: mappingDatum, // 映射后的数据
|
|
1493
|
-
data: originData, // 原始数据
|
|
1494
|
-
x: mappingDatum.x,
|
|
1495
|
-
y: mappingDatum.y,
|
|
1496
|
-
color: mappingDatum.color,
|
|
1497
|
-
size: mappingDatum.size,
|
|
1498
|
-
isInCircle: this.coordinate.isPolar,
|
|
1499
|
-
customInfo: this.customOption,
|
|
1500
|
-
};
|
|
1501
|
-
|
|
1502
|
-
let shapeName = mappingDatum.shape;
|
|
1503
|
-
if (!shapeName && this.getShapeFactory()) {
|
|
1504
|
-
shapeName = this.getShapeFactory().defaultShapeType;
|
|
1505
|
-
}
|
|
1506
|
-
cfg.shape = shapeName;
|
|
1507
|
-
// 获取默认样式
|
|
1508
|
-
const theme = this.theme.geometries[this.shapeType];
|
|
1509
|
-
cfg.defaultStyle = get(theme, [shapeName, 'default'], {}).style;
|
|
1510
|
-
if (!cfg.defaultStyle && this.getShapeFactory()) {
|
|
1511
|
-
cfg.defaultStyle = this.getShapeFactory().getDefaultStyle(theme);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
const styleOption = this.styleOption;
|
|
1515
|
-
if (styleOption) {
|
|
1516
|
-
cfg.style = this.getStyleCfg(styleOption, originData);
|
|
1517
|
-
}
|
|
1518
|
-
if (this.generatePoints) {
|
|
1519
|
-
cfg.points = mappingDatum.points;
|
|
1520
|
-
cfg.nextPoints = mappingDatum.nextPoints;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
return cfg;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
protected updateElements(mappingDataArray: MappingDatum[][], isUpdate: boolean = false): void {
|
|
1527
|
-
const keyDatum = new Map<string, MappingDatum>();
|
|
1528
|
-
const keys: string[] = [];
|
|
1529
|
-
|
|
1530
|
-
// 用来保持 diff 元素之后 added, updated 的相对顺序
|
|
1531
|
-
const keyIndex = new Map<string, number>();
|
|
1532
|
-
let index = 0;
|
|
1533
|
-
|
|
1534
|
-
// 获得更新数据所有的 keys
|
|
1535
|
-
// 将更新的数据用 key 索引
|
|
1536
|
-
for (let i = 0; i < mappingDataArray.length; i++) {
|
|
1537
|
-
const mappingData = mappingDataArray[i];
|
|
1538
|
-
for (let j = 0; j < mappingData.length; j++) {
|
|
1539
|
-
const mappingDatum = mappingData[j];
|
|
1540
|
-
const key = this.getElementId(mappingDatum);
|
|
1541
|
-
const finalKey = keyDatum.has(key) ? `${key}-${i}-${j}` : key;
|
|
1542
|
-
keys.push(finalKey);
|
|
1543
|
-
keyDatum.set(finalKey, mappingDatum);
|
|
1544
|
-
keyIndex.set(finalKey, index);
|
|
1545
|
-
index++;
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
this.elements = new Array(index);
|
|
1550
|
-
|
|
1551
|
-
const { added, updated, removed } = diff(this.lastElementsMap, keys);
|
|
1552
|
-
|
|
1553
|
-
// 新建 element
|
|
1554
|
-
for (const key of added) {
|
|
1555
|
-
const mappingDatum = keyDatum.get(key);
|
|
1556
|
-
const i = keyIndex.get(key);
|
|
1557
|
-
const element = this.createElement(mappingDatum, i, isUpdate);
|
|
1558
|
-
this.elements[i] = element;
|
|
1559
|
-
this.elementsMap[key] = element;
|
|
1560
|
-
if (element.shape) {
|
|
1561
|
-
element.shape.set('zIndex', this.zIndexReversed ? this.elements.length - i : i);
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
// 更新 element
|
|
1566
|
-
for (const key of updated) {
|
|
1567
|
-
const element = this.lastElementsMap[key];
|
|
1568
|
-
const mappingDatum = keyDatum.get(key);
|
|
1569
|
-
const currentShapeCfg = this.getDrawCfg(mappingDatum);
|
|
1570
|
-
const preShapeCfg = element.getModel();
|
|
1571
|
-
const i = keyIndex.get(key);
|
|
1572
|
-
if (this.isCoordinateChanged || isModelChange(currentShapeCfg, preShapeCfg)) {
|
|
1573
|
-
element.animate = this.animateOption;
|
|
1574
|
-
// 通过绘制数据的变更来判断是否需要更新,因为用户有可能会修改图形属性映射
|
|
1575
|
-
element.update(currentShapeCfg); // 更新对应的 element
|
|
1576
|
-
}
|
|
1577
|
-
this.elements[i] = element;
|
|
1578
|
-
this.elementsMap[key] = element;
|
|
1579
|
-
if (element.shape) {
|
|
1580
|
-
element.shape.set('zIndex', this.zIndexReversed ? this.elements.length - i : i);
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
// 全部 setZIndex 之后,再执行 sort
|
|
1585
|
-
if (this.container) {
|
|
1586
|
-
this.container.sort();
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
// 销毁被删除的 elements
|
|
1590
|
-
for (const key of removed) {
|
|
1591
|
-
const element = this.lastElementsMap[key];
|
|
1592
|
-
// 更新动画配置,用户有可能在更新之前有对动画进行配置操作
|
|
1593
|
-
element.animate = this.animateOption;
|
|
1594
|
-
element.destroy();
|
|
1595
|
-
}
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
* 获取渲染的 label 类型。
|
|
1600
|
-
*/
|
|
1601
|
-
protected getLabelType(): string {
|
|
1602
|
-
const { labelOption, coordinate, type } = this;
|
|
1603
|
-
const { type: coordinateType, isTransposed } = coordinate;
|
|
1604
|
-
let labelType = get(labelOption, ['cfg', 'type']);
|
|
1605
|
-
if (!labelType) {
|
|
1606
|
-
// 用户未定义,则进行默认的逻辑
|
|
1607
|
-
if (coordinateType === 'polar') {
|
|
1608
|
-
// 极坐标下使用通用的极坐标文本,转置则使用饼图
|
|
1609
|
-
labelType = isTransposed ? 'pie' : 'polar';
|
|
1610
|
-
} else if (coordinateType === 'theta') {
|
|
1611
|
-
// theta 坐标系下使用饼图文本
|
|
1612
|
-
labelType = 'pie';
|
|
1613
|
-
} else if (type === 'interval' || type === 'polygon') {
|
|
1614
|
-
labelType = 'interval';
|
|
1615
|
-
} else {
|
|
1616
|
-
labelType = 'base';
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
return labelType;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
/**
|
|
1624
|
-
* 获取 Y 轴上的最小值。
|
|
1625
|
-
*/
|
|
1626
|
-
protected getYMinValue(): number {
|
|
1627
|
-
const yScale = this.getYScale();
|
|
1628
|
-
const { min, max } = yScale;
|
|
1629
|
-
let value: number;
|
|
1630
|
-
|
|
1631
|
-
if (min >= 0) {
|
|
1632
|
-
value = min;
|
|
1633
|
-
} else if (max <= 0) {
|
|
1634
|
-
// 当值全位于负区间时,需要保证 ymin 在区域内,不可为 0
|
|
1635
|
-
value = max;
|
|
1636
|
-
} else {
|
|
1637
|
-
value = 0;
|
|
1638
|
-
}
|
|
1639
|
-
return value;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
// 创建图形属性相关的配置项
|
|
1643
|
-
protected createAttrOption(attrName: string, field: AttributeOption | string | number, cfg?) {
|
|
1644
|
-
if (isNil(field) || isObject(field)) {
|
|
1645
|
-
if (isObject(field) && isEqual(Object.keys(field), ['values'])) {
|
|
1646
|
-
// shape({ values: [ 'funnel' ] })
|
|
1647
|
-
set(this.attributeOption, attrName, {
|
|
1648
|
-
fields: field.values,
|
|
1649
|
-
});
|
|
1650
|
-
} else {
|
|
1651
|
-
set(this.attributeOption, attrName, field);
|
|
1652
|
-
}
|
|
1653
|
-
} else {
|
|
1654
|
-
const attrCfg: AttributeOption = {};
|
|
1655
|
-
if (isNumber(field)) {
|
|
1656
|
-
// size(3)
|
|
1657
|
-
attrCfg.values = [field];
|
|
1658
|
-
} else {
|
|
1659
|
-
attrCfg.fields = parseFields(field);
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
if (cfg) {
|
|
1663
|
-
if (isFunction(cfg)) {
|
|
1664
|
-
attrCfg.callback = cfg;
|
|
1665
|
-
} else {
|
|
1666
|
-
attrCfg.values = cfg;
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
set(this.attributeOption, attrName, attrCfg);
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
protected initAttributes() {
|
|
1675
|
-
const { attributes, attributeOption, theme, shapeType } = this;
|
|
1676
|
-
this.groupScales = [];
|
|
1677
|
-
const tmpMap = {};
|
|
1678
|
-
|
|
1679
|
-
// 遍历每一个 attrOption,各自创建 Attribute 实例
|
|
1680
|
-
for (const attrType in attributeOption) {
|
|
1681
|
-
if (attributeOption.hasOwnProperty(attrType)) {
|
|
1682
|
-
const option: AttributeOption = attributeOption[attrType];
|
|
1683
|
-
if (!option) {
|
|
1684
|
-
return;
|
|
1685
|
-
}
|
|
1686
|
-
const attrCfg: AttributeInstanceCfg = {
|
|
1687
|
-
...option,
|
|
1688
|
-
};
|
|
1689
|
-
const { callback, values, fields = [] } = attrCfg;
|
|
1690
|
-
|
|
1691
|
-
// 获取每一个字段对应的 scale
|
|
1692
|
-
const scales = fields.map((field) => {
|
|
1693
|
-
const scale = this.scales[field];
|
|
1694
|
-
if (!tmpMap[field] && GROUP_ATTRS.includes(attrType)) {
|
|
1695
|
-
const inferedScaleType = inferScaleType(scale, get(this.scaleDefs, field), attrType, this.type);
|
|
1696
|
-
if (inferedScaleType === 'cat') {
|
|
1697
|
-
this.groupScales.push(scale);
|
|
1698
|
-
tmpMap[field] = true;
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
return scale;
|
|
1702
|
-
});
|
|
1703
|
-
|
|
1704
|
-
attrCfg.scales = scales;
|
|
1705
|
-
|
|
1706
|
-
if (attrType !== 'position' && scales.length === 1 && scales[0].type === 'identity') {
|
|
1707
|
-
// 用户在图形通道上声明了常量字段 color('red'), size(5)
|
|
1708
|
-
attrCfg.values = scales[0].values;
|
|
1709
|
-
} else if (!callback && !values) {
|
|
1710
|
-
// 用户没有指定任何规则,则使用默认的映射规则
|
|
1711
|
-
if (attrType === 'size') {
|
|
1712
|
-
attrCfg.values = theme.sizes;
|
|
1713
|
-
} else if (attrType === 'shape') {
|
|
1714
|
-
attrCfg.values = theme.shapes[shapeType] || [];
|
|
1715
|
-
} else if (attrType === 'color') {
|
|
1716
|
-
if (scales.length) {
|
|
1717
|
-
// 根据数值个数使用对应的色板
|
|
1718
|
-
attrCfg.values = scales[0].values.length <= 10 ? theme.colors10 : theme.colors20;
|
|
1719
|
-
} else {
|
|
1720
|
-
attrCfg.values = theme.colors10;
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
const AttributeCtor = getAttributeClass(attrType);
|
|
1725
|
-
attributes[attrType] = new AttributeCtor(attrCfg);
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
// 处理数据:分组 -> 数字化 -> adjust 调整
|
|
1731
|
-
private processData(data: Data) {
|
|
1732
|
-
this.hasSorted = false;
|
|
1733
|
-
const { scales } = this.getAttribute('position');
|
|
1734
|
-
const categoryScales = scales.filter((scale: Scale) => scale.isCategory);
|
|
1735
|
-
|
|
1736
|
-
const groupedArray = this.groupData(data); // 数据分组
|
|
1737
|
-
const beforeAdjust = [];
|
|
1738
|
-
for (let i = 0, len = groupedArray.length; i < len; i++) {
|
|
1739
|
-
const subData = groupedArray[i];
|
|
1740
|
-
const arr = [];
|
|
1741
|
-
for (let j = 0, subLen = subData.length; j < subLen; j++) {
|
|
1742
|
-
const originData = subData[j];
|
|
1743
|
-
const item = {};
|
|
1744
|
-
// tslint:disable-next-line: forin
|
|
1745
|
-
for (const k in originData) {
|
|
1746
|
-
item[k] = originData[k];
|
|
1747
|
-
}
|
|
1748
|
-
item[FIELD_ORIGIN] = originData;
|
|
1749
|
-
|
|
1750
|
-
// 将分类数据翻译成数据, 仅对位置相关的度量进行数字化处理
|
|
1751
|
-
for (const scale of categoryScales) {
|
|
1752
|
-
const field = scale.field;
|
|
1753
|
-
item[field] = scale.translate(item[field]);
|
|
1754
|
-
}
|
|
1755
|
-
arr.push(item);
|
|
1756
|
-
}
|
|
1757
|
-
beforeAdjust.push(arr);
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
const dataArray = this.adjustData(beforeAdjust); // 进行 adjust 数据调整
|
|
1761
|
-
this.beforeMappingData = dataArray;
|
|
1762
|
-
|
|
1763
|
-
return dataArray;
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
// 调整数据
|
|
1767
|
-
private adjustData(dataArray: Data[]): Data[] {
|
|
1768
|
-
const adjustOption = this.adjustOption;
|
|
1769
|
-
const { intervalPadding, dodgePadding, theme } = this;
|
|
1770
|
-
// 兼容theme配置
|
|
1771
|
-
const maxColumnWidth = this.maxColumnWidth || theme.maxColumnWidth;
|
|
1772
|
-
const minColumnWidth = this.minColumnWidth || theme.minColumnWidth;
|
|
1773
|
-
const columnWidthRatio = this.columnWidthRatio || theme.columnWidthRatio;
|
|
1774
|
-
let result = dataArray;
|
|
1775
|
-
|
|
1776
|
-
if (adjustOption) {
|
|
1777
|
-
const xScale = this.getXScale();
|
|
1778
|
-
const yScale = this.getYScale();
|
|
1779
|
-
const xField = xScale.field;
|
|
1780
|
-
const yField = yScale ? yScale.field : null;
|
|
1781
|
-
const xDimensionLength = getXDimensionLength(this.coordinate);
|
|
1782
|
-
const groupNum = xScale.values.length;
|
|
1783
|
-
// 传入size计算相关参数,默认宽度、最大最小宽度约束
|
|
1784
|
-
const sizeAttr = this.getAttribute('size');
|
|
1785
|
-
let defaultSize;
|
|
1786
|
-
if (sizeAttr) {
|
|
1787
|
-
defaultSize = sizeAttr.values[0];
|
|
1788
|
-
}
|
|
1789
|
-
for (let i = 0, len = adjustOption.length; i < len; i++) {
|
|
1790
|
-
const adjust = adjustOption[i];
|
|
1791
|
-
const adjustCfg: AdjustInstanceCfg = {
|
|
1792
|
-
xField,
|
|
1793
|
-
yField,
|
|
1794
|
-
intervalPadding,
|
|
1795
|
-
dodgePadding,
|
|
1796
|
-
xDimensionLength,
|
|
1797
|
-
groupNum,
|
|
1798
|
-
defaultSize,
|
|
1799
|
-
maxColumnWidth,
|
|
1800
|
-
minColumnWidth,
|
|
1801
|
-
columnWidthRatio,
|
|
1802
|
-
...adjust,
|
|
1803
|
-
};
|
|
1804
|
-
const type = adjust.type;
|
|
1805
|
-
if (type === 'dodge') {
|
|
1806
|
-
const adjustNames = [];
|
|
1807
|
-
if (xScale.isCategory || xScale.type === 'identity') {
|
|
1808
|
-
adjustNames.push('x');
|
|
1809
|
-
} else if (!yScale) {
|
|
1810
|
-
adjustNames.push('y');
|
|
1811
|
-
} else {
|
|
1812
|
-
throw new Error('dodge is not support linear attribute, please use category attribute!');
|
|
1813
|
-
}
|
|
1814
|
-
adjustCfg.adjustNames = adjustNames;
|
|
1815
|
-
// 每个分组内每条柱子的宽度占比,用户不可指定,用户需要通过 columnWidthRatio 指定
|
|
1816
|
-
// 兼容theme配置
|
|
1817
|
-
adjustCfg.dodgeRatio = columnWidthRatio;
|
|
1818
|
-
} else if (type === 'stack') {
|
|
1819
|
-
const coordinate = this.coordinate;
|
|
1820
|
-
if (!yScale) {
|
|
1821
|
-
// 一维的情况下获取高度和默认size
|
|
1822
|
-
adjustCfg.height = coordinate.getHeight();
|
|
1823
|
-
const size = this.getDefaultValue('size') || 3;
|
|
1824
|
-
adjustCfg.size = size;
|
|
1825
|
-
}
|
|
1826
|
-
// 不进行 transpose 时,用户又没有设置这个参数时,默认从上向下
|
|
1827
|
-
if (!coordinate.isTransposed && isNil(adjustCfg.reverseOrder)) {
|
|
1828
|
-
adjustCfg.reverseOrder = true;
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
const adjustCtor = getAdjustClass(type);
|
|
1832
|
-
adjustCfg.dimValuesMap = {};
|
|
1833
|
-
//生成dimValuesMap
|
|
1834
|
-
if (xScale && xScale.values) {
|
|
1835
|
-
adjustCfg.dimValuesMap[xScale.field] = xScale.values.map((v) => xScale.translate(v));
|
|
1836
|
-
}
|
|
1837
|
-
const adjustInstance = new adjustCtor(adjustCfg);
|
|
1838
|
-
|
|
1839
|
-
result = adjustInstance.process(result);
|
|
1840
|
-
|
|
1841
|
-
this.adjusts[type] = adjustInstance;
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
return result;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
// 对数据进行分组
|
|
1849
|
-
private groupData(data: Data): Data[] {
|
|
1850
|
-
const groupScales = this.getGroupScales();
|
|
1851
|
-
const scaleDefs = this.scaleDefs;
|
|
1852
|
-
const appendConditions = {};
|
|
1853
|
-
const groupFields = [];
|
|
1854
|
-
for (let index = 0; index < groupScales.length; index++) {
|
|
1855
|
-
const scale = groupScales[index];
|
|
1856
|
-
const field = scale.field;
|
|
1857
|
-
groupFields.push(field);
|
|
1858
|
-
if (get(scaleDefs, [field, 'values'])) {
|
|
1859
|
-
// 用户通过 view.scale() 接口指定了 values 属性
|
|
1860
|
-
appendConditions[field] = scaleDefs[field].values;
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
return group(data, groupFields, appendConditions);
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
// 更新发生层叠后的数据对应的度量范围
|
|
1868
|
-
private updateStackRange(scale: Scale, dataArray: Data[]) {
|
|
1869
|
-
const mergeArray = flatten(dataArray);
|
|
1870
|
-
const field = scale.field;
|
|
1871
|
-
let min = scale.min;
|
|
1872
|
-
let max = scale.max;
|
|
1873
|
-
for (let index = 0; index < mergeArray.length; index++) {
|
|
1874
|
-
const obj = mergeArray[index];
|
|
1875
|
-
const tmpMin = Math.min.apply(null, obj[field]);
|
|
1876
|
-
const tmpMax = Math.max.apply(null, obj[field]);
|
|
1877
|
-
if (tmpMin < min) {
|
|
1878
|
-
min = tmpMin;
|
|
1879
|
-
}
|
|
1880
|
-
if (tmpMax > max) {
|
|
1881
|
-
max = tmpMax;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
const scaleDefs = this.scaleDefs;
|
|
1885
|
-
const cfg: LooseObject = {};
|
|
1886
|
-
if (min < scale.min && !get(scaleDefs, [field, 'min'])) {
|
|
1887
|
-
// 用户如果在列定义中定义了 min,则以用户定义的为准
|
|
1888
|
-
cfg.min = min;
|
|
1889
|
-
}
|
|
1890
|
-
if (max > scale.max && !get(scaleDefs, [field, 'max'])) {
|
|
1891
|
-
// 用户如果在列定义中定义了 max
|
|
1892
|
-
cfg.max = max;
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
scale.change(cfg);
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
// 将数据映射至图形空间前的操作:排序以及关键点的生成
|
|
1899
|
-
private beforeMapping(beforeMappingData: Data[]) {
|
|
1900
|
-
// 当初加 clone 是因为 points 的引用关系,导致更新失败,可是现在貌似复现不出来了,所以暂时不进行 clone
|
|
1901
|
-
// const source = clone(beforeMappingData);
|
|
1902
|
-
const source = beforeMappingData;
|
|
1903
|
-
if (this.sortable) {
|
|
1904
|
-
this.sort(source);
|
|
1905
|
-
}
|
|
1906
|
-
if (this.generatePoints) {
|
|
1907
|
-
// 需要生成关键点
|
|
1908
|
-
for (let index = 0, length = source.length; index < length; index++) {
|
|
1909
|
-
const currentData = source[index];
|
|
1910
|
-
this.generateShapePoints(currentData);
|
|
1911
|
-
const nextData = source[index + 1];
|
|
1912
|
-
if (nextData) {
|
|
1913
|
-
this.generateShapePoints(nextData);
|
|
1914
|
-
currentData[0].nextPoints = nextData[0].points;
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
return source;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
// 生成 shape 的关键点
|
|
1923
|
-
private generateShapePoints(data: Data) {
|
|
1924
|
-
const shapeFactory = this.getShapeFactory();
|
|
1925
|
-
const shapeAttr = this.getAttribute('shape');
|
|
1926
|
-
for (let index = 0; index < data.length; index++) {
|
|
1927
|
-
const obj = data[index];
|
|
1928
|
-
const cfg = this.createShapePointsCfg(obj);
|
|
1929
|
-
const shape = shapeAttr ? this.getAttributeValues(shapeAttr, obj) : null;
|
|
1930
|
-
const points = shapeFactory.getShapePoints(shape, cfg);
|
|
1931
|
-
obj.points = points;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
// 将数据归一化
|
|
1936
|
-
private normalizeValues(values, scale) {
|
|
1937
|
-
let rst = [];
|
|
1938
|
-
if (isArray(values)) {
|
|
1939
|
-
for (let index = 0; index < values.length; index++) {
|
|
1940
|
-
const value = values[index];
|
|
1941
|
-
rst.push(scale.scale(value));
|
|
1942
|
-
}
|
|
1943
|
-
} else {
|
|
1944
|
-
rst = scale.scale(values);
|
|
1945
|
-
}
|
|
1946
|
-
return rst;
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
// 将数据映射至图形空间
|
|
1950
|
-
private mapping(data: Data): MappingDatum[] {
|
|
1951
|
-
const attributes = this.attributes;
|
|
1952
|
-
const mappingData = [];
|
|
1953
|
-
for (let index = 0; index < data.length; index++) {
|
|
1954
|
-
const record = data[index];
|
|
1955
|
-
const newRecord: MappingDatum = {
|
|
1956
|
-
_origin: record[FIELD_ORIGIN],
|
|
1957
|
-
points: record.points,
|
|
1958
|
-
nextPoints: record.nextPoints,
|
|
1959
|
-
};
|
|
1960
|
-
for (const k in attributes) {
|
|
1961
|
-
if (attributes.hasOwnProperty(k)) {
|
|
1962
|
-
const attr = attributes[k];
|
|
1963
|
-
const names = attr.names;
|
|
1964
|
-
const values = this.getAttributeValues(attr, record);
|
|
1965
|
-
if (names.length > 1) {
|
|
1966
|
-
// position 之类的生成多个字段的属性
|
|
1967
|
-
for (let j = 0; j < values.length; j += 1) {
|
|
1968
|
-
const val = values[j];
|
|
1969
|
-
const name = names[j];
|
|
1970
|
-
newRecord[name] = isArray(val) && val.length === 1 ? val[0] : val; // 只有一个值时返回第一个属性值
|
|
1971
|
-
}
|
|
1972
|
-
} else {
|
|
1973
|
-
// values.length === 1 的判断是以下情况,获取用户设置的图形属性值
|
|
1974
|
-
// shape('a', ['dot', 'dash']), color('a', ['red', 'yellow'])
|
|
1975
|
-
newRecord[names[0]] = values.length === 1 ? values[0] : values;
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
this.convertPoint(newRecord); // 将 x、y 转换成画布坐标
|
|
1981
|
-
mappingData.push(newRecord);
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
return mappingData;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
// 将归一化的坐标值转换成画布坐标
|
|
1988
|
-
private convertPoint(mappingRecord: MappingDatum) {
|
|
1989
|
-
const { x, y } = mappingRecord;
|
|
1990
|
-
|
|
1991
|
-
let rstX;
|
|
1992
|
-
let rstY;
|
|
1993
|
-
let obj;
|
|
1994
|
-
const coordinate = this.coordinate;
|
|
1995
|
-
if (isArray(x) && isArray(y)) {
|
|
1996
|
-
rstX = [];
|
|
1997
|
-
rstY = [];
|
|
1998
|
-
for (let i = 0, j = 0, xLen = x.length, yLen = y.length; i < xLen && j < yLen; i += 1, j += 1) {
|
|
1999
|
-
obj = coordinate.convert({
|
|
2000
|
-
x: x[i],
|
|
2001
|
-
y: y[j],
|
|
2002
|
-
});
|
|
2003
|
-
rstX.push(obj.x);
|
|
2004
|
-
rstY.push(obj.y);
|
|
2005
|
-
}
|
|
2006
|
-
} else if (isArray(y)) {
|
|
2007
|
-
rstY = [];
|
|
2008
|
-
for (let index = 0; index < y.length; index++) {
|
|
2009
|
-
const yVal = y[index];
|
|
2010
|
-
obj = coordinate.convert({
|
|
2011
|
-
x: x as number,
|
|
2012
|
-
y: yVal,
|
|
2013
|
-
});
|
|
2014
|
-
if (rstX && rstX !== obj.x) {
|
|
2015
|
-
if (!isArray(rstX)) {
|
|
2016
|
-
rstX = [rstX];
|
|
2017
|
-
}
|
|
2018
|
-
rstX.push(obj.x);
|
|
2019
|
-
} else {
|
|
2020
|
-
rstX = obj.x;
|
|
2021
|
-
}
|
|
2022
|
-
rstY.push(obj.y);
|
|
2023
|
-
}
|
|
2024
|
-
} else if (isArray(x)) {
|
|
2025
|
-
rstX = [];
|
|
2026
|
-
for (let index = 0; index < x.length; index++) {
|
|
2027
|
-
const xVal = x[index];
|
|
2028
|
-
obj = coordinate.convert({
|
|
2029
|
-
x: xVal,
|
|
2030
|
-
y,
|
|
2031
|
-
});
|
|
2032
|
-
if (rstY && rstY !== obj.y) {
|
|
2033
|
-
if (!isArray(rstY)) {
|
|
2034
|
-
rstY = [rstY];
|
|
2035
|
-
}
|
|
2036
|
-
rstY.push(obj.y);
|
|
2037
|
-
} else {
|
|
2038
|
-
rstY = obj.y;
|
|
2039
|
-
}
|
|
2040
|
-
rstX.push(obj.x);
|
|
2041
|
-
}
|
|
2042
|
-
} else {
|
|
2043
|
-
const point = coordinate.convert({
|
|
2044
|
-
x,
|
|
2045
|
-
y,
|
|
2046
|
-
});
|
|
2047
|
-
rstX = point.x;
|
|
2048
|
-
rstY = point.y;
|
|
2049
|
-
}
|
|
2050
|
-
mappingRecord.x = rstX;
|
|
2051
|
-
mappingRecord.y = rstY;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
// 获取 style 配置
|
|
2055
|
-
private getStyleCfg(styleOption: StyleOption, originData: Datum) {
|
|
2056
|
-
const { fields = [], callback, cfg } = styleOption;
|
|
2057
|
-
if (cfg) {
|
|
2058
|
-
// 用户直接配置样式属性
|
|
2059
|
-
return cfg;
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
const params = fields.map((field) => {
|
|
2063
|
-
return originData[field];
|
|
2064
|
-
});
|
|
2065
|
-
|
|
2066
|
-
return callback(...params);
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
private setCfg(cfg: InitCfg) {
|
|
2070
|
-
const { coordinate, data, theme, scaleDefs } = cfg;
|
|
2071
|
-
if (coordinate) {
|
|
2072
|
-
this.coordinate = coordinate;
|
|
2073
|
-
}
|
|
2074
|
-
if (data) {
|
|
2075
|
-
this.data = data;
|
|
2076
|
-
}
|
|
2077
|
-
if (scaleDefs) {
|
|
2078
|
-
this.scaleDefs = scaleDefs;
|
|
2079
|
-
this.idFields = [];
|
|
2080
|
-
each(scaleDefs, (scaleDef, field) => {
|
|
2081
|
-
if (scaleDef && scaleDef.key) {
|
|
2082
|
-
this.idFields.push(field);
|
|
2083
|
-
}
|
|
2084
|
-
});
|
|
2085
|
-
}
|
|
2086
|
-
if (theme) {
|
|
2087
|
-
this.theme = this.userTheme ? deepMix({}, theme, this.userTheme) : theme; // 支持 geometry 层级的主题设置
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
private async renderLabels(mappingArray: MappingDatum[], isUpdate: boolean = false) {
|
|
2092
|
-
let geometryLabel = this.geometryLabel;
|
|
2093
|
-
|
|
2094
|
-
this.emit(GEOMETRY_LIFE_CIRCLE.BEFORE_RENDER_LABEL);
|
|
2095
|
-
|
|
2096
|
-
if (!geometryLabel) {
|
|
2097
|
-
// 初次创建
|
|
2098
|
-
const labelType = this.getLabelType();
|
|
2099
|
-
const GeometryLabelsCtor = getGeometryLabel(labelType);
|
|
2100
|
-
geometryLabel = new GeometryLabelsCtor(this);
|
|
2101
|
-
this.geometryLabel = geometryLabel;
|
|
2102
|
-
}
|
|
2103
|
-
await geometryLabel.render(mappingArray, isUpdate);
|
|
2104
|
-
|
|
2105
|
-
// 将 label 同 element 进行关联
|
|
2106
|
-
const labelsMap = geometryLabel.labelsRenderer.shapesMap;
|
|
2107
|
-
// Store labels for every element.
|
|
2108
|
-
const elementLabels = new Map<Element, Set<IGroup>>();
|
|
2109
|
-
each(labelsMap, (labelGroup: IGroup, labelGroupId: string) => {
|
|
2110
|
-
const labelChildren = labelGroup.getChildren() || [];
|
|
2111
|
-
for (let j = 0; j < labelChildren.length; j++) {
|
|
2112
|
-
const labelShape = labelChildren[j];
|
|
2113
|
-
const element = this.elementsMap[labelShape.get('elementId') || labelGroupId.split(' ')[0]];
|
|
2114
|
-
if (element) {
|
|
2115
|
-
labelShape.cfg.name = ['element', 'label'];
|
|
2116
|
-
labelShape.cfg.element = element;
|
|
2117
|
-
const labels = elementLabels.get(element) || new Set();
|
|
2118
|
-
labels.add(labelGroup);
|
|
2119
|
-
elementLabels.set(element, labels);
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
});
|
|
2123
|
-
for (const [element, labels] of elementLabels.entries()) {
|
|
2124
|
-
element.labelShape = [...labels];
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
this.emit(GEOMETRY_LIFE_CIRCLE.AFTER_RENDER_LABEL);
|
|
2128
|
-
}
|
|
2129
|
-
/**
|
|
2130
|
-
* 是否需要进行群组入场动画
|
|
2131
|
-
* 规则:
|
|
2132
|
-
* 1. 如果发生更新,则不进行
|
|
2133
|
-
* 2. 如果用户关闭 geometry 动画,则不进行
|
|
2134
|
-
* 3. 如果用户关闭了 appear 动画,则不进行
|
|
2135
|
-
* 4. 如果用户配置了 appear.animation,则不进行
|
|
2136
|
-
*/
|
|
2137
|
-
private canDoGroupAnimation(isUpdate: boolean) {
|
|
2138
|
-
return (
|
|
2139
|
-
!isUpdate &&
|
|
2140
|
-
this.animateOption &&
|
|
2141
|
-
(get(this.animateOption, 'appear') === undefined ||
|
|
2142
|
-
(get(this.animateOption, 'appear') && get(this.animateOption, ['appear', 'animation']) === undefined))
|
|
2143
|
-
);
|
|
2144
|
-
}
|
|
2145
|
-
}
|