@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
|
@@ -13,18 +13,20 @@ const MaybeTooltip = (options) => {
|
|
|
13
13
|
const { tooltip } = encode;
|
|
14
14
|
if (tooltip !== undefined)
|
|
15
15
|
return [I, mark];
|
|
16
|
-
const
|
|
16
|
+
const channels = Array.isArray(channel) ? channel : [channel];
|
|
17
|
+
let index = 0;
|
|
18
|
+
const entries = channels.flatMap((channel) => Object.entries(encode)
|
|
17
19
|
.filter(([key]) => key.startsWith(channel))
|
|
18
20
|
.flatMap(([key]) => {
|
|
19
|
-
const match = new RegExp(`${channel}(\\d*)`).exec(key);
|
|
20
|
-
const index = match[1];
|
|
21
21
|
const [V, fv] = (0, helper_1.columnOf)(encode, key);
|
|
22
22
|
const E = [[key, (0, helper_1.column)(V)]];
|
|
23
|
+
// Only show channel with field.
|
|
23
24
|
if (V && fv !== null) {
|
|
24
|
-
E.push([`tooltip${index}`, (0, helper_1.column)(V, fv)]);
|
|
25
|
+
E.push([`tooltip${index === 0 ? '' : index}`, (0, helper_1.column)(V, fv)]);
|
|
26
|
+
index++;
|
|
25
27
|
}
|
|
26
28
|
return E;
|
|
27
|
-
});
|
|
29
|
+
}));
|
|
28
30
|
return [I, (0, util_1.deepMix)({}, mark, { encode: Object.fromEntries(entries) })];
|
|
29
31
|
};
|
|
30
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybeTooltip.js","sourceRoot":"src/","sources":["transform/maybeTooltip.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAkD;AAMlD;;GAEG;AACI,MAAM,YAAY,GAA4B,CAAC,OAAO,EAAE,EAAE;IAC/D,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QACjB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACxB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,IAAI,OAAO,KAAK,SAAS;YAAE,OAA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AC,CAAC,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,IAAA,eAAM,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC9D,KAAK,EAAE,CAAC;aACT;YACD,OAAO,CAAC,CAAC;QACX,CAAC,CAAC,CACL,CAAC;QACF,OAAO,CAAC,CAAC,EAAE,IAAA,cAAO,EAAC,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,YAAY,gBAwBvB;AAEF,oBAAY,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MaybeTuple = void 0;
|
|
4
|
+
const util_1 = require("@antv/util");
|
|
5
|
+
const helper_1 = require("./utils/helper");
|
|
6
|
+
/**
|
|
7
|
+
* Add 3 constant encode for size channel.
|
|
8
|
+
* This is useful for point geometry.
|
|
9
|
+
*/
|
|
10
|
+
const MaybeTuple = () => {
|
|
11
|
+
return (I, mark) => {
|
|
12
|
+
const { data } = mark;
|
|
13
|
+
if (!Array.isArray(data) || data.some(helper_1.isObject))
|
|
14
|
+
return [I, mark];
|
|
15
|
+
const position = Array.isArray(data[0]) ? data : [data];
|
|
16
|
+
const X = position.map((d) => d[0]);
|
|
17
|
+
const Y = position.map((d) => d[1]);
|
|
18
|
+
return [I, (0, util_1.deepMix)({}, mark, { encode: { x: (0, helper_1.column)(X), y: (0, helper_1.column)(Y) } })];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.MaybeTuple = MaybeTuple;
|
|
22
|
+
exports.MaybeTuple.props = {};
|
|
23
|
+
//# sourceMappingURL=maybeTuple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maybeTuple.js","sourceRoot":"src/","sources":["transform/maybeTuple.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAkD;AAIlD;;;GAGG;AACI,MAAM,UAAU,GAA0B,GAAG,EAAE;IACpD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QACjB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,iBAAQ,CAAC;YAAE,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAClE,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACxD,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,OAAO,CAAC,CAAC,EAAE,IAAA,cAAO,EAAC,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,IAAA,eAAM,EAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAA,eAAM,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,UAAU,cASrB;AAEF,kBAAU,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -10,7 +10,7 @@ const helper_1 = require("./utils/helper");
|
|
|
10
10
|
const MaybeTupleX = () => {
|
|
11
11
|
return (I, mark) => {
|
|
12
12
|
const { data } = mark;
|
|
13
|
-
if (!Array.isArray(data) || data.some(
|
|
13
|
+
if (!Array.isArray(data) || data.some(helper_1.isObject))
|
|
14
14
|
return [I, mark];
|
|
15
15
|
return [I, (0, util_1.deepMix)({}, mark, { encode: { x: (0, helper_1.column)(data) } })];
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybeTupleX.js","sourceRoot":"src/","sources":["transform/maybeTupleX.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"maybeTupleX.js","sourceRoot":"src/","sources":["transform/maybeTupleX.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAkD;AAIlD;;;GAGG;AACI,MAAM,WAAW,GAA2B,GAAG,EAAE;IACtD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QACjB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,iBAAQ,CAAC;YAAE,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAClE,OAAO,CAAC,CAAC,EAAE,IAAA,cAAO,EAAC,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,IAAA,eAAM,EAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB;AAEF,mBAAW,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -10,7 +10,7 @@ const helper_1 = require("./utils/helper");
|
|
|
10
10
|
const MaybeTupleY = () => {
|
|
11
11
|
return (I, mark) => {
|
|
12
12
|
const { data } = mark;
|
|
13
|
-
if (!Array.isArray(data) || data.some(
|
|
13
|
+
if (!Array.isArray(data) || data.some(helper_1.isObject))
|
|
14
14
|
return [I, mark];
|
|
15
15
|
return [I, (0, util_1.deepMix)({}, mark, { encode: { y: (0, helper_1.column)(data) } })];
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybeTupleY.js","sourceRoot":"src/","sources":["transform/maybeTupleY.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"maybeTupleY.js","sourceRoot":"src/","sources":["transform/maybeTupleY.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAkD;AAIlD;;;GAGG;AACI,MAAM,WAAW,GAA2B,GAAG,EAAE;IACtD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QACjB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,iBAAQ,CAAC;YAAE,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAClE,OAAO,CAAC,CAAC,EAAE,IAAA,cAAO,EAAC,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,IAAA,eAAM,EAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB;AAEF,mBAAW,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformComponent as TC } from '../runtime';
|
|
2
|
+
export type MaybeVisualPositionOptions = Record<string, never>;
|
|
3
|
+
/**
|
|
4
|
+
* Set visual position with style.x and style.y.
|
|
5
|
+
* The priority of style.x, style.y is higher than data.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MaybeVisualPosition: TC<MaybeVisualPositionOptions>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.MaybeVisualPosition = void 0;
|
|
15
|
+
const util_1 = require("@antv/util");
|
|
16
|
+
const helper_1 = require("./utils/helper");
|
|
17
|
+
/**
|
|
18
|
+
* Set visual position with style.x and style.y.
|
|
19
|
+
* The priority of style.x, style.y is higher than data.
|
|
20
|
+
*/
|
|
21
|
+
const MaybeVisualPosition = () => {
|
|
22
|
+
return (I, mark) => {
|
|
23
|
+
const { data, style = {} } = mark, restMark = __rest(mark, ["data", "style"]);
|
|
24
|
+
const { x: x0, y: y0 } = style, rest = __rest(style, ["x", "y"]);
|
|
25
|
+
if (x0 == undefined || y0 == undefined)
|
|
26
|
+
return [I, mark];
|
|
27
|
+
const x = x0 || 0;
|
|
28
|
+
const y = y0 || 0;
|
|
29
|
+
return [
|
|
30
|
+
[0],
|
|
31
|
+
(0, util_1.deepMix)({}, restMark, {
|
|
32
|
+
data: [0],
|
|
33
|
+
cartesian: true,
|
|
34
|
+
encode: {
|
|
35
|
+
x: (0, helper_1.column)([x]),
|
|
36
|
+
y: (0, helper_1.column)([y]),
|
|
37
|
+
},
|
|
38
|
+
scale: {
|
|
39
|
+
x: { type: 'identity', independent: true, guide: null },
|
|
40
|
+
y: { type: 'identity', independent: true, guide: null }, // hide axis
|
|
41
|
+
},
|
|
42
|
+
style: rest,
|
|
43
|
+
}),
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
exports.MaybeVisualPosition = MaybeVisualPosition;
|
|
48
|
+
exports.MaybeVisualPosition.props = {};
|
|
49
|
+
//# sourceMappingURL=maybeVisualPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maybeVisualPosition.js","sourceRoot":"src/","sources":["transform/maybeVisualPosition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAqC;AAErC,2CAAwC;AAIxC;;;GAGG;AACI,MAAM,mBAAmB,GAAmC,GAAG,EAAE;IACtE,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QACjB,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,KAAkB,IAAI,EAAjB,QAAQ,UAAK,IAAI,EAAxC,iBAAiC,CAAO,CAAC;QAC/C,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAjC,UAAyB,CAAQ,CAAC;QACxC,IAAI,EAAE,IAAI,SAAS,IAAI,EAAE,IAAI,SAAS;YAAE,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACzD,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClB,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClB,OAAO;YACL,CAAC,CAAC,CAAC;YACH,IAAA,cAAO,EAAC,EAAE,EAAE,QAAQ,EAAE;gBACpB,IAAI,EAAE,CAAC,CAAC,CAAC;gBACT,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE;oBACN,CAAC,EAAE,IAAA,eAAM,EAAC,CAAC,CAAC,CAAC,CAAC;oBACd,CAAC,EAAE,IAAA,eAAM,EAAC,CAAC,CAAC,CAAC,CAAC;iBACf;gBACD,KAAK,EAAE;oBACL,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBACvD,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,YAAY;iBACtE;gBACD,KAAK,EAAE,IAAI;aACZ,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,mBAAmB,uBAwB9B;AAEF,2BAAmB,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { NormalizeYTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type NormalizeYOptions = Omit<NormalizeYTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Group marks into series by specified channels, and then transform
|
|
6
6
|
* each series's value, say to transform them relative to some basis
|
package/lib/transform/pack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
|
-
export
|
|
2
|
+
export type PackOptions = Record<string, unknown>;
|
|
3
3
|
/**
|
|
4
4
|
* Uniform pack to avid overlap.
|
|
5
5
|
* @todo Improve or change algorithm to increase space usage.
|
package/lib/transform/sort.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { SortColorTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type SortColorOptions = Omit<SortColorTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Sort domain of x scale of mark groups by groups.
|
|
6
6
|
*/
|
package/lib/transform/sortX.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { SortXTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type SortXOptions = Omit<SortXTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Sort domain of x scale of mark groups by groups.
|
|
6
6
|
*/
|
package/lib/transform/sortY.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { SortYTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type SortYOptions = Omit<SortYTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Sort domain of x scale of mark groups by groups.
|
|
6
6
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { StackEnterTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type StackEnterOptions = Omit<StackEnterTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Group marks by channels into groups and stacking their enterDelay
|
|
6
6
|
* to make marks show up groups by groups.
|
|
7
7
|
* It will update enterDelay channel for each mark by its enterDuration and group.
|
|
8
|
+
* @todo Support orderBy.
|
|
8
9
|
* @todo Sort among groups(e.g. reverse).
|
|
9
10
|
* @todo Stack enter in groups rather than between groups?
|
|
10
11
|
* @todo Auto inter this statistic for scaleInY animation in stacked interval?
|
|
@@ -8,20 +8,19 @@ const helper_1 = require("./utils/helper");
|
|
|
8
8
|
* Group marks by channels into groups and stacking their enterDelay
|
|
9
9
|
* to make marks show up groups by groups.
|
|
10
10
|
* It will update enterDelay channel for each mark by its enterDuration and group.
|
|
11
|
+
* @todo Support orderBy.
|
|
11
12
|
* @todo Sort among groups(e.g. reverse).
|
|
12
13
|
* @todo Stack enter in groups rather than between groups?
|
|
13
14
|
* @todo Auto inter this statistic for scaleInY animation in stacked interval?
|
|
14
15
|
* @todo All the groups shared the enterDuration?
|
|
15
16
|
*/
|
|
16
17
|
const StackEnter = (options) => {
|
|
17
|
-
const {
|
|
18
|
+
const { groupBy = ['x'], reducer = (I, V) => V[I[0]], orderBy = null, reverse = false, duration, } = options;
|
|
18
19
|
return (I, mark) => {
|
|
19
20
|
const { encode } = mark;
|
|
20
|
-
const { enterDuration } = encode;
|
|
21
|
-
if (enterDuration === undefined)
|
|
22
|
-
return [I, mark];
|
|
23
21
|
// Extract group information by each specified channel,
|
|
24
22
|
// and skip if all values of channels are empty.
|
|
23
|
+
const by = Array.isArray(groupBy) ? groupBy : [groupBy];
|
|
25
24
|
const groupEntries = by.map((k) => [k, (0, helper_1.columnOf)(encode, k)[0]]);
|
|
26
25
|
if (groupEntries.length === 0)
|
|
27
26
|
return [I, mark];
|
|
@@ -39,8 +38,19 @@ const StackEnter = (options) => {
|
|
|
39
38
|
}
|
|
40
39
|
groups = newGroups;
|
|
41
40
|
}
|
|
41
|
+
// const {color} = encode;
|
|
42
|
+
if (orderBy) {
|
|
43
|
+
const [V] = (0, helper_1.columnOf)(encode, orderBy);
|
|
44
|
+
if (V)
|
|
45
|
+
groups.sort((I, J) => reducer(I, V) - reducer(J, V));
|
|
46
|
+
if (reverse)
|
|
47
|
+
groups.reverse();
|
|
48
|
+
}
|
|
42
49
|
// Stack delay for each group.
|
|
43
|
-
const
|
|
50
|
+
const t = (duration || 3000) / groups.length;
|
|
51
|
+
const [ED] = duration
|
|
52
|
+
? [(0, helper_1.constant)(I, t)] // If specified duration, generate enter duration for each.
|
|
53
|
+
: (0, helper_1.maybeColumnOf)(encode, 'enterDuration', (0, helper_1.constant)(I, t));
|
|
44
54
|
const [EDL] = (0, helper_1.maybeColumnOf)(encode, 'enterDelay', (0, helper_1.constant)(I, 0));
|
|
45
55
|
const newEnterDelay = new Array(I.length);
|
|
46
56
|
for (let i = 0, pd = 0; i < groups.length; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackEnter.js","sourceRoot":"src/","sources":["transform/stackEnter.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACrC,uCAAsC;AAGtC,2CAKwB;AAIxB
|
|
1
|
+
{"version":3,"file":"stackEnter.js","sourceRoot":"src/","sources":["transform/stackEnter.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACrC,uCA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AAC,CAAC,CAAC;YACpB,MAAM,WAAW,GAAG,IAAA,cAAG,EAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1C,KAAK,MAAM,CAAC,IAAI,CAAC;gBAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACnD,EAAE,IAAI,WAAW,CAAC;SACnB;QAED,OAAO;YACL,CAAC;YACD,IAAA,cAAO,EAAC,EAAE,EAAE,IAAI,EAAE;gBAChB,MAAM,EAAE;oBACN,aAAa,EAAE,IAAA,qBAAY,EAAC,EAAE,CAAC;oBAC/B,UAAU,EAAE,IAAA,qBAAY,EAAC,aAAa,CAAC;iBACxC;aACF,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AA/DW,QAAA,UAAU,cA+DrB;AAEF,kBAAU,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { StackYTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type StackYOptions = Omit<StackYTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* The stack transform group marks into series by color channel,
|
|
6
6
|
* and then produce new y channel for each series by specified order,
|
package/lib/transform/stackY.js
CHANGED
|
@@ -10,9 +10,9 @@ const order_1 = require("./utils/order");
|
|
|
10
10
|
* say to form vertical "stacks" by specified channels.
|
|
11
11
|
*/
|
|
12
12
|
const StackY = (options = {}) => {
|
|
13
|
-
const { groupBy = 'x', orderBy = null, reverse = false, y:
|
|
13
|
+
const { groupBy = 'x', orderBy = null, reverse = false, y: fromY = 'y', y1: fromY1 = 'y1', series = true, } = options;
|
|
14
14
|
return (I, mark) => {
|
|
15
|
-
const { data, encode } = mark;
|
|
15
|
+
const { data, encode, style = {} } = mark;
|
|
16
16
|
const [Y, fy] = (0, helper_1.columnOf)(encode, 'y');
|
|
17
17
|
const [Y1, fy1] = (0, helper_1.columnOf)(encode, 'y1');
|
|
18
18
|
const [S] = series
|
|
@@ -28,6 +28,8 @@ const StackY = (options = {}) => {
|
|
|
28
28
|
const newY = new Array(I.length);
|
|
29
29
|
const newY1 = new Array(I.length);
|
|
30
30
|
const TY = new Array(I.length);
|
|
31
|
+
const F = [];
|
|
32
|
+
const L = [];
|
|
31
33
|
for (const G of groups) {
|
|
32
34
|
if (reverse)
|
|
33
35
|
G.reverse();
|
|
@@ -43,6 +45,19 @@ const StackY = (options = {}) => {
|
|
|
43
45
|
else if (y >= 0)
|
|
44
46
|
PG.push(i);
|
|
45
47
|
}
|
|
48
|
+
// Store the first and last layer.
|
|
49
|
+
const FG = PG.length > 0 ? PG : NG;
|
|
50
|
+
const LG = NG.length > 0 ? NG : PG;
|
|
51
|
+
let i = PG.length - 1;
|
|
52
|
+
let j = 0;
|
|
53
|
+
// Find the last non-zero index.
|
|
54
|
+
while (i > 0 && Y[FG[i]] === 0)
|
|
55
|
+
i--;
|
|
56
|
+
// Find the first non-zero index.
|
|
57
|
+
while (j < LG.length - 1 && Y[LG[j]] === 0)
|
|
58
|
+
j++;
|
|
59
|
+
F.push(FG[i]);
|
|
60
|
+
L.push(LG[j]);
|
|
46
61
|
// Stack negative y in reverse order.
|
|
47
62
|
let ny = start;
|
|
48
63
|
for (const i of NG.reverse()) {
|
|
@@ -59,15 +74,21 @@ const StackY = (options = {}) => {
|
|
|
59
74
|
newY[i] = newY1[i] = py;
|
|
60
75
|
}
|
|
61
76
|
}
|
|
77
|
+
// Only set top radius for the first layer,
|
|
78
|
+
// and set bottom radius for the last layer.
|
|
79
|
+
const FS = new Set(F);
|
|
80
|
+
const LS = new Set(L);
|
|
62
81
|
// Choose new y or y1 channel as the new y channel.
|
|
63
|
-
const V =
|
|
82
|
+
const V = fromY === 'y' ? newY : newY1;
|
|
83
|
+
const V1 = fromY1 === 'y' ? newY : newY1;
|
|
64
84
|
return [
|
|
65
85
|
I,
|
|
66
86
|
(0, util_1.deepMix)({}, mark, {
|
|
67
87
|
encode: {
|
|
68
88
|
y: (0, helper_1.column)(V, fy),
|
|
69
|
-
y1: (0, helper_1.column)(
|
|
89
|
+
y1: (0, helper_1.column)(V1, fy1),
|
|
70
90
|
},
|
|
91
|
+
style: Object.assign({ first: (_, i) => FS.has(i), last: (_, i) => LS.has(i) }, style),
|
|
71
92
|
}),
|
|
72
93
|
];
|
|
73
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackY.js","sourceRoot":"src/","sources":["transform/stackY.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAGrC,2CAAiE;AACjE,yCAA8E;AAI9E;;;;GAIG;AACI,MAAM,MAAM,GAAsB,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE;IACxD,MAAM,EACJ,OAAO,GAAG,GAAG,EACb,OAAO,GAAG,IAAI,EACd,OAAO,GAAG,KAAK,EACf,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"stackY.js","sourceRoot":"src/","sources":["transform/stackY.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAGrC,2CAAiE;AACjE,yCAA8E;AAI9E;;;;GAIG;AACI,MAAM,MAAM,GAAsB,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE;IACxD,MAAM,EACJ,OAAO,GAAG,GAAG,EACb,OAAO,GAAG,IAAI,EACd,OAAO,GAAG,KAAK,EACf,CAAC,EAAE,KAAK,GAAG,GAAG,EACd,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,MAAM,GAAG,IAAI,GACd,GAAG,OAAO,CAAC;IACZ,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QACjB,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;QAC1C,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAA,iBAAQ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C,EAC1B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IACtB,KAAK,CACT;aACF,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AA9FW,QAAA,MAAM,UA8FjB;AAEF,cAAM,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformComponent as TC } from '../runtime';
|
|
2
2
|
import { SymmetryYTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type SymmetryYOptions = Omit<SymmetryYTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* The SymmetryY transform apply offset for y channels, say to transform
|
|
6
6
|
* them to be symmetry.
|
|
@@ -13,3 +13,4 @@ export declare function visualColumn(value: Primitive[], field?: string): {
|
|
|
13
13
|
export declare function constant(I: number[], value: any): any[];
|
|
14
14
|
export declare function columnOf(encode: any, key: string): [Primitive[], string];
|
|
15
15
|
export declare function maybeColumnOf(encode: any, ...K: (string | Primitive[])[]): [Primitive[], string];
|
|
16
|
+
export declare function isObject(d: any): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.maybeColumnOf = exports.columnOf = exports.constant = exports.visualColumn = exports.column = void 0;
|
|
3
|
+
exports.isObject = exports.maybeColumnOf = exports.columnOf = exports.constant = exports.visualColumn = exports.column = void 0;
|
|
4
4
|
function column(value, field) {
|
|
5
5
|
if (value === null)
|
|
6
6
|
return undefined;
|
|
@@ -14,7 +14,10 @@ function visualColumn(value, field) {
|
|
|
14
14
|
}
|
|
15
15
|
exports.visualColumn = visualColumn;
|
|
16
16
|
function constant(I, value) {
|
|
17
|
-
|
|
17
|
+
const array = [];
|
|
18
|
+
for (const i of I)
|
|
19
|
+
array[i] = value;
|
|
20
|
+
return array;
|
|
18
21
|
}
|
|
19
22
|
exports.constant = constant;
|
|
20
23
|
function columnOf(encode, key) {
|
|
@@ -39,4 +42,10 @@ function maybeColumnOf(encode, ...K) {
|
|
|
39
42
|
return [null, null];
|
|
40
43
|
}
|
|
41
44
|
exports.maybeColumnOf = maybeColumnOf;
|
|
45
|
+
function isObject(d) {
|
|
46
|
+
if (d instanceof Date)
|
|
47
|
+
return false;
|
|
48
|
+
return typeof d === 'object';
|
|
49
|
+
}
|
|
50
|
+
exports.isObject = isObject;
|
|
42
51
|
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"src/","sources":["transform/utils/helper.ts"],"names":[],"mappings":";;;AAEA,SAAgB,MAAM,CAAC,KAAkB,EAAE,KAAc;IACvD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1C,CAAC;AAHD,wBAGC;AAED,SAAgB,YAAY,CAAC,KAAkB,EAAE,KAAc;IAC7D,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACxD,CAAC;AAHD,oCAGC;AAED,SAAgB,QAAQ,CAAC,CAAW,EAAE,KAAU;IAC9C,
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"src/","sources":["transform/utils/helper.ts"],"names":[],"mappings":";;;AAEA,SAAgB,MAAM,CAAC,KAAkB,EAAE,KAAc;IACvD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1C,CAAC;AAHD,wBAGC;AAED,SAAgB,YAAY,CAAC,KAAkB,EAAE,KA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O,KAAK,CAAC;IACpC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC;AAC/B,CAAC;AAHD,4BAGC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Primitive } from 'd3-array';
|
|
2
2
|
import { TabularData, G2Mark } from '../../runtime';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type IndexComparatorFactory = (data: TabularData, Y: Primitive[], S: Primitive[]) => IndexComparator;
|
|
4
|
+
export type IndexComparator = (i: number, j: number) => number;
|
|
5
|
+
export type Order = 'value' | 'sum' | 'series' | 'maxIndex' | string[] | ((data: Record<string, Primitive>) => Primitive);
|
|
6
6
|
export declare function createGroups(groupBy: string | string[], I: number[], mark: G2Mark): number[][];
|
|
7
7
|
export declare function normalizeComparator(order: Order): IndexComparatorFactory;
|
|
8
8
|
export declare function applyOrder(groups: number[][], comparator: IndexComparator): void;
|
|
@@ -7,6 +7,8 @@ const array_1 = require("../../utils/array");
|
|
|
7
7
|
const helper_2 = require("./helper");
|
|
8
8
|
function createGroups(groupBy, I, mark) {
|
|
9
9
|
const { encode } = mark;
|
|
10
|
+
if (groupBy === null)
|
|
11
|
+
return [I];
|
|
10
12
|
const G = normalizeGroupBy(groupBy)
|
|
11
13
|
.map((k) => { var _a; return [k, (_a = (0, helper_2.columnOf)(encode, k)) === null || _a === void 0 ? void 0 : _a[0]]; })
|
|
12
14
|
.filter(([, column]) => (0, helper_1.defined)(column));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"src/","sources":["transform/utils/order.ts"],"names":[],"mappings":";;;AAAA,uCAAiE;AACjE,+CAA6C;AAE7C,6CAA4C;AAC5C,qCAAoC;AAkBpC,SAAgB,YAAY,CAC1B,OAA0B,EAC1B,CAAW,EACX,IAAY;IAEZ,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC;SACh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AAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAyB;IACpD,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/lib/utils/coordinate.js
CHANGED
|
@@ -16,7 +16,9 @@ function isPolar(coordinate) {
|
|
|
16
16
|
exports.isPolar = isPolar;
|
|
17
17
|
function isRadial(coordinate) {
|
|
18
18
|
const { transformations } = coordinate.getOptions();
|
|
19
|
-
return (
|
|
19
|
+
return (
|
|
20
|
+
// distinguish radial from theta.
|
|
21
|
+
transformations.some(([type]) => type === 'reflect') &&
|
|
20
22
|
transformations.some(([type]) => type.startsWith('transpose')));
|
|
21
23
|
}
|
|
22
24
|
exports.isRadial = isRadial;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate.js","sourceRoot":"src/","sources":["utils/coordinate.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,UAAsB;IAChD,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,MAAM,UAAU,GAAG,eAAe;SAC/B,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;SACrB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAND,kCAMC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,OAA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UAAsB;IAC5C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;AAC5D,CAAC;AAHD,0BAGC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AAC/D,CAAC;AAHD,gCAGC;AAED,SAAgB,SAAS,CAAC,UAAsB;IAC9C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAC9D,CAAC;AAHD,8BAGC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;AACpD,CAAC;AAFD,gCAEC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC;AACxD,CAAC;AAFD,0BAEC"}
|
package/lib/utils/helper.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { DisplayObject } from '@antv/g';
|
|
2
2
|
export declare function identity<T>(x: T): T;
|
|
3
|
+
type Func<R> = (x: R, ...args: any[]) => R;
|
|
3
4
|
/**
|
|
4
|
-
* Composes
|
|
5
|
+
* Composes functions from left to right.
|
|
5
6
|
*/
|
|
6
|
-
export declare function compose<R>(fns:
|
|
7
|
+
export declare function compose<R>(fns: Func<R>[]): Func<R>;
|
|
7
8
|
/**
|
|
8
9
|
* Composes single-argument async functions from left to right.
|
|
9
10
|
*/
|
|
@@ -17,3 +18,5 @@ export declare function useMemo<T = unknown, U = unknown>(compute: (key: T) => U
|
|
|
17
18
|
export declare function appendTransform(node: DisplayObject, transform: any): void;
|
|
18
19
|
export declare function subObject(obj: Record<string, any>, prefix: string): Record<string, any>;
|
|
19
20
|
export declare function maybeSubObject(obj: Record<string, any>, prefix: string): Record<string, any>;
|
|
21
|
+
export declare function maybePercentage(x: number | string, size: number): number;
|
|
22
|
+
export {};
|