@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
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smoothEdge.js","sourceRoot":"src/","sources":["shape/
|
|
1
|
+
{"version":3,"file":"smoothEdge.js","sourceRoot":"src/","sources":["shape/link/smoothEdge.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAK/C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAA0B,CAAC,OAAO,EAAE,EAAE;IAC3D,MAAW,KAAK,UAAK,OAAO,EAAtB,EAAY,CAAU,CAAC;IAC7B,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;QAC1C,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;QAC/B,MAAM,EAAE,KAAK,GAAG,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;QAClD,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC;QAE1B,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,aAAa,CAChB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EACvB,IAAI,CAAC,CAAC,CAAC,EACP,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EACvB,EAAE,CAAC,CAAC,CAAC,EACL,EAAE,CAAC,CAAC,CAAC,EACL,EAAE,CAAC,CAAC,CAAC,CACN,CAAC;QAEF,OAAO,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;aACtB,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;aAC3B,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;aACtB,KAAK,CAAC,WAAW,EAAE,SAAS,CAAC;aAC7B,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;aACvB,IAAI,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,KAAK,GAAG;IACjB,qBAAqB,EAAE,QAAQ;CAChC,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vhv.js","sourceRoot":"src/","sources":["shape/
|
|
1
|
+
{"version":3,"file":"vhv.js","sourceRoot":"src/","sources":["shape/link/vhv.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,wBAAwB,C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AC;aACvB,IAAI,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG;IACb,qBAAqB,EAAE,QAAQ;CAChC,CAAC"}
|
package/esm/spec/data.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { DataComponent } from '../runtime';
|
|
1
|
+
import { DataComponent, Vector2 } from '../runtime';
|
|
2
2
|
export declare type Data = FetchConnector | InlineConnector | any;
|
|
3
3
|
export declare type FetchConnector = {
|
|
4
4
|
type?: 'fetch';
|
|
5
5
|
value?: string;
|
|
6
6
|
format?: 'json' | 'csv';
|
|
7
|
-
callback?: (d: any) => any;
|
|
8
7
|
delimiter?: string;
|
|
8
|
+
/** Automatically infer the data to Javascript type */
|
|
9
|
+
autoType?: boolean;
|
|
9
10
|
transform?: DataTransform[];
|
|
10
11
|
};
|
|
11
12
|
export declare type InlineConnector = {
|
|
@@ -17,8 +18,8 @@ export declare type DataTransform = SortByTransform | PickTransform | RenameTran
|
|
|
17
18
|
export declare type DataTransformTypes = 'sortBy' | 'fetch' | 'filterBy' | 'pick' | 'fold' | 'connector' | DataComponent;
|
|
18
19
|
export declare type SortByTransform = {
|
|
19
20
|
type?: 'sortBy';
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
/** type: [field, order]; order: true => ascend, false => descend */
|
|
22
|
+
fields?: (string | [string, boolean?])[];
|
|
22
23
|
};
|
|
23
24
|
export declare type PickTransform = {
|
|
24
25
|
type?: 'pick';
|
|
@@ -36,19 +37,155 @@ export declare type SubsetTransform = {
|
|
|
36
37
|
};
|
|
37
38
|
export declare type FilterByTransform = {
|
|
38
39
|
type?: 'filterBy';
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* way1: [[field1, callback1], [field2, callback2], ...]
|
|
42
|
+
* way2: [field1, field2, field3, callback] All field filtered by the last callback.
|
|
43
|
+
*/
|
|
44
|
+
fields?: ([string, ((d: any) => boolean)?] | string)[];
|
|
41
45
|
};
|
|
42
46
|
export declare type FoldTransform = {
|
|
43
47
|
type?: 'fold';
|
|
44
48
|
fields?: string[];
|
|
45
49
|
as?: string[];
|
|
46
50
|
};
|
|
47
|
-
export declare type
|
|
48
|
-
type?: '
|
|
51
|
+
export declare type CustomDataTransform = {
|
|
52
|
+
type?: 'custom';
|
|
49
53
|
callback?: (d: any) => any;
|
|
50
54
|
};
|
|
51
55
|
export declare type CustomTransform = {
|
|
52
56
|
type?: DataComponent;
|
|
53
57
|
[key: string]: any;
|
|
54
58
|
};
|
|
59
|
+
export declare type SankeyTransform = {
|
|
60
|
+
type?: 'sankey';
|
|
61
|
+
nodeId?: (node: any) => string;
|
|
62
|
+
nodes?: (graph: any) => any;
|
|
63
|
+
links?: (graph: any) => any;
|
|
64
|
+
/**
|
|
65
|
+
* sankey.nodeSort(undefined) is the default and resorts by ascending breadth during each iteration.
|
|
66
|
+
* sankey.nodeSort(null) specifies the input order of nodes and never sorts.
|
|
67
|
+
* sankey.nodeSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
68
|
+
*/
|
|
69
|
+
nodeSort?: null | undefined | ((a: any, b: any) => number);
|
|
70
|
+
/**
|
|
71
|
+
* sankey.linkSort(undefined) is the default, indicating that vertical order of links within each node will be determined automatically by the layout. If
|
|
72
|
+
* sankey.linkSort(null) will resort by the input.
|
|
73
|
+
* sankey.linkSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
74
|
+
*/
|
|
75
|
+
linkSort?: null | undefined | ((a: any, b: any) => number);
|
|
76
|
+
nodeAlign?: 'left' | 'center' | 'right' | 'justify' | ((node: any, n: number) => number);
|
|
77
|
+
nodeWidth?: number;
|
|
78
|
+
nodePadding?: number;
|
|
79
|
+
iterations?: number;
|
|
80
|
+
nodeDepth?: (datum: any, maxDepth: number) => number;
|
|
81
|
+
};
|
|
82
|
+
export declare type WordCloudTransform = {
|
|
83
|
+
type?: 'wordCloud';
|
|
84
|
+
/**
|
|
85
|
+
* @description If specified, sets the rectangular [width, height] of the layout
|
|
86
|
+
* @default [1, 1]
|
|
87
|
+
*/
|
|
88
|
+
size?: [number, number];
|
|
89
|
+
font?: string | ((word: any) => string);
|
|
90
|
+
fontStyle?: string | ((word: any) => string);
|
|
91
|
+
fontWeight?: any | ((word: any) => any);
|
|
92
|
+
fontSize?: number | [number, number] | ((word: any) => number);
|
|
93
|
+
padding?: number | ((word: any) => number);
|
|
94
|
+
/**
|
|
95
|
+
* @description sets the text accessor function, which indicates the text for each word
|
|
96
|
+
* @default (d) => d.text
|
|
97
|
+
*/
|
|
98
|
+
text?: (word: any) => number;
|
|
99
|
+
rotate?: number | ((word: any) => number);
|
|
100
|
+
timeInterval?: number;
|
|
101
|
+
random?: number | (() => number);
|
|
102
|
+
/**
|
|
103
|
+
* @description sets the current type of spiral used for positioning words. This can either be one of the two built-in spirals, "archimedean" and "rectangular"
|
|
104
|
+
* @default "archimedean"
|
|
105
|
+
*/
|
|
106
|
+
spiral?: 'archimedean' | 'rectangular' | ((size: [number, number]) => (t: number) => number[]);
|
|
107
|
+
imageMask?: HTMLImageElement | string;
|
|
108
|
+
on?: ((type: 'end', details?: {
|
|
109
|
+
cloud: any;
|
|
110
|
+
words: any;
|
|
111
|
+
bounds: any;
|
|
112
|
+
}) => void) | ((type: 'word', details?: {
|
|
113
|
+
cloud: any;
|
|
114
|
+
word: any;
|
|
115
|
+
}) => void);
|
|
116
|
+
};
|
|
117
|
+
export declare type VoronoiTransform = {
|
|
118
|
+
type?: 'voronoi';
|
|
119
|
+
/**
|
|
120
|
+
* @description Sets the input fields from the data.
|
|
121
|
+
*/
|
|
122
|
+
fields: [string, string];
|
|
123
|
+
/**
|
|
124
|
+
* @description Sets the output fields into data.
|
|
125
|
+
*/
|
|
126
|
+
as: [string, string];
|
|
127
|
+
/**
|
|
128
|
+
* @description Sets region of canvas.
|
|
129
|
+
*/
|
|
130
|
+
extend: Vector2[];
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* For arc diagram(edge with weight) or chord diagram(with weight)
|
|
134
|
+
*/
|
|
135
|
+
export declare type ArcTransform = {
|
|
136
|
+
type?: 'arc';
|
|
137
|
+
/** Layout y position, default: 0 */
|
|
138
|
+
y?: number;
|
|
139
|
+
/** margin between nodes, [0, 1), default: 0.1 */
|
|
140
|
+
marginRatio?: number;
|
|
141
|
+
/** Thickness of node, default: 0.05 */
|
|
142
|
+
thickness?: number;
|
|
143
|
+
/** Whether calculate weight, default: false */
|
|
144
|
+
weight?: boolean;
|
|
145
|
+
/** Key of node, default: node.id */
|
|
146
|
+
id?: (node: any) => any;
|
|
147
|
+
/** Source key of edge, default: edge.source */
|
|
148
|
+
source?: (edge: any) => any;
|
|
149
|
+
/** Target key of edge, default: edge.target */
|
|
150
|
+
target?: (edge: any) => any;
|
|
151
|
+
/** Weight of source, default: edge.value || 1 */
|
|
152
|
+
sourceWeight?: (edge: any) => number;
|
|
153
|
+
/** Weight of target, default: edge.value || 1 */
|
|
154
|
+
targetWeight?: (edge: any) => number;
|
|
155
|
+
/** Sort method, default: null */
|
|
156
|
+
sortBy?: 'id' | 'weight' | 'frequency' | null | ((a: any, b: any) => number);
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Cluster layout options.
|
|
160
|
+
*/
|
|
161
|
+
export declare type ClusterTransform = {
|
|
162
|
+
type?: 'cluster';
|
|
163
|
+
/**
|
|
164
|
+
* Layout field. Default: 'value'.
|
|
165
|
+
*/
|
|
166
|
+
field?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Sets this cluster layout’s node size to the specified two-element array of numbers [width, height] and returns this cluster layout.
|
|
169
|
+
* Default: null.
|
|
170
|
+
*/
|
|
171
|
+
nodeSize?: any;
|
|
172
|
+
/**
|
|
173
|
+
* The separation accessor is used to separate neighboring leaves. Default: (a, b) => a.parent == b.parent ? 1 : 2;
|
|
174
|
+
*/
|
|
175
|
+
separation?: (a: any, b: any) => number;
|
|
176
|
+
/**
|
|
177
|
+
* Sort function by compare 2 nodes.
|
|
178
|
+
*/
|
|
179
|
+
sortBy?: (a: any, b: any) => number;
|
|
180
|
+
/**
|
|
181
|
+
* Layout infomation saved into fields. Default: ['x', 'y'].
|
|
182
|
+
*/
|
|
183
|
+
as?: [string, string];
|
|
184
|
+
};
|
|
185
|
+
export declare type TreeTransform = Omit<ClusterTransform, 'type'> & {
|
|
186
|
+
type?: 'tree';
|
|
187
|
+
};
|
|
188
|
+
export declare type MapTransform = {
|
|
189
|
+
type?: 'map';
|
|
190
|
+
callback?: (d: any) => any;
|
|
191
|
+
};
|
package/esm/spec/geometry.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { Animation } from './animate';
|
|
|
7
7
|
import { Interaction } from './interaction';
|
|
8
8
|
import { Theme } from './theme';
|
|
9
9
|
import { Data } from './data';
|
|
10
|
-
export declare type Geometry = IntervalGeometry | LineGeometry | PointGeometry | TextGeometry | GridGeometry | AreaGeometry | NodeGeometry | EdgeGeometry | ImageGeometry | PolygonGeometry |
|
|
11
|
-
export declare type GeometryTypes = 'interval' | 'line' | 'point' | 'text' | 'grid' | 'area' | 'node' | 'edge' | 'link' | 'image' | 'polygon' | '
|
|
10
|
+
export declare type Geometry = IntervalGeometry | LineGeometry | PointGeometry | TextGeometry | GridGeometry | AreaGeometry | NodeGeometry | EdgeGeometry | ImageGeometry | PolygonGeometry | BoxGeometry | VectorGeometry | AnnotationText | CustomComponent;
|
|
11
|
+
export declare type GeometryTypes = 'interval' | 'line' | 'point' | 'text' | 'grid' | 'area' | 'node' | 'edge' | 'link' | 'image' | 'polygon' | 'box' | 'vector' | 'annotation.text' | 'annotation.lineX' | 'annotation.lineY' | 'annotation.connector' | 'annotation.range' | 'annotation.rangeX' | 'annotation.rangeY' | MarkComponent;
|
|
12
12
|
export declare type ChannelTypes = 'x' | 'y' | 'color' | 'shape' | 'enterType' | 'enterEasing' | 'enterDuration' | 'enterDelay' | 'enter' | 'size' | 'tooltip' | 'title' | 'key' | 'groupKey' | 'label';
|
|
13
13
|
export declare type BaseGeometry<T extends GeometryTypes, C extends string = ChannelTypes> = {
|
|
14
14
|
type?: T | string;
|
|
@@ -29,6 +29,8 @@ export declare type BaseGeometry<T extends GeometryTypes, C extends string = Cha
|
|
|
29
29
|
adjust?: Adjust;
|
|
30
30
|
facet?: boolean;
|
|
31
31
|
frame?: boolean;
|
|
32
|
+
labels?: Record<string, any>[];
|
|
33
|
+
stack?: boolean;
|
|
32
34
|
animate?: {
|
|
33
35
|
enter?: Animation;
|
|
34
36
|
exit?: Animation;
|
|
@@ -56,6 +58,6 @@ export declare type EdgeGeometry = BaseGeometry<'edge', ChannelTypes>;
|
|
|
56
58
|
export declare type LinkGeometry = BaseGeometry<'link', ChannelTypes>;
|
|
57
59
|
export declare type ImageGeometry = BaseGeometry<'image', ChannelTypes | 'src'>;
|
|
58
60
|
export declare type PolygonGeometry = BaseGeometry<'polygon'>;
|
|
59
|
-
export declare type
|
|
61
|
+
export declare type BoxGeometry = BaseGeometry<'box'>;
|
|
60
62
|
export declare type VectorGeometry = BaseGeometry<'vector', ChannelTypes | 'rotate' | 'size'>;
|
|
61
63
|
export declare type CustomComponent = BaseGeometry<MarkComponent>;
|
package/esm/spec/transform.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { TransformComponent, Primitive } from '../runtime';
|
|
2
2
|
import { ChannelTypes } from './geometry';
|
|
3
|
-
export declare type Transform = StackYTransform | DodgeXTransform | NormalizeYTransform | StackEnterTransform | JitterTransform | JitterYTransform | SymmetryYTransform | SelectTransform | SelectXTransform | SelectYTransform | GroupXTransform;
|
|
4
|
-
export declare type
|
|
5
|
-
export declare type
|
|
3
|
+
export declare type Transform = StackYTransform | DodgeXTransform | NormalizeYTransform | StackEnterTransform | JitterTransform | JitterYTransform | SymmetryYTransform | SelectTransform | SelectXTransform | SelectYTransform | GroupXTransform | SortXTransform | FlexXTransform;
|
|
4
|
+
export declare type TransformTypes = 'dodgeX' | 'stackY' | 'normalizeY' | 'stackEnter' | 'jitter' | 'jitterY' | 'symmetryY' | 'select' | 'selectY' | 'selectX' | 'groupX' | 'sortX' | 'flexX' | TransformComponent;
|
|
5
|
+
export declare type TransformOrder = 'value' | 'sum' | 'series' | 'maxIndex' | string[] | null | ((data: Record<string, Primitive>) => Primitive);
|
|
6
6
|
export declare type DodgeXTransform = {
|
|
7
7
|
type?: 'dodgeX';
|
|
8
8
|
groupBy?: string | string[];
|
|
9
9
|
reverse?: boolean;
|
|
10
10
|
orderBy?: TransformOrder;
|
|
11
|
-
paddingInner?: number;
|
|
12
|
-
paddingOuter?: number;
|
|
13
11
|
padding?: number;
|
|
14
12
|
};
|
|
15
13
|
export declare type StackYTransform = {
|
|
@@ -18,12 +16,13 @@ export declare type StackYTransform = {
|
|
|
18
16
|
reverse?: boolean;
|
|
19
17
|
orderBy?: TransformOrder;
|
|
20
18
|
y?: 'y' | 'y1';
|
|
19
|
+
series?: boolean;
|
|
21
20
|
};
|
|
22
21
|
export declare type NormalizeYTransform = {
|
|
23
22
|
type?: 'normalizeY';
|
|
24
23
|
series?: boolean;
|
|
25
24
|
groupBy?: string | string[];
|
|
26
|
-
basis?: 'deviation' | 'first' | 'last' | 'max' | 'mean' | 'median' | 'min' | 'sum'
|
|
25
|
+
basis?: 'deviation' | 'first' | 'last' | 'max' | 'mean' | 'median' | 'min' | 'sum';
|
|
27
26
|
};
|
|
28
27
|
export declare type JitterTransform = {
|
|
29
28
|
type?: 'jitter';
|
|
@@ -59,11 +58,22 @@ export declare type SelectYTransform = {
|
|
|
59
58
|
groupBy?: string | string[];
|
|
60
59
|
selector?: Selector;
|
|
61
60
|
};
|
|
61
|
+
export declare type SortXTransform = {
|
|
62
|
+
type?: 'sortX';
|
|
63
|
+
reverse?: boolean;
|
|
64
|
+
channel?: string;
|
|
65
|
+
slice?: number | [number, number];
|
|
66
|
+
reducer?: 'max' | 'min' | 'sum' | 'first' | 'last' | ((I: number[], V: Primitive[]) => Primitive);
|
|
67
|
+
};
|
|
68
|
+
export declare type FlexXTransform = {
|
|
69
|
+
type?: 'flexX';
|
|
70
|
+
field?: string | ((d: any) => Primitive[]);
|
|
71
|
+
channel?: string;
|
|
72
|
+
reducer?: 'sum' | ((I: number[], V: Primitive[]) => Primitive);
|
|
73
|
+
};
|
|
62
74
|
export declare type Reducer = 'mean' | 'max' | 'count' | 'min' | 'median' | 'sum' | 'first' | 'last' | ((I: number[], V: Primitive[]) => Primitive);
|
|
63
75
|
export declare type GroupXTransform = {
|
|
64
76
|
type?: 'groupX';
|
|
65
|
-
orderBy?: ChannelTypes;
|
|
66
|
-
reverse?: boolean;
|
|
67
77
|
} & {
|
|
68
78
|
[key in ChannelTypes]?: Reducer;
|
|
69
79
|
};
|
package/esm/spec/transform.js
CHANGED
|
@@ -1,135 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
// export type SankeyTransform = {
|
|
3
|
-
// type?: 'sankey';
|
|
4
|
-
// nodeId?: (node: any) => string;
|
|
5
|
-
// nodes?: (graph: any) => any;
|
|
6
|
-
// links?: (graph: any) => any;
|
|
7
|
-
// /**
|
|
8
|
-
// * sankey.nodeSort(undefined) is the default and resorts by ascending breadth during each iteration.
|
|
9
|
-
// * sankey.nodeSort(null) specifies the input order of nodes and never sorts.
|
|
10
|
-
// * sankey.nodeSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
11
|
-
// */
|
|
12
|
-
// nodeSort?: null | undefined | ((a: any, b: any) => number);
|
|
13
|
-
// /**
|
|
14
|
-
// * sankey.linkSort(undefined) is the default, indicating that vertical order of links within each node will be determined automatically by the layout. If
|
|
15
|
-
// * sankey.linkSort(null) will resort by the input.
|
|
16
|
-
// * sankey.linkSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
17
|
-
// */
|
|
18
|
-
// linkSort?: null | undefined | ((a: any, b: any) => number);
|
|
19
|
-
// nodeAlign?:
|
|
20
|
-
// | 'left'
|
|
21
|
-
// | 'center'
|
|
22
|
-
// | 'right'
|
|
23
|
-
// | 'justify'
|
|
24
|
-
// | ((node: any, n: number) => number);
|
|
25
|
-
// nodeWidth?: number;
|
|
26
|
-
// nodePadding?: number;
|
|
27
|
-
// iterations?: number;
|
|
28
|
-
// // support config the depth of node
|
|
29
|
-
// nodeDepth?: (datum: any, maxDepth: number) => number;
|
|
30
|
-
// };
|
|
31
|
-
// export type WordCloudTransform = {
|
|
32
|
-
// type?: 'wordCloud';
|
|
33
|
-
// /**
|
|
34
|
-
// * @description If specified, sets the rectangular [width, height] of the layout
|
|
35
|
-
// * @default [1, 1]
|
|
36
|
-
// */
|
|
37
|
-
// size?: [number, number];
|
|
38
|
-
// font?: string | ((word: any) => string);
|
|
39
|
-
// fontStyle?: string | ((word: any) => string);
|
|
40
|
-
// fontWeight?: any | ((word: any) => any);
|
|
41
|
-
// fontSize?: number | [number, number] | ((word: any) => number);
|
|
42
|
-
// padding?: number | ((word: any) => number);
|
|
43
|
-
// /**
|
|
44
|
-
// * @description sets the text accessor function, which indicates the text for each word
|
|
45
|
-
// * @default (d) => d.text
|
|
46
|
-
// */
|
|
47
|
-
// text?: (word: any) => number;
|
|
48
|
-
// rotate?: number | ((word: any) => number);
|
|
49
|
-
// timeInterval?: number;
|
|
50
|
-
// random?: number | (() => number);
|
|
51
|
-
// /**
|
|
52
|
-
// * @description sets the current type of spiral used for positioning words. This can either be one of the two built-in spirals, "archimedean" and "rectangular"
|
|
53
|
-
// * @default "archimedean"
|
|
54
|
-
// */
|
|
55
|
-
// spiral?:
|
|
56
|
-
// | 'archimedean'
|
|
57
|
-
// | 'rectangular'
|
|
58
|
-
// | ((size: [number, number]) => (t: number) => number[]);
|
|
59
|
-
// imageMask?: HTMLImageElement | string;
|
|
60
|
-
// on?:
|
|
61
|
-
// | ((type: 'end', details?: { cloud; words; bounds }) => void)
|
|
62
|
-
// | ((type: 'word', details?: { cloud; word }) => void);
|
|
63
|
-
// };
|
|
64
|
-
// export type VoronoiTransform = {
|
|
65
|
-
// type?: 'voronoi';
|
|
66
|
-
// /**
|
|
67
|
-
// * @description Sets the input fields from the data.
|
|
68
|
-
// */
|
|
69
|
-
// fields: [string, string];
|
|
70
|
-
// /**
|
|
71
|
-
// * @description Sets the output fields into data.
|
|
72
|
-
// */
|
|
73
|
-
// as: [string, string];
|
|
74
|
-
// /**
|
|
75
|
-
// * @description Sets region of canvas.
|
|
76
|
-
// */
|
|
77
|
-
// extend: Vector2[];
|
|
78
|
-
// };
|
|
79
|
-
// /**
|
|
80
|
-
// * For arc diagram(edge with weight) or chord diagram(with weight)
|
|
81
|
-
// */
|
|
82
|
-
// export type ArcTransform = {
|
|
83
|
-
// type?: 'arc';
|
|
84
|
-
// /** Layout y position, default: 0 */
|
|
85
|
-
// y?: number;
|
|
86
|
-
// /** margin between nodes, [0, 1), default: 0.1 */
|
|
87
|
-
// marginRatio?: number;
|
|
88
|
-
// /** Thickness of node, default: 0.05 */
|
|
89
|
-
// thickness?: number;
|
|
90
|
-
// /** Whether calculate weight, default: false */
|
|
91
|
-
// weight?: boolean;
|
|
92
|
-
// /** Key of node, default: node.id */
|
|
93
|
-
// id?: (node: any) => any;
|
|
94
|
-
// /** Source key of edge, default: edge.source */
|
|
95
|
-
// source?: (edge: any) => any;
|
|
96
|
-
// /** Target key of edge, default: edge.target */
|
|
97
|
-
// target?: (edge: any) => any;
|
|
98
|
-
// /** Weight of source, default: edge.value || 1 */
|
|
99
|
-
// sourceWeight?: (edge: any) => number;
|
|
100
|
-
// /** Weight of target, default: edge.value || 1 */
|
|
101
|
-
// targetWeight?: (edge: any) => number;
|
|
102
|
-
// /** Sort method, default: null */
|
|
103
|
-
// sortBy?: 'id' | 'weight' | 'frequency' | null | ((a: any, b: any) => number);
|
|
104
|
-
// };
|
|
105
|
-
// /**
|
|
106
|
-
// * Cluster layout options.
|
|
107
|
-
// */
|
|
108
|
-
// export type ClusterTransform = {
|
|
109
|
-
// type?: 'cluster';
|
|
110
|
-
// /**
|
|
111
|
-
// * Layout field. Default: 'value'.
|
|
112
|
-
// */
|
|
113
|
-
// field?: string;
|
|
114
|
-
// /**
|
|
115
|
-
// * Sets this cluster layout’s node size to the specified two-element array of numbers [width, height] and returns this cluster layout.
|
|
116
|
-
// * Default: null.
|
|
117
|
-
// */
|
|
118
|
-
// nodeSize?: any;
|
|
119
|
-
// /**
|
|
120
|
-
// * The separation accessor is used to separate neighboring leaves. Default: (a, b) => a.parent == b.parent ? 1 : 2;
|
|
121
|
-
// */
|
|
122
|
-
// separation?: (a, b) => number;
|
|
123
|
-
// /**
|
|
124
|
-
// * Sort function by compare 2 nodes.
|
|
125
|
-
// */
|
|
126
|
-
// sortBy?: (a, b) => number;
|
|
127
|
-
// /**
|
|
128
|
-
// * Layout infomation saved into fields. Default: ['x', 'y'].
|
|
129
|
-
// */
|
|
130
|
-
// as?: [string, string];
|
|
131
|
-
// };
|
|
132
|
-
// export type TreeTransform = Omit<ClusterTransform, 'type'> & {
|
|
133
|
-
// type?: 'tree';
|
|
134
|
-
// };
|
|
135
2
|
//# sourceMappingURL=transform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"src/","sources":["spec/transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"src/","sources":["spec/transform.ts"],"names":[],"mappings":""}
|
package/esm/stdlib/index.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { Canvas } from '../renderer';
|
|
2
1
|
import { Cartesian, Polar, Helix, Transpose, Theta, Parallel, Fisheye, FisheyeX, FisheyeY, Reflect, ReflectX, ReflectY, } from '../coordinate';
|
|
3
2
|
import { Constant, Field, Transform, Column } from '../encode';
|
|
4
|
-
import { Grid, Interval, Line, Point as PointGeometry, Text as TextGeometry, Area as AreaGeometry,
|
|
3
|
+
import { Grid, Interval, Line, Point as PointGeometry, Text as TextGeometry, Area as AreaGeometry, Image as ImageGeometry, Polygon as PolygonGeometry, Box as BoxGeometry, Vector as VectorGeometry, Link as LinkGeometry, } from '../mark/geometry';
|
|
5
4
|
import { AnnotationText, AnnotationLineX, AnnotationLineY, AnnotationConnector, AnnotationRange, AnnotationRangeX, AnnotationRangeY, } from '../mark/annotation';
|
|
6
5
|
import { Category10, Category20 } from '../palette';
|
|
7
6
|
import { Linear, Ordinal, Band, Identity, Point, Time, Log, Pow, Threshold, Quantile, Quantize, } from '../scale';
|
|
8
|
-
import { Rect as RectShape, HollowRect, Line as LineShape, HV, VH, HVH, Smooth, Bowtie, Cross, Diamond, Hexagon, HollowBowtie, HollowDiamond, HollowHexagon, HollowPoint, HollowSquare, HollowTriangle, HollowTriangleDown, Hyphen, LinePoint, Plus, Point as PointShape, Square, Tick, Triangle, TriangleDown, Text, AnnotationText as AnnotationTextShape, AnnotationBadge, AnnotationLine as AnnotationLineShape, AnnotationConnector as AnnotationConnectorShape, Area, SmoothArea,
|
|
7
|
+
import { Rect as RectShape, HollowRect, Line as LineShape, HV, VH, HVH, Smooth, Bowtie, Cross, Diamond, Hexagon, HollowBowtie, HollowDiamond, HollowHexagon, HollowPoint, HollowSquare, HollowTriangle, HollowTriangleDown, Hyphen, LinePoint, Plus, Point as PointShape, Square, Tick, Triangle, TriangleDown, Text, AnnotationText as AnnotationTextShape, AnnotationBadge, AnnotationLine as AnnotationLineShape, AnnotationConnector as AnnotationConnectorShape, Area, SmoothArea, SmoothEdge, VHVEdge, Arc, Image, Polygon, Ribbon, Box, Funnel, Pyramid, Vector, Link, Label, } from '../shape';
|
|
9
8
|
import { Light } from '../theme';
|
|
10
9
|
import { AxisX, AxisY, LegendCategory, LegendContinuous, TitleComponent, } from '../component';
|
|
11
10
|
import { ScaleInX, ScaleOutX, ScaleInY, ScaleOutY, FadeIn, FadeOut, Morphing, } from '../animation';
|
|
12
11
|
import { ElementActive, ElementSelected, Tooltip, Fisheye as FisheyeInteraction, ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementListHighlight, LegendActive, LegendHighlight, Brush, BrushHighlight, BrushVisible, ActiveRegion, EllipsisText, } from '../interaction';
|
|
13
12
|
import { Layer, Flex, Mark, View, Rect, Matrix, Circle, Keyframe, } from '../composition';
|
|
14
13
|
import { Pack } from '../adjust';
|
|
15
|
-
import { MaybeTitleX, MaybeTooltipY, MaybeZeroX, MaybeZeroY1, MaybeStackY, MaybeSeries, MaybeTooltipPosition, MaybeZeroY, MaybeSize, MaybeKey, StackY, DodgeX, StackEnter, NormalizeY, Jitter, JitterY, SymmetryY, Select, SelectX, SelectY, GroupX, } from '../transform';
|
|
16
|
-
import { Fetch, SortBy, FilterBy, Pick, Rename, Subset, Fold, Inline,
|
|
14
|
+
import { MaybeTitleX, MaybeTooltipY, MaybeZeroX, MaybeZeroY1, MaybeStackY, MaybeSeries, MaybeTooltipPosition, MaybeZeroY, MaybeSize, MaybeKey, StackY, DodgeX, StackEnter, NormalizeY, Jitter, JitterY, SymmetryY, Select, SelectX, SelectY, GroupX, SortX, FlexX, } from '../transform';
|
|
15
|
+
import { Fetch, SortBy, FilterBy, Map, Pick, Rename, Subset, Fold, Inline, Custom, Cluster, Tree, Sankey, Arc as ArcTransform, } from '../data';
|
|
17
16
|
import { HideOverlap } from '../labelLayout/hideOverlap';
|
|
18
17
|
export function createLibrary() {
|
|
19
18
|
return {
|
|
@@ -25,13 +24,14 @@ export function createLibrary() {
|
|
|
25
24
|
'data.rename': Rename,
|
|
26
25
|
'data.subset': Subset,
|
|
27
26
|
'data.fold': Fold,
|
|
28
|
-
'data.
|
|
27
|
+
'data.custom': Custom,
|
|
28
|
+
'data.map': Map,
|
|
29
|
+
'data.cluster': Cluster,
|
|
30
|
+
'data.tree': Tree,
|
|
31
|
+
'data.sankey': Sankey,
|
|
32
|
+
'data.arc': ArcTransform,
|
|
29
33
|
// 'transform.wordCloud': WordCloud,
|
|
30
34
|
// 'transform.voronoi': Voronoi,
|
|
31
|
-
// 'transform.sankey': Sankey,
|
|
32
|
-
// 'transform.arc': ArcTransform,
|
|
33
|
-
// 'transform.cluster': ClusterTransform,
|
|
34
|
-
// 'transform.tree': TreeTransform,
|
|
35
35
|
// 'transform.connector': Connector,
|
|
36
36
|
'transform.maybeZeroY1': MaybeZeroY1,
|
|
37
37
|
'transform.maybeZeroX': MaybeZeroX,
|
|
@@ -54,7 +54,8 @@ export function createLibrary() {
|
|
|
54
54
|
'transform.maybeSize': MaybeSize,
|
|
55
55
|
'transform.maybeZeroY': MaybeZeroY,
|
|
56
56
|
'transform.maybeKey': MaybeKey,
|
|
57
|
-
'
|
|
57
|
+
'transform.sortX': SortX,
|
|
58
|
+
'transform.flexX': FlexX,
|
|
58
59
|
'coordinate.cartesian': Cartesian,
|
|
59
60
|
'coordinate.polar': Polar,
|
|
60
61
|
'coordinate.helix': Helix,
|
|
@@ -78,11 +79,9 @@ export function createLibrary() {
|
|
|
78
79
|
'mark.grid': Grid,
|
|
79
80
|
'mark.area': AreaGeometry,
|
|
80
81
|
'mark.link': LinkGeometry,
|
|
81
|
-
'mark.node': NodeGeometry,
|
|
82
|
-
'mark.edge': EdgeGeometry,
|
|
83
82
|
'mark.image': ImageGeometry,
|
|
84
83
|
'mark.polygon': PolygonGeometry,
|
|
85
|
-
'mark.
|
|
84
|
+
'mark.box': BoxGeometry,
|
|
86
85
|
'mark.vector': VectorGeometry,
|
|
87
86
|
'mark.annotation.text': AnnotationText,
|
|
88
87
|
'mark.annotation.lineX': AnnotationLineX,
|
|
@@ -135,13 +134,10 @@ export function createLibrary() {
|
|
|
135
134
|
'shape.text': Text,
|
|
136
135
|
'shape.area': Area,
|
|
137
136
|
'shape.smoothArea': SmoothArea,
|
|
138
|
-
'shape.edge': Edge,
|
|
139
137
|
'shape.smoothEdge': SmoothEdge,
|
|
140
138
|
'shape.vhvEdge': VHVEdge,
|
|
141
139
|
'shape.arc': Arc,
|
|
142
140
|
'shape.link': Link,
|
|
143
|
-
'shape.pointNode': PointNode,
|
|
144
|
-
'shape.polygonNode': PolygonNode,
|
|
145
141
|
'shape.image': Image,
|
|
146
142
|
'shape.polygon': Polygon,
|
|
147
143
|
'shape.ribbon': Ribbon,
|
package/esm/stdlib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["stdlib/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["stdlib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,IAAI,aAAa,EACtB,IAAI,IAAI,YAAY,EACpB,IAAI,IAAI,YAAY,EACpB,KAAK,IAAI,aAAa,EACtB,OAAO,IAAI,eAAe,EAC1B,GAAG,IAAI,WAAW,EAClB,MAAM,IAAI,cAAc,EACxB,IAAI,IAAI,YAAY,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,IAAI,IAAI,SAAS,EACjB,UAAU,EACV,IAAI,IAAI,SAAS,EACjB,EAAE,EACF,EAAE,EACF,GAAG,EACH,MAAM,EACN,MAAM,EACN,KAAK,EACL,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ACnB,yBAAyB,EAAE,WAAW;KACvC,CAAC;AACJ,CAAC"}
|
package/esm/transform/dodgeX.js
CHANGED
|
@@ -18,7 +18,7 @@ import { createGroups, normalizeComparator, applyOrder, domainOf, } from './util
|
|
|
18
18
|
* say to form horizontal "columns" by specified channels.
|
|
19
19
|
*/
|
|
20
20
|
export const DodgeX = (options = {}) => {
|
|
21
|
-
const { groupBy = 'x', reverse = false, orderBy } = options, rest = __rest(options, ["groupBy", "reverse", "orderBy"]);
|
|
21
|
+
const { groupBy = 'x', reverse = false, orderBy, padding } = options, rest = __rest(options, ["groupBy", "reverse", "orderBy", "padding"]);
|
|
22
22
|
return (I, mark) => {
|
|
23
23
|
const { data, encode, scale } = mark;
|
|
24
24
|
const { series: scaleSeries } = scale;
|
|
@@ -40,11 +40,15 @@ export const DodgeX = (options = {}) => {
|
|
|
40
40
|
newS[G[i]] = domainSeries[i];
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
// console.log(newS, S);
|
|
44
43
|
return [
|
|
45
44
|
I,
|
|
46
45
|
deepMix({}, mark, {
|
|
47
|
-
scale:
|
|
46
|
+
scale: {
|
|
47
|
+
series: {
|
|
48
|
+
domain: domainSeries,
|
|
49
|
+
paddingInner: padding,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
48
52
|
encode: {
|
|
49
53
|
series: column(newS),
|
|
50
54
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dodgeX.js","sourceRoot":"src/","sources":["transform/dodgeX.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,QAAQ,GACT,MAAM,eAAe,CAAC;AAIvB;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAsB,CAAC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,CAAC,OAAO,CAAC,CAAC;QACtD,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAChD,IAAI,UAAU;YAAE,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAE/C,wDAAwD;QACxD,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACjC,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;YACtB,IAAI,OAAO;gBAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACjC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;aAC9B;SACF;QAED,OAAO;YACL,CAAC;YACD,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE;gBAChB,KAAK,EAAE;oBACL,MAAM,EAAE;wBACN,MAAM,EAAE,YAAY;wBACpB,YAAY,EAAE,OAAO;qBACtB;iBACF;gBACD,MAAM,EAAE;oBACN,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;iBACrB;aACF,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformComponent as TC } from '../runtime';
|
|
2
|
+
import { FlexXTransform } from '../spec';
|
|
3
|
+
export declare type FlexXOptions = Omit<FlexXTransform, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Produce flex options from data for x scale.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FlexX: TC<FlexXOptions>;
|