@antv/g2 5.2.10 → 5.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/g2.lite.min.js +22 -22
- package/dist/g2.min.js +22 -22
- package/esm/animation/scaleInY.js +2 -20
- package/esm/animation/scaleInY.js.map +1 -1
- package/esm/animation/waveIn.js +1 -1
- package/esm/animation/waveIn.js.map +1 -1
- package/esm/api/runtime.js +2 -1
- package/esm/api/runtime.js.map +1 -1
- package/esm/component/axis.js +2 -2
- package/esm/component/axis.js.map +1 -1
- package/esm/component/legendCategory.js +6 -2
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.js +1 -1
- package/esm/component/legendContinuous.js.map +1 -1
- package/esm/component/slider.js +1 -1
- package/esm/component/slider.js.map +1 -1
- package/esm/composition/d3Projection.d.ts +1 -1
- package/esm/composition/d3Projection.js +1 -1
- package/esm/composition/d3Projection.js.map +1 -1
- package/esm/composition/facetRect.js +1 -1
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/geoView.js +1 -1
- package/esm/composition/geoView.js.map +1 -1
- package/esm/data/cluster.d.ts +1 -1
- package/esm/data/cluster.js +1 -1
- package/esm/data/cluster.js.map +1 -1
- package/esm/data/fetch.js +1 -1
- package/esm/data/fetch.js.map +1 -1
- package/esm/data/join.js +1 -1
- package/esm/data/join.js.map +1 -1
- package/esm/data/kde.js +1 -1
- package/esm/data/kde.js.map +1 -1
- package/esm/data/tree.js +1 -1
- package/esm/data/tree.js.map +1 -1
- package/esm/data/utils/arc/arc.d.ts +25 -2
- package/esm/data/utils/arc/arc.js +1 -1
- package/esm/data/utils/arc/arc.js.map +1 -1
- package/esm/data/utils/arc/types.d.ts +27 -2
- package/esm/data/utils/d3-sankey/align.js +1 -1
- package/esm/data/utils/d3-sankey/align.js.map +1 -1
- package/esm/data/utils/d3-sankey/sankey.js +1 -1
- package/esm/data/utils/d3-sankey/sankey.js.map +1 -1
- package/esm/data/wordCloud.js +1 -1
- package/esm/data/wordCloud.js.map +1 -1
- package/esm/exports.d.ts +2 -0
- package/esm/exports.js +2 -0
- package/esm/exports.js.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/interaction/chartIndex.js +1 -1
- package/esm/interaction/chartIndex.js.map +1 -1
- package/esm/interaction/elementHighlight.js +1 -1
- package/esm/interaction/elementHighlight.js.map +1 -1
- package/esm/interaction/elementSelect.d.ts +1 -0
- package/esm/interaction/elementSelect.js +32 -3
- package/esm/interaction/elementSelect.js.map +1 -1
- package/esm/interaction/event.d.ts +0 -1
- package/esm/interaction/event.js +2 -13
- package/esm/interaction/event.js.map +1 -1
- package/esm/interaction/legendHighlight.js +1 -1
- package/esm/interaction/legendHighlight.js.map +1 -1
- package/esm/interaction/tooltip.js +8 -35
- package/esm/interaction/tooltip.js.map +1 -1
- package/esm/interaction/treemapDrillDown.d.ts +2 -2
- package/esm/interaction/treemapDrillDown.js.map +1 -1
- package/esm/interaction/utils.js +2 -2
- package/esm/interaction/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.js +1 -1
- package/esm/label-transform/contrastReverse.js.map +1 -1
- package/esm/label-transform/overlapDodgeY.js +1 -1
- package/esm/label-transform/overlapDodgeY.js.map +1 -1
- package/esm/lib/core.d.ts +1 -0
- package/esm/lib/core.js +2 -1
- package/esm/lib/core.js.map +1 -1
- package/esm/lib/std.d.ts +1 -0
- package/esm/mark/area.js +1 -1
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/boxplot.js +1 -1
- package/esm/mark/boxplot.js.map +1 -1
- package/esm/mark/forceGraph.js +1 -1
- package/esm/mark/forceGraph.js.map +1 -1
- package/esm/mark/line.js +1 -1
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/pack.js +1 -1
- package/esm/mark/pack.js.map +1 -1
- package/esm/mark/utils.d.ts +1 -1
- package/esm/runtime/component.js +2 -2
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/layout.js +1 -1
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/mark.js +1 -1
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.js +2 -2
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/scale.js +2 -2
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +1 -0
- package/esm/runtime/transform.js +3 -2
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/mark.d.ts +1 -1
- package/esm/shape/area/area.js +1 -1
- package/esm/shape/area/area.js.map +1 -1
- package/esm/shape/area/curve.d.ts +1 -1
- package/esm/shape/area/curve.js +1 -1
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/area/hv.js +1 -1
- package/esm/shape/area/hv.js.map +1 -1
- package/esm/shape/area/hvh.js +1 -1
- package/esm/shape/area/hvh.js.map +1 -1
- package/esm/shape/area/smooth.js +1 -1
- package/esm/shape/area/smooth.js.map +1 -1
- package/esm/shape/area/vh.js +1 -1
- package/esm/shape/area/vh.js.map +1 -1
- package/esm/shape/box/box.js +1 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/box/violin.js +1 -1
- package/esm/shape/box/violin.js.map +1 -1
- package/esm/shape/connector/connector.js +1 -1
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/density/density.js +1 -1
- package/esm/shape/density/density.js.map +1 -1
- package/esm/shape/heatmap/heatmap.js +2 -2
- package/esm/shape/heatmap/heatmap.js.map +1 -1
- package/esm/shape/interval/color.js +1 -1
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/interval/funnel.js +1 -1
- package/esm/shape/interval/funnel.js.map +1 -1
- package/esm/shape/label/position/area.js +1 -1
- package/esm/shape/label/position/area.js.map +1 -1
- package/esm/shape/label/position/utils.js +1 -1
- package/esm/shape/label/position/utils.js.map +1 -1
- package/esm/shape/line/curve.d.ts +1 -1
- package/esm/shape/line/curve.js +1 -1
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/line/hv.js +1 -1
- package/esm/shape/line/hv.js.map +1 -1
- package/esm/shape/line/hvh.js +1 -1
- package/esm/shape/line/hvh.js.map +1 -1
- package/esm/shape/line/line.js +1 -1
- package/esm/shape/line/line.js.map +1 -1
- package/esm/shape/line/smooth.js +1 -1
- package/esm/shape/line/smooth.js.map +1 -1
- package/esm/shape/line/trail.js +1 -1
- package/esm/shape/line/trail.js.map +1 -1
- package/esm/shape/line/vh.js +1 -1
- package/esm/shape/line/vh.js.map +1 -1
- package/esm/shape/lineXY/line.js +1 -1
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.js +1 -1
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/smooth.js +1 -1
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.js +1 -1
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/polygon/polygon.js +1 -1
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.js +1 -1
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/text/advance.js +1 -1
- package/esm/shape/text/advance.js.map +1 -1
- package/esm/shape/utils.d.ts +1 -1
- package/esm/shape/utils.js +1 -1
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.js +1 -1
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/interaction.d.ts +1 -0
- package/esm/transform/bin.js +1 -1
- package/esm/transform/bin.js.map +1 -1
- package/esm/transform/flexX.js +1 -1
- package/esm/transform/flexX.js.map +1 -1
- package/esm/transform/groupN.js +1 -1
- package/esm/transform/groupN.js.map +1 -1
- package/esm/transform/normalizeY.js +1 -1
- package/esm/transform/normalizeY.js.map +1 -1
- package/esm/transform/sample.js +1 -1
- package/esm/transform/sample.js.map +1 -1
- package/esm/transform/select.js +1 -1
- package/esm/transform/select.js.map +1 -1
- package/esm/transform/sort.d.ts +1 -1
- package/esm/transform/sort.js +20 -52
- package/esm/transform/sort.js.map +1 -1
- package/esm/transform/stackEnter.js +1 -1
- package/esm/transform/stackEnter.js.map +1 -1
- package/esm/transform/symmetryY.js +1 -1
- package/esm/transform/symmetryY.js.map +1 -1
- package/esm/transform/utils/order.d.ts +1 -1
- package/esm/transform/utils/order.js +1 -1
- package/esm/transform/utils/order.js.map +1 -1
- package/esm/utils/bounds.d.ts +4 -2
- package/esm/utils/bounds.js +11 -4
- package/esm/utils/bounds.js.map +1 -1
- package/esm/utils/helper.d.ts +24 -0
- package/esm/utils/helper.js +76 -0
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/scale.js +1 -1
- package/esm/utils/scale.js.map +1 -1
- package/esm/utils/selection.js +1 -1
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/treeDataTransform.d.ts +9 -2
- package/esm/utils/treeDataTransform.js +6 -2
- package/esm/utils/treeDataTransform.js.map +1 -1
- package/lib/animation/scaleInY.js +1 -19
- package/lib/animation/scaleInY.js.map +1 -1
- package/lib/animation/waveIn.js +1 -1
- package/lib/animation/waveIn.js.map +1 -1
- package/lib/api/runtime.js +2 -1
- package/lib/api/runtime.js.map +1 -1
- package/lib/component/axis.js +2 -2
- package/lib/component/axis.js.map +1 -1
- package/lib/component/legendCategory.js +6 -2
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.js +1 -1
- package/lib/component/legendContinuous.js.map +1 -1
- package/lib/component/slider.js +1 -1
- package/lib/component/slider.js.map +1 -1
- package/lib/composition/d3Projection.d.ts +1 -1
- package/lib/composition/d3Projection.js +1 -1
- package/lib/composition/d3Projection.js.map +1 -1
- package/lib/composition/facetRect.js +1 -1
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/geoView.js +1 -1
- package/lib/composition/geoView.js.map +1 -1
- package/lib/data/cluster.d.ts +1 -1
- package/lib/data/cluster.js +1 -1
- package/lib/data/cluster.js.map +1 -1
- package/lib/data/fetch.js +1 -1
- package/lib/data/fetch.js.map +1 -1
- package/lib/data/join.js +1 -1
- package/lib/data/join.js.map +1 -1
- package/lib/data/kde.js +1 -1
- package/lib/data/kde.js.map +1 -1
- package/lib/data/tree.js +1 -1
- package/lib/data/tree.js.map +1 -1
- package/lib/data/utils/arc/arc.d.ts +25 -2
- package/lib/data/utils/arc/arc.js +1 -1
- package/lib/data/utils/arc/arc.js.map +1 -1
- package/lib/data/utils/arc/types.d.ts +27 -2
- package/lib/data/utils/d3-sankey/align.js +1 -1
- package/lib/data/utils/d3-sankey/align.js.map +1 -1
- package/lib/data/utils/d3-sankey/sankey.js +1 -1
- package/lib/data/utils/d3-sankey/sankey.js.map +1 -1
- package/lib/data/wordCloud.js +1 -1
- package/lib/data/wordCloud.js.map +1 -1
- package/lib/exports.d.ts +2 -0
- package/lib/exports.js +7 -1
- package/lib/exports.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/interaction/chartIndex.js +1 -1
- package/lib/interaction/chartIndex.js.map +1 -1
- package/lib/interaction/elementHighlight.js +1 -1
- package/lib/interaction/elementHighlight.js.map +1 -1
- package/lib/interaction/elementSelect.d.ts +1 -0
- package/lib/interaction/elementSelect.js +32 -3
- package/lib/interaction/elementSelect.js.map +1 -1
- package/lib/interaction/event.d.ts +0 -1
- package/lib/interaction/event.js +3 -15
- package/lib/interaction/event.js.map +1 -1
- package/lib/interaction/legendHighlight.js +1 -1
- package/lib/interaction/legendHighlight.js.map +1 -1
- package/lib/interaction/tooltip.js +10 -37
- package/lib/interaction/tooltip.js.map +1 -1
- package/lib/interaction/treemapDrillDown.d.ts +2 -2
- package/lib/interaction/treemapDrillDown.js.map +1 -1
- package/lib/interaction/utils.js +2 -2
- package/lib/interaction/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.js +1 -1
- package/lib/label-transform/contrastReverse.js.map +1 -1
- package/lib/label-transform/overlapDodgeY.js +1 -1
- package/lib/label-transform/overlapDodgeY.js.map +1 -1
- package/lib/lib/core.d.ts +1 -0
- package/lib/lib/core.js +1 -0
- package/lib/lib/core.js.map +1 -1
- package/lib/lib/std.d.ts +1 -0
- package/lib/mark/area.js +1 -1
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/boxplot.js +1 -1
- package/lib/mark/boxplot.js.map +1 -1
- package/lib/mark/forceGraph.js +1 -1
- package/lib/mark/forceGraph.js.map +1 -1
- package/lib/mark/line.js +1 -1
- package/lib/mark/line.js.map +1 -1
- package/lib/mark/pack.js +1 -1
- package/lib/mark/pack.js.map +1 -1
- package/lib/mark/utils.d.ts +1 -1
- package/lib/runtime/component.js +2 -2
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/layout.js +1 -1
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/mark.js +1 -1
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.js +2 -2
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/scale.js +2 -2
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +1 -0
- package/lib/runtime/transform.js +4 -3
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/mark.d.ts +1 -1
- package/lib/shape/area/area.js +1 -1
- package/lib/shape/area/area.js.map +1 -1
- package/lib/shape/area/curve.d.ts +1 -1
- package/lib/shape/area/curve.js +1 -1
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/area/hv.js +1 -1
- package/lib/shape/area/hv.js.map +1 -1
- package/lib/shape/area/hvh.js +1 -1
- package/lib/shape/area/hvh.js.map +1 -1
- package/lib/shape/area/smooth.js +1 -1
- package/lib/shape/area/smooth.js.map +1 -1
- package/lib/shape/area/vh.js +1 -1
- package/lib/shape/area/vh.js.map +1 -1
- package/lib/shape/box/box.js +1 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/box/violin.js +1 -1
- package/lib/shape/box/violin.js.map +1 -1
- package/lib/shape/connector/connector.js +1 -1
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/density/density.js +1 -1
- package/lib/shape/density/density.js.map +1 -1
- package/lib/shape/heatmap/heatmap.js +2 -2
- package/lib/shape/heatmap/heatmap.js.map +1 -1
- package/lib/shape/interval/color.js +1 -1
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/interval/funnel.js +1 -1
- package/lib/shape/interval/funnel.js.map +1 -1
- package/lib/shape/label/position/area.js +1 -1
- package/lib/shape/label/position/area.js.map +1 -1
- package/lib/shape/label/position/utils.js +1 -1
- package/lib/shape/label/position/utils.js.map +1 -1
- package/lib/shape/line/curve.d.ts +1 -1
- package/lib/shape/line/curve.js +1 -1
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/line/hv.js +1 -1
- package/lib/shape/line/hv.js.map +1 -1
- package/lib/shape/line/hvh.js +1 -1
- package/lib/shape/line/hvh.js.map +1 -1
- package/lib/shape/line/line.js +1 -1
- package/lib/shape/line/line.js.map +1 -1
- package/lib/shape/line/smooth.js +1 -1
- package/lib/shape/line/smooth.js.map +1 -1
- package/lib/shape/line/trail.js +1 -1
- package/lib/shape/line/trail.js.map +1 -1
- package/lib/shape/line/vh.js +1 -1
- package/lib/shape/line/vh.js.map +1 -1
- package/lib/shape/lineXY/line.js +1 -1
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.js +1 -1
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/smooth.js +1 -1
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.js +1 -1
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/polygon/polygon.js +1 -1
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.js +1 -1
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/text/advance.js +1 -1
- package/lib/shape/text/advance.js.map +1 -1
- package/lib/shape/utils.d.ts +1 -1
- package/lib/shape/utils.js +1 -1
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.js +1 -1
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/interaction.d.ts +1 -0
- package/lib/transform/bin.js +1 -1
- package/lib/transform/bin.js.map +1 -1
- package/lib/transform/flexX.js +1 -1
- package/lib/transform/flexX.js.map +1 -1
- package/lib/transform/groupN.js +1 -1
- package/lib/transform/groupN.js.map +1 -1
- package/lib/transform/normalizeY.js +1 -1
- package/lib/transform/normalizeY.js.map +1 -1
- package/lib/transform/sample.js +1 -1
- package/lib/transform/sample.js.map +1 -1
- package/lib/transform/select.js +1 -1
- package/lib/transform/select.js.map +1 -1
- package/lib/transform/sort.d.ts +1 -1
- package/lib/transform/sort.js +20 -52
- package/lib/transform/sort.js.map +1 -1
- package/lib/transform/stackEnter.js +1 -1
- package/lib/transform/stackEnter.js.map +1 -1
- package/lib/transform/symmetryY.js +1 -1
- package/lib/transform/symmetryY.js.map +1 -1
- package/lib/transform/utils/order.d.ts +1 -1
- package/lib/transform/utils/order.js +1 -1
- package/lib/transform/utils/order.js.map +1 -1
- package/lib/utils/bounds.d.ts +4 -2
- package/lib/utils/bounds.js +11 -4
- package/lib/utils/bounds.js.map +1 -1
- package/lib/utils/helper.d.ts +24 -0
- package/lib/utils/helper.js +81 -1
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/scale.js +1 -1
- package/lib/utils/scale.js.map +1 -1
- package/lib/utils/selection.js +1 -1
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/treeDataTransform.d.ts +9 -2
- package/lib/utils/treeDataTransform.js +6 -2
- package/lib/utils/treeDataTransform.js.map +1 -1
- package/package.json +7 -24
- package/src/animation/scaleInY.ts +2 -45
- package/src/animation/waveIn.ts +1 -1
- package/src/api/runtime.ts +3 -1
- package/src/component/axis.ts +2 -2
- package/src/component/legendCategory.ts +10 -2
- package/src/component/legendContinuous.ts +1 -1
- package/src/component/slider.ts +1 -1
- package/src/composition/d3Projection.ts +1 -1
- package/src/composition/facetRect.ts +1 -1
- package/src/composition/geoView.ts +1 -1
- package/src/data/cluster.ts +1 -1
- package/src/data/fetch.ts +1 -1
- package/src/data/join.ts +1 -1
- package/src/data/kde.ts +1 -1
- package/src/data/tree.ts +1 -1
- package/src/data/utils/arc/arc.ts +6 -6
- package/src/data/utils/arc/types.ts +28 -2
- package/src/data/utils/d3-sankey/align.ts +1 -1
- package/src/data/utils/d3-sankey/sankey.ts +1 -1
- package/src/data/wordCloud.ts +1 -1
- package/src/exports.ts +3 -0
- package/src/interaction/chartIndex.ts +1 -1
- package/src/interaction/elementHighlight.ts +1 -1
- package/src/interaction/elementSelect.ts +33 -3
- package/src/interaction/event.ts +2 -15
- package/src/interaction/legendHighlight.ts +4 -2
- package/src/interaction/tooltip.ts +10 -39
- package/src/interaction/treemapDrillDown.ts +2 -3
- package/src/interaction/utils.ts +2 -2
- package/src/label-transform/contrastReverse.ts +1 -1
- package/src/label-transform/overlapDodgeY.ts +1 -1
- package/src/lib/core.ts +2 -0
- package/src/mark/area.ts +1 -1
- package/src/mark/boxplot.ts +6 -1
- package/src/mark/forceGraph.ts +1 -1
- package/src/mark/line.ts +1 -1
- package/src/mark/pack.ts +5 -1
- package/src/mark/utils.ts +1 -1
- package/src/runtime/component.ts +2 -2
- package/src/runtime/layout.ts +15 -2
- package/src/runtime/mark.ts +1 -1
- package/src/runtime/plot.ts +2 -2
- package/src/runtime/scale.ts +2 -2
- package/src/runtime/transform.ts +6 -3
- package/src/runtime/types/mark.ts +1 -1
- package/src/shape/area/area.ts +1 -1
- package/src/shape/area/curve.ts +1 -1
- package/src/shape/area/hv.ts +1 -1
- package/src/shape/area/hvh.ts +1 -1
- package/src/shape/area/smooth.ts +1 -1
- package/src/shape/area/vh.ts +1 -1
- package/src/shape/box/box.ts +1 -1
- package/src/shape/box/violin.ts +1 -1
- package/src/shape/connector/connector.ts +1 -1
- package/src/shape/density/density.ts +1 -1
- package/src/shape/heatmap/heatmap.ts +2 -2
- package/src/shape/interval/color.ts +1 -1
- package/src/shape/interval/funnel.ts +1 -1
- package/src/shape/label/position/area.ts +1 -1
- package/src/shape/label/position/utils.ts +1 -1
- package/src/shape/line/curve.ts +6 -1
- package/src/shape/line/hv.ts +1 -1
- package/src/shape/line/hvh.ts +1 -1
- package/src/shape/line/line.ts +1 -1
- package/src/shape/line/smooth.ts +1 -1
- package/src/shape/line/trail.ts +1 -1
- package/src/shape/line/vh.ts +1 -1
- package/src/shape/lineXY/line.ts +1 -1
- package/src/shape/link/arc.ts +1 -1
- package/src/shape/link/smooth.ts +1 -1
- package/src/shape/link/vhv.ts +1 -1
- package/src/shape/polygon/polygon.ts +1 -1
- package/src/shape/polygon/ribbon.ts +1 -1
- package/src/shape/text/advance.ts +1 -1
- package/src/shape/utils.ts +2 -2
- package/src/shape/vector/vector.ts +1 -1
- package/src/spec/interaction.ts +1 -0
- package/src/transform/bin.ts +8 -3
- package/src/transform/flexX.ts +1 -1
- package/src/transform/groupN.ts +1 -1
- package/src/transform/normalizeY.ts +1 -1
- package/src/transform/sample.ts +1 -1
- package/src/transform/select.ts +1 -1
- package/src/transform/sort.ts +21 -43
- package/src/transform/stackEnter.ts +1 -1
- package/src/transform/symmetryY.ts +1 -1
- package/src/transform/utils/order.ts +1 -1
- package/src/utils/bounds.ts +22 -4
- package/src/utils/helper.ts +83 -0
- package/src/utils/scale.ts +1 -1
- package/src/utils/selection.ts +1 -1
- package/src/utils/treeDataTransform.ts +26 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DisplayObject } from '@antv/g';
|
|
2
2
|
import { Category } from '@antv/component';
|
|
3
3
|
import { last } from '@antv/util';
|
|
4
|
-
import { format } from 'd3-format';
|
|
4
|
+
import { format } from '@antv/vendor/d3-format';
|
|
5
5
|
import { Identity } from '@antv/scale';
|
|
6
6
|
import type {
|
|
7
7
|
FlexLayout,
|
|
@@ -170,6 +170,13 @@ function inferLegendShape(
|
|
|
170
170
|
return { width, height };
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
function filterEmptyIds(legendStyle) {
|
|
174
|
+
return {
|
|
175
|
+
...legendStyle,
|
|
176
|
+
data: legendStyle?.data.filter((item) => item.id !== '') || [],
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
173
180
|
/**
|
|
174
181
|
* Guide Component for ordinal color scale.
|
|
175
182
|
*/
|
|
@@ -211,8 +218,9 @@ export const LegendCategory: GCC<LegendCategoryOptions> = (options) => {
|
|
|
211
218
|
|
|
212
219
|
const { legendCategory: legendTheme = {} } = theme;
|
|
213
220
|
|
|
221
|
+
// Filter out the data items with empty string IDs in the wordCloud's data before generating the legend.
|
|
214
222
|
const categoryStyle = adaptor(
|
|
215
|
-
Object.assign({}, legendTheme, legendStyle, style),
|
|
223
|
+
Object.assign({}, legendTheme, filterEmptyIds(legendStyle), style),
|
|
216
224
|
);
|
|
217
225
|
|
|
218
226
|
const layoutWrapper = new LegendCategoryLayout({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DisplayObject, parseColor } from '@antv/g';
|
|
2
2
|
import { Continuous } from '@antv/component';
|
|
3
3
|
import { Constant, Quantile, Quantize, Threshold } from '@antv/scale';
|
|
4
|
-
import { format } from 'd3-format';
|
|
4
|
+
import { format } from '@antv/vendor/d3-format';
|
|
5
5
|
import type {
|
|
6
6
|
FlexLayout,
|
|
7
7
|
G2Theme,
|
package/src/component/slider.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slider as SliderComponent } from '@antv/component';
|
|
2
|
-
import { format } from 'd3-format';
|
|
2
|
+
import { format } from '@antv/vendor/d3-format';
|
|
3
3
|
import { DisplayObject } from '@antv/g';
|
|
4
4
|
import { isArray } from '@antv/util';
|
|
5
5
|
import { isTranspose } from '../utils/coordinate';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Linear } from '@antv/scale';
|
|
2
2
|
import { upperFirst } from '@antv/util';
|
|
3
|
-
import { geoPath, geoGraticule10 } from 'd3-geo';
|
|
3
|
+
import { geoPath, geoGraticule10 } from '@antv/vendor/d3-geo';
|
|
4
4
|
import { maybeTooltip } from '../utils/mark';
|
|
5
5
|
import { CompositionComponent as CC } from '../runtime';
|
|
6
6
|
import { GeoViewComposition } from '../spec';
|
package/src/data/cluster.ts
CHANGED
package/src/data/fetch.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dsvFormat, autoType as d3AutoType } from 'd3-dsv';
|
|
1
|
+
import { dsvFormat, autoType as d3AutoType } from '@antv/vendor/d3-dsv';
|
|
2
2
|
import { FetchConnector } from '../spec';
|
|
3
3
|
import { DataComponent as DC } from '../runtime';
|
|
4
4
|
import { identity } from '../utils/helper';
|
package/src/data/join.ts
CHANGED
package/src/data/kde.ts
CHANGED
package/src/data/tree.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { group, sum } from 'd3-array';
|
|
1
|
+
import { group, sum } from '@antv/vendor/d3-array';
|
|
2
2
|
import { error } from '../../../utils/helper';
|
|
3
|
-
import { ArcData, ArcOptions } from './types';
|
|
3
|
+
import { ArcData, ArcOptions, ArcEdge, ArcNode } from './types';
|
|
4
4
|
import * as SortMethods from './sort';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_OPTIONS = {
|
|
@@ -53,7 +53,7 @@ export function Arc(options?: ArcOptions) {
|
|
|
53
53
|
/**
|
|
54
54
|
* Calculate id, value, frequency for node, and source,target for edge.
|
|
55
55
|
*/
|
|
56
|
-
function preprocess(nodes, edges) {
|
|
56
|
+
function preprocess(nodes: ArcNode[], edges: ArcEdge[]) {
|
|
57
57
|
edges.forEach((edge) => {
|
|
58
58
|
edge.source = source(edge);
|
|
59
59
|
edge.target = target(edge);
|
|
@@ -83,7 +83,7 @@ export function Arc(options?: ArcOptions) {
|
|
|
83
83
|
return { nodes, edges };
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function sortNodes(nodes, edges) {
|
|
86
|
+
function sortNodes(nodes: ArcNode[], edges: ArcEdge[]) {
|
|
87
87
|
const method = typeof sortBy === 'function' ? sortBy : SortMethods[sortBy];
|
|
88
88
|
|
|
89
89
|
if (method) {
|
|
@@ -91,7 +91,7 @@ export function Arc(options?: ArcOptions) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function layoutNodes(nodes, edges) {
|
|
94
|
+
function layoutNodes(nodes: ArcNode[], edges: ArcEdge[]) {
|
|
95
95
|
const size = nodes.length;
|
|
96
96
|
if (!size) {
|
|
97
97
|
throw error("Invalid nodes: it's empty!");
|
|
@@ -145,7 +145,7 @@ export function Arc(options?: ArcOptions) {
|
|
|
145
145
|
/**
|
|
146
146
|
* Get edge layout information from nodes, and save into edge object.
|
|
147
147
|
*/
|
|
148
|
-
function layoutEdges(nodes, edges) {
|
|
148
|
+
function layoutEdges(nodes: ArcNode[], edges: ArcEdge[]) {
|
|
149
149
|
const nodesMap = new Map(nodes.map((d) => [d.id, d]));
|
|
150
150
|
|
|
151
151
|
if (!weight) {
|
|
@@ -20,8 +20,34 @@ export type ArcOptions = {
|
|
|
20
20
|
/** Thickness of node, default: 0.05 */
|
|
21
21
|
thickness?: number;
|
|
22
22
|
};
|
|
23
|
+
export interface ArcEdge {
|
|
24
|
+
source: string;
|
|
25
|
+
target: string;
|
|
26
|
+
sourceWeight: number;
|
|
27
|
+
targetWeight: number;
|
|
28
|
+
x: number[] | number;
|
|
29
|
+
y: number[] | number;
|
|
30
|
+
value: number;
|
|
31
|
+
weight?: number;
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
frequency?: number;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ArcNode {
|
|
39
|
+
id: string;
|
|
40
|
+
x: number[] | number;
|
|
41
|
+
y: number[] | number;
|
|
42
|
+
value: number;
|
|
43
|
+
frequency: number;
|
|
44
|
+
weight?: number;
|
|
45
|
+
width?: number;
|
|
46
|
+
height?: number;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
23
49
|
|
|
24
50
|
export type ArcData = {
|
|
25
|
-
nodes:
|
|
26
|
-
edges:
|
|
51
|
+
nodes: ArcNode[];
|
|
52
|
+
edges: ArcEdge[];
|
|
27
53
|
};
|
package/src/data/wordCloud.ts
CHANGED
package/src/exports.ts
CHANGED
|
@@ -37,6 +37,9 @@ export type {
|
|
|
37
37
|
Channel,
|
|
38
38
|
} from './runtime';
|
|
39
39
|
export { select, Selection } from './utils/selection';
|
|
40
|
+
export { dataOf, seriesOf } from './utils/helper';
|
|
41
|
+
export { selectG2Elements, selectPlotArea } from './interaction/utils';
|
|
42
|
+
|
|
40
43
|
export * from './transform';
|
|
41
44
|
export { LinearAxis } from './component/axis';
|
|
42
45
|
export type { AxisOptions } from './component/axis';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DisplayObject } from '@antv/g';
|
|
2
|
-
import { group } from 'd3-array';
|
|
2
|
+
import { group } from '@antv/vendor/d3-array';
|
|
3
3
|
import { deepMix } from '@antv/util';
|
|
4
4
|
import { subObject } from '../utils/helper';
|
|
5
5
|
import {
|
|
@@ -26,6 +26,7 @@ export function elementSelect(
|
|
|
26
26
|
groupKey = (d) => d, // group elements by specified key
|
|
27
27
|
link = false, // draw link or not
|
|
28
28
|
single = false, // single select or not
|
|
29
|
+
multipleSelectHotkey, // hotkey for multi-select mode
|
|
29
30
|
coordinate,
|
|
30
31
|
background = false,
|
|
31
32
|
scale,
|
|
@@ -68,6 +69,8 @@ export function elementSelect(
|
|
|
68
69
|
});
|
|
69
70
|
|
|
70
71
|
const { setState, removeState, hasState } = useState(elementStyle, valueof);
|
|
72
|
+
let isMultiSelectMode = !single; // "single" determines whether to multi-select by default
|
|
73
|
+
let activeHotkey = null; // Track the currently active hotkey
|
|
71
74
|
|
|
72
75
|
const clear = (nativeEvent = true) => {
|
|
73
76
|
for (const e of elements) {
|
|
@@ -151,16 +154,39 @@ export function elementSelect(
|
|
|
151
154
|
// Click non-element shape, reset.
|
|
152
155
|
// Such as the rest of content area(background).
|
|
153
156
|
if (!elementSet.has(element)) return clear();
|
|
154
|
-
if (
|
|
157
|
+
if (!isMultiSelectMode) return singleSelect(event, element, nativeEvent);
|
|
155
158
|
return multipleSelect(event, element, nativeEvent);
|
|
156
159
|
};
|
|
157
160
|
|
|
161
|
+
// Handle keyboard events for multi-select mode
|
|
162
|
+
const hotkeys = Array.isArray(multipleSelectHotkey)
|
|
163
|
+
? multipleSelectHotkey
|
|
164
|
+
: [multipleSelectHotkey];
|
|
165
|
+
const handleKeyDown = (event) => {
|
|
166
|
+
if (hotkeys.includes(event.code) && !activeHotkey) {
|
|
167
|
+
activeHotkey = event.code;
|
|
168
|
+
isMultiSelectMode = true;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const handleKeyUp = (event) => {
|
|
172
|
+
if (event.code === activeHotkey) {
|
|
173
|
+
activeHotkey = null;
|
|
174
|
+
isMultiSelectMode = false;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
158
178
|
root.addEventListener('click', click);
|
|
179
|
+
if (multipleSelectHotkey) {
|
|
180
|
+
// If a hotkey is set, the initial state should be single mode
|
|
181
|
+
isMultiSelectMode = false;
|
|
182
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
183
|
+
document.addEventListener('keyup', handleKeyUp);
|
|
184
|
+
}
|
|
159
185
|
|
|
160
186
|
const onSelect = (e) => {
|
|
161
187
|
const { nativeEvent, data } = e;
|
|
162
188
|
if (nativeEvent) return;
|
|
163
|
-
const selectedData =
|
|
189
|
+
const selectedData = !isMultiSelectMode ? data.data.slice(0, 1) : data.data;
|
|
164
190
|
for (const d of selectedData) {
|
|
165
191
|
const element = selectElementByData(elements, d, datum);
|
|
166
192
|
click({ target: element, nativeEvent: false });
|
|
@@ -177,6 +203,10 @@ export function elementSelect(
|
|
|
177
203
|
return () => {
|
|
178
204
|
for (const e of elements) removeLink(e);
|
|
179
205
|
root.removeEventListener('click', click);
|
|
206
|
+
if (multipleSelectHotkey) {
|
|
207
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
208
|
+
document.removeEventListener('keyup', handleKeyUp);
|
|
209
|
+
}
|
|
180
210
|
emitter.off('element:select', onSelect);
|
|
181
211
|
emitter.off('element:unselect', onUnSelect);
|
|
182
212
|
};
|
package/src/interaction/event.ts
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { ChartEvent } from '../utils/event';
|
|
2
|
+
import { dataOf } from '../utils/helper';
|
|
2
3
|
import { maybeRoot } from './utils';
|
|
3
4
|
|
|
4
|
-
export function dataOf(element, view) {
|
|
5
|
-
const { __data__: datum } = element;
|
|
6
|
-
const { markKey, index, seriesIndex } = datum;
|
|
7
|
-
const { markState } = view;
|
|
8
|
-
const selectedMark: any = Array.from(markState.keys()).find(
|
|
9
|
-
(mark) => (mark as any).key === markKey,
|
|
10
|
-
);
|
|
11
|
-
if (!selectedMark) return;
|
|
12
|
-
if (seriesIndex) {
|
|
13
|
-
return seriesIndex.map((i) => selectedMark.data[i]);
|
|
14
|
-
}
|
|
15
|
-
return selectedMark.data[index];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
5
|
// For extended component
|
|
19
6
|
function maybeComponentRoot(node) {
|
|
20
7
|
return maybeRoot(node, (node) => node.className === 'component');
|
|
@@ -63,7 +50,7 @@ function bubblesEvent(eventType, view, emitter, predicate = (event) => true) {
|
|
|
63
50
|
nativeEvent: true,
|
|
64
51
|
};
|
|
65
52
|
if (elementType === 'element') {
|
|
66
|
-
e1['data'] = { data: dataOf(root
|
|
53
|
+
e1['data'] = { data: dataOf(root) };
|
|
67
54
|
emitter.emit(`element:${eventType}`, e1);
|
|
68
55
|
emitter.emit(`${markType}:${eventType}`, e1);
|
|
69
56
|
} else if (elementType === 'label') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { group } from 'd3-array';
|
|
1
|
+
import { InternMap, group } from '@antv/vendor/d3-array';
|
|
2
2
|
import { subObject } from '../utils/helper';
|
|
3
3
|
import {
|
|
4
4
|
mergeState,
|
|
@@ -66,7 +66,9 @@ export function LegendHighlight() {
|
|
|
66
66
|
const highlightItem = (event, item) => {
|
|
67
67
|
// Update UI.
|
|
68
68
|
const value = datumOf(item);
|
|
69
|
-
const elementSet = new Set(
|
|
69
|
+
const elementSet = new Set(
|
|
70
|
+
(elementGroup as InternMap<unknown, any[]>).get(value),
|
|
71
|
+
);
|
|
70
72
|
for (const e of elements) {
|
|
71
73
|
if (elementSet.has(e)) setState(e, 'active');
|
|
72
74
|
else setState(e, 'inactive');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Circle, DisplayObject, IElement, Line } from '@antv/g';
|
|
2
|
-
import { sort, group, mean, bisector, minIndex } from 'd3-array';
|
|
2
|
+
import { sort, group, mean, bisector, minIndex } from '@antv/vendor/d3-array';
|
|
3
3
|
import { deepMix, lowerFirst, throttle } from '@antv/util';
|
|
4
4
|
import { Tooltip as TooltipComponent } from '@antv/component';
|
|
5
|
-
import {
|
|
6
|
-
import { defined, subObject } from '../utils/helper';
|
|
5
|
+
import { defined, groupNameOf, subObject, dataOf } from '../utils/helper';
|
|
7
6
|
import { isTranspose, isPolar } from '../utils/coordinate';
|
|
8
7
|
import { angle, sub, dist } from '../utils/vector';
|
|
9
8
|
import { invert } from '../utils/scale';
|
|
10
9
|
import { BBox } from '../runtime';
|
|
10
|
+
import { CALLBACK_ITEM_SYMBOL } from '../runtime/transform';
|
|
11
11
|
import {
|
|
12
12
|
selectG2Elements,
|
|
13
13
|
createXKey,
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
bboxOf,
|
|
20
20
|
maybeRoot,
|
|
21
21
|
} from './utils';
|
|
22
|
-
import { dataOf } from './event';
|
|
23
22
|
|
|
24
23
|
function getContainer(
|
|
25
24
|
group: IElement,
|
|
@@ -208,39 +207,6 @@ function singleItem(element) {
|
|
|
208
207
|
};
|
|
209
208
|
}
|
|
210
209
|
|
|
211
|
-
function groupNameOf(scale, datum) {
|
|
212
|
-
const { color: scaleColor, series: scaleSeries, facet = false } = scale;
|
|
213
|
-
const { color, series } = datum;
|
|
214
|
-
const invertAble = (scale) => {
|
|
215
|
-
return (
|
|
216
|
-
scale &&
|
|
217
|
-
scale.invert &&
|
|
218
|
-
!(scale instanceof Band) &&
|
|
219
|
-
!(scale instanceof Constant)
|
|
220
|
-
);
|
|
221
|
-
};
|
|
222
|
-
// For non constant color channel.
|
|
223
|
-
if (invertAble(scaleSeries)) {
|
|
224
|
-
const cloned = scaleSeries.clone();
|
|
225
|
-
return cloned.invert(series);
|
|
226
|
-
}
|
|
227
|
-
if (
|
|
228
|
-
series &&
|
|
229
|
-
scaleSeries instanceof Band &&
|
|
230
|
-
scaleSeries.invert(series) !== color &&
|
|
231
|
-
!facet
|
|
232
|
-
) {
|
|
233
|
-
return scaleSeries.invert(series);
|
|
234
|
-
}
|
|
235
|
-
if (invertAble(scaleColor)) {
|
|
236
|
-
const name = scaleColor.invert(color);
|
|
237
|
-
// For threshold scale.
|
|
238
|
-
if (Array.isArray(name)) return null;
|
|
239
|
-
return name;
|
|
240
|
-
}
|
|
241
|
-
return null;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
210
|
function itemColorOf(element) {
|
|
245
211
|
const fill = element.getAttribute('fill');
|
|
246
212
|
const stroke = element.getAttribute('stroke');
|
|
@@ -279,7 +245,12 @@ function groupItems(
|
|
|
279
245
|
return definedItems.map(
|
|
280
246
|
({ color = itemColorOf(element) || theme.color, name, ...item }) => {
|
|
281
247
|
const groupName = groupNameOf(scale, datum);
|
|
282
|
-
|
|
248
|
+
// callback's priority is higher than groupName.
|
|
249
|
+
const name1 =
|
|
250
|
+
useGroupName && !(CALLBACK_ITEM_SYMBOL in item)
|
|
251
|
+
? groupName || name
|
|
252
|
+
: name || groupName;
|
|
253
|
+
|
|
283
254
|
return {
|
|
284
255
|
...item,
|
|
285
256
|
color,
|
|
@@ -1097,7 +1068,7 @@ export function tooltip(
|
|
|
1097
1068
|
nativeEvent: true,
|
|
1098
1069
|
data: {
|
|
1099
1070
|
...data,
|
|
1100
|
-
data: dataOf(element
|
|
1071
|
+
data: dataOf(element),
|
|
1101
1072
|
},
|
|
1102
1073
|
});
|
|
1103
1074
|
},
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Text, Group } from '@antv/g';
|
|
2
2
|
import { get, deepMix, pick, keys, find, size, last } from '@antv/util';
|
|
3
|
-
import type { Node } from 'd3-hierarchy';
|
|
4
3
|
import type { DisplayObject } from '@antv/g';
|
|
5
4
|
import { subObject } from '../utils/helper';
|
|
6
5
|
import { PLOT_CLASS_NAME } from '../runtime';
|
|
7
6
|
import { select } from '../utils/selection';
|
|
8
|
-
import { treeDataTransform } from '../utils/treeDataTransform';
|
|
7
|
+
import { Node, treeDataTransform } from '../utils/treeDataTransform';
|
|
9
8
|
import { legendClearSetState } from './legendFilter';
|
|
10
9
|
import { getElements } from './utils';
|
|
11
10
|
|
|
@@ -14,7 +13,7 @@ function selectPlotArea(root: DisplayObject): DisplayObject {
|
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export type DrillDownOptions = {
|
|
17
|
-
originData?: Node[];
|
|
16
|
+
originData?: Node<any>[];
|
|
18
17
|
layout?: any;
|
|
19
18
|
[key: string]: any;
|
|
20
19
|
};
|
package/src/interaction/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DisplayObject, Path, AABB } from '@antv/g';
|
|
2
|
-
import { path as d3Path } from 'd3-path';
|
|
3
|
-
import { sort } from 'd3-array';
|
|
2
|
+
import { path as d3Path } from '@antv/vendor/d3-path';
|
|
3
|
+
import { sort } from '@antv/vendor/d3-array';
|
|
4
4
|
import { Vector2 } from '@antv/coord';
|
|
5
5
|
import { filter } from '@antv/util';
|
|
6
6
|
import type { PathArray } from '@antv/util';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DisplayObject } from '@antv/g';
|
|
2
|
-
import { maxIndex } from 'd3-array';
|
|
2
|
+
import { maxIndex } from '@antv/vendor/d3-array';
|
|
3
3
|
import { ContrastReverseLabelTransform } from '../spec';
|
|
4
4
|
import { LabelTransformComponent as LLC } from '../runtime';
|
|
5
5
|
import { parseToRGB } from '../utils/color';
|
package/src/lib/core.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Fisheye,
|
|
8
8
|
Radial,
|
|
9
9
|
Radar,
|
|
10
|
+
Helix,
|
|
10
11
|
} from '../coordinate';
|
|
11
12
|
import { Constant, Field, Transform, Column } from '../encode';
|
|
12
13
|
import {
|
|
@@ -216,6 +217,7 @@ export function corelib() {
|
|
|
216
217
|
'coordinate.fisheye': Fisheye,
|
|
217
218
|
'coordinate.radial': Radial,
|
|
218
219
|
'coordinate.radar': Radar,
|
|
220
|
+
'coordinate.helix': Helix,
|
|
219
221
|
'encode.constant': Constant,
|
|
220
222
|
'encode.field': Field,
|
|
221
223
|
'encode.transform': Transform,
|
package/src/mark/area.ts
CHANGED
package/src/mark/boxplot.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
min as d3Min,
|
|
3
|
+
max as d3Max,
|
|
4
|
+
quantile,
|
|
5
|
+
group,
|
|
6
|
+
} from '@antv/vendor/d3-array';
|
|
2
7
|
import { CompositeMarkComponent as CC } from '../runtime';
|
|
3
8
|
import { BoxPlotMark } from '../spec';
|
|
4
9
|
import { subObject } from '../utils/helper';
|
package/src/mark/forceGraph.ts
CHANGED
package/src/mark/line.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vector } from '@antv/coord';
|
|
2
|
-
import { group } from 'd3-array';
|
|
2
|
+
import { group } from '@antv/vendor/d3-array';
|
|
3
3
|
import { isParallel } from '../utils/coordinate';
|
|
4
4
|
import { Mark, MarkComponent as MC, SingleMark, Vector2 } from '../runtime';
|
|
5
5
|
import { LineMark } from '../spec';
|
package/src/mark/pack.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { deepMix, isArray } from '@antv/util';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
stratify,
|
|
4
|
+
hierarchy,
|
|
5
|
+
pack as packLayout,
|
|
6
|
+
} from '@antv/vendor/d3-hierarchy';
|
|
3
7
|
import { CompositionComponent as CC } from '../runtime';
|
|
4
8
|
import { subObject } from '../utils/helper';
|
|
5
9
|
import { PackMark } from '../spec';
|
package/src/mark/utils.ts
CHANGED
package/src/runtime/component.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Coordinate } from '@antv/coord';
|
|
5
5
|
import { deepMix, isEqual } from '@antv/util';
|
|
6
|
-
import { groups, max, sum } from 'd3-array';
|
|
7
|
-
import { format } from 'd3-format';
|
|
6
|
+
import { groups, max, sum } from '@antv/vendor/d3-array';
|
|
7
|
+
import { format } from '@antv/vendor/d3-format';
|
|
8
8
|
import { DisplayObject, Text } from '@antv/g';
|
|
9
9
|
import {
|
|
10
10
|
getPolarOptions,
|
package/src/runtime/layout.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Coordinate } from '@antv/coord';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
NestedInternMap,
|
|
4
|
+
ascending,
|
|
5
|
+
group,
|
|
6
|
+
max,
|
|
7
|
+
min,
|
|
8
|
+
sum,
|
|
9
|
+
} from '@antv/vendor/d3-array';
|
|
3
10
|
import { deepMix } from '@antv/util';
|
|
4
11
|
import { isParallel, isPolar, isRadar, radiusOf } from '../utils/coordinate';
|
|
5
12
|
import { capitalizeFirst, defined } from '../utils/helper';
|
|
@@ -389,10 +396,16 @@ export function placeComponents(
|
|
|
389
396
|
layout: Layout,
|
|
390
397
|
): void {
|
|
391
398
|
// Group components by plane & position.
|
|
392
|
-
|
|
399
|
+
|
|
400
|
+
const positionComponents: NestedInternMap<
|
|
401
|
+
G2GuideComponentOptions,
|
|
402
|
+
G2GuideComponentOptions[],
|
|
403
|
+
[string]
|
|
404
|
+
> = group<G2GuideComponentOptions, [string]>(
|
|
393
405
|
components,
|
|
394
406
|
(d) => `${d.plane || 'xy'}-${d.position}`,
|
|
395
407
|
);
|
|
408
|
+
|
|
396
409
|
const {
|
|
397
410
|
paddingLeft,
|
|
398
411
|
paddingRight,
|
package/src/runtime/mark.ts
CHANGED
package/src/runtime/plot.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Vector2 } from '@antv/coord';
|
|
2
2
|
import { DisplayObject, IAnimation as GAnimation, Rect } from '@antv/g';
|
|
3
3
|
import { deepMix, upperFirst, isArray } from '@antv/util';
|
|
4
|
-
import { group, groups } from 'd3-array';
|
|
5
|
-
import { format } from 'd3-format';
|
|
4
|
+
import { group, groups } from '@antv/vendor/d3-array';
|
|
5
|
+
import { format } from '@antv/vendor/d3-format';
|
|
6
6
|
import { mapObject } from '../utils/array';
|
|
7
7
|
import { ChartEvent } from '../utils/event';
|
|
8
8
|
import {
|