@antv/g2 5.0.0-alpha.1 → 5.0.0-alpha.2
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 +10 -0
- package/dist/g2.min.js +3 -3
- package/esm/adjust/index.d.ts +2 -1
- package/esm/adjust/index.js.map +1 -1
- package/esm/animation/index.d.ts +14 -7
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/scaleInX.js +3 -0
- package/esm/animation/scaleInX.js.map +1 -1
- package/esm/animation/scaleInY.js +3 -0
- package/esm/animation/scaleInY.js.map +1 -1
- package/esm/api/chart.d.ts +4 -0
- package/esm/api/chart.js +20 -3
- package/esm/api/chart.js.map +1 -1
- package/esm/api/mark/index.d.ts +3 -3
- package/esm/api/mark/index.js +2 -2
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +4 -4
- package/esm/api/mark/mark.js +6 -5
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +1 -0
- package/esm/api/node.d.ts +4 -5
- package/esm/api/node.js +5 -7
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.d.ts +1 -0
- package/esm/api/props.js +10 -10
- package/esm/api/props.js.map +1 -1
- package/esm/component/axis.d.ts +1 -1
- package/esm/component/axis.js +11 -4
- package/esm/component/axis.js.map +1 -1
- package/esm/component/index.d.ts +10 -5
- package/esm/component/index.js.map +1 -1
- package/esm/composition/index.d.ts +16 -8
- package/esm/composition/index.js.map +1 -1
- package/esm/composition/rect.js +1 -1
- package/esm/composition/rect.js.map +1 -1
- package/esm/coordinate/index.d.ts +24 -12
- package/esm/coordinate/index.js.map +1 -1
- package/esm/data/arc.d.ts +7 -0
- package/esm/data/arc.js +10 -18
- package/esm/data/arc.js.map +1 -1
- package/esm/data/cluster.d.ts +8 -0
- package/esm/data/cluster.js +36 -46
- package/esm/data/cluster.js.map +1 -1
- package/esm/data/custom.d.ts +7 -0
- package/esm/data/custom.js +10 -0
- package/esm/data/custom.js.map +1 -0
- package/esm/data/fetch.js +7 -6
- package/esm/data/fetch.js.map +1 -1
- package/esm/data/filterBy.js +6 -2
- package/esm/data/filterBy.js.map +1 -1
- package/esm/data/index.d.ts +28 -9
- package/esm/data/index.js +6 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/map.d.ts +7 -0
- package/esm/data/map.js +10 -0
- package/esm/data/map.js.map +1 -0
- package/esm/data/sankey.d.ts +8 -0
- package/esm/data/sankey.js +76 -95
- package/esm/data/sankey.js.map +1 -1
- package/esm/data/sortBy.js +14 -4
- package/esm/data/sortBy.js.map +1 -1
- package/esm/data/tree.d.ts +4 -0
- package/esm/data/tree.js +6 -9
- package/esm/data/tree.js.map +1 -1
- package/esm/data/utils/arc/index.d.ts +1 -1
- package/esm/data/utils/fields.d.ts +6 -0
- package/esm/data/utils/fields.js +15 -0
- package/esm/data/utils/fields.js.map +1 -0
- package/esm/data/voronoi.d.ts +1 -0
- package/esm/data/voronoi.js +1 -22
- package/esm/data/voronoi.js.map +1 -1
- package/esm/data/wordCloud.d.ts +1 -0
- package/esm/data/wordCloud.js +1 -93
- package/esm/data/wordCloud.js.map +1 -1
- package/esm/encode/index.d.ts +8 -4
- package/esm/encode/index.js.map +1 -1
- package/esm/interaction/action/index.d.ts +42 -21
- package/esm/interaction/action/index.js +8 -8
- package/esm/interaction/action/index.js.map +1 -1
- package/esm/interaction/index.d.ts +1 -1
- package/esm/interaction/index.js +0 -1
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/interactor/index.d.ts +4 -2
- package/esm/interaction/interactor/index.js.map +1 -1
- package/esm/mark/annotation/index.d.ts +14 -7
- package/esm/mark/annotation/index.js +6 -6
- package/esm/mark/annotation/index.js.map +1 -1
- package/esm/mark/geometry/{schema.d.ts → box.d.ts} +4 -4
- package/esm/mark/geometry/{schema.js → box.js} +4 -4
- package/esm/mark/geometry/box.js.map +1 -0
- package/esm/mark/geometry/image.js +5 -4
- package/esm/mark/geometry/image.js.map +1 -1
- package/esm/mark/geometry/index.d.ts +22 -13
- package/esm/mark/geometry/index.js +1 -3
- package/esm/mark/geometry/index.js.map +1 -1
- package/esm/mark/geometry/interval.js +0 -1
- package/esm/mark/geometry/interval.js.map +1 -1
- package/esm/mark/geometry/line.js +5 -1
- package/esm/mark/geometry/line.js.map +1 -1
- package/esm/mark/geometry/link.js +1 -1
- package/esm/mark/geometry/link.js.map +1 -1
- package/esm/mark/geometry/point.js +6 -2
- package/esm/mark/geometry/point.js.map +1 -1
- package/esm/mark/geometry/polygon.js +1 -1
- package/esm/mark/geometry/polygon.js.map +1 -1
- package/esm/palette/index.d.ts +4 -2
- package/esm/palette/index.js.map +1 -1
- package/esm/runtime/component.d.ts +1 -1
- package/esm/runtime/component.js +8 -3
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/mark.js +4 -3
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.js +47 -28
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.js +15 -6
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.js +1 -1
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/types/component.d.ts +4 -6
- package/esm/runtime/types/options.d.ts +1 -0
- package/esm/scale/index.d.ts +22 -11
- package/esm/scale/index.js.map +1 -1
- package/esm/shape/annotation/text.js +16 -4
- package/esm/shape/annotation/text.js.map +1 -1
- package/esm/shape/{schema → box}/box.d.ts +0 -0
- package/esm/shape/{schema → box}/box.js +2 -2
- package/esm/shape/box/box.js.map +1 -0
- package/esm/shape/index.d.ts +86 -48
- package/esm/shape/index.js +9 -12
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/label/label.js +62 -38
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/{edge → link}/arc.d.ts +0 -0
- package/esm/shape/{edge → link}/arc.js +0 -0
- package/esm/shape/{edge → link}/arc.js.map +1 -1
- package/esm/shape/{edge → link}/smoothEdge.d.ts +0 -0
- package/esm/shape/{edge → link}/smoothEdge.js +0 -0
- package/esm/shape/{edge → link}/smoothEdge.js.map +1 -1
- package/esm/shape/{edge → link}/vhv.d.ts +0 -0
- package/esm/shape/{edge → link}/vhv.js +0 -0
- package/esm/shape/{edge → link}/vhv.js.map +1 -1
- package/esm/shape/{edge → polygon}/ribbon.d.ts +0 -0
- package/esm/shape/{edge → polygon}/ribbon.js +0 -0
- package/esm/shape/polygon/ribbon.js.map +1 -0
- package/esm/spec/data.d.ts +145 -8
- package/esm/spec/geometry.d.ts +5 -3
- package/esm/spec/transform.d.ts +18 -8
- package/esm/spec/transform.js +0 -133
- package/esm/spec/transform.js.map +1 -1
- package/esm/stdlib/index.js +13 -17
- package/esm/stdlib/index.js.map +1 -1
- package/esm/transform/dodgeX.js +7 -3
- package/esm/transform/dodgeX.js.map +1 -1
- package/esm/transform/flexX.d.ts +7 -0
- package/esm/transform/flexX.js +31 -0
- package/esm/transform/flexX.js.map +1 -0
- package/esm/transform/groupX.js +17 -19
- package/esm/transform/groupX.js.map +1 -1
- package/esm/transform/index.d.ts +46 -21
- package/esm/transform/index.js +3 -1
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/normalizeY.js +1 -2
- package/esm/transform/normalizeY.js.map +1 -1
- package/esm/transform/sortX.d.ts +8 -0
- package/esm/transform/sortX.js +60 -0
- package/esm/transform/sortX.js.map +1 -0
- package/esm/transform/stackY.d.ts +1 -1
- package/esm/transform/stackY.js +26 -9
- package/esm/transform/stackY.js.map +1 -1
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +3 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/lib/adjust/index.d.ts +2 -1
- package/lib/adjust/index.js.map +1 -1
- package/lib/animation/index.d.ts +14 -7
- package/lib/animation/index.js.map +1 -1
- package/lib/animation/scaleInX.js +3 -0
- package/lib/animation/scaleInX.js.map +1 -1
- package/lib/animation/scaleInY.js +3 -0
- package/lib/animation/scaleInY.js.map +1 -1
- package/lib/api/chart.d.ts +4 -0
- package/lib/api/chart.js +20 -3
- package/lib/api/chart.js.map +1 -1
- package/lib/api/mark/index.d.ts +3 -3
- package/lib/api/mark/index.js +1 -1
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +4 -4
- package/lib/api/mark/mark.js +7 -6
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +1 -0
- package/lib/api/node.d.ts +4 -5
- package/lib/api/node.js +5 -7
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.d.ts +1 -0
- package/lib/api/props.js +10 -10
- package/lib/api/props.js.map +1 -1
- package/lib/component/axis.d.ts +1 -1
- package/lib/component/axis.js +11 -4
- package/lib/component/axis.js.map +1 -1
- package/lib/component/index.d.ts +10 -5
- package/lib/component/index.js.map +1 -1
- package/lib/composition/index.d.ts +16 -8
- package/lib/composition/index.js.map +1 -1
- package/lib/composition/rect.js +1 -1
- package/lib/composition/rect.js.map +1 -1
- package/lib/coordinate/index.d.ts +24 -12
- package/lib/coordinate/index.js.map +1 -1
- package/lib/data/arc.d.ts +7 -0
- package/lib/data/arc.js +14 -18
- package/lib/data/arc.js.map +1 -1
- package/lib/data/cluster.d.ts +8 -0
- package/lib/data/cluster.js +41 -46
- package/lib/data/cluster.js.map +1 -1
- package/lib/data/custom.d.ts +7 -0
- package/lib/data/custom.js +14 -0
- package/lib/data/custom.js.map +1 -0
- package/lib/data/fetch.js +6 -5
- package/lib/data/fetch.js.map +1 -1
- package/lib/data/filterBy.js +6 -2
- package/lib/data/filterBy.js.map +1 -1
- package/lib/data/index.d.ts +28 -9
- package/lib/data/index.js +13 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/map.d.ts +7 -0
- package/lib/data/map.js +14 -0
- package/lib/data/map.js.map +1 -0
- package/lib/data/sankey.d.ts +8 -0
- package/lib/data/sankey.js +80 -95
- package/lib/data/sankey.js.map +1 -1
- package/lib/data/sortBy.js +14 -4
- package/lib/data/sortBy.js.map +1 -1
- package/lib/data/tree.d.ts +4 -0
- package/lib/data/tree.js +10 -9
- package/lib/data/tree.js.map +1 -1
- package/lib/data/utils/arc/index.d.ts +1 -1
- package/lib/data/utils/fields.d.ts +6 -0
- package/lib/data/utils/fields.js +19 -0
- package/lib/data/utils/fields.js.map +1 -0
- package/lib/data/voronoi.d.ts +1 -0
- package/lib/data/voronoi.js +2 -22
- package/lib/data/voronoi.js.map +1 -1
- package/lib/data/wordCloud.d.ts +1 -0
- package/lib/data/wordCloud.js +2 -93
- package/lib/data/wordCloud.js.map +1 -1
- package/lib/encode/index.d.ts +8 -4
- package/lib/encode/index.js.map +1 -1
- package/lib/interaction/action/index.d.ts +42 -21
- package/lib/interaction/action/index.js.map +1 -1
- package/lib/interaction/index.d.ts +1 -1
- package/lib/interaction/index.js +0 -15
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/interactor/index.d.ts +4 -2
- package/lib/interaction/interactor/index.js.map +1 -1
- package/lib/mark/annotation/index.d.ts +14 -7
- package/lib/mark/annotation/index.js.map +1 -1
- package/lib/mark/geometry/{schema.d.ts → box.d.ts} +4 -4
- package/lib/mark/geometry/{schema.js → box.js} +6 -6
- package/lib/mark/geometry/box.js.map +1 -0
- package/lib/mark/geometry/image.js +5 -4
- package/lib/mark/geometry/image.js.map +1 -1
- package/lib/mark/geometry/index.d.ts +22 -13
- package/lib/mark/geometry/index.js +3 -7
- package/lib/mark/geometry/index.js.map +1 -1
- package/lib/mark/geometry/interval.js +0 -1
- package/lib/mark/geometry/interval.js.map +1 -1
- package/lib/mark/geometry/line.js +5 -1
- package/lib/mark/geometry/line.js.map +1 -1
- package/lib/mark/geometry/link.js +1 -1
- package/lib/mark/geometry/link.js.map +1 -1
- package/lib/mark/geometry/point.js +6 -2
- package/lib/mark/geometry/point.js.map +1 -1
- package/lib/mark/geometry/polygon.js +1 -1
- package/lib/mark/geometry/polygon.js.map +1 -1
- package/lib/palette/index.d.ts +4 -2
- package/lib/palette/index.js.map +1 -1
- package/lib/runtime/component.d.ts +1 -1
- package/lib/runtime/component.js +8 -3
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/mark.js +4 -3
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.js +47 -28
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.js +15 -6
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.js +1 -1
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/types/component.d.ts +4 -6
- package/lib/runtime/types/options.d.ts +1 -0
- package/lib/scale/index.d.ts +22 -11
- package/lib/scale/index.js.map +1 -1
- package/lib/shape/annotation/text.js +16 -4
- package/lib/shape/annotation/text.js.map +1 -1
- package/lib/shape/{schema → box}/box.d.ts +0 -0
- package/lib/shape/{schema → box}/box.js +2 -2
- package/lib/shape/box/box.js.map +1 -0
- package/lib/shape/index.d.ts +86 -48
- package/lib/shape/index.js +10 -16
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/label/label.js +61 -37
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/{edge → link}/arc.d.ts +0 -0
- package/lib/shape/{edge → link}/arc.js +0 -0
- package/lib/shape/{edge → link}/arc.js.map +1 -1
- package/lib/shape/{edge → link}/smoothEdge.d.ts +0 -0
- package/lib/shape/{edge → link}/smoothEdge.js +0 -0
- package/lib/shape/{edge → link}/smoothEdge.js.map +1 -1
- package/lib/shape/{edge → link}/vhv.d.ts +0 -0
- package/lib/shape/{edge → link}/vhv.js +0 -0
- package/lib/shape/{edge → link}/vhv.js.map +1 -1
- package/lib/shape/{edge → polygon}/ribbon.d.ts +0 -0
- package/lib/shape/{edge → polygon}/ribbon.js +0 -0
- package/lib/shape/polygon/ribbon.js.map +1 -0
- package/lib/spec/data.d.ts +145 -8
- package/lib/spec/geometry.d.ts +5 -3
- package/lib/spec/transform.d.ts +18 -8
- package/lib/spec/transform.js +0 -133
- package/lib/spec/transform.js.map +1 -1
- package/lib/stdlib/index.js +9 -13
- package/lib/stdlib/index.js.map +1 -1
- package/lib/transform/dodgeX.js +7 -3
- package/lib/transform/dodgeX.js.map +1 -1
- package/lib/transform/flexX.d.ts +7 -0
- package/lib/transform/flexX.js +35 -0
- package/lib/transform/flexX.js.map +1 -0
- package/lib/transform/groupX.js +16 -18
- package/lib/transform/groupX.js.map +1 -1
- package/lib/transform/index.d.ts +46 -21
- package/lib/transform/index.js +5 -1
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/normalizeY.js +0 -1
- package/lib/transform/normalizeY.js.map +1 -1
- package/lib/transform/sortX.d.ts +8 -0
- package/lib/transform/sortX.js +64 -0
- package/lib/transform/sortX.js.map +1 -0
- package/lib/transform/stackY.d.ts +1 -1
- package/lib/transform/stackY.js +26 -9
- package/lib/transform/stackY.js.map +1 -1
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +5 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/package.json +19 -4
- package/src/.DS_Store +0 -0
- package/src/adjust/index.ts +2 -1
- package/src/animation/index.ts +15 -7
- package/src/animation/morphing.ts +1 -1
- package/src/animation/scaleInX.ts +3 -0
- package/src/animation/scaleInY.ts +3 -0
- package/src/api/chart.ts +40 -3
- package/src/api/mark/index.ts +3 -3
- package/src/api/mark/mark.ts +6 -5
- package/src/api/mark/types.ts +1 -0
- package/src/api/node.ts +5 -6
- package/src/api/props.ts +14 -10
- package/src/component/axis.ts +13 -5
- package/src/component/index.ts +11 -5
- package/src/composition/index.ts +17 -8
- package/src/composition/rect.ts +1 -1
- package/src/coordinate/index.ts +25 -12
- package/src/data/arc.ts +13 -18
- package/src/data/cluster.ts +53 -56
- package/src/data/custom.ts +15 -0
- package/src/data/fetch.ts +12 -7
- package/src/data/filterBy.ts +11 -2
- package/src/data/index.ts +29 -9
- package/src/data/map.ts +15 -0
- package/src/data/sankey.ts +92 -95
- package/src/data/sortBy.ts +18 -8
- package/src/data/tree.ts +9 -9
- package/src/data/utils/arc/index.ts +1 -1
- package/src/data/utils/fields.ts +17 -0
- package/src/data/voronoi.ts +2 -0
- package/src/data/wordCloud.ts +2 -0
- package/src/encode/index.ts +9 -4
- package/src/interaction/action/index.ts +43 -45
- package/src/interaction/index.ts +17 -1
- package/src/interaction/interactor/index.ts +5 -2
- package/src/interaction/types.ts +1 -1
- package/src/mark/annotation/index.ts +15 -25
- package/src/mark/geometry/{schema.ts → box.ts} +5 -5
- package/src/mark/geometry/image.ts +4 -3
- package/src/mark/geometry/index.ts +23 -13
- package/src/mark/geometry/interval.ts +0 -1
- package/src/mark/geometry/line.ts +6 -1
- package/src/mark/geometry/link.ts +1 -1
- package/src/mark/geometry/point.ts +5 -2
- package/src/mark/geometry/polygon.ts +1 -1
- package/src/palette/index.ts +5 -2
- package/src/runtime/component.ts +10 -3
- package/src/runtime/mark.ts +4 -3
- package/src/runtime/plot.ts +66 -41
- package/src/runtime/render.ts +16 -10
- package/src/runtime/scale.ts +1 -1
- package/src/runtime/types/component.ts +1 -10
- package/src/runtime/types/options.ts +1 -0
- package/src/scale/index.ts +23 -11
- package/src/shape/annotation/text.ts +16 -4
- package/src/shape/{schema → box}/box.ts +2 -2
- package/src/shape/index.ts +92 -60
- package/src/shape/label/label.ts +81 -47
- package/src/shape/{edge → link}/arc.ts +0 -0
- package/src/shape/{edge → link}/smoothEdge.ts +0 -0
- package/src/shape/{edge → link}/vhv.ts +0 -0
- package/src/shape/{edge → polygon}/ribbon.ts +0 -0
- package/src/spec/data.ts +157 -8
- package/src/spec/geometry.ts +5 -3
- package/src/spec/transform.ts +37 -154
- package/src/stdlib/index.ts +18 -20
- package/src/transform/dodgeX.ts +5 -4
- package/src/transform/flexX.ts +38 -0
- package/src/transform/groupX.ts +25 -8
- package/src/transform/index.ts +47 -24
- package/src/transform/normalizeY.ts +0 -1
- package/src/transform/sortX.ts +48 -0
- package/src/transform/stackY.ts +34 -9
- package/src/utils/coordinate.ts +4 -0
- package/esm/data/connector.d.ts +0 -7
- package/esm/data/connector.js +0 -9
- package/esm/data/connector.js.map +0 -1
- package/esm/mark/geometry/edge.d.ts +0 -13
- package/esm/mark/geometry/edge.js +0 -31
- package/esm/mark/geometry/edge.js.map +0 -1
- package/esm/mark/geometry/node.d.ts +0 -8
- package/esm/mark/geometry/node.js +0 -27
- package/esm/mark/geometry/node.js.map +0 -1
- package/esm/mark/geometry/schema.js.map +0 -1
- package/esm/renderer/canvas.d.ts +0 -10
- package/esm/renderer/canvas.js +0 -18
- package/esm/renderer/canvas.js.map +0 -1
- package/esm/renderer/index.d.ts +0 -1
- package/esm/renderer/index.js +0 -2
- package/esm/renderer/index.js.map +0 -1
- package/esm/shape/edge/edge.d.ts +0 -6
- package/esm/shape/edge/edge.js +0 -11
- package/esm/shape/edge/edge.js.map +0 -1
- package/esm/shape/edge/ribbon.js.map +0 -1
- package/esm/shape/node/point.d.ts +0 -6
- package/esm/shape/node/point.js +0 -27
- package/esm/shape/node/point.js.map +0 -1
- package/esm/shape/node/polygon.d.ts +0 -3
- package/esm/shape/node/polygon.js +0 -8
- package/esm/shape/node/polygon.js.map +0 -1
- package/esm/shape/schema/box.js.map +0 -1
- package/lib/data/connector.d.ts +0 -7
- package/lib/data/connector.js +0 -13
- package/lib/data/connector.js.map +0 -1
- package/lib/mark/geometry/edge.d.ts +0 -13
- package/lib/mark/geometry/edge.js +0 -35
- package/lib/mark/geometry/edge.js.map +0 -1
- package/lib/mark/geometry/node.d.ts +0 -8
- package/lib/mark/geometry/node.js +0 -31
- package/lib/mark/geometry/node.js.map +0 -1
- package/lib/mark/geometry/schema.js.map +0 -1
- package/lib/renderer/canvas.d.ts +0 -10
- package/lib/renderer/canvas.js +0 -22
- package/lib/renderer/canvas.js.map +0 -1
- package/lib/renderer/index.d.ts +0 -1
- package/lib/renderer/index.js +0 -6
- package/lib/renderer/index.js.map +0 -1
- package/lib/shape/edge/edge.d.ts +0 -6
- package/lib/shape/edge/edge.js +0 -15
- package/lib/shape/edge/edge.js.map +0 -1
- package/lib/shape/edge/ribbon.js.map +0 -1
- package/lib/shape/node/point.d.ts +0 -6
- package/lib/shape/node/point.js +0 -31
- package/lib/shape/node/point.js.map +0 -1
- package/lib/shape/node/polygon.d.ts +0 -3
- package/lib/shape/node/polygon.js +0 -12
- package/lib/shape/node/polygon.js.map +0 -1
- package/lib/shape/schema/box.js.map +0 -1
- package/src/data/connector.ts +0 -14
- package/src/mark/geometry/edge.ts +0 -40
- package/src/mark/geometry/node.ts +0 -36
- package/src/renderer/canvas.ts +0 -27
- package/src/renderer/index.ts +0 -1
- package/src/shape/edge/edge.ts +0 -15
- package/src/shape/node/point.ts +0 -32
- package/src/shape/node/polygon.ts +0 -12
package/esm/data/sankey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sankey.js","sourceRoot":"src/","sources":["data/sankey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sankey.js","sourceRoot":"src/","sources":["data/sankey.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEzE,MAAM,eAAe,GAA2B;IAC9C,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK;IAC7B,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK;IAC7B,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,IAAI;IACJ,KAAK;IACL,MAAM;IACN,OAAO;CACR,CAAC;AAEF,SAAS,oBAAoB,CAAC,SAAqC;IACjE,MAAM,IAAI,GAAG,OAAO,SAAS,CAAC;IAC9B,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,YAAY,CAAC,SAAmB,CAAC,IAAI,OAAO,CAAC;IA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AE,EAAE,GAAG,IAAI,CAAC;YAChC;;;;eAIG;YACH,uCAAY,IAAI,KAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IAAG;QAC/D,CAAC,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC3B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAChC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;YACrB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;YACrB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YAC9B,uCACK,IAAI,KACP,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACnB,CAAC,EAAE;oBACD,IAAI,CAAC,EAAE,GAAG,MAAM;oBAChB,IAAI,CAAC,EAAE,GAAG,MAAM;oBAChB,IAAI,CAAC,EAAE,GAAG,MAAM;oBAChB,IAAI,CAAC,EAAE,GAAG,MAAM;iBACjB,IACD;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
package/esm/data/sortBy.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import { normalizeFields } from './utils/fields';
|
|
1
2
|
/**
|
|
2
3
|
* Immutable data sort by specified fields.
|
|
3
4
|
*/
|
|
4
5
|
export const SortBy = (options) => {
|
|
5
|
-
const { fields: F = []
|
|
6
|
+
const { fields: F = [] } = options;
|
|
7
|
+
const normalizedF = normalizeFields(F, true);
|
|
6
8
|
return (data) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
const comparator = (a, b) => normalizedF.reduce((ret, [field, order = true]) => {
|
|
10
|
+
if (ret !== 0) {
|
|
11
|
+
return ret;
|
|
12
|
+
}
|
|
13
|
+
if (order) {
|
|
14
|
+
return a[field] < b[field] ? -1 : +(a[field] !== b[field]);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return a[field] > b[field] ? -1 : +(a[field] !== b[field]);
|
|
18
|
+
}
|
|
19
|
+
}, 0);
|
|
10
20
|
return [...data].sort(comparator);
|
|
11
21
|
};
|
|
12
22
|
};
|
package/esm/data/sortBy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortBy.js","sourceRoot":"src/","sources":["data/sortBy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sortBy.js","sourceRoot":"src/","sources":["data/sortBy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAsB,CAAC,OAAO,EAAE,EAAE;IACnD,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAEnC,MAAM,WAAW,GAAG,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAE7C,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,UAAU,GAAG,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CACpC,WAAW,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE;YACxD,IAAI,GAAG,KAAK,CAAC,EAAE;gBACb,OAAO,GAAG,CAAC;aACZ;YAED,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;aAC5D;iBAAM;gBACL,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;aAC5D;QACH,CAAC,EAAE,CAAC,CAAC,CAAC;QAER,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
package/esm/data/tree.d.ts
CHANGED
package/esm/data/tree.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Tree.props = {
|
|
8
|
-
// category: 'preprocessor',
|
|
9
|
-
// };
|
|
1
|
+
import { tree } from 'd3-hierarchy';
|
|
2
|
+
import { hierarchyFunction } from './cluster';
|
|
3
|
+
export const Tree = (options) => {
|
|
4
|
+
return hierarchyFunction(tree)(options);
|
|
5
|
+
};
|
|
6
|
+
Tree.props = {};
|
|
10
7
|
//# sourceMappingURL=tree.js.map
|
package/esm/data/tree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.js","sourceRoot":"src/","sources":["data/tree.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"src/","sources":["data/tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI9C,MAAM,CAAC,MAAM,IAAI,GAAoB,CAAC,OAAO,EAAE,EAAE;IAC/C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Arc } from './arc';
|
|
2
|
-
export { ArcOptions } from './types';
|
|
2
|
+
export type { ArcOptions } from './types';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description Converts a random format array into a regular two-dimensional array
|
|
4
|
+
* @example ['a', 'b', ['c', value]] => [['a', defaultValue], ['b', defaultValue], ['c', value]]
|
|
5
|
+
*/
|
|
6
|
+
export declare function normalizeFields(fields: any[], defaultValue: boolean | ((d: any) => boolean)): any[][];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @description Converts a random format array into a regular two-dimensional array
|
|
4
|
+
* @example ['a', 'b', ['c', value]] => [['a', defaultValue], ['b', defaultValue], ['c', value]]
|
|
5
|
+
*/
|
|
6
|
+
export function normalizeFields(fields, defaultValue) {
|
|
7
|
+
return fields.map((d) => {
|
|
8
|
+
if (Array.isArray(d)) {
|
|
9
|
+
const [field, value = defaultValue] = d;
|
|
10
|
+
return [field, value];
|
|
11
|
+
}
|
|
12
|
+
return [d, defaultValue];
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"src/","sources":["data/utils/fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAa,EACb,YAA6C;IAE7C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACtB,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACpB,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;YACxC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACvB;QACD,OAAO,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/esm/data/voronoi.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/data/voronoi.js
CHANGED
|
@@ -2,26 +2,5 @@
|
|
|
2
2
|
// import { TransformComponent as TC } from '../runtime';
|
|
3
3
|
// import { VoronoiTransform } from '../spec';
|
|
4
4
|
// import { merge } from '../transform/utils/helper';
|
|
5
|
-
|
|
6
|
-
// export const Voronoi: TC<VoronoiOptions> = (options) => {
|
|
7
|
-
// const { fields: F, as: A, extend } = options;
|
|
8
|
-
// const [x, y] = F;
|
|
9
|
-
// const [ax, ay] = A;
|
|
10
|
-
// return merge(({ data }) => {
|
|
11
|
-
// const polygons = voronoi()
|
|
12
|
-
// .x((d) => d[x])
|
|
13
|
-
// .y((d) => d[y])
|
|
14
|
-
// .extent(extend)
|
|
15
|
-
// .polygons(data)
|
|
16
|
-
// .map((p) => ({
|
|
17
|
-
// ...p.data,
|
|
18
|
-
// [ax]: p.map((pi) => pi[0]),
|
|
19
|
-
// [ay]: p.map((pi) => pi[1]),
|
|
20
|
-
// }));
|
|
21
|
-
// return { data: polygons };
|
|
22
|
-
// });
|
|
23
|
-
// };
|
|
24
|
-
// Voronoi.props = {
|
|
25
|
-
// category: 'preprocessor',
|
|
26
|
-
// };
|
|
5
|
+
export {};
|
|
27
6
|
//# sourceMappingURL=voronoi.js.map
|
package/esm/data/voronoi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voronoi.js","sourceRoot":"src/","sources":["data/voronoi.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,yDAAyD;AACzD,8CAA8C;AAC9C,qDAAqD
|
|
1
|
+
{"version":3,"file":"voronoi.js","sourceRoot":"src/","sources":["data/voronoi.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,yDAAyD;AACzD,8CAA8C;AAC9C,qDAAqD"}
|
package/esm/data/wordCloud.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/data/wordCloud.js
CHANGED
|
@@ -4,97 +4,5 @@
|
|
|
4
4
|
// import { tagCloud } from '../transform/utils/d3-cloud';
|
|
5
5
|
// import { flow } from '../transform/utils/flow';
|
|
6
6
|
// import { merge } from '../transform/utils/helper';
|
|
7
|
-
|
|
8
|
-
// const DEFAULT_OPTIONS: Partial<WordCloudOptions> = {
|
|
9
|
-
// size: [500, 500],
|
|
10
|
-
// fontSize: [14, 28],
|
|
11
|
-
// };
|
|
12
|
-
// export function processImageMask(
|
|
13
|
-
// img: HTMLImageElement | string,
|
|
14
|
-
// ): Promise<HTMLImageElement> {
|
|
15
|
-
// return new Promise((res, rej) => {
|
|
16
|
-
// if (img instanceof HTMLImageElement) {
|
|
17
|
-
// res(img);
|
|
18
|
-
// return;
|
|
19
|
-
// }
|
|
20
|
-
// if (typeof img === 'string') {
|
|
21
|
-
// const image = new Image();
|
|
22
|
-
// image.crossOrigin = 'anonymous';
|
|
23
|
-
// image.src = img;
|
|
24
|
-
// image.onload = () => res(image);
|
|
25
|
-
// image.onerror = () => {
|
|
26
|
-
// console.error(`'image ${img} load failed !!!'`);
|
|
27
|
-
// rej();
|
|
28
|
-
// };
|
|
29
|
-
// return;
|
|
30
|
-
// }
|
|
31
|
-
// rej();
|
|
32
|
-
// });
|
|
33
|
-
// }
|
|
34
|
-
// export function normalizeFontSize(fontSize: any, range?: [number, number]) {
|
|
35
|
-
// if (typeof fontSize === 'function') return fontSize;
|
|
36
|
-
// if (Array.isArray(fontSize)) {
|
|
37
|
-
// const [fMin, fMax] = fontSize;
|
|
38
|
-
// if (!range) return () => (fMax + fMin) / 2;
|
|
39
|
-
// const [min, max] = range;
|
|
40
|
-
// if (max === min) return () => (fMax + fMin) / 2;
|
|
41
|
-
// return ({ value }) => ((fMax - fMin) / (max - min)) * (value - min) + fMin;
|
|
42
|
-
// }
|
|
43
|
-
// return () => fontSize;
|
|
44
|
-
// }
|
|
45
|
-
// export const WordCloud: TC<WordCloudOptions> = (options) => {
|
|
46
|
-
// return merge(async ({ data }) => {
|
|
47
|
-
// const cloudOptions = Object.assign({}, DEFAULT_OPTIONS, options);
|
|
48
|
-
// const layout = tagCloud();
|
|
49
|
-
// await flow(layout, cloudOptions)
|
|
50
|
-
// .set('fontSize', (v) => {
|
|
51
|
-
// const arr = data.map((d) => d.value);
|
|
52
|
-
// return normalizeFontSize(v, [min(arr) as any, max(arr) as any]);
|
|
53
|
-
// })
|
|
54
|
-
// .set('font')
|
|
55
|
-
// .set('fontStyle')
|
|
56
|
-
// .set('fontWeight')
|
|
57
|
-
// .set('padding')
|
|
58
|
-
// .set('rotate')
|
|
59
|
-
// .set('size')
|
|
60
|
-
// .set('spiral')
|
|
61
|
-
// .set('timeInterval')
|
|
62
|
-
// .set('random')
|
|
63
|
-
// .set('text')
|
|
64
|
-
// .set('on')
|
|
65
|
-
// .setAsync('imageMask', processImageMask, layout.createMask);
|
|
66
|
-
// layout.words([...data]);
|
|
67
|
-
// const result = layout.start();
|
|
68
|
-
// const [cw, ch] = cloudOptions.size;
|
|
69
|
-
// const defaultBounds = [
|
|
70
|
-
// { x: 0, y: 0 },
|
|
71
|
-
// { x: cw, y: ch },
|
|
72
|
-
// ];
|
|
73
|
-
// const { _bounds: bounds = defaultBounds, _tags, hasImage } = result;
|
|
74
|
-
// const tags = _tags.map(({ x, y, ...rest }) => ({
|
|
75
|
-
// ...rest,
|
|
76
|
-
// x: x + cw / 2,
|
|
77
|
-
// y: y + ch / 2,
|
|
78
|
-
// }));
|
|
79
|
-
// // Append two data to replace the corner of top-left and bottom-right, avoid calculate the actual bounds will occur some error.
|
|
80
|
-
// const [{ x: tlx, y: tly }, { x: brx, y: bry }] = bounds;
|
|
81
|
-
// const invisibleText = { text: '', value: 0, opacity: 0, fontSize: 0 };
|
|
82
|
-
// tags.push(
|
|
83
|
-
// {
|
|
84
|
-
// ...invisibleText,
|
|
85
|
-
// x: hasImage ? 0 : tlx,
|
|
86
|
-
// y: hasImage ? 0 : tly,
|
|
87
|
-
// },
|
|
88
|
-
// {
|
|
89
|
-
// ...invisibleText,
|
|
90
|
-
// x: hasImage ? cw : brx,
|
|
91
|
-
// y: hasImage ? ch : bry,
|
|
92
|
-
// },
|
|
93
|
-
// );
|
|
94
|
-
// return { data: tags };
|
|
95
|
-
// });
|
|
96
|
-
// };
|
|
97
|
-
// WordCloud.props = {
|
|
98
|
-
// category: 'preprocessor',
|
|
99
|
-
// };
|
|
7
|
+
export {};
|
|
100
8
|
//# sourceMappingURL=wordCloud.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wordCloud.js","sourceRoot":"src/","sources":["data/wordCloud.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yDAAyD;AACzD,gDAAgD;AAChD,0DAA0D;AAC1D,kDAAkD;AAClD,qDAAqD
|
|
1
|
+
{"version":3,"file":"wordCloud.js","sourceRoot":"src/","sources":["data/wordCloud.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yDAAyD;AACzD,gDAAgD;AAChD,0DAA0D;AAC1D,kDAAkD;AAClD,qDAAqD"}
|
package/esm/encode/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export { Constant
|
|
2
|
-
export { Transform
|
|
3
|
-
export { Field
|
|
4
|
-
export { Column
|
|
1
|
+
export { Constant } from './constant';
|
|
2
|
+
export { Transform } from './transform';
|
|
3
|
+
export { Field } from './field';
|
|
4
|
+
export { Column } from './column';
|
|
5
|
+
export type { ConstantOptions } from './constant';
|
|
6
|
+
export type { TransformOptions } from './transform';
|
|
7
|
+
export type { FieldOptions } from './field';
|
|
8
|
+
export type { ColumnOptions } from './column';
|
package/esm/encode/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["encode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["encode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,23 +1,44 @@
|
|
|
1
|
-
export { SurfacePointSelection
|
|
2
|
-
export { TriggerInfoSelection
|
|
3
|
-
export { ElementSelection
|
|
4
|
-
export { LegendItemSelection
|
|
5
|
-
export { RecordState
|
|
6
|
-
export { RecordPoint
|
|
7
|
-
export { RecordCurrentPoint
|
|
8
|
-
export { RecordRegion
|
|
9
|
-
export { ActiveElement
|
|
10
|
-
export { HighlightElement
|
|
11
|
-
export { Tooltip
|
|
12
|
-
export { Plot
|
|
13
|
-
export { Filter
|
|
14
|
-
export { FilterElement
|
|
15
|
-
export { SetItemState
|
|
16
|
-
export { FisheyeFocus
|
|
17
|
-
export { Cursor
|
|
18
|
-
export { Mask
|
|
19
|
-
export { Button
|
|
20
|
-
export { Move
|
|
21
|
-
export { ActiveRegion
|
|
1
|
+
export { SurfacePointSelection } from './service/surfacePointSelection';
|
|
2
|
+
export { TriggerInfoSelection } from './service/triggerInfoSelection';
|
|
3
|
+
export { ElementSelection } from './service/elementSelection';
|
|
4
|
+
export { LegendItemSelection } from './service/legendItemSelection';
|
|
5
|
+
export { RecordState } from './service/recordState';
|
|
6
|
+
export { RecordPoint } from './service/recordPoint';
|
|
7
|
+
export { RecordCurrentPoint } from './service/recordCurrentPoint';
|
|
8
|
+
export { RecordRegion } from './service/recordRegion';
|
|
9
|
+
export { ActiveElement } from './transformer/activeElement';
|
|
10
|
+
export { HighlightElement } from './transformer/highlightElement';
|
|
11
|
+
export { Tooltip } from './transformer/tooltip';
|
|
12
|
+
export { Plot } from './transformer/plot';
|
|
13
|
+
export { Filter } from './transformer/filter';
|
|
14
|
+
export { FilterElement } from './transformer/filterElement';
|
|
15
|
+
export { SetItemState } from './transformer/setItemState';
|
|
16
|
+
export { FisheyeFocus } from './service/fisheyeFocus';
|
|
17
|
+
export { Cursor } from './transformer/cursor';
|
|
18
|
+
export { Mask } from './transformer/mask';
|
|
19
|
+
export { Button } from './transformer/button';
|
|
20
|
+
export { Move } from './transformer/move';
|
|
21
|
+
export { ActiveRegion } from './transformer/activeRegion';
|
|
22
22
|
export { RecordTip } from './service/recordTip';
|
|
23
23
|
export { Poptip } from './transformer/poptip';
|
|
24
|
+
export type { SurfacePointSelectionOptions } from './service/surfacePointSelection';
|
|
25
|
+
export type { TriggerInfoSelectionOptions } from './service/triggerInfoSelection';
|
|
26
|
+
export type { ElementSelectionOptions } from './service/elementSelection';
|
|
27
|
+
export type { LegendItemSelectionOptions } from './service/legendItemSelection';
|
|
28
|
+
export type { RecordStateOptions } from './service/recordState';
|
|
29
|
+
export type { RecordPointOptions } from './service/recordPoint';
|
|
30
|
+
export type { RecordCurrentPointOptions } from './service/recordCurrentPoint';
|
|
31
|
+
export type { RecordRegionOptions } from './service/recordRegion';
|
|
32
|
+
export type { ActiveElementOptions } from './transformer/activeElement';
|
|
33
|
+
export type { HighlightOptions } from './transformer/highlightElement';
|
|
34
|
+
export type { TooltipOptions } from './transformer/tooltip';
|
|
35
|
+
export type { PlotOptions } from './transformer/plot';
|
|
36
|
+
export type { FilterOptions } from './transformer/filter';
|
|
37
|
+
export type { FilterElementOptions } from './transformer/filterElement';
|
|
38
|
+
export type { SetItemStateOptions } from './transformer/setItemState';
|
|
39
|
+
export type { FisheyeFocusOptions } from './service/fisheyeFocus';
|
|
40
|
+
export type { CursorOptions } from './transformer/cursor';
|
|
41
|
+
export type { MaskOptions } from './transformer/mask';
|
|
42
|
+
export type { ButtonOptions } from './transformer/button';
|
|
43
|
+
export type { MoveOptions } from './transformer/move';
|
|
44
|
+
export type { ActiveRegionOptions } from './transformer/activeRegion';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { SurfacePointSelection
|
|
2
|
-
export { TriggerInfoSelection
|
|
3
|
-
export { ElementSelection
|
|
4
|
-
export { LegendItemSelection
|
|
1
|
+
export { SurfacePointSelection } from './service/surfacePointSelection';
|
|
2
|
+
export { TriggerInfoSelection } from './service/triggerInfoSelection';
|
|
3
|
+
export { ElementSelection } from './service/elementSelection';
|
|
4
|
+
export { LegendItemSelection } from './service/legendItemSelection';
|
|
5
5
|
export { RecordState } from './service/recordState';
|
|
6
6
|
export { RecordPoint } from './service/recordPoint';
|
|
7
|
-
export { RecordCurrentPoint
|
|
7
|
+
export { RecordCurrentPoint } from './service/recordCurrentPoint';
|
|
8
8
|
export { RecordRegion } from './service/recordRegion';
|
|
9
|
-
export { ActiveElement
|
|
10
|
-
export { HighlightElement
|
|
9
|
+
export { ActiveElement } from './transformer/activeElement';
|
|
10
|
+
export { HighlightElement } from './transformer/highlightElement';
|
|
11
11
|
export { Tooltip } from './transformer/tooltip';
|
|
12
12
|
export { Plot } from './transformer/plot';
|
|
13
13
|
export { Filter } from './transformer/filter';
|
|
14
|
-
export { FilterElement
|
|
14
|
+
export { FilterElement } from './transformer/filterElement';
|
|
15
15
|
export { SetItemState } from './transformer/setItemState';
|
|
16
16
|
export { FisheyeFocus } from './service/fisheyeFocus';
|
|
17
17
|
export { Cursor } from './transformer/cursor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["interaction/action/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["interaction/action/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAi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/brushVisible';
|
|
16
16
|
export { ActiveRegion } from './builtin/activeRegion';
|
|
17
17
|
export { EllipsisText } from './builtin/ellipsisText';
|
|
18
|
-
export
|
|
18
|
+
export type { InteractionContext, ActionComponent, InteractionDescriptor, InteractionStep, InteractorOptions, ActionOptions, Action, InteractorAction, Interactor, G2Event, InteractionNamespaces, InteractorComponent, InteractionOptions, InteractionValue, } from './types';
|
package/esm/interaction/index.js
CHANGED
|
@@ -15,5 +15,4 @@ export { BrushHighlight } from './builtin/brushHighlight';
|
|
|
15
15
|
export { BrushVisible } from './builtin/brushVisible';
|
|
16
16
|
export { ActiveRegion } from './builtin/activeRegion';
|
|
17
17
|
export { EllipsisText } from './builtin/ellipsisText';
|
|
18
|
-
export * from './types';
|
|
19
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["interaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,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ousePosition
|
|
2
|
-
export { TouchPosition
|
|
1
|
+
export { MousePosition } from './mousePosition';
|
|
2
|
+
export { TouchPosition } from './touchPosition';
|
|
3
|
+
export type { MousePositionPotions } from './mousePosition';
|
|
4
|
+
export type { TouchPositionPotions } from './touchPosition';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["interaction/interactor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["interaction/interactor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
export { AnnotationText
|
|
2
|
-
export { LineY as AnnotationLineY
|
|
3
|
-
export { LineX as AnnotationLineX
|
|
4
|
-
export { Connector as AnnotationConnector
|
|
5
|
-
export { Range as AnnotationRange
|
|
6
|
-
export { RangeX as AnnotationRangeX
|
|
7
|
-
export { RangeY as AnnotationRangeY
|
|
1
|
+
export { AnnotationText } from './text';
|
|
2
|
+
export { LineY as AnnotationLineY } from './lineY';
|
|
3
|
+
export { LineX as AnnotationLineX } from './lineX';
|
|
4
|
+
export { Connector as AnnotationConnector } from './connector';
|
|
5
|
+
export { Range as AnnotationRange } from './range';
|
|
6
|
+
export { RangeX as AnnotationRangeX } from './rangeX';
|
|
7
|
+
export { RangeY as AnnotationRangeY } from './rangeY';
|
|
8
|
+
export type { AnnotationTextOptions } from './text';
|
|
9
|
+
export type { LineYOptions as AnnotationLineYOptions } from './lineY';
|
|
10
|
+
export type { LineXOptions as AnnotationLineXOptions } from './lineX';
|
|
11
|
+
export type { ConnectorOptions as AnnotationConnectorOptions } from './connector';
|
|
12
|
+
export type { RangeOptions as AnnotationRangeOptions } from './range';
|
|
13
|
+
export type { RangeXOptions as AnnotationRangeXOptions } from './rangeX';
|
|
14
|
+
export type { RangeYOptions as AnnotationRangeYOptions } from './rangeY';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { AnnotationText } from './text';
|
|
2
|
-
export { LineY as AnnotationLineY
|
|
3
|
-
export { LineX as AnnotationLineX
|
|
4
|
-
export { Connector as AnnotationConnector
|
|
5
|
-
export { Range as AnnotationRange
|
|
6
|
-
export { RangeX as AnnotationRangeX
|
|
7
|
-
export { RangeY as AnnotationRangeY
|
|
2
|
+
export { LineY as AnnotationLineY } from './lineY';
|
|
3
|
+
export { LineX as AnnotationLineX } from './lineX';
|
|
4
|
+
export { Connector as AnnotationConnector } from './connector';
|
|
5
|
+
export { Range as AnnotationRange } from './range';
|
|
6
|
+
export { RangeX as AnnotationRangeX } from './rangeX';
|
|
7
|
+
export { RangeY as AnnotationRangeY } from './rangeY';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["mark/annotation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["mark/annotation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,SAAS,IAAI,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MarkComponent as MC } from '../../runtime';
|
|
2
|
-
import {
|
|
3
|
-
export declare type
|
|
2
|
+
import { BoxGeometry } from '../../spec';
|
|
3
|
+
export declare type BoxOptions = Omit<BoxGeometry, 'type'>;
|
|
4
4
|
/**
|
|
5
|
-
* Convert value for each channel to
|
|
5
|
+
* Convert value for each channel to box shapes.
|
|
6
6
|
*
|
|
7
7
|
* p0 p2 p1
|
|
8
8
|
* ──────────┬──────────
|
|
@@ -31,4 +31,4 @@ export declare type SchemaOptions = Omit<SchemaGeometry, 'type'>;
|
|
|
31
31
|
* ───────────┴───────────
|
|
32
32
|
* p12 p11 p13
|
|
33
33
|
*/
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const Box: MC<BoxOptions>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { baseGeometryChannels, basePostInference, basePreInference, } from '../utils';
|
|
2
2
|
/**
|
|
3
|
-
* Convert value for each channel to
|
|
3
|
+
* Convert value for each channel to box shapes.
|
|
4
4
|
*
|
|
5
5
|
* p0 p2 p1
|
|
6
6
|
* ──────────┬──────────
|
|
@@ -29,7 +29,7 @@ import { baseGeometryChannels, basePostInference, basePreInference, } from '../u
|
|
|
29
29
|
* ───────────┴───────────
|
|
30
30
|
* p12 p11 p13
|
|
31
31
|
*/
|
|
32
|
-
export const
|
|
32
|
+
export const Box = () => {
|
|
33
33
|
return (index, scale, value, coordinate) => {
|
|
34
34
|
const { x: X, y: Y, y1: Y1, y2: Y2, y3: Y3, y4: Y4, series: S } = value;
|
|
35
35
|
// Calc width for each box.
|
|
@@ -70,7 +70,7 @@ export const Schema = () => {
|
|
|
70
70
|
return [index, P];
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
Box.props = {
|
|
74
74
|
defaultShape: 'box',
|
|
75
75
|
defaultLabelShape: 'label',
|
|
76
76
|
channels: [
|
|
@@ -87,4 +87,4 @@ Schema.props = {
|
|
|
87
87
|
],
|
|
88
88
|
shapes: ['box'],
|
|
89
89
|
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G,CAAC,EAAE,GAAG,CAAC;aACrB,CAAC;YAEF,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAc,CAAC;QACxD,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,GAAG,CAAC,KAAK,GAAG;IACV,YAAY,EAAE,KAAK;IACnB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;KAClC;IACD,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC;IACrC,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;IACD,MAAM,EAAE,CAAC,KAAK,CAAC;CAChB,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { baseGeometryChannels, basePostInference, basePreInference, } from '../utils';
|
|
2
2
|
export const Image = () => {
|
|
3
3
|
return (index, scale, value, coordinate) => {
|
|
4
|
+
var _a, _b;
|
|
4
5
|
const { x: X, y: Y } = value;
|
|
5
|
-
const { x } = scale;
|
|
6
|
+
const { x, y } = scale;
|
|
7
|
+
const xoffset = (((_a = x === null || x === void 0 ? void 0 : x.getBandWidth) === null || _a === void 0 ? void 0 : _a.call(x)) || 0) / 2;
|
|
8
|
+
const yoffset = (((_b = y === null || y === void 0 ? void 0 : y.getBandWidth) === null || _b === void 0 ? void 0 : _b.call(y)) || 0) / 2;
|
|
6
9
|
const P = Array.from(index, (i) => {
|
|
7
|
-
var _a;
|
|
8
10
|
const px = +X[i];
|
|
9
11
|
const py = +Y[i];
|
|
10
|
-
|
|
11
|
-
return [coordinate.map([px + xoffset / 2, py])];
|
|
12
|
+
return [coordinate.map([px + xoffset, py + yoffset])];
|
|
12
13
|
});
|
|
13
14
|
return [index, P];
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"src/","sources":["mark/geometry/image.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAIlB,MAAM,CAAC,MAAM,KAAK,GAAqB,GAAG,EAAE;IAC1C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"src/","sources":["mark/geometry/image.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAIlB,MAAM,CAAC,MAAM,KAAK,GAAqB,GAAG,EAAE;IAC1C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QAC7B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QACvB,MAAM,OAAO,GAAG,CAAC,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,YAAY,iDAAI,KAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,OAAO,GAAG,CAAC,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,YAAY,iDAAI,KAAI,CAAC,CAAC,GAAG,CAAC,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
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
1
|
+
export { Interval } from './interval';
|
|
2
|
+
export { Line } from './line';
|
|
3
|
+
export { Point } from './point';
|
|
4
|
+
export { Text } from './text';
|
|
5
|
+
export { Grid } from './grid';
|
|
6
|
+
export { Area } from './area';
|
|
7
|
+
export { Link } from './link';
|
|
8
|
+
export { Image } from './image';
|
|
9
|
+
export { Polygon } from './polygon';
|
|
10
|
+
export { Box } from './box';
|
|
11
|
+
export { Vector } from './vector';
|
|
12
|
+
export type { IntervalOptions } from './interval';
|
|
13
|
+
export type { LineOptions } from './line';
|
|
14
|
+
export type { PointOptions } from './point';
|
|
15
|
+
export type { TextOptions } from './text';
|
|
16
|
+
export type { GridOptions } from './grid';
|
|
17
|
+
export type { AreaOptions } from './area';
|
|
18
|
+
export type { LinkOptions } from './link';
|
|
19
|
+
export type { ImageOptions } from './image';
|
|
20
|
+
export type { PolygonOptions } from './polygon';
|
|
21
|
+
export type { BoxOptions } from './box';
|
|
22
|
+
export type { VectorOptions } from './vector';
|