@antv/g2 5.0.0-beta.5 → 5.0.0-beta.7
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 +4 -4
- package/dist/g2.min.js +4 -4
- package/esm/api/chart.d.ts +6 -2
- package/esm/api/chart.js +28 -7
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/base.d.ts +4 -0
- package/esm/api/composition/base.js +16 -0
- package/esm/api/composition/base.js.map +1 -0
- package/esm/api/composition/facetCircle.d.ts +2 -3
- package/esm/api/composition/facetCircle.js +2 -2
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +2 -3
- package/esm/api/composition/facetRect.js +2 -2
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +2 -3
- package/esm/api/composition/geoPath.js +2 -2
- package/esm/api/composition/geoPath.js.map +1 -1
- package/esm/api/composition/geoView.d.ts +2 -3
- package/esm/api/composition/geoView.js +2 -2
- package/esm/api/composition/geoView.js.map +1 -1
- package/esm/api/composition/index.d.ts +2 -1
- package/esm/api/composition/index.js +2 -1
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +2 -3
- package/esm/api/composition/repeatMatrix.js +2 -2
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +2 -3
- package/esm/api/composition/spaceFlex.js +2 -2
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +2 -3
- package/esm/api/composition/spaceLayer.js +2 -2
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -3
- package/esm/api/composition/timingKeyframe.js +2 -2
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +3 -3
- package/esm/api/composition/view.js +4 -4
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/mark/mark.d.ts +34 -28
- package/esm/api/mark/mark.js +39 -26
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +1 -0
- package/esm/api/node.d.ts +2 -1
- package/esm/api/node.js +8 -9
- package/esm/api/node.js.map +1 -1
- package/esm/component/axis.js +18 -5
- 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 +3 -13
- 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/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/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- package/esm/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/esm/geo/d3Projection.js.map +1 -0
- package/esm/geo/geoView.js +1 -1
- package/esm/geo/geoView.js.map +1 -1
- package/esm/interaction/index.d.ts +6 -0
- package/esm/interaction/index.js +5 -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 +14 -0
- package/esm/interaction/native/brushFilter.js +122 -0
- package/esm/interaction/native/brushFilter.js.map +1 -0
- package/esm/interaction/native/brushHighlight.d.ts +30 -5
- package/esm/interaction/native/brushHighlight.js +92 -34
- package/esm/interaction/native/brushHighlight.js.map +1 -1
- 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 -1
- package/esm/interaction/native/brushXHighlight.js +5 -4
- package/esm/interaction/native/brushXHighlight.js.map +1 -1
- 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 -1
- package/esm/interaction/native/brushYHighlight.js +5 -4
- package/esm/interaction/native/brushYHighlight.js.map +1 -1
- package/esm/interaction/native/elementHighlight.js +1 -0
- package/esm/interaction/native/elementHighlight.js.map +1 -1
- package/esm/interaction/native/elementSelect.js +1 -0
- package/esm/interaction/native/elementSelect.js.map +1 -1
- package/esm/interaction/native/sliderFilter.d.ts +5 -0
- package/esm/interaction/native/sliderFilter.js +87 -0
- package/esm/interaction/native/sliderFilter.js.map +1 -0
- package/esm/interaction/native/tooltip.js +16 -4
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +5 -1
- package/esm/interaction/native/utils.js +11 -3
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/overlapDodgeY.js +8 -0
- package/esm/label-transform/overlapDodgeY.js.map +1 -1
- 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.d.ts +1 -1
- package/esm/runtime/component.js +38 -41
- 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.d.ts +1 -1
- package/esm/runtime/plot.js +70 -27
- 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.d.ts +2 -1
- package/esm/runtime/scale.js +7 -0
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +6 -2
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +26 -9
- package/esm/runtime/types/options.d.ts +2 -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/position/default.d.ts +5 -7
- package/esm/shape/label/position/default.js +14 -40
- package/esm/shape/label/position/default.js.map +1 -1
- package/esm/shape/label/position/outside.d.ts +18 -1
- package/esm/shape/label/position/outside.js +66 -1
- package/esm/shape/label/position/outside.js.map +1 -1
- package/esm/shape/label/position/spider.d.ts +1 -1
- package/esm/shape/label/position/spider.js +12 -18
- package/esm/shape/label/position/spider.js.map +1 -1
- package/esm/shape/label/position/surround.d.ts +1 -1
- package/esm/shape/label/position/surround.js +12 -14
- package/esm/shape/label/position/surround.js.map +1 -1
- 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/data.d.ts +24 -9
- package/esm/spec/geometry.d.ts +2 -0
- package/esm/spec/interaction.d.ts +28 -3
- package/esm/spec/transform.d.ts +2 -2
- package/esm/stdlib/index.js +5 -5
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.js +11 -15
- package/esm/theme/academy.js.map +1 -1
- package/esm/theme/dark.js +11 -18
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/light.js +25 -19
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/select.js +1 -13
- package/esm/transform/select.js.map +1 -1
- package/esm/transform/selectX.js +1 -1
- package/esm/transform/selectX.js.map +1 -1
- package/esm/transform/selectY.js +1 -1
- package/esm/transform/selectY.js.map +1 -1
- package/esm/utils/scale.d.ts +2 -0
- package/esm/utils/scale.js +30 -0
- package/esm/utils/scale.js.map +1 -0
- package/lib/api/chart.d.ts +6 -2
- package/lib/api/chart.js +27 -6
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/base.d.ts +4 -0
- package/lib/api/composition/base.js +19 -0
- package/lib/api/composition/base.js.map +1 -0
- package/lib/api/composition/facetCircle.d.ts +2 -3
- package/lib/api/composition/facetCircle.js +2 -2
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +2 -3
- package/lib/api/composition/facetRect.js +2 -2
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +2 -3
- package/lib/api/composition/geoPath.js +2 -2
- package/lib/api/composition/geoPath.js.map +1 -1
- package/lib/api/composition/geoView.d.ts +2 -3
- package/lib/api/composition/geoView.js +2 -2
- package/lib/api/composition/geoView.js.map +1 -1
- package/lib/api/composition/index.d.ts +2 -1
- package/lib/api/composition/index.js +3 -1
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +2 -3
- package/lib/api/composition/repeatMatrix.js +2 -2
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +2 -3
- package/lib/api/composition/spaceFlex.js +2 -2
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +2 -3
- package/lib/api/composition/spaceLayer.js +2 -2
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -3
- package/lib/api/composition/timingKeyframe.js +2 -2
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +3 -3
- package/lib/api/composition/view.js +4 -4
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/mark/mark.d.ts +34 -28
- package/lib/api/mark/mark.js +41 -27
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +1 -0
- package/lib/api/node.d.ts +2 -1
- package/lib/api/node.js +8 -9
- package/lib/api/node.js.map +1 -1
- package/lib/component/axis.js +18 -5
- 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 +3 -13
- 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/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/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- package/lib/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/lib/geo/d3Projection.js.map +1 -0
- package/lib/geo/geoView.js +1 -1
- package/lib/geo/geoView.js.map +1 -1
- package/lib/interaction/index.d.ts +6 -0
- package/lib/interaction/index.js +11 -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 +14 -0
- package/lib/interaction/native/brushFilter.js +127 -0
- package/lib/interaction/native/brushFilter.js.map +1 -0
- package/lib/interaction/native/brushHighlight.d.ts +30 -5
- package/lib/interaction/native/brushHighlight.js +91 -33
- package/lib/interaction/native/brushHighlight.js.map +1 -1
- 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 -1
- package/lib/interaction/native/brushXHighlight.js +7 -5
- package/lib/interaction/native/brushXHighlight.js.map +1 -1
- 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 -1
- package/lib/interaction/native/brushYHighlight.js +7 -5
- package/lib/interaction/native/brushYHighlight.js.map +1 -1
- package/lib/interaction/native/elementHighlight.js +1 -0
- package/lib/interaction/native/elementHighlight.js.map +1 -1
- package/lib/interaction/native/elementSelect.js +1 -0
- package/lib/interaction/native/elementSelect.js.map +1 -1
- package/lib/interaction/native/sliderFilter.d.ts +5 -0
- package/lib/interaction/native/sliderFilter.js +91 -0
- package/lib/interaction/native/sliderFilter.js.map +1 -0
- package/lib/interaction/native/tooltip.js +16 -4
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +5 -1
- package/lib/interaction/native/utils.js +14 -5
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/overlapDodgeY.js +8 -0
- package/lib/label-transform/overlapDodgeY.js.map +1 -1
- 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.d.ts +1 -1
- package/lib/runtime/component.js +37 -40
- 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.d.ts +1 -1
- package/lib/runtime/plot.js +67 -24
- 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.d.ts +2 -1
- package/lib/runtime/scale.js +9 -1
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +6 -2
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +26 -9
- package/lib/runtime/types/options.d.ts +2 -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/position/default.d.ts +5 -7
- package/lib/shape/label/position/default.js +16 -40
- package/lib/shape/label/position/default.js.map +1 -1
- package/lib/shape/label/position/outside.d.ts +18 -1
- package/lib/shape/label/position/outside.js +72 -3
- package/lib/shape/label/position/outside.js.map +1 -1
- package/lib/shape/label/position/spider.d.ts +1 -1
- package/lib/shape/label/position/spider.js +12 -18
- package/lib/shape/label/position/spider.js.map +1 -1
- package/lib/shape/label/position/surround.d.ts +1 -1
- package/lib/shape/label/position/surround.js +11 -13
- package/lib/shape/label/position/surround.js.map +1 -1
- 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/data.d.ts +24 -9
- package/lib/spec/geometry.d.ts +2 -0
- package/lib/spec/interaction.d.ts +28 -3
- package/lib/spec/transform.d.ts +2 -2
- package/lib/stdlib/index.js +2 -2
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.js +11 -15
- package/lib/theme/academy.js.map +1 -1
- package/lib/theme/dark.js +11 -18
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/light.js +25 -19
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/select.js +1 -13
- package/lib/transform/select.js.map +1 -1
- package/lib/transform/selectX.js +1 -1
- package/lib/transform/selectX.js.map +1 -1
- package/lib/transform/selectY.js +1 -1
- package/lib/transform/selectY.js.map +1 -1
- package/lib/utils/scale.d.ts +2 -0
- package/lib/utils/scale.js +35 -0
- package/lib/utils/scale.js.map +1 -0
- package/package.json +1 -1
- package/src/api/chart.ts +31 -10
- package/src/api/composition/base.ts +11 -0
- package/src/api/composition/facetCircle.ts +2 -3
- package/src/api/composition/facetRect.ts +2 -3
- package/src/api/composition/geoPath.ts +2 -3
- package/src/api/composition/geoView.ts +2 -3
- package/src/api/composition/index.ts +2 -0
- package/src/api/composition/repeatMatrix.ts +2 -3
- package/src/api/composition/spaceFlex.ts +2 -3
- package/src/api/composition/spaceLayer.ts +2 -3
- package/src/api/composition/timingKeyframe.ts +2 -3
- package/src/api/composition/view.ts +6 -4
- package/src/api/mark/mark.ts +48 -27
- package/src/api/mark/types.ts +1 -0
- package/src/api/node.ts +9 -11
- package/src/component/axis.ts +22 -5
- 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 +3 -12
- package/src/component/title.ts +69 -30
- 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/geo/{d3-projection.ts → d3Projection.ts} +0 -0
- package/src/geo/geoView.ts +1 -1
- package/src/interaction/index.ts +21 -16
- package/src/interaction/native/brushAxisHighlight.ts +194 -0
- package/src/interaction/native/brushFilter.ts +143 -0
- package/src/interaction/native/brushHighlight.ts +104 -31
- package/src/interaction/native/brushXFilter.ts +10 -0
- package/src/interaction/native/brushXHighlight.ts +6 -4
- package/src/interaction/native/brushYFilter.ts +10 -0
- package/src/interaction/native/brushYHighlight.ts +6 -4
- package/src/interaction/native/elementHighlight.ts +1 -0
- package/src/interaction/native/elementSelect.ts +1 -0
- package/src/interaction/native/sliderFilter.ts +112 -0
- package/src/interaction/native/tooltip.ts +18 -4
- package/src/interaction/native/utils.ts +15 -6
- package/src/label-transform/overlapDodgeY.ts +8 -1
- package/src/mark/area.ts +1 -1
- package/src/mark/boxplot.ts +3 -1
- package/src/runtime/component.ts +64 -72
- package/src/runtime/layout.ts +6 -6
- package/src/runtime/plot.ts +126 -73
- package/src/runtime/render.ts +6 -58
- package/src/runtime/scale.ts +14 -0
- package/src/runtime/transform.ts +6 -2
- package/src/runtime/types/common.ts +26 -10
- package/src/runtime/types/options.ts +2 -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/position/default.ts +15 -55
- package/src/shape/label/position/outside.ts +121 -1
- package/src/shape/label/position/spider.ts +12 -19
- package/src/shape/label/position/surround.ts +13 -15
- 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/data.ts +25 -10
- package/src/spec/geometry.ts +2 -0
- package/src/spec/interaction.ts +41 -2
- package/src/spec/transform.ts +3 -1
- package/src/stdlib/index.ts +16 -2
- package/src/theme/academy.ts +11 -15
- package/src/theme/dark.ts +11 -18
- package/src/theme/light.ts +25 -19
- package/src/transform/select.ts +1 -2
- package/src/transform/selectX.ts +1 -1
- package/src/transform/selectY.ts +1 -1
- package/src/utils/scale.ts +31 -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/geo/d3-projection.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/geo/d3-projection.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/src/data/.DS_Store +0 -0
- package/src/data/subset.ts +0 -35
- package/src/shape/.DS_Store +0 -0
package/src/theme/dark.ts
CHANGED
|
@@ -47,7 +47,6 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
47
47
|
fill: '',
|
|
48
48
|
strokeOpacity: 1,
|
|
49
49
|
lineWidth: 1,
|
|
50
|
-
connectStroke: '#666',
|
|
51
50
|
},
|
|
52
51
|
},
|
|
53
52
|
point: {
|
|
@@ -58,19 +57,16 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
58
57
|
},
|
|
59
58
|
hollow: {
|
|
60
59
|
r: 3,
|
|
61
|
-
fill: '',
|
|
62
60
|
strokeOpacity: 0.95,
|
|
63
61
|
lineWidth: 1,
|
|
64
62
|
},
|
|
65
63
|
plus: {
|
|
66
64
|
r: 3,
|
|
67
|
-
fill: '',
|
|
68
65
|
strokeOpacity: 0.95,
|
|
69
66
|
lineWidth: 3,
|
|
70
67
|
},
|
|
71
68
|
diamond: {
|
|
72
69
|
r: 3,
|
|
73
|
-
fill: '',
|
|
74
70
|
strokeOpacity: 0.95,
|
|
75
71
|
lineWidth: 1,
|
|
76
72
|
},
|
|
@@ -89,8 +85,6 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
89
85
|
area: {
|
|
90
86
|
fillOpacity: 0.85,
|
|
91
87
|
lineWidth: 0,
|
|
92
|
-
connectFill: COLORS.BLACK,
|
|
93
|
-
connectFillOpacity: 0.1,
|
|
94
88
|
},
|
|
95
89
|
},
|
|
96
90
|
polygon: {
|
|
@@ -364,6 +358,7 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
364
358
|
connectorStroke: COLORS.BLACK,
|
|
365
359
|
connectorStrokeOpacity: 0.45,
|
|
366
360
|
connectorLineWidth: 1,
|
|
361
|
+
connectorLength: 12,
|
|
367
362
|
connectorLength2: 8,
|
|
368
363
|
connectorDistance: 4,
|
|
369
364
|
},
|
|
@@ -395,18 +390,16 @@ export const Dark: TC<DarkOptions> = (options) => {
|
|
|
395
390
|
},
|
|
396
391
|
scrollbar: {},
|
|
397
392
|
title: {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
fontWeight: 'normal',
|
|
409
|
-
textBaseline: 'top',
|
|
393
|
+
titleFill: COLORS.BLACK,
|
|
394
|
+
titleFillOpacity: 0.85,
|
|
395
|
+
titleFontSize: 14,
|
|
396
|
+
titleFontWeight: 'bold',
|
|
397
|
+
titleTextBaseline: 'top',
|
|
398
|
+
subtitleFill: COLORS.BLACK,
|
|
399
|
+
subtitleFillOpacity: 0.65,
|
|
400
|
+
subtitleFontSize: 12,
|
|
401
|
+
subtitleFontWeight: 'normal',
|
|
402
|
+
subtitleTextBaseline: 'top',
|
|
410
403
|
},
|
|
411
404
|
};
|
|
412
405
|
return Object.assign({}, defaultOptions, options);
|
package/src/theme/light.ts
CHANGED
|
@@ -47,7 +47,6 @@ export const Light: TC<LightOptions> = (options) => {
|
|
|
47
47
|
fill: '',
|
|
48
48
|
strokeOpacity: 1,
|
|
49
49
|
lineWidth: 1,
|
|
50
|
-
connectStroke: '#aaa',
|
|
51
50
|
},
|
|
52
51
|
},
|
|
53
52
|
point: {
|
|
@@ -58,19 +57,16 @@ export const Light: TC<LightOptions> = (options) => {
|
|
|
58
57
|
},
|
|
59
58
|
hollow: {
|
|
60
59
|
r: 3,
|
|
61
|
-
fill: '',
|
|
62
60
|
strokeOpacity: 0.95,
|
|
63
61
|
lineWidth: 1,
|
|
64
62
|
},
|
|
65
63
|
plus: {
|
|
66
64
|
r: 3,
|
|
67
|
-
fill: '',
|
|
68
65
|
strokeOpacity: 0.95,
|
|
69
66
|
lineWidth: 3,
|
|
70
67
|
},
|
|
71
68
|
diamond: {
|
|
72
69
|
r: 3,
|
|
73
|
-
fill: '',
|
|
74
70
|
strokeOpacity: 0.95,
|
|
75
71
|
lineWidth: 1,
|
|
76
72
|
},
|
|
@@ -89,8 +85,6 @@ export const Light: TC<LightOptions> = (options) => {
|
|
|
89
85
|
area: {
|
|
90
86
|
fillOpacity: 0.85,
|
|
91
87
|
lineWidth: 0,
|
|
92
|
-
connectFill: COLORS.BLACK,
|
|
93
|
-
connectFillOpacity: 0.1,
|
|
94
88
|
},
|
|
95
89
|
},
|
|
96
90
|
polygon: {
|
|
@@ -365,6 +359,7 @@ export const Light: TC<LightOptions> = (options) => {
|
|
|
365
359
|
connectorStroke: COLORS.BLACK,
|
|
366
360
|
connectorStrokeOpacity: 0.45,
|
|
367
361
|
connectorLineWidth: 1,
|
|
362
|
+
connectorLength: 12,
|
|
368
363
|
connectorLength2: 8,
|
|
369
364
|
connectorDistance: 4,
|
|
370
365
|
},
|
|
@@ -394,20 +389,31 @@ export const Light: TC<LightOptions> = (options) => {
|
|
|
394
389
|
handleLabelFontSize: 12,
|
|
395
390
|
handleLabelFontWeight: 'normal',
|
|
396
391
|
},
|
|
397
|
-
scrollbar: {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
392
|
+
scrollbar: {
|
|
393
|
+
padding: [2, 2, 2, 2],
|
|
394
|
+
trackSize: 10,
|
|
395
|
+
isRound: true,
|
|
396
|
+
slidable: true,
|
|
397
|
+
scrollable: true,
|
|
398
|
+
trackFill: '#e5e5e5',
|
|
399
|
+
trackFillOpacity: 0,
|
|
400
|
+
trackStroke: 'none',
|
|
401
|
+
thumbFill: '#000',
|
|
402
|
+
thumbFillOpacity: 0.15,
|
|
403
|
+
thumbStroke: 'none',
|
|
404
|
+
thumbHighlightedFillOpacity: 0.2,
|
|
404
405
|
},
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
406
|
+
title: {
|
|
407
|
+
titleFill: COLORS.BLACK,
|
|
408
|
+
titleFillOpacity: 0.85,
|
|
409
|
+
titleFontSize: 14,
|
|
410
|
+
titleFontWeight: 'bold',
|
|
411
|
+
titleTextBaseline: 'top',
|
|
412
|
+
subtitleFill: COLORS.BLACK,
|
|
413
|
+
subtitleFillOpacity: 0.65,
|
|
414
|
+
subtitleFontSize: 12,
|
|
415
|
+
subtitleFontWeight: 'normal',
|
|
416
|
+
subtitleTextBaseline: 'top',
|
|
411
417
|
},
|
|
412
418
|
};
|
|
413
419
|
return Object.assign({}, defaultOptions, options);
|
package/src/transform/select.ts
CHANGED
|
@@ -39,11 +39,10 @@ function normalizeSelector(selector: Selector): SelectorFunction {
|
|
|
39
39
|
* pull a single or multiple values out of each series.
|
|
40
40
|
*/
|
|
41
41
|
export const Select: TC<SelectOptions> = (options = {}) => {
|
|
42
|
-
const { groupBy = 'series',
|
|
42
|
+
const { groupBy = 'series', channel, selector } = options;
|
|
43
43
|
return (I, mark) => {
|
|
44
44
|
const { encode } = mark;
|
|
45
45
|
const groups = createGroups(groupBy, I, mark);
|
|
46
|
-
const [channel, selector] = Object.entries(rest)[0];
|
|
47
46
|
const [V] = columnOf(encode, channel);
|
|
48
47
|
const selectFunction = normalizeSelector(selector);
|
|
49
48
|
return [groups.flatMap((GI) => selectFunction(GI, V as number[])), mark];
|
package/src/transform/selectX.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type SelectXOptions = Omit<SelectXTransform, 'type'>;
|
|
|
9
9
|
*/
|
|
10
10
|
export const SelectX: TC<SelectXOptions> = (options = {}) => {
|
|
11
11
|
const { selector, ...rest } = options;
|
|
12
|
-
return Select({
|
|
12
|
+
return Select({ channel: 'x', selector, ...rest });
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
SelectX.props = {};
|
package/src/transform/selectY.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type SelectYOptions = Omit<SelectYTransform, 'type'>;
|
|
|
9
9
|
*/
|
|
10
10
|
export const SelectY: TC<SelectYOptions> = (options = {}) => {
|
|
11
11
|
const { selector, ...rest } = options;
|
|
12
|
-
return Select({
|
|
12
|
+
return Select({ channel: 'y', selector, ...rest });
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
SelectY.props = {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { bisectLeft, sort } from 'd3-array';
|
|
2
|
+
|
|
3
|
+
function isOrdinalScale(scale) {
|
|
4
|
+
return scale.getBandWidth;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function constrain(x, lo, hi) {
|
|
8
|
+
return Math.min(hi, Math.max(lo, x));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function invert(scale, x, start) {
|
|
12
|
+
if (!isOrdinalScale(scale)) return scale.invert(x);
|
|
13
|
+
const { adjustedRange } = scale;
|
|
14
|
+
const { domain } = scale.getOptions();
|
|
15
|
+
const offset = start ? -1 : 0;
|
|
16
|
+
const step = scale.getStep();
|
|
17
|
+
const range = start ? adjustedRange : adjustedRange.map((d) => d + step);
|
|
18
|
+
// R[i0 - 1] < x <= R[i0]
|
|
19
|
+
const i0 = bisectLeft(range, x);
|
|
20
|
+
const i1 = constrain(i0 + offset, 0, domain.length - 1);
|
|
21
|
+
return domain[i1];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function domainOf(scale, values) {
|
|
25
|
+
if (!isOrdinalScale(scale)) return sort(values);
|
|
26
|
+
const { domain } = scale.getOptions();
|
|
27
|
+
const [v1, v2] = values;
|
|
28
|
+
const start = domain.indexOf(v1);
|
|
29
|
+
const end = domain.indexOf(v2);
|
|
30
|
+
return domain.slice(start, end + 1);
|
|
31
|
+
}
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d3-projection.js","sourceRoot":"src/","sources":["geo/d3-projection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,QAAQ,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d3-projection.js","sourceRoot":"src/","sources":["geo/d3-projection.ts"],"names":[],"mappings":";;;AAAA,iCAgCgB;AA/Bd,sGAAA,YAAY,OAAA;AACZ,mGAAA,SAAS,OAAA;AACT,+GAAA,qBAAqB,OAAA;AACrB,kHAAA,wBAAwB,OAAA;AACxB,iHAAA,uBAAuB,OAAA;AACvB,oHAAA,0BAA0B,OAAA;AAC1B,2GAAA,iBAAiB,OAAA;AACjB,8GAAA,oBAAoB,OAAA;AACpB,2GAAA,iBAAiB,OAAA;AACjB,8GAAA,oBAAoB,OAAA;AACpB,6GAAA,mBAAmB,OAAA;AACnB,gHAAA,sBAAsB,OAAA;AACtB,uGAAA,aAAa,OAAA;AACb,0GAAA,gBAAgB,OAAA;AAChB,4GAAA,kBAAkB,OAAA;AAClB,+GAAA,qBAAqB,OAAA;AACrB,qGAAA,WAAW,OAAA;AACX,wGAAA,cAAc,OAAA;AACd,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AACb,8GAAA,oBAAoB,OAAA;AACpB,qGAAA,WAAW,OAAA;AACX,wGAAA,cAAc,OAAA;AACd,0GAAA,gBAAgB,OAAA;AAChB,6GAAA,mBAAmB,OAAA;AACnB,yGAAA,eAAe,OAAA;AACf,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,6GAAA,mBAAmB,OAAA;AACnB,+GAAA,qBAAqB,OAAA;AACrB,kHAAA,wBAAwB,OAAA"}
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/data/.DS_Store
DELETED
|
Binary file
|
package/src/data/subset.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DataComponent as DC } from '../runtime';
|
|
2
|
-
import { SubsetTransform } from '../spec';
|
|
3
|
-
|
|
4
|
-
function constrain(v: number, min: number, max: number) {
|
|
5
|
-
return Math.min(max, Math.max(min, v));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export type SubsetOptions = Omit<SubsetTransform, 'type'>;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Immutable data sort by specified fields.
|
|
12
|
-
*/
|
|
13
|
-
export const Subset: DC<SubsetOptions> = (options) => {
|
|
14
|
-
return (data) => {
|
|
15
|
-
const { fields = [] } = options;
|
|
16
|
-
|
|
17
|
-
let { start = 0, end = data.length } = options;
|
|
18
|
-
start = constrain(start, 0, data.length - 1);
|
|
19
|
-
end = constrain(end, 1, data.length);
|
|
20
|
-
if (start > end) [start, end] = [end, start];
|
|
21
|
-
|
|
22
|
-
const pick = (v: any) =>
|
|
23
|
-
fields.reduce((datum, field) => {
|
|
24
|
-
// Pick the data deeply.
|
|
25
|
-
if (field in v) {
|
|
26
|
-
datum[field] = v[field];
|
|
27
|
-
}
|
|
28
|
-
return datum;
|
|
29
|
-
}, {});
|
|
30
|
-
|
|
31
|
-
return data.filter((_, i) => i >= start && i < end).map(pick);
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
Subset.props = {};
|
package/src/shape/.DS_Store
DELETED
|
Binary file
|