@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
package/src/runtime/plot.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DisplayObject, IAnimation as GAnimation } from '@antv/g';
|
|
2
|
-
import { upperFirst } from '@antv/util';
|
|
2
|
+
import { deepMix, upperFirst } from '@antv/util';
|
|
3
3
|
import { format } from 'd3-format';
|
|
4
|
+
import { Vector2 } from '@antv/coord';
|
|
5
|
+
import { group } from 'd3-array';
|
|
4
6
|
import { mapObject } from '../utils/array';
|
|
5
7
|
import {
|
|
6
8
|
copyAttributes,
|
|
@@ -9,8 +11,11 @@ import {
|
|
|
9
11
|
useMemo,
|
|
10
12
|
appendTransform,
|
|
11
13
|
compose,
|
|
14
|
+
maybeSubObject,
|
|
15
|
+
subObject,
|
|
12
16
|
} from '../utils/helper';
|
|
13
17
|
import { Selection, select, G2Element } from '../utils/selection';
|
|
18
|
+
import { emitEvent, CHART_LIFE_CIRCLE } from '../utils/event';
|
|
14
19
|
import {
|
|
15
20
|
G2ViewTree,
|
|
16
21
|
G2View,
|
|
@@ -22,9 +27,9 @@ import {
|
|
|
22
27
|
G2ShapeOptions,
|
|
23
28
|
G2AnimationOptions,
|
|
24
29
|
G2CompositionOptions,
|
|
25
|
-
G2AdjustOptions,
|
|
26
30
|
G2InteractionOptions,
|
|
27
|
-
|
|
31
|
+
G2LabelTransformOptions,
|
|
32
|
+
G2Context,
|
|
28
33
|
} from './types/options';
|
|
29
34
|
import {
|
|
30
35
|
ThemeComponent,
|
|
@@ -37,14 +42,12 @@ import {
|
|
|
37
42
|
Animation,
|
|
38
43
|
CompositionComponent,
|
|
39
44
|
Composition,
|
|
40
|
-
AdjustComponent,
|
|
41
|
-
Adjust,
|
|
42
45
|
InteractionComponent,
|
|
43
46
|
Interaction,
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
LabelTransformComponent,
|
|
48
|
+
LabelTransform,
|
|
46
49
|
} from './types/component';
|
|
47
|
-
import { MarkComponent, Mark,
|
|
50
|
+
import { MarkComponent, Mark, CompositeMark, SingleMark } from './types/mark';
|
|
48
51
|
import {
|
|
49
52
|
G2ViewDescriptor,
|
|
50
53
|
G2MarkState,
|
|
@@ -56,14 +59,25 @@ import { initializeMark } from './mark';
|
|
|
56
59
|
import { inferComponent, renderComponent } from './component';
|
|
57
60
|
import { computeLayout, placeComponents } from './layout';
|
|
58
61
|
import { createCoordinate } from './coordinate';
|
|
59
|
-
import { applyScale, syncFacetsScales } from './scale';
|
|
62
|
+
import { applyScale, syncFacetsScales, useRelation, inferScale } from './scale';
|
|
60
63
|
import { applyDataTransform } from './transform';
|
|
64
|
+
import {
|
|
65
|
+
MAIN_LAYER_CLASS_NAME,
|
|
66
|
+
LABEL_LAYER_CLASS_NAME,
|
|
67
|
+
ELEMENT_CLASS_NAME,
|
|
68
|
+
VIEW_CLASS_NAME,
|
|
69
|
+
COMPONENT_CLASS_NAME,
|
|
70
|
+
PLOT_CLASS_NAME,
|
|
71
|
+
LABEL_CLASS_NAME,
|
|
72
|
+
AREA_CLASS_NAME,
|
|
73
|
+
} from './constant';
|
|
61
74
|
|
|
62
75
|
export async function plot<T extends G2ViewTree>(
|
|
63
76
|
options: T,
|
|
64
77
|
selection: Selection,
|
|
65
78
|
library: G2Library,
|
|
66
|
-
|
|
79
|
+
context: G2Context,
|
|
80
|
+
): Promise<any> {
|
|
67
81
|
const [useComposition] = useLibrary<
|
|
68
82
|
G2CompositionOptions,
|
|
69
83
|
CompositionComponent,
|
|
@@ -146,17 +160,20 @@ export async function plot<T extends G2ViewTree>(
|
|
|
146
160
|
}
|
|
147
161
|
}
|
|
148
162
|
|
|
163
|
+
const { on } = options;
|
|
164
|
+
emitEvent(on, CHART_LIFE_CIRCLE.BEFORE_PAINT);
|
|
165
|
+
|
|
149
166
|
// Plot chart.
|
|
150
167
|
const viewContainer = new Map<G2ViewDescriptor, DisplayObject>();
|
|
151
|
-
const transitions:
|
|
168
|
+
const transitions: GAnimation[] = [];
|
|
152
169
|
selection
|
|
153
|
-
.selectAll(
|
|
170
|
+
.selectAll(className(VIEW_CLASS_NAME))
|
|
154
171
|
.data(views, (d) => d.key)
|
|
155
172
|
.join(
|
|
156
173
|
(enter) =>
|
|
157
174
|
enter
|
|
158
175
|
.append('g')
|
|
159
|
-
.attr('className',
|
|
176
|
+
.attr('className', VIEW_CLASS_NAME)
|
|
160
177
|
.attr('id', (view) => view.key)
|
|
161
178
|
.call(applyTranslate)
|
|
162
179
|
.each(function (view) {
|
|
@@ -170,24 +187,18 @@ export async function plot<T extends G2ViewTree>(
|
|
|
170
187
|
(exit) => exit.remove(),
|
|
171
188
|
);
|
|
172
189
|
|
|
173
|
-
// Draw label for each element.
|
|
174
|
-
selection.selectAll('.view').each(function (view) {
|
|
175
|
-
plotLabel(view, select(this), transitions, library);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
190
|
// Apply interaction to entered views.
|
|
179
191
|
const viewInstances = Array.from(viewContainer.entries()).map(
|
|
180
192
|
([view, container]) => ({
|
|
181
193
|
view,
|
|
182
194
|
container,
|
|
183
195
|
options: viewNode.get(view),
|
|
184
|
-
update: createUpdateView(select(container), library),
|
|
196
|
+
update: createUpdateView(select(container), library, context),
|
|
185
197
|
}),
|
|
186
198
|
);
|
|
187
199
|
for (const target of viewInstances) {
|
|
188
200
|
const { options } = target;
|
|
189
|
-
const
|
|
190
|
-
for (const option of inferInteraction(interaction)) {
|
|
201
|
+
for (const option of inferInteraction(options)) {
|
|
191
202
|
const interaction = useInteraction(option);
|
|
192
203
|
interaction(target, viewInstances);
|
|
193
204
|
}
|
|
@@ -195,6 +206,7 @@ export async function plot<T extends G2ViewTree>(
|
|
|
195
206
|
|
|
196
207
|
// Author animations.
|
|
197
208
|
const { width, height } = options;
|
|
209
|
+
const keyframes = [];
|
|
198
210
|
for (const nodeGenerator of nodeGenerators) {
|
|
199
211
|
// Delay the rendering of animation keyframe. Different animation
|
|
200
212
|
// created by different nodeGenerator will play in the same time.
|
|
@@ -202,18 +214,26 @@ export async function plot<T extends G2ViewTree>(
|
|
|
202
214
|
const keyframe = new Promise<void>(async (resolve) => {
|
|
203
215
|
for (const node of nodeGenerator) {
|
|
204
216
|
const sizedNode = { width, height, ...node };
|
|
205
|
-
await plot(sizedNode, selection, library);
|
|
217
|
+
await plot(sizedNode, selection, library, context);
|
|
206
218
|
}
|
|
207
219
|
resolve();
|
|
208
220
|
});
|
|
209
|
-
|
|
221
|
+
keyframes.push(keyframe);
|
|
210
222
|
}
|
|
211
223
|
|
|
224
|
+
context.animations = transitions;
|
|
225
|
+
|
|
226
|
+
emitEvent(on, CHART_LIFE_CIRCLE.AFTER_PAINT);
|
|
227
|
+
|
|
212
228
|
// Note!!!
|
|
213
229
|
// The returned promise will never resolved if one of nodeGenerator
|
|
214
230
|
// never stop to yield node, which may created by a keyframe composition
|
|
215
231
|
// with iteration count set to infinite.
|
|
216
|
-
|
|
232
|
+
const finished = transitions
|
|
233
|
+
.filter(defined)
|
|
234
|
+
.map(cancel)
|
|
235
|
+
.map((d) => d.finished);
|
|
236
|
+
return Promise.all([...finished, ...keyframes]);
|
|
217
237
|
}
|
|
218
238
|
|
|
219
239
|
function applyTranslate(selection: Selection) {
|
|
@@ -226,14 +246,19 @@ function applyTranslate(selection: Selection) {
|
|
|
226
246
|
function createUpdateView(
|
|
227
247
|
selection: Selection,
|
|
228
248
|
library: G2Library,
|
|
249
|
+
context: G2Context,
|
|
229
250
|
): G2ViewInstance['update'] {
|
|
230
251
|
return async (newOptions) => {
|
|
231
252
|
const transitions = [];
|
|
232
253
|
const [newView, newChildren] = await initializeView(newOptions, library);
|
|
233
254
|
plotView(newView, selection, transitions, library);
|
|
234
255
|
for (const child of newChildren) {
|
|
235
|
-
plot(child, selection, library);
|
|
256
|
+
plot(child, selection, library, context);
|
|
236
257
|
}
|
|
258
|
+
return {
|
|
259
|
+
options: newOptions,
|
|
260
|
+
view: newView,
|
|
261
|
+
};
|
|
237
262
|
};
|
|
238
263
|
}
|
|
239
264
|
|
|
@@ -253,31 +278,90 @@ async function initializeMarks(
|
|
|
253
278
|
'theme',
|
|
254
279
|
library,
|
|
255
280
|
);
|
|
256
|
-
const [, createMark] = useLibrary<G2MarkOptions, MarkComponent, Mark>(
|
|
281
|
+
const [useMark, createMark] = useLibrary<G2MarkOptions, MarkComponent, Mark>(
|
|
257
282
|
'mark',
|
|
258
283
|
library,
|
|
259
284
|
);
|
|
260
285
|
|
|
261
|
-
const {
|
|
286
|
+
const {
|
|
287
|
+
theme: partialTheme,
|
|
288
|
+
marks: partialMarks,
|
|
289
|
+
coordinates = [],
|
|
290
|
+
} = options;
|
|
262
291
|
const theme = useTheme(inferTheme(partialTheme));
|
|
263
292
|
const markState = new Map<G2Mark, G2MarkState>();
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
293
|
+
|
|
294
|
+
// Apply data transform to get data.
|
|
295
|
+
const dataMarks = [];
|
|
296
|
+
for (const mark of partialMarks) {
|
|
297
|
+
const dataMark = await applyTransform(mark, library);
|
|
298
|
+
dataMarks.push(dataMark);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Convert composite mark to single mark.
|
|
302
|
+
const flattenMarks = await Promise.all(
|
|
303
|
+
dataMarks.map(async (mark) => {
|
|
304
|
+
const { type = error('G2Mark type is required.'), key } = mark;
|
|
305
|
+
const { props } = createMark(type);
|
|
306
|
+
const { composite = false } = props;
|
|
307
|
+
if (!composite) return mark;
|
|
308
|
+
const marks = await (
|
|
309
|
+
useMark as (options: G2MarkOptions) => CompositeMark
|
|
310
|
+
)(mark)(options);
|
|
311
|
+
return marks.map((d, i) => ({ key: `${key}-${i}`, ...d }));
|
|
312
|
+
}),
|
|
313
|
+
).then((res) => res.flat());
|
|
314
|
+
|
|
315
|
+
// Initialize channels for marks.
|
|
316
|
+
for (const markOptions of flattenMarks) {
|
|
317
|
+
const { type } = markOptions;
|
|
267
318
|
const { props } = createMark(type);
|
|
268
|
-
const markAndState = await initializeMark(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
319
|
+
const markAndState = await initializeMark(markOptions, props, library);
|
|
320
|
+
if (markAndState) {
|
|
321
|
+
const [initializedMark, state] = markAndState;
|
|
322
|
+
markState.set(initializedMark, state);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Group channels by scale key, each group has scale.
|
|
327
|
+
const scaleChannels = group(
|
|
328
|
+
Array.from(markState.values()).flatMap((d) => d.channels),
|
|
329
|
+
({ scaleKey }) => scaleKey,
|
|
330
|
+
);
|
|
331
|
+
|
|
332
|
+
// Infer scale for each channel groups.
|
|
333
|
+
for (const channels of scaleChannels.values()) {
|
|
334
|
+
// Merge scale options for these channels.
|
|
335
|
+
const scaleOptions = channels.reduce(
|
|
336
|
+
(total, { scale }) => deepMix(total, scale),
|
|
337
|
+
{},
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
// Use the fields of the first channel as the title.
|
|
341
|
+
const { values: FV } = channels[0];
|
|
342
|
+
const fields = Array.from(new Set(FV.map((d) => d.field).filter(defined)));
|
|
343
|
+
const options = deepMix(
|
|
344
|
+
{
|
|
345
|
+
guide: { title: fields.length === 0 ? undefined : fields },
|
|
346
|
+
field: fields[0],
|
|
347
|
+
},
|
|
348
|
+
scaleOptions,
|
|
349
|
+
);
|
|
350
|
+
|
|
351
|
+
// Use the name of the first channel as the scale name.
|
|
352
|
+
const { name } = channels[0];
|
|
353
|
+
const values = channels.flatMap(({ values }) => values.map((d) => d.value));
|
|
354
|
+
const scale = inferScale(
|
|
355
|
+
name,
|
|
356
|
+
values,
|
|
273
357
|
options,
|
|
358
|
+
coordinates,
|
|
359
|
+
theme,
|
|
274
360
|
library,
|
|
275
361
|
);
|
|
276
|
-
|
|
277
|
-
const [mark, state] = markAndState;
|
|
278
|
-
markState.set(mark, state);
|
|
279
|
-
}
|
|
362
|
+
channels.forEach((channel) => (channel.scale = scale));
|
|
280
363
|
}
|
|
364
|
+
|
|
281
365
|
return markState;
|
|
282
366
|
}
|
|
283
367
|
|
|
@@ -294,35 +378,26 @@ function initializeState(
|
|
|
294
378
|
'scale',
|
|
295
379
|
library,
|
|
296
380
|
);
|
|
297
|
-
const [useAdjust] = useLibrary<G2AdjustOptions, AdjustComponent, Adjust>(
|
|
298
|
-
'adjust',
|
|
299
|
-
library,
|
|
300
|
-
);
|
|
301
381
|
const [useTheme] = useLibrary<G2ThemeOptions, ThemeComponent, Theme>(
|
|
302
382
|
'theme',
|
|
303
383
|
library,
|
|
304
384
|
);
|
|
305
|
-
const [useLabelLayout] = useLibrary<
|
|
306
|
-
G2LabelLayoutOptions,
|
|
307
|
-
LabelLayoutComponent,
|
|
308
|
-
LabelLayout
|
|
309
|
-
>('labelLayout', library);
|
|
310
385
|
|
|
311
|
-
const {
|
|
312
|
-
key,
|
|
313
|
-
frame,
|
|
314
|
-
theme: partialTheme,
|
|
315
|
-
labelLayout: userLabelLayout = [],
|
|
316
|
-
} = options;
|
|
386
|
+
const { key, frame = false, theme: partialTheme, style = {} } = options;
|
|
317
387
|
const theme = useTheme(inferTheme(partialTheme));
|
|
318
|
-
const labelLayout = compose(userLabelLayout.map(useLabelLayout));
|
|
319
388
|
|
|
320
389
|
// Infer components and compute layout.
|
|
321
|
-
const
|
|
322
|
-
const scales =
|
|
390
|
+
const states = Array.from(markState.values());
|
|
391
|
+
const scales = Array.from(
|
|
392
|
+
new Set(states.flatMap((d) => d.channels.map((d) => d.scale))),
|
|
393
|
+
);
|
|
394
|
+
|
|
323
395
|
const components = inferComponent(Array.from(scales), options, library);
|
|
324
396
|
const layout = computeLayout(components, options);
|
|
325
397
|
const coordinate = createCoordinate(layout, options, library);
|
|
398
|
+
const framedStyle = frame
|
|
399
|
+
? deepMix({ mainlineWidth: 1, mainStroke: '#000' }, style)
|
|
400
|
+
: style;
|
|
326
401
|
|
|
327
402
|
// Place components and mutate their bbox.
|
|
328
403
|
placeComponents(components, coordinate, layout);
|
|
@@ -335,49 +410,51 @@ function initializeState(
|
|
|
335
410
|
const children = [];
|
|
336
411
|
for (const [mark, state] of markState.entries()) {
|
|
337
412
|
const {
|
|
338
|
-
scale,
|
|
413
|
+
// scale,
|
|
339
414
|
// Callback to create children options based on this mark.
|
|
340
415
|
children: createChildren,
|
|
341
416
|
// The total count of data (both show and hide)for this facet.
|
|
342
417
|
// This is for unit visualization to sync data domain.
|
|
343
418
|
dataDomain,
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
adjust,
|
|
419
|
+
modifier,
|
|
420
|
+
key: markKey,
|
|
347
421
|
} = mark;
|
|
348
422
|
const { index, channels } = state;
|
|
423
|
+
const scale = Object.fromEntries(
|
|
424
|
+
channels.map(({ name, scale }) => [name, scale]),
|
|
425
|
+
);
|
|
349
426
|
|
|
350
427
|
// Transform abstract value to visual value by scales.
|
|
351
|
-
const markScaleInstance = mapObject(scale,
|
|
428
|
+
const markScaleInstance = mapObject(scale, (options) => {
|
|
429
|
+
const { relations } = options;
|
|
430
|
+
const [conditionalize] = useRelation(relations);
|
|
431
|
+
const scale = useScale(options);
|
|
432
|
+
return conditionalize(scale);
|
|
433
|
+
});
|
|
352
434
|
Object.assign(scaleInstance, markScaleInstance);
|
|
353
435
|
const value = applyScale(channels, markScaleInstance);
|
|
354
436
|
|
|
355
437
|
// Calc points and transformation for each data,
|
|
356
438
|
// and then transform visual value to visual data.
|
|
357
|
-
const calcPoints = useMark(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
const count = dataDomain || definedIndex.length;
|
|
370
|
-
const T = adjust ? useAdjust(adjust)(P, count, layout) : [];
|
|
371
|
-
const visualData: Record<string, any>[] = definedIndex.map((d, i) => {
|
|
372
|
-
const datum = { points: definedPoints[i], transform: T[i] };
|
|
439
|
+
const calcPoints = (useMark as (options: G2MarkOptions) => SingleMark)(
|
|
440
|
+
mark,
|
|
441
|
+
);
|
|
442
|
+
const [I, P, S] = filterValid(
|
|
443
|
+
calcPoints(index, markScaleInstance, value, coordinate),
|
|
444
|
+
);
|
|
445
|
+
const count = dataDomain || I.length;
|
|
446
|
+
const T = modifier ? modifier(P, count, layout) : [];
|
|
447
|
+
const visualData: Record<string, any>[] = I.map((d, i) => {
|
|
448
|
+
const datum = { points: P[i], transform: T[i], index: d, markKey };
|
|
373
449
|
for (const [k, V] of Object.entries(value)) {
|
|
374
450
|
datum[k] = V[d];
|
|
375
451
|
if (S) datum[`series${upperFirst(k)}`] = S[i].map((i) => V[i]);
|
|
376
452
|
}
|
|
453
|
+
if (S) datum['seriesIndex'] = S[i];
|
|
377
454
|
return datum;
|
|
378
455
|
});
|
|
379
456
|
state.data = visualData;
|
|
380
|
-
state.index =
|
|
457
|
+
state.index = I;
|
|
381
458
|
|
|
382
459
|
// Create children options by children callback,
|
|
383
460
|
// and then propagate data to each child.
|
|
@@ -396,10 +473,10 @@ function initializeState(
|
|
|
396
473
|
components,
|
|
397
474
|
markState,
|
|
398
475
|
key,
|
|
399
|
-
frame,
|
|
400
|
-
labelLayout,
|
|
401
476
|
scale: scaleInstance,
|
|
477
|
+
style: framedStyle,
|
|
402
478
|
};
|
|
479
|
+
|
|
403
480
|
return [view, children];
|
|
404
481
|
}
|
|
405
482
|
|
|
@@ -409,30 +486,76 @@ function initializeState(
|
|
|
409
486
|
async function plotView(
|
|
410
487
|
view: G2ViewDescriptor,
|
|
411
488
|
selection: Selection,
|
|
412
|
-
transitions:
|
|
489
|
+
transitions: GAnimation[],
|
|
413
490
|
library: G2Library,
|
|
414
491
|
): Promise<void> {
|
|
415
|
-
const {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
492
|
+
const { components, theme, layout, markState, coordinate, key, style } = view;
|
|
493
|
+
|
|
494
|
+
// Render background for the different areas.
|
|
495
|
+
const { x, y, width, height, ...rest } = layout;
|
|
496
|
+
const areaKeys = ['view', 'plot', 'main', 'content'];
|
|
497
|
+
const I = areaKeys.map((_, i) => i);
|
|
498
|
+
const sizeKeys = ['a', 'margin', 'padding', 'inset'];
|
|
499
|
+
const areaStyles = areaKeys.map((d) =>
|
|
500
|
+
maybeSubObject(Object.assign({}, theme, style), d),
|
|
501
|
+
);
|
|
502
|
+
const areaSizes = sizeKeys.map((d) => subObject(rest, d));
|
|
503
|
+
const styleArea = (selection) =>
|
|
504
|
+
selection
|
|
505
|
+
.style('x', (i) => areaLayouts[i].x)
|
|
506
|
+
.style('y', (i) => areaLayouts[i].y)
|
|
507
|
+
.style('width', (i) => areaLayouts[i].width)
|
|
508
|
+
.style('height', (i) => areaLayouts[i].height)
|
|
509
|
+
.each(function (i) {
|
|
510
|
+
applyStyle(select(this), areaStyles[i]);
|
|
511
|
+
});
|
|
512
|
+
let px = 0;
|
|
513
|
+
let py = 0;
|
|
514
|
+
let pw = width;
|
|
515
|
+
let ph = height;
|
|
516
|
+
const areaLayouts = I.map((i) => {
|
|
517
|
+
const size = areaSizes[i];
|
|
518
|
+
const { left = 0, top = 0, bottom = 0, right = 0 } = size;
|
|
519
|
+
px += left;
|
|
520
|
+
py += top;
|
|
521
|
+
pw -= left + right;
|
|
522
|
+
ph -= top + bottom;
|
|
523
|
+
return {
|
|
524
|
+
x: px,
|
|
525
|
+
y: py,
|
|
526
|
+
width: pw,
|
|
527
|
+
height: ph,
|
|
528
|
+
};
|
|
529
|
+
});
|
|
530
|
+
selection
|
|
531
|
+
.selectAll(className(AREA_CLASS_NAME))
|
|
532
|
+
.data(
|
|
533
|
+
// Only render area with defined style.
|
|
534
|
+
I.filter((i) => defined(areaStyles[i])),
|
|
535
|
+
(i) => areaKeys[i],
|
|
536
|
+
)
|
|
537
|
+
.join(
|
|
538
|
+
(enter) =>
|
|
539
|
+
enter
|
|
540
|
+
.append('rect')
|
|
541
|
+
.attr('className', AREA_CLASS_NAME)
|
|
542
|
+
.style('zIndex', -2)
|
|
543
|
+
.call(styleArea),
|
|
544
|
+
(update) => update.call(styleArea),
|
|
545
|
+
(exit) => exit.remove(),
|
|
546
|
+
);
|
|
424
547
|
|
|
425
548
|
// Render components.
|
|
426
549
|
// @todo renderComponent return ctor and options.
|
|
427
550
|
selection
|
|
428
|
-
.selectAll(
|
|
551
|
+
.selectAll(className(COMPONENT_CLASS_NAME))
|
|
429
552
|
.data(components, (d, i) => `${d.type}-${i}`)
|
|
430
553
|
.join(
|
|
431
554
|
(enter) =>
|
|
432
555
|
enter
|
|
433
556
|
.append('g')
|
|
434
557
|
.style('zIndex', ({ zIndex }) => zIndex || -1)
|
|
435
|
-
.attr('className',
|
|
558
|
+
.attr('className', COMPONENT_CLASS_NAME)
|
|
436
559
|
.append((options) =>
|
|
437
560
|
renderComponent(options, coordinate, theme, library),
|
|
438
561
|
),
|
|
@@ -450,39 +573,47 @@ async function plotView(
|
|
|
450
573
|
}),
|
|
451
574
|
);
|
|
452
575
|
|
|
576
|
+
const animationExtent = computeAnimationExtent(markState);
|
|
577
|
+
|
|
453
578
|
// Main layer is for showing the main visual representation such as marks. There
|
|
454
579
|
// may be multiple main layers for a view, each main layer correspond to one of marks.
|
|
455
580
|
// @todo Test DOM structure.
|
|
456
|
-
selection
|
|
457
|
-
.selectAll(
|
|
581
|
+
const T = selection
|
|
582
|
+
.selectAll(className(PLOT_CLASS_NAME))
|
|
458
583
|
.data([layout], () => key)
|
|
459
584
|
.join(
|
|
460
585
|
(enter) =>
|
|
461
586
|
enter
|
|
587
|
+
// Make this layer interactive, such as click and mousemove events.
|
|
462
588
|
.append('rect')
|
|
463
|
-
.attr('className', 'plot')
|
|
464
589
|
.style('fill', 'transparent')
|
|
465
|
-
.
|
|
466
|
-
.call(
|
|
467
|
-
.call(
|
|
590
|
+
.attr('className', PLOT_CLASS_NAME)
|
|
591
|
+
.call(updateBBox)
|
|
592
|
+
.call(updateLayers, Array.from(markState.keys())),
|
|
468
593
|
(update) =>
|
|
469
594
|
update
|
|
470
|
-
.call(
|
|
471
|
-
.call(
|
|
472
|
-
|
|
595
|
+
.call(updateLayers, Array.from(markState.keys()))
|
|
596
|
+
.call((selection) => {
|
|
597
|
+
return animationExtent
|
|
598
|
+
? animateBBox(selection, animationExtent)
|
|
599
|
+
: updateBBox(selection);
|
|
600
|
+
}),
|
|
601
|
+
)
|
|
602
|
+
.transitions();
|
|
603
|
+
transitions.push(...T.flat());
|
|
473
604
|
|
|
474
605
|
// Render marks with corresponding data.
|
|
475
606
|
for (const [mark, state] of markState.entries()) {
|
|
476
607
|
const { data } = state;
|
|
477
|
-
const { key, class:
|
|
608
|
+
const { key, class: cls } = mark;
|
|
478
609
|
const shapeFunction = createMarkShapeFunction(mark, state, view, library);
|
|
479
610
|
const enterFunction = createEnterFunction(mark, state, view, library);
|
|
480
611
|
const updateFunction = createUpdateFunction(mark, state, view, library);
|
|
481
612
|
const exitFunction = createExitFunction(mark, state, view, library);
|
|
482
|
-
const facetElements = selectFacetElements(selection,
|
|
613
|
+
const facetElements = selectFacetElements(selection, cls, 'element');
|
|
483
614
|
const T = selection
|
|
484
615
|
.select(`#${key}`)
|
|
485
|
-
.selectAll(
|
|
616
|
+
.selectAll(className(ELEMENT_CLASS_NAME))
|
|
486
617
|
.selectFacetAll(facetElements)
|
|
487
618
|
.data(
|
|
488
619
|
data,
|
|
@@ -493,7 +624,7 @@ async function plotView(
|
|
|
493
624
|
(enter) =>
|
|
494
625
|
enter
|
|
495
626
|
.append(shapeFunction)
|
|
496
|
-
.attr('className',
|
|
627
|
+
.attr('className', ELEMENT_CLASS_NAME)
|
|
497
628
|
.transition(function (data) {
|
|
498
629
|
return enterFunction(data, [this]);
|
|
499
630
|
}),
|
|
@@ -508,7 +639,6 @@ async function plotView(
|
|
|
508
639
|
maybeFacetElement(this, parent, origin);
|
|
509
640
|
const node = shapeFunction(data, index);
|
|
510
641
|
const animation = updateFunction(data, [this], [node]);
|
|
511
|
-
// @todo Handle element with different type.
|
|
512
642
|
if (animation === null) copyAttributes(this, node);
|
|
513
643
|
return animation;
|
|
514
644
|
});
|
|
@@ -523,7 +653,7 @@ async function plotView(
|
|
|
523
653
|
merge
|
|
524
654
|
// Append elements to be merged.
|
|
525
655
|
.append(shapeFunction)
|
|
526
|
-
.attr('className',
|
|
656
|
+
.attr('className', ELEMENT_CLASS_NAME)
|
|
527
657
|
.transition(function (data) {
|
|
528
658
|
// Remove merged elements after animation finishing.
|
|
529
659
|
const { __fromElements__: fromElements } = this;
|
|
@@ -539,7 +669,7 @@ async function plotView(
|
|
|
539
669
|
const enter = new Selection([], this.__toData__, this.parentNode);
|
|
540
670
|
const toElements = enter
|
|
541
671
|
.append(shapeFunction)
|
|
542
|
-
.attr('className',
|
|
672
|
+
.attr('className', ELEMENT_CLASS_NAME)
|
|
543
673
|
.nodes();
|
|
544
674
|
return updateFunction(data, [this], toElements);
|
|
545
675
|
})
|
|
@@ -547,8 +677,11 @@ async function plotView(
|
|
|
547
677
|
.remove(),
|
|
548
678
|
)
|
|
549
679
|
.transitions();
|
|
550
|
-
transitions.push(...T);
|
|
680
|
+
transitions.push(...T.flat());
|
|
551
681
|
}
|
|
682
|
+
|
|
683
|
+
// Plot label for this view.
|
|
684
|
+
plotLabel(view, selection, transitions, library);
|
|
552
685
|
}
|
|
553
686
|
|
|
554
687
|
/**
|
|
@@ -557,36 +690,151 @@ async function plotView(
|
|
|
557
690
|
function plotLabel(
|
|
558
691
|
view: G2ViewDescriptor,
|
|
559
692
|
selection: Selection,
|
|
560
|
-
transitions:
|
|
693
|
+
transitions: GAnimation[],
|
|
561
694
|
library: G2Library,
|
|
562
695
|
) {
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
|
|
696
|
+
const [useLabelTransform] = useLibrary<
|
|
697
|
+
G2LabelTransformOptions,
|
|
698
|
+
LabelTransformComponent,
|
|
699
|
+
LabelTransform
|
|
700
|
+
>('labelTransform', library);
|
|
701
|
+
const { markState, labelTransform } = view;
|
|
702
|
+
const labelLayer = selection.select(className(LABEL_LAYER_CLASS_NAME)).node();
|
|
703
|
+
|
|
704
|
+
// A Map index shapeFunction by label.
|
|
705
|
+
const labelShapeFunction = new Map();
|
|
706
|
+
|
|
707
|
+
// A Map index options by label.
|
|
708
|
+
const labelDescriptor = new Map();
|
|
709
|
+
|
|
710
|
+
// Get all labels for this view.
|
|
711
|
+
const labels = Array.from(markState.entries()).flatMap(([mark, state]) => {
|
|
712
|
+
const { labels: labelOptions = [], key } = mark;
|
|
566
713
|
const shapeFunction = createLabelShapeFunction(mark, state, view, library);
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
const node = shapeFunction(data, index, options, this);
|
|
582
|
-
copyAttributes(this, node);
|
|
583
|
-
}),
|
|
584
|
-
(exit) => exit.remove(),
|
|
585
|
-
);
|
|
714
|
+
const elements = selection
|
|
715
|
+
.select(`#${key}`)
|
|
716
|
+
.selectAll(className(ELEMENT_CLASS_NAME))
|
|
717
|
+
.nodes();
|
|
718
|
+
return labelOptions.flatMap((labelOption, i) => {
|
|
719
|
+
const { transform = [], ...options } = labelOption;
|
|
720
|
+
return elements.flatMap((e) => {
|
|
721
|
+
const L = getLabels(options, i, e);
|
|
722
|
+
L.forEach((l) => {
|
|
723
|
+
labelShapeFunction.set(l, shapeFunction);
|
|
724
|
+
labelDescriptor.set(l, labelOption);
|
|
725
|
+
});
|
|
726
|
+
return L;
|
|
727
|
+
});
|
|
586
728
|
});
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
// Render all labels.
|
|
732
|
+
const labelShapes = select(labelLayer)
|
|
733
|
+
.selectAll(className(LABEL_CLASS_NAME))
|
|
734
|
+
.data(labels, (d) => d.key)
|
|
735
|
+
.join(
|
|
736
|
+
(enter) =>
|
|
737
|
+
enter
|
|
738
|
+
.append((d) => labelShapeFunction.get(d)(d))
|
|
739
|
+
.attr('className', LABEL_CLASS_NAME),
|
|
740
|
+
(update) =>
|
|
741
|
+
update.each(function (d) {
|
|
742
|
+
// @todo Handle Label with different type.
|
|
743
|
+
const shapeFunction = labelShapeFunction.get(d);
|
|
744
|
+
const node = shapeFunction(d);
|
|
745
|
+
copyAttributes(this, node);
|
|
746
|
+
}),
|
|
747
|
+
(exit) => exit.remove(),
|
|
748
|
+
)
|
|
749
|
+
.nodes();
|
|
750
|
+
|
|
751
|
+
// Apply group-level transforms.
|
|
752
|
+
const labelGroups = group(labelShapes, (d) =>
|
|
753
|
+
labelDescriptor.get(d.__data__),
|
|
754
|
+
);
|
|
755
|
+
const { coordinate } = view;
|
|
756
|
+
for (const [label, shapes] of labelGroups) {
|
|
757
|
+
const { transform = [] } = label;
|
|
758
|
+
const transformFunction = compose(transform.map(useLabelTransform));
|
|
759
|
+
transformFunction(shapes, coordinate);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
// Apply view-level transform.
|
|
763
|
+
if (labelTransform) {
|
|
764
|
+
labelTransform(labelShapes, coordinate);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
function getLabels(
|
|
769
|
+
label: Record<string, any>,
|
|
770
|
+
labelIndex: number,
|
|
771
|
+
element: G2Element,
|
|
772
|
+
): Record<string, any>[] {
|
|
773
|
+
const { seriesIndex: SI, seriesKey, points, key, index } = element.__data__;
|
|
774
|
+
const bounds = getLocalBounds(element);
|
|
775
|
+
if (!SI) {
|
|
776
|
+
return [{ ...label, key: `${key}-${labelIndex}`, bounds, index, points }];
|
|
777
|
+
}
|
|
778
|
+
const selector = normalizeLabelSelector(label);
|
|
779
|
+
const F = SI.map((index: number, i: number) => ({
|
|
780
|
+
...label,
|
|
781
|
+
key: `${seriesKey[i]}-${labelIndex}`,
|
|
782
|
+
bounds: [points[i]],
|
|
783
|
+
index,
|
|
784
|
+
points,
|
|
785
|
+
}));
|
|
786
|
+
return selector ? selector(F) : F;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
function filterValid([I, P, S]: [number[], Vector2[][], number[][]?]): [
|
|
790
|
+
number[],
|
|
791
|
+
Vector2[][],
|
|
792
|
+
number[][]?,
|
|
793
|
+
] {
|
|
794
|
+
if (S) return [I, P, S];
|
|
795
|
+
const definedIndex = [];
|
|
796
|
+
const definedPoints = [];
|
|
797
|
+
for (let i = 0; i < I.length; i++) {
|
|
798
|
+
const d = I[i];
|
|
799
|
+
const p = P[i];
|
|
800
|
+
if (p.every(([x, y]) => defined(x) && defined(y))) {
|
|
801
|
+
definedIndex.push(d);
|
|
802
|
+
definedPoints.push(p);
|
|
803
|
+
}
|
|
587
804
|
}
|
|
588
|
-
|
|
589
|
-
|
|
805
|
+
return [definedIndex, definedPoints];
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
function normalizeLabelSelector(
|
|
809
|
+
label: Record<string, any>,
|
|
810
|
+
): (I: number[]) => number[] {
|
|
811
|
+
const { selector } = label;
|
|
812
|
+
if (!selector) return null;
|
|
813
|
+
if (typeof selector === 'function') return selector;
|
|
814
|
+
if (selector === 'first') return (I) => [I[0]];
|
|
815
|
+
if (selector === 'last') return (I) => [I[I.length - 1]];
|
|
816
|
+
throw new Error(`Unknown selector: ${selector}`);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Avoid getting error bounds caused by element animations.
|
|
821
|
+
* @todo Remove this temporary handle method, if runtime supports
|
|
822
|
+
* correct process: drawElement, do label layout and then do
|
|
823
|
+
* transitions together.
|
|
824
|
+
*/
|
|
825
|
+
function getLocalBounds(element: DisplayObject) {
|
|
826
|
+
const cloneElement = element.cloneNode();
|
|
827
|
+
const animations = element.getAnimations();
|
|
828
|
+
cloneElement.style.visibility = 'hidden';
|
|
829
|
+
animations.forEach((animation) => {
|
|
830
|
+
const keyframes = animation.effect.getKeyframes();
|
|
831
|
+
cloneElement.attr(keyframes[keyframes.length - 1]);
|
|
832
|
+
});
|
|
833
|
+
element.parentNode.appendChild(cloneElement);
|
|
834
|
+
const bounds = cloneElement.getLocalBounds();
|
|
835
|
+
cloneElement.destroy();
|
|
836
|
+
const { min, max } = bounds;
|
|
837
|
+
return [min, max];
|
|
590
838
|
}
|
|
591
839
|
|
|
592
840
|
function createLabelShapeFunction(
|
|
@@ -594,44 +842,93 @@ function createLabelShapeFunction(
|
|
|
594
842
|
state: G2MarkState,
|
|
595
843
|
view: G2ViewDescriptor,
|
|
596
844
|
library: G2Library,
|
|
597
|
-
): (
|
|
598
|
-
data: Record<string, any>,
|
|
599
|
-
index: number,
|
|
600
|
-
options: Record<string, any>,
|
|
601
|
-
element: DisplayObject,
|
|
602
|
-
) => DisplayObject {
|
|
845
|
+
): (options: Record<string, any>) => DisplayObject {
|
|
603
846
|
const [useShape] = useLibrary<G2ShapeOptions, ShapeComponent, Shape>(
|
|
604
847
|
'shape',
|
|
605
848
|
library,
|
|
606
849
|
);
|
|
607
850
|
const { data: abstractData } = mark;
|
|
608
|
-
const {
|
|
851
|
+
const { data: visualData, defaultLabelShape } = state;
|
|
609
852
|
const point2d = visualData.map((d) => d.points);
|
|
610
853
|
const { theme, coordinate } = view;
|
|
611
|
-
return (
|
|
612
|
-
const
|
|
613
|
-
const datum = abstractData[
|
|
854
|
+
return (options) => {
|
|
855
|
+
const { index, points } = options;
|
|
856
|
+
const datum = abstractData[index];
|
|
614
857
|
const { formatter = (d) => `${d}`, ...abstractOptions } = options;
|
|
615
|
-
const visualOptions = mapObject(abstractOptions, (d) =>
|
|
858
|
+
const visualOptions = mapObject(abstractOptions, (d) =>
|
|
859
|
+
valueOf(d, datum, index, abstractData),
|
|
860
|
+
);
|
|
616
861
|
const { shape = defaultLabelShape, text, ...style } = visualOptions;
|
|
617
862
|
const f = typeof formatter === 'string' ? format(formatter) : formatter;
|
|
618
|
-
const value = { ...style,
|
|
619
|
-
const shapeFunction = useShape({ type: shape
|
|
620
|
-
const { points } = data;
|
|
863
|
+
const value = { ...style, text: f(text) };
|
|
864
|
+
const shapeFunction = useShape({ type: `label.${shape}`, ...style });
|
|
621
865
|
return shapeFunction(points, value, coordinate, theme, point2d);
|
|
622
866
|
};
|
|
623
867
|
}
|
|
624
868
|
|
|
625
869
|
function valueOf(
|
|
870
|
+
value: Primitive | ((d: any, i: number, array: any) => any),
|
|
871
|
+
datum: Record<string, any>,
|
|
872
|
+
i: number,
|
|
626
873
|
data: Record<string, any>,
|
|
627
|
-
value: Primitive | ((d: any) => any),
|
|
628
874
|
) {
|
|
629
|
-
if (typeof value === 'function') return value(data);
|
|
875
|
+
if (typeof value === 'function') return value(datum, i, data);
|
|
630
876
|
if (typeof value !== 'string') return value;
|
|
631
|
-
if (
|
|
877
|
+
if (datum[value] !== undefined) return datum[value];
|
|
632
878
|
return value;
|
|
633
879
|
}
|
|
634
880
|
|
|
881
|
+
/**
|
|
882
|
+
* Compute max duration for this frame.
|
|
883
|
+
*/
|
|
884
|
+
function computeAnimationExtent(markState): [number, number] {
|
|
885
|
+
let maxDuration = -Infinity;
|
|
886
|
+
let minDelay = Infinity;
|
|
887
|
+
for (const [mark, state] of markState) {
|
|
888
|
+
const { animate = {} } = mark;
|
|
889
|
+
const { data } = state;
|
|
890
|
+
const {
|
|
891
|
+
updateType: defaultUpdateType,
|
|
892
|
+
updateDuration: defaultUpdateDuration = 300,
|
|
893
|
+
updateDelay: defaultUpdateDelay = 0,
|
|
894
|
+
enterType: defaultEnterType,
|
|
895
|
+
enterDuration: defaultEnterDuration = 300,
|
|
896
|
+
enterDelay: defaultEnterDelay = 0,
|
|
897
|
+
exitType: defaultExitType,
|
|
898
|
+
exitDuration: defaultExitDuration = 300,
|
|
899
|
+
exitDelay: defaultExitDelay = 0,
|
|
900
|
+
} = animate;
|
|
901
|
+
for (const d of data) {
|
|
902
|
+
const {
|
|
903
|
+
updateType = defaultUpdateType,
|
|
904
|
+
updateDuration = defaultUpdateDuration,
|
|
905
|
+
updateDelay = defaultUpdateDelay,
|
|
906
|
+
enterType = defaultEnterType,
|
|
907
|
+
enterDuration = defaultEnterDuration,
|
|
908
|
+
enterDelay = defaultEnterDelay,
|
|
909
|
+
exitDuration = defaultExitDuration,
|
|
910
|
+
exitDelay = defaultExitDelay,
|
|
911
|
+
exitType = defaultExitType,
|
|
912
|
+
} = d;
|
|
913
|
+
|
|
914
|
+
if (updateType === undefined || updateType) {
|
|
915
|
+
maxDuration = Math.max(maxDuration, updateDuration + updateDelay);
|
|
916
|
+
minDelay = Math.min(minDelay, updateDelay);
|
|
917
|
+
}
|
|
918
|
+
if (exitType === undefined || exitType) {
|
|
919
|
+
maxDuration = Math.max(maxDuration, exitDuration + exitDelay);
|
|
920
|
+
minDelay = Math.min(minDelay, exitDelay);
|
|
921
|
+
}
|
|
922
|
+
if (enterType === undefined || enterType) {
|
|
923
|
+
maxDuration = Math.max(maxDuration, enterDuration + enterDelay);
|
|
924
|
+
minDelay = Math.min(minDelay, enterDelay);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
if (maxDuration === -Infinity) return null;
|
|
929
|
+
return [minDelay, maxDuration - minDelay];
|
|
930
|
+
}
|
|
931
|
+
|
|
635
932
|
function selectFacetElements(
|
|
636
933
|
selection: Selection,
|
|
637
934
|
facetClassName: string,
|
|
@@ -678,15 +975,34 @@ function createMarkShapeFunction(
|
|
|
678
975
|
'shape',
|
|
679
976
|
library,
|
|
680
977
|
);
|
|
978
|
+
const { data: abstractData } = mark;
|
|
681
979
|
const { defaultShape, data } = state;
|
|
682
980
|
const point2d = data.map((d) => d.points);
|
|
683
981
|
const { theme, coordinate } = view;
|
|
684
|
-
const { style } = mark;
|
|
982
|
+
const { type: markType, style = {} } = mark;
|
|
685
983
|
return (data, index) => {
|
|
686
|
-
const { shape = defaultShape
|
|
687
|
-
const
|
|
688
|
-
const
|
|
689
|
-
|
|
984
|
+
const { shape: styleShape = defaultShape } = style;
|
|
985
|
+
const { shape = styleShape, points, seriesIndex, index: i, ...v } = data;
|
|
986
|
+
const value = { ...v, shape, mark: markType, defaultShape, index };
|
|
987
|
+
|
|
988
|
+
// Get data-driven style.
|
|
989
|
+
// If it is a series shape, such as area and line,
|
|
990
|
+
// provides the series of abstract data and indices
|
|
991
|
+
// for this shape, otherwise the single datum and
|
|
992
|
+
// index.
|
|
993
|
+
const abstractDatum = seriesIndex
|
|
994
|
+
? seriesIndex.map((i) => abstractData[i])
|
|
995
|
+
: abstractData[i];
|
|
996
|
+
|
|
997
|
+
const I = seriesIndex ? seriesIndex : i;
|
|
998
|
+
const visualStyle = mapObject(style, (d) =>
|
|
999
|
+
valueOf(d, abstractDatum, I, abstractData),
|
|
1000
|
+
);
|
|
1001
|
+
|
|
1002
|
+
const shapeFunction = useShape({
|
|
1003
|
+
...visualStyle,
|
|
1004
|
+
type: shapeName(mark, shape),
|
|
1005
|
+
});
|
|
690
1006
|
return shapeFunction(points, value, coordinate, theme, point2d);
|
|
691
1007
|
};
|
|
692
1008
|
}
|
|
@@ -701,7 +1017,7 @@ function createAnimationFunction(
|
|
|
701
1017
|
data: Record<string, any>,
|
|
702
1018
|
from: DisplayObject[],
|
|
703
1019
|
to: DisplayObject[],
|
|
704
|
-
) =>
|
|
1020
|
+
) => GAnimation[] {
|
|
705
1021
|
const [, createShape] = useLibrary<G2ShapeOptions, ShapeComponent, Shape>(
|
|
706
1022
|
'shape',
|
|
707
1023
|
library,
|
|
@@ -718,9 +1034,11 @@ function createAnimationFunction(
|
|
|
718
1034
|
| 'defaultEnterAnimation'
|
|
719
1035
|
| 'defaultExitAnimation'
|
|
720
1036
|
| 'defaultUpdateAnimation' = `default${upperType}Animation`;
|
|
721
|
-
const { [key]: defaultAnimation } = createShape(
|
|
722
|
-
|
|
1037
|
+
const { [key]: defaultAnimation } = createShape(
|
|
1038
|
+
shapeName(mark, defaultShape),
|
|
1039
|
+
).props;
|
|
723
1040
|
const { [type]: defaultEffectTiming = {} } = theme;
|
|
1041
|
+
const animate = subObject(mark.animate || {}, type);
|
|
724
1042
|
return (data, from, to) => {
|
|
725
1043
|
const {
|
|
726
1044
|
[`${type}Type`]: animation,
|
|
@@ -736,8 +1054,8 @@ function createAnimationFunction(
|
|
|
736
1054
|
const animateFunction = useAnimation(options);
|
|
737
1055
|
const value = { delay, duration, easing };
|
|
738
1056
|
const A = animateFunction(from, to, value, coordinate, defaultEffectTiming);
|
|
739
|
-
if (!Array.isArray(A)) return
|
|
740
|
-
return
|
|
1057
|
+
if (!Array.isArray(A)) return [A];
|
|
1058
|
+
return A;
|
|
741
1059
|
};
|
|
742
1060
|
}
|
|
743
1061
|
|
|
@@ -750,7 +1068,7 @@ function createEnterFunction(
|
|
|
750
1068
|
data: Record<string, any>,
|
|
751
1069
|
from?: DisplayObject[],
|
|
752
1070
|
to?: DisplayObject[],
|
|
753
|
-
) =>
|
|
1071
|
+
) => GAnimation[] {
|
|
754
1072
|
return createAnimationFunction('enter', mark, state, view, library);
|
|
755
1073
|
}
|
|
756
1074
|
|
|
@@ -758,10 +1076,11 @@ function createEnterFunction(
|
|
|
758
1076
|
* Animation will not cancel automatically, it should be canceled
|
|
759
1077
|
* manually. This is very important for performance.
|
|
760
1078
|
*/
|
|
761
|
-
function cancel(animation: GAnimation):
|
|
762
|
-
|
|
1079
|
+
function cancel(animation: GAnimation): GAnimation {
|
|
1080
|
+
animation.finished.then(() => {
|
|
763
1081
|
animation.cancel();
|
|
764
1082
|
});
|
|
1083
|
+
return animation;
|
|
765
1084
|
}
|
|
766
1085
|
|
|
767
1086
|
function createUpdateFunction(
|
|
@@ -773,7 +1092,7 @@ function createUpdateFunction(
|
|
|
773
1092
|
data: Record<string, any>,
|
|
774
1093
|
from?: DisplayObject[],
|
|
775
1094
|
to?: DisplayObject[],
|
|
776
|
-
) =>
|
|
1095
|
+
) => GAnimation[] {
|
|
777
1096
|
return createAnimationFunction('update', mark, state, view, library);
|
|
778
1097
|
}
|
|
779
1098
|
|
|
@@ -786,7 +1105,7 @@ function createExitFunction(
|
|
|
786
1105
|
data: Record<string, any>,
|
|
787
1106
|
from?: DisplayObject[],
|
|
788
1107
|
to?: DisplayObject[],
|
|
789
|
-
) =>
|
|
1108
|
+
) => GAnimation[] {
|
|
790
1109
|
return createAnimationFunction('exit', mark, state, view, library);
|
|
791
1110
|
}
|
|
792
1111
|
|
|
@@ -795,14 +1114,19 @@ function inferTheme(theme: G2ThemeOptions = { type: 'light' }): G2ThemeOptions {
|
|
|
795
1114
|
return { ...theme, type };
|
|
796
1115
|
}
|
|
797
1116
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
[
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1117
|
+
/**
|
|
1118
|
+
* @todo Infer builtin tooltips.
|
|
1119
|
+
*/
|
|
1120
|
+
function inferInteraction(view: G2View): G2InteractionOptions[] {
|
|
1121
|
+
const { interactions = [] } = view;
|
|
1122
|
+
// const BUILTINS: [string, boolean][] = [['tooltip', tooltip]];
|
|
1123
|
+
// const newInteractions = [...interactions];
|
|
1124
|
+
// const typeInteraction = new Map(interactions.map((d) => [d.type, d]));
|
|
1125
|
+
// for (const [type, show] of BUILTINS) {
|
|
1126
|
+
// if (!typeInteraction.has(type) && show) {
|
|
1127
|
+
// newInteractions.push({ type });
|
|
1128
|
+
// }
|
|
1129
|
+
// }
|
|
806
1130
|
return interactions;
|
|
807
1131
|
}
|
|
808
1132
|
|
|
@@ -817,7 +1141,7 @@ async function applyTransform<T extends G2ViewTree>(
|
|
|
817
1141
|
return { data: newData, ...rest };
|
|
818
1142
|
}
|
|
819
1143
|
|
|
820
|
-
function
|
|
1144
|
+
function updateBBox(selection: Selection) {
|
|
821
1145
|
selection
|
|
822
1146
|
.style('x', (d) => d.paddingLeft)
|
|
823
1147
|
.style('y', (d) => d.paddingTop)
|
|
@@ -825,40 +1149,69 @@ function applyBBox(selection: Selection) {
|
|
|
825
1149
|
.style('height', (d) => d.innerHeight);
|
|
826
1150
|
}
|
|
827
1151
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
1152
|
+
function animateBBox(selection: Selection, extent: [number, number]) {
|
|
1153
|
+
const [delay, duration] = extent;
|
|
1154
|
+
selection.transition(function (data) {
|
|
1155
|
+
const { x, y, width, height } = this.style;
|
|
1156
|
+
const { paddingLeft, paddingTop, innerWidth, innerHeight } = data;
|
|
1157
|
+
const keyframes = [
|
|
1158
|
+
{
|
|
1159
|
+
x,
|
|
1160
|
+
y,
|
|
1161
|
+
width,
|
|
1162
|
+
height,
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
x: paddingLeft,
|
|
1166
|
+
y: paddingTop,
|
|
1167
|
+
width: innerWidth,
|
|
1168
|
+
height: innerHeight,
|
|
1169
|
+
},
|
|
1170
|
+
];
|
|
1171
|
+
return this.animate(keyframes, { delay, duration, fill: 'both' });
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
function shapeName(mark: G2Mark, name: string): string {
|
|
1176
|
+
const { type } = mark;
|
|
1177
|
+
return `${type}.${name}`;
|
|
836
1178
|
}
|
|
837
1179
|
|
|
838
1180
|
/**
|
|
839
1181
|
* Create and update layer for each mark.
|
|
840
1182
|
* All the layers created here are treated as main layers.
|
|
841
1183
|
*/
|
|
842
|
-
function
|
|
1184
|
+
function updateLayers(selection: Selection, marks: G2Mark[]) {
|
|
843
1185
|
const facet = (d) => (d.class !== undefined ? `${d.class}` : '');
|
|
844
|
-
selection
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1186
|
+
selection
|
|
1187
|
+
.selectAll(className(MAIN_LAYER_CLASS_NAME))
|
|
1188
|
+
.data(marks, (d) => d.key)
|
|
1189
|
+
.join(
|
|
1190
|
+
(enter) =>
|
|
1191
|
+
enter
|
|
1192
|
+
.append('g')
|
|
1193
|
+
.attr('className', MAIN_LAYER_CLASS_NAME)
|
|
1194
|
+
.attr('id', (d) => d.key)
|
|
1195
|
+
.style('facet', facet)
|
|
1196
|
+
.style('fill', 'transparent'),
|
|
1197
|
+
(update) => update.style('facet', facet),
|
|
1198
|
+
(exit) => exit.remove(),
|
|
1199
|
+
);
|
|
1200
|
+
|
|
1201
|
+
const labelLayer = selection.select(className(LABEL_LAYER_CLASS_NAME)).node();
|
|
1202
|
+
if (labelLayer) return;
|
|
1203
|
+
selection.append('g').attr('className', LABEL_LAYER_CLASS_NAME);
|
|
860
1204
|
}
|
|
861
1205
|
|
|
862
|
-
function
|
|
863
|
-
return
|
|
1206
|
+
function className(...names: string[]): string {
|
|
1207
|
+
return names.map((d) => `.${d}`).join('');
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
export function applyStyle(
|
|
1211
|
+
selection: Selection,
|
|
1212
|
+
style: Record<string, Primitive>,
|
|
1213
|
+
) {
|
|
1214
|
+
for (const [key, value] of Object.entries(style)) {
|
|
1215
|
+
selection.style(key, value);
|
|
1216
|
+
}
|
|
864
1217
|
}
|