@antv/g2 5.0.0-alpha.3 → 5.0.0-alpha.4
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/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 +97 -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 +101 -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 +104 -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 +127 -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 +188 -0
- package/src/mark/utils.ts +115 -12
- package/src/mark/vector.ts +5 -7
- package/src/mark/wordCloud.ts +73 -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 +121 -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { Category20Palette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type Category20Options = Omit<Category20Palette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Classic palette of AntV for ordinal data with 20 colors.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { DivergingGreenRedPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type DivergingGreenRedOptions = Omit<DivergingGreenRedPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for Diverging data with Green-Red theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { DivergingGreenYellowPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type DivergingGreenYellowOptions = Omit<DivergingGreenYellowPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for Diverging data with Green-Yellow theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { DivergingRedBluePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type DivergingRedBlueOptions = Omit<DivergingRedBluePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for Diverging data with Red-Blue theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { DivergingRedPurplePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type DivergingRedPurpleOptions = Omit<DivergingRedPurplePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for Diverging data with Red-Purple theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialBluePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialBlueOptions = Omit<SequentialBluePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with blue theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialDarkBluePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialDarkBlueOptions = Omit<SequentialDarkBluePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with dark blue theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialDarkGreenPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialDarkGreenOptions = Omit<SequentialDarkGreenPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with dark green theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialGreenPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialGreenOptions = Omit<SequentialGreenPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with green theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialGreenBluePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialGreenBlueOptions = Omit<SequentialGreenBluePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Green-Blue theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialGreyPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialGreyOptions = Omit<SequentialGreyPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with grey theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialOrangePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialOrangeOptions = Omit<SequentialOrangePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with orange theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialPinkPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialPinkOptions = Omit<SequentialPinkPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Pink theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialPinkPurplePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialPinkPurpleOptions = Omit<SequentialPinkPurplePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Pink-Purple theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialPurplePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialPurpleOptions = Omit<SequentialPurplePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Purple theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialRedPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialRedOptions = Omit<SequentialRedPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Red theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialYellowPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialYellowOptions = Omit<SequentialYellowPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Yellow theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialYellowGreenPalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialYellowGreenOptions = Omit<SequentialYellowGreenPalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with Yellow-Green theme.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponent } from '../runtime';
|
|
2
2
|
import { SequentialYellowOrangePalette } from '../spec/palette';
|
|
3
|
-
export
|
|
3
|
+
export type SequentialYellowOrangeOptions = Omit<SequentialYellowOrangePalette, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Palette of AntV for sequential data with yellow-orange theme.
|
|
6
6
|
*/
|
|
@@ -2,4 +2,4 @@ import { Coordinate } from '@antv/coord';
|
|
|
2
2
|
import { G2ScaleOptions, G2Library, G2GuideComponentOptions, G2View } from './types/options';
|
|
3
3
|
import { G2Theme } from './types/common';
|
|
4
4
|
export declare function inferComponent(scales: G2ScaleOptions[], partialOptions: G2View, library: G2Library): G2GuideComponentOptions[];
|
|
5
|
-
export declare function renderComponent(component: G2GuideComponentOptions,
|
|
5
|
+
export declare function renderComponent(component: G2GuideComponentOptions, coordinates: Coordinate, theme: G2Theme, library: G2Library): import("@antv/g-lite").DisplayObject<any, any>;
|
package/lib/runtime/component.js
CHANGED
|
@@ -15,17 +15,12 @@ exports.renderComponent = exports.inferComponent = void 0;
|
|
|
15
15
|
const util_1 = require("@antv/util");
|
|
16
16
|
const coordinate_1 = require("./coordinate");
|
|
17
17
|
const library_1 = require("./library");
|
|
18
|
-
const scale_1 = require("./scale");
|
|
19
18
|
function inferComponent(scales, partialOptions, library) {
|
|
20
|
-
const { component: partialComponents = [],
|
|
19
|
+
const { component: partialComponents = [], coordinates = [], title, theme, } = partialOptions;
|
|
21
20
|
const [, createGuideComponent] = (0, library_1.useLibrary)('component', library);
|
|
22
|
-
// For view with adjust, the position channel is meaningless for visualization,
|
|
23
|
-
// so there is no need to show axis.
|
|
24
21
|
const displayedScales = scales.filter(({ guide, name }) => {
|
|
25
22
|
if (guide === null)
|
|
26
23
|
return false;
|
|
27
|
-
if (isAdjust(partialOptions) && (0, scale_1.isPosition)(name))
|
|
28
|
-
return false;
|
|
29
24
|
return true;
|
|
30
25
|
});
|
|
31
26
|
const components = [...partialComponents];
|
|
@@ -37,7 +32,7 @@ function inferComponent(scales, partialOptions, library) {
|
|
|
37
32
|
components.push(Object.assign({ type: 'title', position: defaultPosition, order: defaultOrder, size }, titleOptions));
|
|
38
33
|
}
|
|
39
34
|
for (const scale of displayedScales) {
|
|
40
|
-
const type = inferComponentType(scale,
|
|
35
|
+
const type = inferComponentType(scale, coordinates);
|
|
41
36
|
if (type !== null) {
|
|
42
37
|
const { props } = createGuideComponent(type);
|
|
43
38
|
const { defaultPosition, defaultSize, defaultOrder } = props;
|
|
@@ -47,7 +42,7 @@ function inferComponent(scales, partialOptions, library) {
|
|
|
47
42
|
? guideOptions
|
|
48
43
|
: [guideOptions];
|
|
49
44
|
for (const partialGuide of guides) {
|
|
50
|
-
const position = inferComponentPosition(name, type, defaultPosition, partialGuide,
|
|
45
|
+
const position = inferComponentPosition(name, type, defaultPosition, partialGuide, coordinates);
|
|
51
46
|
const { size = defaultSize, order = defaultOrder } = partialGuide;
|
|
52
47
|
components.push(Object.assign(Object.assign({ title: field }, partialGuide), { position,
|
|
53
48
|
order,
|
|
@@ -60,7 +55,7 @@ function inferComponent(scales, partialOptions, library) {
|
|
|
60
55
|
return components;
|
|
61
56
|
}
|
|
62
57
|
exports.inferComponent = inferComponent;
|
|
63
|
-
function renderComponent(component,
|
|
58
|
+
function renderComponent(component, coordinates, theme, library) {
|
|
64
59
|
const [useScale] = (0, library_1.useLibrary)('scale', library);
|
|
65
60
|
const [useGuideComponent] = (0, library_1.useLibrary)('component', library);
|
|
66
61
|
const { scale: scaleDescriptor, bbox } = component, options = __rest(component, ["scale", "bbox"]);
|
|
@@ -68,15 +63,9 @@ function renderComponent(component, coordinate, theme, library) {
|
|
|
68
63
|
const { field, domain } = scaleDescriptor || {};
|
|
69
64
|
const value = { field, domain, bbox };
|
|
70
65
|
const render = useGuideComponent(options);
|
|
71
|
-
return render(scale, value,
|
|
66
|
+
return render(scale, value, coordinates, theme);
|
|
72
67
|
}
|
|
73
68
|
exports.renderComponent = renderComponent;
|
|
74
|
-
// @todo Remove this function when change adjust to transform.
|
|
75
|
-
function isAdjust(options) {
|
|
76
|
-
const { marks = [] } = options;
|
|
77
|
-
//@ts-ignore
|
|
78
|
-
return marks.some((mark) => typeof mark.adjust === 'object');
|
|
79
|
-
}
|
|
80
69
|
// @todo Render axis in polar with parallel coordinate.
|
|
81
70
|
// @todo Infer legend for shape.
|
|
82
71
|
function inferComponentType(scale, coordinates) {
|
|
@@ -107,7 +96,7 @@ function inferComponentType(scale, coordinates) {
|
|
|
107
96
|
return null;
|
|
108
97
|
}
|
|
109
98
|
// @todo Infer position by coordinates.
|
|
110
|
-
function inferComponentPosition(name, type, defaultPosition, guide,
|
|
99
|
+
function inferComponentPosition(name, type, defaultPosition, guide, coordinates) {
|
|
111
100
|
const positions = [
|
|
112
101
|
'left',
|
|
113
102
|
'right',
|
|
@@ -121,40 +110,40 @@ function inferComponentPosition(name, type, defaultPosition, guide, coordinate)
|
|
|
121
110
|
: guide.position;
|
|
122
111
|
// There are multiple axes for parallel coordinate.
|
|
123
112
|
// Place the first one in the border area and put others in the center.
|
|
124
|
-
if (type === 'axisY' && (0, coordinate_1.isParallel)(
|
|
113
|
+
if (type === 'axisY' && (0, coordinate_1.isParallel)(coordinates)) {
|
|
125
114
|
const match = /position(\d*)/g.exec(name);
|
|
126
115
|
if (match === null)
|
|
127
116
|
return ordinalPosition;
|
|
128
117
|
const index = +match[1];
|
|
129
|
-
if ((0, coordinate_1.isTranspose)(
|
|
118
|
+
if ((0, coordinate_1.isTranspose)(coordinates)) {
|
|
130
119
|
return index === 0 ? 'top' : 'centerVertical';
|
|
131
120
|
}
|
|
132
121
|
else {
|
|
133
122
|
return index === 0 ? ordinalPosition : 'centerHorizontal';
|
|
134
123
|
}
|
|
135
124
|
}
|
|
136
|
-
else if ((type === 'axisX' && (0, coordinate_1.isPolar)(
|
|
137
|
-
(type === 'axisY' && (0, coordinate_1.isPolar)(
|
|
138
|
-
(type === 'axisY' && (0, coordinate_1.isTheta)(
|
|
139
|
-
(type === 'axisY' && (0, coordinate_1.isHelix)(
|
|
140
|
-
(type === 'axisY' && (0, coordinate_1.isRadial)(
|
|
125
|
+
else if ((type === 'axisX' && (0, coordinate_1.isPolar)(coordinates) && !(0, coordinate_1.isTranspose)(coordinates)) ||
|
|
126
|
+
(type === 'axisY' && (0, coordinate_1.isPolar)(coordinates) && (0, coordinate_1.isTranspose)(coordinates)) ||
|
|
127
|
+
(type === 'axisY' && (0, coordinate_1.isTheta)(coordinates)) ||
|
|
128
|
+
(type === 'axisY' && (0, coordinate_1.isHelix)(coordinates)) ||
|
|
129
|
+
(type === 'axisY' && (0, coordinate_1.isRadial)(coordinates))) {
|
|
141
130
|
if (guide.position === 'bottom')
|
|
142
131
|
return 'arcInner';
|
|
143
132
|
return 'arc';
|
|
144
133
|
}
|
|
145
|
-
else if ((0, coordinate_1.isPolar)(
|
|
134
|
+
else if ((0, coordinate_1.isPolar)(coordinates) && (type === 'axisX' || type === 'axisY')) {
|
|
146
135
|
return 'arcY';
|
|
147
136
|
}
|
|
148
|
-
else if ((0, coordinate_1.isRadial)(
|
|
137
|
+
else if ((0, coordinate_1.isRadial)(coordinates) && type === 'axisX') {
|
|
149
138
|
return 'arcY';
|
|
150
139
|
}
|
|
151
|
-
else if ((type === 'axisX' && (0, coordinate_1.isReflect)(
|
|
152
|
-
(type === 'axisX' && (0, coordinate_1.isReflectY)(
|
|
140
|
+
else if ((type === 'axisX' && (0, coordinate_1.isReflect)(coordinates)) ||
|
|
141
|
+
(type === 'axisX' && (0, coordinate_1.isReflectY)(coordinates))) {
|
|
153
142
|
return 'top';
|
|
154
143
|
}
|
|
155
144
|
else if (typeof type === 'string' &&
|
|
156
145
|
type.startsWith('legend') &&
|
|
157
|
-
(0, coordinate_1.isPolar)(
|
|
146
|
+
(0, coordinate_1.isPolar)(coordinates)) {
|
|
158
147
|
if (guide.position === 'center')
|
|
159
148
|
return 'arcCenter';
|
|
160
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"src/","sources":["runtime/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qCAAqC;AAgBrC,6CASsB;AACtB,uCAAuC;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"src/","sources":["runtime/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qCAAqC;AAgBrC,6CASsB;AACtB,uCAAuC;AAGvC,SAAgB,cAAc,CAC5B,MAAwB,EACxB,cAAsB,EACtB,OAAkB;IAElB,MAAM,EACJ,SAAS,EAAE,iBAAiB,GAAG,EAAE,EACjC,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,KAAK,GACN,GAAG,cAAc,CAAC;IACnB,MAAM,CAAC,EAAE,oBAAoB,CAAC,GAAG,IAAA,oBAAU,EAIzC,WAAW,EAAE,OAAO,CAAC,CAAC;IAExB,MAAM,e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C,CAAC;IAC5C,qBAAqB;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -2,11 +2,11 @@ import { Coordinate } from '@antv/coord';
|
|
|
2
2
|
import { G2View, G2CoordinateOptions, G2Library } from './types/options';
|
|
3
3
|
import { Layout } from './types/common';
|
|
4
4
|
export declare function createCoordinate(layout: Layout, partialOptions: G2View, library: G2Library): Coordinate;
|
|
5
|
-
export declare function isPolar(
|
|
6
|
-
export declare function isHelix(
|
|
7
|
-
export declare function isTranspose(
|
|
8
|
-
export declare function isParallel(
|
|
9
|
-
export declare function isTheta(
|
|
10
|
-
export declare function isReflect(
|
|
11
|
-
export declare function isRadial(
|
|
12
|
-
export declare function isReflectY(
|
|
5
|
+
export declare function isPolar(coordinates: G2CoordinateOptions[]): boolean;
|
|
6
|
+
export declare function isHelix(coordinates: G2CoordinateOptions[]): boolean;
|
|
7
|
+
export declare function isTranspose(coordinates: G2CoordinateOptions[]): boolean;
|
|
8
|
+
export declare function isParallel(coordinates: G2CoordinateOptions[]): boolean;
|
|
9
|
+
export declare function isTheta(coordinates: G2CoordinateOptions[]): boolean;
|
|
10
|
+
export declare function isReflect(coordinates: G2CoordinateOptions[]): boolean;
|
|
11
|
+
export declare function isRadial(coordinates: G2CoordinateOptions[]): boolean;
|
|
12
|
+
export declare function isReflectY(coordinates: G2CoordinateOptions[]): boolean;
|
|
@@ -6,55 +6,55 @@ const library_1 = require("./library");
|
|
|
6
6
|
function createCoordinate(layout, partialOptions, library) {
|
|
7
7
|
const [useCoordinate] = (0, library_1.useLibrary)('coordinate', library);
|
|
8
8
|
const { innerHeight, innerWidth, insetLeft, insetTop, insetRight, insetBottom, marginLeft, marginTop, } = layout;
|
|
9
|
-
const {
|
|
9
|
+
const { coordinates: partialTransform = [] } = partialOptions;
|
|
10
10
|
const transform = inferCoordinate(partialTransform);
|
|
11
11
|
const coordinate = new coord_1.Coordinate(Object.assign(Object.assign({}, layout), { x: insetLeft + marginLeft, y: insetTop + marginTop, width: innerWidth - insetLeft - insetRight, height: innerHeight - insetBottom - insetTop, transformations: transform.map(useCoordinate).flat() }));
|
|
12
12
|
return coordinate;
|
|
13
13
|
}
|
|
14
14
|
exports.createCoordinate = createCoordinate;
|
|
15
|
-
function isPolar(
|
|
16
|
-
const polar =
|
|
15
|
+
function isPolar(coordinates) {
|
|
16
|
+
const polar = coordinates.find((d) => d.type === 'polar');
|
|
17
17
|
return polar !== undefined;
|
|
18
18
|
}
|
|
19
19
|
exports.isPolar = isPolar;
|
|
20
|
-
function isHelix(
|
|
21
|
-
const polar =
|
|
20
|
+
function isHelix(coordinates) {
|
|
21
|
+
const polar = coordinates.find((d) => d.type === 'helix');
|
|
22
22
|
return polar !== undefined;
|
|
23
23
|
}
|
|
24
24
|
exports.isHelix = isHelix;
|
|
25
|
-
function isTranspose(
|
|
26
|
-
const transposes =
|
|
25
|
+
function isTranspose(coordinates) {
|
|
26
|
+
const transposes = coordinates.filter(({ type }) => type === 'transpose');
|
|
27
27
|
return transposes.length % 2 === 1;
|
|
28
28
|
}
|
|
29
29
|
exports.isTranspose = isTranspose;
|
|
30
|
-
function isParallel(
|
|
31
|
-
const parallel =
|
|
30
|
+
function isParallel(coordinates) {
|
|
31
|
+
const parallel = coordinates.find((d) => d.type === 'parallel');
|
|
32
32
|
return parallel !== undefined;
|
|
33
33
|
}
|
|
34
34
|
exports.isParallel = isParallel;
|
|
35
|
-
function isTheta(
|
|
36
|
-
const reflect =
|
|
35
|
+
function isTheta(coordinates) {
|
|
36
|
+
const reflect = coordinates.find((d) => d.type === 'theta');
|
|
37
37
|
return reflect !== undefined;
|
|
38
38
|
}
|
|
39
39
|
exports.isTheta = isTheta;
|
|
40
|
-
function isReflect(
|
|
41
|
-
const reflect =
|
|
40
|
+
function isReflect(coordinates) {
|
|
41
|
+
const reflect = coordinates.find((d) => d.type === 'reflect');
|
|
42
42
|
return reflect !== undefined;
|
|
43
43
|
}
|
|
44
44
|
exports.isReflect = isReflect;
|
|
45
|
-
function isRadial(
|
|
46
|
-
const reflect =
|
|
45
|
+
function isRadial(coordinates) {
|
|
46
|
+
const reflect = coordinates.find((d) => d.type === 'radial');
|
|
47
47
|
return reflect !== undefined;
|
|
48
48
|
}
|
|
49
49
|
exports.isRadial = isRadial;
|
|
50
|
-
function isReflectY(
|
|
51
|
-
const reflect =
|
|
50
|
+
function isReflectY(coordinates) {
|
|
51
|
+
const reflect = coordinates.find((d) => d.type === 'reflectY');
|
|
52
52
|
return reflect !== undefined;
|
|
53
53
|
}
|
|
54
54
|
exports.isReflectY = isReflectY;
|
|
55
|
-
function inferCoordinate(
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
58
|
-
return [...
|
|
55
|
+
function inferCoordinate(coordinates) {
|
|
56
|
+
if (coordinates.find((d) => d.type === 'cartesian'))
|
|
57
|
+
return coordinates;
|
|
58
|
+
return [...coordinates, { type: 'cartesian' }];
|
|
59
59
|
}
|
|
60
60
|
//# sourceMappingURL=coordinate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate.js","sourceRoot":"src/","sources":["runtime/coordinate.ts"],"names":[],"mappings":";;;AAAA,uCAAyC;AAGzC,uCAAuC;AAGvC,SAAgB,gBAAgB,CAC9B,MAAc,EACd,cAAsB,EACtB,OAAkB;IAElB,MAAM,CAAC,aAAa,CAAC,GAAG,IAAA,oBAAU,EAIhC,YAAY,EAAE,OAAO,CAAC,CAAC;IACzB,MAAM,EACJ,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,GACV,GAAG,MAAM,CAAC;IACX,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"coordinate.js","sourceRoot":"src/","sources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E,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAC/D,OAAO,OAAO,KAAK,SAAS,CAAC;AAC/B,CAAC;AAHD,gCAGC;AAED,SAAS,eAAe,CACtB,WAAkC;IAElC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC;QAAE,OAAO,WAAW,CAAC;IACxE,OAAO,CAAC,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AACjD,CAAC"}
|
package/lib/runtime/mark.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G2MarkState
|
|
2
|
-
import {
|
|
1
|
+
import { G2MarkState } from './types/common';
|
|
2
|
+
import { G2Library, G2Mark } from './types/options';
|
|
3
3
|
import { MarkProps } from './types/mark';
|
|
4
4
|
import { ColumnOf } from './types/transform';
|
|
5
|
-
export declare function initializeMark(partialMark: G2Mark, partialProps: MarkProps,
|
|
5
|
+
export declare function initializeMark(partialMark: G2Mark, partialProps: MarkProps, library: G2Library): Promise<[G2Mark, G2MarkState]>;
|
|
6
6
|
export declare function createColumnOf(library: G2Library): ColumnOf;
|
package/lib/runtime/mark.js
CHANGED
|
@@ -23,51 +23,62 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.createColumnOf = exports.initializeMark = void 0;
|
|
24
24
|
const d3_array_1 = require("d3-array");
|
|
25
25
|
const helper_1 = require("../utils/helper");
|
|
26
|
-
const array_1 = require("../utils/array");
|
|
27
26
|
const library_1 = require("./library");
|
|
28
|
-
const scale_1 = require("./scale");
|
|
29
27
|
const transform_1 = require("./transform");
|
|
30
|
-
function initializeMark(partialMark, partialProps,
|
|
28
|
+
function initializeMark(partialMark, partialProps, library) {
|
|
31
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
30
|
// Apply transform to mark to derive indices, data, encode, etc,.
|
|
33
31
|
const context = { library };
|
|
34
32
|
const [I, transformedMark] = yield applyMarkTransform(partialMark, partialProps, context);
|
|
35
|
-
const {
|
|
33
|
+
const { encode, scale, data } = transformedMark;
|
|
36
34
|
// Skip mark with non-tabular data. Do not skip empty
|
|
37
35
|
// data, they are useful for facet to display axes.
|
|
38
36
|
if (Array.isArray(data) === false) {
|
|
39
37
|
return null;
|
|
40
38
|
}
|
|
41
|
-
//
|
|
39
|
+
// Group non-independent channels with same prefix, such as x1, x2 => x.
|
|
40
|
+
// For independent channels, dot not group them, such as position1, position2.
|
|
42
41
|
const { channels: channelDescriptors } = partialProps;
|
|
43
|
-
const
|
|
42
|
+
const nameChannels = (0, d3_array_1.rollups)(Object.entries(encode).filter(([, value]) => (0, helper_1.defined)(value)), (values) => values.map(([key, options]) => (Object.assign({ name: key }, options))), ([key]) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const prefix = (_a = /([^\d]+)\d*$/.exec(key)) === null || _a === void 0 ? void 0 : _a[1];
|
|
45
|
+
const descriptor = channelDescriptors.find((d) => d.name === prefix);
|
|
46
|
+
if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.independent)
|
|
47
|
+
return key;
|
|
48
|
+
return prefix;
|
|
49
|
+
});
|
|
50
|
+
// Check required channels and initialize scale options for each channel.
|
|
44
51
|
const channels = channelDescriptors
|
|
45
52
|
.filter((descriptor) => {
|
|
46
53
|
const { name, required } = descriptor;
|
|
47
|
-
if (
|
|
54
|
+
if (nameChannels.find(([d]) => d === name))
|
|
48
55
|
return true;
|
|
49
56
|
if (required)
|
|
50
57
|
throw new Error(`Missing encoding for channel: ${name}.`);
|
|
51
58
|
return false;
|
|
52
59
|
})
|
|
53
60
|
.flatMap((descriptor) => {
|
|
54
|
-
const { name } = descriptor;
|
|
55
|
-
const
|
|
56
|
-
return
|
|
61
|
+
const { name, scale: scaleType, scaleKey, range } = descriptor;
|
|
62
|
+
const valuesArray = nameChannels.filter(([channel]) => channel.startsWith(name));
|
|
63
|
+
return valuesArray.map(([channel, values], i) => {
|
|
64
|
+
const visual = values.some((d) => d.visual);
|
|
65
|
+
const _a = scale[channel] || {}, { independent = false,
|
|
66
|
+
// Use channel name as default scale key.
|
|
67
|
+
key = scaleKey || channel,
|
|
68
|
+
// Visual channel use identity scale.
|
|
69
|
+
type = visual ? 'identity' : scaleType } = _a, scaleOptions = __rest(_a, ["independent", "key", "type"]);
|
|
70
|
+
return {
|
|
71
|
+
name: channel,
|
|
72
|
+
values,
|
|
73
|
+
// Generate a unique key for independent channel,
|
|
74
|
+
// which will not group with any other channels.
|
|
75
|
+
scaleKey: independent ? Symbol('independent') : key,
|
|
76
|
+
scale: Object.assign({ type,
|
|
77
|
+
range }, scaleOptions),
|
|
78
|
+
};
|
|
79
|
+
});
|
|
57
80
|
});
|
|
58
|
-
|
|
59
|
-
const scale = {};
|
|
60
|
-
const { coordinate = [] } = options;
|
|
61
|
-
const scaleChannels = (0, d3_array_1.group)(channels, (d) => d.scaleName);
|
|
62
|
-
for (const [scaleName, channels] of scaleChannels.entries()) {
|
|
63
|
-
const { shapes } = partialProps;
|
|
64
|
-
const channel = mergeChannel(channels);
|
|
65
|
-
const { [scaleName]: scaleOptions = {} } = partialScale;
|
|
66
|
-
scale[scaleName] = (0, scale_1.inferScale)(channel, scaleOptions, coordinate, shapes, theme, channelScale, library);
|
|
67
|
-
}
|
|
68
|
-
const mark = Object.assign(Object.assign({}, transformedMark), { scale });
|
|
69
|
-
const state = Object.assign(Object.assign({}, partialProps), { channels, index: I });
|
|
70
|
-
return [mark, state];
|
|
81
|
+
return [transformedMark, Object.assign(Object.assign({}, partialProps), { index: I, channels })];
|
|
71
82
|
});
|
|
72
83
|
}
|
|
73
84
|
exports.initializeMark = initializeMark;
|
|
@@ -96,6 +107,7 @@ function applyMarkTransform(mark, props, context) {
|
|
|
96
107
|
transform_1.maybeVisualChannel,
|
|
97
108
|
transform_1.extractColumns,
|
|
98
109
|
transform_1.maybeArrayField,
|
|
110
|
+
transform_1.maybeNonAnimate,
|
|
99
111
|
transform_1.addGuideToScale,
|
|
100
112
|
...preInference.map(useTransform),
|
|
101
113
|
...transform.map(useTransform),
|
|
@@ -109,22 +121,6 @@ function applyMarkTransform(mark, props, context) {
|
|
|
109
121
|
return [index, transformedMark];
|
|
110
122
|
});
|
|
111
123
|
}
|
|
112
|
-
function createChannel(descriptor, nameEncode) {
|
|
113
|
-
const { independent = false, name, scaleName } = descriptor, rest = __rest(descriptor, ["independent", "name", "scaleName"]);
|
|
114
|
-
const [encodeName, encode] = nameEncode;
|
|
115
|
-
return Object.assign(Object.assign(Object.assign({}, rest), encode), { name: encodeName, scaleName: scaleName !== null && scaleName !== void 0 ? scaleName : (independent ? encodeName : name) });
|
|
116
|
-
}
|
|
117
|
-
function mergeChannel(channels) {
|
|
118
|
-
const target = {};
|
|
119
|
-
for (const source of channels) {
|
|
120
|
-
const { value: targetValue = [] } = target;
|
|
121
|
-
const { value: sourceValue = [] } = source;
|
|
122
|
-
Object.assign(target, source);
|
|
123
|
-
target.value = [...targetValue, ...sourceValue];
|
|
124
|
-
}
|
|
125
|
-
target.field = (0, array_1.unique)(channels.flatMap((d) => d.field).filter(helper_1.defined));
|
|
126
|
-
return target;
|
|
127
|
-
}
|
|
128
124
|
function fieldOf(encode) {
|
|
129
125
|
const { type, value } = encode;
|
|
130
126
|
if (type === 'field' && typeof value === 'string')
|
package/lib/runtime/mark.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mark.js","sourceRoot":"src/","sources":["runtime/mark.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"mark.js","sourceRoot":"src/","sources":["runtime/mark.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAmC;AACnC,4CAA0C;AAC1C,uCAAuC;AAgBvC,2CAUqB;AAErB,SAAsB,cAAc,CAClC,WAAmB,EACnB,YAAuB,EACvB,OAAkB;;QAElB,iEAAiE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