@antv/g2 5.0.0-alpha.3 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -27
- package/dist/g2-lite.min.js +2 -2
- package/dist/g2.min.js +2 -2
- package/esm/animation/fadeIn.d.ts +2 -2
- package/esm/animation/fadeOut.d.ts +2 -2
- package/esm/animation/growInX.d.ts +7 -0
- package/esm/animation/growInX.js +26 -0
- package/esm/animation/growInX.js.map +1 -0
- package/esm/animation/growInY.d.ts +7 -0
- package/esm/animation/growInY.js +26 -0
- package/esm/animation/growInY.js.map +1 -0
- package/esm/animation/index.d.ts +6 -0
- package/esm/animation/index.js +3 -0
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/morphing.d.ts +4 -4
- package/esm/animation/morphing.js +49 -12
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/pathIn.d.ts +7 -0
- package/esm/animation/pathIn.js +18 -0
- package/esm/animation/pathIn.js.map +1 -0
- package/esm/animation/scaleInX.d.ts +2 -2
- package/esm/animation/scaleInY.d.ts +2 -2
- package/esm/animation/scaleOutX.d.ts +2 -2
- package/esm/animation/scaleOutY.d.ts +2 -2
- package/esm/animation/types.d.ts +6 -0
- package/esm/animation/types.js +2 -0
- package/esm/animation/types.js.map +1 -0
- package/esm/animation/waveIn.d.ts +2 -2
- package/esm/animation/waveIn.js +28 -2
- package/esm/animation/waveIn.js.map +1 -1
- package/esm/animation/zoomIn.d.ts +2 -2
- package/esm/animation/zoomOut.d.ts +2 -2
- package/esm/api/chart.d.ts +8 -4
- package/esm/api/chart.js +19 -3
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/facetCircle.d.ts +3 -6
- package/esm/api/composition/facetCircle.js +2 -5
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +3 -8
- package/esm/api/composition/facetRect.js +2 -7
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +21 -0
- package/esm/api/composition/geoPath.js +30 -0
- package/esm/api/composition/geoPath.js.map +1 -0
- package/esm/api/composition/geoView.d.ts +21 -0
- package/esm/api/composition/geoView.js +29 -0
- package/esm/api/composition/geoView.js.map +1 -0
- package/esm/api/composition/index.d.ts +7 -1
- package/esm/api/composition/index.js +5 -1
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +3 -6
- package/esm/api/composition/repeatMatrix.js +2 -5
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +1 -5
- package/esm/api/composition/spaceFlex.js +1 -8
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +1 -2
- package/esm/api/composition/spaceLayer.js +1 -5
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -7
- package/esm/api/composition/timingKeyframe.js +1 -8
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +7 -8
- package/esm/api/composition/view.js +6 -7
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/mark/index.d.ts +17 -1
- package/esm/api/mark/index.js +9 -1
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +49 -1
- package/esm/api/mark/mark.js +74 -11
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +4 -12
- package/esm/api/props.d.ts +1 -1
- package/esm/api/types.d.ts +7 -7
- package/esm/component/axis.d.ts +2 -2
- package/esm/component/axis.js +23 -25
- package/esm/component/axis.js.map +1 -1
- package/esm/component/axisX.d.ts +1 -1
- package/esm/component/axisY.d.ts +1 -1
- package/esm/component/legendCategory.d.ts +2 -2
- package/esm/component/legendCategory.js +2 -2
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +1 -1
- package/esm/component/title.d.ts +1 -1
- package/esm/component/utils.d.ts +1 -1
- package/esm/composition/facetCircle.d.ts +1 -1
- package/esm/composition/facetCircle.js +2 -2
- package/esm/composition/facetCircle.js.map +1 -1
- package/esm/composition/facetRect.d.ts +2 -2
- package/esm/composition/facetRect.js +8 -10
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/mark.d.ts +1 -1
- package/esm/composition/mark.js +3 -3
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.d.ts +1 -1
- package/esm/composition/repeatMatrix.js +4 -4
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/composition/spaceFlex.d.ts +1 -1
- package/esm/composition/spaceLayer.d.ts +1 -1
- package/esm/composition/timingKeyframe.d.ts +1 -1
- package/esm/composition/timingKeyframe.js +7 -8
- package/esm/composition/timingKeyframe.js.map +1 -1
- package/esm/composition/utils.d.ts +1 -1
- package/esm/composition/view.d.ts +1 -1
- package/esm/coordinate/cartesian.d.ts +1 -1
- package/esm/coordinate/fisheye.d.ts +1 -1
- package/esm/coordinate/fisheyeX.d.ts +1 -1
- package/esm/coordinate/fisheyeY.d.ts +1 -1
- package/esm/coordinate/helix.d.ts +1 -1
- package/esm/coordinate/parallel.d.ts +1 -1
- package/esm/coordinate/polar.d.ts +1 -1
- package/esm/coordinate/radial.d.ts +1 -1
- package/esm/coordinate/reflect.d.ts +1 -1
- package/esm/coordinate/reflectX.d.ts +1 -1
- package/esm/coordinate/reflectY.d.ts +1 -1
- package/esm/coordinate/theta.d.ts +1 -1
- package/esm/coordinate/transpose.d.ts +1 -1
- package/esm/data/arc.d.ts +1 -1
- package/esm/data/cluster.d.ts +1 -1
- package/esm/data/custom.d.ts +1 -1
- package/esm/data/fetch.d.ts +1 -1
- package/esm/data/fetch.js.map +1 -1
- package/esm/data/filter.d.ts +9 -0
- package/esm/data/filter.js +13 -0
- package/esm/data/filter.js.map +1 -0
- package/esm/data/fold.d.ts +1 -1
- package/esm/data/index.d.ts +4 -2
- package/esm/data/index.js +2 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/inline.d.ts +1 -1
- package/esm/data/join.d.ts +7 -0
- package/esm/data/join.js +22 -0
- package/esm/data/join.js.map +1 -0
- package/esm/data/map.d.ts +1 -1
- package/esm/data/pick.d.ts +1 -1
- package/esm/data/rename.d.ts +1 -1
- package/esm/data/rename.js +2 -3
- package/esm/data/rename.js.map +1 -1
- package/esm/data/sankey.d.ts +1 -1
- package/esm/data/sortBy.d.ts +1 -1
- package/esm/data/subset.d.ts +1 -1
- package/esm/data/tree.d.ts +1 -1
- package/esm/data/utils/arc/types.d.ts +2 -2
- package/esm/data/utils/flow.d.ts +1 -1
- package/esm/data/wordCloud.d.ts +1 -1
- package/esm/encode/column.d.ts +1 -1
- package/esm/encode/constant.d.ts +1 -1
- package/esm/encode/field.d.ts +1 -1
- package/esm/encode/transform.d.ts +1 -1
- package/esm/geo/d3-projection.d.ts +1 -0
- package/esm/geo/d3-projection.js +2 -0
- package/esm/geo/d3-projection.js.map +1 -0
- package/esm/geo/geoPath.d.ts +7 -0
- package/esm/geo/geoPath.js +36 -0
- package/esm/geo/geoPath.js.map +1 -0
- package/esm/geo/geoView.d.ts +7 -0
- package/esm/geo/geoView.js +215 -0
- package/esm/geo/geoView.js.map +1 -0
- package/esm/geo/index.d.ts +9 -0
- package/esm/geo/index.js +8 -0
- package/esm/geo/index.js.map +1 -0
- package/esm/interaction/action/service/elementSelection.d.ts +1 -1
- package/esm/interaction/action/service/elementSelection.js +1 -1
- package/esm/interaction/action/service/elementSelection.js.map +1 -1
- package/esm/interaction/action/service/fisheyeFocus.d.ts +1 -1
- package/esm/interaction/action/service/legendItemSelection.d.ts +1 -1
- package/esm/interaction/action/service/recordCurrentPoint.d.ts +1 -1
- package/esm/interaction/action/service/recordPoint.d.ts +1 -1
- package/esm/interaction/action/service/recordRegion.d.ts +1 -1
- package/esm/interaction/action/service/recordState.d.ts +1 -1
- package/esm/interaction/action/service/recordTip.d.ts +1 -1
- package/esm/interaction/action/service/surfacePointSelection.d.ts +1 -1
- package/esm/interaction/action/service/triggerInfoSelection.d.ts +1 -1
- package/esm/interaction/action/transformer/activeElement.d.ts +1 -1
- package/esm/interaction/action/transformer/activeRegion.d.ts +1 -1
- package/esm/interaction/action/transformer/button.d.ts +1 -1
- package/esm/interaction/action/transformer/cursor.d.ts +1 -1
- package/esm/interaction/action/transformer/filter.d.ts +2 -2
- package/esm/interaction/action/transformer/filter.js +6 -4
- package/esm/interaction/action/transformer/filter.js.map +1 -1
- package/esm/interaction/action/transformer/filterElement.d.ts +1 -1
- package/esm/interaction/action/transformer/highlightElement.d.ts +1 -1
- package/esm/interaction/action/transformer/mask.d.ts +1 -1
- package/esm/interaction/action/transformer/move.d.ts +1 -1
- package/esm/interaction/action/transformer/plot.d.ts +1 -1
- package/esm/interaction/action/transformer/poptip.d.ts +1 -1
- package/esm/interaction/action/transformer/setItemState.d.ts +1 -1
- package/esm/interaction/action/transformer/tooltip.d.ts +1 -1
- package/esm/interaction/builtin/activeRegion.d.ts +1 -1
- package/esm/interaction/builtin/brush.d.ts +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/builtin/brushVisible.d.ts +1 -1
- package/esm/interaction/builtin/elementActive.d.ts +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +1 -1
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +5 -3
- package/esm/interaction/builtin/elementHighlightByColor.js +1 -1
- package/esm/interaction/builtin/elementHighlightByColor.js.map +1 -1
- package/esm/interaction/builtin/elementHighlightByX.d.ts +5 -3
- package/esm/interaction/builtin/elementHighlightByX.js +1 -1
- package/esm/interaction/builtin/elementHighlightByX.js.map +1 -1
- package/esm/interaction/builtin/elementListHighlight.d.ts +1 -1
- package/esm/interaction/builtin/elementSelected.d.ts +1 -1
- package/esm/interaction/builtin/ellipsisText.d.ts +1 -1
- package/esm/interaction/builtin/fisheye.d.ts +1 -1
- package/esm/interaction/builtin/legendActive.d.ts +1 -1
- package/esm/interaction/builtin/legendHighlight.d.ts +1 -1
- package/esm/interaction/builtin/tooltip.d.ts +9 -5
- package/esm/interaction/index.d.ts +4 -3
- package/esm/interaction/index.js +4 -3
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/interactor/mousePosition.d.ts +1 -1
- package/esm/interaction/interactor/touchPosition.d.ts +1 -1
- package/esm/interaction/native/chartIndex.js +6 -2
- package/esm/interaction/native/chartIndex.js.map +1 -1
- package/esm/interaction/native/elementHighlight.d.ts +10 -0
- package/esm/interaction/native/{elementActive.js → elementHighlight.js} +9 -9
- package/esm/interaction/native/elementHighlight.js.map +1 -0
- package/esm/interaction/native/elementHighlightByColor.d.ts +4 -0
- package/esm/interaction/native/elementHighlightByColor.js +12 -0
- package/esm/interaction/native/elementHighlightByColor.js.map +1 -0
- package/esm/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
- package/esm/interaction/native/elementHighlightByX.js +13 -0
- package/esm/interaction/native/elementHighlightByX.js.map +1 -0
- package/esm/interaction/native/elementSelect.js +2 -2
- package/esm/interaction/native/elementSelect.js.map +1 -1
- package/esm/interaction/native/elementSelectByColor.js +2 -2
- package/esm/interaction/native/elementSelectByColor.js.map +1 -1
- package/esm/interaction/native/elementSelectByX.js +2 -2
- package/esm/interaction/native/elementSelectByX.js.map +1 -1
- package/esm/interaction/native/fisheye.js +8 -5
- package/esm/interaction/native/fisheye.js.map +1 -1
- package/esm/interaction/native/tooltip.d.ts +11 -0
- package/esm/interaction/native/tooltip.js +279 -0
- package/esm/interaction/native/tooltip.js.map +1 -0
- package/esm/interaction/native/utils.d.ts +1 -1
- package/esm/interaction/native/utils.js +2 -2
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/interaction/types.d.ts +16 -16
- package/esm/label-transform/dodgeY.d.ts +1 -1
- package/esm/label-transform/dodgeY.js +9 -1
- package/esm/label-transform/dodgeY.js.map +1 -1
- package/esm/label-transform/hideOverlap.d.ts +1 -1
- package/esm/label-transform/hideOverlap.js +14 -4
- package/esm/label-transform/hideOverlap.js.map +1 -1
- package/esm/label-transform/index.d.ts +4 -0
- package/esm/label-transform/index.js +2 -0
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/spider.d.ts +7 -0
- package/esm/label-transform/spider.js +30 -0
- package/esm/label-transform/spider.js.map +1 -0
- package/esm/label-transform/surround.d.ts +7 -0
- package/esm/label-transform/surround.js +30 -0
- package/esm/label-transform/surround.js.map +1 -0
- package/esm/mark/area.d.ts +1 -1
- package/esm/mark/area.js +9 -8
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/box.d.ts +1 -1
- package/esm/mark/box.js +7 -9
- package/esm/mark/box.js.map +1 -1
- package/esm/mark/boxplot.d.ts +4 -0
- package/esm/mark/boxplot.js +104 -0
- package/esm/mark/boxplot.js.map +1 -0
- package/esm/mark/cell.d.ts +1 -1
- package/esm/mark/cell.js +4 -8
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/connector.d.ts +1 -1
- package/esm/mark/connector.js +2 -2
- package/esm/mark/connector.js.map +1 -1
- package/esm/mark/forceGraph.d.ts +4 -0
- package/esm/mark/forceGraph.js +95 -0
- package/esm/mark/forceGraph.js.map +1 -0
- package/esm/mark/image.d.ts +1 -1
- package/esm/mark/image.js +12 -9
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/index.d.ts +16 -0
- package/esm/mark/index.js +9 -0
- package/esm/mark/index.js.map +1 -1
- package/esm/mark/interval.d.ts +1 -1
- package/esm/mark/interval.js +7 -8
- package/esm/mark/interval.js.map +1 -1
- package/esm/mark/line.d.ts +1 -1
- package/esm/mark/line.js +13 -9
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/lineX.d.ts +1 -1
- package/esm/mark/lineX.js +5 -2
- package/esm/mark/lineX.js.map +1 -1
- package/esm/mark/lineY.d.ts +1 -1
- package/esm/mark/lineY.js +5 -2
- package/esm/mark/lineY.js.map +1 -1
- package/esm/mark/link.d.ts +1 -1
- package/esm/mark/link.js +4 -8
- package/esm/mark/link.js.map +1 -1
- package/esm/mark/pack.d.ts +4 -0
- package/esm/mark/pack.js +81 -0
- package/esm/mark/pack.js.map +1 -0
- package/esm/mark/path.d.ts +7 -0
- package/esm/mark/path.js +24 -0
- package/esm/mark/path.js.map +1 -0
- package/esm/mark/point.d.ts +1 -1
- package/esm/mark/point.js +31 -28
- package/esm/mark/point.js.map +1 -1
- package/esm/mark/polygon.d.ts +1 -1
- package/esm/mark/polygon.js +4 -8
- package/esm/mark/polygon.js.map +1 -1
- package/esm/mark/range.d.ts +1 -1
- package/esm/mark/range.js +2 -2
- package/esm/mark/range.js.map +1 -1
- package/esm/mark/rangeX.d.ts +1 -1
- package/esm/mark/rangeX.js +5 -2
- package/esm/mark/rangeX.js.map +1 -1
- package/esm/mark/rangeY.d.ts +1 -1
- package/esm/mark/rangeY.js +5 -2
- package/esm/mark/rangeY.js.map +1 -1
- package/esm/mark/rect.d.ts +1 -1
- package/esm/mark/rect.js +7 -8
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/sankey.d.ts +8 -0
- package/esm/mark/sankey.js +98 -0
- package/esm/mark/sankey.js.map +1 -0
- package/esm/mark/shape.d.ts +7 -0
- package/esm/mark/shape.js +33 -0
- package/esm/mark/shape.js.map +1 -0
- package/esm/mark/text.d.ts +1 -1
- package/esm/mark/text.js +16 -11
- package/esm/mark/text.js.map +1 -1
- package/esm/mark/tree.d.ts +4 -0
- package/esm/mark/tree.js +59 -0
- package/esm/mark/tree.js.map +1 -0
- package/esm/mark/treemap.d.ts +4 -0
- package/esm/mark/treemap.js +123 -0
- package/esm/mark/treemap.js.map +1 -0
- package/esm/mark/utils.d.ts +51 -3
- package/esm/mark/utils.js +84 -12
- package/esm/mark/utils.js.map +1 -1
- package/esm/mark/vector.d.ts +1 -1
- package/esm/mark/vector.js +4 -8
- package/esm/mark/vector.js.map +1 -1
- package/esm/mark/wordCloud.d.ts +4 -0
- package/esm/mark/wordCloud.js +65 -0
- package/esm/mark/wordCloud.js.map +1 -0
- package/esm/palette/category10.d.ts +1 -1
- package/esm/palette/category20.d.ts +1 -1
- package/esm/palette/divergingGreenRed.d.ts +1 -1
- package/esm/palette/divergingGreenYellow.d.ts +1 -1
- package/esm/palette/divergingRedBlue.d.ts +1 -1
- package/esm/palette/divergingRedPurple.d.ts +1 -1
- package/esm/palette/sequentialBlue.d.ts +1 -1
- package/esm/palette/sequentialDarkBlue.d.ts +1 -1
- package/esm/palette/sequentialDarkGreen.d.ts +1 -1
- package/esm/palette/sequentialGreen.d.ts +1 -1
- package/esm/palette/sequentialGreenBlue.d.ts +1 -1
- package/esm/palette/sequentialGrey.d.ts +1 -1
- package/esm/palette/sequentialOrange.d.ts +1 -1
- package/esm/palette/sequentialPink.d.ts +1 -1
- package/esm/palette/sequentialPinkPurple.d.ts +1 -1
- package/esm/palette/sequentialPurple.d.ts +1 -1
- package/esm/palette/sequentialRed.d.ts +1 -1
- package/esm/palette/sequentialYellow.d.ts +1 -1
- package/esm/palette/sequentialYellowGreen.d.ts +1 -1
- package/esm/palette/sequentialYellowOrange.d.ts +1 -1
- package/esm/runtime/component.d.ts +1 -1
- package/esm/runtime/component.js +18 -29
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/coordinate.d.ts +8 -8
- package/esm/runtime/coordinate.js +21 -21
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/mark.d.ts +3 -3
- package/esm/runtime/mark.js +37 -41
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.d.ts +2 -2
- package/esm/runtime/plot.js +153 -42
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +0 -7
- package/esm/runtime/render.js +6 -5
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +4 -4
- package/esm/runtime/scale.js +98 -175
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +1 -0
- package/esm/runtime/transform.js +18 -2
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +37 -21
- package/esm/runtime/types/component.d.ts +35 -35
- package/esm/runtime/types/data.d.ts +4 -4
- package/esm/runtime/types/encode.d.ts +9 -9
- package/esm/runtime/types/mark.d.ts +14 -6
- package/esm/runtime/types/options.d.ts +32 -34
- package/esm/runtime/types/theme.d.ts +32 -12
- package/esm/runtime/types/transform.d.ts +7 -7
- package/esm/scale/band.d.ts +1 -1
- package/esm/scale/identity.d.ts +1 -1
- package/esm/scale/linear.d.ts +1 -1
- package/esm/scale/log.d.ts +1 -1
- package/esm/scale/ordinal.d.ts +1 -1
- package/esm/scale/point.d.ts +1 -1
- package/esm/scale/pow.d.ts +1 -1
- package/esm/scale/quantile.d.ts +1 -1
- package/esm/scale/quantize.d.ts +1 -1
- package/esm/scale/sequential.d.ts +1 -1
- package/esm/scale/sqrt.d.ts +1 -1
- package/esm/scale/threshold.d.ts +1 -1
- package/esm/scale/time.d.ts +1 -1
- package/esm/shape/area/area.d.ts +1 -1
- package/esm/shape/area/curve.d.ts +1 -1
- package/esm/shape/area/curve.js +2 -0
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/area/smooth.d.ts +1 -1
- package/esm/shape/area/step.d.ts +1 -1
- package/esm/shape/box/box.d.ts +1 -1
- package/esm/shape/box/box.js +3 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.d.ts +5 -11
- package/esm/shape/connector/connector.js +50 -64
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/createElement.d.ts +1 -1
- package/esm/shape/image/image.d.ts +1 -1
- package/esm/shape/image/image.js +5 -2
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/index.d.ts +4 -0
- package/esm/shape/index.js +3 -0
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +1 -1
- package/esm/shape/interval/color.js +14 -10
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/interval/funnel.d.ts +1 -1
- package/esm/shape/interval/funnel.js +1 -3
- package/esm/shape/interval/funnel.js.map +1 -1
- package/esm/shape/interval/hollow.d.ts +1 -1
- package/esm/shape/interval/pyramid.d.ts +1 -1
- package/esm/shape/interval/pyramid.js +2 -3
- package/esm/shape/interval/pyramid.js.map +1 -1
- package/esm/shape/interval/rect.d.ts +1 -1
- package/esm/shape/label/label.d.ts +1 -1
- package/esm/shape/label/label.js +13 -5
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position.d.ts +1 -1
- package/esm/shape/label/position.js +77 -36
- package/esm/shape/label/position.js.map +1 -1
- package/esm/shape/line/curve.d.ts +1 -1
- package/esm/shape/line/curve.js +8 -2
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/line/hv.d.ts +1 -1
- package/esm/shape/line/hvh.d.ts +1 -1
- package/esm/shape/line/line.d.ts +1 -1
- package/esm/shape/line/smooth.d.ts +1 -1
- package/esm/shape/line/vh.d.ts +1 -1
- package/esm/shape/lineXY/line.d.ts +1 -1
- package/esm/shape/lineXY/line.js +2 -0
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.d.ts +1 -1
- package/esm/shape/link/arc.js +2 -0
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.d.ts +1 -7
- package/esm/shape/link/link.js +5 -3
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.d.ts +1 -1
- package/esm/shape/link/smooth.js +2 -0
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.d.ts +1 -1
- package/esm/shape/link/vhv.js +2 -0
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/path/color.d.ts +9 -0
- package/esm/shape/path/color.js +37 -0
- package/esm/shape/path/color.js.map +1 -0
- package/esm/shape/path/hollow.d.ts +8 -0
- package/esm/shape/path/hollow.js +13 -0
- package/esm/shape/path/hollow.js.map +1 -0
- package/esm/shape/path/path.d.ts +8 -0
- package/esm/shape/path/path.js +13 -0
- package/esm/shape/path/path.js.map +1 -0
- package/esm/shape/point/bowtie.d.ts +1 -1
- package/esm/shape/point/color.d.ts +1 -1
- package/esm/shape/point/color.js +5 -2
- package/esm/shape/point/color.js.map +1 -1
- package/esm/shape/point/cross.d.ts +1 -1
- package/esm/shape/point/diamond.d.ts +1 -1
- package/esm/shape/point/hexagon.d.ts +1 -1
- package/esm/shape/point/hollow.d.ts +1 -1
- package/esm/shape/point/hollowBowtie.d.ts +1 -1
- package/esm/shape/point/hollowDiamond.d.ts +1 -1
- package/esm/shape/point/hollowHexagon.d.ts +1 -1
- package/esm/shape/point/hollowSquare.d.ts +1 -1
- package/esm/shape/point/hollowTriangle.d.ts +1 -1
- package/esm/shape/point/hollowTriangleDown.d.ts +1 -1
- package/esm/shape/point/hyphen.d.ts +1 -1
- package/esm/shape/point/line.d.ts +1 -1
- package/esm/shape/point/plus.d.ts +1 -1
- package/esm/shape/point/point.d.ts +1 -1
- package/esm/shape/point/square.d.ts +1 -1
- package/esm/shape/point/tick.d.ts +1 -1
- package/esm/shape/point/triangle.d.ts +1 -1
- package/esm/shape/point/triangleDown.d.ts +1 -1
- package/esm/shape/polygon/polygon.d.ts +1 -1
- package/esm/shape/polygon/polygon.js +2 -0
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.d.ts +1 -1
- package/esm/shape/polygon/ribbon.js +2 -0
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/shape/shape.d.ts +6 -0
- package/esm/shape/shape/shape.js +27 -0
- package/esm/shape/shape/shape.js.map +1 -0
- package/esm/shape/text/advance.d.ts +2 -0
- package/esm/shape/text/advance.js +122 -0
- package/esm/shape/text/advance.js.map +1 -0
- package/esm/shape/text/badge.d.ts +5 -9
- package/esm/shape/text/badge.js +31 -50
- package/esm/shape/text/badge.js.map +1 -1
- package/esm/shape/text/text.d.ts +1 -15
- package/esm/shape/text/text.js +15 -144
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +21 -21
- package/esm/shape/utils.js +31 -12
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.d.ts +1 -7
- package/esm/shape/vector/vector.js +4 -2
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/action.d.ts +27 -27
- package/esm/spec/animate.d.ts +1 -8
- package/esm/spec/composition.d.ts +40 -17
- package/esm/spec/coordinate.d.ts +17 -17
- package/esm/spec/data.d.ts +47 -25
- package/esm/spec/encode.d.ts +7 -7
- package/esm/spec/geometry.d.ts +79 -39
- package/esm/spec/index.d.ts +1 -1
- package/esm/spec/interaction.d.ts +28 -26
- package/esm/spec/labelTransform.d.ts +10 -3
- package/esm/spec/palette.d.ts +23 -23
- package/esm/spec/scale.d.ts +17 -17
- package/esm/spec/theme.d.ts +5 -5
- package/esm/spec/title.d.ts +1 -1
- package/esm/spec/transform.d.ts +44 -26
- package/esm/stdlib/index.js +12 -216
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/dark.d.ts +1 -1
- package/esm/theme/dark.js +157 -57
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/light.d.ts +1 -1
- package/esm/theme/light.js +155 -52
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/Select.d.ts +1 -1
- package/esm/transform/SelectX.d.ts +1 -1
- package/esm/transform/SelectY.d.ts +1 -1
- package/esm/transform/bin.d.ts +12 -0
- package/esm/transform/bin.js +82 -0
- package/esm/transform/bin.js.map +1 -0
- package/esm/transform/binX.d.ts +4 -0
- package/esm/transform/binX.js +7 -0
- package/esm/transform/binX.js.map +1 -0
- package/esm/transform/diffY.d.ts +1 -1
- package/esm/transform/dodgeX.d.ts +1 -1
- package/esm/transform/flexX.d.ts +1 -1
- package/esm/transform/group.d.ts +2 -2
- package/esm/transform/group.js +4 -82
- package/esm/transform/group.js.map +1 -1
- package/esm/transform/groupColor.d.ts +1 -1
- package/esm/transform/groupColor.js +1 -1
- package/esm/transform/groupColor.js.map +1 -1
- package/esm/transform/groupN.d.ts +9 -0
- package/esm/transform/groupN.js +99 -0
- package/esm/transform/groupN.js.map +1 -0
- package/esm/transform/groupX.d.ts +1 -1
- package/esm/transform/groupX.js +1 -1
- package/esm/transform/groupX.js.map +1 -1
- package/esm/transform/groupY.d.ts +1 -1
- package/esm/transform/groupY.js +1 -1
- package/esm/transform/groupY.js.map +1 -1
- package/esm/transform/index.d.ts +16 -6
- package/esm/transform/index.js +8 -3
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/jitter.d.ts +1 -1
- package/esm/transform/jitterX.d.ts +1 -1
- package/esm/transform/maybeFunctionAttribute.d.ts +6 -0
- package/esm/transform/maybeFunctionAttribute.js +19 -0
- package/esm/transform/maybeFunctionAttribute.js.map +1 -0
- package/esm/transform/maybeGradient.d.ts +7 -0
- package/esm/transform/maybeGradient.js +24 -0
- package/esm/transform/maybeGradient.js.map +1 -0
- package/esm/transform/maybeIdentityX.d.ts +1 -1
- package/esm/transform/maybeIdentityY.d.ts +1 -1
- package/esm/transform/maybeKey.d.ts +1 -1
- package/esm/transform/maybeSeries.d.ts +1 -1
- package/esm/transform/maybeSize.d.ts +1 -1
- package/esm/transform/maybeStackY.d.ts +1 -1
- package/esm/transform/maybeTitle.d.ts +8 -0
- package/esm/transform/{maybeTitleX.js → maybeTitle.js} +6 -5
- package/esm/transform/maybeTitle.js.map +1 -0
- package/esm/transform/maybeTooltip.d.ts +2 -2
- package/esm/transform/maybeTooltip.js +7 -5
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/transform/maybeTuple.d.ts +7 -0
- package/esm/transform/maybeTuple.js +19 -0
- package/esm/transform/maybeTuple.js.map +1 -0
- package/esm/transform/maybeTupleX.d.ts +1 -1
- package/esm/transform/maybeTupleX.js +2 -2
- package/esm/transform/maybeTupleX.js.map +1 -1
- package/esm/transform/maybeTupleY.d.ts +1 -1
- package/esm/transform/maybeTupleY.js +2 -2
- package/esm/transform/maybeTupleY.js.map +1 -1
- package/esm/transform/maybeVisualPosition.d.ts +7 -0
- package/esm/transform/maybeVisualPosition.js +45 -0
- package/esm/transform/maybeVisualPosition.js.map +1 -0
- package/esm/transform/maybeZeroPadding.d.ts +1 -1
- package/esm/transform/maybeZeroX.d.ts +1 -1
- package/esm/transform/maybeZeroY.d.ts +1 -1
- package/esm/transform/maybeZeroY1.d.ts +1 -1
- package/esm/transform/normalizeY.d.ts +1 -1
- package/esm/transform/pack.d.ts +1 -1
- package/esm/transform/sort.d.ts +1 -1
- package/esm/transform/sortColor.d.ts +1 -1
- package/esm/transform/sortX.d.ts +1 -1
- package/esm/transform/sortY.d.ts +1 -1
- package/esm/transform/stackEnter.d.ts +2 -1
- package/esm/transform/stackEnter.js +15 -5
- package/esm/transform/stackEnter.js.map +1 -1
- package/esm/transform/stackY.d.ts +1 -1
- package/esm/transform/stackY.js +25 -4
- package/esm/transform/stackY.js.map +1 -1
- package/esm/transform/symmetryY.d.ts +1 -1
- package/esm/transform/utils/helper.d.ts +1 -0
- package/esm/transform/utils/helper.js +9 -1
- package/esm/transform/utils/helper.js.map +1 -1
- package/esm/transform/utils/order.d.ts +3 -3
- package/esm/transform/utils/order.js +2 -0
- package/esm/transform/utils/order.js.map +1 -1
- package/esm/utils/coordinate.js +3 -1
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +5 -2
- package/esm/utils/helper.js +11 -3
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/selection.d.ts +4 -4
- package/esm/utils/selection.js +3 -1
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.d.ts +6 -1
- package/esm/utils/size.js +22 -1
- package/esm/utils/size.js.map +1 -1
- package/esm/utils/vector.d.ts +1 -1
- package/lib/animation/fadeIn.d.ts +2 -2
- package/lib/animation/fadeOut.d.ts +2 -2
- package/lib/animation/growInX.d.ts +7 -0
- package/lib/animation/growInX.js +30 -0
- package/lib/animation/growInX.js.map +1 -0
- package/lib/animation/growInY.d.ts +7 -0
- package/lib/animation/growInY.js +30 -0
- package/lib/animation/growInY.js.map +1 -0
- package/lib/animation/index.d.ts +6 -0
- package/lib/animation/index.js +7 -1
- package/lib/animation/index.js.map +1 -1
- package/lib/animation/morphing.d.ts +4 -4
- package/lib/animation/morphing.js +49 -12
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/pathIn.d.ts +7 -0
- package/lib/animation/pathIn.js +22 -0
- package/lib/animation/pathIn.js.map +1 -0
- package/lib/animation/scaleInX.d.ts +2 -2
- package/lib/animation/scaleInY.d.ts +2 -2
- package/lib/animation/scaleOutX.d.ts +2 -2
- package/lib/animation/scaleOutY.d.ts +2 -2
- package/lib/animation/types.d.ts +6 -0
- package/lib/animation/types.js +3 -0
- package/lib/animation/types.js.map +1 -0
- package/lib/animation/waveIn.d.ts +2 -2
- package/lib/animation/waveIn.js +28 -2
- package/lib/animation/waveIn.js.map +1 -1
- package/lib/animation/zoomIn.d.ts +2 -2
- package/lib/animation/zoomOut.d.ts +2 -2
- package/lib/api/chart.d.ts +8 -4
- package/lib/api/chart.js +19 -3
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/facetCircle.d.ts +3 -6
- package/lib/api/composition/facetCircle.js +2 -5
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +3 -8
- package/lib/api/composition/facetRect.js +2 -7
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +21 -0
- package/lib/api/composition/geoPath.js +33 -0
- package/lib/api/composition/geoPath.js.map +1 -0
- package/lib/api/composition/geoView.d.ts +21 -0
- package/lib/api/composition/geoView.js +32 -0
- package/lib/api/composition/geoView.js.map +1 -0
- package/lib/api/composition/index.d.ts +7 -1
- package/lib/api/composition/index.js +7 -1
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +3 -6
- package/lib/api/composition/repeatMatrix.js +2 -5
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +1 -5
- package/lib/api/composition/spaceFlex.js +1 -8
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +1 -2
- package/lib/api/composition/spaceLayer.js +1 -5
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -7
- package/lib/api/composition/timingKeyframe.js +1 -8
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +7 -8
- package/lib/api/composition/view.js +6 -7
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/mark/index.d.ts +17 -1
- package/lib/api/mark/index.js +8 -0
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +49 -1
- package/lib/api/mark/mark.js +75 -12
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +4 -12
- package/lib/api/props.d.ts +1 -1
- package/lib/api/types.d.ts +7 -7
- package/lib/component/axis.d.ts +2 -2
- package/lib/component/axis.js +23 -25
- package/lib/component/axis.js.map +1 -1
- package/lib/component/axisX.d.ts +1 -1
- package/lib/component/axisY.d.ts +1 -1
- package/lib/component/legendCategory.d.ts +2 -2
- package/lib/component/legendCategory.js +2 -2
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +1 -1
- package/lib/component/title.d.ts +1 -1
- package/lib/component/utils.d.ts +1 -1
- package/lib/composition/facetCircle.d.ts +1 -1
- package/lib/composition/facetCircle.js +2 -2
- package/lib/composition/facetCircle.js.map +1 -1
- package/lib/composition/facetRect.d.ts +2 -2
- package/lib/composition/facetRect.js +8 -10
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/mark.d.ts +1 -1
- package/lib/composition/mark.js +3 -3
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.d.ts +1 -1
- package/lib/composition/repeatMatrix.js +4 -4
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/composition/spaceFlex.d.ts +1 -1
- package/lib/composition/spaceLayer.d.ts +1 -1
- package/lib/composition/timingKeyframe.d.ts +1 -1
- package/lib/composition/timingKeyframe.js +7 -8
- package/lib/composition/timingKeyframe.js.map +1 -1
- package/lib/composition/utils.d.ts +1 -1
- package/lib/composition/view.d.ts +1 -1
- package/lib/coordinate/cartesian.d.ts +1 -1
- package/lib/coordinate/fisheye.d.ts +1 -1
- package/lib/coordinate/fisheyeX.d.ts +1 -1
- package/lib/coordinate/fisheyeY.d.ts +1 -1
- package/lib/coordinate/helix.d.ts +1 -1
- package/lib/coordinate/parallel.d.ts +1 -1
- package/lib/coordinate/polar.d.ts +1 -1
- package/lib/coordinate/radial.d.ts +1 -1
- package/lib/coordinate/reflect.d.ts +1 -1
- package/lib/coordinate/reflectX.d.ts +1 -1
- package/lib/coordinate/reflectY.d.ts +1 -1
- package/lib/coordinate/theta.d.ts +1 -1
- package/lib/coordinate/transpose.d.ts +1 -1
- package/lib/data/arc.d.ts +1 -1
- package/lib/data/cluster.d.ts +1 -1
- package/lib/data/custom.d.ts +1 -1
- package/lib/data/fetch.d.ts +1 -1
- package/lib/data/fetch.js.map +1 -1
- package/lib/data/filter.d.ts +9 -0
- package/lib/data/filter.js +18 -0
- package/lib/data/filter.js.map +1 -0
- package/lib/data/fold.d.ts +1 -1
- package/lib/data/index.d.ts +4 -2
- package/lib/data/index.js +5 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/inline.d.ts +1 -1
- package/lib/data/join.d.ts +7 -0
- package/lib/data/join.js +26 -0
- package/lib/data/join.js.map +1 -0
- package/lib/data/map.d.ts +1 -1
- package/lib/data/pick.d.ts +1 -1
- package/lib/data/rename.d.ts +1 -1
- package/lib/data/rename.js +2 -3
- package/lib/data/rename.js.map +1 -1
- package/lib/data/sankey.d.ts +1 -1
- package/lib/data/sortBy.d.ts +1 -1
- package/lib/data/subset.d.ts +1 -1
- package/lib/data/tree.d.ts +1 -1
- package/lib/data/utils/arc/types.d.ts +2 -2
- package/lib/data/utils/flow.d.ts +1 -1
- package/lib/data/wordCloud.d.ts +1 -1
- package/lib/encode/column.d.ts +1 -1
- package/lib/encode/constant.d.ts +1 -1
- package/lib/encode/field.d.ts +1 -1
- package/lib/encode/transform.d.ts +1 -1
- package/lib/geo/d3-projection.d.ts +1 -0
- package/lib/geo/d3-projection.js +36 -0
- package/lib/geo/d3-projection.js.map +1 -0
- package/lib/geo/geoPath.d.ts +7 -0
- package/lib/geo/geoPath.js +40 -0
- package/lib/geo/geoPath.js.map +1 -0
- package/lib/geo/geoView.d.ts +7 -0
- package/lib/geo/geoView.js +242 -0
- package/lib/geo/geoView.js.map +1 -0
- package/lib/geo/index.d.ts +9 -0
- package/lib/geo/index.js +12 -0
- package/lib/geo/index.js.map +1 -0
- package/lib/interaction/action/service/elementSelection.d.ts +1 -1
- package/lib/interaction/action/service/elementSelection.js +1 -1
- package/lib/interaction/action/service/elementSelection.js.map +1 -1
- package/lib/interaction/action/service/fisheyeFocus.d.ts +1 -1
- package/lib/interaction/action/service/legendItemSelection.d.ts +1 -1
- package/lib/interaction/action/service/recordCurrentPoint.d.ts +1 -1
- package/lib/interaction/action/service/recordPoint.d.ts +1 -1
- package/lib/interaction/action/service/recordRegion.d.ts +1 -1
- package/lib/interaction/action/service/recordState.d.ts +1 -1
- package/lib/interaction/action/service/recordTip.d.ts +1 -1
- package/lib/interaction/action/service/surfacePointSelection.d.ts +1 -1
- package/lib/interaction/action/service/triggerInfoSelection.d.ts +1 -1
- package/lib/interaction/action/transformer/activeElement.d.ts +1 -1
- package/lib/interaction/action/transformer/activeRegion.d.ts +1 -1
- package/lib/interaction/action/transformer/button.d.ts +1 -1
- package/lib/interaction/action/transformer/cursor.d.ts +1 -1
- package/lib/interaction/action/transformer/filter.d.ts +2 -2
- package/lib/interaction/action/transformer/filter.js +6 -4
- package/lib/interaction/action/transformer/filter.js.map +1 -1
- package/lib/interaction/action/transformer/filterElement.d.ts +1 -1
- package/lib/interaction/action/transformer/highlightElement.d.ts +1 -1
- package/lib/interaction/action/transformer/mask.d.ts +1 -1
- package/lib/interaction/action/transformer/move.d.ts +1 -1
- package/lib/interaction/action/transformer/plot.d.ts +1 -1
- package/lib/interaction/action/transformer/poptip.d.ts +1 -1
- package/lib/interaction/action/transformer/setItemState.d.ts +1 -1
- package/lib/interaction/action/transformer/tooltip.d.ts +1 -1
- package/lib/interaction/builtin/activeRegion.d.ts +1 -1
- package/lib/interaction/builtin/brush.d.ts +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/builtin/brushVisible.d.ts +1 -1
- package/lib/interaction/builtin/elementActive.d.ts +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +1 -1
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +5 -3
- package/lib/interaction/builtin/elementHighlightByColor.js +1 -1
- package/lib/interaction/builtin/elementHighlightByColor.js.map +1 -1
- package/lib/interaction/builtin/elementHighlightByX.d.ts +5 -3
- package/lib/interaction/builtin/elementHighlightByX.js +1 -1
- package/lib/interaction/builtin/elementHighlightByX.js.map +1 -1
- package/lib/interaction/builtin/elementListHighlight.d.ts +1 -1
- package/lib/interaction/builtin/elementSelected.d.ts +1 -1
- package/lib/interaction/builtin/ellipsisText.d.ts +1 -1
- package/lib/interaction/builtin/fisheye.d.ts +1 -1
- package/lib/interaction/builtin/legendActive.d.ts +1 -1
- package/lib/interaction/builtin/legendHighlight.d.ts +1 -1
- package/lib/interaction/builtin/tooltip.d.ts +9 -5
- package/lib/interaction/index.d.ts +4 -3
- package/lib/interaction/index.js +9 -7
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/interactor/mousePosition.d.ts +1 -1
- package/lib/interaction/interactor/touchPosition.d.ts +1 -1
- package/lib/interaction/native/chartIndex.js +6 -2
- package/lib/interaction/native/chartIndex.js.map +1 -1
- package/lib/interaction/native/elementHighlight.d.ts +10 -0
- package/lib/interaction/native/{elementActive.js → elementHighlight.js} +11 -11
- package/lib/interaction/native/elementHighlight.js.map +1 -0
- package/lib/interaction/native/elementHighlightByColor.d.ts +4 -0
- package/lib/interaction/native/elementHighlightByColor.js +16 -0
- package/lib/interaction/native/elementHighlightByColor.js.map +1 -0
- package/lib/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
- package/lib/interaction/native/elementHighlightByX.js +17 -0
- package/lib/interaction/native/elementHighlightByX.js.map +1 -0
- package/lib/interaction/native/elementSelect.js +1 -1
- package/lib/interaction/native/elementSelect.js.map +1 -1
- package/lib/interaction/native/elementSelectByColor.js +1 -1
- package/lib/interaction/native/elementSelectByColor.js.map +1 -1
- package/lib/interaction/native/elementSelectByX.js +1 -1
- package/lib/interaction/native/elementSelectByX.js.map +1 -1
- package/lib/interaction/native/fisheye.js +8 -5
- package/lib/interaction/native/fisheye.js.map +1 -1
- package/lib/interaction/native/tooltip.d.ts +11 -0
- package/lib/interaction/native/tooltip.js +285 -0
- package/lib/interaction/native/tooltip.js.map +1 -0
- package/lib/interaction/native/utils.d.ts +1 -1
- package/lib/interaction/native/utils.js +4 -4
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/interaction/types.d.ts +16 -16
- package/lib/label-transform/dodgeY.d.ts +1 -1
- package/lib/label-transform/dodgeY.js +9 -1
- package/lib/label-transform/dodgeY.js.map +1 -1
- package/lib/label-transform/hideOverlap.d.ts +1 -1
- package/lib/label-transform/hideOverlap.js +14 -4
- package/lib/label-transform/hideOverlap.js.map +1 -1
- package/lib/label-transform/index.d.ts +4 -0
- package/lib/label-transform/index.js +5 -1
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/spider.d.ts +7 -0
- package/lib/label-transform/spider.js +34 -0
- package/lib/label-transform/spider.js.map +1 -0
- package/lib/label-transform/surround.d.ts +7 -0
- package/lib/label-transform/surround.js +34 -0
- package/lib/label-transform/surround.js.map +1 -0
- package/lib/mark/area.d.ts +1 -1
- package/lib/mark/area.js +8 -7
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/box.d.ts +1 -1
- package/lib/mark/box.js +6 -8
- package/lib/mark/box.js.map +1 -1
- package/lib/mark/boxplot.d.ts +4 -0
- package/lib/mark/boxplot.js +108 -0
- package/lib/mark/boxplot.js.map +1 -0
- package/lib/mark/cell.d.ts +1 -1
- package/lib/mark/cell.js +3 -7
- package/lib/mark/cell.js.map +1 -1
- package/lib/mark/connector.d.ts +1 -1
- package/lib/mark/connector.js +2 -2
- package/lib/mark/connector.js.map +1 -1
- package/lib/mark/forceGraph.d.ts +4 -0
- package/lib/mark/forceGraph.js +99 -0
- package/lib/mark/forceGraph.js.map +1 -0
- package/lib/mark/image.d.ts +1 -1
- package/lib/mark/image.js +11 -8
- package/lib/mark/image.js.map +1 -1
- package/lib/mark/index.d.ts +16 -0
- package/lib/mark/index.js +19 -1
- package/lib/mark/index.js.map +1 -1
- package/lib/mark/interval.d.ts +1 -1
- package/lib/mark/interval.js +6 -7
- package/lib/mark/interval.js.map +1 -1
- package/lib/mark/line.d.ts +1 -1
- package/lib/mark/line.js +12 -8
- package/lib/mark/line.js.map +1 -1
- package/lib/mark/lineX.d.ts +1 -1
- package/lib/mark/lineX.js +5 -2
- package/lib/mark/lineX.js.map +1 -1
- package/lib/mark/lineY.d.ts +1 -1
- package/lib/mark/lineY.js +5 -2
- package/lib/mark/lineY.js.map +1 -1
- package/lib/mark/link.d.ts +1 -1
- package/lib/mark/link.js +3 -7
- package/lib/mark/link.js.map +1 -1
- package/lib/mark/pack.d.ts +4 -0
- package/lib/mark/pack.js +85 -0
- package/lib/mark/pack.js.map +1 -0
- package/lib/mark/path.d.ts +7 -0
- package/lib/mark/path.js +28 -0
- package/lib/mark/path.js.map +1 -0
- package/lib/mark/point.d.ts +1 -1
- package/lib/mark/point.js +30 -27
- package/lib/mark/point.js.map +1 -1
- package/lib/mark/polygon.d.ts +1 -1
- package/lib/mark/polygon.js +3 -7
- package/lib/mark/polygon.js.map +1 -1
- package/lib/mark/range.d.ts +1 -1
- package/lib/mark/range.js +2 -2
- package/lib/mark/range.js.map +1 -1
- package/lib/mark/rangeX.d.ts +1 -1
- package/lib/mark/rangeX.js +5 -2
- package/lib/mark/rangeX.js.map +1 -1
- package/lib/mark/rangeY.d.ts +1 -1
- package/lib/mark/rangeY.js +5 -2
- package/lib/mark/rangeY.js.map +1 -1
- package/lib/mark/rect.d.ts +1 -1
- package/lib/mark/rect.js +6 -7
- package/lib/mark/rect.js.map +1 -1
- package/lib/mark/sankey.d.ts +8 -0
- package/lib/mark/sankey.js +102 -0
- package/lib/mark/sankey.js.map +1 -0
- package/lib/mark/shape.d.ts +7 -0
- package/lib/mark/shape.js +37 -0
- package/lib/mark/shape.js.map +1 -0
- package/lib/mark/text.d.ts +1 -1
- package/lib/mark/text.js +15 -10
- package/lib/mark/text.js.map +1 -1
- package/lib/mark/tree.d.ts +4 -0
- package/lib/mark/tree.js +63 -0
- package/lib/mark/tree.js.map +1 -0
- package/lib/mark/treemap.d.ts +4 -0
- package/lib/mark/treemap.js +127 -0
- package/lib/mark/treemap.js.map +1 -0
- package/lib/mark/utils.d.ts +51 -3
- package/lib/mark/utils.js +93 -13
- package/lib/mark/utils.js.map +1 -1
- package/lib/mark/vector.d.ts +1 -1
- package/lib/mark/vector.js +3 -7
- package/lib/mark/vector.js.map +1 -1
- package/lib/mark/wordCloud.d.ts +4 -0
- package/lib/mark/wordCloud.js +69 -0
- package/lib/mark/wordCloud.js.map +1 -0
- package/lib/palette/category10.d.ts +1 -1
- package/lib/palette/category20.d.ts +1 -1
- package/lib/palette/divergingGreenRed.d.ts +1 -1
- package/lib/palette/divergingGreenYellow.d.ts +1 -1
- package/lib/palette/divergingRedBlue.d.ts +1 -1
- package/lib/palette/divergingRedPurple.d.ts +1 -1
- package/lib/palette/sequentialBlue.d.ts +1 -1
- package/lib/palette/sequentialDarkBlue.d.ts +1 -1
- package/lib/palette/sequentialDarkGreen.d.ts +1 -1
- package/lib/palette/sequentialGreen.d.ts +1 -1
- package/lib/palette/sequentialGreenBlue.d.ts +1 -1
- package/lib/palette/sequentialGrey.d.ts +1 -1
- package/lib/palette/sequentialOrange.d.ts +1 -1
- package/lib/palette/sequentialPink.d.ts +1 -1
- package/lib/palette/sequentialPinkPurple.d.ts +1 -1
- package/lib/palette/sequentialPurple.d.ts +1 -1
- package/lib/palette/sequentialRed.d.ts +1 -1
- package/lib/palette/sequentialYellow.d.ts +1 -1
- package/lib/palette/sequentialYellowGreen.d.ts +1 -1
- package/lib/palette/sequentialYellowOrange.d.ts +1 -1
- package/lib/runtime/component.d.ts +1 -1
- package/lib/runtime/component.js +18 -29
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/coordinate.d.ts +8 -8
- package/lib/runtime/coordinate.js +21 -21
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/mark.d.ts +3 -3
- package/lib/runtime/mark.js +35 -39
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.d.ts +2 -2
- package/lib/runtime/plot.js +152 -41
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +0 -7
- package/lib/runtime/render.js +6 -6
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +4 -4
- package/lib/runtime/scale.js +98 -175
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +1 -0
- package/lib/runtime/transform.js +20 -3
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +37 -21
- package/lib/runtime/types/component.d.ts +35 -35
- package/lib/runtime/types/data.d.ts +4 -4
- package/lib/runtime/types/encode.d.ts +9 -9
- package/lib/runtime/types/mark.d.ts +14 -6
- package/lib/runtime/types/options.d.ts +32 -34
- package/lib/runtime/types/theme.d.ts +32 -12
- package/lib/runtime/types/transform.d.ts +7 -7
- package/lib/scale/band.d.ts +1 -1
- package/lib/scale/identity.d.ts +1 -1
- package/lib/scale/linear.d.ts +1 -1
- package/lib/scale/log.d.ts +1 -1
- package/lib/scale/ordinal.d.ts +1 -1
- package/lib/scale/point.d.ts +1 -1
- package/lib/scale/pow.d.ts +1 -1
- package/lib/scale/quantile.d.ts +1 -1
- package/lib/scale/quantize.d.ts +1 -1
- package/lib/scale/sequential.d.ts +1 -1
- package/lib/scale/sqrt.d.ts +1 -1
- package/lib/scale/threshold.d.ts +1 -1
- package/lib/scale/time.d.ts +1 -1
- package/lib/shape/area/area.d.ts +1 -1
- package/lib/shape/area/curve.d.ts +1 -1
- package/lib/shape/area/curve.js +2 -0
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/area/smooth.d.ts +1 -1
- package/lib/shape/area/step.d.ts +1 -1
- package/lib/shape/box/box.d.ts +1 -1
- package/lib/shape/box/box.js +3 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.d.ts +5 -11
- package/lib/shape/connector/connector.js +50 -64
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/createElement.d.ts +1 -1
- package/lib/shape/image/image.d.ts +1 -1
- package/lib/shape/image/image.js +5 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/index.d.ts +4 -0
- package/lib/shape/index.js +7 -1
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +1 -1
- package/lib/shape/interval/color.js +13 -9
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/interval/funnel.d.ts +1 -1
- package/lib/shape/interval/funnel.js +1 -3
- package/lib/shape/interval/funnel.js.map +1 -1
- package/lib/shape/interval/hollow.d.ts +1 -1
- package/lib/shape/interval/pyramid.d.ts +1 -1
- package/lib/shape/interval/pyramid.js +2 -3
- package/lib/shape/interval/pyramid.js.map +1 -1
- package/lib/shape/interval/rect.d.ts +1 -1
- package/lib/shape/label/label.d.ts +1 -1
- package/lib/shape/label/label.js +13 -5
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position.d.ts +1 -1
- package/lib/shape/label/position.js +77 -36
- package/lib/shape/label/position.js.map +1 -1
- package/lib/shape/line/curve.d.ts +1 -1
- package/lib/shape/line/curve.js +8 -2
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/line/hv.d.ts +1 -1
- package/lib/shape/line/hvh.d.ts +1 -1
- package/lib/shape/line/line.d.ts +1 -1
- package/lib/shape/line/smooth.d.ts +1 -1
- package/lib/shape/line/vh.d.ts +1 -1
- package/lib/shape/lineXY/line.d.ts +1 -1
- package/lib/shape/lineXY/line.js +2 -0
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.d.ts +1 -1
- package/lib/shape/link/arc.js +2 -0
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.d.ts +1 -7
- package/lib/shape/link/link.js +5 -3
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.d.ts +1 -1
- package/lib/shape/link/smooth.js +2 -0
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.d.ts +1 -1
- package/lib/shape/link/vhv.js +2 -0
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/path/color.d.ts +9 -0
- package/lib/shape/path/color.js +41 -0
- package/lib/shape/path/color.js.map +1 -0
- package/lib/shape/path/hollow.d.ts +8 -0
- package/lib/shape/path/hollow.js +17 -0
- package/lib/shape/path/hollow.js.map +1 -0
- package/lib/shape/path/path.d.ts +8 -0
- package/lib/shape/path/path.js +17 -0
- package/lib/shape/path/path.js.map +1 -0
- package/lib/shape/point/bowtie.d.ts +1 -1
- package/lib/shape/point/color.d.ts +1 -1
- package/lib/shape/point/color.js +4 -1
- package/lib/shape/point/color.js.map +1 -1
- package/lib/shape/point/cross.d.ts +1 -1
- package/lib/shape/point/diamond.d.ts +1 -1
- package/lib/shape/point/hexagon.d.ts +1 -1
- package/lib/shape/point/hollow.d.ts +1 -1
- package/lib/shape/point/hollowBowtie.d.ts +1 -1
- package/lib/shape/point/hollowDiamond.d.ts +1 -1
- package/lib/shape/point/hollowHexagon.d.ts +1 -1
- package/lib/shape/point/hollowSquare.d.ts +1 -1
- package/lib/shape/point/hollowTriangle.d.ts +1 -1
- package/lib/shape/point/hollowTriangleDown.d.ts +1 -1
- package/lib/shape/point/hyphen.d.ts +1 -1
- package/lib/shape/point/line.d.ts +1 -1
- package/lib/shape/point/plus.d.ts +1 -1
- package/lib/shape/point/point.d.ts +1 -1
- package/lib/shape/point/square.d.ts +1 -1
- package/lib/shape/point/tick.d.ts +1 -1
- package/lib/shape/point/triangle.d.ts +1 -1
- package/lib/shape/point/triangleDown.d.ts +1 -1
- package/lib/shape/polygon/polygon.d.ts +1 -1
- package/lib/shape/polygon/polygon.js +2 -0
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.d.ts +1 -1
- package/lib/shape/polygon/ribbon.js +2 -0
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/shape/shape.d.ts +6 -0
- package/lib/shape/shape/shape.js +31 -0
- package/lib/shape/shape/shape.js.map +1 -0
- package/lib/shape/text/advance.d.ts +2 -0
- package/lib/shape/text/advance.js +125 -0
- package/lib/shape/text/advance.js.map +1 -0
- package/lib/shape/text/badge.d.ts +5 -9
- package/lib/shape/text/badge.js +31 -50
- package/lib/shape/text/badge.js.map +1 -1
- package/lib/shape/text/text.d.ts +1 -15
- package/lib/shape/text/text.js +15 -144
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +21 -21
- package/lib/shape/utils.js +33 -13
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.d.ts +1 -7
- package/lib/shape/vector/vector.js +4 -2
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/action.d.ts +27 -27
- package/lib/spec/animate.d.ts +1 -8
- package/lib/spec/composition.d.ts +40 -17
- package/lib/spec/coordinate.d.ts +17 -17
- package/lib/spec/data.d.ts +47 -25
- package/lib/spec/encode.d.ts +7 -7
- package/lib/spec/geometry.d.ts +79 -39
- package/lib/spec/index.d.ts +1 -1
- package/lib/spec/interaction.d.ts +28 -26
- package/lib/spec/labelTransform.d.ts +10 -3
- package/lib/spec/palette.d.ts +23 -23
- package/lib/spec/scale.d.ts +17 -17
- package/lib/spec/theme.d.ts +5 -5
- package/lib/spec/title.d.ts +1 -1
- package/lib/spec/transform.d.ts +44 -26
- package/lib/stdlib/index.js +4 -208
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/dark.d.ts +1 -1
- package/lib/theme/dark.js +157 -57
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/light.d.ts +1 -1
- package/lib/theme/light.js +155 -52
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/Select.d.ts +1 -1
- package/lib/transform/SelectX.d.ts +1 -1
- package/lib/transform/SelectY.d.ts +1 -1
- package/lib/transform/bin.d.ts +12 -0
- package/lib/transform/bin.js +86 -0
- package/lib/transform/bin.js.map +1 -0
- package/lib/transform/binX.d.ts +4 -0
- package/lib/transform/binX.js +11 -0
- package/lib/transform/binX.js.map +1 -0
- package/lib/transform/diffY.d.ts +1 -1
- package/lib/transform/dodgeX.d.ts +1 -1
- package/lib/transform/flexX.d.ts +1 -1
- package/lib/transform/group.d.ts +2 -2
- package/lib/transform/group.js +4 -82
- package/lib/transform/group.js.map +1 -1
- package/lib/transform/groupColor.d.ts +1 -1
- package/lib/transform/groupColor.js +1 -1
- package/lib/transform/groupColor.js.map +1 -1
- package/lib/transform/groupN.d.ts +9 -0
- package/lib/transform/groupN.js +103 -0
- package/lib/transform/groupN.js.map +1 -0
- package/lib/transform/groupX.d.ts +1 -1
- package/lib/transform/groupX.js +1 -1
- package/lib/transform/groupX.js.map +1 -1
- package/lib/transform/groupY.d.ts +1 -1
- package/lib/transform/groupY.js +1 -1
- package/lib/transform/groupY.js.map +1 -1
- package/lib/transform/index.d.ts +16 -6
- package/lib/transform/index.js +17 -7
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/jitter.d.ts +1 -1
- package/lib/transform/jitterX.d.ts +1 -1
- package/lib/transform/maybeFunctionAttribute.d.ts +6 -0
- package/lib/transform/maybeFunctionAttribute.js +23 -0
- package/lib/transform/maybeFunctionAttribute.js.map +1 -0
- package/lib/transform/maybeGradient.d.ts +7 -0
- package/lib/transform/maybeGradient.js +28 -0
- package/lib/transform/maybeGradient.js.map +1 -0
- package/lib/transform/maybeIdentityX.d.ts +1 -1
- package/lib/transform/maybeIdentityY.d.ts +1 -1
- package/lib/transform/maybeKey.d.ts +1 -1
- package/lib/transform/maybeSeries.d.ts +1 -1
- package/lib/transform/maybeSize.d.ts +1 -1
- package/lib/transform/maybeStackY.d.ts +1 -1
- package/lib/transform/maybeTitle.d.ts +8 -0
- package/lib/transform/{maybeTitleX.js → maybeTitle.js} +8 -7
- package/lib/transform/maybeTitle.js.map +1 -0
- package/lib/transform/maybeTooltip.d.ts +2 -2
- package/lib/transform/maybeTooltip.js +7 -5
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/transform/maybeTuple.d.ts +7 -0
- package/lib/transform/maybeTuple.js +23 -0
- package/lib/transform/maybeTuple.js.map +1 -0
- package/lib/transform/maybeTupleX.d.ts +1 -1
- package/lib/transform/maybeTupleX.js +1 -1
- package/lib/transform/maybeTupleX.js.map +1 -1
- package/lib/transform/maybeTupleY.d.ts +1 -1
- package/lib/transform/maybeTupleY.js +1 -1
- package/lib/transform/maybeTupleY.js.map +1 -1
- package/lib/transform/maybeVisualPosition.d.ts +7 -0
- package/lib/transform/maybeVisualPosition.js +49 -0
- package/lib/transform/maybeVisualPosition.js.map +1 -0
- package/lib/transform/maybeZeroPadding.d.ts +1 -1
- package/lib/transform/maybeZeroX.d.ts +1 -1
- package/lib/transform/maybeZeroY.d.ts +1 -1
- package/lib/transform/maybeZeroY1.d.ts +1 -1
- package/lib/transform/normalizeY.d.ts +1 -1
- package/lib/transform/pack.d.ts +1 -1
- package/lib/transform/sort.d.ts +1 -1
- package/lib/transform/sortColor.d.ts +1 -1
- package/lib/transform/sortX.d.ts +1 -1
- package/lib/transform/sortY.d.ts +1 -1
- package/lib/transform/stackEnter.d.ts +2 -1
- package/lib/transform/stackEnter.js +15 -5
- package/lib/transform/stackEnter.js.map +1 -1
- package/lib/transform/stackY.d.ts +1 -1
- package/lib/transform/stackY.js +25 -4
- package/lib/transform/stackY.js.map +1 -1
- package/lib/transform/symmetryY.d.ts +1 -1
- package/lib/transform/utils/helper.d.ts +1 -0
- package/lib/transform/utils/helper.js +11 -2
- package/lib/transform/utils/helper.js.map +1 -1
- package/lib/transform/utils/order.d.ts +3 -3
- package/lib/transform/utils/order.js +2 -0
- package/lib/transform/utils/order.js.map +1 -1
- package/lib/utils/coordinate.js +3 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +5 -2
- package/lib/utils/helper.js +13 -4
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/selection.d.ts +4 -4
- package/lib/utils/selection.js +3 -1
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.d.ts +6 -1
- package/lib/utils/size.js +24 -2
- package/lib/utils/size.js.map +1 -1
- package/lib/utils/vector.d.ts +1 -1
- package/package.json +12 -11
- package/src/animation/fadeIn.ts +1 -1
- package/src/animation/fadeOut.ts +1 -1
- package/src/animation/growInX.ts +40 -0
- package/src/animation/growInY.ts +40 -0
- package/src/animation/index.ts +6 -0
- package/src/animation/morphing.ts +60 -11
- package/src/animation/pathIn.ts +24 -0
- package/src/animation/scaleInX.ts +1 -1
- package/src/animation/scaleInY.ts +1 -1
- package/src/animation/scaleOutX.ts +1 -1
- package/src/animation/scaleOutY.ts +1 -1
- package/src/animation/types.ts +6 -0
- package/src/animation/waveIn.ts +26 -3
- package/src/animation/zoomIn.ts +1 -1
- package/src/animation/zoomOut.ts +1 -1
- package/src/api/chart.ts +25 -5
- package/src/api/composition/facetCircle.ts +4 -10
- package/src/api/composition/facetRect.ts +4 -14
- package/src/api/composition/geoPath.ts +43 -0
- package/src/api/composition/geoView.ts +42 -0
- package/src/api/composition/index.ts +8 -0
- package/src/api/composition/repeatMatrix.ts +4 -13
- package/src/api/composition/spaceFlex.ts +1 -12
- package/src/api/composition/spaceLayer.ts +1 -6
- package/src/api/composition/timingKeyframe.ts +3 -19
- package/src/api/composition/view.ts +12 -14
- package/src/api/mark/index.ts +24 -0
- package/src/api/mark/mark.ts +97 -11
- package/src/api/mark/types.ts +3 -11
- package/src/api/types.ts +4 -2
- package/src/component/axis.ts +29 -13
- package/src/component/legendCategory.ts +3 -3
- package/src/composition/facetCircle.ts +2 -2
- package/src/composition/facetRect.ts +8 -10
- package/src/composition/mark.ts +4 -4
- package/src/composition/repeatMatrix.ts +4 -4
- package/src/composition/timingKeyframe.ts +7 -8
- package/src/data/fetch.ts +1 -0
- package/src/data/filter.ts +19 -0
- package/src/data/index.ts +4 -2
- package/src/data/join.ts +40 -0
- package/src/data/rename.ts +2 -3
- package/src/geo/d3-projection.ts +33 -0
- package/src/geo/geoPath.ts +34 -0
- package/src/geo/geoView.ts +235 -0
- package/src/geo/index.ts +12 -0
- package/src/interaction/action/service/elementSelection.ts +1 -1
- package/src/interaction/action/transformer/filter.ts +6 -5
- package/src/interaction/builtin/elementHighlightByColor.ts +1 -1
- package/src/interaction/builtin/elementHighlightByX.ts +1 -1
- package/src/interaction/index.ts +4 -3
- package/src/interaction/native/chartIndex.ts +5 -2
- package/src/interaction/native/{elementActive.ts → elementHighlight.ts} +9 -9
- package/src/interaction/native/{elementActiveByColor.ts → elementHighlightByColor.ts} +5 -5
- package/src/interaction/native/{elementActiveByX.ts → elementHighlightByX.ts} +5 -5
- package/src/interaction/native/elementSelect.ts +2 -2
- package/src/interaction/native/elementSelectByColor.ts +2 -2
- package/src/interaction/native/elementSelectByX.ts +2 -2
- package/src/interaction/native/fisheye.ts +7 -5
- package/src/interaction/native/tooltip.ts +381 -0
- package/src/interaction/native/utils.ts +2 -2
- package/src/label-transform/dodgeY.ts +11 -1
- package/src/label-transform/hideOverlap.ts +17 -5
- package/src/label-transform/index.ts +4 -0
- package/src/label-transform/spider.ts +37 -0
- package/src/label-transform/surround.ts +37 -0
- package/src/mark/area.ts +10 -7
- package/src/mark/box.ts +7 -8
- package/src/mark/boxplot.ts +119 -0
- package/src/mark/cell.ts +5 -7
- package/src/mark/connector.ts +3 -2
- package/src/mark/forceGraph.ts +133 -0
- package/src/mark/image.ts +14 -9
- package/src/mark/index.ts +16 -0
- package/src/mark/interval.ts +8 -7
- package/src/mark/line.ts +15 -8
- package/src/mark/lineX.ts +6 -2
- package/src/mark/lineY.ts +6 -2
- package/src/mark/link.ts +5 -7
- package/src/mark/pack.ts +105 -0
- package/src/mark/path.ts +34 -0
- package/src/mark/point.ts +32 -27
- package/src/mark/polygon.ts +5 -7
- package/src/mark/range.ts +3 -2
- package/src/mark/rangeX.ts +6 -2
- package/src/mark/rangeY.ts +6 -2
- package/src/mark/rect.ts +8 -7
- package/src/mark/sankey.ts +128 -0
- package/src/mark/shape.ts +37 -0
- package/src/mark/text.ts +17 -11
- package/src/mark/tree.ts +86 -0
- package/src/mark/treemap.ts +189 -0
- package/src/mark/utils.ts +115 -12
- package/src/mark/vector.ts +5 -7
- package/src/mark/wordCloud.ts +74 -0
- package/src/runtime/component.ts +18 -28
- package/src/runtime/coordinate.ts +20 -20
- package/src/runtime/mark.ts +52 -71
- package/src/runtime/plot.ts +229 -61
- package/src/runtime/render.ts +7 -5
- package/src/runtime/scale.ts +112 -246
- package/src/runtime/transform.ts +21 -2
- package/src/runtime/types/common.ts +21 -1
- package/src/runtime/types/component.ts +11 -5
- package/src/runtime/types/mark.ts +12 -2
- package/src/runtime/types/options.ts +6 -4
- package/src/runtime/types/theme.ts +32 -4
- package/src/shape/.DS_Store +0 -0
- package/src/shape/area/curve.ts +2 -0
- package/src/shape/box/box.ts +3 -1
- package/src/shape/connector/connector.ts +75 -102
- package/src/shape/image/image.ts +5 -2
- package/src/shape/index.ts +5 -0
- package/src/shape/interval/color.ts +31 -9
- package/src/shape/interval/funnel.ts +1 -1
- package/src/shape/interval/pyramid.ts +1 -1
- package/src/shape/label/label.ts +20 -7
- package/src/shape/label/position.ts +116 -34
- package/src/shape/line/curve.ts +7 -1
- package/src/shape/lineXY/line.ts +2 -0
- package/src/shape/link/arc.ts +2 -0
- package/src/shape/link/link.ts +6 -10
- package/src/shape/link/smooth.ts +2 -0
- package/src/shape/link/vhv.ts +2 -0
- package/src/shape/path/color.ts +38 -0
- package/src/shape/path/hollow.ts +20 -0
- package/src/shape/path/path.ts +20 -0
- package/src/shape/point/color.ts +5 -2
- package/src/shape/polygon/polygon.ts +2 -0
- package/src/shape/polygon/ribbon.ts +2 -0
- package/src/shape/shape/shape.ts +25 -0
- package/src/shape/text/advance.ts +181 -0
- package/src/shape/text/badge.ts +40 -79
- package/src/shape/text/text.ts +19 -219
- package/src/shape/utils.ts +42 -18
- package/src/shape/vector/vector.ts +5 -9
- package/src/spec/action.ts +1 -1
- package/src/spec/animate.ts +9 -9
- package/src/spec/composition.ts +41 -5
- package/src/spec/data.ts +38 -10
- package/src/spec/geometry.ts +122 -13
- package/src/spec/interaction.ts +40 -34
- package/src/spec/labelTransform.ts +9 -0
- package/src/spec/transform.ts +19 -1
- package/src/stdlib/index.ts +66 -18
- package/src/theme/dark.ts +161 -58
- package/src/theme/light.ts +159 -53
- package/src/transform/bin.ts +102 -0
- package/src/transform/binX.ts +17 -0
- package/src/transform/group.ts +7 -104
- package/src/transform/groupColor.ts +1 -1
- package/src/transform/groupN.ts +120 -0
- package/src/transform/groupX.ts +1 -1
- package/src/transform/groupY.ts +1 -1
- package/src/transform/index.ts +16 -6
- package/src/transform/maybeFunctionAttribute.ts +28 -0
- package/src/transform/maybeGradient.ts +27 -0
- package/src/transform/{maybeTitleX.ts → maybeTitle.ts} +8 -5
- package/src/transform/maybeTooltip.ts +17 -13
- package/src/transform/maybeTuple.ts +22 -0
- package/src/transform/maybeTupleX.ts +2 -2
- package/src/transform/maybeTupleY.ts +2 -2
- package/src/transform/maybeVisualPosition.ts +37 -0
- package/src/transform/stackEnter.ts +20 -4
- package/src/transform/stackY.ts +30 -4
- package/src/transform/utils/helper.ts +8 -1
- package/src/transform/utils/order.ts +1 -0
- package/src/utils/coordinate.ts +2 -1
- package/src/utils/helper.ts +17 -4
- package/src/utils/selection.ts +7 -4
- package/src/utils/size.ts +45 -1
- package/esm/data/filterBy.d.ts +0 -8
- package/esm/data/filterBy.js +0 -17
- package/esm/data/filterBy.js.map +0 -1
- package/esm/interaction/native/elementActive.d.ts +0 -10
- package/esm/interaction/native/elementActive.js.map +0 -1
- package/esm/interaction/native/elementActiveByColor.d.ts +0 -4
- package/esm/interaction/native/elementActiveByColor.js +0 -12
- package/esm/interaction/native/elementActiveByColor.js.map +0 -1
- package/esm/interaction/native/elementActiveByX.js +0 -13
- package/esm/interaction/native/elementActiveByX.js.map +0 -1
- package/esm/transform/maybeTitleX.d.ts +0 -6
- package/esm/transform/maybeTitleX.js.map +0 -1
- package/esm/transform/maybeTooltipPosition.d.ts +0 -7
- package/esm/transform/maybeTooltipPosition.js +0 -10
- package/esm/transform/maybeTooltipPosition.js.map +0 -1
- package/esm/transform/maybeTooltipY.d.ts +0 -6
- package/esm/transform/maybeTooltipY.js +0 -9
- package/esm/transform/maybeTooltipY.js.map +0 -1
- package/lib/data/filterBy.d.ts +0 -8
- package/lib/data/filterBy.js +0 -21
- package/lib/data/filterBy.js.map +0 -1
- package/lib/interaction/native/elementActive.d.ts +0 -10
- package/lib/interaction/native/elementActive.js.map +0 -1
- package/lib/interaction/native/elementActiveByColor.d.ts +0 -4
- package/lib/interaction/native/elementActiveByColor.js +0 -16
- package/lib/interaction/native/elementActiveByColor.js.map +0 -1
- package/lib/interaction/native/elementActiveByX.js +0 -17
- package/lib/interaction/native/elementActiveByX.js.map +0 -1
- package/lib/transform/maybeTitleX.d.ts +0 -6
- package/lib/transform/maybeTitleX.js.map +0 -1
- package/lib/transform/maybeTooltipPosition.d.ts +0 -7
- package/lib/transform/maybeTooltipPosition.js +0 -14
- package/lib/transform/maybeTooltipPosition.js.map +0 -1
- package/lib/transform/maybeTooltipY.d.ts +0 -6
- package/lib/transform/maybeTooltipY.js +0 -13
- package/lib/transform/maybeTooltipY.js.map +0 -1
- package/src/data/filterBy.ts +0 -28
- package/src/transform/maybeTooltipPosition.ts +0 -14
- package/src/transform/maybeTooltipY.ts +0 -13
package/esm/mark/rect.d.ts
CHANGED
package/esm/mark/rect.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { baseGeometryChannels, basePostInference, basePreInference, } from './utils';
|
|
1
|
+
import { baseGeometryChannels, basePostInference, basePreInference, tooltip1d, } from './utils';
|
|
2
2
|
export const Rect = () => {
|
|
3
3
|
return (index, scale, value, coordinate) => {
|
|
4
4
|
const { x: X, x1: X1, y: Y, y1: Y1 } = value;
|
|
@@ -12,20 +12,19 @@ export const Rect = () => {
|
|
|
12
12
|
return [index, P];
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
+
const shapes = ['rect', 'hollow'];
|
|
15
16
|
Rect.props = {
|
|
16
17
|
defaultShape: 'rect',
|
|
17
18
|
defaultLabelShape: 'label',
|
|
18
19
|
channels: [
|
|
19
|
-
...baseGeometryChannels(),
|
|
20
|
+
...baseGeometryChannels({ shapes }),
|
|
20
21
|
{ name: 'x', required: true },
|
|
21
22
|
{ name: 'y', required: true },
|
|
22
23
|
],
|
|
23
24
|
preInference: [...basePreInference(), { type: 'maybeZeroY1' }],
|
|
24
|
-
postInference: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
],
|
|
29
|
-
shapes: ['rect', 'hollow'],
|
|
25
|
+
postInference: [...basePostInference(), ...tooltip1d()],
|
|
26
|
+
interaction: {
|
|
27
|
+
shareTooltip: true,
|
|
28
|
+
},
|
|
30
29
|
};
|
|
31
30
|
//# sourceMappingURL=rect.js.map
|
package/esm/mark/rect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rect.js","sourceRoot":"src/","sources":["mark/rect.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"rect.js","sourceRoot":"src/","sources":["mark/rect.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,iBA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EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC9D,aAAa,EAAE,CAAC,GAAG,iBAAiB,EAAE,EAAE,GAAG,SAAS,EAAE,CAAC;IACvD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CompositionComponent as CC } from '../runtime';
|
|
2
|
+
import { SankeyMark } from '../spec';
|
|
3
|
+
export type SankeyOptions = Omit<SankeyMark, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* @todo Add interaction
|
|
6
|
+
* @todo Add source-link color mode
|
|
7
|
+
*/
|
|
8
|
+
export declare const Sankey: CC<SankeyOptions>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { deepMix } from '@antv/util';
|
|
13
|
+
import { Sankey as SankeyTransform } from '../data/sankey';
|
|
14
|
+
import { subObject } from '../utils/helper';
|
|
15
|
+
import { field, initializeData } from './utils';
|
|
16
|
+
/**
|
|
17
|
+
* @todo Add interaction
|
|
18
|
+
* @todo Add source-link color mode
|
|
19
|
+
*/
|
|
20
|
+
export const Sankey = (options) => {
|
|
21
|
+
const DEFAULT_LAYOUT_OPTIONS = {
|
|
22
|
+
nodeId: (d) => d.key,
|
|
23
|
+
nodeWidth: 0.02,
|
|
24
|
+
nodePadding: 0.02,
|
|
25
|
+
};
|
|
26
|
+
const DEFAULT_NODE_OPTIONS = {
|
|
27
|
+
type: 'polygon',
|
|
28
|
+
axis: false,
|
|
29
|
+
legend: false,
|
|
30
|
+
encode: {
|
|
31
|
+
shape: 'polygon',
|
|
32
|
+
x: 'x',
|
|
33
|
+
y: 'y',
|
|
34
|
+
},
|
|
35
|
+
scale: {
|
|
36
|
+
x: { type: 'identity' },
|
|
37
|
+
y: { type: 'identity' },
|
|
38
|
+
},
|
|
39
|
+
style: {
|
|
40
|
+
stroke: '#000',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
const DEFAULT_LINK_OPTIONS = {
|
|
44
|
+
type: 'polygon',
|
|
45
|
+
axis: false,
|
|
46
|
+
legend: false,
|
|
47
|
+
encode: {
|
|
48
|
+
shape: 'ribbon',
|
|
49
|
+
x: 'x',
|
|
50
|
+
y: 'y',
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
fillOpacity: 0.5,
|
|
54
|
+
stroke: null,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
const DEFAULT_LABEL_OPTIONS = {
|
|
58
|
+
textAlign: (d) => (d.x[0] < 0.5 ? 'start' : 'end'),
|
|
59
|
+
position: (d) => (d.x[0] < 0.5 ? 'right' : 'left'),
|
|
60
|
+
fontSize: 10,
|
|
61
|
+
};
|
|
62
|
+
return () => {
|
|
63
|
+
const { data, encode = {}, scale, style = {}, layout = {}, nodeLabels = [], linkLabels = [], animate = {}, } = options;
|
|
64
|
+
// Initialize data, generating nodes by link if is not specified.
|
|
65
|
+
const { links, nodes } = initializeData(data, encode);
|
|
66
|
+
// Extract encode for node and link.
|
|
67
|
+
const nodeEncode = subObject(encode, 'node');
|
|
68
|
+
const linkEncode = subObject(encode, 'link');
|
|
69
|
+
const { key: nodeKey = (d) => d.key, color = nodeKey } = nodeEncode;
|
|
70
|
+
// Transform data, using nodeKey as nodeId.
|
|
71
|
+
const { links: linkData, nodes: nodeData } = SankeyTransform(Object.assign(Object.assign(Object.assign({}, DEFAULT_LAYOUT_OPTIONS), { nodeId: field(nodeKey) }), layout))({ links, nodes });
|
|
72
|
+
// Extract label style and apply defaults.
|
|
73
|
+
const _a = subObject(style, 'label'), { text = nodeKey, spacing = 5 } = _a, labelStyle = __rest(_a, ["text", "spacing"]);
|
|
74
|
+
return [
|
|
75
|
+
deepMix({}, DEFAULT_NODE_OPTIONS, {
|
|
76
|
+
data: nodeData,
|
|
77
|
+
encode: Object.assign(Object.assign({}, nodeEncode), { color }),
|
|
78
|
+
scale,
|
|
79
|
+
style: subObject(style, 'node'),
|
|
80
|
+
labels: [
|
|
81
|
+
Object.assign(Object.assign(Object.assign({}, DEFAULT_LABEL_OPTIONS), { text, dx: (d) => (d.x[0] < 0.5 ? spacing : -spacing) }), labelStyle),
|
|
82
|
+
...nodeLabels,
|
|
83
|
+
],
|
|
84
|
+
animate: typeof animate === 'object' ? subObject(animate, 'node') : animate,
|
|
85
|
+
axis: false,
|
|
86
|
+
}),
|
|
87
|
+
deepMix({}, DEFAULT_LINK_OPTIONS, {
|
|
88
|
+
data: linkData,
|
|
89
|
+
encode: linkEncode,
|
|
90
|
+
labels: linkLabels,
|
|
91
|
+
style: Object.assign({ fill: linkEncode.color ? undefined : '#aaa' }, subObject(style, 'link')),
|
|
92
|
+
animate: typeof animate === 'object' ? subObject(animate, 'link') : animate,
|
|
93
|
+
}),
|
|
94
|
+
];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
Sankey.props = { composite: true };
|
|
98
|
+
//# sourceMappingURL=sankey.js.map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@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { basePreInference, createBandOffset, visualMark } from './utils';
|
|
2
|
+
/**
|
|
3
|
+
* @todo Unify with text, image and point.
|
|
4
|
+
*/
|
|
5
|
+
export const Shape = (options) => {
|
|
6
|
+
const { cartesian } = options;
|
|
7
|
+
if (cartesian)
|
|
8
|
+
return visualMark;
|
|
9
|
+
return (index, scale, value, coordinate) => {
|
|
10
|
+
const { x: X, y: Y } = value;
|
|
11
|
+
const offset = createBandOffset(scale, value, options);
|
|
12
|
+
const P = Array.from(index, (i) => {
|
|
13
|
+
const p = [+X[i], +Y[i]];
|
|
14
|
+
return [coordinate.map(offset(p, i))];
|
|
15
|
+
});
|
|
16
|
+
return [index, P];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
Shape.props = {
|
|
20
|
+
defaultShape: 'shape',
|
|
21
|
+
defaultLabelShape: 'label',
|
|
22
|
+
channels: [
|
|
23
|
+
{ name: 'x', required: true },
|
|
24
|
+
{ name: 'y', required: true },
|
|
25
|
+
],
|
|
26
|
+
preInference: [
|
|
27
|
+
...basePreInference(),
|
|
28
|
+
{ type: 'maybeTuple' },
|
|
29
|
+
{ type: 'maybeVisualPosition' },
|
|
30
|
+
{ type: 'maybeFunctionAttribute' },
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"src/","sources":["mark/shape.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIzE;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAqB,CAAC,OAAO,EAAE,EAAE;IACjD,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC9B,IAAI,SAAS;QAAE,OAAO,UAAkB,CAAC;IACzC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QAC7B,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,CAAC,GAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAClC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAc,CAAC;QACrD,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,CAAC,KAAK,GAAG;IACZ,YAAY,EAAE,OAAO;IACrB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE;QACZ,GAAG,gBAAgB,EAAE;QACrB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,qBAAqB,EAAE;QAC/B,EAAE,IAAI,EAAE,wBAAwB,EAAE;KACnC;CACF,CAAC"}
|
package/esm/mark/text.d.ts
CHANGED
package/esm/mark/text.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { baseGeometryChannels, basePostInference, basePreInference, createBandOffset, } from './utils';
|
|
1
|
+
import { baseGeometryChannels, basePostInference, basePreInference, createBandOffset, tooltip2d, visualMark, } from './utils';
|
|
2
2
|
export const Text = (options) => {
|
|
3
|
-
|
|
3
|
+
const { cartesian = false } = options;
|
|
4
|
+
if (cartesian)
|
|
5
|
+
return visualMark;
|
|
6
|
+
return ((index, scale, value, coordinate) => {
|
|
7
|
+
if (cartesian)
|
|
8
|
+
return visualMark(index, scale, value, coordinate);
|
|
4
9
|
const { x: X, y: Y } = value;
|
|
5
10
|
const offset = createBandOffset(scale, value, options);
|
|
6
11
|
const P = Array.from(index, (i) => {
|
|
@@ -8,25 +13,25 @@ export const Text = (options) => {
|
|
|
8
13
|
return [coordinate.map(offset(p, i))];
|
|
9
14
|
});
|
|
10
15
|
return [index, P];
|
|
11
|
-
};
|
|
16
|
+
});
|
|
12
17
|
};
|
|
18
|
+
const shapes = ['text', 'badge'];
|
|
13
19
|
Text.props = {
|
|
14
20
|
defaultShape: 'text',
|
|
15
21
|
defaultLabelShape: 'label',
|
|
16
22
|
channels: [
|
|
17
|
-
...baseGeometryChannels(),
|
|
23
|
+
...baseGeometryChannels({ shapes }),
|
|
18
24
|
{ name: 'x', required: true },
|
|
19
25
|
{ name: 'y', required: true },
|
|
20
|
-
{ name: 'text',
|
|
26
|
+
{ name: 'text', scale: 'identity' },
|
|
21
27
|
{ name: 'fontSize' },
|
|
22
28
|
{ name: 'rotate' },
|
|
23
29
|
],
|
|
24
|
-
preInference: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{ type: '
|
|
28
|
-
{ type: 'maybeTooltipY' },
|
|
30
|
+
preInference: [
|
|
31
|
+
...basePreInference(),
|
|
32
|
+
{ type: 'maybeTuple' },
|
|
33
|
+
{ type: 'maybeVisualPosition' },
|
|
29
34
|
],
|
|
30
|
-
|
|
35
|
+
postInference: [...basePostInference(), ...tooltip2d()],
|
|
31
36
|
};
|
|
32
37
|
//# sourceMappingURL=text.js.map
|
package/esm/mark/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"src/","sources":["mark/text.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,o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GAAG;IACX,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE;QACnC,EAAE,IAAI,EAAE,UAAU,EAAE;QACpB,EAAE,IAAI,EAAE,QAAQ,EAAE;KACnB;IACD,YAAY,EAAE;QACZ,GAAG,gBAAgB,EAAE;QACrB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,qBAAqB,EAAE;KAChC;IACD,aAAa,EAAE,CAAC,GAAG,iBAAiB,EAAE,EAAE,GAAG,SAAS,EAAE,CAAC;CACxD,CAAC"}
|
package/esm/mark/tree.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { deepMix } from '@antv/util';
|
|
2
|
+
import { subObject } from '../utils/helper';
|
|
3
|
+
import { Tree as TreeTransform, } from '../data/tree';
|
|
4
|
+
export const Tree = (options) => {
|
|
5
|
+
const DEFAULT_LAYOUT_OPTIONS = {
|
|
6
|
+
sortBy: (a, b) => b.value - a.value,
|
|
7
|
+
};
|
|
8
|
+
const DEFAULT_NODE_OPTIONS = {
|
|
9
|
+
axis: false,
|
|
10
|
+
legend: false,
|
|
11
|
+
type: 'point',
|
|
12
|
+
encode: {
|
|
13
|
+
x: 'x',
|
|
14
|
+
y: 'y',
|
|
15
|
+
size: 2,
|
|
16
|
+
shape: 'point',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
const DEFAULT_LINK_OPTIONS = {
|
|
20
|
+
type: 'link',
|
|
21
|
+
encode: {
|
|
22
|
+
x: 'x',
|
|
23
|
+
y: 'y',
|
|
24
|
+
shape: 'smooth',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const DEFAULT_LABEL_OPTIONS = {
|
|
28
|
+
text: '',
|
|
29
|
+
fontSize: 10,
|
|
30
|
+
};
|
|
31
|
+
return () => {
|
|
32
|
+
const { data, encode = {}, scale = {}, style = {}, layout = {}, nodeLabels = [], linkLabels = [], animate = {}, } = options;
|
|
33
|
+
const valueEncode = encode === null || encode === void 0 ? void 0 : encode.value;
|
|
34
|
+
const { nodes, edges } = TreeTransform(Object.assign(Object.assign(Object.assign({}, DEFAULT_LAYOUT_OPTIONS), layout), { field: valueEncode }))(data);
|
|
35
|
+
return [
|
|
36
|
+
deepMix({}, DEFAULT_LINK_OPTIONS, {
|
|
37
|
+
data: edges,
|
|
38
|
+
encode: subObject(encode, 'link'),
|
|
39
|
+
scale: subObject(scale, 'link'),
|
|
40
|
+
labels: linkLabels,
|
|
41
|
+
style: Object.assign({ stroke: '#999' }, subObject(style, 'link')),
|
|
42
|
+
animate: typeof animate === 'object' ? subObject(animate, 'link') : animate,
|
|
43
|
+
}),
|
|
44
|
+
deepMix({}, DEFAULT_NODE_OPTIONS, {
|
|
45
|
+
data: nodes,
|
|
46
|
+
scale: subObject(scale, 'node'),
|
|
47
|
+
encode: subObject(encode, 'node'),
|
|
48
|
+
labels: [
|
|
49
|
+
Object.assign(Object.assign({}, DEFAULT_LABEL_OPTIONS), subObject(style, 'label')),
|
|
50
|
+
...nodeLabels,
|
|
51
|
+
],
|
|
52
|
+
style: Object.assign({}, subObject(style, 'node')),
|
|
53
|
+
animate: typeof animate === 'object' ? subObject(animate, 'node') : animate,
|
|
54
|
+
}),
|
|
55
|
+
];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
Tree.props = { composite: true };
|
|
59
|
+
//# sourceMappingURL=tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"src/","sources":["mark/tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAA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AC,CAAC;QAET,OAAO;YACL,OAAO,CAAC,EAAE,EAAE,oBAAoB,EAAE;gBAChC,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBACjC,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;gBAC/B,MAAM,EAAE,UAAU;gBAClB,KAAK,kBAAI,MAAM,EAAE,MAAM,IAAK,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAE;gBACtD,OAAO,EACL,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO;aACrE,CAAC;YACF,OAAO,CAAC,EAAE,EAAE,oBAAoB,EAAE;gBAChC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;gBAC/B,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBACjC,MAAM,EAAE;oDAED,qBAAqB,GACrB,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC;oBAE9B,GAAG,UAAU;iBACd;gBACD,KAAK,oBAAO,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAE;gBACtC,OAAO,EACL,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO;aACrE,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,KAAK,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { deepMix } from '@antv/util';
|
|
13
|
+
import { treemap as treemapLayout, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, } from 'd3-hierarchy';
|
|
14
|
+
import { subObject } from '../utils/helper';
|
|
15
|
+
import { getBBoxSize } from '../utils/size';
|
|
16
|
+
import { generateHierarchyRoot } from './utils';
|
|
17
|
+
function getTileMethod(tile, ratio) {
|
|
18
|
+
const tiles = {
|
|
19
|
+
treemapBinary,
|
|
20
|
+
treemapDice,
|
|
21
|
+
treemapSlice,
|
|
22
|
+
treemapSliceDice,
|
|
23
|
+
treemapSquarify,
|
|
24
|
+
treemapResquarify,
|
|
25
|
+
};
|
|
26
|
+
const tileMethod = tile === 'treemapSquarify' ? tiles[tile].ratio(ratio) : tiles[tile];
|
|
27
|
+
if (!tileMethod) {
|
|
28
|
+
throw new TypeError('Invalid tile method!');
|
|
29
|
+
}
|
|
30
|
+
return tileMethod;
|
|
31
|
+
}
|
|
32
|
+
function dataTransform(data, layout, encode) {
|
|
33
|
+
const { value } = encode;
|
|
34
|
+
const tileMethod = getTileMethod(layout.tile, layout.ratio);
|
|
35
|
+
const root = generateHierarchyRoot(data, layout.path);
|
|
36
|
+
// Calculate the value and sort.
|
|
37
|
+
value
|
|
38
|
+
? root
|
|
39
|
+
.sum((d) => (layout.ignoreParentValue && d.children ? 0 : d[value]))
|
|
40
|
+
.sort(layout.sort)
|
|
41
|
+
: root.count();
|
|
42
|
+
treemapLayout()
|
|
43
|
+
.tile(tileMethod)
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
.size(layout.size)
|
|
46
|
+
.round(layout.round)
|
|
47
|
+
.paddingInner(layout.paddingInner)
|
|
48
|
+
.paddingOuter(layout.paddingOuter)
|
|
49
|
+
.paddingTop(layout.paddingTop)
|
|
50
|
+
.paddingRight(layout.paddingRight)
|
|
51
|
+
.paddingBottom(layout.paddingBottom)
|
|
52
|
+
.paddingLeft(layout.paddingLeft)(root);
|
|
53
|
+
return root
|
|
54
|
+
.descendants()
|
|
55
|
+
.map((d) => Object.assign(d, {
|
|
56
|
+
x: [d.x0, d.x1],
|
|
57
|
+
y: [d.y0, d.y1],
|
|
58
|
+
}))
|
|
59
|
+
.filter(typeof layout.layer === 'function'
|
|
60
|
+
? layout.layer
|
|
61
|
+
: (d) => d.height === layout.layer);
|
|
62
|
+
}
|
|
63
|
+
export const Treemap = (options) => {
|
|
64
|
+
return (viewOptions) => {
|
|
65
|
+
const { width, height } = getBBoxSize(viewOptions);
|
|
66
|
+
const { data, encode = {}, scale, style = {}, layout = {}, labels = [] } = options, resOptions = __rest(options, ["data", "encode", "scale", "style", "layout", "labels"]);
|
|
67
|
+
const DEFAULT_LAYOUT_OPTIONS = {
|
|
68
|
+
tile: 'treemapSquarify',
|
|
69
|
+
ratio: 0.5 * (1 + Math.sqrt(5)),
|
|
70
|
+
size: [width, height],
|
|
71
|
+
round: false,
|
|
72
|
+
ignoreParentValue: true,
|
|
73
|
+
padding: 0,
|
|
74
|
+
paddingInner: 0,
|
|
75
|
+
paddingOuter: 0,
|
|
76
|
+
paddingTop: 0,
|
|
77
|
+
paddingRight: 0,
|
|
78
|
+
paddingBottom: 0,
|
|
79
|
+
paddingLeft: 0,
|
|
80
|
+
sort: (a, b) => b.value - a.value,
|
|
81
|
+
layer: 0,
|
|
82
|
+
};
|
|
83
|
+
const DEFAULT_OPTIONS = {
|
|
84
|
+
type: 'rect',
|
|
85
|
+
axis: false,
|
|
86
|
+
encode: {
|
|
87
|
+
x: 'x',
|
|
88
|
+
y: 'y',
|
|
89
|
+
color: (d) => d.data.parent.name,
|
|
90
|
+
},
|
|
91
|
+
scale: {
|
|
92
|
+
x: { domain: [0, width], range: [0, 1] },
|
|
93
|
+
y: { domain: [0, height], range: [0, 1] },
|
|
94
|
+
},
|
|
95
|
+
style: {
|
|
96
|
+
stroke: '#fff',
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
const DEFAULT_LABEL_OPTIONS = {
|
|
100
|
+
fontSize: 10,
|
|
101
|
+
text: (d) => d.data.name,
|
|
102
|
+
position: 'inside',
|
|
103
|
+
fill: '#000',
|
|
104
|
+
textOverflow: 'clip',
|
|
105
|
+
wordWrap: true,
|
|
106
|
+
maxLines: 1,
|
|
107
|
+
wordWrapWidth: (d) => d.x1 - d.x0,
|
|
108
|
+
lineHeight: (d) => d.y1 - d.y0,
|
|
109
|
+
};
|
|
110
|
+
const transformedData = dataTransform(data, deepMix({}, DEFAULT_LAYOUT_OPTIONS, layout), encode);
|
|
111
|
+
const labelStyle = subObject(style, 'label');
|
|
112
|
+
return [
|
|
113
|
+
deepMix({}, DEFAULT_OPTIONS, Object.assign(Object.assign({ data: transformedData, encode,
|
|
114
|
+
scale,
|
|
115
|
+
style, labels: [
|
|
116
|
+
Object.assign(Object.assign({}, DEFAULT_LABEL_OPTIONS), labelStyle),
|
|
117
|
+
...labels,
|
|
118
|
+
] }, resOptions), { axis: false })),
|
|
119
|
+
];
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
Treemap.props = { composite: true };
|
|
123
|
+
//# sourceMappingURL=treemap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treemap.js","sourceRoot":"src/","sources":["mark/treemap.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAA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AE,MAAM;YACZ,YAAY,EAAE,MAAM;YACpB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC;YACX,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE;YACjC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE;SAC/B,CAAC;QACF,MAAM,eAAe,GAAG,aAAa,CACnC,IAAI,EACJ,OAAO,CAAC,EAAE,EAAE,sBAAsB,EAAE,MAAM,CAAC,EAC3C,MAAM,CACP,CAAC;QACF,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC7C,OAAO;YACL,OAAO,CAAC,EAAE,EAAE,eAAe,gCACzB,IAAI,EAAE,eAAe,EACrB,MAAM;gBACN,KAAK;gBACL,KAAK,EACL,MAAM,EAAE;oDAED,qBAAqB,GACrB,UAAU;oBAEf,GAAG,MAAM;iBACV,IACE,UAAU,KACb,IAAI,EAAE,KAAK,IACX;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,KAAK,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC"}
|
package/esm/mark/utils.d.ts
CHANGED
|
@@ -1,13 +1,61 @@
|
|
|
1
1
|
import { Band } from '@antv/scale';
|
|
2
2
|
import { Primitive } from 'd3-array';
|
|
3
|
+
import { Vector2 } from '@antv/coord';
|
|
3
4
|
import { Scale } from '../runtime/types/component';
|
|
4
5
|
import { Channel } from '../runtime';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export type ChannelOptions = {
|
|
7
|
+
shapes?: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function baseChannels(options?: ChannelOptions): Channel[];
|
|
10
|
+
export declare function baseGeometryChannels(options?: ChannelOptions): Channel[];
|
|
11
|
+
export declare function tooltip2d(): ({
|
|
12
|
+
type: string;
|
|
13
|
+
channel: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: string;
|
|
16
|
+
channel: string[];
|
|
17
|
+
})[];
|
|
18
|
+
export declare function tooltip1d(): ({
|
|
19
|
+
type: string;
|
|
20
|
+
channel: string;
|
|
21
|
+
} | {
|
|
22
|
+
type: string;
|
|
23
|
+
channel: string[];
|
|
24
|
+
})[];
|
|
25
|
+
export declare function tooltipXd(): ({
|
|
26
|
+
type: string;
|
|
27
|
+
channel: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: string;
|
|
30
|
+
channel: string[];
|
|
31
|
+
})[];
|
|
32
|
+
export declare function baseAnnotationChannels(options?: ChannelOptions): Channel[];
|
|
8
33
|
export declare function basePreInference(): any[];
|
|
9
34
|
export declare function basePostInference(): {
|
|
10
35
|
type: string;
|
|
11
36
|
}[];
|
|
12
37
|
export declare function bandWidth(scale: Band, x: any): number;
|
|
13
38
|
export declare function createBandOffset(scale: Record<string, Scale>, value: Record<string, Primitive[]>, options?: Record<string, any>): (d: [number, number], i?: number) => [number, number];
|
|
39
|
+
export declare function visualMark(index: number[], scale: any, value: any, coordinate: any): (number[] | Vector2[][])[];
|
|
40
|
+
type Encode = 'string' | ((d: any) => any);
|
|
41
|
+
export declare function field(encode: Encode): (d: any) => any;
|
|
42
|
+
export declare function valueof(data: Record<string, any>[], encode: Encode): any[];
|
|
43
|
+
export declare function initializeData(data: {
|
|
44
|
+
nodes?: any[];
|
|
45
|
+
links: any[];
|
|
46
|
+
}, encode: Record<string, Encode>): {
|
|
47
|
+
links: {
|
|
48
|
+
target: string;
|
|
49
|
+
source: string;
|
|
50
|
+
value: any;
|
|
51
|
+
}[];
|
|
52
|
+
nodes: {
|
|
53
|
+
key: string;
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @description Path need when the data is a flat json structure,
|
|
58
|
+
* and the tree object structure do not need.
|
|
59
|
+
*/
|
|
60
|
+
export declare function generateHierarchyRoot(data: any[] | Record<string, any>, path: (d: any) => any): any;
|
|
61
|
+
export {};
|