@antv/g2 4.2.6 → 5.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +3 -3
- package/README.en-US.md +10 -9
- package/README.md +18 -7
- 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 +23 -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 +161 -0
- package/esm/animation/morphing.js.map +1 -0
- package/esm/animation/scaleInX.d.ts +7 -0
- package/esm/animation/scaleInX.js +46 -0
- package/esm/animation/scaleInX.js.map +1 -0
- package/esm/animation/scaleInY.d.ts +7 -0
- package/esm/animation/scaleInY.js +46 -0
- package/esm/animation/scaleInY.js.map +1 -0
- package/esm/animation/scaleOutX.d.ts +7 -0
- package/esm/animation/scaleOutX.js +46 -0
- package/esm/animation/scaleOutX.js.map +1 -0
- package/esm/animation/scaleOutY.d.ts +7 -0
- package/esm/animation/scaleOutY.js +46 -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 +30 -0
- package/esm/api/chart.js +102 -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 +1 -0
- package/esm/api/index.js +2 -0
- package/esm/api/index.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 +38 -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 +40 -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 +287 -0
- package/esm/composition/rect.js.map +1 -0
- package/esm/composition/utils.d.ts +10 -0
- package/esm/composition/utils.js +14 -0
- package/esm/composition/utils.js.map +1 -0
- package/esm/composition/view.d.ts +9 -0
- package/esm/composition/view.js +32 -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/index.d.ts +5 -0
- package/esm/coordinate/index.js +6 -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/transpose.d.ts +7 -0
- package/esm/coordinate/transpose.js +11 -0
- package/esm/coordinate/transpose.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 +47 -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 +39 -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 +33 -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/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 +10 -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 +132 -0
- package/esm/runtime/component.js.map +1 -0
- package/esm/runtime/coordinate.d.ts +7 -0
- package/esm/runtime/coordinate.js +34 -0
- package/esm/runtime/coordinate.js.map +1 -0
- package/esm/runtime/index.d.ts +7 -0
- package/esm/runtime/index.js +8 -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 +183 -0
- package/esm/runtime/mark.js.map +1 -0
- package/esm/runtime/plot.d.ts +3 -0
- package/esm/runtime/plot.js +554 -0
- package/esm/runtime/plot.js.map +1 -0
- package/esm/runtime/render.d.ts +2 -0
- package/esm/runtime/render.js +78 -0
- package/esm/runtime/render.js.map +1 -0
- package/esm/runtime/scale.d.ts +8 -0
- package/esm/runtime/scale.js +326 -0
- package/esm/runtime/scale.js.map +1 -0
- package/esm/runtime/types/common.d.ts +125 -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 +73 -0
- package/esm/runtime/types/component.js +2 -0
- package/esm/runtime/types/component.js.map +1 -0
- package/esm/runtime/types/encode.d.ts +21 -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 +106 -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 +23 -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 +80 -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 +29 -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 +52 -0
- package/esm/shape/utils.js +67 -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 +124 -0
- package/esm/spec/composition.js +2 -0
- package/esm/spec/composition.js.map +1 -0
- package/esm/spec/coordinate.d.ts +30 -0
- package/esm/spec/coordinate.js +2 -0
- package/esm/spec/coordinate.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 +60 -0
- package/esm/spec/geometry.js +2 -0
- package/esm/spec/geometry.js.map +1 -0
- package/esm/spec/index.d.ts +16 -0
- package/esm/spec/index.js +12 -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/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/statistic.d.ts +69 -0
- package/esm/spec/statistic.js +2 -0
- package/esm/spec/statistic.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 +177 -0
- package/esm/spec/transform.js +2 -0
- package/esm/spec/transform.js.map +1 -0
- package/esm/stdlib/index.d.ts +2 -0
- package/esm/stdlib/index.js +185 -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 +30 -0
- package/esm/theme/light.js.map +1 -0
- package/esm/transform/index.d.ts +36 -0
- package/esm/transform/index.js +40 -0
- package/esm/transform/index.js.map +1 -0
- package/esm/transform/inference/maybeArrayField.d.ts +8 -0
- package/esm/transform/inference/maybeArrayField.js +47 -0
- package/esm/transform/inference/maybeArrayField.js.map +1 -0
- package/esm/transform/inference/maybeKey.d.ts +9 -0
- package/esm/transform/inference/maybeKey.js +33 -0
- package/esm/transform/inference/maybeKey.js.map +1 -0
- package/esm/transform/inference/maybeSeries.d.ts +7 -0
- package/esm/transform/inference/maybeSeries.js +23 -0
- package/esm/transform/inference/maybeSeries.js.map +1 -0
- package/esm/transform/inference/maybeSize.d.ts +7 -0
- package/esm/transform/inference/maybeSize.js +14 -0
- package/esm/transform/inference/maybeSize.js.map +1 -0
- package/esm/transform/inference/maybeStackY.d.ts +9 -0
- package/esm/transform/inference/maybeStackY.js +32 -0
- package/esm/transform/inference/maybeStackY.js.map +1 -0
- package/esm/transform/inference/maybeTitleX.d.ts +7 -0
- package/esm/transform/inference/maybeTitleX.js +23 -0
- package/esm/transform/inference/maybeTitleX.js.map +1 -0
- package/esm/transform/inference/maybeTooltip.d.ts +9 -0
- package/esm/transform/inference/maybeTooltip.js +30 -0
- package/esm/transform/inference/maybeTooltip.js.map +1 -0
- package/esm/transform/inference/maybeTooltipPosition.d.ts +7 -0
- package/esm/transform/inference/maybeTooltipPosition.js +12 -0
- package/esm/transform/inference/maybeTooltipPosition.js.map +1 -0
- package/esm/transform/inference/maybeTooltipY.d.ts +7 -0
- package/esm/transform/inference/maybeTooltipY.js +12 -0
- package/esm/transform/inference/maybeTooltipY.js.map +1 -0
- package/esm/transform/inference/maybeZeroX.d.ts +7 -0
- package/esm/transform/inference/maybeZeroX.js +14 -0
- package/esm/transform/inference/maybeZeroX.js.map +1 -0
- package/esm/transform/inference/maybeZeroY.d.ts +7 -0
- package/esm/transform/inference/maybeZeroY.js +14 -0
- package/esm/transform/inference/maybeZeroY.js.map +1 -0
- package/esm/transform/inference/maybeZeroY1.d.ts +7 -0
- package/esm/transform/inference/maybeZeroY1.js +14 -0
- package/esm/transform/inference/maybeZeroY1.js.map +1 -0
- package/esm/transform/preprocessor/arc.d.ts +7 -0
- package/esm/transform/preprocessor/arc.js +16 -0
- package/esm/transform/preprocessor/arc.js.map +1 -0
- package/esm/transform/preprocessor/cluster.d.ts +5 -0
- package/esm/transform/preprocessor/cluster.js +40 -0
- package/esm/transform/preprocessor/cluster.js.map +1 -0
- package/esm/transform/preprocessor/connector.d.ts +7 -0
- package/esm/transform/preprocessor/connector.js +16 -0
- package/esm/transform/preprocessor/connector.js.map +1 -0
- package/esm/transform/preprocessor/fetch.d.ts +8 -0
- package/esm/transform/preprocessor/fetch.js +36 -0
- package/esm/transform/preprocessor/fetch.js.map +1 -0
- package/esm/transform/preprocessor/filterBy.d.ts +8 -0
- package/esm/transform/preprocessor/filterBy.js +18 -0
- package/esm/transform/preprocessor/filterBy.js.map +1 -0
- package/esm/transform/preprocessor/fold.d.ts +8 -0
- package/esm/transform/preprocessor/fold.js +27 -0
- package/esm/transform/preprocessor/fold.js.map +1 -0
- package/esm/transform/preprocessor/pick.d.ts +7 -0
- package/esm/transform/preprocessor/pick.js +12 -0
- package/esm/transform/preprocessor/pick.js.map +1 -0
- package/esm/transform/preprocessor/rename.d.ts +8 -0
- package/esm/transform/preprocessor/rename.js +20 -0
- package/esm/transform/preprocessor/rename.js.map +1 -0
- package/esm/transform/preprocessor/sankey.d.ts +8 -0
- package/esm/transform/preprocessor/sankey.js +80 -0
- package/esm/transform/preprocessor/sankey.js.map +1 -0
- package/esm/transform/preprocessor/sortBy.d.ts +7 -0
- package/esm/transform/preprocessor/sortBy.js +19 -0
- package/esm/transform/preprocessor/sortBy.js.map +1 -0
- package/esm/transform/preprocessor/subset.d.ts +7 -0
- package/esm/transform/preprocessor/subset.js +31 -0
- package/esm/transform/preprocessor/subset.js.map +1 -0
- package/esm/transform/preprocessor/tree.d.ts +4 -0
- package/esm/transform/preprocessor/tree.js +7 -0
- package/esm/transform/preprocessor/tree.js.map +1 -0
- package/esm/transform/preprocessor/voronoi.d.ts +4 -0
- package/esm/transform/preprocessor/voronoi.js +20 -0
- package/esm/transform/preprocessor/voronoi.js.map +1 -0
- package/esm/transform/preprocessor/wordCloud.d.ts +6 -0
- package/esm/transform/preprocessor/wordCloud.js +106 -0
- package/esm/transform/preprocessor/wordCloud.js.map +1 -0
- package/esm/transform/statistic/Select.d.ts +9 -0
- package/esm/transform/statistic/Select.js +58 -0
- package/esm/transform/statistic/Select.js.map +1 -0
- package/esm/transform/statistic/SelectX.d.ts +7 -0
- package/esm/transform/statistic/SelectX.js +23 -0
- package/esm/transform/statistic/SelectX.js.map +1 -0
- package/esm/transform/statistic/SelectY.d.ts +7 -0
- package/esm/transform/statistic/SelectY.js +23 -0
- package/esm/transform/statistic/SelectY.js.map +1 -0
- package/esm/transform/statistic/dodgeX.d.ts +9 -0
- package/esm/transform/statistic/dodgeX.js +56 -0
- package/esm/transform/statistic/dodgeX.js.map +1 -0
- package/esm/transform/statistic/groupX.d.ts +8 -0
- package/esm/transform/statistic/groupX.js +85 -0
- package/esm/transform/statistic/groupX.js.map +1 -0
- package/esm/transform/statistic/jitter.d.ts +9 -0
- package/esm/transform/statistic/jitter.js +40 -0
- package/esm/transform/statistic/jitter.js.map +1 -0
- package/esm/transform/statistic/jitterY.d.ts +8 -0
- package/esm/transform/statistic/jitterY.js +27 -0
- package/esm/transform/statistic/jitterY.js.map +1 -0
- package/esm/transform/statistic/normalizeY.d.ts +9 -0
- package/esm/transform/statistic/normalizeY.js +70 -0
- package/esm/transform/statistic/normalizeY.js.map +1 -0
- package/esm/transform/statistic/stackEnter.d.ts +13 -0
- package/esm/transform/statistic/stackEnter.js +59 -0
- package/esm/transform/statistic/stackEnter.js.map +1 -0
- package/esm/transform/statistic/stackY.d.ts +9 -0
- package/esm/transform/statistic/stackY.js +55 -0
- package/esm/transform/statistic/stackY.js.map +1 -0
- package/esm/transform/statistic/symmetryY.d.ts +8 -0
- package/esm/transform/statistic/symmetryY.js +61 -0
- package/esm/transform/statistic/symmetryY.js.map +1 -0
- package/esm/transform/statistic/utils.d.ts +9 -0
- package/esm/transform/statistic/utils.js +70 -0
- package/esm/transform/statistic/utils.js.map +1 -0
- package/esm/transform/utils/arc/arc.d.ts +8 -0
- package/esm/transform/utils/arc/arc.js +161 -0
- package/esm/transform/utils/arc/arc.js.map +1 -0
- package/esm/transform/utils/arc/index.d.ts +2 -0
- package/esm/transform/utils/arc/index.js +2 -0
- package/esm/transform/utils/arc/index.js.map +1 -0
- package/esm/transform/utils/arc/sort.d.ts +4 -0
- package/esm/transform/utils/arc/sort.js +13 -0
- package/esm/transform/utils/arc/sort.js.map +1 -0
- package/esm/transform/utils/arc/types.d.ts +26 -0
- package/esm/transform/utils/arc/types.js +2 -0
- package/esm/transform/utils/arc/types.js.map +1 -0
- package/esm/transform/utils/d3-cloud/index.d.ts +1 -0
- package/esm/transform/utils/d3-cloud/index.js +395 -0
- package/esm/transform/utils/d3-cloud/index.js.map +1 -0
- package/esm/transform/utils/d3-sankey/align.d.ts +4 -0
- package/esm/transform/utils/d3-sankey/align.js +21 -0
- package/esm/transform/utils/d3-sankey/align.js.map +1 -0
- package/esm/transform/utils/d3-sankey/constant.d.ts +1 -0
- package/esm/transform/utils/d3-sankey/constant.js +6 -0
- package/esm/transform/utils/d3-sankey/constant.js.map +1 -0
- package/esm/transform/utils/d3-sankey/index.d.ts +12 -0
- package/esm/transform/utils/d3-sankey/index.js +13 -0
- package/esm/transform/utils/d3-sankey/index.js.map +1 -0
- package/esm/transform/utils/d3-sankey/sankey.d.ts +24 -0
- package/esm/transform/utils/d3-sankey/sankey.js +388 -0
- package/esm/transform/utils/d3-sankey/sankey.js.map +1 -0
- package/esm/transform/utils/flow.d.ts +9 -0
- package/esm/transform/utils/flow.js +45 -0
- package/esm/transform/utils/flow.js.map +1 -0
- package/esm/transform/utils/helper.d.ts +14 -0
- package/esm/transform/utils/helper.js +40 -0
- package/esm/transform/utils/helper.js.map +1 -0
- package/esm/transform/utils/memo.d.ts +17 -0
- package/esm/transform/utils/memo.js +79 -0
- package/esm/transform/utils/memo.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 +5 -0
- package/esm/utils/coordinate.js +20 -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 +27 -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 +165 -0
- package/lib/animation/morphing.js.map +1 -0
- package/lib/animation/scaleInX.d.ts +7 -0
- package/lib/animation/scaleInX.js +50 -0
- package/lib/animation/scaleInX.js.map +1 -0
- package/lib/animation/scaleInY.d.ts +7 -0
- package/lib/animation/scaleInY.js +50 -0
- package/lib/animation/scaleInY.js.map +1 -0
- package/lib/animation/scaleOutX.d.ts +7 -0
- package/lib/animation/scaleOutX.js +50 -0
- package/lib/animation/scaleOutX.js.map +1 -0
- package/lib/animation/scaleOutY.d.ts +7 -0
- package/lib/animation/scaleOutY.js +50 -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 +30 -0
- package/lib/api/chart.js +106 -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 +1 -0
- package/lib/api/index.js +6 -0
- package/lib/api/index.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 +42 -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 +44 -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 +292 -0
- package/lib/composition/rect.js.map +1 -0
- package/lib/composition/utils.d.ts +10 -0
- package/lib/composition/utils.js +19 -0
- package/lib/composition/utils.js.map +1 -0
- package/lib/composition/view.d.ts +9 -0
- package/lib/composition/view.js +36 -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/index.d.ts +5 -0
- package/lib/coordinate/index.js +14 -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/transpose.d.ts +7 -0
- package/lib/coordinate/transpose.js +15 -0
- package/lib/coordinate/transpose.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 +20 -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 +51 -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 +43 -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 +33 -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/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 +10 -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 +137 -0
- package/lib/runtime/component.js.map +1 -0
- package/lib/runtime/coordinate.d.ts +7 -0
- package/lib/runtime/coordinate.js +41 -0
- package/lib/runtime/coordinate.js.map +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +26 -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 +188 -0
- package/lib/runtime/mark.js.map +1 -0
- package/lib/runtime/plot.d.ts +3 -0
- package/lib/runtime/plot.js +558 -0
- package/lib/runtime/plot.js.map +1 -0
- package/lib/runtime/render.d.ts +2 -0
- package/lib/runtime/render.js +82 -0
- package/lib/runtime/render.js.map +1 -0
- package/lib/runtime/scale.d.ts +8 -0
- package/lib/runtime/scale.js +333 -0
- package/lib/runtime/scale.js.map +1 -0
- package/lib/runtime/types/common.d.ts +125 -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 +73 -0
- package/lib/runtime/types/component.js +3 -0
- package/lib/runtime/types/component.js.map +1 -0
- package/lib/runtime/types/encode.d.ts +21 -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 +106 -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 +23 -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 +84 -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 +33 -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 +52 -0
- package/lib/shape/utils.js +75 -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 +124 -0
- package/lib/spec/composition.js +3 -0
- package/lib/spec/composition.js.map +1 -0
- package/lib/spec/coordinate.d.ts +30 -0
- package/lib/spec/coordinate.js +3 -0
- package/lib/spec/coordinate.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 +60 -0
- package/lib/spec/geometry.js +3 -0
- package/lib/spec/geometry.js.map +1 -0
- package/lib/spec/index.d.ts +16 -0
- package/lib/spec/index.js +28 -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/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/statistic.d.ts +69 -0
- package/lib/spec/statistic.js +3 -0
- package/lib/spec/statistic.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 +177 -0
- package/lib/spec/transform.js +3 -0
- package/lib/spec/transform.js.map +1 -0
- package/lib/stdlib/index.d.ts +2 -0
- package/lib/stdlib/index.js +189 -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 +34 -0
- package/lib/theme/light.js.map +1 -0
- package/lib/transform/index.d.ts +36 -0
- package/lib/transform/index.js +79 -0
- package/lib/transform/index.js.map +1 -0
- package/lib/transform/inference/maybeArrayField.d.ts +8 -0
- package/lib/transform/inference/maybeArrayField.js +51 -0
- package/lib/transform/inference/maybeArrayField.js.map +1 -0
- package/lib/transform/inference/maybeKey.d.ts +9 -0
- package/lib/transform/inference/maybeKey.js +37 -0
- package/lib/transform/inference/maybeKey.js.map +1 -0
- package/lib/transform/inference/maybeSeries.d.ts +7 -0
- package/lib/transform/inference/maybeSeries.js +27 -0
- package/lib/transform/inference/maybeSeries.js.map +1 -0
- package/lib/transform/inference/maybeSize.d.ts +7 -0
- package/lib/transform/inference/maybeSize.js +18 -0
- package/lib/transform/inference/maybeSize.js.map +1 -0
- package/lib/transform/inference/maybeStackY.d.ts +9 -0
- package/lib/transform/inference/maybeStackY.js +36 -0
- package/lib/transform/inference/maybeStackY.js.map +1 -0
- package/lib/transform/inference/maybeTitleX.d.ts +7 -0
- package/lib/transform/inference/maybeTitleX.js +27 -0
- package/lib/transform/inference/maybeTitleX.js.map +1 -0
- package/lib/transform/inference/maybeTooltip.d.ts +9 -0
- package/lib/transform/inference/maybeTooltip.js +34 -0
- package/lib/transform/inference/maybeTooltip.js.map +1 -0
- package/lib/transform/inference/maybeTooltipPosition.d.ts +7 -0
- package/lib/transform/inference/maybeTooltipPosition.js +16 -0
- package/lib/transform/inference/maybeTooltipPosition.js.map +1 -0
- package/lib/transform/inference/maybeTooltipY.d.ts +7 -0
- package/lib/transform/inference/maybeTooltipY.js +16 -0
- package/lib/transform/inference/maybeTooltipY.js.map +1 -0
- package/lib/transform/inference/maybeZeroX.d.ts +7 -0
- package/lib/transform/inference/maybeZeroX.js +18 -0
- package/lib/transform/inference/maybeZeroX.js.map +1 -0
- package/lib/transform/inference/maybeZeroY.d.ts +7 -0
- package/lib/transform/inference/maybeZeroY.js +18 -0
- package/lib/transform/inference/maybeZeroY.js.map +1 -0
- package/lib/transform/inference/maybeZeroY1.d.ts +7 -0
- package/lib/transform/inference/maybeZeroY1.js +18 -0
- package/lib/transform/inference/maybeZeroY1.js.map +1 -0
- package/lib/transform/preprocessor/arc.d.ts +7 -0
- package/lib/transform/preprocessor/arc.js +20 -0
- package/lib/transform/preprocessor/arc.js.map +1 -0
- package/lib/transform/preprocessor/cluster.d.ts +5 -0
- package/lib/transform/preprocessor/cluster.js +44 -0
- package/lib/transform/preprocessor/cluster.js.map +1 -0
- package/lib/transform/preprocessor/connector.d.ts +7 -0
- package/lib/transform/preprocessor/connector.js +20 -0
- package/lib/transform/preprocessor/connector.js.map +1 -0
- package/lib/transform/preprocessor/fetch.d.ts +8 -0
- package/lib/transform/preprocessor/fetch.js +40 -0
- package/lib/transform/preprocessor/fetch.js.map +1 -0
- package/lib/transform/preprocessor/filterBy.d.ts +8 -0
- package/lib/transform/preprocessor/filterBy.js +22 -0
- package/lib/transform/preprocessor/filterBy.js.map +1 -0
- package/lib/transform/preprocessor/fold.d.ts +8 -0
- package/lib/transform/preprocessor/fold.js +32 -0
- package/lib/transform/preprocessor/fold.js.map +1 -0
- package/lib/transform/preprocessor/pick.d.ts +7 -0
- package/lib/transform/preprocessor/pick.js +16 -0
- package/lib/transform/preprocessor/pick.js.map +1 -0
- package/lib/transform/preprocessor/rename.d.ts +8 -0
- package/lib/transform/preprocessor/rename.js +25 -0
- package/lib/transform/preprocessor/rename.js.map +1 -0
- package/lib/transform/preprocessor/sankey.d.ts +8 -0
- package/lib/transform/preprocessor/sankey.js +84 -0
- package/lib/transform/preprocessor/sankey.js.map +1 -0
- package/lib/transform/preprocessor/sortBy.d.ts +7 -0
- package/lib/transform/preprocessor/sortBy.js +23 -0
- package/lib/transform/preprocessor/sortBy.js.map +1 -0
- package/lib/transform/preprocessor/subset.d.ts +7 -0
- package/lib/transform/preprocessor/subset.js +35 -0
- package/lib/transform/preprocessor/subset.js.map +1 -0
- package/lib/transform/preprocessor/tree.d.ts +4 -0
- package/lib/transform/preprocessor/tree.js +10 -0
- package/lib/transform/preprocessor/tree.js.map +1 -0
- package/lib/transform/preprocessor/voronoi.d.ts +4 -0
- package/lib/transform/preprocessor/voronoi.js +24 -0
- package/lib/transform/preprocessor/voronoi.js.map +1 -0
- package/lib/transform/preprocessor/wordCloud.d.ts +6 -0
- package/lib/transform/preprocessor/wordCloud.js +112 -0
- package/lib/transform/preprocessor/wordCloud.js.map +1 -0
- package/lib/transform/statistic/Select.d.ts +9 -0
- package/lib/transform/statistic/Select.js +62 -0
- package/lib/transform/statistic/Select.js.map +1 -0
- package/lib/transform/statistic/SelectX.d.ts +7 -0
- package/lib/transform/statistic/SelectX.js +27 -0
- package/lib/transform/statistic/SelectX.js.map +1 -0
- package/lib/transform/statistic/SelectY.d.ts +7 -0
- package/lib/transform/statistic/SelectY.js +27 -0
- package/lib/transform/statistic/SelectY.js.map +1 -0
- package/lib/transform/statistic/dodgeX.d.ts +9 -0
- package/lib/transform/statistic/dodgeX.js +60 -0
- package/lib/transform/statistic/dodgeX.js.map +1 -0
- package/lib/transform/statistic/groupX.d.ts +8 -0
- package/lib/transform/statistic/groupX.js +89 -0
- package/lib/transform/statistic/groupX.js.map +1 -0
- package/lib/transform/statistic/jitter.d.ts +9 -0
- package/lib/transform/statistic/jitter.js +45 -0
- package/lib/transform/statistic/jitter.js.map +1 -0
- package/lib/transform/statistic/jitterY.d.ts +8 -0
- package/lib/transform/statistic/jitterY.js +31 -0
- package/lib/transform/statistic/jitterY.js.map +1 -0
- package/lib/transform/statistic/normalizeY.d.ts +9 -0
- package/lib/transform/statistic/normalizeY.js +74 -0
- package/lib/transform/statistic/normalizeY.js.map +1 -0
- package/lib/transform/statistic/stackEnter.d.ts +13 -0
- package/lib/transform/statistic/stackEnter.js +63 -0
- package/lib/transform/statistic/stackEnter.js.map +1 -0
- package/lib/transform/statistic/stackY.d.ts +9 -0
- package/lib/transform/statistic/stackY.js +59 -0
- package/lib/transform/statistic/stackY.js.map +1 -0
- package/lib/transform/statistic/symmetryY.d.ts +8 -0
- package/lib/transform/statistic/symmetryY.js +65 -0
- package/lib/transform/statistic/symmetryY.js.map +1 -0
- package/lib/transform/statistic/utils.d.ts +9 -0
- package/lib/transform/statistic/utils.js +77 -0
- package/lib/transform/statistic/utils.js.map +1 -0
- package/lib/transform/utils/arc/arc.d.ts +8 -0
- package/lib/transform/utils/arc/arc.js +188 -0
- package/lib/transform/utils/arc/arc.js.map +1 -0
- package/lib/transform/utils/arc/index.d.ts +2 -0
- package/lib/transform/utils/arc/index.js +6 -0
- package/lib/transform/utils/arc/index.js.map +1 -0
- package/lib/transform/utils/arc/sort.d.ts +4 -0
- package/lib/transform/utils/arc/sort.js +20 -0
- package/lib/transform/utils/arc/sort.js.map +1 -0
- package/lib/transform/utils/arc/types.d.ts +26 -0
- package/lib/transform/utils/arc/types.js +3 -0
- package/lib/transform/utils/arc/types.js.map +1 -0
- package/lib/transform/utils/d3-cloud/index.d.ts +1 -0
- package/lib/transform/utils/d3-cloud/index.js +399 -0
- package/lib/transform/utils/d3-cloud/index.js.map +1 -0
- package/lib/transform/utils/d3-sankey/align.d.ts +4 -0
- package/lib/transform/utils/d3-sankey/align.js +28 -0
- package/lib/transform/utils/d3-sankey/align.js.map +1 -0
- package/lib/transform/utils/d3-sankey/constant.d.ts +1 -0
- package/lib/transform/utils/d3-sankey/constant.js +10 -0
- package/lib/transform/utils/d3-sankey/constant.js.map +1 -0
- package/lib/transform/utils/d3-sankey/index.d.ts +12 -0
- package/lib/transform/utils/d3-sankey/index.js +20 -0
- package/lib/transform/utils/d3-sankey/index.js.map +1 -0
- package/lib/transform/utils/d3-sankey/sankey.d.ts +24 -0
- package/lib/transform/utils/d3-sankey/sankey.js +392 -0
- package/lib/transform/utils/d3-sankey/sankey.js.map +1 -0
- package/lib/transform/utils/flow.d.ts +9 -0
- package/lib/transform/utils/flow.js +49 -0
- package/lib/transform/utils/flow.js.map +1 -0
- package/lib/transform/utils/helper.d.ts +14 -0
- package/lib/transform/utils/helper.js +48 -0
- package/lib/transform/utils/helper.js.map +1 -0
- package/lib/transform/utils/memo.d.ts +17 -0
- package/lib/transform/utils/memo.js +85 -0
- package/lib/transform/utils/memo.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 +5 -0
- package/lib/utils/coordinate.js +27 -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 +85 -120
- package/src/adjust/index.ts +1 -0
- package/src/adjust/pack.ts +67 -0
- package/src/animation/fadeIn.ts +30 -0
- package/src/animation/fadeOut.ts +26 -0
- package/src/animation/index.ts +7 -0
- package/src/animation/morphing.ts +212 -0
- package/src/animation/scaleInX.ts +60 -0
- package/src/animation/scaleInY.ts +60 -0
- package/src/animation/scaleOutX.ts +60 -0
- package/src/animation/scaleOutY.ts +60 -0
- package/src/animation/utils.ts +26 -0
- package/src/api/chart.ts +124 -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 +1 -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 +47 -0
- package/src/composition/index.ts +8 -0
- package/src/composition/keyframe.ts +90 -0
- package/src/composition/layer.ts +25 -0
- package/src/composition/mark.ts +52 -0
- package/src/composition/matrix.ts +170 -0
- package/src/composition/rect.ts +340 -0
- package/src/composition/utils.ts +17 -0
- package/src/composition/view.ts +27 -0
- package/src/coordinate/cartesian.ts +11 -0
- package/src/coordinate/fisheye.ts +16 -0
- package/src/coordinate/index.ts +5 -0
- package/src/coordinate/parallel.ts +11 -0
- package/src/coordinate/polar.ts +22 -0
- package/src/coordinate/transpose.ts +16 -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 +62 -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 +53 -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/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 +189 -0
- package/src/runtime/coordinate.ts +51 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/layout.ts +180 -0
- package/src/runtime/library.ts +27 -0
- package/src/runtime/mark.ts +262 -0
- package/src/runtime/plot.ts +832 -0
- package/src/runtime/render.ts +81 -0
- package/src/runtime/scale.ts +443 -0
- package/src/runtime/types/common.ts +155 -0
- package/src/runtime/types/component.ts +213 -0
- package/src/runtime/types/encode.ts +32 -0
- package/src/runtime/types/mark.ts +31 -0
- package/src/runtime/types/options.ts +159 -0
- package/src/runtime/types/transform.ts +34 -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 +81 -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 +33 -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 +129 -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 +142 -0
- package/src/spec/coordinate.ts +49 -0
- package/src/spec/encode.ts +46 -0
- package/src/spec/geometry.ts +167 -0
- package/src/spec/index.ts +18 -0
- package/src/spec/interaction.ts +115 -0
- package/src/spec/palette.ts +18 -0
- package/src/spec/scale.ts +78 -0
- package/src/spec/statistic.ts +135 -0
- package/src/spec/theme.ts +20 -0
- package/src/spec/title.ts +3 -0
- package/src/spec/transform.ts +223 -0
- package/src/stdlib/index.ts +345 -0
- package/src/theme/index.ts +1 -28
- package/src/theme/light.ts +34 -0
- package/src/transform/index.ts +47 -0
- package/src/transform/inference/maybeArrayField.ts +55 -0
- package/src/transform/inference/maybeKey.ts +29 -0
- package/src/transform/inference/maybeSeries.ts +26 -0
- package/src/transform/inference/maybeSize.ts +18 -0
- package/src/transform/inference/maybeStackY.ts +38 -0
- package/src/transform/inference/maybeTitleX.ts +26 -0
- package/src/transform/inference/maybeTooltip.ts +35 -0
- package/src/transform/inference/maybeTooltipPosition.ts +16 -0
- package/src/transform/inference/maybeTooltipY.ts +16 -0
- package/src/transform/inference/maybeZeroX.ts +18 -0
- package/src/transform/inference/maybeZeroY.ts +18 -0
- package/src/transform/inference/maybeZeroY1.ts +18 -0
- package/src/transform/preprocessor/arc.ts +21 -0
- package/src/transform/preprocessor/cluster.ts +56 -0
- package/src/transform/preprocessor/connector.ts +22 -0
- package/src/transform/preprocessor/fetch.ts +32 -0
- package/src/transform/preprocessor/filterBy.ts +24 -0
- package/src/transform/preprocessor/fold.ts +32 -0
- package/src/transform/preprocessor/pick.ts +17 -0
- package/src/transform/preprocessor/rename.ts +29 -0
- package/src/transform/preprocessor/sankey.ts +105 -0
- package/src/transform/preprocessor/sortBy.ts +28 -0
- package/src/transform/preprocessor/subset.ts +40 -0
- package/src/transform/preprocessor/tree.ts +12 -0
- package/src/transform/preprocessor/voronoi.ts +30 -0
- package/src/transform/preprocessor/wordCloud.ts +115 -0
- package/src/transform/statistic/dodgeX.ts +56 -0
- package/src/transform/statistic/groupX.ts +91 -0
- package/src/transform/statistic/jitter.ts +49 -0
- package/src/transform/statistic/jitterY.ts +32 -0
- package/src/transform/statistic/normalizeY.ts +69 -0
- package/src/transform/statistic/select.ts +58 -0
- package/src/transform/statistic/selectX.ts +17 -0
- package/src/transform/statistic/selectY.ts +17 -0
- package/src/transform/statistic/stackEnter.ts +65 -0
- package/src/transform/statistic/stackY.ts +58 -0
- package/src/transform/statistic/symmetryY.ts +59 -0
- package/src/transform/statistic/utils.ts +120 -0
- package/src/transform/utils/arc/arc.ts +210 -0
- package/src/transform/utils/arc/index.ts +2 -0
- package/src/transform/utils/arc/sort.ts +15 -0
- package/src/transform/utils/arc/types.ts +27 -0
- package/src/transform/utils/d3-cloud/index.ts +499 -0
- package/src/transform/utils/d3-sankey/align.ts +25 -0
- package/src/transform/utils/d3-sankey/constant.ts +5 -0
- package/src/transform/utils/d3-sankey/index.ts +12 -0
- package/src/transform/utils/d3-sankey/sankey.ts +436 -0
- package/src/transform/utils/flow.ts +36 -0
- package/src/transform/utils/helper.ts +54 -0
- package/src/transform/utils/memo.ts +79 -0
- package/src/utils/array.ts +50 -0
- package/src/utils/container.ts +21 -0
- package/src/utils/coordinate.ts +24 -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/chart/view.ts
DELETED
|
@@ -1,2112 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clone,
|
|
3
|
-
deepMix,
|
|
4
|
-
each,
|
|
5
|
-
filter,
|
|
6
|
-
find,
|
|
7
|
-
flatten,
|
|
8
|
-
get,
|
|
9
|
-
isBoolean,
|
|
10
|
-
isFunction,
|
|
11
|
-
isNil,
|
|
12
|
-
isObject,
|
|
13
|
-
isString,
|
|
14
|
-
isUndefined,
|
|
15
|
-
mix,
|
|
16
|
-
remove,
|
|
17
|
-
set,
|
|
18
|
-
size,
|
|
19
|
-
uniqueId,
|
|
20
|
-
isEqual,
|
|
21
|
-
isPlainObject,
|
|
22
|
-
reduce,
|
|
23
|
-
} from '@antv/util';
|
|
24
|
-
import { Attribute, Coordinate, Event as GEvent, GroupComponent, ICanvas, IGroup, IShape, Scale } from '../dependents';
|
|
25
|
-
import {
|
|
26
|
-
AxisOption,
|
|
27
|
-
ComponentOption,
|
|
28
|
-
CoordinateCfg,
|
|
29
|
-
CoordinateOption,
|
|
30
|
-
Data,
|
|
31
|
-
Datum,
|
|
32
|
-
FacetCfgMap,
|
|
33
|
-
FilterCondition,
|
|
34
|
-
GeometryOption,
|
|
35
|
-
LegendOption,
|
|
36
|
-
LooseObject,
|
|
37
|
-
Options,
|
|
38
|
-
Point,
|
|
39
|
-
Region,
|
|
40
|
-
ScaleOption,
|
|
41
|
-
TooltipOption,
|
|
42
|
-
ViewCfg,
|
|
43
|
-
ViewPadding,
|
|
44
|
-
ViewAppendPadding,
|
|
45
|
-
EventPayload,
|
|
46
|
-
Padding,
|
|
47
|
-
} from '../interface';
|
|
48
|
-
import { GROUP_Z_INDEX, LAYER, PLOT_EVENTS, VIEW_LIFE_CIRCLE } from '../constant';
|
|
49
|
-
import Base from '../base';
|
|
50
|
-
import { Facet, getFacet } from '../facet';
|
|
51
|
-
import Geometry from '../geometry/base';
|
|
52
|
-
import Element from '../geometry/element';
|
|
53
|
-
import { createInteraction, Interaction } from '../interaction';
|
|
54
|
-
import { getTheme } from '../theme';
|
|
55
|
-
import { BBox } from '../util/bbox';
|
|
56
|
-
import { getCoordinateClipCfg, isPointInCoordinate } from '../util/coordinate';
|
|
57
|
-
import { uniq } from '../util/helper';
|
|
58
|
-
import { findDataByPoint } from '../util/tooltip';
|
|
59
|
-
import { parsePadding } from '../util/padding';
|
|
60
|
-
import { getDefaultCategoryScaleRange } from '../util/scale';
|
|
61
|
-
import { createTheme } from '../theme/util';
|
|
62
|
-
import Chart from './chart';
|
|
63
|
-
import { getComponentController, getComponentControllerNames } from './controller';
|
|
64
|
-
import Annotation from './controller/annotation';
|
|
65
|
-
import { Controller } from './controller/base';
|
|
66
|
-
import CoordinateController from './controller/coordinate';
|
|
67
|
-
import Tooltip from './controller/tooltip';
|
|
68
|
-
import Slider from './controller/slider';
|
|
69
|
-
import Scrollbar from './controller/scrollbar';
|
|
70
|
-
import Axis from './controller/axis';
|
|
71
|
-
import Gesture from './controller/gesture';
|
|
72
|
-
import Legend from './controller/legend';
|
|
73
|
-
import Event from './event';
|
|
74
|
-
import defaultLayout, { Layout } from './layout';
|
|
75
|
-
import { ScalePool } from './util/scale-pool';
|
|
76
|
-
import { PaddingCal } from './layout/padding-cal';
|
|
77
|
-
import { calculatePadding } from './layout/auto';
|
|
78
|
-
import { defaultSyncViewPadding } from './util/sync-view-padding';
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* G2 视图 View 类
|
|
82
|
-
*/
|
|
83
|
-
export class View extends Base {
|
|
84
|
-
/** view id,全局唯一。 */
|
|
85
|
-
public id: string;
|
|
86
|
-
/** 父级 view,如果没有父级,则为空。 */
|
|
87
|
-
public parent: View;
|
|
88
|
-
/** 所有的子 view。 */
|
|
89
|
-
public views: View[] = [];
|
|
90
|
-
/** 所有的 geometry 实例。 */
|
|
91
|
-
public geometries: Geometry[] = [];
|
|
92
|
-
/** 所有的组件 controllers。 */
|
|
93
|
-
public controllers: Controller[] = [];
|
|
94
|
-
/** 所有的 Interaction 实例。 */
|
|
95
|
-
public interactions: Record<string, Interaction> = {};
|
|
96
|
-
|
|
97
|
-
/** view 区域空间。 */
|
|
98
|
-
public viewBBox: BBox;
|
|
99
|
-
/** 坐标系的位置大小,ViewBBox - padding = coordinateBBox。 */
|
|
100
|
-
public coordinateBBox: BBox;
|
|
101
|
-
/** view 的 padding 大小,传入的配置(不是解析之后的值)。 */
|
|
102
|
-
public padding: ViewPadding;
|
|
103
|
-
/** padding的基础上增加的调整值 */
|
|
104
|
-
public appendPadding: ViewAppendPadding;
|
|
105
|
-
/** G.Canvas 实例。 */
|
|
106
|
-
public canvas: ICanvas;
|
|
107
|
-
/** 存储最终计算的 padding 结果 */
|
|
108
|
-
public autoPadding: PaddingCal;
|
|
109
|
-
|
|
110
|
-
/** 三层 Group 图形中的背景层。 */
|
|
111
|
-
public backgroundGroup: IGroup;
|
|
112
|
-
/** 三层 Group 图形中的中间层。 */
|
|
113
|
-
public middleGroup: IGroup;
|
|
114
|
-
/** 三层 Group 图形中的前景层。 */
|
|
115
|
-
public foregroundGroup: IGroup;
|
|
116
|
-
/** 是否对超出坐标系范围的 Geometry 进行剪切 */
|
|
117
|
-
public limitInPlot: boolean = false;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* 标记 view 的大小位置范围,均是 0 ~ 1 范围,便于开发者使用,起始点为左上角。
|
|
121
|
-
*/
|
|
122
|
-
protected region: Region;
|
|
123
|
-
/** 主题配置,存储当前主题配置。 */
|
|
124
|
-
protected themeObject: LooseObject;
|
|
125
|
-
|
|
126
|
-
// 配置信息存储
|
|
127
|
-
protected options: Options = {
|
|
128
|
-
data: [],
|
|
129
|
-
animate: true, // 默认开启动画
|
|
130
|
-
}; // 初始化为空
|
|
131
|
-
|
|
132
|
-
/** 过滤之后的数据 */
|
|
133
|
-
protected filteredData: Data;
|
|
134
|
-
|
|
135
|
-
/** 配置开启的组件插件,默认为全局配置的组件。 */
|
|
136
|
-
private usedControllers: string[] = getComponentControllerNames();
|
|
137
|
-
|
|
138
|
-
/** 所有的 scales */
|
|
139
|
-
private scalePool: ScalePool = new ScalePool();
|
|
140
|
-
|
|
141
|
-
/** 布局函数 */
|
|
142
|
-
protected layoutFunc: Layout = defaultLayout;
|
|
143
|
-
/** 生成的坐标系实例,{@link https://github.com/antvis/coord/blob/master/src/coord/base.ts|Coordinate} */
|
|
144
|
-
protected coordinateInstance: Coordinate;
|
|
145
|
-
/** Coordinate 相关的控制器类,负责坐标系实例的创建、更新、变换等 */
|
|
146
|
-
protected coordinateController: CoordinateController;
|
|
147
|
-
/** 分面类实例 */
|
|
148
|
-
protected facetInstance: Facet;
|
|
149
|
-
|
|
150
|
-
/** 当前鼠标是否在 plot 内(CoordinateBBox) */
|
|
151
|
-
private isPreMouseInPlot: boolean = false;
|
|
152
|
-
/** 默认标识位,用于判定数据是否更新 */
|
|
153
|
-
private isDataChanged: boolean = false;
|
|
154
|
-
/** 用于判断坐标系范围是否发生变化的标志位 */
|
|
155
|
-
private isCoordinateChanged: boolean = false;
|
|
156
|
-
/** 从当前这个 view 创建的 scale key */
|
|
157
|
-
private createdScaleKeys = new Map<string, boolean>();
|
|
158
|
-
/** 背景色样式的 shape */
|
|
159
|
-
private backgroundStyleRectShape;
|
|
160
|
-
/** 是否同步子 view 的 padding */
|
|
161
|
-
private syncViewPadding;
|
|
162
|
-
|
|
163
|
-
constructor(props: ViewCfg) {
|
|
164
|
-
super({ visible: props.visible });
|
|
165
|
-
|
|
166
|
-
const {
|
|
167
|
-
id = uniqueId('view'),
|
|
168
|
-
parent,
|
|
169
|
-
canvas,
|
|
170
|
-
backgroundGroup,
|
|
171
|
-
middleGroup,
|
|
172
|
-
foregroundGroup,
|
|
173
|
-
region = { start: { x: 0, y: 0 }, end: { x: 1, y: 1 } },
|
|
174
|
-
padding,
|
|
175
|
-
appendPadding,
|
|
176
|
-
theme,
|
|
177
|
-
options,
|
|
178
|
-
limitInPlot,
|
|
179
|
-
syncViewPadding,
|
|
180
|
-
} = props;
|
|
181
|
-
|
|
182
|
-
this.parent = parent;
|
|
183
|
-
this.canvas = canvas;
|
|
184
|
-
this.backgroundGroup = backgroundGroup;
|
|
185
|
-
this.middleGroup = middleGroup;
|
|
186
|
-
this.foregroundGroup = foregroundGroup;
|
|
187
|
-
this.region = region;
|
|
188
|
-
this.padding = padding;
|
|
189
|
-
this.appendPadding = appendPadding;
|
|
190
|
-
// 接受父 view 传入的参数
|
|
191
|
-
this.options = { ...this.options, ...options };
|
|
192
|
-
this.limitInPlot = limitInPlot;
|
|
193
|
-
this.id = id;
|
|
194
|
-
this.syncViewPadding = syncViewPadding;
|
|
195
|
-
|
|
196
|
-
// 初始化 theme
|
|
197
|
-
this.themeObject = isObject(theme) ? deepMix({}, getTheme('default'), createTheme(theme)) : getTheme(theme);
|
|
198
|
-
this.init();
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* 设置 layout 布局函数
|
|
203
|
-
* @param layout 布局函数
|
|
204
|
-
* @returns void
|
|
205
|
-
*/
|
|
206
|
-
public setLayout(layout: Layout) {
|
|
207
|
-
this.layoutFunc = layout;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* 生命周期:初始化
|
|
212
|
-
* @returns voids
|
|
213
|
-
*/
|
|
214
|
-
public init() {
|
|
215
|
-
// 计算画布的 viewBBox
|
|
216
|
-
this.calculateViewBBox();
|
|
217
|
-
|
|
218
|
-
// 事件委托机制
|
|
219
|
-
this.initEvents();
|
|
220
|
-
|
|
221
|
-
// 初始化组件 controller
|
|
222
|
-
this.initComponentController();
|
|
223
|
-
|
|
224
|
-
this.initOptions();
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* 生命周期:渲染流程,渲染过程需要处理数据更新的情况。
|
|
229
|
-
* render 函数仅仅会处理 view 和子 view。
|
|
230
|
-
* @param isUpdate 是否触发更新流程。
|
|
231
|
-
* @param params render 事件参数
|
|
232
|
-
*/
|
|
233
|
-
public render(isUpdate: boolean = false, payload?: EventPayload) {
|
|
234
|
-
this.emit(VIEW_LIFE_CIRCLE.BEFORE_RENDER, Event.fromData(this, VIEW_LIFE_CIRCLE.BEFORE_RENDER, payload));
|
|
235
|
-
// 递归渲染
|
|
236
|
-
this.paint(isUpdate);
|
|
237
|
-
|
|
238
|
-
this.emit(VIEW_LIFE_CIRCLE.AFTER_RENDER, Event.fromData(this, VIEW_LIFE_CIRCLE.AFTER_RENDER, payload));
|
|
239
|
-
|
|
240
|
-
if (this.visible === false) {
|
|
241
|
-
// 用户在初始化的时候声明 visible: false
|
|
242
|
-
this.changeVisible(false);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* 生命周期:清空图表上所有的绘制内容,但是不销毁图表,chart 仍可使用。
|
|
248
|
-
* @returns void
|
|
249
|
-
*/
|
|
250
|
-
public clear() {
|
|
251
|
-
this.emit(VIEW_LIFE_CIRCLE.BEFORE_CLEAR);
|
|
252
|
-
// 1. 清空缓存和计算数据
|
|
253
|
-
this.filteredData = [];
|
|
254
|
-
this.coordinateInstance = undefined;
|
|
255
|
-
this.isDataChanged = false; // 复位
|
|
256
|
-
this.isCoordinateChanged = false; // 复位
|
|
257
|
-
|
|
258
|
-
// 2. 清空 geometries
|
|
259
|
-
const geometries = this.geometries;
|
|
260
|
-
for (let i = 0; i < geometries.length; i++) {
|
|
261
|
-
geometries[i].clear();
|
|
262
|
-
// view 中使用 geometry 的时候,还需要清空它的容器,不然下一次 chart.geometry() 的时候,又创建了一个,导致泄露, #2799。
|
|
263
|
-
geometries[i].container.remove(true);
|
|
264
|
-
geometries[i].labelsContainer.remove(true);
|
|
265
|
-
}
|
|
266
|
-
this.geometries = [];
|
|
267
|
-
|
|
268
|
-
// 3. 清空 controllers
|
|
269
|
-
const controllers = this.controllers;
|
|
270
|
-
for (let i = 0; i < controllers.length; i++) {
|
|
271
|
-
if (controllers[i].name === 'annotation') {
|
|
272
|
-
// 需要清空配置项
|
|
273
|
-
(controllers[i] as Annotation).clear(true);
|
|
274
|
-
} else {
|
|
275
|
-
controllers[i].clear();
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// 4. 删除 scale 缓存
|
|
280
|
-
this.createdScaleKeys.forEach((v: boolean, k: string) => {
|
|
281
|
-
this.getRootView().scalePool.deleteScale(k);
|
|
282
|
-
});
|
|
283
|
-
this.createdScaleKeys.clear();
|
|
284
|
-
|
|
285
|
-
// 递归处理子 view
|
|
286
|
-
const views = this.views;
|
|
287
|
-
for (let i = 0; i < views.length; i++) {
|
|
288
|
-
views[i].clear();
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
this.emit(VIEW_LIFE_CIRCLE.AFTER_CLEAR);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* 生命周期:销毁,完全无法使用。
|
|
296
|
-
* @returns void
|
|
297
|
-
*/
|
|
298
|
-
public destroy() {
|
|
299
|
-
// 销毁前事件,销毁之后已经没有意义了,所以不抛出事件
|
|
300
|
-
this.emit(VIEW_LIFE_CIRCLE.BEFORE_DESTROY);
|
|
301
|
-
const interactions = this.interactions;
|
|
302
|
-
// 销毁 interactions
|
|
303
|
-
each(interactions, (interaction) => {
|
|
304
|
-
if (interaction) {
|
|
305
|
-
// 有可能已经销毁,设置了 undefined
|
|
306
|
-
interaction.destroy();
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
this.clear();
|
|
311
|
-
|
|
312
|
-
// 销毁 controller 中的组件
|
|
313
|
-
const controllers = this.controllers;
|
|
314
|
-
for (let i = 0, len = controllers.length; i < len; i++) {
|
|
315
|
-
const controller = controllers[i];
|
|
316
|
-
controller.destroy();
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
this.backgroundGroup.remove(true);
|
|
320
|
-
this.middleGroup.remove(true);
|
|
321
|
-
this.foregroundGroup.remove(true);
|
|
322
|
-
|
|
323
|
-
super.destroy();
|
|
324
|
-
}
|
|
325
|
-
/* end 生命周期函数 */
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* 显示或者隐藏整个 view。
|
|
329
|
-
* @param visible 是否可见
|
|
330
|
-
* @returns View
|
|
331
|
-
*/
|
|
332
|
-
public changeVisible(visible: boolean): View {
|
|
333
|
-
super.changeVisible(visible);
|
|
334
|
-
|
|
335
|
-
const geometries = this.geometries;
|
|
336
|
-
for (let i = 0, len = geometries.length; i < len; i++) {
|
|
337
|
-
const geometry = geometries[i];
|
|
338
|
-
geometry.changeVisible(visible);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
const controllers = this.controllers;
|
|
342
|
-
for (let i = 0, len = controllers.length; i < len; i++) {
|
|
343
|
-
const controller = controllers[i];
|
|
344
|
-
controller.changeVisible(visible);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
this.foregroundGroup.set('visible', visible);
|
|
348
|
-
this.middleGroup.set('visible', visible);
|
|
349
|
-
this.backgroundGroup.set('visible', visible);
|
|
350
|
-
|
|
351
|
-
// group.set('visible', visible) 不会触发自动刷新
|
|
352
|
-
this.getCanvas().draw();
|
|
353
|
-
|
|
354
|
-
return this;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* 装载数据源。
|
|
359
|
-
*
|
|
360
|
-
* ```ts
|
|
361
|
-
* view.data([{ city: '杭州', sale: 100 }, { city: '上海', sale: 110 } ]);
|
|
362
|
-
* ```
|
|
363
|
-
*
|
|
364
|
-
* @param data 数据源,json 数组。
|
|
365
|
-
* @returns View
|
|
366
|
-
*/
|
|
367
|
-
public data(data: Data): View {
|
|
368
|
-
set(this.options, 'data', data);
|
|
369
|
-
this.isDataChanged = true;
|
|
370
|
-
return this;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* @deprecated
|
|
375
|
-
* This method will be removed at G2 V4.1. Replaced by {@link #data(data)}
|
|
376
|
-
*/
|
|
377
|
-
public source(data: Data): View {
|
|
378
|
-
console.warn('This method will be removed at G2 V4.1. Please use chart.data() instead.');
|
|
379
|
-
return this.data(data);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* 设置数据筛选规则。
|
|
384
|
-
*
|
|
385
|
-
* ```ts
|
|
386
|
-
* view.filter('city', (value: any, datum: Datum) => value !== '杭州');
|
|
387
|
-
*
|
|
388
|
-
* // 删除 'city' 字段对应的筛选规则。
|
|
389
|
-
* view.filter('city', null);
|
|
390
|
-
* ```
|
|
391
|
-
*
|
|
392
|
-
* @param field 数据字段
|
|
393
|
-
* @param condition 筛选规则
|
|
394
|
-
* @returns View
|
|
395
|
-
*/
|
|
396
|
-
public filter(field: string, condition: FilterCondition | null): View {
|
|
397
|
-
if (isFunction(condition)) {
|
|
398
|
-
set(this.options, ['filters', field], condition);
|
|
399
|
-
return this;
|
|
400
|
-
}
|
|
401
|
-
// condition 为空,则表示删除过滤条件
|
|
402
|
-
if (!condition && get(this.options, ['filters', field])) {
|
|
403
|
-
delete this.options.filters[field];
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
return this;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* 开启或者关闭坐标轴。
|
|
411
|
-
*
|
|
412
|
-
* ```ts
|
|
413
|
-
* view.axis(false); // 不展示坐标轴
|
|
414
|
-
* ```
|
|
415
|
-
* @param field 坐标轴开关
|
|
416
|
-
*/
|
|
417
|
-
public axis(field: boolean): View;
|
|
418
|
-
/**
|
|
419
|
-
* 对特定的某条坐标轴进行配置。
|
|
420
|
-
*
|
|
421
|
-
* @example
|
|
422
|
-
* ```ts
|
|
423
|
-
* view.axis('city', false); // 不展示 'city' 字段对应的坐标轴
|
|
424
|
-
*
|
|
425
|
-
* // 将 'city' 字段对应的坐标轴的标题隐藏
|
|
426
|
-
* view.axis('city', {
|
|
427
|
-
* title: null,
|
|
428
|
-
* });
|
|
429
|
-
* ```
|
|
430
|
-
*
|
|
431
|
-
* @param field 要配置的坐标轴对应的字段名称
|
|
432
|
-
* @param axisOption 坐标轴具体配置,更详细的配置项可以参考:https://github.com/antvis/component#axis
|
|
433
|
-
*/
|
|
434
|
-
public axis(field: string, axisOption: AxisOption): View;
|
|
435
|
-
public axis(field: string | boolean, axisOption?: AxisOption): View {
|
|
436
|
-
if (isBoolean(field)) {
|
|
437
|
-
set(this.options, ['axes'], field);
|
|
438
|
-
} else {
|
|
439
|
-
set(this.options, ['axes', field], axisOption);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
return this;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* 对图例进行整体配置。
|
|
447
|
-
*
|
|
448
|
-
* ```ts
|
|
449
|
-
* view.legend(false); // 关闭图例
|
|
450
|
-
*
|
|
451
|
-
* view.legend({
|
|
452
|
-
* position: 'right',
|
|
453
|
-
* }); // 图例进行整体配置
|
|
454
|
-
* ```
|
|
455
|
-
* @param field
|
|
456
|
-
* @returns View
|
|
457
|
-
*/
|
|
458
|
-
public legend(field: LegendOption): View;
|
|
459
|
-
/**
|
|
460
|
-
* 对特定的图例进行配置。
|
|
461
|
-
*
|
|
462
|
-
* @example
|
|
463
|
-
* ```ts
|
|
464
|
-
* view.legend('city', false); // 关闭某个图例,通过数据字段名进行关联
|
|
465
|
-
*
|
|
466
|
-
* // 对特定的图例进行配置
|
|
467
|
-
* view.legend('city', {
|
|
468
|
-
* position: 'right',
|
|
469
|
-
* });
|
|
470
|
-
* ```
|
|
471
|
-
*
|
|
472
|
-
* @param field 图例对应的数据字段名称
|
|
473
|
-
* @param legendOption 图例配置,更详细的配置项可以参考:https://github.com/antvis/component#axis
|
|
474
|
-
* @returns View
|
|
475
|
-
*/
|
|
476
|
-
public legend(field: string, legendOption: LegendOption): View;
|
|
477
|
-
public legend(field: string | LegendOption, legendOption?: LegendOption): View {
|
|
478
|
-
if (isBoolean(field)) {
|
|
479
|
-
set(this.options, ['legends'], field);
|
|
480
|
-
} else if (isString(field)) {
|
|
481
|
-
set(this.options, ['legends', field], legendOption);
|
|
482
|
-
if (isPlainObject(legendOption) && legendOption?.selected) {
|
|
483
|
-
set(this.options, ['filters', field], (name: string) => {
|
|
484
|
-
return legendOption?.selected[name] ?? true;
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
} else {
|
|
488
|
-
// 设置全局的 legend 配置
|
|
489
|
-
set(this.options, ['legends'], field);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
return this;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* 批量设置 scale 配置。
|
|
497
|
-
*
|
|
498
|
-
* ```ts
|
|
499
|
-
* view.scale({
|
|
500
|
-
* sale: {
|
|
501
|
-
* min: 0,
|
|
502
|
-
* max: 100,
|
|
503
|
-
* }
|
|
504
|
-
* });
|
|
505
|
-
* ```
|
|
506
|
-
* Scale 的详细配置项可以参考:https://github.com/antvis/scale#api
|
|
507
|
-
* @returns View
|
|
508
|
-
*/
|
|
509
|
-
public scale(field: Record<string, ScaleOption>): View;
|
|
510
|
-
/**
|
|
511
|
-
* 为特性的数据字段进行 scale 配置。
|
|
512
|
-
*
|
|
513
|
-
* ```ts
|
|
514
|
-
* view.scale('sale', {
|
|
515
|
-
* min: 0,
|
|
516
|
-
* max: 100,
|
|
517
|
-
* });
|
|
518
|
-
* ```
|
|
519
|
-
*
|
|
520
|
-
* @returns View
|
|
521
|
-
*/
|
|
522
|
-
public scale(field: string, scaleOption: ScaleOption): View;
|
|
523
|
-
public scale(field: string | Record<string, ScaleOption>, scaleOption?: ScaleOption): View {
|
|
524
|
-
if (isString(field)) {
|
|
525
|
-
set(this.options, ['scales', field], scaleOption);
|
|
526
|
-
} else if (isObject(field)) {
|
|
527
|
-
each(field, (v: ScaleOption, k: string) => {
|
|
528
|
-
set(this.options, ['scales', k], v);
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
return this;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* tooltip 提示信息配置。
|
|
537
|
-
*
|
|
538
|
-
* ```ts
|
|
539
|
-
* view.tooltip(false); // 关闭 tooltip
|
|
540
|
-
*
|
|
541
|
-
* view.tooltip({
|
|
542
|
-
* shared: true
|
|
543
|
-
* });
|
|
544
|
-
* ```
|
|
545
|
-
*
|
|
546
|
-
* @param cfg Tooltip 配置,更详细的配置项参考:https://github.com/antvis/component#tooltip
|
|
547
|
-
* @returns View
|
|
548
|
-
*/
|
|
549
|
-
public tooltip(cfg: boolean | TooltipOption): View {
|
|
550
|
-
set(this.options, 'tooltip', cfg);
|
|
551
|
-
|
|
552
|
-
return this;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* 辅助标记配置。
|
|
557
|
-
*
|
|
558
|
-
* ```ts
|
|
559
|
-
* view.annotation().line({
|
|
560
|
-
* start: ['min', 85],
|
|
561
|
-
* end: ['max', 85],
|
|
562
|
-
* style: {
|
|
563
|
-
* stroke: '#595959',
|
|
564
|
-
* lineWidth: 1,
|
|
565
|
-
* lineDash: [3, 3],
|
|
566
|
-
* },
|
|
567
|
-
* });
|
|
568
|
-
* ```
|
|
569
|
-
* 更详细的配置项:https://github.com/antvis/component#annotation
|
|
570
|
-
* @returns [[Annotation]]
|
|
571
|
-
*/
|
|
572
|
-
public annotation(): Annotation {
|
|
573
|
-
return this.getController('annotation');
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* @deprecated
|
|
578
|
-
* This method will be removed at G2 V4.1. Replaced by {@link #guide()}
|
|
579
|
-
*/
|
|
580
|
-
public guide(): Annotation {
|
|
581
|
-
console.warn('This method will be removed at G2 V4.1. Please use chart.annotation() instead.');
|
|
582
|
-
return this.annotation();
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* 坐标系配置。
|
|
587
|
-
*
|
|
588
|
-
* @example
|
|
589
|
-
* ```ts
|
|
590
|
-
* view.coordinate({
|
|
591
|
-
* type: 'polar',
|
|
592
|
-
* cfg: {
|
|
593
|
-
* radius: 0.85,
|
|
594
|
-
* },
|
|
595
|
-
* actions: [
|
|
596
|
-
* [ 'transpose' ],
|
|
597
|
-
* ],
|
|
598
|
-
* });
|
|
599
|
-
* ```
|
|
600
|
-
*
|
|
601
|
-
* @param option
|
|
602
|
-
* @returns
|
|
603
|
-
*/
|
|
604
|
-
public coordinate(option?: CoordinateOption): CoordinateController;
|
|
605
|
-
/**
|
|
606
|
-
* 声明坐标系类型,并进行配置。
|
|
607
|
-
*
|
|
608
|
-
* ```ts
|
|
609
|
-
* // 直角坐标系,并进行转置变换
|
|
610
|
-
* view.coordinate('rect').transpose();
|
|
611
|
-
*
|
|
612
|
-
* // 默认创建直角坐标系
|
|
613
|
-
* view.coordinate();
|
|
614
|
-
* ```
|
|
615
|
-
*
|
|
616
|
-
* @param type 坐标系类型
|
|
617
|
-
* @param [coordinateCfg] 坐标系配置
|
|
618
|
-
* @returns
|
|
619
|
-
*/
|
|
620
|
-
public coordinate(type: string, coordinateCfg?: CoordinateCfg): CoordinateController;
|
|
621
|
-
public coordinate(type: string | CoordinateOption, coordinateCfg?: CoordinateCfg): CoordinateController {
|
|
622
|
-
// 提供语法糖,使用更简单
|
|
623
|
-
if (isString(type)) {
|
|
624
|
-
set(this.options, 'coordinate', { type, cfg: coordinateCfg } as CoordinateOption);
|
|
625
|
-
} else {
|
|
626
|
-
set(this.options, 'coordinate', type);
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
// 更新 coordinate 配置
|
|
630
|
-
this.coordinateController.update(this.options.coordinate);
|
|
631
|
-
|
|
632
|
-
return this.coordinateController;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* @deprecated
|
|
637
|
-
* This method will be removed at G2 V4.1. Replaced by {@link #coordinate()}
|
|
638
|
-
*/
|
|
639
|
-
public coord(type: string | CoordinateOption, coordinateCfg?: CoordinateCfg): CoordinateController {
|
|
640
|
-
console.warn('This method will be removed at G2 V4.1. Please use chart.coordinate() instead.');
|
|
641
|
-
// @ts-ignore
|
|
642
|
-
return this.coordinate(type, coordinateCfg);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* view 分面绘制。
|
|
647
|
-
*
|
|
648
|
-
* ```ts
|
|
649
|
-
* view.facet('rect', {
|
|
650
|
-
* rowField: 'province',
|
|
651
|
-
* columnField: 'category',
|
|
652
|
-
* eachView: (innerView: View, facet?: FacetData) => {
|
|
653
|
-
* innerView.line().position('city*sale');
|
|
654
|
-
* },
|
|
655
|
-
* });
|
|
656
|
-
* ```
|
|
657
|
-
*
|
|
658
|
-
* @param type 分面类型
|
|
659
|
-
* @param cfg 分面配置, [[FacetCfgMap]]
|
|
660
|
-
* @returns View
|
|
661
|
-
*/
|
|
662
|
-
public facet<T extends keyof FacetCfgMap>(type: T, cfg: FacetCfgMap[T]): View {
|
|
663
|
-
// 先销毁掉之前的分面
|
|
664
|
-
if (this.facetInstance) {
|
|
665
|
-
this.facetInstance.destroy();
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
// 创建新的分面
|
|
669
|
-
const Ctor = getFacet(type);
|
|
670
|
-
|
|
671
|
-
if (!Ctor) {
|
|
672
|
-
throw new Error(`facet '${type}' is not exist!`);
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
this.facetInstance = new Ctor(this, { ...cfg, type });
|
|
676
|
-
|
|
677
|
-
return this;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
/*
|
|
681
|
-
* 开启或者关闭动画。
|
|
682
|
-
*
|
|
683
|
-
* ```ts
|
|
684
|
-
* view.animate(false);
|
|
685
|
-
* ```
|
|
686
|
-
*
|
|
687
|
-
* @param status 动画状态,true 表示开始,false 表示关闭
|
|
688
|
-
* @returns View
|
|
689
|
-
*/
|
|
690
|
-
public animate(status: boolean): View {
|
|
691
|
-
set(this.options, 'animate', status);
|
|
692
|
-
return this;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
/**
|
|
696
|
-
* 更新配置项,用于配置项式声明。
|
|
697
|
-
* @param options 配置项
|
|
698
|
-
*/
|
|
699
|
-
public updateOptions(options: Options) {
|
|
700
|
-
this.clear(); // 清空
|
|
701
|
-
mix(this.options, options);
|
|
702
|
-
|
|
703
|
-
// 需要把已存在的 view 销毁,否则会重复创建
|
|
704
|
-
// 目前针对配置项还没有特别好的 view 更新机制,为了不影响主流流程,所以在这里直接销毁
|
|
705
|
-
this.views.forEach((view) => view.destroy());
|
|
706
|
-
this.views = [];
|
|
707
|
-
|
|
708
|
-
this.initOptions();
|
|
709
|
-
// 初始化坐标系大小,保证 padding 计算正确
|
|
710
|
-
this.coordinateBBox = this.viewBBox;
|
|
711
|
-
return this;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* 往 `view.options` 属性中存储配置项。
|
|
716
|
-
* @param name 属性名称
|
|
717
|
-
* @param opt 属性值
|
|
718
|
-
* @returns view
|
|
719
|
-
*/
|
|
720
|
-
public option(name: string, opt: any): View {
|
|
721
|
-
// 对于内置的 option,避免覆盖。
|
|
722
|
-
// name 在原型上,说明可能是内置 API,存在 option 被覆盖的风险,不处理
|
|
723
|
-
if (View.prototype[name]) {
|
|
724
|
-
throw new Error(`Can't use built in variable name "${name}", please change another one.`);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// 存入到 option 中
|
|
728
|
-
set(this.options, name, opt);
|
|
729
|
-
return this;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* 设置主题。
|
|
734
|
-
*
|
|
735
|
-
* ```ts
|
|
736
|
-
* view.theme('dark'); // 'dark' 需要事先通过 `registerTheme()` 接口注册完成
|
|
737
|
-
*
|
|
738
|
-
* view.theme({ defaultColor: 'red' });
|
|
739
|
-
* ```
|
|
740
|
-
*
|
|
741
|
-
* @param theme 主题名或者主题配置
|
|
742
|
-
* @returns View
|
|
743
|
-
*/
|
|
744
|
-
public theme(theme: string | LooseObject): View {
|
|
745
|
-
this.themeObject = isObject(theme) ? deepMix({}, this.themeObject, createTheme(theme)) : getTheme(theme);
|
|
746
|
-
|
|
747
|
-
return this;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/* end 一系列传入配置的 API */
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
* Call the interaction based on the interaction name
|
|
754
|
-
*
|
|
755
|
-
* ```ts
|
|
756
|
-
* view.interaction('my-interaction', { extra: 'hello world' });
|
|
757
|
-
* ```
|
|
758
|
-
* 详细文档可以参考:https://g2.antv.vision/zh/docs/api/general/interaction
|
|
759
|
-
* @param name interaction name
|
|
760
|
-
* @param cfg interaction config
|
|
761
|
-
* @returns
|
|
762
|
-
*/
|
|
763
|
-
public interaction(name: string, cfg?: LooseObject): View {
|
|
764
|
-
const existInteraction = this.interactions[name];
|
|
765
|
-
// 存在则先销毁已有的
|
|
766
|
-
if (existInteraction) {
|
|
767
|
-
existInteraction.destroy();
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// 新建交互实例
|
|
771
|
-
const interaction = createInteraction(name, this, cfg);
|
|
772
|
-
if (interaction) {
|
|
773
|
-
interaction.init();
|
|
774
|
-
this.interactions[name] = interaction;
|
|
775
|
-
}
|
|
776
|
-
return this;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* 移除当前 View 的 interaction
|
|
781
|
-
* ```ts
|
|
782
|
-
* view.removeInteraction('my-interaction');
|
|
783
|
-
* ```
|
|
784
|
-
* @param name interaction name
|
|
785
|
-
*/
|
|
786
|
-
public removeInteraction(name: string) {
|
|
787
|
-
const existInteraction = this.interactions[name];
|
|
788
|
-
// 存在则先销毁已有的
|
|
789
|
-
if (existInteraction) {
|
|
790
|
-
existInteraction.destroy();
|
|
791
|
-
this.interactions[name] = undefined;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* 修改数据,数据更新逻辑,数据更新仅仅影响当前这一层的 view
|
|
797
|
-
*
|
|
798
|
-
* ```ts
|
|
799
|
-
* view.changeData([{ city: '北京', sale: '200' }]);
|
|
800
|
-
* ```
|
|
801
|
-
*
|
|
802
|
-
* @param data
|
|
803
|
-
* @returns void
|
|
804
|
-
*/
|
|
805
|
-
public changeData(data: Data) {
|
|
806
|
-
this.isDataChanged = true;
|
|
807
|
-
this.emit(VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA, Event.fromData(this, VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA, null));
|
|
808
|
-
// 1. 保存数据
|
|
809
|
-
this.data(data);
|
|
810
|
-
|
|
811
|
-
// 2. 渲染
|
|
812
|
-
this.paint(true);
|
|
813
|
-
|
|
814
|
-
// 3. 遍历子 view 进行 change data
|
|
815
|
-
const views = this.views;
|
|
816
|
-
for (let i = 0, len = views.length; i < len; i++) {
|
|
817
|
-
const view = views[i];
|
|
818
|
-
// FIXME 子 view 有自己的数据的情况,该如何处理?
|
|
819
|
-
view.changeData(data);
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
this.emit(VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA, Event.fromData(this, VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA, null));
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
/* View 管理相关的 API */
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* 创建子 view
|
|
829
|
-
*
|
|
830
|
-
* ```ts
|
|
831
|
-
* const innerView = view.createView({
|
|
832
|
-
* start: { x: 0, y: 0 },
|
|
833
|
-
* end: { x: 0.5, y: 0.5 },
|
|
834
|
-
* padding: 8,
|
|
835
|
-
* });
|
|
836
|
-
* ```
|
|
837
|
-
*
|
|
838
|
-
* @param cfg
|
|
839
|
-
* @returns View
|
|
840
|
-
*/
|
|
841
|
-
public createView(cfg?: Partial<ViewCfg>): View {
|
|
842
|
-
// 将会在 4.1 版本中移除递归嵌套 view,仅仅只允许 chart - view 两层。
|
|
843
|
-
// 这个 API 理论上用户量不多,所以暂时不发大版本,所以先暂时打一个 warning。
|
|
844
|
-
if (this.parent && this.parent.parent) {
|
|
845
|
-
// 存在 3 层 结构了
|
|
846
|
-
console.warn('The view nesting recursive feature will be removed at G2 V4.1. Please avoid to use it.');
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
// 子 view 共享 options 配置数据
|
|
850
|
-
const sharedOptions = {
|
|
851
|
-
data: this.options.data,
|
|
852
|
-
scales: clone(this.options.scales),
|
|
853
|
-
axes: clone(this.options.axes),
|
|
854
|
-
coordinate: clone(this.coordinateController.getOption()),
|
|
855
|
-
tooltip: clone(this.options.tooltip),
|
|
856
|
-
legends: clone(this.options.legends),
|
|
857
|
-
animate: this.options.animate,
|
|
858
|
-
visible: this.visible,
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
const v = new View({
|
|
862
|
-
parent: this,
|
|
863
|
-
canvas: this.canvas,
|
|
864
|
-
// 子 view 共用三层 group
|
|
865
|
-
backgroundGroup: this.backgroundGroup.addGroup({ zIndex: GROUP_Z_INDEX.BG }),
|
|
866
|
-
middleGroup: this.middleGroup.addGroup({ zIndex: GROUP_Z_INDEX.MID }),
|
|
867
|
-
foregroundGroup: this.foregroundGroup.addGroup({ zIndex: GROUP_Z_INDEX.FORE }),
|
|
868
|
-
theme: this.themeObject,
|
|
869
|
-
padding: this.padding,
|
|
870
|
-
...cfg,
|
|
871
|
-
options: {
|
|
872
|
-
...sharedOptions,
|
|
873
|
-
...get(cfg, 'options', {}),
|
|
874
|
-
},
|
|
875
|
-
});
|
|
876
|
-
|
|
877
|
-
this.views.push(v);
|
|
878
|
-
|
|
879
|
-
return v;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* @deprecated
|
|
884
|
-
* This method will be removed at G2 V4.1. Replaced by {@link #createView()}
|
|
885
|
-
*/
|
|
886
|
-
public view(cfg?: Partial<ViewCfg>) {
|
|
887
|
-
console.warn('This method will be removed at G2 V4.1. Please use chart.createView() instead.');
|
|
888
|
-
return this.createView(cfg);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* 删除一个子 view
|
|
893
|
-
* @param view
|
|
894
|
-
* @return removedView
|
|
895
|
-
*/
|
|
896
|
-
public removeView(view: View): View {
|
|
897
|
-
const removedView = remove(this.views, (v: View) => v === view)[0];
|
|
898
|
-
|
|
899
|
-
if (removedView) {
|
|
900
|
-
removedView.destroy();
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
return removedView;
|
|
904
|
-
}
|
|
905
|
-
/* end View 管理相关的 API */
|
|
906
|
-
|
|
907
|
-
// 一些 get 方法
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* 获取当前坐标系实例。
|
|
911
|
-
* @returns [[Coordinate]]
|
|
912
|
-
*/
|
|
913
|
-
public getCoordinate() {
|
|
914
|
-
return this.coordinateInstance;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
/**
|
|
918
|
-
* 获取当前 view 的主题配置。
|
|
919
|
-
* @returns themeObject
|
|
920
|
-
*/
|
|
921
|
-
public getTheme(): LooseObject {
|
|
922
|
-
return this.themeObject;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* 获得 x 轴字段的 scale 实例。
|
|
927
|
-
* @returns view 中 Geometry 对于的 x scale
|
|
928
|
-
*/
|
|
929
|
-
public getXScale(): Scale {
|
|
930
|
-
// 拿第一个 Geometry 的 X scale
|
|
931
|
-
// 隐藏逻辑:一个 view 中的 Geometry 必须 x 字段一致
|
|
932
|
-
const g = this.geometries[0];
|
|
933
|
-
return g ? g.getXScale() : null;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* 获取 y 轴字段的 scales 实例。
|
|
938
|
-
* @returns view 中 Geometry 对于的 y scale 数组
|
|
939
|
-
*/
|
|
940
|
-
public getYScales(): Scale[] {
|
|
941
|
-
// 拿到所有的 Geometry 的 Y scale,然后去重
|
|
942
|
-
const tmpMap = {};
|
|
943
|
-
const yScales = [];
|
|
944
|
-
this.geometries.forEach((g: Geometry) => {
|
|
945
|
-
const yScale = g.getYScale();
|
|
946
|
-
const field = yScale.field;
|
|
947
|
-
if (!tmpMap[field]) {
|
|
948
|
-
tmpMap[field] = true;
|
|
949
|
-
yScales.push(yScale);
|
|
950
|
-
}
|
|
951
|
-
});
|
|
952
|
-
return yScales;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* 获取 x 轴或者 y 轴对应的所有 scale 实例。
|
|
957
|
-
* @param dimType x | y
|
|
958
|
-
* @returns x 轴或者 y 轴对应的所有 scale 实例。
|
|
959
|
-
*/
|
|
960
|
-
public getScalesByDim(dimType: 'x' | 'y'): Record<string, Scale> {
|
|
961
|
-
const geometries = this.geometries;
|
|
962
|
-
const scales = {};
|
|
963
|
-
|
|
964
|
-
for (let i = 0, len = geometries.length; i < len; i++) {
|
|
965
|
-
const geometry = geometries[i];
|
|
966
|
-
const scale = dimType === 'x' ? geometry.getXScale() : geometry.getYScale();
|
|
967
|
-
if (scale && !scales[scale.field]) {
|
|
968
|
-
scales[scale.field] = scale;
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
return scales;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
/**
|
|
976
|
-
* 根据字段名去获取 scale 实例。
|
|
977
|
-
* @param field 数据字段名称
|
|
978
|
-
* @param key id
|
|
979
|
-
*/
|
|
980
|
-
public getScale(field: string, key?: string): Scale {
|
|
981
|
-
const defaultKey = key ? key : this.getScaleKey(field);
|
|
982
|
-
// 调用根节点 view 的方法获取
|
|
983
|
-
return this.getRootView().scalePool.getScale(defaultKey);
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* @deprecated
|
|
988
|
-
* This method will be removed at G2 V4.1. Please use `getScale`.
|
|
989
|
-
*/
|
|
990
|
-
public getScaleByField(field: string, key?: string): Scale {
|
|
991
|
-
return this.getScale(field, key);
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* 返回所有配置信息。
|
|
996
|
-
* @returns 所有的 view API 配置。
|
|
997
|
-
*/
|
|
998
|
-
public getOptions(): Options {
|
|
999
|
-
return this.options;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* 获取 view 的数据(过滤后的数据)。
|
|
1004
|
-
* @returns 处理过滤器之后的数据。
|
|
1005
|
-
*/
|
|
1006
|
-
public getData() {
|
|
1007
|
-
return this.filteredData;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* 获取原始数据
|
|
1012
|
-
* @returns 传入 G2 的原始数据
|
|
1013
|
-
*/
|
|
1014
|
-
public getOriginalData() {
|
|
1015
|
-
return this.options.data;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
/**
|
|
1019
|
-
* 获取布局后的边距 padding
|
|
1020
|
-
* @returns
|
|
1021
|
-
*/
|
|
1022
|
-
public getPadding(): Padding {
|
|
1023
|
-
return this.autoPadding.getPadding();
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* 获取当前 view 有的 geometries
|
|
1028
|
-
* @returns
|
|
1029
|
-
*/
|
|
1030
|
-
public getGeometries() {
|
|
1031
|
-
return this.geometries;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* 获取 view 中的所有 geome
|
|
1036
|
-
*/
|
|
1037
|
-
public getElements(): Element[] {
|
|
1038
|
-
return reduce(
|
|
1039
|
-
this.geometries,
|
|
1040
|
-
(elements: Element[], geometry: Geometry) => {
|
|
1041
|
-
return elements.concat(geometry.getElements());
|
|
1042
|
-
},
|
|
1043
|
-
[]
|
|
1044
|
-
);
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* 根据一定的规则查找 Geometry 的 Elements。
|
|
1049
|
-
*
|
|
1050
|
-
* ```typescript
|
|
1051
|
-
* getElementsBy((element) => {
|
|
1052
|
-
* const data = element.getData();
|
|
1053
|
-
*
|
|
1054
|
-
* return data.a === 'a';
|
|
1055
|
-
* });
|
|
1056
|
-
* ```
|
|
1057
|
-
*
|
|
1058
|
-
* @param condition 定义查找规则的回调函数。
|
|
1059
|
-
* @returns
|
|
1060
|
-
*/
|
|
1061
|
-
public getElementsBy(condition: (element: Element) => boolean): Element[] {
|
|
1062
|
-
return this.getElements().filter((el) => condition(el));
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* 获得绘制的层级 group。
|
|
1067
|
-
* @param layer 层级名称。
|
|
1068
|
-
* @returns 对应层级的 Group。
|
|
1069
|
-
*/
|
|
1070
|
-
public getLayer(layer: LAYER): IGroup {
|
|
1071
|
-
return layer === LAYER.BG
|
|
1072
|
-
? this.backgroundGroup
|
|
1073
|
-
: layer === LAYER.MID
|
|
1074
|
-
? this.middleGroup
|
|
1075
|
-
: layer === LAYER.FORE
|
|
1076
|
-
? this.foregroundGroup
|
|
1077
|
-
: this.foregroundGroup;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* 对外暴露方法,判断一个点是否在绘图区域(即坐标系范围)内部。
|
|
1082
|
-
* @param point 坐标点
|
|
1083
|
-
*/
|
|
1084
|
-
public isPointInPlot(point: Point): boolean {
|
|
1085
|
-
return isPointInCoordinate(this.getCoordinate(), point);
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
/**
|
|
1089
|
-
* 获得所有的 legend 对应的 attribute 实例。
|
|
1090
|
-
* @returns 维度字段的 Attribute 数组
|
|
1091
|
-
*/
|
|
1092
|
-
public getLegendAttributes(): Attribute[] {
|
|
1093
|
-
return flatten(this.geometries.map((g: Geometry) => g.getGroupAttributes())) as unknown as Attribute[];
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
/**
|
|
1097
|
-
* 获取所有的分组字段的 scale 实例。
|
|
1098
|
-
* @returns 获得分组字段的 scale 实例数组。
|
|
1099
|
-
*/
|
|
1100
|
-
public getGroupScales(): Scale[] {
|
|
1101
|
-
// 拿到所有的 Geometry 的 分组字段 scale,然后打平去重
|
|
1102
|
-
const scales = this.geometries.map((g: Geometry) => g.getGroupScales());
|
|
1103
|
-
return uniq(flatten(scales));
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
/**
|
|
1107
|
-
* 获取 G.Canvas 实例。
|
|
1108
|
-
* @returns G.Canvas 画布实例。
|
|
1109
|
-
*/
|
|
1110
|
-
public getCanvas(): ICanvas {
|
|
1111
|
-
return (this.getRootView() as unknown as Chart).canvas;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
/**
|
|
1115
|
-
* 获得根节点 view。
|
|
1116
|
-
*/
|
|
1117
|
-
public getRootView(): View {
|
|
1118
|
-
let v = this as View;
|
|
1119
|
-
|
|
1120
|
-
while (true) {
|
|
1121
|
-
if (v.parent) {
|
|
1122
|
-
v = v.parent;
|
|
1123
|
-
continue;
|
|
1124
|
-
}
|
|
1125
|
-
break;
|
|
1126
|
-
}
|
|
1127
|
-
return v;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
/**
|
|
1131
|
-
* 获取该数据在可视化后,对应的画布坐标点。
|
|
1132
|
-
* @param data 原始数据记录
|
|
1133
|
-
* @returns 对应的画布坐标点
|
|
1134
|
-
*/
|
|
1135
|
-
public getXY(data: Datum): Point {
|
|
1136
|
-
const coordinate = this.getCoordinate();
|
|
1137
|
-
const xScales = this.getScalesByDim('x');
|
|
1138
|
-
const yScales = this.getScalesByDim('y');
|
|
1139
|
-
let x;
|
|
1140
|
-
let y;
|
|
1141
|
-
|
|
1142
|
-
each(data, (value, key) => {
|
|
1143
|
-
if (xScales[key]) {
|
|
1144
|
-
x = xScales[key].scale(value);
|
|
1145
|
-
}
|
|
1146
|
-
if (yScales[key]) {
|
|
1147
|
-
y = yScales[key].scale(value);
|
|
1148
|
-
}
|
|
1149
|
-
});
|
|
1150
|
-
|
|
1151
|
-
if (!isNil(x) && !isNil(y)) {
|
|
1152
|
-
return coordinate.convert({ x, y });
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
public getController(name: 'tooltip'): Tooltip;
|
|
1157
|
-
public getController(name: 'axis'): Axis;
|
|
1158
|
-
public getController(name: 'legend'): Legend;
|
|
1159
|
-
public getController(name: 'scrollbar'): Scrollbar;
|
|
1160
|
-
public getController(name: 'slider'): Slider;
|
|
1161
|
-
public getController(name: 'annotation'): Annotation;
|
|
1162
|
-
public getController(name: 'gestucre'): Gesture;
|
|
1163
|
-
public getController(name: string): Controller;
|
|
1164
|
-
/**
|
|
1165
|
-
* 获取 name 对应的 controller 实例
|
|
1166
|
-
* @param name
|
|
1167
|
-
*/
|
|
1168
|
-
public getController(name: string): Controller {
|
|
1169
|
-
return find(this.controllers, (c: Controller) => c.name === name);
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* 显示 point 坐标点对应的 tooltip。
|
|
1174
|
-
* @param point 画布坐标点
|
|
1175
|
-
* @returns View
|
|
1176
|
-
*/
|
|
1177
|
-
public showTooltip(point: Point): View {
|
|
1178
|
-
const tooltip = this.getController('tooltip');
|
|
1179
|
-
if (tooltip) {
|
|
1180
|
-
tooltip.showTooltip(point);
|
|
1181
|
-
}
|
|
1182
|
-
return this;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* 隐藏 tooltip。
|
|
1187
|
-
* @returns View
|
|
1188
|
-
*/
|
|
1189
|
-
public hideTooltip(): View {
|
|
1190
|
-
const tooltip = this.getController('tooltip');
|
|
1191
|
-
if (tooltip) {
|
|
1192
|
-
tooltip.hideTooltip();
|
|
1193
|
-
}
|
|
1194
|
-
return this;
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
* 将 tooltip 锁定到当前位置不能移动。
|
|
1199
|
-
* @returns View
|
|
1200
|
-
*/
|
|
1201
|
-
public lockTooltip(): View {
|
|
1202
|
-
const tooltip = this.getController('tooltip');
|
|
1203
|
-
if (tooltip) {
|
|
1204
|
-
tooltip.lockTooltip();
|
|
1205
|
-
}
|
|
1206
|
-
return this;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* 将 tooltip 锁定解除。
|
|
1211
|
-
* @returns View
|
|
1212
|
-
*/
|
|
1213
|
-
public unlockTooltip(): View {
|
|
1214
|
-
const tooltip = this.getController('tooltip');
|
|
1215
|
-
if (tooltip) {
|
|
1216
|
-
tooltip.unlockTooltip();
|
|
1217
|
-
}
|
|
1218
|
-
return this;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* 是否锁定 tooltip。
|
|
1223
|
-
* @returns 是否锁定
|
|
1224
|
-
*/
|
|
1225
|
-
public isTooltipLocked() {
|
|
1226
|
-
const tooltip = this.getController('tooltip');
|
|
1227
|
-
return tooltip && tooltip.isTooltipLocked();
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
/**
|
|
1231
|
-
* 获取当前 point 对应的 tooltip 数据项。
|
|
1232
|
-
* @param point 坐标点
|
|
1233
|
-
* @returns tooltip 数据项
|
|
1234
|
-
*/
|
|
1235
|
-
public getTooltipItems(point: Point) {
|
|
1236
|
-
const tooltip = this.getController('tooltip');
|
|
1237
|
-
|
|
1238
|
-
return tooltip ? tooltip.getTooltipItems(point) : [];
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
/**
|
|
1242
|
-
* 获取逼近的点的数据集合
|
|
1243
|
-
* @param point 当前坐标点
|
|
1244
|
-
* @returns 数据
|
|
1245
|
-
*/
|
|
1246
|
-
public getSnapRecords(point: Point) {
|
|
1247
|
-
const geometries = this.geometries;
|
|
1248
|
-
let rst = [];
|
|
1249
|
-
for (let i = 0, len = geometries.length; i < len; i++) {
|
|
1250
|
-
const geom = geometries[i];
|
|
1251
|
-
const dataArray = geom.dataArray;
|
|
1252
|
-
geom.sort(dataArray); // 先进行排序,便于 tooltip 查找
|
|
1253
|
-
let record;
|
|
1254
|
-
for (let j = 0, dataLen = dataArray.length; j < dataLen; j++) {
|
|
1255
|
-
const data = dataArray[j];
|
|
1256
|
-
record = findDataByPoint(point, data, geom);
|
|
1257
|
-
if (record) {
|
|
1258
|
-
rst.push(record);
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
// 同样递归处理子 views
|
|
1264
|
-
const views = this.views;
|
|
1265
|
-
for (let i = 0, len = views.length; i < len; i++) {
|
|
1266
|
-
const view = views[i];
|
|
1267
|
-
const snapRecords = view.getSnapRecords(point);
|
|
1268
|
-
rst = rst.concat(snapRecords);
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
return rst;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* 获取所有的 pure component 组件,用于布局。
|
|
1276
|
-
*/
|
|
1277
|
-
public getComponents(): ComponentOption[] {
|
|
1278
|
-
let components = [];
|
|
1279
|
-
const controllers = this.controllers;
|
|
1280
|
-
for (let i = 0, len = controllers.length; i < len; i++) {
|
|
1281
|
-
const controller = controllers[i];
|
|
1282
|
-
components = components.concat(controller.getComponents());
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
return components;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
/**
|
|
1289
|
-
* 将 data 数据进行过滤。
|
|
1290
|
-
* @param data
|
|
1291
|
-
* @returns 过滤之后的数据
|
|
1292
|
-
*/
|
|
1293
|
-
public filterData(data: Data): Data {
|
|
1294
|
-
const { filters } = this.options;
|
|
1295
|
-
// 不存在 filters,则不需要进行数据过滤
|
|
1296
|
-
if (size(filters) === 0) {
|
|
1297
|
-
return data;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
// 存在过滤器,则逐个执行过滤,过滤器之间是 与 的关系
|
|
1301
|
-
return filter(data, (datum: Datum, idx: number) => {
|
|
1302
|
-
// 所有的 filter 字段
|
|
1303
|
-
const fields = Object.keys(filters);
|
|
1304
|
-
|
|
1305
|
-
// 所有的条件都通过,才算通过
|
|
1306
|
-
return fields.every((field: string) => {
|
|
1307
|
-
const condition = filters[field];
|
|
1308
|
-
|
|
1309
|
-
// condition 返回 true,则保留
|
|
1310
|
-
return condition(datum[field], datum, idx);
|
|
1311
|
-
});
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
/**
|
|
1316
|
-
* 对某一个字段进行过滤
|
|
1317
|
-
* @param field
|
|
1318
|
-
* @param data
|
|
1319
|
-
*/
|
|
1320
|
-
public filterFieldData(field: string, data: Data): Data {
|
|
1321
|
-
const { filters } = this.options;
|
|
1322
|
-
const condition = get(filters, field);
|
|
1323
|
-
|
|
1324
|
-
if (isUndefined(condition)) {
|
|
1325
|
-
return data;
|
|
1326
|
-
}
|
|
1327
|
-
return data.filter((datum: Datum, idx: number) => condition(datum[field], datum, idx));
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
/**
|
|
1331
|
-
* 调整 coordinate 的坐标范围。
|
|
1332
|
-
*/
|
|
1333
|
-
public adjustCoordinate() {
|
|
1334
|
-
const { start: curStart, end: curEnd } = this.getCoordinate();
|
|
1335
|
-
const start = this.coordinateBBox.bl;
|
|
1336
|
-
const end = this.coordinateBBox.tr;
|
|
1337
|
-
|
|
1338
|
-
// 在 defaultLayoutFn 中只会在 coordinateBBox 发生变化的时候会调用 adjustCoordinate(),所以不用担心被置位
|
|
1339
|
-
if (isEqual(curStart, start) && isEqual(curEnd, end)) {
|
|
1340
|
-
this.isCoordinateChanged = false;
|
|
1341
|
-
// 如果大小没有变化则不更新
|
|
1342
|
-
return;
|
|
1343
|
-
}
|
|
1344
|
-
this.isCoordinateChanged = true;
|
|
1345
|
-
this.coordinateInstance = this.coordinateController.adjust(start, end);
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
protected paint(isUpdate: boolean) {
|
|
1349
|
-
this.renderDataRecursive(isUpdate);
|
|
1350
|
-
|
|
1351
|
-
// 处理 sync scale 的逻辑
|
|
1352
|
-
this.syncScale();
|
|
1353
|
-
|
|
1354
|
-
this.emit(VIEW_LIFE_CIRCLE.BEFORE_PAINT);
|
|
1355
|
-
|
|
1356
|
-
// 初始化图形、组件位置,计算 padding
|
|
1357
|
-
this.renderPaddingRecursive(isUpdate);
|
|
1358
|
-
// 布局图形、组件
|
|
1359
|
-
this.renderLayoutRecursive(isUpdate);
|
|
1360
|
-
// 背景色 shape
|
|
1361
|
-
this.renderBackgroundStyleShape();
|
|
1362
|
-
// 最终的绘制 render
|
|
1363
|
-
this.renderPaintRecursive(isUpdate);
|
|
1364
|
-
|
|
1365
|
-
this.emit(VIEW_LIFE_CIRCLE.AFTER_PAINT);
|
|
1366
|
-
|
|
1367
|
-
this.isDataChanged = false; // 渲染完毕复位
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
* 渲染背景样式的 shape。
|
|
1372
|
-
* 放到 view 中创建的原因是让使用 view 绘制图形的时候,也能够处理背景色
|
|
1373
|
-
*/
|
|
1374
|
-
private renderBackgroundStyleShape() {
|
|
1375
|
-
// 只有根节点才处理
|
|
1376
|
-
if (this.parent) {
|
|
1377
|
-
return;
|
|
1378
|
-
}
|
|
1379
|
-
const background = get(this.themeObject, 'background');
|
|
1380
|
-
// 配置了背景色
|
|
1381
|
-
if (background) {
|
|
1382
|
-
// 1. 不存在则创建
|
|
1383
|
-
if (!this.backgroundStyleRectShape) {
|
|
1384
|
-
this.backgroundStyleRectShape = this.backgroundGroup.addShape('rect', {
|
|
1385
|
-
attrs: {},
|
|
1386
|
-
zIndex: -1,
|
|
1387
|
-
// 背景色 shape 不设置事件捕获
|
|
1388
|
-
capture: false,
|
|
1389
|
-
});
|
|
1390
|
-
this.backgroundStyleRectShape.toBack();
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
// 2. 有了 shape 之后设置背景,位置(更新的时候)
|
|
1394
|
-
const { x, y, width, height } = this.viewBBox;
|
|
1395
|
-
this.backgroundStyleRectShape.attr({
|
|
1396
|
-
fill: background,
|
|
1397
|
-
x,
|
|
1398
|
-
y,
|
|
1399
|
-
width,
|
|
1400
|
-
height,
|
|
1401
|
-
});
|
|
1402
|
-
} else {
|
|
1403
|
-
// 没有配置背景色
|
|
1404
|
-
if (this.backgroundStyleRectShape) {
|
|
1405
|
-
this.backgroundStyleRectShape.remove(true);
|
|
1406
|
-
this.backgroundStyleRectShape = undefined;
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* 递归计算每个 view 的 padding 值,coordinateBBox 和 coordinateInstance
|
|
1413
|
-
* @param isUpdate
|
|
1414
|
-
*/
|
|
1415
|
-
protected renderPaddingRecursive(isUpdate: boolean) {
|
|
1416
|
-
// 1. 子 view 大小相对 coordinateBBox,changeSize 的时候需要重新计算
|
|
1417
|
-
this.calculateViewBBox();
|
|
1418
|
-
// 2. 更新 coordinate
|
|
1419
|
-
this.adjustCoordinate();
|
|
1420
|
-
// 3. 初始化组件 component
|
|
1421
|
-
this.initComponents(isUpdate);
|
|
1422
|
-
// 4. 布局计算每隔 view 的 padding 值
|
|
1423
|
-
// 4.1. 自动加 auto padding -> absolute padding,并且增加 appendPadding
|
|
1424
|
-
this.autoPadding = calculatePadding(this).shrink(parsePadding(this.appendPadding));
|
|
1425
|
-
// 4.2. 计算出新的 coordinateBBox,更新 Coordinate
|
|
1426
|
-
// 这里必须保留,原因是后面子 view 的 viewBBox 或根据 parent 的 coordinateBBox
|
|
1427
|
-
this.coordinateBBox = this.viewBBox.shrink(this.autoPadding.getPadding());
|
|
1428
|
-
this.adjustCoordinate();
|
|
1429
|
-
|
|
1430
|
-
// 刷新 tooltip (tooltip crosshairs 依赖 coordinate 位置)
|
|
1431
|
-
const tooltipController = this.controllers.find((c) => c.name === 'tooltip');
|
|
1432
|
-
tooltipController.update();
|
|
1433
|
-
|
|
1434
|
-
// 同样递归处理子 views
|
|
1435
|
-
const views = this.views;
|
|
1436
|
-
for (let i = 0, len = views.length; i < len; i++) {
|
|
1437
|
-
const view = views[i];
|
|
1438
|
-
view.renderPaddingRecursive(isUpdate);
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
/**
|
|
1443
|
-
* 递归处理 view 的布局,最终是计算各个 view 的 coordinateBBox 和 coordinateInstance
|
|
1444
|
-
* @param isUpdate
|
|
1445
|
-
*/
|
|
1446
|
-
protected renderLayoutRecursive(isUpdate: boolean) {
|
|
1447
|
-
// 1. 同步子 view padding
|
|
1448
|
-
// 根据配置获取 padding
|
|
1449
|
-
const syncViewPaddingFn =
|
|
1450
|
-
this.syncViewPadding === true
|
|
1451
|
-
? defaultSyncViewPadding
|
|
1452
|
-
: isFunction(this.syncViewPadding)
|
|
1453
|
-
? this.syncViewPadding
|
|
1454
|
-
: undefined;
|
|
1455
|
-
|
|
1456
|
-
if (syncViewPaddingFn) {
|
|
1457
|
-
syncViewPaddingFn(this, this.views, PaddingCal);
|
|
1458
|
-
// 同步 padding 之后,更新 coordinate
|
|
1459
|
-
this.views.forEach((v: View) => {
|
|
1460
|
-
v.coordinateBBox = v.viewBBox.shrink(v.autoPadding.getPadding());
|
|
1461
|
-
v.adjustCoordinate();
|
|
1462
|
-
});
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
// 3. 将 view 中的组件按照 view padding 移动到对应的位置
|
|
1466
|
-
this.doLayout();
|
|
1467
|
-
|
|
1468
|
-
// 同样递归处理子 views
|
|
1469
|
-
const views = this.views;
|
|
1470
|
-
for (let i = 0, len = views.length; i < len; i++) {
|
|
1471
|
-
const view = views[i];
|
|
1472
|
-
view.renderLayoutRecursive(isUpdate);
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
/**
|
|
1477
|
-
* 最终递归绘制组件和图形
|
|
1478
|
-
* @param isUpdate
|
|
1479
|
-
*/
|
|
1480
|
-
protected renderPaintRecursive(isUpdate: boolean) {
|
|
1481
|
-
const middleGroup = this.middleGroup;
|
|
1482
|
-
if (this.limitInPlot) {
|
|
1483
|
-
const { type, attrs } = getCoordinateClipCfg(this.coordinateInstance);
|
|
1484
|
-
middleGroup.setClip({
|
|
1485
|
-
type,
|
|
1486
|
-
attrs,
|
|
1487
|
-
});
|
|
1488
|
-
} else {
|
|
1489
|
-
// 清除已有的 clip
|
|
1490
|
-
middleGroup.setClip(undefined);
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
// 1. 渲染几何标记
|
|
1494
|
-
this.paintGeometries(isUpdate);
|
|
1495
|
-
// 2. 绘制组件
|
|
1496
|
-
this.renderComponents(isUpdate);
|
|
1497
|
-
|
|
1498
|
-
// 同样递归处理子 views
|
|
1499
|
-
const views = this.views;
|
|
1500
|
-
for (let i = 0, len = views.length; i < len; i++) {
|
|
1501
|
-
const view = views[i];
|
|
1502
|
-
view.renderPaintRecursive(isUpdate);
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
// end Get 方法
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* 创建 scale,递归到顶层 view 去创建和缓存 scale
|
|
1510
|
-
* @param field
|
|
1511
|
-
* @param data
|
|
1512
|
-
* @param scaleDef
|
|
1513
|
-
* @param key
|
|
1514
|
-
*/
|
|
1515
|
-
protected createScale(field: string, data: Data, scaleDef: ScaleOption, key: string): Scale {
|
|
1516
|
-
// 1. 合并 field 对应的 scaleDef,合并原则是底层覆盖顶层(就近原则)
|
|
1517
|
-
const currentScaleDef = get(this.options.scales, [field]);
|
|
1518
|
-
const mergedScaleDef = { ...currentScaleDef, ...scaleDef };
|
|
1519
|
-
|
|
1520
|
-
// 2. 是否存在父 view,在则递归,否则创建
|
|
1521
|
-
if (this.parent) {
|
|
1522
|
-
return this.parent.createScale(field, data, mergedScaleDef, key);
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
// 3. 在根节点 view 通过 scalePool 创建
|
|
1526
|
-
return this.scalePool.createScale(field, data, mergedScaleDef, key);
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* 递归渲染中的数据处理
|
|
1531
|
-
* @param isUpdate
|
|
1532
|
-
*/
|
|
1533
|
-
private renderDataRecursive(isUpdate: boolean) {
|
|
1534
|
-
// 1. 处理数据
|
|
1535
|
-
this.doFilterData();
|
|
1536
|
-
// 2. 创建实例
|
|
1537
|
-
this.createCoordinate();
|
|
1538
|
-
// 3. 初始化 Geometry
|
|
1539
|
-
this.initGeometries(isUpdate);
|
|
1540
|
-
// 4. 处理分面逻辑,最终都是生成子 view 和 geometry
|
|
1541
|
-
this.renderFacet(isUpdate);
|
|
1542
|
-
|
|
1543
|
-
// 同样递归处理子 views
|
|
1544
|
-
const views = this.views;
|
|
1545
|
-
for (let i = 0, len = views.length; i < len; i++) {
|
|
1546
|
-
const view = views[i];
|
|
1547
|
-
view.renderDataRecursive(isUpdate);
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* 计算 region,计算实际的像素范围坐标
|
|
1553
|
-
* @private
|
|
1554
|
-
*/
|
|
1555
|
-
private calculateViewBBox() {
|
|
1556
|
-
let x;
|
|
1557
|
-
let y;
|
|
1558
|
-
let width;
|
|
1559
|
-
let height;
|
|
1560
|
-
|
|
1561
|
-
if (this.parent) {
|
|
1562
|
-
const bbox = this.parent.coordinateBBox;
|
|
1563
|
-
// 存在 parent, 那么就是通过父容器大小计算
|
|
1564
|
-
x = bbox.x;
|
|
1565
|
-
y = bbox.y;
|
|
1566
|
-
width = bbox.width;
|
|
1567
|
-
height = bbox.height;
|
|
1568
|
-
} else {
|
|
1569
|
-
// 顶层容器,从 canvas 中取值 宽高
|
|
1570
|
-
x = 0;
|
|
1571
|
-
y = 0;
|
|
1572
|
-
width = this.canvas.get('width');
|
|
1573
|
-
height = this.canvas.get('height');
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
const { start, end } = this.region;
|
|
1577
|
-
|
|
1578
|
-
// 根据 region 计算当前 view 的 bbox 大小。
|
|
1579
|
-
const viewBBox = new BBox(
|
|
1580
|
-
x + width * start.x,
|
|
1581
|
-
y + height * start.y,
|
|
1582
|
-
width * (end.x - start.x),
|
|
1583
|
-
height * (end.y - start.y)
|
|
1584
|
-
);
|
|
1585
|
-
|
|
1586
|
-
if (!this.viewBBox || !this.viewBBox.isEqual(viewBBox)) {
|
|
1587
|
-
// viewBBox 发生变化的时候进行更新
|
|
1588
|
-
this.viewBBox = new BBox(
|
|
1589
|
-
x + width * start.x,
|
|
1590
|
-
y + height * start.y,
|
|
1591
|
-
width * (end.x - start.x),
|
|
1592
|
-
height * (end.y - start.y)
|
|
1593
|
-
);
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
// 初始的 coordinate bbox 大小
|
|
1597
|
-
this.coordinateBBox = this.viewBBox;
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
/**
|
|
1601
|
-
* 初始化事件机制:G 4.0 底层内置支持 name:event 的机制,那么只要所有组件都有自己的 name 即可。
|
|
1602
|
-
*
|
|
1603
|
-
* G2 的事件只是获取事件委托,然后在 view 嵌套结构中,形成事件冒泡机制。
|
|
1604
|
-
* 当前 view 只委托自己 view 中的 Component 和 Geometry 事件,并向上冒泡
|
|
1605
|
-
* @private
|
|
1606
|
-
*/
|
|
1607
|
-
private initEvents() {
|
|
1608
|
-
// 三层 group 中的 shape 事件都会通过 G 冒泡上来的
|
|
1609
|
-
this.foregroundGroup.on('*', this.onDelegateEvents);
|
|
1610
|
-
this.middleGroup.on('*', this.onDelegateEvents);
|
|
1611
|
-
this.backgroundGroup.on('*', this.onDelegateEvents);
|
|
1612
|
-
|
|
1613
|
-
this.canvas.on('*', this.onCanvasEvent);
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
private onCanvasEvent = (evt: GEvent): void => {
|
|
1617
|
-
const name = evt.name;
|
|
1618
|
-
if (!name.includes(':')) {
|
|
1619
|
-
// 非委托事件
|
|
1620
|
-
const e = this.createViewEvent(evt);
|
|
1621
|
-
// 处理 plot 事件
|
|
1622
|
-
this.doPlotEvent(e);
|
|
1623
|
-
this.emit(name, e);
|
|
1624
|
-
}
|
|
1625
|
-
};
|
|
1626
|
-
|
|
1627
|
-
/**
|
|
1628
|
-
* 初始化插件
|
|
1629
|
-
*/
|
|
1630
|
-
private initComponentController() {
|
|
1631
|
-
const usedControllers = this.usedControllers;
|
|
1632
|
-
for (let i = 0, len = usedControllers.length; i < len; i++) {
|
|
1633
|
-
const controllerName = usedControllers[i];
|
|
1634
|
-
const Ctor = getComponentController(controllerName);
|
|
1635
|
-
if (Ctor) {
|
|
1636
|
-
this.controllers.push(new Ctor(this));
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
private createViewEvent(evt: GEvent) {
|
|
1642
|
-
const { shape, name } = evt;
|
|
1643
|
-
|
|
1644
|
-
const data = shape ? shape.get('origin') : null;
|
|
1645
|
-
// 事件在 view 嵌套中冒泡(暂不提供阻止冒泡的机制)
|
|
1646
|
-
const e = new Event(this, evt, data);
|
|
1647
|
-
e.type = name;
|
|
1648
|
-
return e;
|
|
1649
|
-
}
|
|
1650
|
-
/**
|
|
1651
|
-
* 触发事件之后
|
|
1652
|
-
* @param evt
|
|
1653
|
-
*/
|
|
1654
|
-
private onDelegateEvents = (evt: GEvent): void => {
|
|
1655
|
-
// 阻止继续冒泡,防止重复事件触发
|
|
1656
|
-
// evt.preventDefault();
|
|
1657
|
-
const { name } = evt;
|
|
1658
|
-
if (!name.includes(':')) {
|
|
1659
|
-
return;
|
|
1660
|
-
}
|
|
1661
|
-
// 事件在 view 嵌套中冒泡(暂不提供阻止冒泡的机制)
|
|
1662
|
-
const e = this.createViewEvent(evt);
|
|
1663
|
-
|
|
1664
|
-
// 包含有基本事件、组合事件
|
|
1665
|
-
this.emit(name, e);
|
|
1666
|
-
// const currentTarget = evt.currentTarget as IShape;
|
|
1667
|
-
// const inheritNames = currentTarget.get('inheritNames');
|
|
1668
|
-
// if (evt.delegateObject || inheritNames) {
|
|
1669
|
-
// const events = this.getEvents();
|
|
1670
|
-
// each(inheritNames, (subName) => {
|
|
1671
|
-
// const eventName = `${subName}:${type}`;
|
|
1672
|
-
// if (events[eventName]) {
|
|
1673
|
-
// this.emit(eventName, e);
|
|
1674
|
-
// }
|
|
1675
|
-
// });
|
|
1676
|
-
// }
|
|
1677
|
-
};
|
|
1678
|
-
|
|
1679
|
-
/**
|
|
1680
|
-
* 处理 PLOT_EVENTS
|
|
1681
|
-
* plot event 需要处理所有的基础事件,并判断是否在画布中,然后再决定是否要 emit。
|
|
1682
|
-
* 对于 mouseenter、mouseleave 比较特殊,需要做一下数学比较。
|
|
1683
|
-
* @param e
|
|
1684
|
-
*/
|
|
1685
|
-
private doPlotEvent(e: Event) {
|
|
1686
|
-
const { type, x, y } = e;
|
|
1687
|
-
|
|
1688
|
-
const point = { x, y };
|
|
1689
|
-
|
|
1690
|
-
const ALL_EVENTS = [
|
|
1691
|
-
'mousedown',
|
|
1692
|
-
'mouseup',
|
|
1693
|
-
'mousemove',
|
|
1694
|
-
'mouseleave',
|
|
1695
|
-
'mousewheel',
|
|
1696
|
-
'touchstart',
|
|
1697
|
-
'touchmove',
|
|
1698
|
-
'touchend',
|
|
1699
|
-
'touchcancel',
|
|
1700
|
-
'click',
|
|
1701
|
-
'dblclick',
|
|
1702
|
-
'contextmenu',
|
|
1703
|
-
];
|
|
1704
|
-
|
|
1705
|
-
if (ALL_EVENTS.includes(type)) {
|
|
1706
|
-
const currentInPlot = this.isPointInPlot(point);
|
|
1707
|
-
const newEvent = e.clone();
|
|
1708
|
-
|
|
1709
|
-
if (currentInPlot) {
|
|
1710
|
-
const TYPE = `plot:${type}`; // 组合 plot 事件
|
|
1711
|
-
newEvent.type = TYPE;
|
|
1712
|
-
this.emit(TYPE, newEvent);
|
|
1713
|
-
if (type === 'mouseleave' || type === 'touchend') {
|
|
1714
|
-
// 在plot 内部却离开画布
|
|
1715
|
-
this.isPreMouseInPlot = false;
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
// 对于 mouseenter, mouseleave 的计算处理
|
|
1720
|
-
if (type === 'mousemove' || type === 'touchmove') {
|
|
1721
|
-
if (this.isPreMouseInPlot && !currentInPlot) {
|
|
1722
|
-
if (type === 'mousemove') {
|
|
1723
|
-
newEvent.type = PLOT_EVENTS.MOUSE_LEAVE;
|
|
1724
|
-
this.emit(PLOT_EVENTS.MOUSE_LEAVE, newEvent);
|
|
1725
|
-
}
|
|
1726
|
-
newEvent.type = PLOT_EVENTS.LEAVE;
|
|
1727
|
-
this.emit(PLOT_EVENTS.LEAVE, newEvent);
|
|
1728
|
-
} else if (!this.isPreMouseInPlot && currentInPlot) {
|
|
1729
|
-
if (type === 'mousemove') {
|
|
1730
|
-
newEvent.type = PLOT_EVENTS.MOUSE_ENTER;
|
|
1731
|
-
this.emit(PLOT_EVENTS.MOUSE_ENTER, newEvent);
|
|
1732
|
-
}
|
|
1733
|
-
newEvent.type = PLOT_EVENTS.ENTER;
|
|
1734
|
-
this.emit(PLOT_EVENTS.ENTER, newEvent);
|
|
1735
|
-
}
|
|
1736
|
-
// 赋新的状态值
|
|
1737
|
-
this.isPreMouseInPlot = currentInPlot;
|
|
1738
|
-
} else if (type === 'mouseleave' || type === 'touchend') {
|
|
1739
|
-
// 可能不在 currentInPlot 中
|
|
1740
|
-
if (this.isPreMouseInPlot) {
|
|
1741
|
-
if (type === 'mouseleave') {
|
|
1742
|
-
newEvent.type = PLOT_EVENTS.MOUSE_LEAVE;
|
|
1743
|
-
this.emit(PLOT_EVENTS.MOUSE_LEAVE, newEvent);
|
|
1744
|
-
}
|
|
1745
|
-
newEvent.type = PLOT_EVENTS.LEAVE;
|
|
1746
|
-
this.emit(PLOT_EVENTS.LEAVE, newEvent);
|
|
1747
|
-
|
|
1748
|
-
this.isPreMouseInPlot = false;
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
// view 生命周期 —— 渲染流程
|
|
1755
|
-
|
|
1756
|
-
/**
|
|
1757
|
-
* 处理筛选器,筛选数据
|
|
1758
|
-
* @private
|
|
1759
|
-
*/
|
|
1760
|
-
private doFilterData() {
|
|
1761
|
-
const { data } = this.options;
|
|
1762
|
-
this.filteredData = this.filterData(data);
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
* 初始化 Geometries
|
|
1767
|
-
* @private
|
|
1768
|
-
*/
|
|
1769
|
-
private initGeometries(isUpdate: boolean) {
|
|
1770
|
-
// 初始化图形的之前,先创建 / 更新 scales
|
|
1771
|
-
this.createOrUpdateScales();
|
|
1772
|
-
// 实例化 Geometry,然后 view 将所有的 scale 管理起来
|
|
1773
|
-
const coordinate = this.getCoordinate();
|
|
1774
|
-
const scaleDefs = get(this.options, 'scales', {});
|
|
1775
|
-
const geometries = this.geometries;
|
|
1776
|
-
for (let i = 0, len = geometries.length; i < len; i++) {
|
|
1777
|
-
const geometry = geometries[i];
|
|
1778
|
-
// 保持 scales 引用不要变化
|
|
1779
|
-
geometry.scales = this.getGeometryScales();
|
|
1780
|
-
const cfg = {
|
|
1781
|
-
coordinate, // 使用 coordinate 引用,可以保持 coordinate 的同步更新
|
|
1782
|
-
scaleDefs,
|
|
1783
|
-
data: this.filteredData,
|
|
1784
|
-
theme: this.themeObject,
|
|
1785
|
-
isDataChanged: this.isDataChanged,
|
|
1786
|
-
isCoordinateChanged: this.isCoordinateChanged,
|
|
1787
|
-
};
|
|
1788
|
-
|
|
1789
|
-
if (isUpdate) {
|
|
1790
|
-
// 数据发生更新
|
|
1791
|
-
geometry.update(cfg);
|
|
1792
|
-
} else {
|
|
1793
|
-
geometry.init(cfg);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
// Geometry 初始化之后,生成了 scale,然后进行调整 scale 配置
|
|
1798
|
-
this.adjustScales();
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* 根据 Geometry 的所有字段创建 scales
|
|
1803
|
-
* 如果存在,则更新,不存在则创建
|
|
1804
|
-
*/
|
|
1805
|
-
private createOrUpdateScales() {
|
|
1806
|
-
const fields = this.getScaleFields();
|
|
1807
|
-
const groupedFields = this.getGroupedFields();
|
|
1808
|
-
|
|
1809
|
-
const { data, scales = {} } = this.getOptions();
|
|
1810
|
-
const filteredData = this.filteredData;
|
|
1811
|
-
|
|
1812
|
-
for (let i = 0, len = fields.length; i < len; i++) {
|
|
1813
|
-
const field = fields[i];
|
|
1814
|
-
const scaleDef = scales[field];
|
|
1815
|
-
|
|
1816
|
-
// 调用方法,递归去创建
|
|
1817
|
-
const key = this.getScaleKey(field);
|
|
1818
|
-
this.createScale(
|
|
1819
|
-
field,
|
|
1820
|
-
// 分组字段的 scale 使用未过滤的数据创建
|
|
1821
|
-
groupedFields.includes(field) ? data : filteredData,
|
|
1822
|
-
scaleDef,
|
|
1823
|
-
key
|
|
1824
|
-
);
|
|
1825
|
-
|
|
1826
|
-
// 缓存从当前 view 创建的 scale key
|
|
1827
|
-
this.createdScaleKeys.set(key, true);
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* 处理 scale 同步逻辑
|
|
1833
|
-
*/
|
|
1834
|
-
private syncScale() {
|
|
1835
|
-
// 最终调用 root view 的
|
|
1836
|
-
this.getRootView().scalePool.sync(this.getCoordinate(), this.theme);
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
/**
|
|
1840
|
-
* 获得 Geometry 中的 scale 对象
|
|
1841
|
-
*/
|
|
1842
|
-
private getGeometryScales(): Record<string, Scale> {
|
|
1843
|
-
const fields = this.getScaleFields();
|
|
1844
|
-
|
|
1845
|
-
const scales = {};
|
|
1846
|
-
for (let i = 0; i < fields.length; i++) {
|
|
1847
|
-
const field = fields[i];
|
|
1848
|
-
scales[field] = this.getScaleByField(field);
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
return scales;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
private getScaleFields() {
|
|
1855
|
-
const fields = [];
|
|
1856
|
-
const tmpMap = new Map();
|
|
1857
|
-
const geometries = this.geometries;
|
|
1858
|
-
for (let i = 0; i < geometries.length; i++) {
|
|
1859
|
-
const geometry = geometries[i];
|
|
1860
|
-
const geometryScales = geometry.getScaleFields();
|
|
1861
|
-
uniq(geometryScales, fields, tmpMap);
|
|
1862
|
-
}
|
|
1863
|
-
return fields;
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
private getGroupedFields() {
|
|
1867
|
-
const fields = [];
|
|
1868
|
-
const tmpMap = new Map();
|
|
1869
|
-
const geometries = this.geometries;
|
|
1870
|
-
for (let i = 0; i < geometries.length; i++) {
|
|
1871
|
-
const geometry = geometries[i];
|
|
1872
|
-
const groupFields = geometry.getGroupFields();
|
|
1873
|
-
uniq(groupFields, fields, tmpMap);
|
|
1874
|
-
}
|
|
1875
|
-
return fields;
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
/**
|
|
1879
|
-
* 调整 scale 配置
|
|
1880
|
-
* @private
|
|
1881
|
-
*/
|
|
1882
|
-
private adjustScales() {
|
|
1883
|
-
// 调整目前包括:
|
|
1884
|
-
// 分类 scale,调整 range 范围
|
|
1885
|
-
this.adjustCategoryScaleRange();
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* 调整分类 scale 的 range,防止超出坐标系外面
|
|
1890
|
-
* @private
|
|
1891
|
-
*/
|
|
1892
|
-
private adjustCategoryScaleRange() {
|
|
1893
|
-
const xyScales = [this.getXScale(), ...this.getYScales()].filter((e) => !!e);
|
|
1894
|
-
const coordinate = this.getCoordinate();
|
|
1895
|
-
const scaleOptions = this.options.scales;
|
|
1896
|
-
|
|
1897
|
-
each(xyScales, (scale: Scale) => {
|
|
1898
|
-
const { field, values, isCategory, isIdentity } = scale;
|
|
1899
|
-
|
|
1900
|
-
// 分类或者 identity 的 scale 才进行处理
|
|
1901
|
-
if (isCategory || isIdentity) {
|
|
1902
|
-
// 存在 value 值,且用户没有配置 range 配置
|
|
1903
|
-
if (values && !get(scaleOptions, [field, 'range'])) {
|
|
1904
|
-
// 更新 range
|
|
1905
|
-
scale.range = getDefaultCategoryScaleRange(scale, coordinate, this.theme);
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
});
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
/**
|
|
1912
|
-
* 根据 options 配置、Geometry 字段配置,自动生成 components
|
|
1913
|
-
* @param isUpdate 是否是更新
|
|
1914
|
-
* @private
|
|
1915
|
-
*/
|
|
1916
|
-
private initComponents(isUpdate: boolean) {
|
|
1917
|
-
// 先全部清空,然后 render
|
|
1918
|
-
const controllers = this.controllers;
|
|
1919
|
-
for (let i = 0; i < controllers.length; i++) {
|
|
1920
|
-
const controller = controllers[i];
|
|
1921
|
-
// 更新则走更新逻辑;否则清空载重绘
|
|
1922
|
-
if (isUpdate) {
|
|
1923
|
-
controller.update();
|
|
1924
|
-
} else {
|
|
1925
|
-
controller.clear();
|
|
1926
|
-
controller.render();
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
private doLayout() {
|
|
1932
|
-
this.layoutFunc(this);
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
/**
|
|
1936
|
-
* 创建坐标系
|
|
1937
|
-
* @private
|
|
1938
|
-
*/
|
|
1939
|
-
private createCoordinate() {
|
|
1940
|
-
const start = this.coordinateBBox.bl;
|
|
1941
|
-
const end = this.coordinateBBox.tr;
|
|
1942
|
-
this.coordinateInstance = this.coordinateController.create(start, end);
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
/**
|
|
1946
|
-
* 根据 options 配置自动渲染 geometry
|
|
1947
|
-
* @private
|
|
1948
|
-
*/
|
|
1949
|
-
private paintGeometries(isUpdate: boolean) {
|
|
1950
|
-
const doAnimation = this.options.animate;
|
|
1951
|
-
// geometry 的 paint 阶段
|
|
1952
|
-
const coordinate = this.getCoordinate();
|
|
1953
|
-
const canvasRegion = {
|
|
1954
|
-
x: this.viewBBox.x,
|
|
1955
|
-
y: this.viewBBox.y,
|
|
1956
|
-
minX: this.viewBBox.minX,
|
|
1957
|
-
minY: this.viewBBox.minY,
|
|
1958
|
-
maxX: this.viewBBox.maxX,
|
|
1959
|
-
maxY: this.viewBBox.maxY,
|
|
1960
|
-
width: this.viewBBox.width,
|
|
1961
|
-
height: this.viewBBox.height,
|
|
1962
|
-
};
|
|
1963
|
-
const geometries = this.geometries;
|
|
1964
|
-
for (let i = 0; i < geometries.length; i++) {
|
|
1965
|
-
const geometry = geometries[i];
|
|
1966
|
-
geometry.coordinate = coordinate;
|
|
1967
|
-
geometry.canvasRegion = canvasRegion;
|
|
1968
|
-
if (!doAnimation) {
|
|
1969
|
-
// 如果 view 不执行动画,那么 view 下所有的 geometry 都不执行动画
|
|
1970
|
-
geometry.animate(false);
|
|
1971
|
-
}
|
|
1972
|
-
geometry.paint(isUpdate);
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
/**
|
|
1977
|
-
* 最后的绘制组件
|
|
1978
|
-
* @param isUpdate
|
|
1979
|
-
*/
|
|
1980
|
-
private renderComponents(isUpdate: boolean) {
|
|
1981
|
-
// 先全部清空,然后 render
|
|
1982
|
-
for (let i = 0; i < this.getComponents().length; i++) {
|
|
1983
|
-
const co = this.getComponents()[i];
|
|
1984
|
-
(co.component as GroupComponent).render();
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
/**
|
|
1989
|
-
* 渲染分面,会在其中进行数据分面,然后进行子 view 创建
|
|
1990
|
-
* @param isUpdate
|
|
1991
|
-
*/
|
|
1992
|
-
private renderFacet(isUpdate: boolean) {
|
|
1993
|
-
if (this.facetInstance) {
|
|
1994
|
-
if (isUpdate) {
|
|
1995
|
-
this.facetInstance.update();
|
|
1996
|
-
} else {
|
|
1997
|
-
this.facetInstance.clear();
|
|
1998
|
-
// 计算分面数据
|
|
1999
|
-
this.facetInstance.init();
|
|
2000
|
-
// 渲染组件和 views
|
|
2001
|
-
this.facetInstance.render();
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
private initOptions() {
|
|
2007
|
-
const {
|
|
2008
|
-
geometries = [],
|
|
2009
|
-
interactions = [],
|
|
2010
|
-
views = [],
|
|
2011
|
-
annotations = [],
|
|
2012
|
-
coordinate,
|
|
2013
|
-
events,
|
|
2014
|
-
facets,
|
|
2015
|
-
} = this.options;
|
|
2016
|
-
|
|
2017
|
-
// 设置坐标系
|
|
2018
|
-
if (this.coordinateController) {
|
|
2019
|
-
// 更新 coordinate controller
|
|
2020
|
-
coordinate && this.coordinateController.update(coordinate);
|
|
2021
|
-
} else {
|
|
2022
|
-
// 创建 coordinate controller
|
|
2023
|
-
this.coordinateController = new CoordinateController(coordinate);
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
// 创建 geometry 实例
|
|
2027
|
-
for (let i = 0; i < geometries.length; i++) {
|
|
2028
|
-
const geometryOption = geometries[i];
|
|
2029
|
-
this.createGeometry(geometryOption);
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
// 创建 interactions 实例
|
|
2033
|
-
for (let j = 0; j < interactions.length; j++) {
|
|
2034
|
-
const interactionOption = interactions[j];
|
|
2035
|
-
const { type, cfg } = interactionOption;
|
|
2036
|
-
this.interaction(type, cfg);
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
// 创建 view 实例
|
|
2040
|
-
for (let k = 0; k < views.length; k++) {
|
|
2041
|
-
const viewOption = views[k];
|
|
2042
|
-
this.createView(viewOption);
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
// 设置 annotation
|
|
2046
|
-
const annotationComponent = this.getController('annotation');
|
|
2047
|
-
for (let l = 0; l < annotations.length; l++) {
|
|
2048
|
-
const annotationOption = annotations[l];
|
|
2049
|
-
annotationComponent.annotation(annotationOption);
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
// 设置 events
|
|
2053
|
-
if (events) {
|
|
2054
|
-
each(events, (eventCallback, eventName) => {
|
|
2055
|
-
this.on(eventName, eventCallback);
|
|
2056
|
-
});
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
if (facets) {
|
|
2060
|
-
each(facets, (facet) => {
|
|
2061
|
-
const { type, ...rest } = facet;
|
|
2062
|
-
|
|
2063
|
-
this.facet(type, rest);
|
|
2064
|
-
});
|
|
2065
|
-
}
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
private createGeometry(geometryOption: GeometryOption) {
|
|
2069
|
-
const { type, cfg = {} } = geometryOption;
|
|
2070
|
-
if (this[type]) {
|
|
2071
|
-
const geometry = this[type](cfg);
|
|
2072
|
-
each(geometryOption, (v, k) => {
|
|
2073
|
-
if (isFunction(geometry[k])) {
|
|
2074
|
-
geometry[k](v);
|
|
2075
|
-
}
|
|
2076
|
-
});
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
/**
|
|
2081
|
-
* scale key 的创建方式
|
|
2082
|
-
* @param field
|
|
2083
|
-
*/
|
|
2084
|
-
private getScaleKey(field: string): string {
|
|
2085
|
-
return `${this.id}-${field}`;
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
/**
|
|
2090
|
-
* 注册 geometry 组件
|
|
2091
|
-
* @param name
|
|
2092
|
-
* @param Ctor
|
|
2093
|
-
* @returns Geometry
|
|
2094
|
-
*/
|
|
2095
|
-
export function registerGeometry(name: string, Ctor: any) {
|
|
2096
|
-
// 语法糖,在 view API 上增加原型方法
|
|
2097
|
-
View.prototype[name.toLowerCase()] = function (cfg: any = {}) {
|
|
2098
|
-
const props = {
|
|
2099
|
-
/** 图形容器 */
|
|
2100
|
-
container: this.middleGroup.addGroup(),
|
|
2101
|
-
labelsContainer: this.foregroundGroup.addGroup(),
|
|
2102
|
-
...cfg,
|
|
2103
|
-
};
|
|
2104
|
-
|
|
2105
|
-
const geometry = new Ctor(props);
|
|
2106
|
-
this.geometries.push(geometry);
|
|
2107
|
-
|
|
2108
|
-
return geometry;
|
|
2109
|
-
};
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
export default View;
|