@antv/g2 5.0.0-alpha.2 → 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 -5
- package/dist/g2.min.js +2 -5
- 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 +10 -0
- package/esm/animation/index.js +6 -0
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/morphing.d.ts +4 -4
- package/esm/animation/morphing.js +52 -36
- 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/utils.d.ts +3 -0
- package/esm/animation/utils.js +20 -0
- package/esm/animation/utils.js.map +1 -1
- package/esm/animation/waveIn.d.ts +7 -0
- package/esm/animation/waveIn.js +88 -0
- package/esm/animation/waveIn.js.map +1 -0
- package/esm/animation/zoomIn.d.ts +4 -0
- package/esm/animation/zoomIn.js +39 -0
- package/esm/animation/zoomIn.js.map +1 -0
- package/esm/animation/zoomOut.d.ts +4 -0
- package/esm/animation/zoomOut.js +34 -0
- package/esm/animation/zoomOut.js.map +1 -0
- package/esm/api/chart.d.ts +17 -4
- package/esm/api/chart.js +72 -9
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/facetCircle.d.ts +18 -0
- package/esm/api/composition/facetCircle.js +27 -0
- package/esm/api/composition/facetCircle.js.map +1 -0
- package/esm/api/composition/facetRect.d.ts +18 -0
- package/esm/api/composition/facetRect.js +27 -0
- package/esm/api/composition/facetRect.js.map +1 -0
- 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 +25 -19
- package/esm/api/composition/index.js +17 -13
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +18 -0
- package/esm/api/composition/repeatMatrix.js +27 -0
- package/esm/api/composition/repeatMatrix.js.map +1 -0
- package/esm/api/composition/spaceFlex.d.ts +13 -0
- package/esm/api/composition/spaceFlex.js +19 -0
- package/esm/api/composition/spaceFlex.js.map +1 -0
- package/esm/api/composition/spaceLayer.d.ts +13 -0
- package/esm/api/composition/spaceLayer.js +19 -0
- package/esm/api/composition/spaceLayer.js.map +1 -0
- package/esm/api/composition/timingKeyframe.d.ts +12 -0
- package/esm/api/composition/timingKeyframe.js +19 -0
- package/esm/api/composition/timingKeyframe.js.map +1 -0
- 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 +33 -17
- package/esm/api/mark/index.js +17 -9
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +69 -21
- package/esm/api/mark/mark.js +116 -51
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +6 -12
- package/esm/api/node.d.ts +7 -0
- package/esm/api/node.js +56 -1
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.d.ts +2 -2
- package/esm/api/props.js +33 -12
- package/esm/api/props.js.map +1 -1
- package/esm/api/types.d.ts +7 -7
- package/esm/component/axis.d.ts +9 -3
- package/esm/component/axis.js +178 -112
- 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 +6 -2
- package/esm/component/legendCategory.js +7 -10
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +2 -1
- package/esm/component/legendContinuous.js +4 -3
- package/esm/component/legendContinuous.js.map +1 -1
- package/esm/component/title.d.ts +1 -1
- package/esm/component/utils.d.ts +1 -1
- package/esm/composition/facetCircle.d.ts +7 -0
- package/esm/composition/facetCircle.js +85 -0
- package/esm/composition/facetCircle.js.map +1 -0
- package/esm/composition/facetRect.d.ts +31 -0
- package/esm/composition/facetRect.js +304 -0
- package/esm/composition/facetRect.js.map +1 -0
- package/esm/composition/index.d.ts +12 -12
- package/esm/composition/index.js +6 -6
- package/esm/composition/index.js.map +1 -1
- package/esm/composition/mark.d.ts +1 -1
- package/esm/composition/mark.js +15 -4
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.d.ts +8 -0
- package/esm/composition/repeatMatrix.js +149 -0
- package/esm/composition/repeatMatrix.js.map +1 -0
- package/esm/composition/spaceFlex.d.ts +7 -0
- package/esm/composition/spaceFlex.js +40 -0
- package/esm/composition/spaceFlex.js.map +1 -0
- package/esm/composition/spaceLayer.d.ts +7 -0
- package/esm/composition/spaceLayer.js +32 -0
- package/esm/composition/spaceLayer.js.map +1 -0
- package/esm/composition/timingKeyframe.d.ts +7 -0
- package/esm/composition/timingKeyframe.js +74 -0
- package/esm/composition/timingKeyframe.js.map +1 -0
- package/esm/composition/utils.d.ts +1 -1
- package/esm/composition/view.d.ts +1 -1
- package/esm/composition/view.js +3 -3
- package/esm/composition/view.js.map +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/index.d.ts +2 -0
- package/esm/coordinate/index.js +1 -0
- package/esm/coordinate/index.js.map +1 -1
- package/esm/coordinate/parallel.d.ts +1 -1
- package/esm/coordinate/polar.d.ts +1 -1
- package/esm/coordinate/radial.d.ts +7 -0
- package/esm/coordinate/radial.js +12 -0
- package/esm/coordinate/radial.js.map +1 -0
- 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 +6 -2
- package/esm/data/index.js +3 -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 +6 -1
- package/esm/data/wordCloud.js +102 -7
- package/esm/data/wordCloud.js.map +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/service/triggerInfoSelection.js.map +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/activeRegion.js.map +1 -1
- package/esm/interaction/builtin/brush.d.ts +1 -1
- package/esm/interaction/builtin/brush.js.map +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/builtin/brushHighlight.js.map +1 -1
- package/esm/interaction/builtin/brushVisible.d.ts +1 -1
- package/esm/interaction/builtin/brushVisible.js.map +1 -1
- package/esm/interaction/builtin/elementActive.d.ts +1 -3
- package/esm/interaction/builtin/elementActive.js.map +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +1 -3
- package/esm/interaction/builtin/elementHighlight.js.map +1 -1
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +3 -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 -5
- 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/elementListHighlight.js.map +1 -1
- package/esm/interaction/builtin/elementSelected.d.ts +2 -4
- package/esm/interaction/builtin/elementSelected.js.map +1 -1
- package/esm/interaction/builtin/ellipsisText.d.ts +1 -1
- package/esm/interaction/builtin/ellipsisText.js.map +1 -1
- package/esm/interaction/builtin/fisheye.d.ts +7 -1
- package/esm/interaction/builtin/fisheye.js.map +1 -1
- package/esm/interaction/builtin/legendActive.d.ts +1 -1
- package/esm/interaction/builtin/legendActive.js.map +1 -1
- package/esm/interaction/builtin/legendHighlight.d.ts +1 -1
- package/esm/interaction/builtin/legendHighlight.js.map +1 -1
- package/esm/interaction/builtin/tooltip.d.ts +9 -5
- package/esm/interaction/builtin/tooltip.js.map +1 -1
- package/esm/interaction/index.d.ts +9 -18
- package/esm/interaction/index.js +41 -17
- 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.d.ts +4 -0
- package/esm/interaction/native/chartIndex.js +172 -0
- package/esm/interaction/native/chartIndex.js.map +1 -0
- package/esm/interaction/native/elementHighlight.d.ts +10 -0
- package/esm/interaction/native/elementHighlight.js +69 -0
- 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/elementHighlightByX.d.ts +8 -0
- package/esm/interaction/native/elementHighlightByX.js +13 -0
- package/esm/interaction/native/elementHighlightByX.js.map +1 -0
- package/esm/interaction/native/elementSelect.d.ts +11 -0
- package/esm/interaction/native/elementSelect.js +111 -0
- package/esm/interaction/native/elementSelect.js.map +1 -0
- package/esm/interaction/native/elementSelectByColor.d.ts +1 -0
- package/esm/interaction/native/elementSelectByColor.js +9 -0
- package/esm/interaction/native/elementSelectByColor.js.map +1 -0
- package/esm/interaction/native/elementSelectByX.d.ts +1 -0
- package/esm/interaction/native/elementSelectByX.js +9 -0
- package/esm/interaction/native/elementSelectByX.js.map +1 -0
- package/esm/interaction/native/fisheye.d.ts +4 -0
- package/esm/interaction/native/fisheye.js +47 -0
- package/esm/interaction/native/fisheye.js.map +1 -0
- 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 +28 -0
- package/esm/interaction/native/utils.js +173 -0
- package/esm/interaction/native/utils.js.map +1 -0
- package/esm/interaction/types.d.ts +16 -16
- package/esm/label-transform/dodgeY.d.ts +7 -0
- package/esm/label-transform/dodgeY.js +75 -0
- package/esm/label-transform/dodgeY.js.map +1 -0
- package/esm/label-transform/hideOverlap.d.ts +4 -0
- package/esm/label-transform/hideOverlap.js +48 -0
- package/esm/label-transform/hideOverlap.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -0
- package/esm/label-transform/index.js +5 -0
- package/esm/label-transform/index.js.map +1 -0
- 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 +4 -0
- package/esm/mark/area.js +72 -0
- package/esm/mark/area.js.map +1 -0
- package/esm/mark/box.d.ts +34 -0
- package/esm/mark/box.js +88 -0
- package/esm/mark/box.js.map +1 -0
- 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 +9 -0
- package/esm/mark/cell.js +43 -0
- package/esm/mark/cell.js.map +1 -0
- package/esm/mark/connector.d.ts +4 -0
- package/esm/mark/connector.js +18 -0
- package/esm/mark/connector.js.map +1 -0
- 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 +4 -0
- package/esm/mark/image.js +34 -0
- package/esm/mark/image.js.map +1 -0
- package/esm/mark/index.d.ts +52 -0
- package/esm/mark/index.js +28 -0
- package/esm/mark/index.js.map +1 -0
- package/esm/mark/interval.d.ts +12 -0
- package/esm/mark/interval.js +70 -0
- package/esm/mark/interval.js.map +1 -0
- package/esm/mark/line.d.ts +7 -0
- package/esm/mark/line.js +84 -0
- package/esm/mark/line.js.map +1 -0
- package/esm/mark/lineX.d.ts +4 -0
- package/esm/mark/lineX.js +24 -0
- package/esm/mark/lineX.js.map +1 -0
- package/esm/mark/lineY.d.ts +4 -0
- package/esm/mark/lineY.js +24 -0
- package/esm/mark/lineY.js.map +1 -0
- package/esm/mark/link.d.ts +7 -0
- package/esm/mark/link.js +32 -0
- package/esm/mark/link.js.map +1 -0
- 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 +9 -0
- package/esm/mark/point.js +82 -0
- package/esm/mark/point.js.map +1 -0
- package/esm/mark/polygon.d.ts +7 -0
- package/esm/mark/polygon.js +39 -0
- package/esm/mark/polygon.js.map +1 -0
- package/esm/mark/range.d.ts +8 -0
- package/esm/mark/range.js +44 -0
- package/esm/mark/range.js.map +1 -0
- package/esm/mark/rangeX.d.ts +4 -0
- package/esm/mark/rangeX.js +17 -0
- package/esm/mark/rangeX.js.map +1 -0
- package/esm/mark/rangeY.d.ts +4 -0
- package/esm/mark/rangeY.js +17 -0
- package/esm/mark/rangeY.js.map +1 -0
- package/esm/mark/rect.d.ts +4 -0
- package/esm/mark/rect.js +30 -0
- package/esm/mark/rect.js.map +1 -0
- 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 +4 -0
- package/esm/mark/text.js +37 -0
- package/esm/mark/text.js.map +1 -0
- 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 +56 -3
- package/esm/mark/utils.js +98 -8
- package/esm/mark/utils.js.map +1 -1
- package/esm/mark/vector.d.ts +8 -0
- package/esm/mark/vector.js +39 -0
- package/esm/mark/vector.js.map +1 -0
- 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 +7 -0
- package/esm/palette/divergingGreenRed.js +26 -0
- package/esm/palette/divergingGreenRed.js.map +1 -0
- package/esm/palette/divergingGreenYellow.d.ts +7 -0
- package/esm/palette/divergingGreenYellow.js +26 -0
- package/esm/palette/divergingGreenYellow.js.map +1 -0
- package/esm/palette/divergingRedBlue.d.ts +7 -0
- package/esm/palette/divergingRedBlue.js +26 -0
- package/esm/palette/divergingRedBlue.js.map +1 -0
- package/esm/palette/divergingRedPurple.d.ts +7 -0
- package/esm/palette/divergingRedPurple.js +26 -0
- package/esm/palette/divergingRedPurple.js.map +1 -0
- package/esm/palette/index.d.ts +36 -0
- package/esm/palette/index.js +18 -0
- package/esm/palette/index.js.map +1 -1
- package/esm/palette/sequentialBlue.d.ts +7 -0
- package/esm/palette/sequentialBlue.js +18 -0
- package/esm/palette/sequentialBlue.js.map +1 -0
- package/esm/palette/sequentialDarkBlue.d.ts +7 -0
- package/esm/palette/sequentialDarkBlue.js +18 -0
- package/esm/palette/sequentialDarkBlue.js.map +1 -0
- package/esm/palette/sequentialDarkGreen.d.ts +7 -0
- package/esm/palette/sequentialDarkGreen.js +18 -0
- package/esm/palette/sequentialDarkGreen.js.map +1 -0
- package/esm/palette/sequentialGreen.d.ts +7 -0
- package/esm/palette/sequentialGreen.js +18 -0
- package/esm/palette/sequentialGreen.js.map +1 -0
- package/esm/palette/sequentialGreenBlue.d.ts +7 -0
- package/esm/palette/sequentialGreenBlue.js +18 -0
- package/esm/palette/sequentialGreenBlue.js.map +1 -0
- package/esm/palette/sequentialGrey.d.ts +7 -0
- package/esm/palette/sequentialGrey.js +18 -0
- package/esm/palette/sequentialGrey.js.map +1 -0
- package/esm/palette/sequentialOrange.d.ts +7 -0
- package/esm/palette/sequentialOrange.js +18 -0
- package/esm/palette/sequentialOrange.js.map +1 -0
- package/esm/palette/sequentialPink.d.ts +7 -0
- package/esm/palette/sequentialPink.js +18 -0
- package/esm/palette/sequentialPink.js.map +1 -0
- package/esm/palette/sequentialPinkPurple.d.ts +7 -0
- package/esm/palette/sequentialPinkPurple.js +18 -0
- package/esm/palette/sequentialPinkPurple.js.map +1 -0
- package/esm/palette/sequentialPurple.d.ts +7 -0
- package/esm/palette/sequentialPurple.js +18 -0
- package/esm/palette/sequentialPurple.js.map +1 -0
- package/esm/palette/sequentialRed.d.ts +7 -0
- package/esm/palette/sequentialRed.js +18 -0
- package/esm/palette/sequentialRed.js.map +1 -0
- package/esm/palette/sequentialYellow.d.ts +7 -0
- package/esm/palette/sequentialYellow.js +18 -0
- package/esm/palette/sequentialYellow.js.map +1 -0
- package/esm/palette/sequentialYellowGreen.d.ts +7 -0
- package/esm/palette/sequentialYellowGreen.js +18 -0
- package/esm/palette/sequentialYellowGreen.js.map +1 -0
- package/esm/palette/sequentialYellowOrange.d.ts +7 -0
- package/esm/palette/sequentialYellowOrange.js +18 -0
- package/esm/palette/sequentialYellowOrange.js.map +1 -0
- package/esm/runtime/component.d.ts +1 -1
- package/esm/runtime/component.js +47 -34
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/constant.d.ts +8 -0
- package/esm/runtime/constant.js +9 -0
- package/esm/runtime/constant.js.map +1 -0
- package/esm/runtime/coordinate.d.ts +8 -7
- package/esm/runtime/coordinate.js +25 -27
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/index.d.ts +2 -1
- package/esm/runtime/index.js +2 -1
- package/esm/runtime/index.js.map +1 -1
- package/esm/runtime/layout.js +107 -17
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/mark.d.ts +3 -3
- package/esm/runtime/mark.js +38 -41
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.d.ts +4 -2
- package/esm/runtime/plot.js +397 -147
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +4 -0
- package/esm/runtime/render.js +67 -5
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +5 -4
- package/esm/runtime/scale.js +218 -170
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +2 -0
- package/esm/runtime/transform.js +48 -2
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +52 -59
- package/esm/runtime/types/component.d.ts +36 -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 +52 -36
- package/esm/runtime/types/theme.d.ts +84 -0
- package/esm/runtime/types/theme.js +2 -0
- package/esm/runtime/types/theme.js.map +1 -0
- 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/index.d.ts +4 -0
- package/esm/scale/index.js +2 -0
- package/esm/scale/index.js.map +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 +4 -0
- package/esm/scale/sequential.js +6 -0
- package/esm/scale/sequential.js.map +1 -0
- package/esm/scale/sqrt.d.ts +4 -0
- package/esm/scale/sqrt.js +6 -0
- package/esm/scale/sqrt.js.map +1 -0
- 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/area.js +3 -3
- package/esm/shape/area/area.js.map +1 -1
- package/esm/shape/area/curve.d.ts +8 -0
- package/esm/shape/area/curve.js +167 -0
- package/esm/shape/area/curve.js.map +1 -0
- package/esm/shape/area/smooth.d.ts +5 -0
- package/esm/shape/area/smooth.js +23 -0
- package/esm/shape/area/smooth.js.map +1 -0
- package/esm/shape/area/step.d.ts +3 -0
- package/esm/shape/area/step.js +9 -0
- package/esm/shape/area/step.js.map +1 -0
- package/esm/shape/box/box.d.ts +1 -1
- package/esm/shape/box/box.js +10 -7
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.d.ts +11 -0
- package/esm/shape/connector/connector.js +92 -0
- package/esm/shape/connector/connector.js.map +1 -0
- package/esm/shape/createElement.d.ts +5 -0
- package/esm/shape/createElement.js +16 -0
- package/esm/shape/createElement.js.map +1 -0
- package/esm/shape/image/image.d.ts +1 -1
- package/esm/shape/image/image.js +10 -5
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/index.d.ts +20 -16
- package/esm/shape/index.js +12 -10
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +12 -0
- package/esm/shape/interval/color.js +92 -0
- package/esm/shape/interval/color.js.map +1 -0
- package/esm/shape/interval/funnel.d.ts +1 -1
- package/esm/shape/interval/funnel.js +3 -5
- package/esm/shape/interval/funnel.js.map +1 -1
- package/esm/shape/interval/hollow.d.ts +6 -0
- package/esm/shape/interval/hollow.js +9 -0
- package/esm/shape/interval/hollow.js.map +1 -0
- 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/interval/rect.js +3 -3
- package/esm/shape/interval/rect.js.map +1 -1
- package/esm/shape/label/label.d.ts +1 -1
- package/esm/shape/label/label.js +24 -90
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position.d.ts +25 -0
- package/esm/shape/label/position.js +169 -0
- package/esm/shape/label/position.js.map +1 -0
- package/esm/shape/line/curve.d.ts +8 -0
- package/esm/shape/line/curve.js +123 -0
- package/esm/shape/line/curve.js.map +1 -0
- package/esm/shape/line/hv.d.ts +1 -1
- package/esm/shape/line/hv.js +3 -3
- package/esm/shape/line/hv.js.map +1 -1
- package/esm/shape/line/hvh.d.ts +1 -1
- package/esm/shape/line/hvh.js +3 -3
- package/esm/shape/line/hvh.js.map +1 -1
- package/esm/shape/line/line.d.ts +1 -1
- package/esm/shape/line/line.js +3 -3
- package/esm/shape/line/line.js.map +1 -1
- package/esm/shape/line/smooth.d.ts +1 -1
- package/esm/shape/line/smooth.js +3 -3
- package/esm/shape/line/smooth.js.map +1 -1
- package/esm/shape/line/vh.d.ts +1 -1
- package/esm/shape/line/vh.js +3 -3
- package/esm/shape/line/vh.js.map +1 -1
- package/esm/shape/lineXY/line.d.ts +3 -0
- package/esm/shape/lineXY/line.js +60 -0
- package/esm/shape/lineXY/line.js.map +1 -0
- package/esm/shape/link/arc.d.ts +1 -1
- package/esm/shape/link/arc.js +7 -3
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.d.ts +1 -7
- package/esm/shape/link/link.js +10 -6
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.d.ts +6 -0
- package/esm/shape/link/smooth.js +43 -0
- package/esm/shape/link/smooth.js.map +1 -0
- package/esm/shape/link/vhv.d.ts +2 -2
- package/esm/shape/link/vhv.js +9 -5
- 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/bowtie.js +3 -3
- package/esm/shape/point/bowtie.js.map +1 -1
- package/esm/shape/point/color.d.ts +11 -0
- package/esm/shape/point/color.js +69 -0
- package/esm/shape/point/color.js.map +1 -0
- package/esm/shape/point/cross.d.ts +1 -1
- package/esm/shape/point/cross.js +3 -3
- package/esm/shape/point/cross.js.map +1 -1
- package/esm/shape/point/diamond.d.ts +1 -1
- package/esm/shape/point/diamond.js +3 -3
- package/esm/shape/point/diamond.js.map +1 -1
- package/esm/shape/point/hexagon.d.ts +1 -1
- package/esm/shape/point/hexagon.js +3 -3
- package/esm/shape/point/hexagon.js.map +1 -1
- package/esm/shape/point/hollow.d.ts +6 -0
- package/esm/shape/point/hollow.js +9 -0
- package/esm/shape/point/hollow.js.map +1 -0
- package/esm/shape/point/hollowBowtie.d.ts +1 -1
- package/esm/shape/point/hollowBowtie.js +3 -3
- package/esm/shape/point/hollowBowtie.js.map +1 -1
- package/esm/shape/point/hollowDiamond.d.ts +1 -1
- package/esm/shape/point/hollowDiamond.js +3 -3
- package/esm/shape/point/hollowDiamond.js.map +1 -1
- package/esm/shape/point/hollowHexagon.d.ts +1 -1
- package/esm/shape/point/hollowHexagon.js +3 -3
- package/esm/shape/point/hollowHexagon.js.map +1 -1
- package/esm/shape/point/hollowSquare.d.ts +1 -1
- package/esm/shape/point/hollowSquare.js +3 -3
- package/esm/shape/point/hollowSquare.js.map +1 -1
- package/esm/shape/point/hollowTriangle.d.ts +1 -1
- package/esm/shape/point/hollowTriangle.js +3 -3
- package/esm/shape/point/hollowTriangle.js.map +1 -1
- package/esm/shape/point/hollowTriangleDown.d.ts +1 -1
- package/esm/shape/point/hollowTriangleDown.js +3 -3
- package/esm/shape/point/hollowTriangleDown.js.map +1 -1
- package/esm/shape/point/hyphen.d.ts +1 -1
- package/esm/shape/point/hyphen.js +3 -3
- package/esm/shape/point/hyphen.js.map +1 -1
- package/esm/shape/point/line.d.ts +1 -1
- package/esm/shape/point/line.js +3 -3
- package/esm/shape/point/line.js.map +1 -1
- package/esm/shape/point/plus.d.ts +1 -1
- package/esm/shape/point/plus.js +3 -3
- package/esm/shape/point/plus.js.map +1 -1
- package/esm/shape/point/point.d.ts +1 -1
- package/esm/shape/point/point.js +3 -3
- package/esm/shape/point/point.js.map +1 -1
- package/esm/shape/point/square.d.ts +1 -1
- package/esm/shape/point/square.js +3 -3
- package/esm/shape/point/square.js.map +1 -1
- package/esm/shape/point/symbol.js +3 -2
- package/esm/shape/point/symbol.js.map +1 -1
- package/esm/shape/point/tick.d.ts +1 -1
- package/esm/shape/point/tick.js +3 -3
- package/esm/shape/point/tick.js.map +1 -1
- package/esm/shape/point/triangle.d.ts +1 -1
- package/esm/shape/point/triangle.js +3 -3
- package/esm/shape/point/triangle.js.map +1 -1
- package/esm/shape/point/triangleDown.d.ts +1 -1
- package/esm/shape/point/triangleDown.js +3 -3
- package/esm/shape/point/triangleDown.js.map +1 -1
- package/esm/shape/polygon/polygon.d.ts +1 -1
- package/esm/shape/polygon/polygon.js +8 -5
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.d.ts +1 -1
- package/esm/shape/polygon/ribbon.js +8 -5
- 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 +7 -0
- package/esm/shape/text/badge.js +79 -0
- package/esm/shape/text/badge.js.map +1 -0
- package/esm/shape/text/text.d.ts +1 -1
- package/esm/shape/text/text.js +18 -12
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +29 -22
- package/esm/shape/utils.js +68 -19
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.d.ts +1 -7
- package/esm/shape/vector/vector.js +10 -7
- 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 +73 -24
- package/esm/spec/coordinate.d.ts +23 -16
- package/esm/spec/data.d.ts +47 -25
- package/esm/spec/encode.d.ts +7 -7
- package/esm/spec/geometry.d.ts +103 -35
- package/esm/spec/index.d.ts +2 -2
- package/esm/spec/index.js +1 -1
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/interaction.d.ts +45 -31
- package/esm/spec/labelTransform.d.ts +17 -0
- package/esm/spec/labelTransform.js +2 -0
- package/esm/spec/labelTransform.js.map +1 -0
- package/esm/spec/palette.d.ts +59 -5
- package/esm/spec/scale.d.ts +25 -18
- package/esm/spec/theme.d.ts +5 -5
- package/esm/spec/title.d.ts +1 -1
- package/esm/spec/transform.d.ts +80 -22
- package/esm/stdlib/index.js +46 -186
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/dark.d.ts +6 -0
- package/esm/theme/dark.js +346 -0
- package/esm/theme/dark.js.map +1 -0
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.d.ts +1 -2
- package/esm/theme/light.js +324 -7
- 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 +8 -0
- package/esm/transform/diffY.js +43 -0
- package/esm/transform/diffY.js.map +1 -0
- package/esm/transform/dodgeX.d.ts +1 -1
- package/esm/transform/flexX.d.ts +1 -1
- package/esm/transform/group.d.ts +10 -0
- package/esm/transform/group.js +23 -0
- package/esm/transform/group.js.map +1 -0
- package/esm/transform/groupColor.d.ts +7 -0
- package/esm/transform/groupColor.js +9 -0
- package/esm/transform/groupColor.js.map +1 -0
- 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 -3
- package/esm/transform/groupX.js +2 -80
- package/esm/transform/groupX.js.map +1 -1
- package/esm/transform/groupY.d.ts +7 -0
- package/esm/transform/groupY.js +9 -0
- package/esm/transform/groupY.js.map +1 -0
- package/esm/transform/index.d.ts +42 -8
- package/esm/transform/index.js +21 -4
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/jitter.d.ts +2 -1
- package/esm/transform/jitter.js +14 -5
- package/esm/transform/jitter.js.map +1 -1
- package/esm/transform/jitterX.d.ts +8 -0
- package/esm/transform/jitterX.js +25 -0
- package/esm/transform/jitterX.js.map +1 -0
- 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 +7 -0
- package/esm/transform/maybeIdentityX.js +18 -0
- package/esm/transform/maybeIdentityX.js.map +1 -0
- package/esm/transform/maybeIdentityY.d.ts +7 -0
- package/esm/transform/maybeIdentityY.js +18 -0
- package/esm/transform/maybeIdentityY.js.map +1 -0
- 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/maybeTitle.js +18 -0
- 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 +7 -0
- package/esm/transform/maybeTupleX.js +16 -0
- package/esm/transform/maybeTupleX.js.map +1 -0
- package/esm/transform/maybeTupleY.d.ts +7 -0
- package/esm/transform/maybeTupleY.js +16 -0
- package/esm/transform/maybeTupleY.js.map +1 -0
- 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 +6 -0
- package/esm/transform/maybeZeroPadding.js +14 -0
- package/esm/transform/maybeZeroPadding.js.map +1 -0
- package/esm/transform/maybeZeroX.d.ts +1 -1
- package/esm/transform/maybeZeroX.js +1 -0
- package/esm/transform/maybeZeroX.js.map +1 -1
- package/esm/transform/maybeZeroY.d.ts +1 -1
- package/esm/transform/maybeZeroY.js +1 -0
- package/esm/transform/maybeZeroY.js.map +1 -1
- package/esm/transform/maybeZeroY1.d.ts +1 -1
- package/esm/transform/normalizeY.d.ts +1 -1
- package/esm/transform/normalizeY.js +13 -10
- package/esm/transform/normalizeY.js.map +1 -1
- package/esm/transform/pack.d.ts +8 -0
- package/esm/transform/pack.js +56 -0
- package/esm/transform/pack.js.map +1 -0
- package/esm/transform/sort.d.ts +14 -0
- package/esm/transform/sort.js +64 -0
- package/esm/transform/sort.js.map +1 -0
- package/esm/transform/sortColor.d.ts +7 -0
- package/esm/transform/sortColor.js +9 -0
- package/esm/transform/sortColor.js.map +1 -0
- package/esm/transform/sortX.d.ts +2 -3
- package/esm/transform/sortX.js +3 -54
- package/esm/transform/sortX.js.map +1 -1
- package/esm/transform/sortY.d.ts +7 -0
- package/esm/transform/sortY.js +9 -0
- package/esm/transform/sortY.js.map +1 -0
- 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.d.ts +2 -0
- package/esm/utils/coordinate.js +11 -1
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/event.d.ts +16 -0
- package/esm/utils/event.js +35 -0
- package/esm/utils/event.js.map +1 -0
- package/esm/utils/helper.d.ts +7 -2
- package/esm/utils/helper.js +21 -2
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/selection.d.ts +6 -4
- package/esm/utils/selection.js +24 -11
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.d.ts +26 -0
- package/esm/utils/size.js +63 -0
- package/esm/utils/size.js.map +1 -0
- package/esm/utils/string.d.ts +12 -0
- package/esm/utils/string.js +19 -0
- package/esm/utils/string.js.map +1 -0
- package/esm/utils/vector.d.ts +8 -2
- package/esm/utils/vector.js +10 -3
- package/esm/utils/vector.js.map +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 +10 -0
- package/lib/animation/index.js +13 -1
- package/lib/animation/index.js.map +1 -1
- package/lib/animation/morphing.d.ts +4 -4
- package/lib/animation/morphing.js +51 -35
- 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/utils.d.ts +3 -0
- package/lib/animation/utils.js +22 -1
- package/lib/animation/utils.js.map +1 -1
- package/lib/animation/waveIn.d.ts +7 -0
- package/lib/animation/waveIn.js +92 -0
- package/lib/animation/waveIn.js.map +1 -0
- package/lib/animation/zoomIn.d.ts +4 -0
- package/lib/animation/zoomIn.js +43 -0
- package/lib/animation/zoomIn.js.map +1 -0
- package/lib/animation/zoomOut.d.ts +4 -0
- package/lib/animation/zoomOut.js +38 -0
- package/lib/animation/zoomOut.js.map +1 -0
- package/lib/api/chart.d.ts +17 -4
- package/lib/api/chart.js +73 -9
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/facetCircle.d.ts +18 -0
- package/lib/api/composition/facetCircle.js +30 -0
- package/lib/api/composition/facetCircle.js.map +1 -0
- package/lib/api/composition/facetRect.d.ts +18 -0
- package/lib/api/composition/facetRect.js +30 -0
- package/lib/api/composition/facetRect.js.map +1 -0
- 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 +25 -19
- package/lib/api/composition/index.js +25 -19
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +18 -0
- package/lib/api/composition/repeatMatrix.js +30 -0
- package/lib/api/composition/repeatMatrix.js.map +1 -0
- package/lib/api/composition/spaceFlex.d.ts +13 -0
- package/lib/api/composition/spaceFlex.js +22 -0
- package/lib/api/composition/spaceFlex.js.map +1 -0
- package/lib/api/composition/spaceLayer.d.ts +13 -0
- package/lib/api/composition/spaceLayer.js +22 -0
- package/lib/api/composition/spaceLayer.js.map +1 -0
- package/lib/api/composition/timingKeyframe.d.ts +12 -0
- package/lib/api/composition/timingKeyframe.js +22 -0
- package/lib/api/composition/timingKeyframe.js.map +1 -0
- 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 +33 -17
- package/lib/api/mark/index.js +16 -8
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +69 -21
- package/lib/api/mark/mark.js +117 -52
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +6 -12
- package/lib/api/node.d.ts +7 -0
- package/lib/api/node.js +56 -1
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.d.ts +2 -2
- package/lib/api/props.js +32 -11
- package/lib/api/props.js.map +1 -1
- package/lib/api/types.d.ts +7 -7
- package/lib/component/axis.d.ts +9 -3
- package/lib/component/axis.js +177 -111
- 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 +6 -2
- package/lib/component/legendCategory.js +7 -10
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +2 -1
- package/lib/component/legendContinuous.js +4 -3
- package/lib/component/legendContinuous.js.map +1 -1
- package/lib/component/title.d.ts +1 -1
- package/lib/component/utils.d.ts +1 -1
- package/lib/composition/facetCircle.d.ts +7 -0
- package/lib/composition/facetCircle.js +89 -0
- package/lib/composition/facetCircle.js.map +1 -0
- package/lib/composition/facetRect.d.ts +31 -0
- package/lib/composition/facetRect.js +309 -0
- package/lib/composition/facetRect.js.map +1 -0
- package/lib/composition/index.d.ts +12 -12
- package/lib/composition/index.js +13 -13
- package/lib/composition/index.js.map +1 -1
- package/lib/composition/mark.d.ts +1 -1
- package/lib/composition/mark.js +15 -4
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.d.ts +8 -0
- package/lib/composition/repeatMatrix.js +153 -0
- package/lib/composition/repeatMatrix.js.map +1 -0
- package/lib/composition/spaceFlex.d.ts +7 -0
- package/lib/composition/spaceFlex.js +44 -0
- package/lib/composition/spaceFlex.js.map +1 -0
- package/lib/composition/spaceLayer.d.ts +7 -0
- package/lib/composition/spaceLayer.js +36 -0
- package/lib/composition/spaceLayer.js.map +1 -0
- package/lib/composition/timingKeyframe.d.ts +7 -0
- package/lib/composition/timingKeyframe.js +78 -0
- package/lib/composition/timingKeyframe.js.map +1 -0
- package/lib/composition/utils.d.ts +1 -1
- package/lib/composition/view.d.ts +1 -1
- package/lib/composition/view.js +3 -3
- package/lib/composition/view.js.map +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/index.d.ts +2 -0
- package/lib/coordinate/index.js +3 -1
- package/lib/coordinate/index.js.map +1 -1
- package/lib/coordinate/parallel.d.ts +1 -1
- package/lib/coordinate/polar.d.ts +1 -1
- package/lib/coordinate/radial.d.ts +7 -0
- package/lib/coordinate/radial.js +16 -0
- package/lib/coordinate/radial.js.map +1 -0
- 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 +6 -2
- package/lib/data/index.js +7 -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 +6 -1
- package/lib/data/wordCloud.js +106 -6
- package/lib/data/wordCloud.js.map +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/service/triggerInfoSelection.js.map +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/activeRegion.js.map +1 -1
- package/lib/interaction/builtin/brush.d.ts +1 -1
- package/lib/interaction/builtin/brush.js.map +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/builtin/brushHighlight.js.map +1 -1
- package/lib/interaction/builtin/brushVisible.d.ts +1 -1
- package/lib/interaction/builtin/brushVisible.js.map +1 -1
- package/lib/interaction/builtin/elementActive.d.ts +1 -3
- package/lib/interaction/builtin/elementActive.js.map +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +1 -3
- package/lib/interaction/builtin/elementHighlight.js.map +1 -1
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +3 -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 -5
- 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/elementListHighlight.js.map +1 -1
- package/lib/interaction/builtin/elementSelected.d.ts +2 -4
- package/lib/interaction/builtin/elementSelected.js.map +1 -1
- package/lib/interaction/builtin/ellipsisText.d.ts +1 -1
- package/lib/interaction/builtin/ellipsisText.js.map +1 -1
- package/lib/interaction/builtin/fisheye.d.ts +7 -1
- package/lib/interaction/builtin/fisheye.js.map +1 -1
- package/lib/interaction/builtin/legendActive.d.ts +1 -1
- package/lib/interaction/builtin/legendActive.js.map +1 -1
- package/lib/interaction/builtin/legendHighlight.d.ts +1 -1
- package/lib/interaction/builtin/legendHighlight.js.map +1 -1
- package/lib/interaction/builtin/tooltip.d.ts +9 -5
- package/lib/interaction/builtin/tooltip.js.map +1 -1
- package/lib/interaction/index.d.ts +9 -18
- package/lib/interaction/index.js +48 -32
- 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.d.ts +4 -0
- package/lib/interaction/native/chartIndex.js +176 -0
- package/lib/interaction/native/chartIndex.js.map +1 -0
- package/lib/interaction/native/elementHighlight.d.ts +10 -0
- package/lib/interaction/native/elementHighlight.js +74 -0
- 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/elementHighlightByX.d.ts +8 -0
- package/lib/interaction/native/elementHighlightByX.js +17 -0
- package/lib/interaction/native/elementHighlightByX.js.map +1 -0
- package/lib/interaction/native/elementSelect.d.ts +11 -0
- package/lib/interaction/native/elementSelect.js +116 -0
- package/lib/interaction/native/elementSelect.js.map +1 -0
- package/lib/interaction/native/elementSelectByColor.d.ts +1 -0
- package/lib/interaction/native/elementSelectByColor.js +13 -0
- package/lib/interaction/native/elementSelectByColor.js.map +1 -0
- package/lib/interaction/native/elementSelectByX.d.ts +1 -0
- package/lib/interaction/native/elementSelectByX.js +13 -0
- package/lib/interaction/native/elementSelectByX.js.map +1 -0
- package/lib/interaction/native/fisheye.d.ts +4 -0
- package/lib/interaction/native/fisheye.js +51 -0
- package/lib/interaction/native/fisheye.js.map +1 -0
- 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 +28 -0
- package/lib/interaction/native/utils.js +186 -0
- package/lib/interaction/native/utils.js.map +1 -0
- package/lib/interaction/types.d.ts +16 -16
- package/lib/label-transform/dodgeY.d.ts +7 -0
- package/lib/label-transform/dodgeY.js +79 -0
- package/lib/label-transform/dodgeY.js.map +1 -0
- package/lib/label-transform/hideOverlap.d.ts +4 -0
- package/lib/label-transform/hideOverlap.js +52 -0
- package/lib/label-transform/hideOverlap.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -0
- package/lib/label-transform/index.js +12 -0
- package/lib/label-transform/index.js.map +1 -0
- 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 +4 -0
- package/lib/mark/area.js +76 -0
- package/lib/mark/area.js.map +1 -0
- package/lib/mark/box.d.ts +34 -0
- package/lib/mark/box.js +92 -0
- package/lib/mark/box.js.map +1 -0
- 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 +9 -0
- package/lib/mark/cell.js +47 -0
- package/lib/mark/cell.js.map +1 -0
- package/lib/mark/connector.d.ts +4 -0
- package/lib/mark/connector.js +22 -0
- package/lib/mark/connector.js.map +1 -0
- 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 +4 -0
- package/lib/mark/image.js +38 -0
- package/lib/mark/image.js.map +1 -0
- package/lib/mark/index.d.ts +52 -0
- package/lib/mark/index.js +58 -0
- package/lib/mark/index.js.map +1 -0
- package/lib/mark/interval.d.ts +12 -0
- package/lib/mark/interval.js +74 -0
- package/lib/mark/interval.js.map +1 -0
- package/lib/mark/line.d.ts +7 -0
- package/lib/mark/line.js +88 -0
- package/lib/mark/line.js.map +1 -0
- package/lib/mark/lineX.d.ts +4 -0
- package/lib/mark/lineX.js +28 -0
- package/lib/mark/lineX.js.map +1 -0
- package/lib/mark/lineY.d.ts +4 -0
- package/lib/mark/lineY.js +28 -0
- package/lib/mark/lineY.js.map +1 -0
- package/lib/mark/link.d.ts +7 -0
- package/lib/mark/link.js +36 -0
- package/lib/mark/link.js.map +1 -0
- 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 +9 -0
- package/lib/mark/point.js +86 -0
- package/lib/mark/point.js.map +1 -0
- package/lib/mark/polygon.d.ts +7 -0
- package/lib/mark/polygon.js +43 -0
- package/lib/mark/polygon.js.map +1 -0
- package/lib/mark/range.d.ts +8 -0
- package/lib/mark/range.js +49 -0
- package/lib/mark/range.js.map +1 -0
- package/lib/mark/rangeX.d.ts +4 -0
- package/lib/mark/rangeX.js +21 -0
- package/lib/mark/rangeX.js.map +1 -0
- package/lib/mark/rangeY.d.ts +4 -0
- package/lib/mark/rangeY.js +21 -0
- package/lib/mark/rangeY.js.map +1 -0
- package/lib/mark/rect.d.ts +4 -0
- package/lib/mark/rect.js +34 -0
- package/lib/mark/rect.js.map +1 -0
- 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 +4 -0
- package/lib/mark/text.js +41 -0
- package/lib/mark/text.js.map +1 -0
- 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 +56 -3
- package/lib/mark/utils.js +109 -9
- package/lib/mark/utils.js.map +1 -1
- package/lib/mark/vector.d.ts +8 -0
- package/lib/mark/vector.js +43 -0
- package/lib/mark/vector.js.map +1 -0
- 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 +7 -0
- package/lib/palette/divergingGreenRed.js +30 -0
- package/lib/palette/divergingGreenRed.js.map +1 -0
- package/lib/palette/divergingGreenYellow.d.ts +7 -0
- package/lib/palette/divergingGreenYellow.js +30 -0
- package/lib/palette/divergingGreenYellow.js.map +1 -0
- package/lib/palette/divergingRedBlue.d.ts +7 -0
- package/lib/palette/divergingRedBlue.js +30 -0
- package/lib/palette/divergingRedBlue.js.map +1 -0
- package/lib/palette/divergingRedPurple.d.ts +7 -0
- package/lib/palette/divergingRedPurple.js +30 -0
- package/lib/palette/divergingRedPurple.js.map +1 -0
- package/lib/palette/index.d.ts +36 -0
- package/lib/palette/index.js +37 -1
- package/lib/palette/index.js.map +1 -1
- package/lib/palette/sequentialBlue.d.ts +7 -0
- package/lib/palette/sequentialBlue.js +22 -0
- package/lib/palette/sequentialBlue.js.map +1 -0
- package/lib/palette/sequentialDarkBlue.d.ts +7 -0
- package/lib/palette/sequentialDarkBlue.js +22 -0
- package/lib/palette/sequentialDarkBlue.js.map +1 -0
- package/lib/palette/sequentialDarkGreen.d.ts +7 -0
- package/lib/palette/sequentialDarkGreen.js +22 -0
- package/lib/palette/sequentialDarkGreen.js.map +1 -0
- package/lib/palette/sequentialGreen.d.ts +7 -0
- package/lib/palette/sequentialGreen.js +22 -0
- package/lib/palette/sequentialGreen.js.map +1 -0
- package/lib/palette/sequentialGreenBlue.d.ts +7 -0
- package/lib/palette/sequentialGreenBlue.js +22 -0
- package/lib/palette/sequentialGreenBlue.js.map +1 -0
- package/lib/palette/sequentialGrey.d.ts +7 -0
- package/lib/palette/sequentialGrey.js +22 -0
- package/lib/palette/sequentialGrey.js.map +1 -0
- package/lib/palette/sequentialOrange.d.ts +7 -0
- package/lib/palette/sequentialOrange.js +22 -0
- package/lib/palette/sequentialOrange.js.map +1 -0
- package/lib/palette/sequentialPink.d.ts +7 -0
- package/lib/palette/sequentialPink.js +22 -0
- package/lib/palette/sequentialPink.js.map +1 -0
- package/lib/palette/sequentialPinkPurple.d.ts +7 -0
- package/lib/palette/sequentialPinkPurple.js +22 -0
- package/lib/palette/sequentialPinkPurple.js.map +1 -0
- package/lib/palette/sequentialPurple.d.ts +7 -0
- package/lib/palette/sequentialPurple.js +22 -0
- package/lib/palette/sequentialPurple.js.map +1 -0
- package/lib/palette/sequentialRed.d.ts +7 -0
- package/lib/palette/sequentialRed.js +22 -0
- package/lib/palette/sequentialRed.js.map +1 -0
- package/lib/palette/sequentialYellow.d.ts +7 -0
- package/lib/palette/sequentialYellow.js +22 -0
- package/lib/palette/sequentialYellow.js.map +1 -0
- package/lib/palette/sequentialYellowGreen.d.ts +7 -0
- package/lib/palette/sequentialYellowGreen.js +22 -0
- package/lib/palette/sequentialYellowGreen.js.map +1 -0
- package/lib/palette/sequentialYellowOrange.d.ts +7 -0
- package/lib/palette/sequentialYellowOrange.js +22 -0
- package/lib/palette/sequentialYellowOrange.js.map +1 -0
- package/lib/runtime/component.d.ts +1 -1
- package/lib/runtime/component.js +46 -33
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/constant.d.ts +8 -0
- package/lib/runtime/constant.js +12 -0
- package/lib/runtime/constant.js.map +1 -0
- package/lib/runtime/coordinate.d.ts +8 -7
- package/lib/runtime/coordinate.js +27 -28
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/index.d.ts +2 -1
- package/lib/runtime/index.js +4 -1
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/layout.js +107 -17
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/mark.d.ts +3 -3
- package/lib/runtime/mark.js +36 -39
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.d.ts +4 -2
- package/lib/runtime/plot.js +396 -145
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +4 -0
- package/lib/runtime/render.js +69 -4
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +5 -4
- package/lib/runtime/scale.js +241 -169
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +2 -0
- package/lib/runtime/transform.js +51 -3
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +52 -59
- package/lib/runtime/types/component.d.ts +36 -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 +52 -36
- package/lib/runtime/types/theme.d.ts +84 -0
- package/lib/runtime/types/theme.js +3 -0
- package/lib/runtime/types/theme.js.map +1 -0
- 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/index.d.ts +4 -0
- package/lib/scale/index.js +5 -1
- package/lib/scale/index.js.map +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 +4 -0
- package/lib/scale/sequential.js +10 -0
- package/lib/scale/sequential.js.map +1 -0
- package/lib/scale/sqrt.d.ts +4 -0
- package/lib/scale/sqrt.js +10 -0
- package/lib/scale/sqrt.js.map +1 -0
- 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/area.js +3 -3
- package/lib/shape/area/area.js.map +1 -1
- package/lib/shape/area/curve.d.ts +8 -0
- package/lib/shape/area/curve.js +171 -0
- package/lib/shape/area/curve.js.map +1 -0
- package/lib/shape/area/smooth.d.ts +5 -0
- package/lib/shape/area/smooth.js +27 -0
- package/lib/shape/area/smooth.js.map +1 -0
- package/lib/shape/area/step.d.ts +3 -0
- package/lib/shape/area/step.js +13 -0
- package/lib/shape/area/step.js.map +1 -0
- package/lib/shape/box/box.d.ts +1 -1
- package/lib/shape/box/box.js +9 -6
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.d.ts +11 -0
- package/lib/shape/connector/connector.js +96 -0
- package/lib/shape/connector/connector.js.map +1 -0
- package/lib/shape/createElement.d.ts +5 -0
- package/lib/shape/createElement.js +20 -0
- package/lib/shape/createElement.js.map +1 -0
- package/lib/shape/image/image.d.ts +1 -1
- package/lib/shape/image/image.js +9 -4
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/index.d.ts +20 -16
- package/lib/shape/index.js +24 -19
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +12 -0
- package/lib/shape/interval/color.js +96 -0
- package/lib/shape/interval/color.js.map +1 -0
- package/lib/shape/interval/funnel.d.ts +1 -1
- package/lib/shape/interval/funnel.js +3 -5
- package/lib/shape/interval/funnel.js.map +1 -1
- package/lib/shape/interval/hollow.d.ts +6 -0
- package/lib/shape/interval/hollow.js +13 -0
- package/lib/shape/interval/hollow.js.map +1 -0
- 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/interval/rect.js +3 -3
- package/lib/shape/interval/rect.js.map +1 -1
- package/lib/shape/label/label.d.ts +1 -1
- package/lib/shape/label/label.js +45 -88
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position.d.ts +25 -0
- package/lib/shape/label/position.js +173 -0
- package/lib/shape/label/position.js.map +1 -0
- package/lib/shape/line/curve.d.ts +8 -0
- package/lib/shape/line/curve.js +127 -0
- package/lib/shape/line/curve.js.map +1 -0
- package/lib/shape/line/hv.d.ts +1 -1
- package/lib/shape/line/hv.js +3 -3
- package/lib/shape/line/hv.js.map +1 -1
- package/lib/shape/line/hvh.d.ts +1 -1
- package/lib/shape/line/hvh.js +3 -3
- package/lib/shape/line/hvh.js.map +1 -1
- package/lib/shape/line/line.d.ts +1 -1
- package/lib/shape/line/line.js +3 -3
- package/lib/shape/line/line.js.map +1 -1
- package/lib/shape/line/smooth.d.ts +1 -1
- package/lib/shape/line/smooth.js +3 -3
- package/lib/shape/line/smooth.js.map +1 -1
- package/lib/shape/line/vh.d.ts +1 -1
- package/lib/shape/line/vh.js +3 -3
- package/lib/shape/line/vh.js.map +1 -1
- package/lib/shape/lineXY/line.d.ts +3 -0
- package/lib/shape/lineXY/line.js +64 -0
- package/lib/shape/lineXY/line.js.map +1 -0
- package/lib/shape/link/arc.d.ts +1 -1
- package/lib/shape/link/arc.js +6 -2
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.d.ts +1 -7
- package/lib/shape/link/link.js +9 -5
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.d.ts +6 -0
- package/lib/shape/link/smooth.js +47 -0
- package/lib/shape/link/smooth.js.map +1 -0
- package/lib/shape/link/vhv.d.ts +2 -2
- package/lib/shape/link/vhv.js +10 -6
- 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/bowtie.js +3 -3
- package/lib/shape/point/bowtie.js.map +1 -1
- package/lib/shape/point/color.d.ts +11 -0
- package/lib/shape/point/color.js +96 -0
- package/lib/shape/point/color.js.map +1 -0
- package/lib/shape/point/cross.d.ts +1 -1
- package/lib/shape/point/cross.js +3 -3
- package/lib/shape/point/cross.js.map +1 -1
- package/lib/shape/point/diamond.d.ts +1 -1
- package/lib/shape/point/diamond.js +3 -3
- package/lib/shape/point/diamond.js.map +1 -1
- package/lib/shape/point/hexagon.d.ts +1 -1
- package/lib/shape/point/hexagon.js +3 -3
- package/lib/shape/point/hexagon.js.map +1 -1
- package/lib/shape/point/hollow.d.ts +6 -0
- package/lib/shape/point/hollow.js +13 -0
- package/lib/shape/point/hollow.js.map +1 -0
- package/lib/shape/point/hollowBowtie.d.ts +1 -1
- package/lib/shape/point/hollowBowtie.js +3 -3
- package/lib/shape/point/hollowBowtie.js.map +1 -1
- package/lib/shape/point/hollowDiamond.d.ts +1 -1
- package/lib/shape/point/hollowDiamond.js +3 -3
- package/lib/shape/point/hollowDiamond.js.map +1 -1
- package/lib/shape/point/hollowHexagon.d.ts +1 -1
- package/lib/shape/point/hollowHexagon.js +3 -3
- package/lib/shape/point/hollowHexagon.js.map +1 -1
- package/lib/shape/point/hollowSquare.d.ts +1 -1
- package/lib/shape/point/hollowSquare.js +3 -3
- package/lib/shape/point/hollowSquare.js.map +1 -1
- package/lib/shape/point/hollowTriangle.d.ts +1 -1
- package/lib/shape/point/hollowTriangle.js +3 -3
- package/lib/shape/point/hollowTriangle.js.map +1 -1
- package/lib/shape/point/hollowTriangleDown.d.ts +1 -1
- package/lib/shape/point/hollowTriangleDown.js +3 -3
- package/lib/shape/point/hollowTriangleDown.js.map +1 -1
- package/lib/shape/point/hyphen.d.ts +1 -1
- package/lib/shape/point/hyphen.js +3 -3
- package/lib/shape/point/hyphen.js.map +1 -1
- package/lib/shape/point/line.d.ts +1 -1
- package/lib/shape/point/line.js +3 -3
- package/lib/shape/point/line.js.map +1 -1
- package/lib/shape/point/plus.d.ts +1 -1
- package/lib/shape/point/plus.js +3 -3
- package/lib/shape/point/plus.js.map +1 -1
- package/lib/shape/point/point.d.ts +1 -1
- package/lib/shape/point/point.js +3 -3
- package/lib/shape/point/point.js.map +1 -1
- package/lib/shape/point/square.d.ts +1 -1
- package/lib/shape/point/square.js +3 -3
- package/lib/shape/point/square.js.map +1 -1
- package/lib/shape/point/symbol.js +3 -2
- package/lib/shape/point/symbol.js.map +1 -1
- package/lib/shape/point/tick.d.ts +1 -1
- package/lib/shape/point/tick.js +3 -3
- package/lib/shape/point/tick.js.map +1 -1
- package/lib/shape/point/triangle.d.ts +1 -1
- package/lib/shape/point/triangle.js +3 -3
- package/lib/shape/point/triangle.js.map +1 -1
- package/lib/shape/point/triangleDown.d.ts +1 -1
- package/lib/shape/point/triangleDown.js +3 -3
- package/lib/shape/point/triangleDown.js.map +1 -1
- package/lib/shape/polygon/polygon.d.ts +1 -1
- package/lib/shape/polygon/polygon.js +7 -4
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.d.ts +1 -1
- package/lib/shape/polygon/ribbon.js +7 -4
- 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 +7 -0
- package/lib/shape/text/badge.js +83 -0
- package/lib/shape/text/badge.js.map +1 -0
- package/lib/shape/text/text.d.ts +1 -1
- package/lib/shape/text/text.js +17 -11
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +29 -22
- package/lib/shape/utils.js +71 -18
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.d.ts +1 -7
- package/lib/shape/vector/vector.js +9 -6
- 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 +73 -24
- package/lib/spec/coordinate.d.ts +23 -16
- package/lib/spec/data.d.ts +47 -25
- package/lib/spec/encode.d.ts +7 -7
- package/lib/spec/geometry.d.ts +103 -35
- package/lib/spec/index.d.ts +2 -2
- package/lib/spec/index.js +1 -1
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/interaction.d.ts +45 -31
- package/lib/spec/labelTransform.d.ts +17 -0
- package/lib/spec/labelTransform.js +3 -0
- package/lib/spec/labelTransform.js.map +1 -0
- package/lib/spec/palette.d.ts +59 -5
- package/lib/spec/scale.d.ts +25 -18
- package/lib/spec/theme.d.ts +5 -5
- package/lib/spec/title.d.ts +1 -1
- package/lib/spec/transform.d.ts +80 -22
- package/lib/stdlib/index.js +20 -176
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/dark.d.ts +6 -0
- package/lib/theme/dark.js +350 -0
- package/lib/theme/dark.js.map +1 -0
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.d.ts +1 -2
- package/lib/theme/light.js +324 -7
- 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 +8 -0
- package/lib/transform/diffY.js +47 -0
- package/lib/transform/diffY.js.map +1 -0
- package/lib/transform/dodgeX.d.ts +1 -1
- package/lib/transform/flexX.d.ts +1 -1
- package/lib/transform/group.d.ts +10 -0
- package/lib/transform/group.js +27 -0
- package/lib/transform/group.js.map +1 -0
- package/lib/transform/groupColor.d.ts +7 -0
- package/lib/transform/groupColor.js +13 -0
- package/lib/transform/groupColor.js.map +1 -0
- 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 -3
- package/lib/transform/groupX.js +2 -80
- package/lib/transform/groupX.js.map +1 -1
- package/lib/transform/groupY.d.ts +7 -0
- package/lib/transform/groupY.js +13 -0
- package/lib/transform/groupY.js.map +1 -0
- package/lib/transform/index.d.ts +42 -8
- package/lib/transform/index.js +43 -9
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/jitter.d.ts +2 -1
- package/lib/transform/jitter.js +19 -9
- package/lib/transform/jitter.js.map +1 -1
- package/lib/transform/jitterX.d.ts +8 -0
- package/lib/transform/jitterX.js +29 -0
- package/lib/transform/jitterX.js.map +1 -0
- 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 +7 -0
- package/lib/transform/maybeIdentityX.js +22 -0
- package/lib/transform/maybeIdentityX.js.map +1 -0
- package/lib/transform/maybeIdentityY.d.ts +7 -0
- package/lib/transform/maybeIdentityY.js +22 -0
- package/lib/transform/maybeIdentityY.js.map +1 -0
- 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/maybeTitle.js +22 -0
- 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 +7 -0
- package/lib/transform/maybeTupleX.js +20 -0
- package/lib/transform/maybeTupleX.js.map +1 -0
- package/lib/transform/maybeTupleY.d.ts +7 -0
- package/lib/transform/maybeTupleY.js +20 -0
- package/lib/transform/maybeTupleY.js.map +1 -0
- 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 +6 -0
- package/lib/transform/maybeZeroPadding.js +18 -0
- package/lib/transform/maybeZeroPadding.js.map +1 -0
- package/lib/transform/maybeZeroX.d.ts +1 -1
- package/lib/transform/maybeZeroX.js +1 -0
- package/lib/transform/maybeZeroX.js.map +1 -1
- package/lib/transform/maybeZeroY.d.ts +1 -1
- package/lib/transform/maybeZeroY.js +1 -0
- package/lib/transform/maybeZeroY.js.map +1 -1
- package/lib/transform/maybeZeroY1.d.ts +1 -1
- package/lib/transform/normalizeY.d.ts +1 -1
- package/lib/transform/normalizeY.js +13 -10
- package/lib/transform/normalizeY.js.map +1 -1
- package/lib/transform/pack.d.ts +8 -0
- package/lib/transform/pack.js +60 -0
- package/lib/transform/pack.js.map +1 -0
- package/lib/transform/sort.d.ts +14 -0
- package/lib/transform/sort.js +68 -0
- package/lib/transform/sort.js.map +1 -0
- package/lib/transform/sortColor.d.ts +7 -0
- package/lib/transform/sortColor.js +13 -0
- package/lib/transform/sortColor.js.map +1 -0
- package/lib/transform/sortX.d.ts +2 -3
- package/lib/transform/sortX.js +3 -54
- package/lib/transform/sortX.js.map +1 -1
- package/lib/transform/sortY.d.ts +7 -0
- package/lib/transform/sortY.js +13 -0
- package/lib/transform/sortY.js.map +1 -0
- 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.d.ts +2 -0
- package/lib/utils/coordinate.js +14 -2
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/event.d.ts +16 -0
- package/lib/utils/event.js +40 -0
- package/lib/utils/event.js.map +1 -0
- package/lib/utils/helper.d.ts +7 -2
- package/lib/utils/helper.js +25 -3
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/selection.d.ts +6 -4
- package/lib/utils/selection.js +24 -11
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.d.ts +26 -0
- package/lib/utils/size.js +69 -0
- package/lib/utils/size.js.map +1 -0
- package/lib/utils/string.d.ts +12 -0
- package/lib/utils/string.js +24 -0
- package/lib/utils/string.js.map +1 -0
- package/lib/utils/vector.d.ts +8 -2
- package/lib/utils/vector.js +12 -4
- package/lib/utils/vector.js.map +1 -1
- package/package.json +17 -11
- package/src/.DS_Store +0 -0
- 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 +10 -0
- package/src/animation/morphing.ts +63 -36
- 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/utils.ts +23 -0
- package/src/animation/waveIn.ts +114 -0
- package/src/animation/zoomIn.ts +55 -0
- package/src/animation/zoomOut.ts +50 -0
- package/src/api/chart.ts +111 -16
- package/src/api/composition/facetCircle.ts +37 -0
- package/src/api/composition/facetRect.ts +37 -0
- package/src/api/composition/geoPath.ts +43 -0
- package/src/api/composition/geoView.ts +42 -0
- package/src/api/composition/index.ts +35 -19
- package/src/api/composition/repeatMatrix.ts +37 -0
- package/src/api/composition/spaceFlex.ts +19 -0
- package/src/api/composition/spaceLayer.ts +19 -0
- package/src/api/composition/timingKeyframe.ts +17 -0
- package/src/api/composition/view.ts +12 -14
- package/src/api/mark/index.ts +48 -24
- package/src/api/mark/mark.ts +135 -55
- package/src/api/mark/types.ts +5 -11
- package/src/api/node.ts +63 -2
- package/src/api/props.ts +34 -15
- package/src/api/types.ts +4 -2
- package/src/component/axis.ts +309 -130
- package/src/component/legendCategory.ts +23 -11
- package/src/component/legendContinuous.ts +5 -3
- package/src/composition/facetCircle.ts +102 -0
- package/src/composition/facetRect.ts +367 -0
- package/src/composition/index.ts +12 -12
- package/src/composition/mark.ts +28 -6
- package/src/composition/repeatMatrix.ts +173 -0
- package/src/composition/spaceFlex.ts +49 -0
- package/src/composition/spaceLayer.ts +26 -0
- package/src/composition/timingKeyframe.ts +89 -0
- package/src/composition/view.ts +16 -7
- package/src/coordinate/index.ts +2 -0
- package/src/coordinate/radial.ts +22 -0
- package/src/data/.DS_Store +0 -0
- package/src/data/fetch.ts +1 -0
- package/src/data/filter.ts +19 -0
- package/src/data/index.ts +6 -2
- package/src/data/join.ts +40 -0
- package/src/data/rename.ts +2 -3
- package/src/data/wordCloud.ts +112 -117
- 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/service/triggerInfoSelection.ts +1 -1
- package/src/interaction/action/transformer/filter.ts +6 -5
- package/src/interaction/builtin/activeRegion.ts +1 -0
- package/src/interaction/builtin/brush.ts +1 -0
- package/src/interaction/builtin/brushHighlight.ts +1 -0
- package/src/interaction/builtin/brushVisible.ts +1 -0
- package/src/interaction/builtin/elementActive.ts +1 -0
- package/src/interaction/builtin/elementHighlight.ts +1 -0
- package/src/interaction/builtin/elementHighlightByColor.ts +2 -1
- package/src/interaction/builtin/elementHighlightByX.ts +2 -1
- package/src/interaction/builtin/elementListHighlight.ts +1 -0
- package/src/interaction/builtin/elementSelected.ts +1 -0
- package/src/interaction/builtin/ellipsisText.ts +1 -0
- package/src/interaction/builtin/fisheye.ts +1 -0
- package/src/interaction/builtin/legendActive.ts +1 -0
- package/src/interaction/builtin/legendHighlight.ts +1 -0
- package/src/interaction/builtin/tooltip.ts +1 -0
- package/src/interaction/index.ts +41 -33
- package/src/interaction/native/chartIndex.ts +214 -0
- package/src/interaction/native/elementHighlight.ts +75 -0
- package/src/interaction/native/elementHighlightByColor.ts +23 -0
- package/src/interaction/native/elementHighlightByX.ts +25 -0
- package/src/interaction/native/elementSelect.ts +113 -0
- package/src/interaction/native/elementSelectByColor.ts +19 -0
- package/src/interaction/native/elementSelectByX.ts +19 -0
- package/src/interaction/native/fisheye.ts +56 -0
- package/src/interaction/native/tooltip.ts +381 -0
- package/src/interaction/native/utils.ts +201 -0
- package/src/label-transform/dodgeY.ts +85 -0
- package/src/label-transform/hideOverlap.ts +62 -0
- package/src/label-transform/index.ts +9 -0
- package/src/label-transform/spider.ts +37 -0
- package/src/label-transform/surround.ts +37 -0
- package/src/mark/area.ts +89 -0
- package/src/mark/box.ts +104 -0
- package/src/mark/boxplot.ts +119 -0
- package/src/mark/cell.ts +55 -0
- package/src/mark/connector.ts +28 -0
- package/src/mark/forceGraph.ts +133 -0
- package/src/mark/image.ts +46 -0
- package/src/mark/index.ts +53 -0
- package/src/mark/interval.ts +84 -0
- package/src/mark/line.ts +106 -0
- package/src/mark/lineX.ts +35 -0
- package/src/mark/lineY.ts +35 -0
- package/src/mark/link.ts +44 -0
- package/src/mark/pack.ts +104 -0
- package/src/mark/path.ts +34 -0
- package/src/mark/point.ts +97 -0
- package/src/mark/polygon.ts +52 -0
- package/src/mark/range.ts +57 -0
- package/src/mark/rangeX.ts +27 -0
- package/src/mark/rangeY.ts +27 -0
- package/src/mark/rect.ts +44 -0
- package/src/mark/sankey.ts +127 -0
- package/src/mark/shape.ts +37 -0
- package/src/mark/text.ts +48 -0
- package/src/mark/tree.ts +86 -0
- package/src/mark/treemap.ts +188 -0
- package/src/mark/utils.ts +143 -8
- package/src/mark/vector.ts +54 -0
- package/src/mark/wordCloud.ts +73 -0
- package/src/palette/divergingGreenRed.ts +33 -0
- package/src/palette/divergingGreenYellow.ts +36 -0
- package/src/palette/divergingRedBlue.ts +33 -0
- package/src/palette/divergingRedPurple.ts +33 -0
- package/src/palette/index.ts +36 -0
- package/src/palette/sequentialBlue.ts +23 -0
- package/src/palette/sequentialDarkBlue.ts +25 -0
- package/src/palette/sequentialDarkGreen.ts +28 -0
- package/src/palette/sequentialGreen.ts +23 -0
- package/src/palette/sequentialGreenBlue.ts +28 -0
- package/src/palette/sequentialGrey.ts +23 -0
- package/src/palette/sequentialOrange.ts +25 -0
- package/src/palette/sequentialPink.ts +23 -0
- package/src/palette/sequentialPinkPurple.ts +28 -0
- package/src/palette/sequentialPurple.ts +25 -0
- package/src/palette/sequentialRed.ts +23 -0
- package/src/palette/sequentialYellow.ts +25 -0
- package/src/palette/sequentialYellowGreen.ts +28 -0
- package/src/palette/sequentialYellowOrange.ts +28 -0
- package/src/runtime/component.ts +50 -41
- package/src/runtime/constant.ts +8 -0
- package/src/runtime/coordinate.ts +40 -24
- package/src/runtime/index.ts +2 -1
- package/src/runtime/layout.ts +158 -21
- package/src/runtime/mark.ts +54 -71
- package/src/runtime/plot.ts +556 -203
- package/src/runtime/render.ts +107 -5
- package/src/runtime/scale.ts +256 -231
- package/src/runtime/transform.ts +58 -2
- package/src/runtime/types/common.ts +43 -42
- package/src/runtime/types/component.ts +17 -12
- package/src/runtime/types/mark.ts +12 -2
- package/src/runtime/types/options.ts +29 -8
- package/src/runtime/types/theme.ts +125 -0
- package/src/scale/index.ts +4 -0
- package/src/scale/sequential.ts +11 -0
- package/src/scale/sqrt.ts +11 -0
- package/src/shape/.DS_Store +0 -0
- package/src/shape/area/area.ts +3 -3
- package/src/shape/area/curve.ts +204 -0
- package/src/shape/area/smooth.ts +25 -0
- package/src/shape/area/step.ts +15 -0
- package/src/shape/box/box.ts +15 -7
- package/src/shape/connector/connector.ts +128 -0
- package/src/shape/createElement.ts +25 -0
- package/src/shape/image/image.ts +15 -5
- package/src/shape/index.ts +21 -22
- package/src/shape/interval/color.ts +130 -0
- package/src/shape/interval/funnel.ts +3 -3
- package/src/shape/interval/hollow.ts +15 -0
- package/src/shape/interval/pyramid.ts +2 -2
- package/src/shape/interval/rect.ts +3 -3
- package/src/shape/label/label.ts +34 -119
- package/src/shape/label/position.ts +263 -0
- package/src/shape/line/curve.ts +153 -0
- package/src/shape/line/hv.ts +3 -3
- package/src/shape/line/hvh.ts +3 -3
- package/src/shape/line/line.ts +3 -3
- package/src/shape/line/smooth.ts +3 -3
- package/src/shape/line/vh.ts +3 -3
- package/src/shape/lineXY/line.ts +64 -0
- package/src/shape/link/arc.ts +12 -3
- package/src/shape/link/link.ts +16 -13
- package/src/shape/link/smooth.ts +50 -0
- package/src/shape/link/vhv.ts +15 -6
- 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/bowtie.ts +3 -3
- package/src/shape/point/color.ts +76 -0
- package/src/shape/point/cross.ts +3 -3
- package/src/shape/point/diamond.ts +3 -3
- package/src/shape/point/hexagon.ts +3 -3
- package/src/shape/point/hollow.ts +15 -0
- package/src/shape/point/hollowBowtie.ts +3 -3
- package/src/shape/point/hollowDiamond.ts +3 -3
- package/src/shape/point/hollowHexagon.ts +3 -3
- package/src/shape/point/hollowSquare.ts +3 -3
- package/src/shape/point/hollowTriangle.ts +3 -3
- package/src/shape/point/hollowTriangleDown.ts +3 -3
- package/src/shape/point/hyphen.ts +3 -3
- package/src/shape/point/line.ts +3 -3
- package/src/shape/point/plus.ts +3 -3
- package/src/shape/point/point.ts +3 -3
- package/src/shape/point/square.ts +3 -3
- package/src/shape/point/symbol.ts +3 -2
- package/src/shape/point/tick.ts +3 -3
- package/src/shape/point/triangle.ts +3 -3
- package/src/shape/point/triangleDown.ts +3 -3
- package/src/shape/polygon/polygon.ts +13 -5
- package/src/shape/polygon/ribbon.ts +13 -5
- package/src/shape/shape/shape.ts +25 -0
- package/src/shape/text/advance.ts +181 -0
- package/src/shape/text/badge.ts +87 -0
- package/src/shape/text/text.ts +24 -24
- package/src/shape/utils.ts +100 -26
- package/src/shape/vector/vector.ts +16 -14
- package/src/spec/action.ts +2 -1
- package/src/spec/animate.ts +10 -9
- package/src/spec/composition.ts +87 -25
- package/src/spec/coordinate.ts +16 -2
- package/src/spec/data.ts +38 -10
- package/src/spec/geometry.ts +184 -43
- package/src/spec/index.ts +1 -1
- package/src/spec/interaction.ts +66 -39
- package/src/spec/labelTransform.ts +21 -0
- package/src/spec/palette.ts +80 -0
- package/src/spec/scale.ts +17 -4
- package/src/spec/transform.ts +97 -6
- package/src/stdlib/index.ts +265 -123
- package/src/theme/dark.ts +353 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +327 -7
- package/src/transform/bin.ts +102 -0
- package/src/transform/binX.ts +17 -0
- package/src/transform/diffY.ts +52 -0
- package/src/transform/group.ts +27 -0
- package/src/transform/groupColor.ts +14 -0
- package/src/transform/groupN.ts +120 -0
- package/src/transform/groupX.ts +4 -99
- package/src/transform/groupY.ts +14 -0
- package/src/transform/index.ts +42 -8
- package/src/transform/jitter.ts +24 -5
- package/src/transform/jitterX.ts +30 -0
- package/src/transform/maybeFunctionAttribute.ts +28 -0
- package/src/transform/maybeGradient.ts +27 -0
- package/src/transform/maybeIdentityX.ts +21 -0
- package/src/transform/maybeIdentityY.ts +21 -0
- package/src/transform/maybeTitle.ts +23 -0
- package/src/transform/maybeTooltip.ts +17 -13
- package/src/transform/maybeTuple.ts +22 -0
- package/src/transform/maybeTupleX.ts +19 -0
- package/src/transform/maybeTupleY.ts +19 -0
- package/src/transform/maybeVisualPosition.ts +37 -0
- package/src/transform/maybeZeroPadding.ts +19 -0
- package/src/transform/maybeZeroX.ts +1 -0
- package/src/transform/maybeZeroY.ts +1 -0
- package/src/transform/normalizeY.ts +13 -11
- package/src/transform/pack.ts +69 -0
- package/src/transform/sort.ts +63 -0
- package/src/transform/sortColor.ts +14 -0
- package/src/transform/sortX.ts +3 -37
- package/src/transform/sortY.ts +14 -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 +14 -1
- package/src/utils/event.ts +46 -0
- package/src/utils/helper.ts +35 -3
- package/src/utils/selection.ts +29 -13
- package/src/utils/size.ts +105 -0
- package/src/utils/string.ts +19 -0
- package/src/utils/vector.ts +11 -3
- package/esm/adjust/index.d.ts +0 -2
- package/esm/adjust/index.js +0 -2
- package/esm/adjust/index.js.map +0 -1
- package/esm/adjust/pack.d.ts +0 -8
- package/esm/adjust/pack.js +0 -55
- package/esm/adjust/pack.js.map +0 -1
- package/esm/api/composition/circle.d.ts +0 -21
- package/esm/api/composition/circle.js +0 -30
- package/esm/api/composition/circle.js.map +0 -1
- package/esm/api/composition/flex.d.ts +0 -17
- package/esm/api/composition/flex.js +0 -26
- package/esm/api/composition/flex.js.map +0 -1
- package/esm/api/composition/keyframe.d.ts +0 -17
- package/esm/api/composition/keyframe.js +0 -26
- package/esm/api/composition/keyframe.js.map +0 -1
- package/esm/api/composition/layer.d.ts +0 -14
- package/esm/api/composition/layer.js +0 -23
- package/esm/api/composition/layer.js.map +0 -1
- package/esm/api/composition/matrix.d.ts +0 -21
- package/esm/api/composition/matrix.js +0 -30
- package/esm/api/composition/matrix.js.map +0 -1
- package/esm/api/composition/rect.d.ts +0 -23
- package/esm/api/composition/rect.js +0 -32
- package/esm/api/composition/rect.js.map +0 -1
- package/esm/composition/circle.d.ts +0 -7
- package/esm/composition/circle.js +0 -85
- package/esm/composition/circle.js.map +0 -1
- package/esm/composition/flex.d.ts +0 -7
- package/esm/composition/flex.js +0 -40
- package/esm/composition/flex.js.map +0 -1
- package/esm/composition/keyframe.d.ts +0 -7
- package/esm/composition/keyframe.js +0 -75
- package/esm/composition/keyframe.js.map +0 -1
- package/esm/composition/layer.d.ts +0 -7
- package/esm/composition/layer.js +0 -32
- package/esm/composition/layer.js.map +0 -1
- package/esm/composition/matrix.d.ts +0 -8
- package/esm/composition/matrix.js +0 -151
- package/esm/composition/matrix.js.map +0 -1
- package/esm/composition/rect.d.ts +0 -30
- package/esm/composition/rect.js +0 -286
- package/esm/composition/rect.js.map +0 -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/labelLayout/hideOverlap.d.ts +0 -2
- package/esm/labelLayout/hideOverlap.js +0 -38
- package/esm/labelLayout/hideOverlap.js.map +0 -1
- package/esm/labelLayout/index.d.ts +0 -1
- package/esm/labelLayout/index.js +0 -2
- package/esm/labelLayout/index.js.map +0 -1
- package/esm/mark/annotation/connector.d.ts +0 -4
- package/esm/mark/annotation/connector.js +0 -18
- package/esm/mark/annotation/connector.js.map +0 -1
- package/esm/mark/annotation/index.d.ts +0 -14
- package/esm/mark/annotation/index.js +0 -8
- package/esm/mark/annotation/index.js.map +0 -1
- package/esm/mark/annotation/lineX.d.ts +0 -4
- package/esm/mark/annotation/lineX.js +0 -21
- package/esm/mark/annotation/lineX.js.map +0 -1
- package/esm/mark/annotation/lineY.d.ts +0 -4
- package/esm/mark/annotation/lineY.js +0 -21
- package/esm/mark/annotation/lineY.js.map +0 -1
- package/esm/mark/annotation/range.d.ts +0 -8
- package/esm/mark/annotation/range.js +0 -44
- package/esm/mark/annotation/range.js.map +0 -1
- package/esm/mark/annotation/rangeX.d.ts +0 -4
- package/esm/mark/annotation/rangeX.js +0 -14
- package/esm/mark/annotation/rangeX.js.map +0 -1
- package/esm/mark/annotation/rangeY.d.ts +0 -4
- package/esm/mark/annotation/rangeY.js +0 -14
- package/esm/mark/annotation/rangeY.js.map +0 -1
- package/esm/mark/annotation/text.d.ts +0 -4
- package/esm/mark/annotation/text.js +0 -21
- package/esm/mark/annotation/text.js.map +0 -1
- package/esm/mark/geometry/area.d.ts +0 -4
- package/esm/mark/geometry/area.js +0 -70
- package/esm/mark/geometry/area.js.map +0 -1
- package/esm/mark/geometry/box.d.ts +0 -34
- package/esm/mark/geometry/box.js +0 -90
- package/esm/mark/geometry/box.js.map +0 -1
- package/esm/mark/geometry/grid.d.ts +0 -9
- package/esm/mark/geometry/grid.js +0 -46
- package/esm/mark/geometry/grid.js.map +0 -1
- package/esm/mark/geometry/image.d.ts +0 -4
- package/esm/mark/geometry/image.js +0 -35
- package/esm/mark/geometry/image.js.map +0 -1
- package/esm/mark/geometry/index.d.ts +0 -22
- package/esm/mark/geometry/index.js +0 -12
- package/esm/mark/geometry/index.js.map +0 -1
- package/esm/mark/geometry/interval.d.ts +0 -12
- package/esm/mark/geometry/interval.js +0 -58
- package/esm/mark/geometry/interval.js.map +0 -1
- package/esm/mark/geometry/line.d.ts +0 -7
- package/esm/mark/geometry/line.js +0 -80
- package/esm/mark/geometry/line.js.map +0 -1
- package/esm/mark/geometry/link.d.ts +0 -7
- package/esm/mark/geometry/link.js +0 -33
- package/esm/mark/geometry/link.js.map +0 -1
- package/esm/mark/geometry/point.d.ts +0 -10
- package/esm/mark/geometry/point.js +0 -75
- package/esm/mark/geometry/point.js.map +0 -1
- package/esm/mark/geometry/polygon.d.ts +0 -7
- package/esm/mark/geometry/polygon.js +0 -43
- package/esm/mark/geometry/polygon.js.map +0 -1
- package/esm/mark/geometry/text.d.ts +0 -4
- package/esm/mark/geometry/text.js +0 -35
- package/esm/mark/geometry/text.js.map +0 -1
- package/esm/mark/geometry/vector.d.ts +0 -8
- package/esm/mark/geometry/vector.js +0 -43
- package/esm/mark/geometry/vector.js.map +0 -1
- package/esm/shape/annotation/badge.d.ts +0 -14
- package/esm/shape/annotation/badge.js +0 -93
- package/esm/shape/annotation/badge.js.map +0 -1
- package/esm/shape/annotation/connector.d.ts +0 -15
- package/esm/shape/annotation/connector.js +0 -101
- package/esm/shape/annotation/connector.js.map +0 -1
- package/esm/shape/annotation/line.d.ts +0 -3
- package/esm/shape/annotation/line.js +0 -56
- package/esm/shape/annotation/line.js.map +0 -1
- package/esm/shape/annotation/text.d.ts +0 -20
- package/esm/shape/annotation/text.js +0 -174
- package/esm/shape/annotation/text.js.map +0 -1
- package/esm/shape/area/curveArea.d.ts +0 -8
- package/esm/shape/area/curveArea.js +0 -60
- package/esm/shape/area/curveArea.js.map +0 -1
- package/esm/shape/area/smoothArea.d.ts +0 -5
- package/esm/shape/area/smoothArea.js +0 -23
- package/esm/shape/area/smoothArea.js.map +0 -1
- package/esm/shape/interval/colorRect.d.ts +0 -14
- package/esm/shape/interval/colorRect.js +0 -62
- package/esm/shape/interval/colorRect.js.map +0 -1
- package/esm/shape/interval/hollowRect.d.ts +0 -6
- package/esm/shape/interval/hollowRect.js +0 -9
- package/esm/shape/interval/hollowRect.js.map +0 -1
- package/esm/shape/line/curveLine.d.ts +0 -8
- package/esm/shape/line/curveLine.js +0 -41
- package/esm/shape/line/curveLine.js.map +0 -1
- package/esm/shape/link/smoothEdge.d.ts +0 -6
- package/esm/shape/link/smoothEdge.js +0 -39
- package/esm/shape/link/smoothEdge.js.map +0 -1
- package/esm/shape/point/colorPoint.d.ts +0 -11
- package/esm/shape/point/colorPoint.js +0 -59
- package/esm/shape/point/colorPoint.js.map +0 -1
- package/esm/shape/point/hollowPoint.d.ts +0 -6
- package/esm/shape/point/hollowPoint.js +0 -9
- package/esm/shape/point/hollowPoint.js.map +0 -1
- package/esm/spec/labelLayout.d.ts +0 -4
- package/esm/spec/labelLayout.js +0 -2
- package/esm/spec/labelLayout.js.map +0 -1
- package/esm/transform/jitterY.d.ts +0 -8
- package/esm/transform/jitterY.js +0 -21
- package/esm/transform/jitterY.js.map +0 -1
- package/esm/transform/maybeTitleX.d.ts +0 -6
- package/esm/transform/maybeTitleX.js +0 -17
- 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/adjust/index.d.ts +0 -2
- package/lib/adjust/index.js +0 -6
- package/lib/adjust/index.js.map +0 -1
- package/lib/adjust/pack.d.ts +0 -8
- package/lib/adjust/pack.js +0 -59
- package/lib/adjust/pack.js.map +0 -1
- package/lib/api/composition/circle.d.ts +0 -21
- package/lib/api/composition/circle.js +0 -33
- package/lib/api/composition/circle.js.map +0 -1
- package/lib/api/composition/flex.d.ts +0 -17
- package/lib/api/composition/flex.js +0 -29
- package/lib/api/composition/flex.js.map +0 -1
- package/lib/api/composition/keyframe.d.ts +0 -17
- package/lib/api/composition/keyframe.js +0 -29
- package/lib/api/composition/keyframe.js.map +0 -1
- package/lib/api/composition/layer.d.ts +0 -14
- package/lib/api/composition/layer.js +0 -26
- package/lib/api/composition/layer.js.map +0 -1
- package/lib/api/composition/matrix.d.ts +0 -21
- package/lib/api/composition/matrix.js +0 -33
- package/lib/api/composition/matrix.js.map +0 -1
- package/lib/api/composition/rect.d.ts +0 -23
- package/lib/api/composition/rect.js +0 -35
- package/lib/api/composition/rect.js.map +0 -1
- package/lib/composition/circle.d.ts +0 -7
- package/lib/composition/circle.js +0 -89
- package/lib/composition/circle.js.map +0 -1
- package/lib/composition/flex.d.ts +0 -7
- package/lib/composition/flex.js +0 -44
- package/lib/composition/flex.js.map +0 -1
- package/lib/composition/keyframe.d.ts +0 -7
- package/lib/composition/keyframe.js +0 -79
- package/lib/composition/keyframe.js.map +0 -1
- package/lib/composition/layer.d.ts +0 -7
- package/lib/composition/layer.js +0 -36
- package/lib/composition/layer.js.map +0 -1
- package/lib/composition/matrix.d.ts +0 -8
- package/lib/composition/matrix.js +0 -155
- package/lib/composition/matrix.js.map +0 -1
- package/lib/composition/rect.d.ts +0 -30
- package/lib/composition/rect.js +0 -291
- package/lib/composition/rect.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/labelLayout/hideOverlap.d.ts +0 -2
- package/lib/labelLayout/hideOverlap.js +0 -42
- package/lib/labelLayout/hideOverlap.js.map +0 -1
- package/lib/labelLayout/index.d.ts +0 -1
- package/lib/labelLayout/index.js +0 -6
- package/lib/labelLayout/index.js.map +0 -1
- package/lib/mark/annotation/connector.d.ts +0 -4
- package/lib/mark/annotation/connector.js +0 -22
- package/lib/mark/annotation/connector.js.map +0 -1
- package/lib/mark/annotation/index.d.ts +0 -14
- package/lib/mark/annotation/index.js +0 -18
- package/lib/mark/annotation/index.js.map +0 -1
- package/lib/mark/annotation/lineX.d.ts +0 -4
- package/lib/mark/annotation/lineX.js +0 -25
- package/lib/mark/annotation/lineX.js.map +0 -1
- package/lib/mark/annotation/lineY.d.ts +0 -4
- package/lib/mark/annotation/lineY.js +0 -25
- package/lib/mark/annotation/lineY.js.map +0 -1
- package/lib/mark/annotation/range.d.ts +0 -8
- package/lib/mark/annotation/range.js +0 -49
- package/lib/mark/annotation/range.js.map +0 -1
- package/lib/mark/annotation/rangeX.d.ts +0 -4
- package/lib/mark/annotation/rangeX.js +0 -18
- package/lib/mark/annotation/rangeX.js.map +0 -1
- package/lib/mark/annotation/rangeY.d.ts +0 -4
- package/lib/mark/annotation/rangeY.js +0 -18
- package/lib/mark/annotation/rangeY.js.map +0 -1
- package/lib/mark/annotation/text.d.ts +0 -4
- package/lib/mark/annotation/text.js +0 -25
- package/lib/mark/annotation/text.js.map +0 -1
- package/lib/mark/geometry/area.d.ts +0 -4
- package/lib/mark/geometry/area.js +0 -74
- package/lib/mark/geometry/area.js.map +0 -1
- package/lib/mark/geometry/box.d.ts +0 -34
- package/lib/mark/geometry/box.js +0 -94
- package/lib/mark/geometry/box.js.map +0 -1
- package/lib/mark/geometry/grid.d.ts +0 -9
- package/lib/mark/geometry/grid.js +0 -50
- package/lib/mark/geometry/grid.js.map +0 -1
- package/lib/mark/geometry/image.d.ts +0 -4
- package/lib/mark/geometry/image.js +0 -39
- package/lib/mark/geometry/image.js.map +0 -1
- package/lib/mark/geometry/index.d.ts +0 -22
- package/lib/mark/geometry/index.js +0 -26
- package/lib/mark/geometry/index.js.map +0 -1
- package/lib/mark/geometry/interval.d.ts +0 -12
- package/lib/mark/geometry/interval.js +0 -62
- package/lib/mark/geometry/interval.js.map +0 -1
- package/lib/mark/geometry/line.d.ts +0 -7
- package/lib/mark/geometry/line.js +0 -84
- package/lib/mark/geometry/line.js.map +0 -1
- package/lib/mark/geometry/link.d.ts +0 -7
- package/lib/mark/geometry/link.js +0 -37
- package/lib/mark/geometry/link.js.map +0 -1
- package/lib/mark/geometry/point.d.ts +0 -10
- package/lib/mark/geometry/point.js +0 -79
- package/lib/mark/geometry/point.js.map +0 -1
- package/lib/mark/geometry/polygon.d.ts +0 -7
- package/lib/mark/geometry/polygon.js +0 -47
- package/lib/mark/geometry/polygon.js.map +0 -1
- package/lib/mark/geometry/text.d.ts +0 -4
- package/lib/mark/geometry/text.js +0 -39
- package/lib/mark/geometry/text.js.map +0 -1
- package/lib/mark/geometry/vector.d.ts +0 -8
- package/lib/mark/geometry/vector.js +0 -47
- package/lib/mark/geometry/vector.js.map +0 -1
- package/lib/shape/annotation/badge.d.ts +0 -14
- package/lib/shape/annotation/badge.js +0 -97
- package/lib/shape/annotation/badge.js.map +0 -1
- package/lib/shape/annotation/connector.d.ts +0 -15
- package/lib/shape/annotation/connector.js +0 -105
- package/lib/shape/annotation/connector.js.map +0 -1
- package/lib/shape/annotation/line.d.ts +0 -3
- package/lib/shape/annotation/line.js +0 -60
- package/lib/shape/annotation/line.js.map +0 -1
- package/lib/shape/annotation/text.d.ts +0 -20
- package/lib/shape/annotation/text.js +0 -178
- package/lib/shape/annotation/text.js.map +0 -1
- package/lib/shape/area/curveArea.d.ts +0 -8
- package/lib/shape/area/curveArea.js +0 -64
- package/lib/shape/area/curveArea.js.map +0 -1
- package/lib/shape/area/smoothArea.d.ts +0 -5
- package/lib/shape/area/smoothArea.js +0 -27
- package/lib/shape/area/smoothArea.js.map +0 -1
- package/lib/shape/interval/colorRect.d.ts +0 -14
- package/lib/shape/interval/colorRect.js +0 -66
- package/lib/shape/interval/colorRect.js.map +0 -1
- package/lib/shape/interval/hollowRect.d.ts +0 -6
- package/lib/shape/interval/hollowRect.js +0 -13
- package/lib/shape/interval/hollowRect.js.map +0 -1
- package/lib/shape/line/curveLine.d.ts +0 -8
- package/lib/shape/line/curveLine.js +0 -45
- package/lib/shape/line/curveLine.js.map +0 -1
- package/lib/shape/link/smoothEdge.d.ts +0 -6
- package/lib/shape/link/smoothEdge.js +0 -43
- package/lib/shape/link/smoothEdge.js.map +0 -1
- package/lib/shape/point/colorPoint.d.ts +0 -11
- package/lib/shape/point/colorPoint.js +0 -86
- package/lib/shape/point/colorPoint.js.map +0 -1
- package/lib/shape/point/hollowPoint.d.ts +0 -6
- package/lib/shape/point/hollowPoint.js +0 -13
- package/lib/shape/point/hollowPoint.js.map +0 -1
- package/lib/spec/labelLayout.d.ts +0 -4
- package/lib/spec/labelLayout.js +0 -3
- package/lib/spec/labelLayout.js.map +0 -1
- package/lib/transform/jitterY.d.ts +0 -8
- package/lib/transform/jitterY.js +0 -25
- package/lib/transform/jitterY.js.map +0 -1
- package/lib/transform/maybeTitleX.d.ts +0 -6
- package/lib/transform/maybeTitleX.js +0 -21
- 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/adjust/index.ts +0 -2
- package/src/adjust/pack.ts +0 -67
- package/src/api/composition/circle.ts +0 -43
- package/src/api/composition/flex.ts +0 -30
- package/src/api/composition/keyframe.ts +0 -30
- package/src/api/composition/layer.ts +0 -24
- package/src/api/composition/matrix.ts +0 -43
- package/src/api/composition/rect.ts +0 -47
- package/src/composition/circle.ts +0 -102
- package/src/composition/flex.ts +0 -49
- package/src/composition/keyframe.ts +0 -90
- package/src/composition/layer.ts +0 -26
- package/src/composition/matrix.ts +0 -170
- package/src/composition/rect.ts +0 -339
- package/src/data/filterBy.ts +0 -28
- package/src/labelLayout/hideOverlap.ts +0 -47
- package/src/labelLayout/index.ts +0 -1
- package/src/mark/annotation/connector.ts +0 -27
- package/src/mark/annotation/index.ts +0 -15
- package/src/mark/annotation/lineX.ts +0 -31
- package/src/mark/annotation/lineY.ts +0 -31
- package/src/mark/annotation/range.ts +0 -55
- package/src/mark/annotation/rangeX.ts +0 -23
- package/src/mark/annotation/rangeY.ts +0 -23
- package/src/mark/annotation/text.ts +0 -30
- package/src/mark/geometry/area.ts +0 -85
- package/src/mark/geometry/box.ts +0 -105
- package/src/mark/geometry/grid.ts +0 -56
- package/src/mark/geometry/image.ts +0 -42
- package/src/mark/geometry/index.ts +0 -23
- package/src/mark/geometry/interval.ts +0 -70
- package/src/mark/geometry/line.ts +0 -99
- package/src/mark/geometry/link.ts +0 -44
- package/src/mark/geometry/point.ts +0 -83
- package/src/mark/geometry/polygon.ts +0 -54
- package/src/mark/geometry/text.ts +0 -43
- package/src/mark/geometry/vector.ts +0 -56
- package/src/shape/annotation/badge.ts +0 -114
- package/src/shape/annotation/connector.ts +0 -138
- package/src/shape/annotation/line.ts +0 -55
- package/src/shape/annotation/text.ts +0 -236
- package/src/shape/area/curveArea.ts +0 -61
- package/src/shape/area/smoothArea.ts +0 -25
- package/src/shape/interval/colorRect.ts +0 -62
- package/src/shape/interval/hollowRect.ts +0 -15
- package/src/shape/line/curveLine.ts +0 -44
- package/src/shape/link/smoothEdge.ts +0 -41
- package/src/shape/point/colorPoint.ts +0 -65
- package/src/shape/point/hollowPoint.ts +0 -15
- package/src/spec/labelLayout.ts +0 -5
- package/src/transform/jitterY.ts +0 -26
- package/src/transform/maybeTitleX.ts +0 -20
- package/src/transform/maybeTooltipPosition.ts +0 -14
- package/src/transform/maybeTooltipY.ts +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineY.js","sourceRoot":"src/","sources":["mark/lineY.ts"],"names":[],"mappings":";;;AAGA,mCAIiB;AAIV,MAAM,KAAK,GAAqB,GAAG,EAAE;IAC1C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;YAC/B,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;YAC/B,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAc,CAAC;QAC7D,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,KAAK,SAUhB;AAEF,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAExB,aAAK,CAAC,KAAK,GAAG;IACZ,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,8BAAsB,EAAC,EAAE,MAAM,EAAE,CAAC;QACrC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC9D,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,CAAC;CACxC,CAAC"}
|
package/lib/mark/link.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Link = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
/**
|
|
6
|
+
* Connect `start` to `end` with single line.
|
|
7
|
+
*/
|
|
8
|
+
const Link = (options) => {
|
|
9
|
+
return (index, scale, value, coordinate) => {
|
|
10
|
+
const { x: X, y: Y, x1: X1 = X, y1: Y1 = Y } = value;
|
|
11
|
+
const offset = (0, utils_1.createBandOffset)(scale, value, options);
|
|
12
|
+
const P = index.map((i) => [
|
|
13
|
+
coordinate.map(offset([+X[i], +Y[i]], i)),
|
|
14
|
+
coordinate.map(offset([+X1[i], +Y1[i]], i)),
|
|
15
|
+
]);
|
|
16
|
+
return [index, P];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.Link = Link;
|
|
20
|
+
const shapes = ['link', 'arc', 'vhv', 'smooth'];
|
|
21
|
+
exports.Link.props = {
|
|
22
|
+
defaultShape: 'link',
|
|
23
|
+
defaultLabelShape: 'label',
|
|
24
|
+
channels: [
|
|
25
|
+
...(0, utils_1.baseGeometryChannels)({ shapes }),
|
|
26
|
+
{ name: 'x', required: true },
|
|
27
|
+
{ name: 'y', required: true },
|
|
28
|
+
],
|
|
29
|
+
preInference: [
|
|
30
|
+
...(0, utils_1.basePreInference)(),
|
|
31
|
+
{ type: 'maybeIdentityY' },
|
|
32
|
+
{ type: 'maybeIdentityX' },
|
|
33
|
+
],
|
|
34
|
+
postInference: [...(0, utils_1.basePostInference)(), ...(0, utils_1.tooltip2d)()],
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"src/","sources":["mark/link.ts"],"names":[],"mappings":";;;AAEA,mCAMiB;AAIjB;;GAEG;AACI,MAAM,IAAI,GAAoB,CAAC,OAAO,EAAE,EAAE;IAC/C,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,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;QACrD,MAAM,MAAM,GAAG,IAAA,wBAAgB,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACzB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAY;YACpD,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAY;SACvD,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,IAAI,QAUf;AAEF,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAEhD,YAAI,CAAC,KAAK,GAAG;IACX,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,4BAAoB,EAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE;QACZ,GAAG,IAAA,wBAAgB,GAAE;QACrB,EAAE,IAAI,EAAE,gBAAgB,EAAE;QAC1B,EAAE,IAAI,EAAE,gBAAgB,EAAE;KAC3B;IACD,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,EAAE,GAAG,IAAA,iBAAS,GAAE,CAAC;CACxD,CAAC"}
|
package/lib/mark/pack.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
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.Pack = void 0;
|
|
15
|
+
const util_1 = require("@antv/util");
|
|
16
|
+
const d3_hierarchy_1 = require("d3-hierarchy");
|
|
17
|
+
const helper_1 = require("../utils/helper");
|
|
18
|
+
const size_1 = require("../utils/size");
|
|
19
|
+
const dataTransform = (data, layout, encode) => {
|
|
20
|
+
const { value } = encode;
|
|
21
|
+
const root = (0, util_1.isArray)(data)
|
|
22
|
+
? (0, d3_hierarchy_1.stratify)().path(layout.path)(data)
|
|
23
|
+
: (0, d3_hierarchy_1.hierarchy)(data);
|
|
24
|
+
value ? root.sum((d) => d[value]).sort(layout.sort) : root.count();
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
(0, d3_hierarchy_1.pack)().size(layout.size).padding(layout.padding)(root);
|
|
27
|
+
return root.descendants();
|
|
28
|
+
};
|
|
29
|
+
const Pack = (markOptions) => {
|
|
30
|
+
return (viewOptions) => {
|
|
31
|
+
const { width, height } = (0, size_1.getBBoxSize)(viewOptions);
|
|
32
|
+
const { data, encode = {}, scale = {}, style = {}, layout = {}, labels = [] } = markOptions, resOptions = __rest(markOptions, ["data", "encode", "scale", "style", "layout", "labels"]);
|
|
33
|
+
const DEFAULT_LAYOUT_OPTIONS = {
|
|
34
|
+
size: [width, height],
|
|
35
|
+
padding: 0,
|
|
36
|
+
sort: (a, b) => b.value - a.value,
|
|
37
|
+
};
|
|
38
|
+
const DEFAULT_OPTIONS = {
|
|
39
|
+
type: 'point',
|
|
40
|
+
axis: false,
|
|
41
|
+
legend: false,
|
|
42
|
+
scale: {
|
|
43
|
+
x: { domain: [0, width] },
|
|
44
|
+
y: { domain: [0, height] },
|
|
45
|
+
size: { type: 'identity' },
|
|
46
|
+
},
|
|
47
|
+
encode: {
|
|
48
|
+
x: 'x',
|
|
49
|
+
y: 'y',
|
|
50
|
+
size: 'r',
|
|
51
|
+
shape: 'point',
|
|
52
|
+
},
|
|
53
|
+
style: {
|
|
54
|
+
fill: !encode.color
|
|
55
|
+
? (d) => (d.height === 0 ? '#ddd' : '#fff')
|
|
56
|
+
: undefined,
|
|
57
|
+
stroke: !encode.color
|
|
58
|
+
? (d) => (d.height === 0 ? '' : '#000')
|
|
59
|
+
: undefined,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
const DEFAULT_LABEL_OPTIONS = {
|
|
63
|
+
text: '',
|
|
64
|
+
position: 'inside',
|
|
65
|
+
textOverflow: 'clip',
|
|
66
|
+
wordWrap: true,
|
|
67
|
+
maxLines: 1,
|
|
68
|
+
wordWrapWidth: (d) => d.r * 2,
|
|
69
|
+
lineHeight: (d) => d.r * 2,
|
|
70
|
+
};
|
|
71
|
+
const transformedData = dataTransform(data, (0, util_1.deepMix)({}, DEFAULT_LAYOUT_OPTIONS, layout), (0, util_1.deepMix)({}, DEFAULT_OPTIONS['encode'], encode));
|
|
72
|
+
const labelStyle = (0, helper_1.subObject)(style, 'label');
|
|
73
|
+
return [
|
|
74
|
+
(0, util_1.deepMix)({}, DEFAULT_OPTIONS, Object.assign({ data: transformedData, encode,
|
|
75
|
+
scale,
|
|
76
|
+
style, labels: [
|
|
77
|
+
Object.assign(Object.assign({}, DEFAULT_LABEL_OPTIONS), labelStyle),
|
|
78
|
+
...labels,
|
|
79
|
+
] }, resOptions)),
|
|
80
|
+
];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
exports.Pack = Pack;
|
|
84
|
+
exports.Pack.props = { composite: true };
|
|
85
|
+
//# sourceMappingURL=pack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.js","sourceRoot":"src/","sources":["mark/pack.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAA8C;AAC9C,+CAAuE;AAEvE,4CAA4C;AAE5C,wCAA4C;AAY5C,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAkB,EAAE,MAAM,EAAE,EAAE;IACzD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IACzB,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC;QACxB,CAAC,CAAC,IAAA,uBAAQ,GAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;QACpC,CAAC,CAAC,IAAA,wBAAS,EAAC,IAAI,CAAC,CAAC;IACpB,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACnE,aAAa;IACb,IAAA,mBAAU,GAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC,CAAC;AAEK,MAAM,IAAI,GAAoB,CAAC,WAAW,EAAE,EAAE;IACnD,OAAO,CAAC,WAAW,EAAE,EAAE;QACrB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAA,kBAAW,EAAC,WAAW,CAAC,CAAC;QACnD,MAAM,EACJ,IAAI,EACJ,MAAM,GAAG,EAAE,EACX,KAAK,GAAG,EAAE,EACV,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EAAE,KAET,WAAW,EADV,UAAU,UACX,WAAW,EART,wDAQL,CAAc,CAAC;QAChB,MAAM,sBAAsB,GAAe;YACzC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK;SAClC,CAAC;QACF,MAAM,eAAe,GAAG;YACtB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,KAAK;YACb,KAAK,EAAE;gBACL,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;gBACzB,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;aAC3B;YACD,MAAM,EAAE;gBACN,CAAC,EAAE,GAAG;gBACN,CAAC,EAAE,GAAG;gBACN,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,MAAM,CAAC,KAAK;oBACjB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;oBAC3C,CAAC,CAAC,SAAS;gBACb,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK;oBACnB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;oBACvC,CAAC,CAAC,SAAS;aACd;SACF,CAAC;QACF,MAAM,qBAAqB,GAAG;YAC5B,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,MAAM;YACpB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC;YACX,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAC7B,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;SAC3B,CAAC;QACF,MAAM,eAAe,GAAG,aAAa,CACnC,IAAI,EACJ,IAAA,cAAO,EAAC,EAAE,EAAE,sBAAsB,EAAE,MAAM,CAAC,EAC3C,IAAA,cAAO,EAAC,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAC/C,CAAC;QACF,MAAM,UAAU,GAAG,IAAA,kBAAS,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC7C,OAAO;YACL,IAAA,cAAO,EAAC,EAAE,EAAE,eAAe,kBACzB,IAAI,EAAE,eAAe,EACrB,MAAM;gBACN,KAAK;gBACL,KAAK,EACL,MAAM,EAAE;oDAED,qBAAqB,GACrB,UAAU;oBAEf,GAAG,MAAM;iBACV,IACE,UAAU,EACb;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAzEW,QAAA,IAAI,QAyEf;AAEF,YAAI,CAAC,KAAK,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC"}
|
package/lib/mark/path.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Path = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
/**
|
|
6
|
+
* Draw a path.
|
|
7
|
+
*/
|
|
8
|
+
const Path = (options) => {
|
|
9
|
+
return (index, scale, value, coordinate) => {
|
|
10
|
+
// The points is meaning less for path mark,
|
|
11
|
+
// because the position of path shapes specified
|
|
12
|
+
// by the d option. So set [0, 0] for render pipeline.
|
|
13
|
+
return [index, index.map(() => [[0, 0]])];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exports.Path = Path;
|
|
17
|
+
const shapes = ['path', 'hollow'];
|
|
18
|
+
exports.Path.props = {
|
|
19
|
+
defaultShape: 'path',
|
|
20
|
+
defaultLabelShape: 'label',
|
|
21
|
+
channels: [
|
|
22
|
+
...(0, utils_1.baseGeometryChannels)({ shapes }),
|
|
23
|
+
{ name: 'd', scale: 'identity' },
|
|
24
|
+
],
|
|
25
|
+
preInference: [...(0, utils_1.basePreInference)()],
|
|
26
|
+
postInference: [...(0, utils_1.basePostInference)()],
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"src/","sources":["mark/path.ts"],"names":[],"mappings":";;;AAEA,mCAIiB;AAIjB;;GAEG;AACI,MAAM,IAAI,GAAoB,CAAC,OAAO,EAAE,EAAE;IAC/C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,4CAA4C;QAC5C,gDAAgD;QAChD,sDAAsD;QACtD,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,IAAI,QAOf;AAEF,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAElC,YAAI,CAAC,KAAK,GAAG;IACX,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,4BAAoB,EAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE;KACjC;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MarkComponent as MC } from '../runtime';
|
|
2
|
+
import { PointGeometry } from '../spec';
|
|
3
|
+
export type PointOptions = Omit<PointGeometry, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Convert value for each channel to point shapes.
|
|
6
|
+
* Calc the bbox of each point based on x, y and r.
|
|
7
|
+
* This is for allowing their radius can be affected by coordinate(e.g. fisheye).
|
|
8
|
+
*/
|
|
9
|
+
export declare const Point: MC<PointOptions>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Point = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
/**
|
|
6
|
+
* Convert value for each channel to point shapes.
|
|
7
|
+
* Calc the bbox of each point based on x, y and r.
|
|
8
|
+
* This is for allowing their radius can be affected by coordinate(e.g. fisheye).
|
|
9
|
+
*/
|
|
10
|
+
const Point = (options) => {
|
|
11
|
+
return (index, scale, value, coordinate) => {
|
|
12
|
+
const { x: X, y: Y, x1: X1, y1: Y1, size: S, dx: DX, dy: DY } = value;
|
|
13
|
+
const [width, height] = coordinate.getSize();
|
|
14
|
+
const offset = (0, utils_1.createBandOffset)(scale, value, options);
|
|
15
|
+
const xy = (i) => {
|
|
16
|
+
const dx = +((DX === null || DX === void 0 ? void 0 : DX[i]) || 0);
|
|
17
|
+
const dy = +((DY === null || DY === void 0 ? void 0 : DY[i]) || 0);
|
|
18
|
+
const x = X1 ? (+X[i] + +X1[i]) / 2 : +X[i];
|
|
19
|
+
const y = Y1 ? (+Y[i] + +Y1[i]) / 2 : +Y[i];
|
|
20
|
+
const cx = x + dx;
|
|
21
|
+
const cy = y + dy;
|
|
22
|
+
return [cx, cy];
|
|
23
|
+
};
|
|
24
|
+
const P = S
|
|
25
|
+
? Array.from(index, (i) => {
|
|
26
|
+
const [cx, cy] = xy(i);
|
|
27
|
+
const r = +S[i];
|
|
28
|
+
const a = r / width;
|
|
29
|
+
const b = r / height;
|
|
30
|
+
const p1 = [cx - a, cy - b];
|
|
31
|
+
const p2 = [cx + a, cy + b];
|
|
32
|
+
return [
|
|
33
|
+
coordinate.map(offset(p1, i)),
|
|
34
|
+
coordinate.map(offset(p2, i)),
|
|
35
|
+
];
|
|
36
|
+
})
|
|
37
|
+
: Array.from(index, (i) => [coordinate.map(offset(xy(i), i))]);
|
|
38
|
+
return [index, P];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.Point = Point;
|
|
42
|
+
const shapes = [
|
|
43
|
+
'hollow',
|
|
44
|
+
'hollowDiamond',
|
|
45
|
+
'hollowHexagon',
|
|
46
|
+
'hollowSquare',
|
|
47
|
+
'hollowTriangleDown',
|
|
48
|
+
'hollowTriangle',
|
|
49
|
+
'hollowBowtie',
|
|
50
|
+
'point',
|
|
51
|
+
'plus',
|
|
52
|
+
'diamond',
|
|
53
|
+
'square',
|
|
54
|
+
'triangle',
|
|
55
|
+
'hexagon',
|
|
56
|
+
'cross',
|
|
57
|
+
'bowtie',
|
|
58
|
+
'hyphen',
|
|
59
|
+
'line',
|
|
60
|
+
'tick',
|
|
61
|
+
'triangleDown',
|
|
62
|
+
];
|
|
63
|
+
exports.Point.props = {
|
|
64
|
+
defaultShape: 'hollow',
|
|
65
|
+
defaultLabelShape: 'label',
|
|
66
|
+
channels: [
|
|
67
|
+
...(0, utils_1.baseGeometryChannels)({ shapes }),
|
|
68
|
+
{ name: 'x', required: true },
|
|
69
|
+
{ name: 'y', required: true },
|
|
70
|
+
{ name: 'series', scale: 'band' },
|
|
71
|
+
{ name: 'size', scale: 'sqrt' },
|
|
72
|
+
{ name: 'dx', scale: 'identity' },
|
|
73
|
+
{ name: 'dy', scale: 'identity' },
|
|
74
|
+
],
|
|
75
|
+
preInference: [
|
|
76
|
+
...(0, utils_1.basePreInference)(),
|
|
77
|
+
{ type: 'maybeZeroY' },
|
|
78
|
+
{ type: 'maybeZeroX' },
|
|
79
|
+
],
|
|
80
|
+
postInference: [
|
|
81
|
+
...(0, utils_1.basePostInference)(),
|
|
82
|
+
{ type: 'maybeSize' },
|
|
83
|
+
...(0, utils_1.tooltip2d)(),
|
|
84
|
+
],
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=point.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"point.js","sourceRoot":"src/","sources":["mark/point.ts"],"names":[],"mappings":";;;AAEA,mCAMiB;AAIjB;;;;GAIG;AACI,MAAM,KAAK,GAAqB,CAAC,OAAO,EAAE,EAAE;IACjD,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,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;QACtE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAA,wBAAgB,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,EAAE,GAA2B,CAAC,CAAC,EAAE,EAAE;YACvC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAG,CAAC,CAAC,KAAI,CAAC,CAAC,CAAC;YAC3B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAG,CAAC,CAAC,KAAI,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAClB,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAClB,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAClB,CAAC,CAAC;QACF,MAAM,CAAC,GAAG,CAAC;YACT,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;gBACtB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;gBACvB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;gBACpB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;gBACrB,MAAM,EAAE,GAAY,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;gBACrC,MAAM,EAAE,GAAY,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;gBACrC,OAAO;oBACL,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;oBAC7B,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;iBACjB,CAAC;YACjB,CAAC,CAAC;YACJ,CAAC,CAAC,KAAK,CAAC,IAAI,CACR,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAc,CACvD,CAAC;QACN,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAjCW,QAAA,KAAK,SAiChB;AAEF,MAAM,MAAM,GAAG;IACb,QAAQ;IACR,eAAe;IACf,eAAe;IACf,cAAc;IACd,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;IACR,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,cAAc;CACf,CAAC;AAEF,aAAK,CAAC,KAAK,GAAG;IACZ,YAAY,EAAE,QAAQ;IACtB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,4BAAoB,EAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;QACjC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;QACjC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;KAClC;IACD,YAAY,EAAE;QACZ,GAAG,IAAA,wBAAgB,GAAE;QACrB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,YAAY,EAAE;KACvB;IACD,aAAa,EAAE;QACb,GAAG,IAAA,yBAAiB,GAAE;QACtB,EAAE,IAAI,EAAE,WAAW,EAAE;QACrB,GAAG,IAAA,iBAAS,GAAE;KACf;CACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MarkComponent as MC } from '../runtime';
|
|
2
|
+
import { PolygonGeometry } from '../spec';
|
|
3
|
+
export type PolygonOptions = Omit<PolygonGeometry, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Convert value for each channel to polygon shapes.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Polygon: MC<PolygonOptions>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Polygon = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
/**
|
|
6
|
+
* Convert value for each channel to polygon shapes.
|
|
7
|
+
*/
|
|
8
|
+
const Polygon = () => {
|
|
9
|
+
return (index, scale, value, coordinate) => {
|
|
10
|
+
const Xn = Object.entries(value)
|
|
11
|
+
.filter(([key]) => key.startsWith('x'))
|
|
12
|
+
.map(([, value]) => value);
|
|
13
|
+
const Yn = Object.entries(value)
|
|
14
|
+
.filter(([key]) => key.startsWith('y'))
|
|
15
|
+
.map(([, value]) => value);
|
|
16
|
+
const P = index.map((i) => {
|
|
17
|
+
const Pn = [];
|
|
18
|
+
for (let j = 0; j < Xn.length; j++) {
|
|
19
|
+
const x = Xn[j][i];
|
|
20
|
+
if (x === undefined)
|
|
21
|
+
break;
|
|
22
|
+
const y = Yn[j][i];
|
|
23
|
+
Pn.push(coordinate.map([+x, +y]));
|
|
24
|
+
}
|
|
25
|
+
return Pn;
|
|
26
|
+
});
|
|
27
|
+
return [index, P];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.Polygon = Polygon;
|
|
31
|
+
const shapes = ['polygon', 'ribbon'];
|
|
32
|
+
exports.Polygon.props = {
|
|
33
|
+
defaultShape: 'polygon',
|
|
34
|
+
defaultLabelShape: 'label',
|
|
35
|
+
channels: [
|
|
36
|
+
...(0, utils_1.baseGeometryChannels)({ shapes }),
|
|
37
|
+
{ name: 'x', required: true },
|
|
38
|
+
{ name: 'y', required: true },
|
|
39
|
+
],
|
|
40
|
+
preInference: [...(0, utils_1.basePreInference)()],
|
|
41
|
+
postInference: [...(0, utils_1.basePostInference)(), ...(0, utils_1.tooltip2d)()],
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=polygon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polygon.js","sourceRoot":"src/","sources":["mark/polygon.ts"],"names":[],"mappings":";;;AAEA,mCAKiB;AAIjB;;GAEG;AACI,MAAM,OAAO,GAAuB,GAAG,EAAE;IAC9C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aAC7B,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;aACtC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAE7B,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aAC7B,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;aACtC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACxB,MAAM,EAAE,GAAG,EAAE,CAAC;YACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAClC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnB,IAAI,CAAC,KAAK,SAAS;oBAAE,MAAM;gBAC3B,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnB,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACnC;YACD,OAAO,EAAe,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,OAAO,WAuBlB;AAEF,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAErC,eAAO,CAAC,KAAK,GAAG;IACd,YAAY,EAAE,SAAS;IACvB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,4BAAoB,EAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,EAAE,GAAG,IAAA,iBAAS,GAAE,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Mark, MarkComponent as MC } from '../runtime';
|
|
2
|
+
import { RangeMark } from '../spec';
|
|
3
|
+
export declare function AbstractRange(options?: {
|
|
4
|
+
extendX?: boolean;
|
|
5
|
+
extendY?: boolean;
|
|
6
|
+
}): Mark;
|
|
7
|
+
export type RangeOptions = Omit<RangeMark, 'type'>;
|
|
8
|
+
export declare const Range: MC<RangeOptions>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Range = exports.AbstractRange = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
function extend(channel, extended, value, scale) {
|
|
6
|
+
if (extended)
|
|
7
|
+
return () => [0, 1];
|
|
8
|
+
const { [channel]: C, [`${channel}1`]: C1 } = value;
|
|
9
|
+
return (i) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const offset = ((_a = scale.getBandWidth) === null || _a === void 0 ? void 0 : _a.call(scale, scale.invert(+C1[i]))) || 0;
|
|
12
|
+
return [C[i], C1[i] + offset];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function AbstractRange(options = {}) {
|
|
16
|
+
const { extendX = false, extendY = false } = options;
|
|
17
|
+
return (index, scale, value, coordinate) => {
|
|
18
|
+
const x = extend('x', extendX, value, scale.x);
|
|
19
|
+
const y = extend('y', extendY, value, scale.y);
|
|
20
|
+
const P = Array.from(index, (i) => {
|
|
21
|
+
const [x1, x2] = x(i);
|
|
22
|
+
const [y1, y2] = y(i);
|
|
23
|
+
const p1 = [x1, y1];
|
|
24
|
+
const p2 = [x2, y1];
|
|
25
|
+
const p3 = [x2, y2];
|
|
26
|
+
const p4 = [x1, y2];
|
|
27
|
+
return [p1, p2, p3, p4].map((d) => coordinate.map(d));
|
|
28
|
+
});
|
|
29
|
+
return [index, P];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.AbstractRange = AbstractRange;
|
|
33
|
+
const Range = () => {
|
|
34
|
+
return AbstractRange();
|
|
35
|
+
};
|
|
36
|
+
exports.Range = Range;
|
|
37
|
+
const shapes = ['range'];
|
|
38
|
+
exports.Range.props = {
|
|
39
|
+
defaultShape: 'range',
|
|
40
|
+
defaultLabelShape: 'label',
|
|
41
|
+
channels: [
|
|
42
|
+
...(0, utils_1.baseAnnotationChannels)({ shapes }),
|
|
43
|
+
{ name: 'x', required: true },
|
|
44
|
+
{ name: 'y', required: true },
|
|
45
|
+
],
|
|
46
|
+
preInference: [...(0, utils_1.basePreInference)()],
|
|
47
|
+
postInference: [...(0, utils_1.basePostInference)()],
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.js","sourceRoot":"src/","sources":["mark/range.ts"],"names":[],"mappings":";;;AAEA,mCAIiB;AAEjB,SAAS,MAAM,CAAC,OAAe,EAAE,QAAiB,EAAE,KAAK,EAAE,KAAK;IAC9D,IAAI,QAAQ;QAAE,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACpD,OAAO,CAAC,CAAC,EAAE,EAAE;;QACX,MAAM,MAAM,GAAG,CAAA,MAAA,KAAK,CAAC,YAAY,sDAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,UAAoD,EAAE;IAEtD,MAAM,EAAE,OAAO,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IACrD,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAEtB,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACpB,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACpB,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACpB,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACpB,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAc,CAAC;QACrE,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAnBD,sCAmBC;AAIM,MAAM,KAAK,GAAqB,GAAG,EAAE;IAC1C,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEF,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC;AAEzB,aAAK,CAAC,KAAK,GAAG;IACZ,YAAY,EAAE,OAAO;IACrB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,8BAAsB,EAAC,EAAE,MAAM,EAAE,CAAC;QACrC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RangeX = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const range_1 = require("./range");
|
|
6
|
+
const RangeX = () => {
|
|
7
|
+
return (0, range_1.AbstractRange)({ extendY: true });
|
|
8
|
+
};
|
|
9
|
+
exports.RangeX = RangeX;
|
|
10
|
+
const shapes = ['range'];
|
|
11
|
+
exports.RangeX.props = {
|
|
12
|
+
defaultShape: 'range',
|
|
13
|
+
defaultLabelShape: 'label',
|
|
14
|
+
channels: [
|
|
15
|
+
...(0, utils_1.baseAnnotationChannels)({ shapes }),
|
|
16
|
+
{ name: 'x', required: true },
|
|
17
|
+
],
|
|
18
|
+
preInference: [...(0, utils_1.basePreInference)()],
|
|
19
|
+
postInference: [...(0, utils_1.basePostInference)()],
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=rangeX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeX.js","sourceRoot":"src/","sources":["mark/rangeX.ts"],"names":[],"mappings":";;;AAEA,mCAIiB;AACjB,mCAAwC;AAIjC,MAAM,MAAM,GAAsB,GAAG,EAAE;IAC5C,OAAO,IAAA,qBAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAC;AAFW,QAAA,MAAM,UAEjB;AAEF,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC;AAEzB,cAAM,CAAC,KAAK,GAAG;IACb,YAAY,EAAE,OAAO;IACrB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,8BAAsB,EAAC,EAAE,MAAM,EAAE,CAAC;QACrC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RangeY = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const range_1 = require("./range");
|
|
6
|
+
const RangeY = () => {
|
|
7
|
+
return (0, range_1.AbstractRange)({ extendX: true });
|
|
8
|
+
};
|
|
9
|
+
exports.RangeY = RangeY;
|
|
10
|
+
const shapes = ['range'];
|
|
11
|
+
exports.RangeY.props = {
|
|
12
|
+
defaultShape: 'range',
|
|
13
|
+
defaultLabelShape: 'label',
|
|
14
|
+
channels: [
|
|
15
|
+
...(0, utils_1.baseAnnotationChannels)({ shapes }),
|
|
16
|
+
{ name: 'y', required: true },
|
|
17
|
+
],
|
|
18
|
+
preInference: [...(0, utils_1.basePreInference)()],
|
|
19
|
+
postInference: [...(0, utils_1.basePostInference)()],
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=rangeY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeY.js","sourceRoot":"src/","sources":["mark/rangeY.ts"],"names":[],"mappings":";;;AAEA,mCAIiB;AACjB,mCAAwC;AAIjC,MAAM,MAAM,GAAsB,GAAG,EAAE;IAC5C,OAAO,IAAA,qBAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAC;AAFW,QAAA,MAAM,UAEjB;AAEF,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC;AAEzB,cAAM,CAAC,KAAK,GAAG;IACb,YAAY,EAAE,OAAO;IACrB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,8BAAsB,EAAC,EAAE,MAAM,EAAE,CAAC;QACrC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,IAAA,yBAAiB,GAAE,CAAC;CACxC,CAAC"}
|
package/lib/mark/rect.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Rect = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const Rect = () => {
|
|
6
|
+
return (index, scale, value, coordinate) => {
|
|
7
|
+
const { x: X, x1: X1, y: Y, y1: Y1 } = value;
|
|
8
|
+
const P = Array.from(index, (i) => {
|
|
9
|
+
const p1 = [+X[i], +Y[i]];
|
|
10
|
+
const p2 = [+X1[i], +Y[i]];
|
|
11
|
+
const p3 = [+X1[i], +Y1[i]];
|
|
12
|
+
const p4 = [+X[i], +Y1[i]];
|
|
13
|
+
return [p1, p2, p3, p4].map((d) => coordinate.map(d));
|
|
14
|
+
});
|
|
15
|
+
return [index, P];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
exports.Rect = Rect;
|
|
19
|
+
const shapes = ['rect', 'hollow'];
|
|
20
|
+
exports.Rect.props = {
|
|
21
|
+
defaultShape: 'rect',
|
|
22
|
+
defaultLabelShape: 'label',
|
|
23
|
+
channels: [
|
|
24
|
+
...(0, utils_1.baseGeometryChannels)({ shapes }),
|
|
25
|
+
{ name: 'x', required: true },
|
|
26
|
+
{ name: 'y', required: true },
|
|
27
|
+
],
|
|
28
|
+
preInference: [...(0, utils_1.basePreInference)(), { type: 'maybeZeroY1' }],
|
|
29
|
+
postInference: [...(0, utils_1.basePostInference)(), ...(0, utils_1.tooltip1d)()],
|
|
30
|
+
interaction: {
|
|
31
|
+
shareTooltip: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=rect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rect.js","sourceRoot":"src/","sources":["mark/rect.ts"],"names":[],"mappings":";;;AAEA,mCAKiB;AAIV,MAAM,IAAI,GAAoB,GAAG,EAAE;IACxC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;QAE7C,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3B,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAE3B,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAc,CAAC;QACrE,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,IAAI,QAef;AAEF,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAElC,YAAI,CAAC,KAAK,GAAG;IACX,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,IAAA,4BAAoB,EAAC,EAAE,MAAM,EAAE,CAAC;QACnC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,IAAA,wBAAgB,GAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC9D,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,8 @@
|
|
|
1
|
+
import { CompositionComponent as CC } from '../runtime';
|
|
2
|
+
import { SankeyMark } from '../spec';
|
|
3
|
+
export type SankeyOptions = Omit<SankeyMark, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* @todo Add interaction
|
|
6
|
+
* @todo Add source-link color mode
|
|
7
|
+
*/
|
|
8
|
+
export declare const Sankey: CC<SankeyOptions>;
|
|
@@ -0,0 +1,101 @@
|
|
|
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.Sankey = void 0;
|
|
15
|
+
const util_1 = require("@antv/util");
|
|
16
|
+
const sankey_1 = require("../data/sankey");
|
|
17
|
+
const helper_1 = require("../utils/helper");
|
|
18
|
+
const utils_1 = require("./utils");
|
|
19
|
+
/**
|
|
20
|
+
* @todo Add interaction
|
|
21
|
+
* @todo Add source-link color mode
|
|
22
|
+
*/
|
|
23
|
+
const Sankey = (options) => {
|
|
24
|
+
const DEFAULT_LAYOUT_OPTIONS = {
|
|
25
|
+
nodeId: (d) => d.key,
|
|
26
|
+
nodeWidth: 0.02,
|
|
27
|
+
nodePadding: 0.02,
|
|
28
|
+
};
|
|
29
|
+
const DEFAULT_NODE_OPTIONS = {
|
|
30
|
+
type: 'polygon',
|
|
31
|
+
axis: false,
|
|
32
|
+
legend: false,
|
|
33
|
+
encode: {
|
|
34
|
+
shape: 'polygon',
|
|
35
|
+
x: 'x',
|
|
36
|
+
y: 'y',
|
|
37
|
+
},
|
|
38
|
+
scale: {
|
|
39
|
+
x: { type: 'identity' },
|
|
40
|
+
y: { type: 'identity' },
|
|
41
|
+
},
|
|
42
|
+
style: {
|
|
43
|
+
stroke: '#000',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
const DEFAULT_LINK_OPTIONS = {
|
|
47
|
+
type: 'polygon',
|
|
48
|
+
axis: false,
|
|
49
|
+
legend: false,
|
|
50
|
+
encode: {
|
|
51
|
+
shape: 'ribbon',
|
|
52
|
+
x: 'x',
|
|
53
|
+
y: 'y',
|
|
54
|
+
},
|
|
55
|
+
style: {
|
|
56
|
+
fillOpacity: 0.5,
|
|
57
|
+
stroke: null,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
const DEFAULT_LABEL_OPTIONS = {
|
|
61
|
+
textAlign: (d) => (d.x[0] < 0.5 ? 'start' : 'end'),
|
|
62
|
+
position: (d) => (d.x[0] < 0.5 ? 'right' : 'left'),
|
|
63
|
+
fontSize: 10,
|
|
64
|
+
};
|
|
65
|
+
return () => {
|
|
66
|
+
const { data, encode = {}, scale, style = {}, layout = {}, nodeLabels = [], linkLabels = [], animate = {}, } = options;
|
|
67
|
+
// Initialize data, generating nodes by link if is not specified.
|
|
68
|
+
const { links, nodes } = (0, utils_1.initializeData)(data, encode);
|
|
69
|
+
// Extract encode for node and link.
|
|
70
|
+
const nodeEncode = (0, helper_1.subObject)(encode, 'node');
|
|
71
|
+
const linkEncode = (0, helper_1.subObject)(encode, 'link');
|
|
72
|
+
const { key: nodeKey = (d) => d.key, color = nodeKey } = nodeEncode;
|
|
73
|
+
// Transform data, using nodeKey as nodeId.
|
|
74
|
+
const { links: linkData, nodes: nodeData } = (0, sankey_1.Sankey)(Object.assign(Object.assign(Object.assign({}, DEFAULT_LAYOUT_OPTIONS), { nodeId: (0, utils_1.field)(nodeKey) }), layout))({ links, nodes });
|
|
75
|
+
// Extract label style and apply defaults.
|
|
76
|
+
const _a = (0, helper_1.subObject)(style, 'label'), { text = nodeKey, spacing = 5 } = _a, labelStyle = __rest(_a, ["text", "spacing"]);
|
|
77
|
+
return [
|
|
78
|
+
(0, util_1.deepMix)({}, DEFAULT_NODE_OPTIONS, {
|
|
79
|
+
data: nodeData,
|
|
80
|
+
encode: Object.assign(Object.assign({}, nodeEncode), { color }),
|
|
81
|
+
scale,
|
|
82
|
+
style: (0, helper_1.subObject)(style, 'node'),
|
|
83
|
+
labels: [
|
|
84
|
+
Object.assign(Object.assign(Object.assign({}, DEFAULT_LABEL_OPTIONS), { text, dx: (d) => (d.x[0] < 0.5 ? spacing : -spacing) }), labelStyle),
|
|
85
|
+
...nodeLabels,
|
|
86
|
+
],
|
|
87
|
+
animate: typeof animate === 'object' ? (0, helper_1.subObject)(animate, 'node') : animate,
|
|
88
|
+
}),
|
|
89
|
+
(0, util_1.deepMix)({}, DEFAULT_LINK_OPTIONS, {
|
|
90
|
+
data: linkData,
|
|
91
|
+
encode: linkEncode,
|
|
92
|
+
labels: linkLabels,
|
|
93
|
+
style: Object.assign({ fill: linkEncode.color ? undefined : '#aaa' }, (0, helper_1.subObject)(style, 'link')),
|
|
94
|
+
animate: typeof animate === 'object' ? (0, helper_1.subObject)(animate, 'link') : animate,
|
|
95
|
+
}),
|
|
96
|
+
];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
exports.Sankey = Sankey;
|
|
100
|
+
exports.Sankey.props = { composite: true };
|
|
101
|
+
//# sourceMappingURL=sankey.js.map
|