@antv/g2 5.0.0-alpha.0 → 5.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en-US.md +47 -75
- package/README.md +47 -83
- package/dist/g2-lite.min.js +10 -0
- package/dist/g2.min.js +3 -3
- package/esm/adjust/index.d.ts +2 -1
- package/esm/adjust/index.js.map +1 -1
- package/esm/animation/fadeIn.js +4 -6
- package/esm/animation/fadeIn.js.map +1 -1
- package/esm/animation/fadeOut.js +4 -4
- package/esm/animation/fadeOut.js.map +1 -1
- package/esm/animation/index.d.ts +14 -7
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/morphing.js +4 -5
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/scaleInX.js +7 -5
- package/esm/animation/scaleInX.js.map +1 -1
- package/esm/animation/scaleInY.js +7 -5
- package/esm/animation/scaleInY.js.map +1 -1
- package/esm/animation/scaleOutX.js +4 -5
- package/esm/animation/scaleOutX.js.map +1 -1
- package/esm/animation/scaleOutY.js +4 -5
- package/esm/animation/scaleOutY.js.map +1 -1
- package/esm/api/chart.d.ts +8 -1
- package/esm/api/chart.js +32 -7
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/circle.js.map +1 -1
- package/esm/api/composition/flex.js.map +1 -1
- package/esm/api/composition/keyframe.js.map +1 -1
- package/esm/api/composition/layer.js.map +1 -1
- package/esm/api/composition/matrix.js.map +1 -1
- package/esm/api/composition/rect.js.map +1 -1
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/index.d.ts +1 -0
- package/esm/api/index.js +1 -0
- package/esm/api/index.js.map +1 -1
- package/esm/api/library.d.ts +3 -0
- package/esm/api/library.js +7 -0
- package/esm/api/library.js.map +1 -0
- package/esm/api/mark/index.d.ts +3 -3
- package/esm/api/mark/index.js +2 -2
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +4 -4
- package/esm/api/mark/mark.js +6 -5
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +1 -0
- package/esm/api/node.d.ts +4 -5
- package/esm/api/node.js +5 -7
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.d.ts +1 -0
- package/esm/api/props.js +10 -10
- package/esm/api/props.js.map +1 -1
- package/esm/component/axis.d.ts +1 -1
- package/esm/component/axis.js +11 -4
- package/esm/component/axis.js.map +1 -1
- package/esm/component/index.d.ts +10 -5
- package/esm/component/index.js.map +1 -1
- package/esm/composition/circle.js +1 -1
- package/esm/composition/circle.js.map +1 -1
- package/esm/composition/flex.js +4 -2
- package/esm/composition/flex.js.map +1 -1
- package/esm/composition/index.d.ts +16 -8
- package/esm/composition/index.js.map +1 -1
- package/esm/composition/layer.js +3 -3
- package/esm/composition/layer.js.map +1 -1
- package/esm/composition/mark.js +2 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/rect.js +29 -30
- package/esm/composition/rect.js.map +1 -1
- package/esm/composition/utils.d.ts +6 -0
- package/esm/composition/utils.js +19 -0
- package/esm/composition/utils.js.map +1 -1
- package/esm/composition/view.js +3 -2
- package/esm/composition/view.js.map +1 -1
- package/esm/coordinate/fisheye.d.ts +1 -1
- package/esm/coordinate/fisheye.js +1 -1
- package/esm/coordinate/fisheye.js.map +1 -1
- package/esm/coordinate/fisheyeX.d.ts +7 -0
- package/esm/coordinate/fisheyeX.js +6 -0
- package/esm/coordinate/fisheyeX.js.map +1 -0
- package/esm/coordinate/fisheyeY.d.ts +7 -0
- package/esm/coordinate/fisheyeY.js +6 -0
- package/esm/coordinate/fisheyeY.js.map +1 -0
- package/esm/coordinate/helix.d.ts +7 -0
- package/esm/coordinate/helix.js +11 -0
- package/esm/coordinate/helix.js.map +1 -0
- package/esm/coordinate/index.d.ts +24 -5
- package/esm/coordinate/index.js +7 -0
- package/esm/coordinate/index.js.map +1 -1
- package/esm/coordinate/reflect.d.ts +7 -0
- package/esm/coordinate/reflect.js +10 -0
- package/esm/coordinate/reflect.js.map +1 -0
- package/esm/coordinate/reflectX.d.ts +7 -0
- package/esm/coordinate/reflectX.js +10 -0
- package/esm/coordinate/reflectX.js.map +1 -0
- package/esm/coordinate/reflectY.d.ts +7 -0
- package/esm/coordinate/reflectY.js +10 -0
- package/esm/coordinate/reflectY.js.map +1 -0
- package/esm/coordinate/theta.d.ts +7 -0
- package/esm/coordinate/theta.js +11 -0
- package/esm/coordinate/theta.js.map +1 -0
- package/esm/data/arc.d.ts +7 -0
- package/esm/data/arc.js +11 -0
- package/esm/data/arc.js.map +1 -0
- package/esm/data/cluster.d.ts +8 -0
- package/esm/data/cluster.js +37 -0
- package/esm/data/cluster.js.map +1 -0
- package/esm/data/custom.d.ts +7 -0
- package/esm/data/custom.js +10 -0
- package/esm/data/custom.js.map +1 -0
- package/esm/data/fetch.d.ts +4 -0
- package/esm/data/fetch.js +28 -0
- package/esm/data/fetch.js.map +1 -0
- package/esm/data/filterBy.d.ts +8 -0
- package/esm/data/filterBy.js +17 -0
- package/esm/data/filterBy.js.map +1 -0
- package/esm/data/fold.d.ts +10 -0
- package/esm/data/fold.js +24 -0
- package/esm/data/fold.js.map +1 -0
- package/esm/data/index.d.ts +28 -0
- package/esm/data/index.js +15 -0
- package/esm/data/index.js.map +1 -0
- package/esm/data/inline.d.ts +4 -0
- package/esm/data/inline.js +6 -0
- package/esm/data/inline.js.map +1 -0
- package/esm/data/map.d.ts +7 -0
- package/esm/data/map.js +10 -0
- package/esm/data/map.js.map +1 -0
- package/esm/data/pick.d.ts +7 -0
- package/esm/data/pick.js +10 -0
- package/esm/data/pick.js.map +1 -0
- package/esm/data/rename.d.ts +8 -0
- package/esm/data/rename.js +17 -0
- package/esm/data/rename.js.map +1 -0
- package/esm/data/sankey.d.ts +8 -0
- package/esm/data/sankey.js +77 -0
- package/esm/data/sankey.js.map +1 -0
- package/esm/data/sortBy.d.ts +7 -0
- package/esm/data/sortBy.js +24 -0
- package/esm/data/sortBy.js.map +1 -0
- package/esm/data/subset.d.ts +7 -0
- package/esm/data/subset.js +26 -0
- package/esm/data/subset.js.map +1 -0
- package/esm/data/tree.d.ts +4 -0
- package/esm/data/tree.js +7 -0
- package/esm/data/tree.js.map +1 -0
- package/esm/{transform → data}/utils/arc/arc.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/arc.js +0 -0
- package/esm/data/utils/arc/arc.js.map +1 -0
- package/esm/data/utils/arc/index.d.ts +2 -0
- package/esm/{transform → data}/utils/arc/index.js +0 -0
- package/esm/data/utils/arc/index.js.map +1 -0
- package/esm/{transform → data}/utils/arc/sort.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/sort.js +0 -0
- package/esm/data/utils/arc/sort.js.map +1 -0
- package/esm/{transform → data}/utils/arc/types.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/types.js +0 -0
- package/esm/data/utils/arc/types.js.map +1 -0
- package/esm/{transform → data}/utils/d3-cloud/index.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-cloud/index.js +0 -0
- package/esm/data/utils/d3-cloud/index.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/align.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/align.js +0 -0
- package/esm/data/utils/d3-sankey/align.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/constant.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/constant.js +0 -0
- package/esm/data/utils/d3-sankey/constant.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/index.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/index.js +0 -0
- package/esm/data/utils/d3-sankey/index.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/sankey.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/sankey.js +0 -0
- package/esm/data/utils/d3-sankey/sankey.js.map +1 -0
- package/esm/data/utils/fields.d.ts +6 -0
- package/esm/data/utils/fields.js +15 -0
- package/esm/data/utils/fields.js.map +1 -0
- package/esm/{transform → data}/utils/flow.d.ts +0 -0
- package/esm/{transform → data}/utils/flow.js +0 -0
- package/esm/data/utils/flow.js.map +1 -0
- package/esm/{transform → data}/utils/memo.d.ts +0 -0
- package/esm/{transform → data}/utils/memo.js +0 -0
- package/esm/data/utils/memo.js.map +1 -0
- package/esm/data/voronoi.d.ts +1 -0
- package/esm/data/voronoi.js +6 -0
- package/esm/data/voronoi.js.map +1 -0
- package/esm/data/wordCloud.d.ts +1 -0
- package/esm/data/wordCloud.js +8 -0
- package/esm/data/wordCloud.js.map +1 -0
- package/esm/encode/index.d.ts +8 -4
- package/esm/encode/index.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/interaction/action/index.d.ts +42 -21
- package/esm/interaction/action/index.js +8 -8
- package/esm/interaction/action/index.js.map +1 -1
- package/esm/interaction/action/service/fisheyeFocus.js +7 -3
- package/esm/interaction/action/service/fisheyeFocus.js.map +1 -1
- package/esm/interaction/action/transformer/filter.js +9 -3
- package/esm/interaction/action/transformer/filter.js.map +1 -1
- package/esm/interaction/builtin/fisheye.d.ts +2 -0
- package/esm/interaction/index.d.ts +1 -1
- package/esm/interaction/index.js +0 -1
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/interactor/index.d.ts +4 -2
- package/esm/interaction/interactor/index.js.map +1 -1
- package/esm/labelLayout/hideOverlap.d.ts +2 -0
- package/esm/labelLayout/hideOverlap.js +38 -0
- package/esm/labelLayout/hideOverlap.js.map +1 -0
- package/esm/labelLayout/index.d.ts +1 -0
- package/esm/labelLayout/index.js +2 -0
- package/esm/labelLayout/index.js.map +1 -0
- package/esm/mark/annotation/index.d.ts +14 -7
- package/esm/mark/annotation/index.js +6 -6
- package/esm/mark/annotation/index.js.map +1 -1
- package/esm/mark/geometry/box.d.ts +34 -0
- package/esm/mark/geometry/box.js +90 -0
- package/esm/mark/geometry/box.js.map +1 -0
- package/esm/mark/geometry/image.js +5 -4
- package/esm/mark/geometry/image.js.map +1 -1
- package/esm/mark/geometry/index.d.ts +22 -13
- package/esm/mark/geometry/index.js +1 -3
- package/esm/mark/geometry/index.js.map +1 -1
- package/esm/mark/geometry/interval.js +0 -1
- package/esm/mark/geometry/interval.js.map +1 -1
- package/esm/mark/geometry/line.js +5 -1
- package/esm/mark/geometry/line.js.map +1 -1
- package/esm/mark/geometry/link.js +1 -1
- package/esm/mark/geometry/link.js.map +1 -1
- package/esm/mark/geometry/point.js +6 -2
- package/esm/mark/geometry/point.js.map +1 -1
- package/esm/mark/geometry/polygon.js +1 -1
- package/esm/mark/geometry/polygon.js.map +1 -1
- package/esm/mark/utils.d.ts +1 -3
- package/esm/mark/utils.js +1 -1
- package/esm/mark/utils.js.map +1 -1
- package/esm/palette/index.d.ts +4 -2
- package/esm/palette/index.js.map +1 -1
- package/esm/runtime/component.d.ts +1 -1
- package/esm/runtime/component.js +19 -6
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/coordinate.d.ts +4 -0
- package/esm/runtime/coordinate.js +16 -0
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/index.d.ts +1 -0
- package/esm/runtime/index.js +1 -0
- package/esm/runtime/index.js.map +1 -1
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/mark.d.ts +3 -3
- package/esm/runtime/mark.js +38 -93
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.js +64 -39
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.js +19 -21
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.js +15 -6
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +9 -0
- package/esm/runtime/transform.js +144 -0
- package/esm/runtime/transform.js.map +1 -0
- package/esm/runtime/types/common.d.ts +5 -3
- package/esm/runtime/types/component.d.ts +7 -6
- package/esm/runtime/types/data.d.ts +7 -0
- package/esm/runtime/types/data.js +2 -0
- package/esm/runtime/types/data.js.map +1 -0
- package/esm/runtime/types/encode.d.ts +4 -2
- package/esm/runtime/types/options.d.ts +7 -3
- package/esm/runtime/types/transform.d.ts +6 -12
- package/esm/scale/index.d.ts +22 -11
- package/esm/scale/index.js.map +1 -1
- package/esm/shape/annotation/text.js +16 -4
- package/esm/shape/annotation/text.js.map +1 -1
- package/esm/shape/{schema → box}/box.d.ts +0 -0
- package/esm/shape/box/box.js +87 -0
- package/esm/shape/box/box.js.map +1 -0
- package/esm/shape/index.d.ts +86 -48
- package/esm/shape/index.js +9 -12
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/colorRect.js +4 -22
- package/esm/shape/interval/colorRect.js.map +1 -1
- package/esm/shape/label/label.js +109 -14
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/{edge → link}/arc.d.ts +0 -0
- package/esm/shape/{edge → link}/arc.js +0 -0
- package/esm/shape/link/arc.js.map +1 -0
- package/esm/shape/{edge → link}/smoothEdge.d.ts +0 -0
- package/esm/shape/{edge → link}/smoothEdge.js +0 -0
- package/esm/shape/link/smoothEdge.js.map +1 -0
- package/esm/shape/{edge → link}/vhv.d.ts +0 -0
- package/esm/shape/{edge → link}/vhv.js +0 -0
- package/esm/shape/link/vhv.js.map +1 -0
- package/esm/shape/{edge → polygon}/ribbon.d.ts +0 -0
- package/esm/shape/{edge → polygon}/ribbon.js +0 -0
- package/esm/shape/polygon/ribbon.js.map +1 -0
- package/esm/shape/utils.d.ts +7 -0
- package/esm/shape/utils.js +23 -0
- package/esm/shape/utils.js.map +1 -1
- package/esm/spec/composition.d.ts +8 -5
- package/esm/spec/coordinate.d.ts +46 -2
- package/esm/spec/data.d.ts +191 -0
- package/esm/spec/data.js +2 -0
- package/esm/spec/data.js.map +1 -0
- package/esm/spec/geometry.d.ts +7 -4
- package/esm/spec/index.d.ts +2 -1
- package/esm/spec/index.js +2 -1
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/labelLayout.d.ts +4 -0
- package/esm/spec/labelLayout.js +2 -0
- package/esm/spec/labelLayout.js.map +1 -0
- package/esm/spec/transform.d.ts +66 -164
- package/esm/stdlib/index.js +34 -27
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/light.js +1 -0
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/Select.d.ts +9 -0
- package/esm/transform/Select.js +53 -0
- package/esm/transform/Select.js.map +1 -0
- package/esm/transform/SelectX.d.ts +7 -0
- package/esm/transform/SelectX.js +21 -0
- package/esm/transform/SelectX.js.map +1 -0
- package/esm/transform/SelectY.d.ts +7 -0
- package/esm/transform/SelectY.js +21 -0
- package/esm/transform/SelectY.js.map +1 -0
- package/esm/transform/dodgeX.d.ts +9 -0
- package/esm/transform/dodgeX.js +60 -0
- package/esm/transform/dodgeX.js.map +1 -0
- package/esm/transform/flexX.d.ts +7 -0
- package/esm/transform/flexX.js +31 -0
- package/esm/transform/flexX.js.map +1 -0
- package/esm/transform/groupX.d.ts +9 -0
- package/esm/transform/groupX.js +87 -0
- package/esm/transform/groupX.js.map +1 -0
- package/esm/transform/index.d.ts +46 -36
- package/esm/transform/index.js +23 -39
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/jitter.d.ts +9 -0
- package/esm/transform/jitter.js +36 -0
- package/esm/transform/jitter.js.map +1 -0
- package/esm/transform/jitterY.d.ts +8 -0
- package/esm/transform/jitterY.js +21 -0
- package/esm/transform/jitterY.js.map +1 -0
- package/esm/transform/maybeKey.d.ts +6 -0
- package/esm/transform/maybeKey.js +32 -0
- package/esm/transform/maybeKey.js.map +1 -0
- package/esm/transform/maybeSeries.d.ts +6 -0
- package/esm/transform/maybeSeries.js +17 -0
- package/esm/transform/maybeSeries.js.map +1 -0
- package/esm/transform/maybeSize.d.ts +7 -0
- package/esm/transform/maybeSize.js +20 -0
- package/esm/transform/maybeSize.js.map +1 -0
- package/esm/transform/maybeStackY.d.ts +9 -0
- package/esm/transform/maybeStackY.js +30 -0
- package/esm/transform/maybeStackY.js.map +1 -0
- package/esm/transform/maybeTitleX.d.ts +6 -0
- package/esm/transform/maybeTitleX.js +17 -0
- package/esm/transform/maybeTitleX.js.map +1 -0
- package/esm/transform/maybeTooltip.d.ts +8 -0
- package/esm/transform/maybeTooltip.js +29 -0
- package/esm/transform/maybeTooltip.js.map +1 -0
- package/esm/transform/maybeTooltipPosition.d.ts +7 -0
- package/esm/transform/maybeTooltipPosition.js +10 -0
- package/esm/transform/maybeTooltipPosition.js.map +1 -0
- package/esm/transform/maybeTooltipY.d.ts +6 -0
- package/esm/transform/maybeTooltipY.js +9 -0
- package/esm/transform/maybeTooltipY.js.map +1 -0
- package/esm/transform/maybeZeroX.d.ts +7 -0
- package/esm/transform/maybeZeroX.js +22 -0
- package/esm/transform/maybeZeroX.js.map +1 -0
- package/esm/transform/maybeZeroY.d.ts +6 -0
- package/esm/transform/maybeZeroY.js +21 -0
- package/esm/transform/maybeZeroY.js.map +1 -0
- package/esm/transform/maybeZeroY1.d.ts +6 -0
- package/esm/transform/maybeZeroY1.js +21 -0
- package/esm/transform/maybeZeroY1.js.map +1 -0
- package/esm/transform/normalizeY.d.ts +9 -0
- package/esm/transform/normalizeY.js +68 -0
- package/esm/transform/normalizeY.js.map +1 -0
- package/esm/transform/sortX.d.ts +8 -0
- package/esm/transform/sortX.js +60 -0
- package/esm/transform/sortX.js.map +1 -0
- package/esm/transform/stackEnter.d.ts +13 -0
- package/esm/transform/stackEnter.js +62 -0
- package/esm/transform/stackEnter.js.map +1 -0
- package/esm/transform/stackY.d.ts +9 -0
- package/esm/transform/stackY.js +73 -0
- package/esm/transform/stackY.js.map +1 -0
- package/esm/transform/symmetryY.d.ts +8 -0
- package/esm/transform/symmetryY.js +60 -0
- package/esm/transform/symmetryY.js.map +1 -0
- package/esm/transform/utils/helper.d.ts +11 -10
- package/esm/transform/utils/helper.js +27 -33
- package/esm/transform/utils/helper.js.map +1 -1
- package/esm/transform/utils/order.d.ts +9 -0
- package/esm/transform/utils/order.js +72 -0
- package/esm/transform/utils/order.js.map +1 -0
- package/esm/utils/coordinate.d.ts +2 -0
- package/esm/utils/coordinate.js +7 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/lib/adjust/index.d.ts +2 -1
- package/lib/adjust/index.js.map +1 -1
- package/lib/animation/fadeIn.js +4 -6
- package/lib/animation/fadeIn.js.map +1 -1
- package/lib/animation/fadeOut.js +4 -4
- package/lib/animation/fadeOut.js.map +1 -1
- package/lib/animation/index.d.ts +14 -7
- package/lib/animation/index.js.map +1 -1
- package/lib/animation/morphing.js +4 -5
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/scaleInX.js +7 -5
- package/lib/animation/scaleInX.js.map +1 -1
- package/lib/animation/scaleInY.js +7 -5
- package/lib/animation/scaleInY.js.map +1 -1
- package/lib/animation/scaleOutX.js +4 -5
- package/lib/animation/scaleOutX.js.map +1 -1
- package/lib/animation/scaleOutY.js +4 -5
- package/lib/animation/scaleOutY.js.map +1 -1
- package/lib/api/chart.d.ts +8 -1
- package/lib/api/chart.js +32 -7
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/circle.js.map +1 -1
- package/lib/api/composition/flex.js.map +1 -1
- package/lib/api/composition/keyframe.js.map +1 -1
- package/lib/api/composition/layer.js.map +1 -1
- package/lib/api/composition/matrix.js.map +1 -1
- package/lib/api/composition/rect.js.map +1 -1
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +3 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/library.d.ts +3 -0
- package/lib/api/library.js +11 -0
- package/lib/api/library.js.map +1 -0
- package/lib/api/mark/index.d.ts +3 -3
- package/lib/api/mark/index.js +1 -1
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +4 -4
- package/lib/api/mark/mark.js +7 -6
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +1 -0
- package/lib/api/node.d.ts +4 -5
- package/lib/api/node.js +5 -7
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.d.ts +1 -0
- package/lib/api/props.js +10 -10
- package/lib/api/props.js.map +1 -1
- package/lib/component/axis.d.ts +1 -1
- package/lib/component/axis.js +11 -4
- package/lib/component/axis.js.map +1 -1
- package/lib/component/index.d.ts +10 -5
- package/lib/component/index.js.map +1 -1
- package/lib/composition/circle.js +1 -1
- package/lib/composition/circle.js.map +1 -1
- package/lib/composition/flex.js +4 -2
- package/lib/composition/flex.js.map +1 -1
- package/lib/composition/index.d.ts +16 -8
- package/lib/composition/index.js.map +1 -1
- package/lib/composition/layer.js +3 -3
- package/lib/composition/layer.js.map +1 -1
- package/lib/composition/mark.js +2 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/rect.js +29 -30
- package/lib/composition/rect.js.map +1 -1
- package/lib/composition/utils.d.ts +6 -0
- package/lib/composition/utils.js +21 -1
- package/lib/composition/utils.js.map +1 -1
- package/lib/composition/view.js +3 -2
- package/lib/composition/view.js.map +1 -1
- package/lib/coordinate/fisheye.d.ts +1 -1
- package/lib/coordinate/fisheye.js +1 -1
- package/lib/coordinate/fisheye.js.map +1 -1
- package/lib/coordinate/fisheyeX.d.ts +7 -0
- package/lib/coordinate/fisheyeX.js +10 -0
- package/lib/coordinate/fisheyeX.js.map +1 -0
- package/lib/coordinate/fisheyeY.d.ts +7 -0
- package/lib/coordinate/fisheyeY.js +10 -0
- package/lib/coordinate/fisheyeY.js.map +1 -0
- package/lib/coordinate/helix.d.ts +7 -0
- package/lib/coordinate/helix.js +15 -0
- package/lib/coordinate/helix.js.map +1 -0
- package/lib/coordinate/index.d.ts +24 -5
- package/lib/coordinate/index.js +15 -1
- package/lib/coordinate/index.js.map +1 -1
- package/lib/coordinate/reflect.d.ts +7 -0
- package/lib/coordinate/reflect.js +14 -0
- package/lib/coordinate/reflect.js.map +1 -0
- package/lib/coordinate/reflectX.d.ts +7 -0
- package/lib/coordinate/reflectX.js +14 -0
- package/lib/coordinate/reflectX.js.map +1 -0
- package/lib/coordinate/reflectY.d.ts +7 -0
- package/lib/coordinate/reflectY.js +14 -0
- package/lib/coordinate/reflectY.js.map +1 -0
- package/lib/coordinate/theta.d.ts +7 -0
- package/lib/coordinate/theta.js +15 -0
- package/lib/coordinate/theta.js.map +1 -0
- package/lib/data/arc.d.ts +7 -0
- package/lib/data/arc.js +15 -0
- package/lib/data/arc.js.map +1 -0
- package/lib/data/cluster.d.ts +8 -0
- package/lib/data/cluster.js +42 -0
- package/lib/data/cluster.js.map +1 -0
- package/lib/data/custom.d.ts +7 -0
- package/lib/data/custom.js +14 -0
- package/lib/data/custom.js.map +1 -0
- package/lib/data/fetch.d.ts +4 -0
- package/lib/data/fetch.js +32 -0
- package/lib/data/fetch.js.map +1 -0
- package/lib/data/filterBy.d.ts +8 -0
- package/lib/data/filterBy.js +21 -0
- package/lib/data/filterBy.js.map +1 -0
- package/lib/data/fold.d.ts +10 -0
- package/lib/data/fold.js +29 -0
- package/lib/data/fold.js.map +1 -0
- package/lib/data/index.d.ts +28 -0
- package/lib/data/index.js +32 -0
- package/lib/data/index.js.map +1 -0
- package/lib/data/inline.d.ts +4 -0
- package/lib/data/inline.js +10 -0
- package/lib/data/inline.js.map +1 -0
- package/lib/data/map.d.ts +7 -0
- package/lib/data/map.js +14 -0
- package/lib/data/map.js.map +1 -0
- package/lib/data/pick.d.ts +7 -0
- package/lib/data/pick.js +14 -0
- package/lib/data/pick.js.map +1 -0
- package/lib/data/rename.d.ts +8 -0
- package/lib/data/rename.js +22 -0
- package/lib/data/rename.js.map +1 -0
- package/lib/data/sankey.d.ts +8 -0
- package/lib/data/sankey.js +81 -0
- package/lib/data/sankey.js.map +1 -0
- package/lib/data/sortBy.d.ts +7 -0
- package/lib/data/sortBy.js +28 -0
- package/lib/data/sortBy.js.map +1 -0
- package/lib/data/subset.d.ts +7 -0
- package/lib/data/subset.js +30 -0
- package/lib/data/subset.js.map +1 -0
- package/lib/data/tree.d.ts +4 -0
- package/lib/data/tree.js +11 -0
- package/lib/data/tree.js.map +1 -0
- package/lib/{transform → data}/utils/arc/arc.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/arc.js +0 -0
- package/lib/data/utils/arc/arc.js.map +1 -0
- package/lib/data/utils/arc/index.d.ts +2 -0
- package/lib/{transform → data}/utils/arc/index.js +0 -0
- package/lib/data/utils/arc/index.js.map +1 -0
- package/lib/{transform → data}/utils/arc/sort.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/sort.js +0 -0
- package/lib/data/utils/arc/sort.js.map +1 -0
- package/lib/{transform → data}/utils/arc/types.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/types.js +0 -0
- package/lib/data/utils/arc/types.js.map +1 -0
- package/lib/{transform → data}/utils/d3-cloud/index.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-cloud/index.js +0 -0
- package/lib/data/utils/d3-cloud/index.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/align.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/align.js +0 -0
- package/lib/data/utils/d3-sankey/align.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/constant.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/constant.js +0 -0
- package/lib/data/utils/d3-sankey/constant.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/index.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/index.js +0 -0
- package/lib/data/utils/d3-sankey/index.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/sankey.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/sankey.js +0 -0
- package/lib/data/utils/d3-sankey/sankey.js.map +1 -0
- package/lib/data/utils/fields.d.ts +6 -0
- package/lib/data/utils/fields.js +19 -0
- package/lib/data/utils/fields.js.map +1 -0
- package/lib/{transform → data}/utils/flow.d.ts +0 -0
- package/lib/{transform → data}/utils/flow.js +0 -0
- package/lib/data/utils/flow.js.map +1 -0
- package/lib/{transform → data}/utils/memo.d.ts +0 -0
- package/lib/{transform → data}/utils/memo.js +0 -0
- package/lib/data/utils/memo.js.map +1 -0
- package/lib/data/voronoi.d.ts +1 -0
- package/lib/data/voronoi.js +7 -0
- package/lib/data/voronoi.js.map +1 -0
- package/lib/data/wordCloud.d.ts +1 -0
- package/lib/data/wordCloud.js +9 -0
- package/lib/data/wordCloud.js.map +1 -0
- package/lib/encode/index.d.ts +8 -4
- package/lib/encode/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/interaction/action/index.d.ts +42 -21
- package/lib/interaction/action/index.js.map +1 -1
- package/lib/interaction/action/service/fisheyeFocus.js +7 -3
- package/lib/interaction/action/service/fisheyeFocus.js.map +1 -1
- package/lib/interaction/action/transformer/filter.js +9 -3
- package/lib/interaction/action/transformer/filter.js.map +1 -1
- package/lib/interaction/builtin/fisheye.d.ts +2 -0
- package/lib/interaction/index.d.ts +1 -1
- package/lib/interaction/index.js +0 -15
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/interactor/index.d.ts +4 -2
- package/lib/interaction/interactor/index.js.map +1 -1
- package/lib/labelLayout/hideOverlap.d.ts +2 -0
- package/lib/labelLayout/hideOverlap.js +42 -0
- package/lib/labelLayout/hideOverlap.js.map +1 -0
- package/lib/labelLayout/index.d.ts +1 -0
- package/lib/labelLayout/index.js +6 -0
- package/lib/labelLayout/index.js.map +1 -0
- package/lib/mark/annotation/index.d.ts +14 -7
- package/lib/mark/annotation/index.js.map +1 -1
- package/lib/mark/geometry/box.d.ts +34 -0
- package/lib/mark/geometry/box.js +94 -0
- package/lib/mark/geometry/box.js.map +1 -0
- package/lib/mark/geometry/image.js +5 -4
- package/lib/mark/geometry/image.js.map +1 -1
- package/lib/mark/geometry/index.d.ts +22 -13
- package/lib/mark/geometry/index.js +3 -7
- package/lib/mark/geometry/index.js.map +1 -1
- package/lib/mark/geometry/interval.js +0 -1
- package/lib/mark/geometry/interval.js.map +1 -1
- package/lib/mark/geometry/line.js +5 -1
- package/lib/mark/geometry/line.js.map +1 -1
- package/lib/mark/geometry/link.js +1 -1
- package/lib/mark/geometry/link.js.map +1 -1
- package/lib/mark/geometry/point.js +6 -2
- package/lib/mark/geometry/point.js.map +1 -1
- package/lib/mark/geometry/polygon.js +1 -1
- package/lib/mark/geometry/polygon.js.map +1 -1
- package/lib/mark/utils.d.ts +1 -3
- package/lib/mark/utils.js +1 -1
- package/lib/mark/utils.js.map +1 -1
- package/lib/palette/index.d.ts +4 -2
- package/lib/palette/index.js.map +1 -1
- package/lib/runtime/component.d.ts +1 -1
- package/lib/runtime/component.js +18 -5
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/coordinate.d.ts +4 -0
- package/lib/runtime/coordinate.js +21 -1
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/mark.d.ts +3 -3
- package/lib/runtime/mark.js +37 -92
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.js +62 -37
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.js +18 -20
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.js +14 -5
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +9 -0
- package/lib/runtime/transform.js +154 -0
- package/lib/runtime/transform.js.map +1 -0
- package/lib/runtime/types/common.d.ts +5 -3
- package/lib/runtime/types/component.d.ts +7 -6
- package/lib/runtime/types/data.d.ts +7 -0
- package/lib/runtime/types/data.js +3 -0
- package/lib/runtime/types/data.js.map +1 -0
- package/lib/runtime/types/encode.d.ts +4 -2
- package/lib/runtime/types/options.d.ts +7 -3
- package/lib/runtime/types/transform.d.ts +6 -12
- package/lib/scale/index.d.ts +22 -11
- package/lib/scale/index.js.map +1 -1
- package/lib/shape/annotation/text.js +16 -4
- package/lib/shape/annotation/text.js.map +1 -1
- package/lib/shape/{schema → box}/box.d.ts +0 -0
- package/lib/shape/box/box.js +91 -0
- package/lib/shape/box/box.js.map +1 -0
- package/lib/shape/index.d.ts +86 -48
- package/lib/shape/index.js +10 -16
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/colorRect.js +2 -20
- package/lib/shape/interval/colorRect.js.map +1 -1
- package/lib/shape/label/label.js +108 -13
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/{edge → link}/arc.d.ts +0 -0
- package/lib/shape/{edge → link}/arc.js +0 -0
- package/lib/shape/link/arc.js.map +1 -0
- package/lib/shape/{edge → link}/smoothEdge.d.ts +0 -0
- package/lib/shape/{edge → link}/smoothEdge.js +0 -0
- package/lib/shape/link/smoothEdge.js.map +1 -0
- package/lib/shape/{edge → link}/vhv.d.ts +0 -0
- package/lib/shape/{edge → link}/vhv.js +0 -0
- package/lib/shape/link/vhv.js.map +1 -0
- package/lib/shape/{edge → polygon}/ribbon.d.ts +0 -0
- package/lib/shape/{edge → polygon}/ribbon.js +0 -0
- package/lib/shape/polygon/ribbon.js.map +1 -0
- package/lib/shape/utils.d.ts +7 -0
- package/lib/shape/utils.js +25 -1
- package/lib/shape/utils.js.map +1 -1
- package/lib/spec/composition.d.ts +8 -5
- package/lib/spec/coordinate.d.ts +46 -2
- package/lib/spec/data.d.ts +191 -0
- package/lib/spec/data.js +3 -0
- package/lib/spec/data.js.map +1 -0
- package/lib/spec/geometry.d.ts +7 -4
- package/lib/spec/index.d.ts +2 -1
- package/lib/spec/index.js +2 -1
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/labelLayout.d.ts +4 -0
- package/lib/spec/labelLayout.js +3 -0
- package/lib/spec/labelLayout.js.map +1 -0
- package/lib/spec/transform.d.ts +66 -164
- package/lib/stdlib/index.js +30 -23
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/light.js +1 -0
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/Select.d.ts +9 -0
- package/lib/transform/Select.js +57 -0
- package/lib/transform/Select.js.map +1 -0
- package/lib/transform/SelectX.d.ts +7 -0
- package/lib/transform/SelectX.js +25 -0
- package/lib/transform/SelectX.js.map +1 -0
- package/lib/transform/SelectY.d.ts +7 -0
- package/lib/transform/SelectY.js +25 -0
- package/lib/transform/SelectY.js.map +1 -0
- package/lib/transform/dodgeX.d.ts +9 -0
- package/lib/transform/dodgeX.js +64 -0
- package/lib/transform/dodgeX.js.map +1 -0
- package/lib/transform/flexX.d.ts +7 -0
- package/lib/transform/flexX.js +35 -0
- package/lib/transform/flexX.js.map +1 -0
- package/lib/transform/groupX.d.ts +9 -0
- package/lib/transform/groupX.js +91 -0
- package/lib/transform/groupX.js.map +1 -0
- package/lib/transform/index.d.ts +46 -36
- package/lib/transform/index.js +26 -55
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/jitter.d.ts +9 -0
- package/lib/transform/jitter.js +41 -0
- package/lib/transform/jitter.js.map +1 -0
- package/lib/transform/jitterY.d.ts +8 -0
- package/lib/transform/jitterY.js +25 -0
- package/lib/transform/jitterY.js.map +1 -0
- package/lib/transform/maybeKey.d.ts +6 -0
- package/lib/transform/maybeKey.js +36 -0
- package/lib/transform/maybeKey.js.map +1 -0
- package/lib/transform/maybeSeries.d.ts +6 -0
- package/lib/transform/maybeSeries.js +21 -0
- package/lib/transform/maybeSeries.js.map +1 -0
- package/lib/transform/maybeSize.d.ts +7 -0
- package/lib/transform/maybeSize.js +24 -0
- package/lib/transform/maybeSize.js.map +1 -0
- package/lib/transform/maybeStackY.d.ts +9 -0
- package/lib/transform/maybeStackY.js +34 -0
- package/lib/transform/maybeStackY.js.map +1 -0
- package/lib/transform/maybeTitleX.d.ts +6 -0
- package/lib/transform/maybeTitleX.js +21 -0
- package/lib/transform/maybeTitleX.js.map +1 -0
- package/lib/transform/maybeTooltip.d.ts +8 -0
- package/lib/transform/maybeTooltip.js +33 -0
- package/lib/transform/maybeTooltip.js.map +1 -0
- package/lib/transform/maybeTooltipPosition.d.ts +7 -0
- package/lib/transform/maybeTooltipPosition.js +14 -0
- package/lib/transform/maybeTooltipPosition.js.map +1 -0
- package/lib/transform/maybeTooltipY.d.ts +6 -0
- package/lib/transform/maybeTooltipY.js +13 -0
- package/lib/transform/maybeTooltipY.js.map +1 -0
- package/lib/transform/maybeZeroX.d.ts +7 -0
- package/lib/transform/maybeZeroX.js +26 -0
- package/lib/transform/maybeZeroX.js.map +1 -0
- package/lib/transform/maybeZeroY.d.ts +6 -0
- package/lib/transform/maybeZeroY.js +25 -0
- package/lib/transform/maybeZeroY.js.map +1 -0
- package/lib/transform/maybeZeroY1.d.ts +6 -0
- package/lib/transform/maybeZeroY1.js +25 -0
- package/lib/transform/maybeZeroY1.js.map +1 -0
- package/lib/transform/normalizeY.d.ts +9 -0
- package/lib/transform/normalizeY.js +72 -0
- package/lib/transform/normalizeY.js.map +1 -0
- package/lib/transform/sortX.d.ts +8 -0
- package/lib/transform/sortX.js +64 -0
- package/lib/transform/sortX.js.map +1 -0
- package/lib/transform/stackEnter.d.ts +13 -0
- package/lib/transform/stackEnter.js +66 -0
- package/lib/transform/stackEnter.js.map +1 -0
- package/lib/transform/stackY.d.ts +9 -0
- package/lib/transform/stackY.js +77 -0
- package/lib/transform/stackY.js.map +1 -0
- package/lib/transform/symmetryY.d.ts +8 -0
- package/lib/transform/symmetryY.js +64 -0
- package/lib/transform/symmetryY.js.map +1 -0
- package/lib/transform/utils/helper.d.ts +11 -10
- package/lib/transform/utils/helper.js +32 -38
- package/lib/transform/utils/helper.js.map +1 -1
- package/lib/transform/utils/order.d.ts +9 -0
- package/lib/transform/utils/order.js +79 -0
- package/lib/transform/utils/order.js.map +1 -0
- package/lib/utils/coordinate.d.ts +2 -0
- package/lib/utils/coordinate.js +10 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/package.json +24 -8
- package/src/.DS_Store +0 -0
- package/src/adjust/index.ts +2 -1
- package/src/animation/fadeIn.ts +4 -6
- package/src/animation/fadeOut.ts +4 -4
- package/src/animation/index.ts +15 -7
- package/src/animation/morphing.ts +5 -6
- package/src/animation/scaleInX.ts +12 -5
- package/src/animation/scaleInY.ts +12 -5
- package/src/animation/scaleOutX.ts +9 -5
- package/src/animation/scaleOutY.ts +9 -5
- package/src/api/chart.ts +59 -11
- package/src/api/index.ts +1 -0
- package/src/api/library.ts +12 -0
- package/src/api/mark/index.ts +3 -3
- package/src/api/mark/mark.ts +6 -5
- package/src/api/mark/types.ts +1 -0
- package/src/api/node.ts +5 -6
- package/src/api/props.ts +14 -10
- package/src/component/axis.ts +13 -5
- package/src/component/index.ts +11 -5
- package/src/composition/circle.ts +1 -1
- package/src/composition/flex.ts +4 -2
- package/src/composition/index.ts +17 -8
- package/src/composition/layer.ts +3 -2
- package/src/composition/mark.ts +3 -0
- package/src/composition/rect.ts +27 -28
- package/src/composition/utils.ts +10 -0
- package/src/composition/view.ts +3 -2
- package/src/coordinate/fisheye.ts +3 -2
- package/src/coordinate/fisheyeX.ts +15 -0
- package/src/coordinate/fisheyeY.ts +15 -0
- package/src/coordinate/helix.ts +21 -0
- package/src/coordinate/index.ts +25 -5
- package/src/coordinate/reflect.ts +15 -0
- package/src/coordinate/reflectX.ts +15 -0
- package/src/coordinate/reflectY.ts +15 -0
- package/src/coordinate/theta.ts +21 -0
- package/src/data/arc.ts +16 -0
- package/src/data/cluster.ts +53 -0
- package/src/data/custom.ts +15 -0
- package/src/data/fetch.ts +28 -0
- package/src/data/filterBy.ts +28 -0
- package/src/data/fold.ts +29 -0
- package/src/data/index.ts +29 -0
- package/src/data/inline.ts +11 -0
- package/src/data/map.ts +15 -0
- package/src/data/pick.ts +15 -0
- package/src/data/rename.ts +26 -0
- package/src/data/sankey.ts +102 -0
- package/src/data/sortBy.ts +33 -0
- package/src/data/subset.ts +35 -0
- package/src/data/tree.ts +12 -0
- package/src/{transform → data}/utils/arc/arc.ts +0 -0
- package/src/data/utils/arc/index.ts +2 -0
- package/src/{transform → data}/utils/arc/sort.ts +0 -0
- package/src/{transform → data}/utils/arc/types.ts +0 -0
- package/src/{transform → data}/utils/d3-cloud/index.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/align.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/constant.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/index.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/sankey.ts +0 -0
- package/src/data/utils/fields.ts +17 -0
- package/src/{transform → data}/utils/flow.ts +0 -0
- package/src/data/utils/memo.ts +80 -0
- package/src/data/voronoi.ts +32 -0
- package/src/data/wordCloud.ts +117 -0
- package/src/encode/index.ts +9 -4
- package/src/index.ts +1 -1
- package/src/interaction/action/index.ts +43 -45
- package/src/interaction/action/service/fisheyeFocus.ts +16 -3
- package/src/interaction/action/transformer/filter.ts +8 -4
- package/src/interaction/index.ts +17 -1
- package/src/interaction/interactor/index.ts +5 -2
- package/src/interaction/types.ts +1 -1
- package/src/labelLayout/hideOverlap.ts +47 -0
- package/src/labelLayout/index.ts +1 -0
- package/src/mark/annotation/index.ts +15 -25
- package/src/mark/geometry/box.ts +105 -0
- package/src/mark/geometry/image.ts +4 -3
- package/src/mark/geometry/index.ts +23 -13
- package/src/mark/geometry/interval.ts +0 -1
- package/src/mark/geometry/line.ts +6 -1
- package/src/mark/geometry/link.ts +1 -1
- package/src/mark/geometry/point.ts +5 -2
- package/src/mark/geometry/polygon.ts +1 -1
- package/src/mark/utils.ts +1 -1
- package/src/palette/index.ts +5 -2
- package/src/runtime/component.ts +33 -6
- package/src/runtime/coordinate.ts +20 -0
- package/src/runtime/index.ts +1 -0
- package/src/runtime/layout.ts +1 -1
- package/src/runtime/mark.ts +60 -138
- package/src/runtime/plot.ts +93 -61
- package/src/runtime/render.ts +20 -15
- package/src/runtime/scale.ts +16 -6
- package/src/runtime/transform.ts +159 -0
- package/src/runtime/types/common.ts +5 -2
- package/src/runtime/types/component.ts +14 -13
- package/src/runtime/types/data.ts +10 -0
- package/src/runtime/types/encode.ts +6 -2
- package/src/runtime/types/options.ts +8 -2
- package/src/runtime/types/transform.ts +8 -13
- package/src/scale/index.ts +23 -11
- package/src/shape/annotation/text.ts +16 -4
- package/src/shape/box/box.ts +96 -0
- package/src/shape/index.ts +92 -60
- package/src/shape/interval/colorRect.ts +4 -23
- package/src/shape/label/label.ts +132 -15
- package/src/shape/{edge → link}/arc.ts +0 -0
- package/src/shape/{edge → link}/smoothEdge.ts +0 -0
- package/src/shape/{edge → link}/vhv.ts +0 -0
- package/src/shape/{edge → polygon}/ribbon.ts +0 -0
- package/src/shape/utils.ts +31 -0
- package/src/spec/composition.ts +8 -5
- package/src/spec/coordinate.ts +67 -3
- package/src/spec/data.ts +230 -0
- package/src/spec/geometry.ts +7 -4
- package/src/spec/index.ts +2 -1
- package/src/spec/labelLayout.ts +5 -0
- package/src/spec/transform.ts +129 -195
- package/src/stdlib/index.ts +62 -45
- package/src/theme/light.ts +1 -0
- package/src/transform/dodgeX.ts +60 -0
- package/src/transform/flexX.ts +38 -0
- package/src/transform/groupX.ts +109 -0
- package/src/transform/index.ts +46 -46
- package/src/transform/jitter.ts +45 -0
- package/src/transform/jitterY.ts +26 -0
- package/src/transform/maybeKey.ts +26 -0
- package/src/transform/maybeSeries.ts +20 -0
- package/src/transform/maybeSize.ts +23 -0
- package/src/transform/maybeStackY.ts +37 -0
- package/src/transform/maybeTitleX.ts +20 -0
- package/src/transform/maybeTooltip.ts +34 -0
- package/src/transform/maybeTooltipPosition.ts +14 -0
- package/src/transform/maybeTooltipY.ts +13 -0
- package/src/transform/maybeZeroX.ts +25 -0
- package/src/transform/maybeZeroY.ts +24 -0
- package/src/transform/maybeZeroY1.ts +24 -0
- package/src/transform/normalizeY.ts +69 -0
- package/src/transform/select.ts +53 -0
- package/src/transform/selectX.ts +15 -0
- package/src/transform/selectY.ts +15 -0
- package/src/transform/sortX.ts +48 -0
- package/src/transform/stackEnter.ts +73 -0
- package/src/transform/stackY.ts +84 -0
- package/src/transform/symmetryY.ts +60 -0
- package/src/transform/utils/helper.ts +27 -44
- package/src/transform/utils/order.ts +123 -0
- package/src/utils/coordinate.ts +9 -0
- package/esm/mark/geometry/edge.d.ts +0 -13
- package/esm/mark/geometry/edge.js +0 -31
- package/esm/mark/geometry/edge.js.map +0 -1
- package/esm/mark/geometry/node.d.ts +0 -8
- package/esm/mark/geometry/node.js +0 -27
- package/esm/mark/geometry/node.js.map +0 -1
- package/esm/mark/geometry/schema.d.ts +0 -34
- package/esm/mark/geometry/schema.js +0 -90
- package/esm/mark/geometry/schema.js.map +0 -1
- package/esm/renderer/canvas.d.ts +0 -10
- package/esm/renderer/canvas.js +0 -18
- package/esm/renderer/canvas.js.map +0 -1
- package/esm/renderer/index.d.ts +0 -1
- package/esm/renderer/index.js +0 -2
- package/esm/renderer/index.js.map +0 -1
- package/esm/shape/edge/arc.js.map +0 -1
- package/esm/shape/edge/edge.d.ts +0 -6
- package/esm/shape/edge/edge.js +0 -11
- package/esm/shape/edge/edge.js.map +0 -1
- package/esm/shape/edge/ribbon.js.map +0 -1
- package/esm/shape/edge/smoothEdge.js.map +0 -1
- package/esm/shape/edge/vhv.js.map +0 -1
- package/esm/shape/node/point.d.ts +0 -6
- package/esm/shape/node/point.js +0 -27
- package/esm/shape/node/point.js.map +0 -1
- package/esm/shape/node/polygon.d.ts +0 -3
- package/esm/shape/node/polygon.js +0 -8
- package/esm/shape/node/polygon.js.map +0 -1
- package/esm/shape/schema/box.js +0 -87
- package/esm/shape/schema/box.js.map +0 -1
- package/esm/spec/statistic.d.ts +0 -69
- package/esm/spec/statistic.js +0 -2
- package/esm/spec/statistic.js.map +0 -1
- package/esm/transform/inference/maybeArrayField.d.ts +0 -8
- package/esm/transform/inference/maybeArrayField.js +0 -47
- package/esm/transform/inference/maybeArrayField.js.map +0 -1
- package/esm/transform/inference/maybeKey.d.ts +0 -9
- package/esm/transform/inference/maybeKey.js +0 -33
- package/esm/transform/inference/maybeKey.js.map +0 -1
- package/esm/transform/inference/maybeSeries.d.ts +0 -7
- package/esm/transform/inference/maybeSeries.js +0 -23
- package/esm/transform/inference/maybeSeries.js.map +0 -1
- package/esm/transform/inference/maybeSize.d.ts +0 -7
- package/esm/transform/inference/maybeSize.js +0 -14
- package/esm/transform/inference/maybeSize.js.map +0 -1
- package/esm/transform/inference/maybeStackY.d.ts +0 -9
- package/esm/transform/inference/maybeStackY.js +0 -32
- package/esm/transform/inference/maybeStackY.js.map +0 -1
- package/esm/transform/inference/maybeTitleX.d.ts +0 -7
- package/esm/transform/inference/maybeTitleX.js +0 -23
- package/esm/transform/inference/maybeTitleX.js.map +0 -1
- package/esm/transform/inference/maybeTooltip.d.ts +0 -9
- package/esm/transform/inference/maybeTooltip.js +0 -30
- package/esm/transform/inference/maybeTooltip.js.map +0 -1
- package/esm/transform/inference/maybeTooltipPosition.d.ts +0 -7
- package/esm/transform/inference/maybeTooltipPosition.js +0 -12
- package/esm/transform/inference/maybeTooltipPosition.js.map +0 -1
- package/esm/transform/inference/maybeTooltipY.d.ts +0 -7
- package/esm/transform/inference/maybeTooltipY.js +0 -12
- package/esm/transform/inference/maybeTooltipY.js.map +0 -1
- package/esm/transform/inference/maybeZeroX.d.ts +0 -7
- package/esm/transform/inference/maybeZeroX.js +0 -14
- package/esm/transform/inference/maybeZeroX.js.map +0 -1
- package/esm/transform/inference/maybeZeroY.d.ts +0 -7
- package/esm/transform/inference/maybeZeroY.js +0 -14
- package/esm/transform/inference/maybeZeroY.js.map +0 -1
- package/esm/transform/inference/maybeZeroY1.d.ts +0 -7
- package/esm/transform/inference/maybeZeroY1.js +0 -14
- package/esm/transform/inference/maybeZeroY1.js.map +0 -1
- package/esm/transform/preprocessor/arc.d.ts +0 -7
- package/esm/transform/preprocessor/arc.js +0 -16
- package/esm/transform/preprocessor/arc.js.map +0 -1
- package/esm/transform/preprocessor/cluster.d.ts +0 -5
- package/esm/transform/preprocessor/cluster.js +0 -40
- package/esm/transform/preprocessor/cluster.js.map +0 -1
- package/esm/transform/preprocessor/connector.d.ts +0 -7
- package/esm/transform/preprocessor/connector.js +0 -16
- package/esm/transform/preprocessor/connector.js.map +0 -1
- package/esm/transform/preprocessor/fetch.d.ts +0 -8
- package/esm/transform/preprocessor/fetch.js +0 -36
- package/esm/transform/preprocessor/fetch.js.map +0 -1
- package/esm/transform/preprocessor/filterBy.d.ts +0 -8
- package/esm/transform/preprocessor/filterBy.js +0 -18
- package/esm/transform/preprocessor/filterBy.js.map +0 -1
- package/esm/transform/preprocessor/fold.d.ts +0 -8
- package/esm/transform/preprocessor/fold.js +0 -27
- package/esm/transform/preprocessor/fold.js.map +0 -1
- package/esm/transform/preprocessor/pick.d.ts +0 -7
- package/esm/transform/preprocessor/pick.js +0 -12
- package/esm/transform/preprocessor/pick.js.map +0 -1
- package/esm/transform/preprocessor/rename.d.ts +0 -8
- package/esm/transform/preprocessor/rename.js +0 -20
- package/esm/transform/preprocessor/rename.js.map +0 -1
- package/esm/transform/preprocessor/sankey.d.ts +0 -8
- package/esm/transform/preprocessor/sankey.js +0 -80
- package/esm/transform/preprocessor/sankey.js.map +0 -1
- package/esm/transform/preprocessor/sortBy.d.ts +0 -7
- package/esm/transform/preprocessor/sortBy.js +0 -19
- package/esm/transform/preprocessor/sortBy.js.map +0 -1
- package/esm/transform/preprocessor/subset.d.ts +0 -7
- package/esm/transform/preprocessor/subset.js +0 -31
- package/esm/transform/preprocessor/subset.js.map +0 -1
- package/esm/transform/preprocessor/tree.d.ts +0 -4
- package/esm/transform/preprocessor/tree.js +0 -7
- package/esm/transform/preprocessor/tree.js.map +0 -1
- package/esm/transform/preprocessor/voronoi.d.ts +0 -4
- package/esm/transform/preprocessor/voronoi.js +0 -20
- package/esm/transform/preprocessor/voronoi.js.map +0 -1
- package/esm/transform/preprocessor/wordCloud.d.ts +0 -6
- package/esm/transform/preprocessor/wordCloud.js +0 -106
- package/esm/transform/preprocessor/wordCloud.js.map +0 -1
- package/esm/transform/statistic/Select.d.ts +0 -9
- package/esm/transform/statistic/Select.js +0 -58
- package/esm/transform/statistic/Select.js.map +0 -1
- package/esm/transform/statistic/SelectX.d.ts +0 -7
- package/esm/transform/statistic/SelectX.js +0 -23
- package/esm/transform/statistic/SelectX.js.map +0 -1
- package/esm/transform/statistic/SelectY.d.ts +0 -7
- package/esm/transform/statistic/SelectY.js +0 -23
- package/esm/transform/statistic/SelectY.js.map +0 -1
- package/esm/transform/statistic/dodgeX.d.ts +0 -9
- package/esm/transform/statistic/dodgeX.js +0 -56
- package/esm/transform/statistic/dodgeX.js.map +0 -1
- package/esm/transform/statistic/groupX.d.ts +0 -8
- package/esm/transform/statistic/groupX.js +0 -85
- package/esm/transform/statistic/groupX.js.map +0 -1
- package/esm/transform/statistic/jitter.d.ts +0 -9
- package/esm/transform/statistic/jitter.js +0 -40
- package/esm/transform/statistic/jitter.js.map +0 -1
- package/esm/transform/statistic/jitterY.d.ts +0 -8
- package/esm/transform/statistic/jitterY.js +0 -27
- package/esm/transform/statistic/jitterY.js.map +0 -1
- package/esm/transform/statistic/normalizeY.d.ts +0 -9
- package/esm/transform/statistic/normalizeY.js +0 -70
- package/esm/transform/statistic/normalizeY.js.map +0 -1
- package/esm/transform/statistic/stackEnter.d.ts +0 -13
- package/esm/transform/statistic/stackEnter.js +0 -59
- package/esm/transform/statistic/stackEnter.js.map +0 -1
- package/esm/transform/statistic/stackY.d.ts +0 -9
- package/esm/transform/statistic/stackY.js +0 -55
- package/esm/transform/statistic/stackY.js.map +0 -1
- package/esm/transform/statistic/symmetryY.d.ts +0 -8
- package/esm/transform/statistic/symmetryY.js +0 -61
- package/esm/transform/statistic/symmetryY.js.map +0 -1
- package/esm/transform/statistic/utils.d.ts +0 -9
- package/esm/transform/statistic/utils.js +0 -70
- package/esm/transform/statistic/utils.js.map +0 -1
- package/esm/transform/utils/arc/arc.js.map +0 -1
- package/esm/transform/utils/arc/index.d.ts +0 -2
- package/esm/transform/utils/arc/index.js.map +0 -1
- package/esm/transform/utils/arc/sort.js.map +0 -1
- package/esm/transform/utils/arc/types.js.map +0 -1
- package/esm/transform/utils/d3-cloud/index.js.map +0 -1
- package/esm/transform/utils/d3-sankey/align.js.map +0 -1
- package/esm/transform/utils/d3-sankey/constant.js.map +0 -1
- package/esm/transform/utils/d3-sankey/index.js.map +0 -1
- package/esm/transform/utils/d3-sankey/sankey.js.map +0 -1
- package/esm/transform/utils/flow.js.map +0 -1
- package/esm/transform/utils/memo.js.map +0 -1
- package/lib/mark/geometry/edge.d.ts +0 -13
- package/lib/mark/geometry/edge.js +0 -35
- package/lib/mark/geometry/edge.js.map +0 -1
- package/lib/mark/geometry/node.d.ts +0 -8
- package/lib/mark/geometry/node.js +0 -31
- package/lib/mark/geometry/node.js.map +0 -1
- package/lib/mark/geometry/schema.d.ts +0 -34
- package/lib/mark/geometry/schema.js +0 -94
- package/lib/mark/geometry/schema.js.map +0 -1
- package/lib/renderer/canvas.d.ts +0 -10
- package/lib/renderer/canvas.js +0 -22
- package/lib/renderer/canvas.js.map +0 -1
- package/lib/renderer/index.d.ts +0 -1
- package/lib/renderer/index.js +0 -6
- package/lib/renderer/index.js.map +0 -1
- package/lib/shape/edge/arc.js.map +0 -1
- package/lib/shape/edge/edge.d.ts +0 -6
- package/lib/shape/edge/edge.js +0 -15
- package/lib/shape/edge/edge.js.map +0 -1
- package/lib/shape/edge/ribbon.js.map +0 -1
- package/lib/shape/edge/smoothEdge.js.map +0 -1
- package/lib/shape/edge/vhv.js.map +0 -1
- package/lib/shape/node/point.d.ts +0 -6
- package/lib/shape/node/point.js +0 -31
- package/lib/shape/node/point.js.map +0 -1
- package/lib/shape/node/polygon.d.ts +0 -3
- package/lib/shape/node/polygon.js +0 -12
- package/lib/shape/node/polygon.js.map +0 -1
- package/lib/shape/schema/box.js +0 -91
- package/lib/shape/schema/box.js.map +0 -1
- package/lib/spec/statistic.d.ts +0 -69
- package/lib/spec/statistic.js +0 -3
- package/lib/spec/statistic.js.map +0 -1
- package/lib/transform/inference/maybeArrayField.d.ts +0 -8
- package/lib/transform/inference/maybeArrayField.js +0 -51
- package/lib/transform/inference/maybeArrayField.js.map +0 -1
- package/lib/transform/inference/maybeKey.d.ts +0 -9
- package/lib/transform/inference/maybeKey.js +0 -37
- package/lib/transform/inference/maybeKey.js.map +0 -1
- package/lib/transform/inference/maybeSeries.d.ts +0 -7
- package/lib/transform/inference/maybeSeries.js +0 -27
- package/lib/transform/inference/maybeSeries.js.map +0 -1
- package/lib/transform/inference/maybeSize.d.ts +0 -7
- package/lib/transform/inference/maybeSize.js +0 -18
- package/lib/transform/inference/maybeSize.js.map +0 -1
- package/lib/transform/inference/maybeStackY.d.ts +0 -9
- package/lib/transform/inference/maybeStackY.js +0 -36
- package/lib/transform/inference/maybeStackY.js.map +0 -1
- package/lib/transform/inference/maybeTitleX.d.ts +0 -7
- package/lib/transform/inference/maybeTitleX.js +0 -27
- package/lib/transform/inference/maybeTitleX.js.map +0 -1
- package/lib/transform/inference/maybeTooltip.d.ts +0 -9
- package/lib/transform/inference/maybeTooltip.js +0 -34
- package/lib/transform/inference/maybeTooltip.js.map +0 -1
- package/lib/transform/inference/maybeTooltipPosition.d.ts +0 -7
- package/lib/transform/inference/maybeTooltipPosition.js +0 -16
- package/lib/transform/inference/maybeTooltipPosition.js.map +0 -1
- package/lib/transform/inference/maybeTooltipY.d.ts +0 -7
- package/lib/transform/inference/maybeTooltipY.js +0 -16
- package/lib/transform/inference/maybeTooltipY.js.map +0 -1
- package/lib/transform/inference/maybeZeroX.d.ts +0 -7
- package/lib/transform/inference/maybeZeroX.js +0 -18
- package/lib/transform/inference/maybeZeroX.js.map +0 -1
- package/lib/transform/inference/maybeZeroY.d.ts +0 -7
- package/lib/transform/inference/maybeZeroY.js +0 -18
- package/lib/transform/inference/maybeZeroY.js.map +0 -1
- package/lib/transform/inference/maybeZeroY1.d.ts +0 -7
- package/lib/transform/inference/maybeZeroY1.js +0 -18
- package/lib/transform/inference/maybeZeroY1.js.map +0 -1
- package/lib/transform/preprocessor/arc.d.ts +0 -7
- package/lib/transform/preprocessor/arc.js +0 -20
- package/lib/transform/preprocessor/arc.js.map +0 -1
- package/lib/transform/preprocessor/cluster.d.ts +0 -5
- package/lib/transform/preprocessor/cluster.js +0 -44
- package/lib/transform/preprocessor/cluster.js.map +0 -1
- package/lib/transform/preprocessor/connector.d.ts +0 -7
- package/lib/transform/preprocessor/connector.js +0 -20
- package/lib/transform/preprocessor/connector.js.map +0 -1
- package/lib/transform/preprocessor/fetch.d.ts +0 -8
- package/lib/transform/preprocessor/fetch.js +0 -40
- package/lib/transform/preprocessor/fetch.js.map +0 -1
- package/lib/transform/preprocessor/filterBy.d.ts +0 -8
- package/lib/transform/preprocessor/filterBy.js +0 -22
- package/lib/transform/preprocessor/filterBy.js.map +0 -1
- package/lib/transform/preprocessor/fold.d.ts +0 -8
- package/lib/transform/preprocessor/fold.js +0 -32
- package/lib/transform/preprocessor/fold.js.map +0 -1
- package/lib/transform/preprocessor/pick.d.ts +0 -7
- package/lib/transform/preprocessor/pick.js +0 -16
- package/lib/transform/preprocessor/pick.js.map +0 -1
- package/lib/transform/preprocessor/rename.d.ts +0 -8
- package/lib/transform/preprocessor/rename.js +0 -25
- package/lib/transform/preprocessor/rename.js.map +0 -1
- package/lib/transform/preprocessor/sankey.d.ts +0 -8
- package/lib/transform/preprocessor/sankey.js +0 -84
- package/lib/transform/preprocessor/sankey.js.map +0 -1
- package/lib/transform/preprocessor/sortBy.d.ts +0 -7
- package/lib/transform/preprocessor/sortBy.js +0 -23
- package/lib/transform/preprocessor/sortBy.js.map +0 -1
- package/lib/transform/preprocessor/subset.d.ts +0 -7
- package/lib/transform/preprocessor/subset.js +0 -35
- package/lib/transform/preprocessor/subset.js.map +0 -1
- package/lib/transform/preprocessor/tree.d.ts +0 -4
- package/lib/transform/preprocessor/tree.js +0 -10
- package/lib/transform/preprocessor/tree.js.map +0 -1
- package/lib/transform/preprocessor/voronoi.d.ts +0 -4
- package/lib/transform/preprocessor/voronoi.js +0 -24
- package/lib/transform/preprocessor/voronoi.js.map +0 -1
- package/lib/transform/preprocessor/wordCloud.d.ts +0 -6
- package/lib/transform/preprocessor/wordCloud.js +0 -112
- package/lib/transform/preprocessor/wordCloud.js.map +0 -1
- package/lib/transform/statistic/Select.d.ts +0 -9
- package/lib/transform/statistic/Select.js +0 -62
- package/lib/transform/statistic/Select.js.map +0 -1
- package/lib/transform/statistic/SelectX.d.ts +0 -7
- package/lib/transform/statistic/SelectX.js +0 -27
- package/lib/transform/statistic/SelectX.js.map +0 -1
- package/lib/transform/statistic/SelectY.d.ts +0 -7
- package/lib/transform/statistic/SelectY.js +0 -27
- package/lib/transform/statistic/SelectY.js.map +0 -1
- package/lib/transform/statistic/dodgeX.d.ts +0 -9
- package/lib/transform/statistic/dodgeX.js +0 -60
- package/lib/transform/statistic/dodgeX.js.map +0 -1
- package/lib/transform/statistic/groupX.d.ts +0 -8
- package/lib/transform/statistic/groupX.js +0 -89
- package/lib/transform/statistic/groupX.js.map +0 -1
- package/lib/transform/statistic/jitter.d.ts +0 -9
- package/lib/transform/statistic/jitter.js +0 -45
- package/lib/transform/statistic/jitter.js.map +0 -1
- package/lib/transform/statistic/jitterY.d.ts +0 -8
- package/lib/transform/statistic/jitterY.js +0 -31
- package/lib/transform/statistic/jitterY.js.map +0 -1
- package/lib/transform/statistic/normalizeY.d.ts +0 -9
- package/lib/transform/statistic/normalizeY.js +0 -74
- package/lib/transform/statistic/normalizeY.js.map +0 -1
- package/lib/transform/statistic/stackEnter.d.ts +0 -13
- package/lib/transform/statistic/stackEnter.js +0 -63
- package/lib/transform/statistic/stackEnter.js.map +0 -1
- package/lib/transform/statistic/stackY.d.ts +0 -9
- package/lib/transform/statistic/stackY.js +0 -59
- package/lib/transform/statistic/stackY.js.map +0 -1
- package/lib/transform/statistic/symmetryY.d.ts +0 -8
- package/lib/transform/statistic/symmetryY.js +0 -65
- package/lib/transform/statistic/symmetryY.js.map +0 -1
- package/lib/transform/statistic/utils.d.ts +0 -9
- package/lib/transform/statistic/utils.js +0 -77
- package/lib/transform/statistic/utils.js.map +0 -1
- package/lib/transform/utils/arc/arc.js.map +0 -1
- package/lib/transform/utils/arc/index.d.ts +0 -2
- package/lib/transform/utils/arc/index.js.map +0 -1
- package/lib/transform/utils/arc/sort.js.map +0 -1
- package/lib/transform/utils/arc/types.js.map +0 -1
- package/lib/transform/utils/d3-cloud/index.js.map +0 -1
- package/lib/transform/utils/d3-sankey/align.js.map +0 -1
- package/lib/transform/utils/d3-sankey/constant.js.map +0 -1
- package/lib/transform/utils/d3-sankey/index.js.map +0 -1
- package/lib/transform/utils/d3-sankey/sankey.js.map +0 -1
- package/lib/transform/utils/flow.js.map +0 -1
- package/lib/transform/utils/memo.js.map +0 -1
- package/src/mark/geometry/edge.ts +0 -40
- package/src/mark/geometry/node.ts +0 -36
- package/src/mark/geometry/schema.ts +0 -105
- package/src/renderer/canvas.ts +0 -27
- package/src/renderer/index.ts +0 -1
- package/src/shape/edge/edge.ts +0 -15
- package/src/shape/node/point.ts +0 -32
- package/src/shape/node/polygon.ts +0 -12
- package/src/shape/schema/box.ts +0 -96
- package/src/spec/statistic.ts +0 -135
- package/src/transform/inference/maybeArrayField.ts +0 -55
- package/src/transform/inference/maybeKey.ts +0 -29
- package/src/transform/inference/maybeSeries.ts +0 -26
- package/src/transform/inference/maybeSize.ts +0 -18
- package/src/transform/inference/maybeStackY.ts +0 -38
- package/src/transform/inference/maybeTitleX.ts +0 -26
- package/src/transform/inference/maybeTooltip.ts +0 -35
- package/src/transform/inference/maybeTooltipPosition.ts +0 -16
- package/src/transform/inference/maybeTooltipY.ts +0 -16
- package/src/transform/inference/maybeZeroX.ts +0 -18
- package/src/transform/inference/maybeZeroY.ts +0 -18
- package/src/transform/inference/maybeZeroY1.ts +0 -18
- package/src/transform/preprocessor/arc.ts +0 -21
- package/src/transform/preprocessor/cluster.ts +0 -56
- package/src/transform/preprocessor/connector.ts +0 -22
- package/src/transform/preprocessor/fetch.ts +0 -32
- package/src/transform/preprocessor/filterBy.ts +0 -24
- package/src/transform/preprocessor/fold.ts +0 -32
- package/src/transform/preprocessor/pick.ts +0 -17
- package/src/transform/preprocessor/rename.ts +0 -29
- package/src/transform/preprocessor/sankey.ts +0 -105
- package/src/transform/preprocessor/sortBy.ts +0 -28
- package/src/transform/preprocessor/subset.ts +0 -40
- package/src/transform/preprocessor/tree.ts +0 -12
- package/src/transform/preprocessor/voronoi.ts +0 -30
- package/src/transform/preprocessor/wordCloud.ts +0 -115
- package/src/transform/statistic/dodgeX.ts +0 -56
- package/src/transform/statistic/groupX.ts +0 -91
- package/src/transform/statistic/jitter.ts +0 -49
- package/src/transform/statistic/jitterY.ts +0 -32
- package/src/transform/statistic/normalizeY.ts +0 -69
- package/src/transform/statistic/select.ts +0 -58
- package/src/transform/statistic/selectX.ts +0 -17
- package/src/transform/statistic/selectY.ts +0 -17
- package/src/transform/statistic/stackEnter.ts +0 -65
- package/src/transform/statistic/stackY.ts +0 -58
- package/src/transform/statistic/symmetryY.ts +0 -59
- package/src/transform/statistic/utils.ts +0 -120
- package/src/transform/utils/arc/index.ts +0 -2
- package/src/transform/utils/memo.ts +0 -79
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.domainOf = exports.applyOrder = exports.normalizeComparator = exports.createGroups = void 0;
|
|
4
|
+
const d3_array_1 = require("d3-array");
|
|
5
|
+
const helper_1 = require("../../utils/helper");
|
|
6
|
+
const array_1 = require("../../utils/array");
|
|
7
|
+
const helper_2 = require("./helper");
|
|
8
|
+
function createGroups(groupBy, I, mark) {
|
|
9
|
+
const { encode } = mark;
|
|
10
|
+
const G = normalizeGroupBy(groupBy)
|
|
11
|
+
.map((k) => { var _a; return [k, (_a = (0, helper_2.columnOf)(encode, k)) === null || _a === void 0 ? void 0 : _a[0]]; })
|
|
12
|
+
.filter(([, column]) => (0, helper_1.defined)(column));
|
|
13
|
+
const key = (i) => G.map(([, V]) => V[i]).join('-');
|
|
14
|
+
return Array.from((0, d3_array_1.group)(I, key).values());
|
|
15
|
+
}
|
|
16
|
+
exports.createGroups = createGroups;
|
|
17
|
+
function normalizeComparator(order) {
|
|
18
|
+
if (Array.isArray(order))
|
|
19
|
+
return createFieldsOrder(order);
|
|
20
|
+
if (typeof order === 'function')
|
|
21
|
+
return createFunctionOrder(order);
|
|
22
|
+
if (order === 'series')
|
|
23
|
+
return createSeriesOrder;
|
|
24
|
+
if (order === 'value')
|
|
25
|
+
return createValueOrder;
|
|
26
|
+
if (order === 'sum')
|
|
27
|
+
return createSumOrder;
|
|
28
|
+
if (order === 'maxIndex')
|
|
29
|
+
return createMaxIndexOrder;
|
|
30
|
+
return () => null;
|
|
31
|
+
}
|
|
32
|
+
exports.normalizeComparator = normalizeComparator;
|
|
33
|
+
function applyOrder(groups, comparator) {
|
|
34
|
+
for (const group of groups) {
|
|
35
|
+
group.sort(comparator);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.applyOrder = applyOrder;
|
|
39
|
+
function domainOf(value, scale) {
|
|
40
|
+
return (scale === null || scale === void 0 ? void 0 : scale.domain) || Array.from(new Set(value));
|
|
41
|
+
}
|
|
42
|
+
exports.domainOf = domainOf;
|
|
43
|
+
function normalizeGroupBy(groupBy) {
|
|
44
|
+
if (Array.isArray(groupBy))
|
|
45
|
+
return groupBy;
|
|
46
|
+
return [groupBy];
|
|
47
|
+
}
|
|
48
|
+
function createSeriesOrder(data, Y, S) {
|
|
49
|
+
return ascendingComparator((i) => S[i]);
|
|
50
|
+
}
|
|
51
|
+
function createFunctionOrder(order) {
|
|
52
|
+
return (data, Y, S) => {
|
|
53
|
+
return ascendingComparator((i) => order(data[i]));
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function createFieldsOrder(order) {
|
|
57
|
+
return (data, Y, S) => {
|
|
58
|
+
return (i, j) => order.reduce((eq, f) => (eq !== 0 ? eq : (0, d3_array_1.ascending)(data[i][f], data[j][f])), 0);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function createValueOrder(data, Y, S) {
|
|
62
|
+
return ascendingComparator((i) => Y[i]);
|
|
63
|
+
}
|
|
64
|
+
function createSumOrder(data, Y, S) {
|
|
65
|
+
const I = (0, array_1.indexOf)(data);
|
|
66
|
+
const groups = Array.from((0, d3_array_1.group)(I, (i) => S[+i]).entries());
|
|
67
|
+
const seriesSum = new Map(groups.map(([k, GI]) => [k, GI.reduce((s, i) => s + +Y[i])]));
|
|
68
|
+
return ascendingComparator((i) => seriesSum.get(S[i]));
|
|
69
|
+
}
|
|
70
|
+
function createMaxIndexOrder(data, Y, S) {
|
|
71
|
+
const I = (0, array_1.indexOf)(data);
|
|
72
|
+
const groups = Array.from((0, d3_array_1.group)(I, (i) => S[+i]).entries());
|
|
73
|
+
const seriesMaxIndex = new Map(groups.map(([k, GI]) => [k, (0, d3_array_1.maxIndex)(GI, (i) => Y[i])]));
|
|
74
|
+
return ascendingComparator((i) => seriesMaxIndex.get(S[i]));
|
|
75
|
+
}
|
|
76
|
+
function ascendingComparator(order) {
|
|
77
|
+
return (i, j) => (0, d3_array_1.ascending)(order(i), order(j));
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"src/","sources":["transform/utils/order.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Coordinate } from '@antv/coord';
|
|
2
2
|
export declare function isTranspose(coordinate: Coordinate): boolean;
|
|
3
3
|
export declare function isPolar(coordinate: Coordinate): boolean;
|
|
4
|
+
export declare function isHelix(coordinate: Coordinate): boolean;
|
|
4
5
|
export declare function isParallel(coordinate: Coordinate): boolean;
|
|
5
6
|
export declare function isFisheye(coordinate: Coordinate): boolean;
|
|
7
|
+
export declare function isCircular(coordinate: Coordinate): boolean;
|
package/lib/utils/coordinate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFisheye = exports.isParallel = exports.isPolar = exports.isTranspose = void 0;
|
|
3
|
+
exports.isCircular = exports.isFisheye = exports.isParallel = exports.isHelix = exports.isPolar = exports.isTranspose = void 0;
|
|
4
4
|
function isTranspose(coordinate) {
|
|
5
5
|
const { transformations } = coordinate.getOptions();
|
|
6
6
|
const transposes = transformations
|
|
@@ -14,6 +14,11 @@ function isPolar(coordinate) {
|
|
|
14
14
|
return transformations.some(([type]) => type === 'polar');
|
|
15
15
|
}
|
|
16
16
|
exports.isPolar = isPolar;
|
|
17
|
+
function isHelix(coordinate) {
|
|
18
|
+
const { transformations } = coordinate.getOptions();
|
|
19
|
+
return transformations.some(([type]) => type === 'helix');
|
|
20
|
+
}
|
|
21
|
+
exports.isHelix = isHelix;
|
|
17
22
|
function isParallel(coordinate) {
|
|
18
23
|
const { transformations } = coordinate.getOptions();
|
|
19
24
|
return transformations.some(([type]) => type === 'parallel');
|
|
@@ -24,4 +29,8 @@ function isFisheye(coordinate) {
|
|
|
24
29
|
return transformations.some(([type]) => type === 'fisheye');
|
|
25
30
|
}
|
|
26
31
|
exports.isFisheye = isFisheye;
|
|
32
|
+
function isCircular(coordinate) {
|
|
33
|
+
return isHelix(coordinate) || isParallel(coordinate);
|
|
34
|
+
}
|
|
35
|
+
exports.isCircular = isCircular;
|
|
27
36
|
//# sourceMappingURL=coordinate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate.js","sourceRoot":"src/","sources":["utils/coordinate.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,UAAsB;IAChD,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,MAAM,UAAU,GAAG,eAAe;SAC/B,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;SACrB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAND,kCAMC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;AAC5D,CAAC;AAHD,0BAGC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AAC/D,CAAC;AAHD,gCAGC;AAED,SAAgB,SAAS,CAAC,UAAsB;IAC9C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAC9D,CAAC;AAHD,8BAGC"}
|
|
1
|
+
{"version":3,"file":"coordinate.js","sourceRoot":"src/","sources":["utils/coordinate.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,UAAsB;IAChD,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,MAAM,UAAU,GAAG,eAAe;SAC/B,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;SACrB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAND,kCAMC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;AAC5D,CAAC;AAHD,0BAGC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;AAC5D,CAAC;AAHD,0BAGC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AAC/D,CAAC;AAHD,gCAGC;AAED,SAAgB,SAAS,CAAC,UAAsB;IAC9C,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IACpD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAC9D,CAAC;AAHD,8BAGC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;AACvD,CAAC;AAFD,gCAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g2",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.2",
|
|
4
4
|
"description": "the Grammar of Graphics in Javascript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
17
18
|
"start": "genji-notebook dev",
|
|
18
19
|
"deploy": "genji-notebook deploy",
|
|
19
20
|
"clean": "rimraf lib esm dist",
|
|
@@ -21,7 +22,9 @@
|
|
|
21
22
|
"size": "limit-size",
|
|
22
23
|
"lint": "eslint ./src ./__tests__ && prettier ./src ./__tests__ --check ",
|
|
23
24
|
"fix": "eslint ./src ./__tests__ --fix && prettier ./src ./__tests__ --write ",
|
|
24
|
-
"test": "
|
|
25
|
+
"test": "run-s test:integration test:unit",
|
|
26
|
+
"test:unit": "jest --config jest.config.js --coverage",
|
|
27
|
+
"test:integration": "jest --config jest.node.config.js",
|
|
25
28
|
"test-live": "cross-env DEBUG_MODE=1 jest --watch",
|
|
26
29
|
"build:umd": "rimraf ./dist && rollup -c && npm run size",
|
|
27
30
|
"build:cjs": "rimraf ./lib && tsc --module commonjs --outDir lib",
|
|
@@ -43,23 +46,32 @@
|
|
|
43
46
|
"animation"
|
|
44
47
|
],
|
|
45
48
|
"devDependencies": {
|
|
49
|
+
"@antv/g-plugin-rough-canvas-renderer": "^1.7.9",
|
|
50
|
+
"@antv/g-plugin-rough-svg-renderer": "^1.7.9",
|
|
51
|
+
"@antv/g-svg": "^1.8.6",
|
|
46
52
|
"@commitlint/cli": "^11.0.0",
|
|
47
53
|
"@rollup/plugin-commonjs": "^21.0.2",
|
|
48
54
|
"@types/d3-array": "^3.0.2",
|
|
49
55
|
"@types/d3-shape": "^3.0.2",
|
|
50
56
|
"@types/jest": "^26.0.20",
|
|
57
|
+
"@types/pixelmatch": "^5.2.4",
|
|
58
|
+
"@types/pngjs": "^6.0.1",
|
|
51
59
|
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
|
52
60
|
"@typescript-eslint/parser": "^4.18.0",
|
|
61
|
+
"canvas": "^2.9.1",
|
|
53
62
|
"cross-env": "^7.0.3",
|
|
54
63
|
"eslint": "^7.22.0",
|
|
55
64
|
"eslint-plugin-import": "^2.22.1",
|
|
56
|
-
"genji-notebook": "^0.1.
|
|
65
|
+
"genji-notebook": "^0.1.1",
|
|
57
66
|
"husky": "^7.0.0",
|
|
58
67
|
"jest": "^26.0.1",
|
|
59
68
|
"jest-electron": "^0.1.12",
|
|
69
|
+
"jsdom": "^19.0.0",
|
|
60
70
|
"limit-size": "^0.1.4",
|
|
61
71
|
"lint-staged": "^10.5.4",
|
|
62
72
|
"npm-run-all": "^4.1.5",
|
|
73
|
+
"pixelmatch": "5.3.0",
|
|
74
|
+
"pngjs": "^6.0.0",
|
|
63
75
|
"prettier": "^2.2.1",
|
|
64
76
|
"reflect-metadata": "^0.1.13",
|
|
65
77
|
"rimraf": "^3.0.2",
|
|
@@ -70,7 +82,9 @@
|
|
|
70
82
|
"rollup-plugin-uglify": "^6.0.4",
|
|
71
83
|
"rollup-plugin-visualizer": "^5.6.0",
|
|
72
84
|
"ts-jest": "^26.5.1",
|
|
73
|
-
"typescript": "^4.1.5"
|
|
85
|
+
"typescript": "^4.1.5",
|
|
86
|
+
"vite": "^3.1.0",
|
|
87
|
+
"xmlserializer": "^0.6.1"
|
|
74
88
|
},
|
|
75
89
|
"lint-staged": {
|
|
76
90
|
"*.{ts,tsx}": [
|
|
@@ -103,16 +117,18 @@
|
|
|
103
117
|
},
|
|
104
118
|
"dependencies": {
|
|
105
119
|
"@antv/coord": "^0.4.1",
|
|
106
|
-
"@antv/g": "^5.
|
|
107
|
-
"@antv/g-canvas": "^1.
|
|
108
|
-
"@antv/g-plugin-dragndrop": "^1.
|
|
120
|
+
"@antv/g": "^5.7.4",
|
|
121
|
+
"@antv/g-canvas": "^1.7.4",
|
|
122
|
+
"@antv/g-plugin-dragndrop": "^1.6.1",
|
|
109
123
|
"@antv/gui": "^0.4.3-alpha.5",
|
|
124
|
+
"@antv/path-util": "^3.0.1",
|
|
110
125
|
"@antv/scale": "^0.4.7",
|
|
111
126
|
"@antv/util": "^2.0.17",
|
|
112
127
|
"d3-array": "^3.1.1",
|
|
113
128
|
"d3-dsv": "^3.0.1",
|
|
114
129
|
"d3-hierarchy": "^3.1.2",
|
|
115
130
|
"d3-shape": "^3.1.0",
|
|
116
|
-
"d3-voronoi": "^1.1.4"
|
|
131
|
+
"d3-voronoi": "^1.1.4",
|
|
132
|
+
"d3-format": "^3.1.0"
|
|
117
133
|
}
|
|
118
134
|
}
|
package/src/.DS_Store
ADDED
|
Binary file
|
package/src/adjust/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { Pack
|
|
1
|
+
export { Pack } from './pack';
|
|
2
|
+
export type { PackOptions } from './pack';
|
package/src/animation/fadeIn.ts
CHANGED
|
@@ -10,16 +10,14 @@ export type FadeInOptions = Animation;
|
|
|
10
10
|
export const FadeIn: AC<FadeInOptions> = (options) => {
|
|
11
11
|
return (from, to, value, coordinate, defaults) => {
|
|
12
12
|
const [shape] = from;
|
|
13
|
-
|
|
14
|
-
// todo: When G's bug fixed, modify to `shape.style`.
|
|
15
|
-
const { fillOpacity, strokeOpacity, opacity } = shape.parsedStyle;
|
|
13
|
+
const { fillOpacity, strokeOpacity, opacity } = shape.style;
|
|
16
14
|
|
|
17
15
|
const keyframes = [
|
|
18
16
|
{ fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
|
|
19
17
|
{
|
|
20
|
-
fillOpacity
|
|
21
|
-
strokeOpacity
|
|
22
|
-
opacity
|
|
18
|
+
fillOpacity,
|
|
19
|
+
strokeOpacity,
|
|
20
|
+
opacity,
|
|
23
21
|
},
|
|
24
22
|
];
|
|
25
23
|
|
package/src/animation/fadeOut.ts
CHANGED
|
@@ -10,12 +10,12 @@ export type FadeOutOptions = Animation;
|
|
|
10
10
|
export const FadeOut: AC<FadeOutOptions> = (options) => {
|
|
11
11
|
return (from, to, value, coordinate, defaults) => {
|
|
12
12
|
const [shape] = from;
|
|
13
|
-
const { fillOpacity, strokeOpacity, opacity } = shape.
|
|
13
|
+
const { fillOpacity, strokeOpacity, opacity } = shape.style;
|
|
14
14
|
const keyframes = [
|
|
15
15
|
{
|
|
16
|
-
fillOpacity
|
|
17
|
-
strokeOpacity
|
|
18
|
-
opacity
|
|
16
|
+
fillOpacity,
|
|
17
|
+
strokeOpacity,
|
|
18
|
+
opacity,
|
|
19
19
|
},
|
|
20
20
|
{ fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
|
|
21
21
|
];
|
package/src/animation/index.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
export { ScaleInX
|
|
2
|
-
export { ScaleOutX
|
|
3
|
-
export { ScaleInY
|
|
4
|
-
export { ScaleOutY
|
|
5
|
-
export { FadeIn
|
|
6
|
-
export { FadeOut
|
|
7
|
-
export { Morphing
|
|
1
|
+
export { ScaleInX } from './scaleInX';
|
|
2
|
+
export { ScaleOutX } from './scaleOutX';
|
|
3
|
+
export { ScaleInY } from './scaleInY';
|
|
4
|
+
export { ScaleOutY } from './scaleOutY';
|
|
5
|
+
export { FadeIn } from './fadeIn';
|
|
6
|
+
export { FadeOut } from './fadeOut';
|
|
7
|
+
export { Morphing } from './morphing';
|
|
8
|
+
|
|
9
|
+
export type { ScaleInXOptions } from './scaleInX';
|
|
10
|
+
export type { ScaleOutXOptions } from './scaleOutX';
|
|
11
|
+
export type { ScaleInYOptions } from './scaleInY';
|
|
12
|
+
export type { ScaleOutYOptions } from './scaleOutY';
|
|
13
|
+
export type { FadeInOptions } from './fadeIn';
|
|
14
|
+
export type { FadeOutOptions } from './fadeOut';
|
|
15
|
+
export type { MorphingOptions } from './morphing';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertToPath,
|
|
3
3
|
DisplayObject,
|
|
4
|
-
|
|
4
|
+
IAnimation as GAnimation,
|
|
5
5
|
Path,
|
|
6
6
|
} from '@antv/g';
|
|
7
7
|
import { AnimationComponent as AC } from '../runtime';
|
|
@@ -158,15 +158,14 @@ function multipleToOne(
|
|
|
158
158
|
split: SplitFunction,
|
|
159
159
|
) {
|
|
160
160
|
const D = split(to, from.length);
|
|
161
|
-
|
|
162
|
-
const { fillOpacity, strokeOpacity, opacity } = to.parsedStyle;
|
|
161
|
+
const { fillOpacity, strokeOpacity, opacity } = to.style;
|
|
163
162
|
const keyframes = [
|
|
164
163
|
{ fillOpacity: 0, strokeOpacity: 0, opacity: 0 },
|
|
165
164
|
{ fillOpacity: 0, strokeOpacity: 0, opacity: 0, offset: 0.99 },
|
|
166
165
|
{
|
|
167
|
-
fillOpacity
|
|
168
|
-
strokeOpacity
|
|
169
|
-
opacity
|
|
166
|
+
fillOpacity,
|
|
167
|
+
strokeOpacity,
|
|
168
|
+
opacity,
|
|
170
169
|
},
|
|
171
170
|
];
|
|
172
171
|
const animation = to.animate(keyframes, timeEffect);
|
|
@@ -16,8 +16,12 @@ export const ScaleInX: AC<ScaleInXOptions> = (options) => {
|
|
|
16
16
|
return (from, to, value, coordinate, defaults) => {
|
|
17
17
|
const [shape] = from;
|
|
18
18
|
const { height } = shape.getBoundingClientRect();
|
|
19
|
-
const {
|
|
20
|
-
|
|
19
|
+
const {
|
|
20
|
+
transform: prefix,
|
|
21
|
+
fillOpacity,
|
|
22
|
+
strokeOpacity,
|
|
23
|
+
opacity,
|
|
24
|
+
} = shape.style;
|
|
21
25
|
const [transformOrigin, transform]: [[number, number], string] =
|
|
22
26
|
isTranspose(coordinate)
|
|
23
27
|
? [[0, height], `scale(1, ${ZERO})`] // left-bottom corner
|
|
@@ -34,13 +38,16 @@ export const ScaleInX: AC<ScaleInXOptions> = (options) => {
|
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
40
|
transform: `${prefix} ${transform}`.trimStart(),
|
|
37
|
-
fillOpacity
|
|
38
|
-
strokeOpacity
|
|
39
|
-
opacity
|
|
41
|
+
fillOpacity,
|
|
42
|
+
strokeOpacity,
|
|
43
|
+
opacity,
|
|
40
44
|
offset: 0.01,
|
|
41
45
|
},
|
|
42
46
|
{
|
|
43
47
|
transform: `${prefix} scale(1, 1)`.trimStart(),
|
|
48
|
+
fillOpacity,
|
|
49
|
+
strokeOpacity,
|
|
50
|
+
opacity,
|
|
44
51
|
},
|
|
45
52
|
];
|
|
46
53
|
|
|
@@ -16,8 +16,12 @@ export const ScaleInY: AC<ScaleInYOptions> = (options) => {
|
|
|
16
16
|
return (from, to, value, coordinate, defaults) => {
|
|
17
17
|
const [shape] = from;
|
|
18
18
|
const { height } = shape.getBoundingClientRect();
|
|
19
|
-
const {
|
|
20
|
-
|
|
19
|
+
const {
|
|
20
|
+
transform: prefix,
|
|
21
|
+
fillOpacity,
|
|
22
|
+
strokeOpacity,
|
|
23
|
+
opacity,
|
|
24
|
+
} = shape.style;
|
|
21
25
|
const [transformOrigin, transform]: [[number, number], string] =
|
|
22
26
|
isTranspose(coordinate)
|
|
23
27
|
? [[0, 0], `scale(${ZERO}, 1)`] // left-top corner
|
|
@@ -34,13 +38,16 @@ export const ScaleInY: AC<ScaleInYOptions> = (options) => {
|
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
40
|
transform: `${prefix} ${transform}`.trimStart(),
|
|
37
|
-
fillOpacity
|
|
38
|
-
strokeOpacity
|
|
39
|
-
opacity
|
|
41
|
+
fillOpacity,
|
|
42
|
+
strokeOpacity,
|
|
43
|
+
opacity,
|
|
40
44
|
offset: 0.01,
|
|
41
45
|
},
|
|
42
46
|
{
|
|
43
47
|
transform: `${prefix} scale(1, 1)`.trimStart(),
|
|
48
|
+
fillOpacity,
|
|
49
|
+
strokeOpacity,
|
|
50
|
+
opacity,
|
|
44
51
|
},
|
|
45
52
|
];
|
|
46
53
|
|
|
@@ -16,8 +16,12 @@ export const ScaleOutX: AC<ScaleOutXOptions> = (options) => {
|
|
|
16
16
|
return (from, to, value, coordinate, defaults) => {
|
|
17
17
|
const [shape] = from;
|
|
18
18
|
const { height } = shape.getBoundingClientRect();
|
|
19
|
-
const {
|
|
20
|
-
|
|
19
|
+
const {
|
|
20
|
+
transform: prefix,
|
|
21
|
+
fillOpacity,
|
|
22
|
+
strokeOpacity,
|
|
23
|
+
opacity,
|
|
24
|
+
} = shape.style;
|
|
21
25
|
const [transformOrigin, transform]: [[number, number], string] =
|
|
22
26
|
isTranspose(coordinate)
|
|
23
27
|
? [[0, height], `scale(1, ${ZERO})`] // left-bottom corner
|
|
@@ -31,9 +35,9 @@ export const ScaleOutX: AC<ScaleOutXOptions> = (options) => {
|
|
|
31
35
|
},
|
|
32
36
|
{
|
|
33
37
|
transform: `${prefix} ${transform}`.trimStart(),
|
|
34
|
-
fillOpacity
|
|
35
|
-
strokeOpacity
|
|
36
|
-
opacity
|
|
38
|
+
fillOpacity,
|
|
39
|
+
strokeOpacity,
|
|
40
|
+
opacity,
|
|
37
41
|
offset: 0.99,
|
|
38
42
|
},
|
|
39
43
|
{
|
|
@@ -16,8 +16,12 @@ export const ScaleOutY: AC<ScaleOutYOptions> = (options) => {
|
|
|
16
16
|
return (from, to, value, coordinate, defaults) => {
|
|
17
17
|
const [shape] = from;
|
|
18
18
|
const { height } = shape.getBoundingClientRect();
|
|
19
|
-
const {
|
|
20
|
-
|
|
19
|
+
const {
|
|
20
|
+
transform: prefix,
|
|
21
|
+
fillOpacity,
|
|
22
|
+
strokeOpacity,
|
|
23
|
+
opacity,
|
|
24
|
+
} = shape.style;
|
|
21
25
|
const [transformOrigin, transform]: [[number, number], string] =
|
|
22
26
|
isTranspose(coordinate)
|
|
23
27
|
? [[0, 0], `scale(${ZERO}, 1)`] // left-top corner
|
|
@@ -31,9 +35,9 @@ export const ScaleOutY: AC<ScaleOutYOptions> = (options) => {
|
|
|
31
35
|
},
|
|
32
36
|
{
|
|
33
37
|
transform: `${prefix} ${transform}`.trimStart(),
|
|
34
|
-
fillOpacity
|
|
35
|
-
strokeOpacity
|
|
36
|
-
opacity
|
|
38
|
+
fillOpacity,
|
|
39
|
+
strokeOpacity,
|
|
40
|
+
opacity,
|
|
37
41
|
offset: 0.99,
|
|
38
42
|
},
|
|
39
43
|
{
|
package/src/api/chart.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RendererPlugin, Canvas as GCanvas } from '@antv/g';
|
|
2
|
+
import { Renderer as CanvasRenderer } from '@antv/g-canvas';
|
|
3
|
+
import { Plugin as DragAndDropPlugin } from '@antv/g-plugin-dragndrop';
|
|
4
|
+
import { G2Context, render } from '../runtime';
|
|
3
5
|
import { ViewComposition } from '../spec';
|
|
4
6
|
import { Node } from './node';
|
|
5
7
|
import {
|
|
@@ -16,6 +18,7 @@ import {
|
|
|
16
18
|
} from './types';
|
|
17
19
|
import { mark, Mark } from './mark';
|
|
18
20
|
import { composition, Composition } from './composition';
|
|
21
|
+
import { library } from './library';
|
|
19
22
|
|
|
20
23
|
function normalizeContainer(container: string | HTMLElement): HTMLElement {
|
|
21
24
|
if (container === undefined) return document.createElement('div');
|
|
@@ -39,13 +42,31 @@ function normalizeRoot(node: Node) {
|
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
function valueOf(node: Node): Record<string, any> {
|
|
42
|
-
const value = clone(node.value);
|
|
43
45
|
return {
|
|
44
|
-
...value,
|
|
46
|
+
...node.value,
|
|
45
47
|
type: node.type,
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
|
|
51
|
+
function Canvas(
|
|
52
|
+
container: HTMLElement,
|
|
53
|
+
width: number,
|
|
54
|
+
height: number,
|
|
55
|
+
renderer = new CanvasRenderer(),
|
|
56
|
+
plugins = [],
|
|
57
|
+
) {
|
|
58
|
+
// DragAndDropPlugin is for interaction.
|
|
59
|
+
// It is OK to register more than one time, G will handle this.
|
|
60
|
+
plugins.push(new DragAndDropPlugin());
|
|
61
|
+
plugins.forEach((d) => renderer.registerPlugin(d));
|
|
62
|
+
return new GCanvas({
|
|
63
|
+
container,
|
|
64
|
+
width,
|
|
65
|
+
height,
|
|
66
|
+
renderer,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
49
70
|
export function optionsOf(node: Node): Record<string, any> {
|
|
50
71
|
const root = normalizeRoot(node);
|
|
51
72
|
const discovered: Node[] = [root];
|
|
@@ -70,6 +91,8 @@ export type ChartOptions = ViewComposition & {
|
|
|
70
91
|
container?: string | HTMLElement;
|
|
71
92
|
width?: number;
|
|
72
93
|
height?: number;
|
|
94
|
+
renderer?: CanvasRenderer;
|
|
95
|
+
plugins?: RendererPlugin[];
|
|
73
96
|
};
|
|
74
97
|
|
|
75
98
|
type ChartProps = Concrete<ViewComposition>;
|
|
@@ -100,17 +123,38 @@ export const props: NodePropertyDescriptor[] = [
|
|
|
100
123
|
|
|
101
124
|
@defineProps(props)
|
|
102
125
|
export class Chart extends Node<ChartOptions> {
|
|
103
|
-
private
|
|
126
|
+
private _container: HTMLElement;
|
|
127
|
+
|
|
128
|
+
private _context: G2Context;
|
|
104
129
|
|
|
105
130
|
constructor(options: ChartOptions = {}) {
|
|
106
131
|
const { container, ...rest } = options;
|
|
107
132
|
super(rest, 'view');
|
|
108
|
-
this.
|
|
133
|
+
this._container = normalizeContainer(container);
|
|
134
|
+
this._context = { library };
|
|
109
135
|
}
|
|
110
136
|
|
|
111
|
-
render() {
|
|
112
|
-
const
|
|
113
|
-
|
|
137
|
+
render(): Chart {
|
|
138
|
+
const options = optionsOf(this);
|
|
139
|
+
|
|
140
|
+
// Create canvas and library if it do not exist.
|
|
141
|
+
const { width = 640, height = 480, renderer, plugins } = options;
|
|
142
|
+
const {
|
|
143
|
+
canvas = Canvas(
|
|
144
|
+
document.createElement('div'),
|
|
145
|
+
width,
|
|
146
|
+
height,
|
|
147
|
+
renderer,
|
|
148
|
+
plugins,
|
|
149
|
+
),
|
|
150
|
+
} = this._context;
|
|
151
|
+
|
|
152
|
+
this._context.canvas = canvas;
|
|
153
|
+
|
|
154
|
+
const node = render(options, this._context);
|
|
155
|
+
if (node.parentNode !== this._container) {
|
|
156
|
+
this._container.append(node);
|
|
157
|
+
}
|
|
114
158
|
return this;
|
|
115
159
|
}
|
|
116
160
|
|
|
@@ -118,7 +162,11 @@ export class Chart extends Node<ChartOptions> {
|
|
|
118
162
|
return optionsOf(this);
|
|
119
163
|
}
|
|
120
164
|
|
|
121
|
-
node() {
|
|
122
|
-
return this.
|
|
165
|
+
node(): HTMLElement {
|
|
166
|
+
return this._container;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
context(): G2Context {
|
|
170
|
+
return this._context;
|
|
123
171
|
}
|
|
124
172
|
}
|
package/src/api/index.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createLibrary } from '../stdlib';
|
|
2
|
+
import { G2ComponentNamespaces, G2Component } from '../runtime';
|
|
3
|
+
|
|
4
|
+
export const library = createLibrary();
|
|
5
|
+
|
|
6
|
+
// @todo Warn if override existing key.
|
|
7
|
+
export function register(
|
|
8
|
+
key: `${G2ComponentNamespaces}.${any}`,
|
|
9
|
+
component: G2Component,
|
|
10
|
+
) {
|
|
11
|
+
Object.assign(library, { [key]: component });
|
|
12
|
+
}
|
package/src/api/mark/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Polygon,
|
|
10
10
|
Image,
|
|
11
11
|
Text,
|
|
12
|
-
|
|
12
|
+
Box,
|
|
13
13
|
AnnotationText,
|
|
14
14
|
AnnotationLineX,
|
|
15
15
|
AnnotationLineY,
|
|
@@ -30,7 +30,7 @@ export interface Mark {
|
|
|
30
30
|
polygon(): Polygon;
|
|
31
31
|
image(): Image;
|
|
32
32
|
text(): Text;
|
|
33
|
-
|
|
33
|
+
box(): Box;
|
|
34
34
|
annotationText(): AnnotationText;
|
|
35
35
|
annotationLineX(): AnnotationLineX;
|
|
36
36
|
annotationLineY(): AnnotationLineY;
|
|
@@ -51,7 +51,7 @@ export const mark = {
|
|
|
51
51
|
polygon: Polygon,
|
|
52
52
|
image: Image,
|
|
53
53
|
text: Text,
|
|
54
|
-
|
|
54
|
+
box: Box,
|
|
55
55
|
annotationText: AnnotationText,
|
|
56
56
|
annotationLineX: AnnotationLineX,
|
|
57
57
|
annotationLineY: AnnotationLineY,
|
package/src/api/mark/mark.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
PolygonGeometry,
|
|
9
9
|
ImageGeometry,
|
|
10
10
|
TextGeometry,
|
|
11
|
-
|
|
11
|
+
BoxGeometry,
|
|
12
12
|
LineGeometry,
|
|
13
13
|
AnnotationText as AnnotationTextSpec,
|
|
14
14
|
AnnotationLineX as AnnotationLineXSpec,
|
|
@@ -63,8 +63,8 @@ export interface Text extends API<Concrete<TextGeometry>, Text> {
|
|
|
63
63
|
type: 'text';
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
export interface
|
|
67
|
-
type: '
|
|
66
|
+
export interface Box extends API<Concrete<BoxGeometry>, Box> {
|
|
67
|
+
type: 'box';
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export interface AnnotationText
|
|
@@ -120,6 +120,7 @@ export const props: NodePropertyDescriptor[] = [
|
|
|
120
120
|
{ name: 'paddingRight', type: 'value' },
|
|
121
121
|
{ name: 'paddingBottom', type: 'value' },
|
|
122
122
|
{ name: 'paddingTop', type: 'value' },
|
|
123
|
+
{ name: 'label', type: 'array', key: 'labels' },
|
|
123
124
|
];
|
|
124
125
|
|
|
125
126
|
@defineProps(props)
|
|
@@ -193,9 +194,9 @@ export class Text extends Node<TextGeometry> {
|
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
@defineProps(props)
|
|
196
|
-
export class
|
|
197
|
+
export class Box extends Node<BoxGeometry> {
|
|
197
198
|
constructor() {
|
|
198
|
-
super({}, '
|
|
199
|
+
super({}, 'box');
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
|