@antv/g2 5.0.0-beta.4 → 5.0.0-beta.6
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 +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/api/chart.d.ts +4 -0
- package/esm/api/chart.js +26 -4
- package/esm/api/chart.js.map +1 -1
- package/esm/api/mark/mark.js +1 -2
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +1 -2
- package/esm/component/axis.js +23 -9
- package/esm/component/axis.js.map +1 -1
- package/esm/component/index.d.ts +2 -0
- package/esm/component/index.js +2 -0
- package/esm/component/index.js.map +1 -1
- package/esm/component/scrollbar.d.ts +9 -0
- package/esm/component/scrollbar.js +36 -0
- package/esm/component/scrollbar.js.map +1 -0
- package/esm/component/scrollbarX.d.ts +7 -0
- package/esm/component/scrollbarX.js +9 -0
- package/esm/component/scrollbarX.js.map +1 -0
- package/esm/component/scrollbarY.d.ts +7 -0
- package/esm/component/scrollbarY.js +9 -0
- package/esm/component/scrollbarY.js.map +1 -0
- package/esm/component/slider.js +2 -4
- package/esm/component/slider.js.map +1 -1
- package/esm/component/title.js +46 -22
- package/esm/component/title.js.map +1 -1
- package/esm/composition/mark.js +2 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/data/fold.js +4 -10
- package/esm/data/fold.js.map +1 -1
- package/esm/data/index.d.ts +2 -2
- package/esm/data/index.js +1 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/pick.js +10 -2
- package/esm/data/pick.js.map +1 -1
- package/esm/data/slice.d.ts +8 -0
- package/esm/data/slice.js +10 -0
- package/esm/data/slice.js.map +1 -0
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/index.d.ts +8 -0
- package/esm/interaction/index.js +7 -30
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushAxisHighlight.d.ts +26 -0
- package/esm/interaction/native/brushAxisHighlight.js +159 -0
- package/esm/interaction/native/brushAxisHighlight.js.map +1 -0
- package/esm/interaction/native/brushFilter.d.ts +12 -0
- package/esm/interaction/native/brushFilter.js +147 -0
- package/esm/interaction/native/brushFilter.js.map +1 -0
- package/esm/interaction/native/brushHighlight.d.ts +40 -0
- package/esm/interaction/native/brushHighlight.js +341 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXFilter.d.ts +1 -0
- package/esm/interaction/native/brushXFilter.js +6 -0
- package/esm/interaction/native/brushXFilter.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +6 -0
- package/esm/interaction/native/brushXHighlight.js +9 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYFilter.d.ts +1 -0
- package/esm/interaction/native/brushYFilter.js +6 -0
- package/esm/interaction/native/brushYFilter.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +6 -0
- package/esm/interaction/native/brushYHighlight.js +9 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/legendFilter.js +3 -12
- package/esm/interaction/native/legendFilter.js.map +1 -1
- package/esm/interaction/native/tooltip.js +101 -32
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +8 -0
- package/esm/interaction/native/utils.js +31 -0
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/mark/area.js +1 -1
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/boxplot.js +5 -18
- package/esm/mark/boxplot.js.map +1 -1
- package/esm/runtime/component.js +33 -38
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/layout.js +7 -7
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/plot.js +28 -6
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +0 -1
- package/esm/runtime/render.js +4 -34
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.js +17 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +16 -6
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +27 -9
- package/esm/runtime/types/options.d.ts +3 -5
- package/esm/runtime/types/theme.d.ts +2 -5
- package/esm/shape/area/curve.js +15 -8
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/box/box.js +1 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.js +2 -2
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/image/image.js +2 -2
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/interval/color.js +3 -1
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +18 -0
- package/esm/shape/label/position/default.js +107 -0
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +18 -0
- package/esm/shape/label/position/outside.js +67 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +34 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +35 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/shape/line/curve.js +1 -1
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/lineXY/line.js +2 -2
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.js +2 -2
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.js +2 -2
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.js +2 -2
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.js +2 -2
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/point/color.js +1 -1
- package/esm/shape/point/color.js.map +1 -1
- package/esm/shape/polygon/polygon.js +3 -3
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.js +3 -3
- 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/text/badge.js +3 -3
- package/esm/shape/text/badge.js.map +1 -1
- package/esm/shape/text/text.js +1 -1
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +4 -0
- package/esm/shape/utils.js +6 -1
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.js +3 -3
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/composition.d.ts +2 -0
- package/esm/spec/data.d.ts +24 -9
- package/esm/spec/geometry.d.ts +2 -1
- package/esm/spec/interaction.d.ts +41 -6
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/theme.d.ts +5 -2
- package/esm/stdlib/index.js +8 -9
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +398 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +14 -20
- package/esm/theme/dark.js.map +1 -1
- 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.js +29 -22
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +12 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +1 -0
- package/esm/utils/helper.js +3 -0
- package/esm/utils/helper.js.map +1 -1
- package/lib/api/chart.d.ts +4 -0
- package/lib/api/chart.js +26 -4
- package/lib/api/chart.js.map +1 -1
- package/lib/api/mark/mark.js +1 -2
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +1 -2
- package/lib/component/axis.js +23 -9
- package/lib/component/axis.js.map +1 -1
- package/lib/component/index.d.ts +2 -0
- package/lib/component/index.js +5 -1
- package/lib/component/index.js.map +1 -1
- package/lib/component/scrollbar.d.ts +9 -0
- package/lib/component/scrollbar.js +40 -0
- package/lib/component/scrollbar.js.map +1 -0
- package/lib/component/scrollbarX.d.ts +7 -0
- package/lib/component/scrollbarX.js +13 -0
- package/lib/component/scrollbarX.js.map +1 -0
- package/lib/component/scrollbarY.d.ts +7 -0
- package/lib/component/scrollbarY.js +13 -0
- package/lib/component/scrollbarY.js.map +1 -0
- package/lib/component/slider.js +2 -4
- package/lib/component/slider.js.map +1 -1
- package/lib/component/title.js +46 -22
- package/lib/component/title.js.map +1 -1
- package/lib/composition/mark.js +2 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/data/fold.js +4 -10
- package/lib/data/fold.js.map +1 -1
- package/lib/data/index.d.ts +2 -2
- package/lib/data/index.js +3 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/pick.js +10 -2
- package/lib/data/pick.js.map +1 -1
- package/lib/data/slice.d.ts +8 -0
- package/lib/data/slice.js +14 -0
- package/lib/data/slice.js.map +1 -0
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/index.d.ts +8 -0
- package/lib/interaction/index.js +15 -31
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushAxisHighlight.d.ts +26 -0
- package/lib/interaction/native/brushAxisHighlight.js +164 -0
- package/lib/interaction/native/brushAxisHighlight.js.map +1 -0
- package/lib/interaction/native/brushFilter.d.ts +12 -0
- package/lib/interaction/native/brushFilter.js +152 -0
- package/lib/interaction/native/brushFilter.js.map +1 -0
- package/lib/interaction/native/brushHighlight.d.ts +40 -0
- package/lib/interaction/native/brushHighlight.js +347 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXFilter.d.ts +1 -0
- package/lib/interaction/native/brushXFilter.js +10 -0
- package/lib/interaction/native/brushXFilter.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +6 -0
- package/lib/interaction/native/brushXHighlight.js +14 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYFilter.d.ts +1 -0
- package/lib/interaction/native/brushYFilter.js +10 -0
- package/lib/interaction/native/brushYFilter.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +6 -0
- package/lib/interaction/native/brushYHighlight.js +14 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/legendFilter.js +4 -13
- package/lib/interaction/native/legendFilter.js.map +1 -1
- package/lib/interaction/native/tooltip.js +98 -29
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +8 -0
- package/lib/interaction/native/utils.js +37 -1
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/mark/area.js +1 -1
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/boxplot.js +5 -18
- package/lib/mark/boxplot.js.map +1 -1
- package/lib/runtime/component.js +33 -38
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/layout.js +7 -7
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/plot.js +28 -6
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +0 -1
- package/lib/runtime/render.js +4 -35
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.js +16 -4
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +16 -6
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +27 -9
- package/lib/runtime/types/options.d.ts +3 -5
- package/lib/runtime/types/theme.d.ts +2 -5
- package/lib/shape/area/curve.js +14 -7
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/box/box.js +1 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.js +2 -2
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/image/image.js +2 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/interval/color.js +3 -1
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +18 -0
- package/lib/shape/label/{position.js → position/default.js} +24 -81
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +18 -0
- package/lib/shape/label/position/outside.js +75 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +38 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +39 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/shape/line/curve.js +1 -1
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/lineXY/line.js +2 -2
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.js +2 -2
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.js +2 -2
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.js +2 -2
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.js +2 -2
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/point/color.js +1 -1
- package/lib/shape/point/color.js.map +1 -1
- package/lib/shape/polygon/polygon.js +3 -3
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.js +3 -3
- 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/text/badge.js +3 -3
- package/lib/shape/text/badge.js.map +1 -1
- package/lib/shape/text/text.js +1 -1
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +4 -0
- package/lib/shape/utils.js +6 -1
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.js +3 -3
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/composition.d.ts +2 -0
- package/lib/spec/data.d.ts +24 -9
- package/lib/spec/geometry.d.ts +2 -1
- package/lib/spec/interaction.d.ts +41 -6
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/theme.d.ts +5 -2
- package/lib/stdlib/index.js +3 -4
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +402 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +14 -20
- package/lib/theme/dark.js.map +1 -1
- 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.js +29 -22
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +14 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/helper.js +5 -1
- package/lib/utils/helper.js.map +1 -1
- package/package.json +2 -2
- package/src/api/chart.ts +29 -8
- package/src/api/mark/mark.ts +1 -2
- package/src/api/mark/types.ts +1 -2
- package/src/component/axis.ts +38 -16
- package/src/component/index.ts +2 -0
- package/src/component/scrollbar.ts +41 -0
- package/src/component/scrollbarX.ts +16 -0
- package/src/component/scrollbarY.ts +16 -0
- package/src/component/slider.ts +1 -3
- package/src/component/title.ts +69 -30
- package/src/composition/mark.ts +2 -0
- package/src/data/fold.ts +6 -10
- package/src/data/index.ts +2 -2
- package/src/data/pick.ts +11 -2
- package/src/data/slice.ts +15 -0
- package/src/interaction/index.ts +23 -16
- package/src/interaction/native/brushAxisHighlight.ts +194 -0
- package/src/interaction/native/brushFilter.ts +163 -0
- package/src/interaction/native/brushHighlight.ts +419 -0
- package/src/interaction/native/brushXFilter.ts +9 -0
- package/src/interaction/native/brushXHighlight.ts +13 -0
- package/src/interaction/native/brushYFilter.ts +9 -0
- package/src/interaction/native/brushYHighlight.ts +13 -0
- package/src/interaction/native/legendFilter.ts +3 -14
- package/src/interaction/native/tooltip.ts +128 -38
- package/src/interaction/native/utils.ts +40 -0
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +6 -6
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/mark/area.ts +1 -1
- package/src/mark/boxplot.ts +3 -1
- package/src/runtime/component.ts +46 -47
- package/src/runtime/layout.ts +6 -6
- package/src/runtime/plot.ts +40 -6
- package/src/runtime/render.ts +6 -58
- package/src/runtime/scale.ts +15 -7
- package/src/runtime/transform.ts +19 -6
- package/src/runtime/types/common.ts +27 -10
- package/src/runtime/types/options.ts +3 -5
- package/src/runtime/types/theme.ts +2 -5
- package/src/shape/area/curve.ts +15 -8
- package/src/shape/box/box.ts +6 -6
- package/src/shape/connector/connector.ts +2 -3
- package/src/shape/image/image.ts +2 -2
- package/src/shape/interval/color.ts +2 -1
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +26 -110
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +121 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +39 -0
- package/src/shape/label/position/surround.ts +40 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/shape/line/curve.ts +1 -1
- package/src/shape/lineXY/line.ts +2 -2
- package/src/shape/link/arc.ts +2 -2
- package/src/shape/link/link.ts +2 -2
- package/src/shape/link/smooth.ts +2 -2
- package/src/shape/link/vhv.ts +2 -2
- package/src/shape/point/color.ts +6 -5
- package/src/shape/polygon/polygon.ts +3 -3
- package/src/shape/polygon/ribbon.ts +3 -3
- package/src/shape/text/advance.ts +4 -1
- package/src/shape/text/badge.ts +8 -3
- package/src/shape/text/text.ts +1 -1
- package/src/shape/utils.ts +6 -5
- package/src/shape/vector/vector.ts +3 -3
- package/src/spec/action.ts +0 -1
- package/src/spec/composition.ts +2 -0
- package/src/spec/data.ts +25 -10
- package/src/spec/geometry.ts +3 -1
- package/src/spec/interaction.ts +59 -5
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/theme.ts +6 -2
- package/src/stdlib/index.ts +33 -9
- package/src/theme/academy.ts +404 -0
- package/src/theme/dark.ts +14 -20
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +29 -22
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +12 -0
- package/src/utils/helper.ts +4 -0
- package/esm/data/subset.d.ts +0 -7
- package/esm/data/subset.js +0 -26
- package/esm/data/subset.js.map +0 -1
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js +0 -169
- package/esm/shape/label/position.js.map +0 -1
- package/lib/data/subset.d.ts +0 -7
- package/lib/data/subset.js +0 -30
- package/lib/data/subset.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/src/data/subset.ts +0 -35
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
package/src/utils/coordinate.ts
CHANGED
|
@@ -44,3 +44,15 @@ export function isCircular(coordinate: Coordinate): boolean {
|
|
|
44
44
|
export function isTheta(coordinate: Coordinate): boolean {
|
|
45
45
|
return isPolar(coordinate) && isTranspose(coordinate);
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
export function getRadius(coordinate: Coordinate): number {
|
|
49
|
+
if (isCircular(coordinate)) {
|
|
50
|
+
const [width, height] = coordinate.getSize();
|
|
51
|
+
const polar = coordinate
|
|
52
|
+
.getOptions()
|
|
53
|
+
.transformations.find((t) => t[0] === 'polar');
|
|
54
|
+
// coordinate.size * outerRadius.
|
|
55
|
+
if (polar) return (Math.max(width, height) / 2) * polar[4];
|
|
56
|
+
}
|
|
57
|
+
return 0;
|
|
58
|
+
}
|
package/src/utils/helper.ts
CHANGED
|
@@ -99,3 +99,7 @@ export function maybePercentage(x: number | string, size: number) {
|
|
|
99
99
|
const px = +x.replace('%', '');
|
|
100
100
|
return Number.isNaN(px) ? null : (px / 100) * size;
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
export function isStrictObject(d: any): boolean {
|
|
104
|
+
return typeof d === 'object' && !(d instanceof Date) && d !== null;
|
|
105
|
+
}
|
package/esm/data/subset.d.ts
DELETED
package/esm/data/subset.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
function constrain(v, min, max) {
|
|
2
|
-
return Math.min(max, Math.max(min, v));
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Immutable data sort by specified fields.
|
|
6
|
-
*/
|
|
7
|
-
export const Subset = (options) => {
|
|
8
|
-
return (data) => {
|
|
9
|
-
const { fields = [] } = options;
|
|
10
|
-
let { start = 0, end = data.length } = options;
|
|
11
|
-
start = constrain(start, 0, data.length - 1);
|
|
12
|
-
end = constrain(end, 1, data.length);
|
|
13
|
-
if (start > end)
|
|
14
|
-
[start, end] = [end, start];
|
|
15
|
-
const pick = (v) => fields.reduce((datum, field) => {
|
|
16
|
-
// Pick the data deeply.
|
|
17
|
-
if (field in v) {
|
|
18
|
-
datum[field] = v[field];
|
|
19
|
-
}
|
|
20
|
-
return datum;
|
|
21
|
-
}, {});
|
|
22
|
-
return data.filter((_, i) => i >= start && i < end).map(pick);
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
Subset.props = {};
|
|
26
|
-
//# sourceMappingURL=subset.js.map
|
package/esm/data/subset.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subset.js","sourceRoot":"src/","sources":["data/subset.ts"],"names":[],"mappings":"AAGA,SAAS,SAAS,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAID;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAsB,CAAC,OAAO,EAAE,EAAE;IACnD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;QAEhC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC;QAC/C,KAAK,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7C,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,KAAK,GAAG,GAAG;YAAE,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAE7C,MAAM,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CACtB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC7B,wBAAwB;YACxB,IAAI,KAAK,IAAI,CAAC,EAAE;gBACd,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;aACzB;YACD,OAAO,KAAK,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CAAC;QAET,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DodgeYLabelTransform } from 'spec';
|
|
2
|
-
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
-
export type DodgeYOptions = Omit<DodgeYLabelTransform, 'type'>;
|
|
4
|
-
/**
|
|
5
|
-
* An iterative dodge method avoids label overlap. (n * log(n))
|
|
6
|
-
*/
|
|
7
|
-
export declare const DodgeY: LLC<DodgeYOptions>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dodgeY.js","sourceRoot":"src/","sources":["label-transform/dodgeY.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAIrC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,MAAM;IACb,MAAM,GAAG,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC5B,MAAM,GAAG,GAAG,CAAC,GAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,CAAC,GAAM,EAAE,KAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,E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C,CAAC;oBACjB,MAAM,KAAK,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;oBAC7B,IAAI,KAAK,GAAG,OAAO,EAAE;wBACnB,MAAM,QAAQ,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;wBACvC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;wBAClC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC;wBACxB,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC;qBACzB;iBACF;aACF;YACD,IAAI,KAAK,GAAG,QAAQ;gBAAE,MAAM;SAC7B;QAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC1B,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;SACvC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { isPolygonsIntersect } from '@antv/path-util';
|
|
2
|
-
import { ascending } from 'd3-array';
|
|
3
|
-
function getPoints(element) {
|
|
4
|
-
const { min, max } = element.getRenderBounds();
|
|
5
|
-
const [x0, y0] = min;
|
|
6
|
-
const [x1, y1] = max;
|
|
7
|
-
return [
|
|
8
|
-
[x0, y0],
|
|
9
|
-
[x0, y1],
|
|
10
|
-
[x1, y1],
|
|
11
|
-
[x1, y0],
|
|
12
|
-
];
|
|
13
|
-
}
|
|
14
|
-
function priority(shape) {
|
|
15
|
-
return shape.style.priority || 0;
|
|
16
|
-
}
|
|
17
|
-
function show(shape) {
|
|
18
|
-
shape.style.visibility = 'visible';
|
|
19
|
-
}
|
|
20
|
-
function hide(shape) {
|
|
21
|
-
shape.style.visibility = 'hidden';
|
|
22
|
-
}
|
|
23
|
-
// @todo Support label shape with priority attribute.
|
|
24
|
-
export const HideOverlap = () => {
|
|
25
|
-
return (labels, coordinate) => {
|
|
26
|
-
const displayLabels = [];
|
|
27
|
-
// Label with lower priority will be hidden when overlapped.
|
|
28
|
-
labels.sort((a, b) => ascending(priority(a), priority(b)));
|
|
29
|
-
for (let i = 0; i < labels.length; i++) {
|
|
30
|
-
const label = labels[i];
|
|
31
|
-
show(label);
|
|
32
|
-
let overlapping = false;
|
|
33
|
-
for (let j = 0; j < displayLabels.length; j++) {
|
|
34
|
-
const existedLabel = displayLabels[j];
|
|
35
|
-
if (isPolygonsIntersect(getPoints(label), getPoints(existedLabel))) {
|
|
36
|
-
hide(label);
|
|
37
|
-
overlapping = true;
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (!overlapping) {
|
|
42
|
-
displayLabels.push(label);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return labels;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=hideOverlap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hideOverlap.js","sourceRoot":"src/","sources":["label-transform/hideOverlap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAIrC,SAAS,SAAS,CAAC,OAAsB;IACvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAC/C,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACrB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACrB,OAAO;QACL,CAAC,EAAE,EAAE,EAAE,CAAC;QACR,CAAC,EAAE,EAAE,EAAE,CAAC;QACR,CAAC,EAAE,EAAE,EAAE,CAAC;QACR,CAAC,EAAE,EAAE,EAA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AC,WAAW,EAAE;gBAChB,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC3B;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SpiderLabelTransform } from '../spec';
|
|
2
|
-
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
-
export type SpiderOptions = Omit<SpiderLabelTransform, 'type'>;
|
|
4
|
-
/**
|
|
5
|
-
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Spider: LLC<SpiderOptions>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { isCircular } from '../utils/coordinate';
|
|
2
|
-
import { maybePercentage } from '../utils/helper';
|
|
3
|
-
import { sub } from '../utils/vector';
|
|
4
|
-
/**
|
|
5
|
-
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
6
|
-
*/
|
|
7
|
-
export const Spider = (options) => {
|
|
8
|
-
const { edgeDistance = 0 } = options;
|
|
9
|
-
return (labels, coordinate) => {
|
|
10
|
-
if (!isCircular(coordinate))
|
|
11
|
-
return labels;
|
|
12
|
-
const { x: coordX, width } = coordinate.getOptions();
|
|
13
|
-
const center = coordinate.getCenter();
|
|
14
|
-
const margin = maybePercentage(edgeDistance, width);
|
|
15
|
-
const edgeX = coordX + margin;
|
|
16
|
-
const edgeX1 = coordX + width - margin;
|
|
17
|
-
labels.forEach((label) => {
|
|
18
|
-
const { x: originX, x0, y0 } = label.style;
|
|
19
|
-
const dx = originX <= center[0] ? edgeX - originX : edgeX1 - originX;
|
|
20
|
-
label.style.x += dx;
|
|
21
|
-
const { x, y } = label.style;
|
|
22
|
-
const p0 = sub([x0, y0], center);
|
|
23
|
-
const p1 = sub([0, y], center);
|
|
24
|
-
const p1x = p0[1] ? (p0[0] * p1[1]) / p0[1] + center[0] : x;
|
|
25
|
-
label.style.connectorPoints = [[p1x - x, 0]];
|
|
26
|
-
});
|
|
27
|
-
return labels;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=spider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spider.js","sourceRoot":"src/","sources":["label-transform/spider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAItC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAuB,CAAC,OAAO,EAAE,EAAE;IACpD,MAAM,EAAE,YAAY,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,MAAuB,EAAE,UAAU,EAAE,EAAE;QAC7C,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,MAAM,CAAC;QAE3C,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;QACrD,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAEpD,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACvB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;YAC3C,MAAM,EAAE,GAAG,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,OAAO,CAAC;YACrE,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;YAEpB,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;YAC7B,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;YACjC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YAC/B,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,KAAK,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SurroundLabelTransform } from '../spec';
|
|
2
|
-
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
-
export type SurroundOptions = Omit<SurroundLabelTransform, 'type'>;
|
|
4
|
-
/**
|
|
5
|
-
* Surround label transform is used to make labels surround circular.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Surround: LLC<SurroundOptions>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { isCircular } from '../utils/coordinate';
|
|
2
|
-
import { dist, angleWithQuadrant } from '../utils/vector';
|
|
3
|
-
/**
|
|
4
|
-
* Surround label transform is used to make labels surround circular.
|
|
5
|
-
*/
|
|
6
|
-
export const Surround = (options) => {
|
|
7
|
-
return (labels, coordinate) => {
|
|
8
|
-
if (!isCircular(coordinate))
|
|
9
|
-
return labels;
|
|
10
|
-
const center = coordinate.getCenter();
|
|
11
|
-
const radius = labels.reduce((r, label) => {
|
|
12
|
-
const { x0, y0, offset = 0 } = label.style;
|
|
13
|
-
return Math.max(r, dist(center, [x0, y0]) + offset);
|
|
14
|
-
}, 0);
|
|
15
|
-
labels.forEach((label) => {
|
|
16
|
-
const { x0, y0, connector, connectorLength2 = 0 } = label.style;
|
|
17
|
-
const labelAngle = angleWithQuadrant([x0 - center[0], y0 - center[1]]);
|
|
18
|
-
const length2 = connector
|
|
19
|
-
? connectorLength2 * (Math.sin(labelAngle) < 0 ? -1 : 1)
|
|
20
|
-
: 0;
|
|
21
|
-
const newX = center[0] + Math.sin(labelAngle) * radius;
|
|
22
|
-
const newY = center[1] - Math.cos(labelAngle) * radius;
|
|
23
|
-
label.style.x = newX + length2;
|
|
24
|
-
label.style.y = newY;
|
|
25
|
-
label.style.connectorPoints = [[-length2, 0]];
|
|
26
|
-
});
|
|
27
|
-
return labels;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=surround.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"surround.js","sourceRoot":"src/","sources":["label-transform/surround.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAI1D;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAyB,CAAC,OAAO,EAAE,EAAE;IACxD,OAAO,CAAC,MAAuB,EAAE,UAAU,EAAE,EAAE;QAC7C,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,MAAM,CAAC;QAE3C,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE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,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Coordinate } from '@antv/coord';
|
|
2
|
-
import { Vector2 } from '../../runtime';
|
|
3
|
-
export type LabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inside' | 'outside' | 'area';
|
|
4
|
-
declare function getDefaultStyle(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate): any;
|
|
5
|
-
export declare const top: typeof getDefaultStyle;
|
|
6
|
-
export declare const bottom: typeof getDefaultStyle;
|
|
7
|
-
export declare const right: typeof getDefaultStyle;
|
|
8
|
-
export declare const left: typeof getDefaultStyle;
|
|
9
|
-
export declare const topLeft: typeof getDefaultStyle;
|
|
10
|
-
export declare const topRight: typeof getDefaultStyle;
|
|
11
|
-
export declare const bottomLeft: typeof getDefaultStyle;
|
|
12
|
-
export declare const bottomRight: typeof getDefaultStyle;
|
|
13
|
-
export declare const inside: typeof getDefaultStyle;
|
|
14
|
-
export declare const outside: typeof getDefaultStyle;
|
|
15
|
-
/**
|
|
16
|
-
* Only for Area label.
|
|
17
|
-
*/
|
|
18
|
-
export declare function area(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate): {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
transform: string;
|
|
22
|
-
textAlign: string;
|
|
23
|
-
textBaseline: string;
|
|
24
|
-
};
|
|
25
|
-
export {};
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { maxIndex } from 'd3-array';
|
|
2
|
-
import { getArcObject } from '../../shape/utils';
|
|
3
|
-
import { isCircular, isRadial } from '../../utils/coordinate';
|
|
4
|
-
import { maybePercentage } from '../../utils/helper';
|
|
5
|
-
import { sub, angle, mid } from '../../utils/vector';
|
|
6
|
-
function inferNonCircularStyle(position, points, value, coordinate) {
|
|
7
|
-
const { bounds } = value;
|
|
8
|
-
const [[x0, y0], [x1, y1]] = bounds;
|
|
9
|
-
const w = x1 - x0;
|
|
10
|
-
const h = y1 - y0;
|
|
11
|
-
const xy = (options) => {
|
|
12
|
-
const { x: ox, y: oy } = options;
|
|
13
|
-
const px = maybePercentage(value.x, w);
|
|
14
|
-
const py = maybePercentage(value.y, h);
|
|
15
|
-
return Object.assign(Object.assign({}, options), { x: (px || ox) + x0, y: (py || oy) + y0 });
|
|
16
|
-
};
|
|
17
|
-
// 4 direction.
|
|
18
|
-
if (position === 'left')
|
|
19
|
-
return xy({ x: 0, y: h / 2, textAnchor: 'start', textBaseline: 'middle' });
|
|
20
|
-
if (position === 'right')
|
|
21
|
-
return xy({ x: w, y: h / 2, textAnchor: 'end', textBaseline: 'middle' });
|
|
22
|
-
if (position === 'top')
|
|
23
|
-
return xy({ x: w / 2, y: 0, textAnchor: 'center', textBaseline: 'top' });
|
|
24
|
-
if (position === 'bottom')
|
|
25
|
-
return xy({ x: w / 2, y: h, textAnchor: 'center', textBaseline: 'bottom' });
|
|
26
|
-
// 4 corner position.
|
|
27
|
-
if (position === 'top-left')
|
|
28
|
-
return xy({ x: 0, y: 0, textAnchor: 'start', textBaseline: 'top' });
|
|
29
|
-
if (position === 'top-right')
|
|
30
|
-
return xy({ x: w, y: 0, textAnchor: 'end', textBaseline: 'top' });
|
|
31
|
-
if (position === 'bottom-left')
|
|
32
|
-
return xy({ x: 0, y: h, textAnchor: 'start', textBaseline: 'bottom' });
|
|
33
|
-
if (position === 'bottom-right')
|
|
34
|
-
return xy({ x: w, y: h, textAnchor: 'end', textBaseline: 'bottom' });
|
|
35
|
-
// default return 'inside'
|
|
36
|
-
return xy({
|
|
37
|
-
x: w / 2,
|
|
38
|
-
y: h / 2,
|
|
39
|
-
textAnchor: 'center',
|
|
40
|
-
textBaseline: 'middle',
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function inferRadialStyle(position, points, value, coordinate) {
|
|
44
|
-
const { y, y1, autoRotate, rotateToAlignArc } = value;
|
|
45
|
-
const center = coordinate.getCenter();
|
|
46
|
-
const arcObject = getArcObject(coordinate, points, [y, y1]);
|
|
47
|
-
const { innerRadius, outerRadius, startAngle, endAngle } = arcObject;
|
|
48
|
-
const angle = position === 'inside' ? (startAngle + endAngle) / 2 : endAngle;
|
|
49
|
-
const rotate = inferRotation(angle, autoRotate, rotateToAlignArc);
|
|
50
|
-
const point = (() => {
|
|
51
|
-
const [p0, p1] = points;
|
|
52
|
-
const radius = innerRadius + (outerRadius - innerRadius) * 0.5;
|
|
53
|
-
const [x, y] = position === 'inside' ? arcPoint(center, angle, radius) : mid(p0, p1);
|
|
54
|
-
return { x, y };
|
|
55
|
-
})();
|
|
56
|
-
return Object.assign(Object.assign({}, point), { textAlign: position === 'inside' ? 'center' : 'start', textBaseline: 'middle', rotate });
|
|
57
|
-
}
|
|
58
|
-
function arcPoint(center, angle, radius) {
|
|
59
|
-
return [
|
|
60
|
-
center[0] + Math.sin(angle) * radius,
|
|
61
|
-
center[1] - Math.cos(angle) * radius,
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
function inferRotation(angle, autoRotate, rotateToAlignArc) {
|
|
65
|
-
if (!autoRotate)
|
|
66
|
-
return 0;
|
|
67
|
-
const append = rotateToAlignArc ? 0 : Math.sin(angle) < 0 ? 90 : -90;
|
|
68
|
-
return (angle / Math.PI) * 180 + append;
|
|
69
|
-
}
|
|
70
|
-
function inferCircularStyle(position, points, value, coordinate) {
|
|
71
|
-
const { y, y1, autoRotate, rotateToAlignArc, connector = true, connectorLength2 = 0, connectorDistance = 0, radius: radiusRatio = 0.5, offset = 0, } = value;
|
|
72
|
-
const arcObject = getArcObject(coordinate, points, [y, y1]);
|
|
73
|
-
const { startAngle, endAngle } = arcObject;
|
|
74
|
-
const center = coordinate.getCenter();
|
|
75
|
-
const angle = (startAngle + endAngle) / 2;
|
|
76
|
-
const textStyle = (position, sign) => {
|
|
77
|
-
const rotate = inferRotation(angle, autoRotate, rotateToAlignArc);
|
|
78
|
-
if (position === 'inside')
|
|
79
|
-
return { textAlign: 'center', textBaseline: 'middle', rotate };
|
|
80
|
-
return {
|
|
81
|
-
textAlign: sign ? 'start' : 'end',
|
|
82
|
-
textBaseline: 'middle',
|
|
83
|
-
rotate,
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
const [r0, r1] = (() => {
|
|
87
|
-
const ratio = position === 'inside' ? radiusRatio : 1;
|
|
88
|
-
const { innerRadius, outerRadius } = arcObject;
|
|
89
|
-
const r0 = innerRadius + (outerRadius - innerRadius) * ratio;
|
|
90
|
-
const r1 = r0 + offset;
|
|
91
|
-
return [r0, r1];
|
|
92
|
-
})();
|
|
93
|
-
const sign = Math.sin(angle) > 0 ? 1 : -1;
|
|
94
|
-
const [p0, p1, ...connectorPoints] = ((radius, finalRadius) => {
|
|
95
|
-
const [x0, y0] = arcPoint(center, angle, radius);
|
|
96
|
-
const [x, y] = arcPoint(center, angle, finalRadius);
|
|
97
|
-
const length2 = connector ? sign * connectorLength2 : 0;
|
|
98
|
-
const p0 = [x0, y0];
|
|
99
|
-
const p1 = [x + length2, y];
|
|
100
|
-
return [p0, p1, [-length2, 0]];
|
|
101
|
-
})(r0, r1);
|
|
102
|
-
const connectorStyle = {
|
|
103
|
-
connector,
|
|
104
|
-
connectorPoints,
|
|
105
|
-
dx: connector ? +connectorDistance * sign : 0,
|
|
106
|
-
};
|
|
107
|
-
const toPoint = (v, x = 'x', y = 'y') => ({ [x]: v[0], [y]: v[1] });
|
|
108
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({}, toPoint(p0, 'x0', 'y0')), toPoint(p1)), textStyle(position, sign > 0 || isRadial(coordinate))), connectorStyle);
|
|
109
|
-
}
|
|
110
|
-
function inferIdentityStyle(position, points, value, coordinate) {
|
|
111
|
-
const { bounds } = value;
|
|
112
|
-
const [p] = bounds;
|
|
113
|
-
return {
|
|
114
|
-
x: p[0],
|
|
115
|
-
y: p[1],
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function getDefaultStyle(position, points, value, coordinate) {
|
|
119
|
-
const { bounds } = value;
|
|
120
|
-
// When bounds.length = 1
|
|
121
|
-
// For series mark, such as line and area.
|
|
122
|
-
// The bounds for text is defined with only one point.
|
|
123
|
-
// Use this point as the label position.
|
|
124
|
-
if (bounds.length === 1) {
|
|
125
|
-
return inferIdentityStyle(position, points, value, coordinate);
|
|
126
|
-
}
|
|
127
|
-
const inferDefaultStyle = isRadial(coordinate)
|
|
128
|
-
? inferRadialStyle
|
|
129
|
-
: isCircular(coordinate)
|
|
130
|
-
? inferCircularStyle
|
|
131
|
-
: inferNonCircularStyle;
|
|
132
|
-
return inferDefaultStyle(position, points, value, coordinate);
|
|
133
|
-
}
|
|
134
|
-
export const top = getDefaultStyle;
|
|
135
|
-
export const bottom = getDefaultStyle;
|
|
136
|
-
export const right = getDefaultStyle;
|
|
137
|
-
export const left = getDefaultStyle;
|
|
138
|
-
export const topLeft = getDefaultStyle;
|
|
139
|
-
export const topRight = getDefaultStyle;
|
|
140
|
-
export const bottomLeft = getDefaultStyle;
|
|
141
|
-
export const bottomRight = getDefaultStyle;
|
|
142
|
-
export const inside = getDefaultStyle;
|
|
143
|
-
export const outside = getDefaultStyle;
|
|
144
|
-
/**
|
|
145
|
-
* Only for Area label.
|
|
146
|
-
*/
|
|
147
|
-
export function area(position, points, value, coordinate) {
|
|
148
|
-
const l = points.length / 2;
|
|
149
|
-
const Y1 = points.slice(0, l);
|
|
150
|
-
const Y0 = points.slice(l);
|
|
151
|
-
// Get the maximal space for label.
|
|
152
|
-
let idx = maxIndex(Y1, (p, i) => Math.abs(p[1] - Y0[i][1]));
|
|
153
|
-
// Do not show label at first and last.
|
|
154
|
-
idx = Math.max(Math.min(idx, l - 2), 1);
|
|
155
|
-
const mid = (i) => [Y1[i][0], (Y1[i][1] + Y0[i][1]) / 2];
|
|
156
|
-
const point = mid(idx);
|
|
157
|
-
const prev = mid(idx - 1);
|
|
158
|
-
const next = mid(idx + 1);
|
|
159
|
-
// todo: G rotate only support deg.
|
|
160
|
-
const rotate = (angle(sub(next, prev)) / Math.PI) * 180;
|
|
161
|
-
return {
|
|
162
|
-
x: point[0],
|
|
163
|
-
y: point[1],
|
|
164
|
-
transform: `rotate(${rotate}deg)`,
|
|
165
|
-
textAlign: 'center',
|
|
166
|
-
textBaseline: 'middle',
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
//# sourceMappingURL=position.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"position.js","sourceRoot":"src/","sources":["shape/label/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAerD,SAAS,qBAAqB,CAC5B,QAAuB,EACvB,MAAiB,EACjB,KAA0B,EAC1B,UAAsB;IAEtB,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC;IACpC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAClB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE;QACrB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;QACjC,MAAM,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC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AAC,CAAC;IAExC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1E,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAE1B,mCAAmC;IACnC,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IAExD,OAAO;QACL,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QACX,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QACX,SAAS,EAAE,UAAU,MAAM,MAAM;QACjC,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,QAAQ;KACvB,CAAC;AACJ,CAAC"}
|
package/lib/data/subset.d.ts
DELETED
package/lib/data/subset.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Subset = void 0;
|
|
4
|
-
function constrain(v, min, max) {
|
|
5
|
-
return Math.min(max, Math.max(min, v));
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Immutable data sort by specified fields.
|
|
9
|
-
*/
|
|
10
|
-
const Subset = (options) => {
|
|
11
|
-
return (data) => {
|
|
12
|
-
const { fields = [] } = options;
|
|
13
|
-
let { start = 0, end = data.length } = options;
|
|
14
|
-
start = constrain(start, 0, data.length - 1);
|
|
15
|
-
end = constrain(end, 1, data.length);
|
|
16
|
-
if (start > end)
|
|
17
|
-
[start, end] = [end, start];
|
|
18
|
-
const pick = (v) => fields.reduce((datum, field) => {
|
|
19
|
-
// Pick the data deeply.
|
|
20
|
-
if (field in v) {
|
|
21
|
-
datum[field] = v[field];
|
|
22
|
-
}
|
|
23
|
-
return datum;
|
|
24
|
-
}, {});
|
|
25
|
-
return data.filter((_, i) => i >= start && i < end).map(pick);
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
exports.Subset = Subset;
|
|
29
|
-
exports.Subset.props = {};
|
|
30
|
-
//# sourceMappingURL=subset.js.map
|
package/lib/data/subset.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subset.js","sourceRoot":"src/","sources":["data/subset.ts"],"names":[],"mappings":";;;AAGA,SAAS,SAAS,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAID;;GAEG;AACI,MAAM,MAAM,GAAsB,CAAC,OAAO,EAAE,EAAE;IACnD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;QAEhC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC;QAC/C,KAAK,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7C,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,KAAK,GAAG,GAAG;YAAE,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAE7C,MAAM,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE,CACtB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC7B,wBAAwB;YACxB,IAAI,KAAK,IAAI,CAAC,EAAE;gBACd,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;aACzB;YACD,OAAO,KAAK,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CAAC;QAET,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,MAAM,UAoBjB;AAEF,cAAM,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DodgeYLabelTransform } from 'spec';
|
|
2
|
-
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
-
export type DodgeYOptions = Omit<DodgeYLabelTransform, 'type'>;
|
|
4
|
-
/**
|
|
5
|
-
* An iterative dodge method avoids label overlap. (n * log(n))
|
|
6
|
-
*/
|
|
7
|
-
export declare const DodgeY: LLC<DodgeYOptions>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dodgeY.js","sourceRoot":"src/","sources":["label-transform/dodgeY.ts"],"names":[],"mappings":";;;AACA,uCAAqC;AAIrC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,MAAM;IACb,MAAM,GAAG,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC5B,MAAM,GAAG,GAAG,CAAC,GAAM,EAAE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AAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACjB,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACjB,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACjB,MAAM,KAAK,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;oBAC7B,IAAI,KAAK,GAAG,OAAO,EAAE;wBACnB,MAAM,QAAQ,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;wBACvC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;wBAClC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC;wBACxB,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC;qBACzB;iBACF;aACF;YACD,IAAI,KAAK,GAAG,QAAQ;gBAAE,MAAM;SAC7B;QAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC1B,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;SACvC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,MAAM,UAqDjB"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HideOverlap = void 0;
|
|
4
|
-
const path_util_1 = require("@antv/path-util");
|
|
5
|
-
const d3_array_1 = require("d3-array");
|
|
6
|
-
function getPoints(element) {
|
|
7
|
-
const { min, max } = element.getRenderBounds();
|
|
8
|
-
const [x0, y0] = min;
|
|
9
|
-
const [x1, y1] = max;
|
|
10
|
-
return [
|
|
11
|
-
[x0, y0],
|
|
12
|
-
[x0, y1],
|
|
13
|
-
[x1, y1],
|
|
14
|
-
[x1, y0],
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
function priority(shape) {
|
|
18
|
-
return shape.style.priority || 0;
|
|
19
|
-
}
|
|
20
|
-
function show(shape) {
|
|
21
|
-
shape.style.visibility = 'visible';
|
|
22
|
-
}
|
|
23
|
-
function hide(shape) {
|
|
24
|
-
shape.style.visibility = 'hidden';
|
|
25
|
-
}
|
|
26
|
-
// @todo Support label shape with priority attribute.
|
|
27
|
-
const HideOverlap = () => {
|
|
28
|
-
return (labels, coordinate) => {
|
|
29
|
-
const displayLabels = [];
|
|
30
|
-
// Label with lower priority will be hidden when overlapped.
|
|
31
|
-
labels.sort((a, b) => (0, d3_array_1.ascending)(priority(a), priority(b)));
|
|
32
|
-
for (let i = 0; i < labels.length; i++) {
|
|
33
|
-
const label = labels[i];
|
|
34
|
-
show(label);
|
|
35
|
-
let overlapping = false;
|
|
36
|
-
for (let j = 0; j < displayLabels.length; j++) {
|
|
37
|
-
const existedLabel = displayLabels[j];
|
|
38
|
-
if ((0, path_util_1.isPolygonsIntersect)(getPoints(label), getPoints(existedLabel))) {
|
|
39
|
-
hide(label);
|
|
40
|
-
overlapping = true;
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (!overlapping) {
|
|
45
|
-
displayLabels.push(label);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return labels;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
exports.HideOverlap = HideOverlap;
|
|
52
|
-
//# sourceMappingURL=hideOverlap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hideOverlap.js","sourceRoot":"src/","sources":["label-transform/hideOverlap.ts"],"names":[],"mappings":";;;AACA,+CAAsD;AACtD,uCAAqC;AAIrC,SAAS,SAAS,CAAC,OAAsB;IACvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAC/C,MAAM,C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AAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBACtC,IAAI,IAAA,+BAAmB,EAAC,SAAS,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE;oBAClE,IAAI,CAAC,KAAK,CAAC,CAAC;oBACZ,WAAW,GAAG,IAAI,CAAC;oBACnB,MAAM;iBACP;aACF;YAED,IAAI,CAAC,WAAW,EAAE;gBAChB,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC3B;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,WAAW,eA4BtB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SpiderLabelTransform } from '../spec';
|
|
2
|
-
import { LabelTransformComponent as LLC } from '../runtime';
|
|
3
|
-
export type SpiderOptions = Omit<SpiderLabelTransform, 'type'>;
|
|
4
|
-
/**
|
|
5
|
-
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Spider: LLC<SpiderOptions>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Spider = void 0;
|
|
4
|
-
const coordinate_1 = require("../utils/coordinate");
|
|
5
|
-
const helper_1 = require("../utils/helper");
|
|
6
|
-
const vector_1 = require("../utils/vector");
|
|
7
|
-
/**
|
|
8
|
-
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
9
|
-
*/
|
|
10
|
-
const Spider = (options) => {
|
|
11
|
-
const { edgeDistance = 0 } = options;
|
|
12
|
-
return (labels, coordinate) => {
|
|
13
|
-
if (!(0, coordinate_1.isCircular)(coordinate))
|
|
14
|
-
return labels;
|
|
15
|
-
const { x: coordX, width } = coordinate.getOptions();
|
|
16
|
-
const center = coordinate.getCenter();
|
|
17
|
-
const margin = (0, helper_1.maybePercentage)(edgeDistance, width);
|
|
18
|
-
const edgeX = coordX + margin;
|
|
19
|
-
const edgeX1 = coordX + width - margin;
|
|
20
|
-
labels.forEach((label) => {
|
|
21
|
-
const { x: originX, x0, y0 } = label.style;
|
|
22
|
-
const dx = originX <= center[0] ? edgeX - originX : edgeX1 - originX;
|
|
23
|
-
label.style.x += dx;
|
|
24
|
-
const { x, y } = label.style;
|
|
25
|
-
const p0 = (0, vector_1.sub)([x0, y0], center);
|
|
26
|
-
const p1 = (0, vector_1.sub)([0, y], center);
|
|
27
|
-
const p1x = p0[1] ? (p0[0] * p1[1]) / p0[1] + center[0] : x;
|
|
28
|
-
label.style.connectorPoints = [[p1x - x, 0]];
|
|
29
|
-
});
|
|
30
|
-
return labels;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
exports.Spider = Spider;
|
|
34
|
-
//# sourceMappingURL=spider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spider.js","sourceRoot":"src/","sources":["label-transform/spider.ts"],"names":[],"mappings":";;;AAGA,oDAAiD;AACjD,4CAAkD;AAClD,4CAAsC;AAItC;;GAEG;AACI,MAAM,MAAM,GAAuB,CAAC,OAAO,EAAE,EAAE;IACpD,MAAM,EAAE,YAAY,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,MAAuB,EAAE,UAAU,EAAE,EAAE;QAC7C,IAAI,CAAC,IAAA,uBAAU,EAAC,UAAU,CAAC;YAAE,OAAO,MAAM,CAAC;QAE3C,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;QACrD,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,IAAA,wBAAe,EAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAEpD,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAC9B,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ions = Omit<SurroundLabelTransform, 'type'>;
|
|
4
|
-
/**
|
|
5
|
-
* Surround label transform is used to make labels surround circular.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Surround: LLC<SurroundOptions>;
|