@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
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.renderLink = exports.createValueof = exports.useState = exports.createDatumof = exports.createXKey = exports.createColorKey = exports.
|
|
14
|
+
exports.renderLink = exports.createValueof = exports.useState = exports.createDatumof = exports.createXKey = exports.createColorKey = exports.applyDefaultsHighlightedStyle = exports.mousePosition = exports.selectPlotArea = exports.selectG2Elements = void 0;
|
|
15
15
|
const g_1 = require("@antv/g");
|
|
16
16
|
const d3_path_1 = require("d3-path");
|
|
17
17
|
const helper_1 = require("../../utils/helper");
|
|
@@ -40,13 +40,13 @@ function mousePosition(target, event) {
|
|
|
40
40
|
return [offsetX - x, offsetY - y];
|
|
41
41
|
}
|
|
42
42
|
exports.mousePosition = mousePosition;
|
|
43
|
-
function
|
|
43
|
+
function applyDefaultsHighlightedStyle(style) {
|
|
44
44
|
if (!style || Object.keys(style).length === 0) {
|
|
45
|
-
return {
|
|
45
|
+
return { highlightedLineWidth: 1, highlightedStroke: '#000' };
|
|
46
46
|
}
|
|
47
47
|
return style;
|
|
48
48
|
}
|
|
49
|
-
exports.
|
|
49
|
+
exports.applyDefaultsHighlightedStyle = applyDefaultsHighlightedStyle;
|
|
50
50
|
function createColorKey(view) {
|
|
51
51
|
return (element) => element.__data__.color;
|
|
52
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"src/","sources":["interaction/native/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+BAA8C;AAC9C,qCAAyC;AACzC,+CAA+C;AAC/C,qDAA+C;AAC/C,6CAA8C;AAC9C,2CAIuB;AAEvB;;GAEG;AACH,SAAgB,gBAAgB,CAAC,IAAmB;IAClD,OAAO,IAAA,kBAAM,EAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,4BAAkB,EAAE,CA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AE,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AACnC,CAAC;AAhDD,gCAgDC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DisplayObject } from '@antv/g';
|
|
2
2
|
import { G2BaseComponent, G2ViewDescriptor, G2ViewTree, G2ViewInstance } from '../runtime';
|
|
3
3
|
import { Selection } from '../utils/selection';
|
|
4
|
-
export
|
|
4
|
+
export type InteractionDescriptor = {
|
|
5
5
|
interactors?: InteractorOptions[];
|
|
6
6
|
start?: InteractionStep[];
|
|
7
7
|
end?: InteractionStep[];
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type InteractionStep = {
|
|
10
10
|
trigger: string;
|
|
11
11
|
action: ActionOptions | ActionOptions[];
|
|
12
12
|
isEnable?: (InteractionContext: any) => boolean;
|
|
@@ -16,15 +16,15 @@ export declare type InteractionStep = {
|
|
|
16
16
|
trailing: boolean;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type InteractorOptions = {
|
|
20
20
|
type: string | InteractorComponent;
|
|
21
21
|
[key: string]: any;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type ActionOptions = {
|
|
24
24
|
type: string | ActionComponent;
|
|
25
25
|
[key: string]: any;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type InteractionContext = {
|
|
28
28
|
event?: G2Event;
|
|
29
29
|
options?: G2ViewTree;
|
|
30
30
|
update?: G2ViewInstance['update'];
|
|
@@ -34,24 +34,24 @@ export declare type InteractionContext = {
|
|
|
34
34
|
transientLayer?: Selection;
|
|
35
35
|
viewDescriptors?: G2ViewInstance[];
|
|
36
36
|
} & G2ViewDescriptor;
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
37
|
+
export type Action = (options: InteractionContext) => InteractionContext;
|
|
38
|
+
export type ActionComponent<O = Record<string, unknown>> = G2BaseComponent<Action, O>;
|
|
39
|
+
export type InteractorAction = {
|
|
40
40
|
action?: string;
|
|
41
41
|
events: string[];
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type Interactor = {
|
|
44
44
|
actions?: InteractorAction[];
|
|
45
45
|
};
|
|
46
|
-
export
|
|
47
|
-
export
|
|
46
|
+
export type InteractorComponent<O = Record<string, unknown>> = G2BaseComponent<Interactor, O>;
|
|
47
|
+
export type G2Event = Omit<Event, 'target'> & {
|
|
48
48
|
target: DisplayObject;
|
|
49
49
|
currentTarget: DisplayObject;
|
|
50
50
|
offsetY: number;
|
|
51
51
|
offsetX: number;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
53
|
+
export type InteractionNamespaces = 'action' | 'interactor';
|
|
54
|
+
export type InteractionLibrary = Record<`${InteractionNamespaces}.${string}`, G2BaseComponent>;
|
|
55
|
+
export type InteractionComponent = ActionComponent | InteractorComponent;
|
|
56
|
+
export type InteractionOptions = InteractorOptions | ActionOptions;
|
|
57
|
+
export type InteractionValue = Action | Interactor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DodgeYLabelTransform } from 'spec';
|
|
2
2
|
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
-
export
|
|
3
|
+
export type DodgeYOptions = Omit<DodgeYLabelTransform, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* An iterative dodge method avoids label overlap. (n * log(n))
|
|
6
6
|
*/
|
|
@@ -11,6 +11,14 @@ function useMap() {
|
|
|
11
11
|
const set = (key, value) => map.set(key, value);
|
|
12
12
|
return [get, set];
|
|
13
13
|
}
|
|
14
|
+
function getBoundsWithoutConnector(shape) {
|
|
15
|
+
const node = shape.cloneNode(true);
|
|
16
|
+
const connectorShape = node.getElementById('connector');
|
|
17
|
+
connectorShape && node.removeChild(connectorShape);
|
|
18
|
+
const { min, max } = node.getRenderBounds();
|
|
19
|
+
node.destroy();
|
|
20
|
+
return { min, max };
|
|
21
|
+
}
|
|
14
22
|
/**
|
|
15
23
|
* An iterative dodge method avoids label overlap. (n * log(n))
|
|
16
24
|
*/
|
|
@@ -26,7 +34,7 @@ const DodgeY = (options) => {
|
|
|
26
34
|
const [h, setH] = useMap();
|
|
27
35
|
const [xx, setXX] = useMap();
|
|
28
36
|
for (const label of labels) {
|
|
29
|
-
const { min, max } = label
|
|
37
|
+
const { min, max } = getBoundsWithoutConnector(label);
|
|
30
38
|
const [x0, y0] = min;
|
|
31
39
|
const [x1, y1] = max;
|
|
32
40
|
setY0(label, y0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dodgeY.js","sourceRoot":"src/","sources":["label-transform/dodgeY.ts"],"names":[],"mappings":";;;AACA,uCAAqC;AAIrC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,MAAM;IACb,MAAM,GAAG,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC5B,MAAM,GAAG,GAAG,CAAC,GAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,CAAC,GAAM,EAAE,KAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,EAAE,GAAG,CAAU,CAAC;AAC7B,CAAC;AAID;;GAEG;AACI,MAAM,MAAM,GAAuB,CAAC,OAAO,EAAE,EAAE;IACpD,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,GAAG,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC;IAC9D,OAAO,CAAC,MAAuB,EAAE,EAAE;QACjC,MAAM,C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,EAAE,QAAQ,CAAC,CAAC;wBAClC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC;wBACxB,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC;qBACzB;iBACF;aACF;YACD,IAAI,KAAK,GAAG,QAAQ;gBAAE,MAAM;SAC7B;QAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC1B,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;SACvC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,MAAM,UAqDjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LabelTransformComponent as LLC } from '../runtime';
|
|
2
2
|
import { HideOverlapLabelTransform } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type HideOverlapOptions = Omit<HideOverlapLabelTransform, 'type'>;
|
|
4
4
|
export declare const HideOverlap: LLC<HideOverlapOptions>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HideOverlap = void 0;
|
|
4
4
|
const path_util_1 = require("@antv/path-util");
|
|
5
|
+
const d3_array_1 = require("d3-array");
|
|
5
6
|
function getPoints(element) {
|
|
6
7
|
const { min, max } = element.getRenderBounds();
|
|
7
8
|
const [x0, y0] = min;
|
|
@@ -13,20 +14,29 @@ function getPoints(element) {
|
|
|
13
14
|
[x1, y0],
|
|
14
15
|
];
|
|
15
16
|
}
|
|
17
|
+
function priority(shape) {
|
|
18
|
+
return shape.style.priority || 0;
|
|
19
|
+
}
|
|
20
|
+
function show(shape) {
|
|
21
|
+
shape.style.visibility = 'visible';
|
|
22
|
+
}
|
|
23
|
+
function hide(shape) {
|
|
24
|
+
shape.style.visibility = 'hidden';
|
|
25
|
+
}
|
|
16
26
|
// @todo Support label shape with priority attribute.
|
|
17
27
|
const HideOverlap = () => {
|
|
18
|
-
return (labels) => {
|
|
28
|
+
return (labels, coordinate) => {
|
|
19
29
|
const displayLabels = [];
|
|
20
30
|
// Label with lower priority will be hidden when overlapped.
|
|
21
|
-
labels.sort((a, b) =>
|
|
31
|
+
labels.sort((a, b) => (0, d3_array_1.ascending)(priority(a), priority(b)));
|
|
22
32
|
for (let i = 0; i < labels.length; i++) {
|
|
23
33
|
const label = labels[i];
|
|
24
|
-
label
|
|
34
|
+
show(label);
|
|
25
35
|
let overlapping = false;
|
|
26
36
|
for (let j = 0; j < displayLabels.length; j++) {
|
|
27
37
|
const existedLabel = displayLabels[j];
|
|
28
38
|
if ((0, path_util_1.isPolygonsIntersect)(getPoints(label), getPoints(existedLabel))) {
|
|
29
|
-
label
|
|
39
|
+
hide(label);
|
|
30
40
|
overlapping = true;
|
|
31
41
|
break;
|
|
32
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hideOverlap.js","sourceRoot":"src/","sources":["label-transform/hideOverlap.ts"],"names":[],"mappings":";;;AACA,+CAAsD;
|
|
1
|
+
{"version":3,"file":"hideOverlap.js","sourceRoot":"src/","sources":["label-transform/hideOverlap.ts"],"names":[],"mappings":";;;AACA,+CAAsD;AACtD,uCAAqC;AAIrC,SAAS,SAAS,CAAC,OAAsB;IACvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAC/C,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACrB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACrB,OAAO;QACL,CAAC,EAAE,EAAE,EAAE,CAAC;QACR,CAAC,EAAE,EAAE,EAAE,CAAC;QACR,CAAC,EAAE,EAAE,EAAE,CAAC;QACR,CAAC,EAAE,EAAE,EAAE,CAAC;KACT,CAAC;AACJ,CAAC;AAID,SAAS,Q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CAAC,KAAK,CAAC,CAAC;aAC3B;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,WAAW,eA4BtB"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { HideOverlap } from './hideOverlap';
|
|
2
2
|
export { DodgeY } from './dodgeY';
|
|
3
|
+
export { Spider } from './spider';
|
|
4
|
+
export { Surround } from './surround';
|
|
3
5
|
export type { HideOverlapOptions } from './hideOverlap';
|
|
4
6
|
export type { DodgeYOptions } from './dodgeY';
|
|
7
|
+
export type { SpiderOptions } from './spider';
|
|
8
|
+
export type { SurroundOptions } from './surround';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DodgeY = exports.HideOverlap = void 0;
|
|
3
|
+
exports.Surround = exports.Spider = exports.DodgeY = exports.HideOverlap = void 0;
|
|
4
4
|
var hideOverlap_1 = require("./hideOverlap");
|
|
5
5
|
Object.defineProperty(exports, "HideOverlap", { enumerable: true, get: function () { return hideOverlap_1.HideOverlap; } });
|
|
6
6
|
var dodgeY_1 = require("./dodgeY");
|
|
7
7
|
Object.defineProperty(exports, "DodgeY", { enumerable: true, get: function () { return dodgeY_1.DodgeY; } });
|
|
8
|
+
var spider_1 = require("./spider");
|
|
9
|
+
Object.defineProperty(exports, "Spider", { enumerable: true, get: function () { return spider_1.Spider; } });
|
|
10
|
+
var surround_1 = require("./surround");
|
|
11
|
+
Object.defineProperty(exports, "Surround", { enumerable: true, get: function () { return surround_1.Surround; } });
|
|
8
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["label-transform/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["label-transform/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SpiderLabelTransform } from '../spec';
|
|
2
|
+
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
+
export type SpiderOptions = Omit<SpiderLabelTransform, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Spider: LLC<SpiderOptions>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Spider = void 0;
|
|
4
|
+
const coordinate_1 = require("../utils/coordinate");
|
|
5
|
+
const helper_1 = require("../utils/helper");
|
|
6
|
+
const vector_1 = require("../utils/vector");
|
|
7
|
+
/**
|
|
8
|
+
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
9
|
+
*/
|
|
10
|
+
const Spider = (options) => {
|
|
11
|
+
const { edgeDistance = 0 } = options;
|
|
12
|
+
return (labels, coordinate) => {
|
|
13
|
+
if (!(0, coordinate_1.isCircular)(coordinate))
|
|
14
|
+
return labels;
|
|
15
|
+
const { x: coordX, width } = coordinate.getOptions();
|
|
16
|
+
const center = coordinate.getCenter();
|
|
17
|
+
const margin = (0, helper_1.maybePercentage)(edgeDistance, width);
|
|
18
|
+
const edgeX = coordX + margin;
|
|
19
|
+
const edgeX1 = coordX + width - margin;
|
|
20
|
+
labels.forEach((label) => {
|
|
21
|
+
const { x: originX, x0, y0 } = label.style;
|
|
22
|
+
const dx = originX <= center[0] ? edgeX - originX : edgeX1 - originX;
|
|
23
|
+
label.style.x += dx;
|
|
24
|
+
const { x, y } = label.style;
|
|
25
|
+
const p0 = (0, vector_1.sub)([x0, y0], center);
|
|
26
|
+
const p1 = (0, vector_1.sub)([0, y], center);
|
|
27
|
+
const p1x = p0[1] ? (p0[0] * p1[1]) / p0[1] + center[0] : x;
|
|
28
|
+
label.style.connectorPoints = [[p1x - x, 0]];
|
|
29
|
+
});
|
|
30
|
+
return labels;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
exports.Spider = Spider;
|
|
34
|
+
//# sourceMappingURL=spider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spider.js","sourceRoot":"src/","sources":["label-transform/spider.ts"],"names":[],"mappings":";;;AAGA,oDAAiD;AACjD,4CAAkD;AAClD,4CAAsC;AAItC;;GAEG;AACI,MAAM,MAAM,GAAuB,CAAC,OAAO,EAAE,EAAE;IACpD,MAAM,EAAE,YAAY,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,MAAuB,EAAE,UAAU,EAAE,EAAE;QAC7C,IAAI,CAAC,IAAA,uBAAU,EAAC,UAAU,CAAC;YAAE,OAAO,MAAM,CAAC;QAE3C,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;QACrD,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,IAAA,wBAAe,EAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAEpD,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACvB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;YAC3C,MAAM,EAAE,GAAG,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,OAAO,CAAC;YACrE,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;YAEpB,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;YAC7B,MAAM,EAAE,GAAG,IAAA,YAAG,EAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;YACjC,MAAM,EAAE,GAAG,IAAA,YAAG,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YAC/B,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,KAAK,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,MAAM,UAwBjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SurroundLabelTransform } from '../spec';
|
|
2
|
+
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
+
export type SurroundOptions = Omit<SurroundLabelTransform, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Surround label transform is used to make labels surround circular.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Surround: LLC<SurroundOptions>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Surround = void 0;
|
|
4
|
+
const coordinate_1 = require("../utils/coordinate");
|
|
5
|
+
const vector_1 = require("../utils/vector");
|
|
6
|
+
/**
|
|
7
|
+
* Surround label transform is used to make labels surround circular.
|
|
8
|
+
*/
|
|
9
|
+
const Surround = (options) => {
|
|
10
|
+
return (labels, coordinate) => {
|
|
11
|
+
if (!(0, coordinate_1.isCircular)(coordinate))
|
|
12
|
+
return labels;
|
|
13
|
+
const center = coordinate.getCenter();
|
|
14
|
+
const radius = labels.reduce((r, label) => {
|
|
15
|
+
const { x0, y0, offset = 0 } = label.style;
|
|
16
|
+
return Math.max(r, (0, vector_1.dist)(center, [x0, y0]) + offset);
|
|
17
|
+
}, 0);
|
|
18
|
+
labels.forEach((label) => {
|
|
19
|
+
const { x0, y0, connector, connectorLength2 = 0 } = label.style;
|
|
20
|
+
const labelAngle = (0, vector_1.angleWithQuadrant)([x0 - center[0], y0 - center[1]]);
|
|
21
|
+
const length2 = connector
|
|
22
|
+
? connectorLength2 * (Math.sin(labelAngle) < 0 ? -1 : 1)
|
|
23
|
+
: 0;
|
|
24
|
+
const newX = center[0] + Math.sin(labelAngle) * radius;
|
|
25
|
+
const newY = center[1] - Math.cos(labelAngle) * radius;
|
|
26
|
+
label.style.x = newX + length2;
|
|
27
|
+
label.style.y = newY;
|
|
28
|
+
label.style.connectorPoints = [[-length2, 0]];
|
|
29
|
+
});
|
|
30
|
+
return labels;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
exports.Surround = Surround;
|
|
34
|
+
//# sourceMappingURL=surround.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surround.js","sourceRoot":"src/","sources":["label-transform/surround.ts"],"names":[],"mappings":";;;AAGA,oDAAiD;AACjD,4CAA0D;AAI1D;;GAEG;AACI,MAAM,QAAQ,GAAyB,CAAC,OAAO,EAAE,EAAE;IACxD,OAAO,CAAC,MAAuB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AG,MAAM,CAAC;YACvD,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC;YAC/B,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;YACrB,KAAK,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,QAAQ,YAyBnB"}
|
package/lib/mark/area.d.ts
CHANGED
package/lib/mark/area.js
CHANGED
|
@@ -49,11 +49,12 @@ const Area = () => {
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
exports.Area = Area;
|
|
52
|
+
const shapes = ['area', 'smooth'];
|
|
52
53
|
exports.Area.props = {
|
|
53
54
|
defaultShape: 'area',
|
|
54
55
|
defaultLabelShape: 'label',
|
|
55
56
|
channels: [
|
|
56
|
-
...(0, utils_1.baseGeometryChannels)(),
|
|
57
|
+
...(0, utils_1.baseGeometryChannels)({ shapes }),
|
|
57
58
|
{ name: 'x', required: true },
|
|
58
59
|
{ name: 'y', required: true },
|
|
59
60
|
{ name: 'size' },
|
|
@@ -65,11 +66,11 @@ exports.Area.props = {
|
|
|
65
66
|
{ type: 'maybeZeroY1' },
|
|
66
67
|
{ type: 'maybeZeroPadding' },
|
|
67
68
|
],
|
|
68
|
-
postInference: [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
postInference: [...(0, utils_1.basePostInference)(), ...(0, utils_1.tooltip1d)()],
|
|
70
|
+
interaction: {
|
|
71
|
+
shareTooltip: true,
|
|
72
|
+
seriesTooltip: true,
|
|
73
|
+
showCrosshairs: true,
|
|
74
|
+
},
|
|
74
75
|
};
|
|
75
76
|
//# sourceMappingURL=area.js.map
|
package/lib/mark/area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area.js","sourceRoot":"src/","sources":["mark/area.ts"],"names":[],"mappings":";;;AAAA,uCAAiC;AAGjC,
|
|
1
|
+
{"version":3,"file":"area.js","sourceRoot":"src/","sources":["mark/area.ts"],"names":[],"mappings":";;;AAAA,uCAAiC;AAGjC,mCAKiB;AAIjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEI,MAAM,IAAI,GAAoB,GAAG,EAAE;IACxC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QAEhD,8BAA8B;QAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAA,gBAAK,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAE1C,2CAA2C;QAC3C,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE;YAClC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;YACpB,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAEhC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;gBACxC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;gBAClB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AAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC"}
|
package/lib/mark/box.d.ts
CHANGED
package/lib/mark/box.js
CHANGED
|
@@ -78,17 +78,15 @@ exports.Box.props = {
|
|
|
78
78
|
defaultShape: 'box',
|
|
79
79
|
defaultLabelShape: 'label',
|
|
80
80
|
channels: [
|
|
81
|
-
...(0, utils_1.baseGeometryChannels)(),
|
|
81
|
+
...(0, utils_1.baseGeometryChannels)({ shapes: ['box'] }),
|
|
82
82
|
{ name: 'x', scale: 'band', required: true },
|
|
83
83
|
{ name: 'y', required: true },
|
|
84
84
|
{ name: 'series', scale: 'band' },
|
|
85
85
|
],
|
|
86
|
-
preInference: [...(0, utils_1.basePreInference)()],
|
|
87
|
-
postInference: [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
],
|
|
92
|
-
shapes: ['box'],
|
|
86
|
+
preInference: [...(0, utils_1.basePreInference)(), { type: 'maybeZeroX' }],
|
|
87
|
+
postInference: [...(0, utils_1.basePostInference)(), ...(0, utils_1.tooltip1d)()],
|
|
88
|
+
interaction: {
|
|
89
|
+
shareTooltip: true,
|
|
90
|
+
},
|
|
93
91
|
};
|
|
94
92
|
//# sourceMappingURL=box.js.map
|
package/lib/mark/box.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.js","sourceRoot":"src/","sources":["mark/box.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"box.js","sourceRoot":"src/","sources":["mark/box.ts"],"names":[],"mappings":";;;AAGA,mCAKiB;AAIjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACI,MAAM,GAAG,GAAmB,GAAG,EAAE;IACtC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,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AC5C,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;KAClC;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAC7D,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,EAAE,GAAG,IAAA,iBAAS,GAAE,CAAC;IACvD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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.Boxplot = void 0;
|
|
15
|
+
const d3_array_1 = require("d3-array");
|
|
16
|
+
const helper_1 = require("../utils/helper");
|
|
17
|
+
function min(I, V) {
|
|
18
|
+
return (0, d3_array_1.min)(I, (i) => V[i]);
|
|
19
|
+
}
|
|
20
|
+
function max(I, V) {
|
|
21
|
+
return (0, d3_array_1.max)(I, (i) => V[i]);
|
|
22
|
+
}
|
|
23
|
+
function lower(I, V) {
|
|
24
|
+
const lo = q1(I, V) * 2.5 - q3(I, V) * 1.5;
|
|
25
|
+
return (0, d3_array_1.min)(I, (i) => (V[i] >= lo ? V[i] : NaN));
|
|
26
|
+
}
|
|
27
|
+
function q1(I, V) {
|
|
28
|
+
return (0, d3_array_1.quantile)(I, 0.25, (i) => V[i]);
|
|
29
|
+
}
|
|
30
|
+
function q2(I, V) {
|
|
31
|
+
return (0, d3_array_1.quantile)(I, 0.5, (i) => V[i]);
|
|
32
|
+
}
|
|
33
|
+
function q3(I, V) {
|
|
34
|
+
return (0, d3_array_1.quantile)(I, 0.75, (i) => V[i]);
|
|
35
|
+
}
|
|
36
|
+
function upper(I, V) {
|
|
37
|
+
const hi = q3(I, V) * 2.5 - q1(I, V) * 1.5;
|
|
38
|
+
return (0, d3_array_1.max)(I, (i) => (V[i] <= hi ? V[i] : NaN));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Group marks by x and reserve outlier indexes.
|
|
42
|
+
*/
|
|
43
|
+
function OutlierY() {
|
|
44
|
+
return (I, mark) => {
|
|
45
|
+
const { encode } = mark;
|
|
46
|
+
const { y, x } = encode;
|
|
47
|
+
const { value: V } = y;
|
|
48
|
+
const { value: X } = x;
|
|
49
|
+
const GI = Array.from((0, d3_array_1.group)(I, (i) => X[+i]).values());
|
|
50
|
+
const FI = GI.flatMap((I) => {
|
|
51
|
+
const lo = lower(I, V);
|
|
52
|
+
const hi = upper(I, V);
|
|
53
|
+
return I.filter((i) => V[i] < lo || V[i] > hi);
|
|
54
|
+
});
|
|
55
|
+
return [FI, mark];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const Boxplot = (options) => {
|
|
59
|
+
return () => {
|
|
60
|
+
const { data, encode, style = {} } = options;
|
|
61
|
+
const { extend = false } = style, restStyle = __rest(style, ["extend"]);
|
|
62
|
+
const { y } = encode;
|
|
63
|
+
const encodeY = { y, y1: y, y2: y, y3: y, y4: y };
|
|
64
|
+
const qy = { y1: q1, y2: q2, y3: q3 };
|
|
65
|
+
// Only show min and max instead of lower and upper.
|
|
66
|
+
// Only draw a box.
|
|
67
|
+
if (extend) {
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
type: 'box',
|
|
71
|
+
data: data,
|
|
72
|
+
transform: [
|
|
73
|
+
Object.assign(Object.assign({ type: 'groupX', y: min }, qy), { y4: max }),
|
|
74
|
+
],
|
|
75
|
+
encode: Object.assign(Object.assign({}, encode), encodeY),
|
|
76
|
+
style: restStyle,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
const boxStyle = (0, helper_1.subObject)(restStyle, 'box');
|
|
81
|
+
const pointStyle = (0, helper_1.subObject)(restStyle, 'point');
|
|
82
|
+
return [
|
|
83
|
+
// Draw five-number box.
|
|
84
|
+
{
|
|
85
|
+
type: 'box',
|
|
86
|
+
data: data,
|
|
87
|
+
transform: [
|
|
88
|
+
Object.assign(Object.assign({ type: 'groupX', y: lower }, qy), { y4: upper }),
|
|
89
|
+
],
|
|
90
|
+
encode: Object.assign(Object.assign({}, encode), encodeY),
|
|
91
|
+
style: boxStyle,
|
|
92
|
+
},
|
|
93
|
+
// Draw outliers.
|
|
94
|
+
{
|
|
95
|
+
type: 'point',
|
|
96
|
+
data: data,
|
|
97
|
+
transform: [{ type: OutlierY }],
|
|
98
|
+
encode,
|
|
99
|
+
style: Object.assign({}, pointStyle),
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
exports.Boxplot = Boxplot;
|
|
105
|
+
exports.Boxplot.props = {
|
|
106
|
+
composite: true,
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=boxplot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boxplot.js","sourceRoot":"src/","sources":["mark/boxplot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAuE;AAGvE,4CAA4C;AAI5C,SAAS,GAAG,CAAC,CAAW,EAA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C,EAAE,KAAK,IACL,EAAE,KACL,EAAE,EAAE,KAAK;iBAEZ;gBACD,MAAM,kCAAO,MAAM,GAAK,OAAO,CAAE;gBACjC,KAAK,EAAE,QAAQ;aAChB;YACD,iBAAiB;YACjB;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;gBAC/B,MAAM;gBACN,KAAK,oBACA,UAAU,CACd;aACF;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AA1DW,QAAA,OAAO,WA0DlB;AAEF,eAAO,CAAC,KAAK,GAAG;IACd,SAAS,EAAE,IAAI;CAChB,CAAC"}
|
package/lib/mark/cell.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkComponent as MC } from '../runtime';
|
|
2
2
|
import { CellGeometry } from '../spec';
|
|
3
|
-
export
|
|
3
|
+
export type CellOptions = Omit<CellGeometry, 'type'>;
|
|
4
4
|
/**
|
|
5
5
|
* Convert value for each channel to Cell shapes.
|
|
6
6
|
* Calc the bbox of each Cell based on x, y and r.
|