@antv/g2 5.0.18 → 5.0.19
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 +3 -3
- package/dist/g2.min.js +3 -3
- package/esm/api/chart.d.ts +1017 -85
- package/esm/api/chart.js +3 -259
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition.d.ts +37 -0
- package/esm/api/{composition/base.js → composition.js} +17 -5
- package/esm/api/composition.js.map +1 -0
- package/esm/api/define.d.ts +14 -0
- package/esm/api/define.js +92 -0
- package/esm/api/define.js.map +1 -0
- package/esm/api/extend.d.ts +9 -0
- package/esm/api/extend.js +9 -0
- package/esm/api/extend.js.map +1 -0
- package/esm/api/index.d.ts +2 -0
- package/esm/api/index.js +2 -0
- package/esm/api/index.js.map +1 -1
- package/esm/api/library.d.ts +170 -1
- package/esm/api/library.js +2 -2
- package/esm/api/library.js.map +1 -1
- package/esm/api/mark.d.ts +29 -0
- package/esm/api/{mark/base.js → mark.js} +16 -4
- package/esm/api/mark.js.map +1 -0
- package/esm/api/node.d.ts +2 -2
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.d.ts +170 -12
- package/esm/api/props.js +21 -102
- package/esm/api/props.js.map +1 -1
- package/esm/api/runtime.d.ts +66 -0
- package/esm/api/runtime.js +294 -0
- package/esm/api/runtime.js.map +1 -0
- package/esm/api/types.d.ts +60 -5
- package/esm/api/utils.d.ts +1 -1
- package/esm/api/utils.js +11 -13
- package/esm/api/utils.js.map +1 -1
- package/esm/component/axis.js +7 -4
- package/esm/component/axis.js.map +1 -1
- package/esm/component/legendCategory.js +4 -5
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/composition/d3Projection.js.map +1 -0
- package/esm/composition/geoPath.js.map +1 -0
- package/esm/{geo → composition}/geoView.js +1 -1
- package/esm/composition/geoView.js.map +1 -0
- package/esm/composition/index.d.ts +2 -0
- package/esm/composition/index.js +2 -0
- package/esm/composition/index.js.map +1 -1
- package/esm/index.d.ts +4 -3
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/label-transform/overlapDodgeY.js.map +1 -1
- package/esm/lib/core.d.ts +158 -0
- package/esm/lib/core.js +174 -0
- package/esm/lib/core.js.map +1 -0
- package/esm/lib/geo.d.ts +4 -0
- package/esm/lib/geo.js +9 -0
- package/esm/lib/geo.js.map +1 -0
- package/esm/lib/graph.d.ts +4 -0
- package/esm/lib/graph.js +8 -0
- package/esm/lib/graph.js.map +1 -0
- package/esm/lib/index.d.ts +6 -0
- package/esm/lib/index.js +7 -0
- package/esm/lib/index.js.map +1 -0
- package/esm/lib/lite.d.ts +64 -0
- package/esm/lib/lite.js +78 -0
- package/esm/lib/lite.js.map +1 -0
- package/esm/lib/plot.d.ts +11 -0
- package/esm/lib/plot.js +16 -0
- package/esm/lib/plot.js.map +1 -0
- package/esm/lib/std.d.ts +170 -0
- package/esm/lib/std.js +8 -0
- package/esm/lib/std.js.map +1 -0
- package/esm/mark/area.js +14 -5
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/box.js +9 -2
- package/esm/mark/box.js.map +1 -1
- package/esm/mark/cell.js +11 -5
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/connector.js +6 -2
- package/esm/mark/connector.js.map +1 -1
- package/esm/mark/density.js +10 -7
- package/esm/mark/density.js.map +1 -1
- package/esm/mark/forceGraph.js +0 -3
- package/esm/mark/forceGraph.js.map +1 -1
- package/esm/mark/heatmap.js +9 -4
- package/esm/mark/heatmap.js.map +1 -1
- package/esm/mark/image.js +9 -4
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/interval.js +13 -7
- package/esm/mark/interval.js.map +1 -1
- package/esm/mark/line.js +15 -4
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/lineX.js +8 -3
- package/esm/mark/lineX.js.map +1 -1
- package/esm/mark/lineY.js +8 -3
- package/esm/mark/lineY.js.map +1 -1
- package/esm/mark/link.js +12 -4
- package/esm/mark/link.js.map +1 -1
- package/esm/mark/path.js +7 -2
- package/esm/mark/path.js.map +1 -1
- package/esm/mark/point.js +28 -29
- package/esm/mark/point.js.map +1 -1
- package/esm/mark/polygon.js +7 -2
- package/esm/mark/polygon.js.map +1 -1
- package/esm/mark/range.js +4 -2
- package/esm/mark/range.js.map +1 -1
- package/esm/mark/rangeX.js +6 -2
- package/esm/mark/rangeX.js.map +1 -1
- package/esm/mark/rangeY.js +6 -2
- package/esm/mark/rangeY.js.map +1 -1
- package/esm/mark/rect.js +9 -3
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/shape.js +9 -3
- package/esm/mark/shape.js.map +1 -1
- package/esm/mark/text.js +10 -4
- package/esm/mark/text.js.map +1 -1
- package/esm/mark/treemap.js.map +1 -1
- package/esm/mark/utils.d.ts +11 -8
- package/esm/mark/utils.js +8 -7
- package/esm/mark/utils.js.map +1 -1
- package/esm/mark/vector.js +6 -2
- package/esm/mark/vector.js.map +1 -1
- package/esm/runtime/index.d.ts +1 -1
- package/esm/runtime/index.js +1 -1
- package/esm/runtime/index.js.map +1 -1
- package/esm/runtime/plot.js +11 -7
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.js +3 -6
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/types/component.d.ts +1 -1
- package/esm/runtime/types/mark.d.ts +4 -0
- package/esm/runtime/types/options.d.ts +4 -1
- package/esm/shape/index.d.ts +106 -101
- package/esm/shape/index.js +58 -53
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/text/advance.js +3 -3
- package/esm/shape/text/advance.js.map +1 -1
- package/esm/spec/composition.d.ts +7 -0
- package/esm/spec/index.d.ts +1 -0
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/interaction.d.ts +2 -0
- package/esm/theme/academy.js +6 -6
- package/esm/theme/classic.js +6 -7
- package/esm/theme/classic.js.map +1 -1
- package/esm/theme/classicDark.js +6 -6
- package/esm/utils/coordinate.d.ts +2 -2
- package/esm/utils/scale.d.ts +1 -1
- package/esm/utils/scale.js +1 -1
- package/esm/utils/scale.js.map +1 -1
- package/lib/api/chart.d.ts +1017 -85
- package/lib/api/chart.js +4 -263
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition.d.ts +37 -0
- package/lib/api/{composition/base.js → composition.js} +16 -5
- package/lib/api/composition.js.map +1 -0
- package/lib/api/define.d.ts +14 -0
- package/lib/api/define.js +97 -0
- package/lib/api/define.js.map +1 -0
- package/lib/api/extend.d.ts +9 -0
- package/lib/api/extend.js +13 -0
- package/lib/api/extend.js.map +1 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +5 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/library.d.ts +170 -1
- package/lib/api/library.js +2 -2
- package/lib/api/library.js.map +1 -1
- package/lib/api/mark.d.ts +29 -0
- package/lib/api/{mark/base.js → mark.js} +15 -4
- package/lib/api/mark.js.map +1 -0
- package/lib/api/node.d.ts +2 -2
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.d.ts +170 -12
- package/lib/api/props.js +22 -106
- package/lib/api/props.js.map +1 -1
- package/lib/api/runtime.d.ts +66 -0
- package/lib/api/runtime.js +301 -0
- package/lib/api/runtime.js.map +1 -0
- package/lib/api/types.d.ts +60 -5
- package/lib/api/utils.d.ts +1 -1
- package/lib/api/utils.js +14 -16
- package/lib/api/utils.js.map +1 -1
- package/lib/component/axis.js +7 -4
- package/lib/component/axis.js.map +1 -1
- package/lib/component/legendCategory.js +4 -5
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/composition/d3Projection.js.map +1 -0
- package/lib/composition/geoPath.js.map +1 -0
- package/lib/{geo → composition}/geoView.js +1 -1
- package/lib/composition/geoView.js.map +1 -0
- package/lib/composition/index.d.ts +2 -0
- package/lib/composition/index.js +5 -1
- package/lib/composition/index.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +8 -3
- package/lib/index.js.map +1 -1
- package/lib/label-transform/overlapDodgeY.js.map +1 -1
- package/lib/lib/core.d.ts +158 -0
- package/lib/lib/core.js +178 -0
- package/lib/lib/core.js.map +1 -0
- package/lib/lib/geo.d.ts +4 -0
- package/lib/lib/geo.js +13 -0
- package/lib/lib/geo.js.map +1 -0
- package/lib/lib/graph.d.ts +4 -0
- package/lib/lib/graph.js +12 -0
- package/lib/lib/graph.js.map +1 -0
- package/lib/lib/index.d.ts +6 -0
- package/lib/lib/index.js +16 -0
- package/lib/lib/index.js.map +1 -0
- package/lib/lib/lite.d.ts +64 -0
- package/lib/lib/lite.js +82 -0
- package/lib/lib/lite.js.map +1 -0
- package/lib/lib/plot.d.ts +11 -0
- package/lib/lib/plot.js +20 -0
- package/lib/lib/plot.js.map +1 -0
- package/lib/lib/std.d.ts +170 -0
- package/lib/lib/std.js +12 -0
- package/lib/lib/std.js.map +1 -0
- package/lib/mark/area.js +14 -5
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/box.js +9 -2
- package/lib/mark/box.js.map +1 -1
- package/lib/mark/cell.js +11 -5
- package/lib/mark/cell.js.map +1 -1
- package/lib/mark/connector.js +6 -2
- package/lib/mark/connector.js.map +1 -1
- package/lib/mark/density.js +10 -7
- package/lib/mark/density.js.map +1 -1
- package/lib/mark/forceGraph.js +0 -3
- package/lib/mark/forceGraph.js.map +1 -1
- package/lib/mark/heatmap.js +9 -4
- package/lib/mark/heatmap.js.map +1 -1
- package/lib/mark/image.js +9 -4
- package/lib/mark/image.js.map +1 -1
- package/lib/mark/interval.js +13 -7
- package/lib/mark/interval.js.map +1 -1
- package/lib/mark/line.js +15 -4
- package/lib/mark/line.js.map +1 -1
- package/lib/mark/lineX.js +8 -3
- package/lib/mark/lineX.js.map +1 -1
- package/lib/mark/lineY.js +8 -3
- package/lib/mark/lineY.js.map +1 -1
- package/lib/mark/link.js +12 -4
- package/lib/mark/link.js.map +1 -1
- package/lib/mark/path.js +7 -2
- package/lib/mark/path.js.map +1 -1
- package/lib/mark/point.js +28 -29
- package/lib/mark/point.js.map +1 -1
- package/lib/mark/polygon.js +7 -2
- package/lib/mark/polygon.js.map +1 -1
- package/lib/mark/range.js +4 -2
- package/lib/mark/range.js.map +1 -1
- package/lib/mark/rangeX.js +6 -2
- package/lib/mark/rangeX.js.map +1 -1
- package/lib/mark/rangeY.js +6 -2
- package/lib/mark/rangeY.js.map +1 -1
- package/lib/mark/rect.js +9 -3
- package/lib/mark/rect.js.map +1 -1
- package/lib/mark/shape.js +9 -3
- package/lib/mark/shape.js.map +1 -1
- package/lib/mark/text.js +10 -4
- package/lib/mark/text.js.map +1 -1
- package/lib/mark/treemap.js.map +1 -1
- package/lib/mark/utils.d.ts +11 -8
- package/lib/mark/utils.js +8 -7
- package/lib/mark/utils.js.map +1 -1
- package/lib/mark/vector.js +6 -2
- package/lib/mark/vector.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -1
- package/lib/runtime/index.js +4 -4
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/plot.js +11 -7
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.js +3 -6
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/types/component.d.ts +1 -1
- package/lib/runtime/types/mark.d.ts +4 -0
- package/lib/runtime/types/options.d.ts +4 -1
- package/lib/shape/index.d.ts +106 -101
- package/lib/shape/index.js +71 -61
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/text/advance.js +3 -3
- package/lib/shape/text/advance.js.map +1 -1
- package/lib/spec/composition.d.ts +7 -0
- package/lib/spec/index.d.ts +1 -0
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/interaction.d.ts +2 -0
- package/lib/theme/academy.js +6 -6
- package/lib/theme/classic.js +6 -7
- package/lib/theme/classic.js.map +1 -1
- package/lib/theme/classicDark.js +6 -6
- package/lib/utils/coordinate.d.ts +2 -2
- package/lib/utils/scale.d.ts +1 -1
- package/lib/utils/scale.js +1 -1
- package/lib/utils/scale.js.map +1 -1
- package/package.json +8 -7
- package/src/api/chart.ts +5 -341
- package/src/api/{composition/base.ts → composition.ts} +16 -8
- package/src/api/define.ts +128 -0
- package/src/api/extend.ts +34 -0
- package/src/api/index.ts +2 -0
- package/src/api/library.ts +2 -2
- package/src/api/{mark/base.ts → mark.ts} +10 -7
- package/src/api/node.ts +3 -3
- package/src/api/props.ts +30 -114
- package/src/api/runtime.ts +366 -0
- package/src/api/types.ts +95 -17
- package/src/api/utils.ts +28 -11
- package/src/component/axis.ts +10 -5
- package/src/component/legendCategory.ts +4 -6
- package/src/{geo → composition}/geoView.ts +1 -1
- package/src/composition/index.ts +2 -0
- package/src/index.ts +12 -3
- package/src/label-transform/overlapDodgeY.ts +0 -1
- package/src/{stdlib/index.ts → lib/core.ts} +74 -258
- package/src/lib/geo.ts +9 -0
- package/src/lib/graph.ts +8 -0
- package/src/lib/index.ts +6 -0
- package/src/lib/lite.ts +127 -0
- package/src/lib/plot.ts +16 -0
- package/src/lib/std.ts +13 -0
- package/src/mark/area.ts +15 -6
- package/src/mark/box.ts +10 -2
- package/src/mark/cell.ts +12 -6
- package/src/mark/connector.ts +7 -3
- package/src/mark/density.ts +11 -8
- package/src/mark/forceGraph.ts +0 -3
- package/src/mark/heatmap.ts +10 -5
- package/src/mark/image.ts +10 -5
- package/src/mark/interval.ts +22 -10
- package/src/mark/line.ts +23 -5
- package/src/mark/lineX.ts +9 -4
- package/src/mark/lineY.ts +9 -4
- package/src/mark/link.ts +13 -5
- package/src/mark/path.ts +8 -3
- package/src/mark/point.ts +49 -30
- package/src/mark/polygon.ts +8 -3
- package/src/mark/range.ts +5 -3
- package/src/mark/rangeX.ts +7 -3
- package/src/mark/rangeY.ts +7 -3
- package/src/mark/rect.ts +10 -4
- package/src/mark/shape.ts +14 -3
- package/src/mark/text.ts +11 -5
- package/src/mark/treemap.ts +0 -1
- package/src/mark/utils.ts +9 -8
- package/src/mark/vector.ts +7 -3
- package/src/runtime/index.ts +1 -1
- package/src/runtime/plot.ts +19 -10
- package/src/runtime/render.ts +3 -6
- package/src/runtime/types/component.ts +1 -2
- package/src/runtime/types/mark.ts +4 -0
- package/src/runtime/types/options.ts +4 -1
- package/src/shape/index.ts +106 -110
- package/src/shape/text/advance.ts +1 -2
- package/src/spec/composition.ts +7 -0
- package/src/spec/index.ts +1 -0
- package/src/spec/interaction.ts +2 -0
- package/src/theme/academy.ts +6 -6
- package/src/theme/classic.ts +6 -7
- package/src/theme/classicDark.ts +6 -6
- package/src/utils/scale.ts +1 -1
- package/esm/api/composition/base.d.ts +0 -28
- package/esm/api/composition/base.js.map +0 -1
- package/esm/api/composition/facetCircle.d.ts +0 -17
- package/esm/api/composition/facetCircle.js +0 -27
- package/esm/api/composition/facetCircle.js.map +0 -1
- package/esm/api/composition/facetRect.d.ts +0 -17
- package/esm/api/composition/facetRect.js +0 -27
- package/esm/api/composition/facetRect.js.map +0 -1
- package/esm/api/composition/geoPath.d.ts +0 -20
- package/esm/api/composition/geoPath.js +0 -30
- package/esm/api/composition/geoPath.js.map +0 -1
- package/esm/api/composition/geoView.d.ts +0 -19
- package/esm/api/composition/geoView.js +0 -28
- package/esm/api/composition/geoView.js.map +0 -1
- package/esm/api/composition/index.d.ts +0 -33
- package/esm/api/composition/index.js +0 -32
- package/esm/api/composition/index.js.map +0 -1
- package/esm/api/composition/repeatMatrix.d.ts +0 -17
- package/esm/api/composition/repeatMatrix.js +0 -27
- package/esm/api/composition/repeatMatrix.js.map +0 -1
- package/esm/api/composition/spaceFlex.d.ts +0 -12
- package/esm/api/composition/spaceFlex.js +0 -19
- package/esm/api/composition/spaceFlex.js.map +0 -1
- package/esm/api/composition/spaceLayer.d.ts +0 -12
- package/esm/api/composition/spaceLayer.js +0 -19
- package/esm/api/composition/spaceLayer.js.map +0 -1
- package/esm/api/composition/timingKeyframe.d.ts +0 -11
- package/esm/api/composition/timingKeyframe.js +0 -19
- package/esm/api/composition/timingKeyframe.js.map +0 -1
- package/esm/api/composition/view.d.ts +0 -19
- package/esm/api/composition/view.js +0 -29
- package/esm/api/composition/view.js.map +0 -1
- package/esm/api/mark/base.d.ts +0 -22
- package/esm/api/mark/base.js.map +0 -1
- package/esm/api/mark/index.d.ts +0 -75
- package/esm/api/mark/index.js +0 -39
- package/esm/api/mark/index.js.map +0 -1
- package/esm/api/mark/mark.d.ts +0 -212
- package/esm/api/mark/mark.js +0 -339
- package/esm/api/mark/mark.js.map +0 -1
- package/esm/api/mark/types.d.ts +0 -26
- package/esm/api/mark/types.js +0 -2
- package/esm/api/mark/types.js.map +0 -1
- package/esm/geo/d3Projection.js.map +0 -1
- package/esm/geo/geoPath.js.map +0 -1
- package/esm/geo/geoView.js.map +0 -1
- package/esm/geo/index.d.ts +0 -9
- package/esm/geo/index.js +0 -8
- package/esm/geo/index.js.map +0 -1
- package/esm/stdlib/index.d.ts +0 -2
- package/esm/stdlib/index.js +0 -21
- package/esm/stdlib/index.js.map +0 -1
- package/lib/api/composition/base.d.ts +0 -28
- package/lib/api/composition/base.js.map +0 -1
- package/lib/api/composition/facetCircle.d.ts +0 -17
- package/lib/api/composition/facetCircle.js +0 -30
- package/lib/api/composition/facetCircle.js.map +0 -1
- package/lib/api/composition/facetRect.d.ts +0 -17
- package/lib/api/composition/facetRect.js +0 -30
- package/lib/api/composition/facetRect.js.map +0 -1
- package/lib/api/composition/geoPath.d.ts +0 -20
- package/lib/api/composition/geoPath.js +0 -33
- package/lib/api/composition/geoPath.js.map +0 -1
- package/lib/api/composition/geoView.d.ts +0 -19
- package/lib/api/composition/geoView.js +0 -31
- package/lib/api/composition/geoView.js.map +0 -1
- package/lib/api/composition/index.d.ts +0 -33
- package/lib/api/composition/index.js +0 -44
- package/lib/api/composition/index.js.map +0 -1
- package/lib/api/composition/repeatMatrix.d.ts +0 -17
- package/lib/api/composition/repeatMatrix.js +0 -30
- package/lib/api/composition/repeatMatrix.js.map +0 -1
- package/lib/api/composition/spaceFlex.d.ts +0 -12
- package/lib/api/composition/spaceFlex.js +0 -22
- package/lib/api/composition/spaceFlex.js.map +0 -1
- package/lib/api/composition/spaceLayer.d.ts +0 -12
- package/lib/api/composition/spaceLayer.js +0 -22
- package/lib/api/composition/spaceLayer.js.map +0 -1
- package/lib/api/composition/timingKeyframe.d.ts +0 -11
- package/lib/api/composition/timingKeyframe.js +0 -22
- package/lib/api/composition/timingKeyframe.js.map +0 -1
- package/lib/api/composition/view.d.ts +0 -19
- package/lib/api/composition/view.js +0 -32
- package/lib/api/composition/view.js.map +0 -1
- package/lib/api/mark/base.d.ts +0 -22
- package/lib/api/mark/base.js.map +0 -1
- package/lib/api/mark/index.d.ts +0 -75
- package/lib/api/mark/index.js +0 -43
- package/lib/api/mark/index.js.map +0 -1
- package/lib/api/mark/mark.d.ts +0 -212
- package/lib/api/mark/mark.js +0 -342
- package/lib/api/mark/mark.js.map +0 -1
- package/lib/api/mark/types.d.ts +0 -26
- package/lib/api/mark/types.js +0 -3
- package/lib/api/mark/types.js.map +0 -1
- package/lib/geo/d3Projection.js.map +0 -1
- package/lib/geo/geoPath.js.map +0 -1
- package/lib/geo/geoView.js.map +0 -1
- package/lib/geo/index.d.ts +0 -9
- package/lib/geo/index.js +0 -12
- package/lib/geo/index.js.map +0 -1
- package/lib/stdlib/index.d.ts +0 -2
- package/lib/stdlib/index.js +0 -25
- package/lib/stdlib/index.js.map +0 -1
- package/src/api/composition/facetCircle.ts +0 -36
- package/src/api/composition/facetRect.ts +0 -36
- package/src/api/composition/geoPath.ts +0 -37
- package/src/api/composition/geoView.ts +0 -39
- package/src/api/composition/index.ts +0 -57
- package/src/api/composition/repeatMatrix.ts +0 -36
- package/src/api/composition/spaceFlex.ts +0 -18
- package/src/api/composition/spaceLayer.ts +0 -18
- package/src/api/composition/timingKeyframe.ts +0 -16
- package/src/api/composition/view.ts +0 -42
- package/src/api/mark/index.ts +0 -113
- package/src/api/mark/mark.ts +0 -439
- package/src/api/mark/types.ts +0 -31
- package/src/geo/index.ts +0 -12
- /package/esm/{geo → composition}/d3Projection.d.ts +0 -0
- /package/esm/{geo → composition}/d3Projection.js +0 -0
- /package/esm/{geo → composition}/geoPath.d.ts +0 -0
- /package/esm/{geo → composition}/geoPath.js +0 -0
- /package/esm/{geo → composition}/geoView.d.ts +0 -0
- /package/lib/{geo → composition}/d3Projection.d.ts +0 -0
- /package/lib/{geo → composition}/d3Projection.js +0 -0
- /package/lib/{geo → composition}/geoPath.d.ts +0 -0
- /package/lib/{geo → composition}/geoPath.js +0 -0
- /package/lib/{geo → composition}/geoView.d.ts +0 -0
- /package/src/{geo → composition}/d3Projection.ts +0 -0
- /package/src/{geo → composition}/geoPath.ts +0 -0
package/src/index.ts
CHANGED
|
@@ -15,12 +15,21 @@ export {
|
|
|
15
15
|
AREA_CLASS_NAME,
|
|
16
16
|
} from './runtime';
|
|
17
17
|
|
|
18
|
-
export
|
|
18
|
+
export { corelib, stdlib, litelib } from './lib';
|
|
19
19
|
|
|
20
|
-
export
|
|
20
|
+
export * from './mark';
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export {
|
|
23
|
+
Chart,
|
|
24
|
+
MarkNode,
|
|
25
|
+
CompositionNode,
|
|
26
|
+
register,
|
|
27
|
+
Runtime,
|
|
28
|
+
extend,
|
|
29
|
+
} from './api';
|
|
23
30
|
|
|
24
31
|
export { ChartEvent } from './utils/event';
|
|
25
32
|
|
|
33
|
+
export type { G2Context } from './runtime';
|
|
34
|
+
|
|
26
35
|
export * from './spec';
|
|
@@ -2,7 +2,6 @@ import { DisplayObject } from '@antv/g';
|
|
|
2
2
|
import { ascending } from 'd3-array';
|
|
3
3
|
import { OverlapDodgeYLabelTransform } from '../spec';
|
|
4
4
|
import { LabelTransformComponent as LLC } from '../runtime';
|
|
5
|
-
import { defined } from '../utils/helper';
|
|
6
5
|
|
|
7
6
|
export type OverlapDodgeYOptions = Omit<OverlapDodgeYLabelTransform, 'type'>;
|
|
8
7
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { G2Library } from '../runtime';
|
|
2
1
|
import {
|
|
3
2
|
Cartesian,
|
|
4
3
|
Polar,
|
|
@@ -16,106 +15,42 @@ import {
|
|
|
16
15
|
Interval,
|
|
17
16
|
Rect,
|
|
18
17
|
Line,
|
|
19
|
-
Point
|
|
20
|
-
Text
|
|
21
|
-
Area
|
|
22
|
-
Image
|
|
23
|
-
Polygon
|
|
24
|
-
Box
|
|
25
|
-
Vector
|
|
26
|
-
Link
|
|
18
|
+
Point,
|
|
19
|
+
Text,
|
|
20
|
+
Area,
|
|
21
|
+
Image,
|
|
22
|
+
Polygon,
|
|
23
|
+
Box,
|
|
24
|
+
Vector,
|
|
25
|
+
Link,
|
|
27
26
|
LineX,
|
|
28
27
|
LineY,
|
|
29
28
|
Connector,
|
|
30
29
|
Range,
|
|
31
30
|
RangeX,
|
|
32
31
|
RangeY,
|
|
33
|
-
Sankey,
|
|
34
32
|
Path,
|
|
35
|
-
Treemap,
|
|
36
|
-
Pack as PackGeometry,
|
|
37
33
|
Shape,
|
|
38
|
-
|
|
39
|
-
ForceGraph,
|
|
40
|
-
Tree as TreeGeometry,
|
|
41
|
-
WordCloud as WordCloudGeometry,
|
|
42
|
-
Density as DensityGeometry,
|
|
43
|
-
Gauge,
|
|
34
|
+
Density,
|
|
44
35
|
Heatmap,
|
|
45
36
|
} from '../mark';
|
|
46
37
|
import { Category10, Category20 } from '../palette';
|
|
47
38
|
import {
|
|
48
|
-
Linear,
|
|
49
|
-
Ordinal,
|
|
50
|
-
Band,
|
|
51
|
-
Identity,
|
|
52
|
-
Point,
|
|
53
|
-
Time,
|
|
54
|
-
Log,
|
|
55
|
-
Pow,
|
|
56
|
-
Threshold,
|
|
57
|
-
Quantile,
|
|
58
|
-
Quantize,
|
|
59
|
-
Sqrt,
|
|
60
|
-
Sequential,
|
|
61
|
-
Constant as
|
|
39
|
+
Linear as ScaleLinear,
|
|
40
|
+
Ordinal as ScaleOrdinal,
|
|
41
|
+
Band as ScaleBand,
|
|
42
|
+
Identity as ScaleIdenity,
|
|
43
|
+
Point as ScalePoint,
|
|
44
|
+
Time as ScaleTime,
|
|
45
|
+
Log as ScaleLog,
|
|
46
|
+
Pow as ScalePow,
|
|
47
|
+
Threshold as ScaleThreshold,
|
|
48
|
+
Quantile as ScaleQuantile,
|
|
49
|
+
Quantize as ScaleQuantize,
|
|
50
|
+
Sqrt as ScaleSqrt,
|
|
51
|
+
Sequential as ScaleSequential,
|
|
52
|
+
Constant as ScaleConstant,
|
|
62
53
|
} from '../scale';
|
|
63
|
-
import {
|
|
64
|
-
Rect as RectShape,
|
|
65
|
-
HollowRect,
|
|
66
|
-
Line as LineShape,
|
|
67
|
-
HV,
|
|
68
|
-
VH,
|
|
69
|
-
HVH,
|
|
70
|
-
Smooth,
|
|
71
|
-
Bowtie,
|
|
72
|
-
Cross,
|
|
73
|
-
Diamond,
|
|
74
|
-
Hexagon,
|
|
75
|
-
HollowBowtie,
|
|
76
|
-
HollowDiamond,
|
|
77
|
-
HollowHexagon,
|
|
78
|
-
HollowPoint,
|
|
79
|
-
HollowSquare,
|
|
80
|
-
HollowTriangle,
|
|
81
|
-
HollowTriangleDown,
|
|
82
|
-
Hyphen,
|
|
83
|
-
LinePoint,
|
|
84
|
-
Plus,
|
|
85
|
-
Point as PointShape,
|
|
86
|
-
Square,
|
|
87
|
-
Tick,
|
|
88
|
-
Triangle,
|
|
89
|
-
TriangleDown,
|
|
90
|
-
Text,
|
|
91
|
-
Badge,
|
|
92
|
-
LineXY,
|
|
93
|
-
Connector as ConnectorShape,
|
|
94
|
-
Area,
|
|
95
|
-
SmoothArea,
|
|
96
|
-
HVHArea,
|
|
97
|
-
VHArea,
|
|
98
|
-
HVArea,
|
|
99
|
-
SmoothEdge,
|
|
100
|
-
VHVEdge,
|
|
101
|
-
Arc,
|
|
102
|
-
Image,
|
|
103
|
-
Polygon,
|
|
104
|
-
Ribbon,
|
|
105
|
-
Box,
|
|
106
|
-
Violin,
|
|
107
|
-
Funnel,
|
|
108
|
-
Pyramid,
|
|
109
|
-
Vector,
|
|
110
|
-
Link,
|
|
111
|
-
Label,
|
|
112
|
-
Path as PathShape,
|
|
113
|
-
HollowPath,
|
|
114
|
-
Density as DensityShape,
|
|
115
|
-
Shape as CustomShape,
|
|
116
|
-
Heatmap as HeatmapShape,
|
|
117
|
-
Trail,
|
|
118
|
-
} from '../shape';
|
|
119
54
|
import { Classic, ClassicDark, Academy } from '../theme';
|
|
120
55
|
import {
|
|
121
56
|
AxisLinear,
|
|
@@ -185,14 +120,6 @@ import {
|
|
|
185
120
|
TimingKeyframe,
|
|
186
121
|
} from '../composition';
|
|
187
122
|
import {
|
|
188
|
-
MaybeTitle,
|
|
189
|
-
MaybeZeroX,
|
|
190
|
-
MaybeZeroY1,
|
|
191
|
-
MaybeStackY,
|
|
192
|
-
MaybeSeries,
|
|
193
|
-
MaybeZeroY,
|
|
194
|
-
MaybeSize,
|
|
195
|
-
MaybeKey,
|
|
196
123
|
StackY,
|
|
197
124
|
DodgeX,
|
|
198
125
|
StackEnter,
|
|
@@ -208,12 +135,6 @@ import {
|
|
|
208
135
|
Group,
|
|
209
136
|
SortX,
|
|
210
137
|
FlexX,
|
|
211
|
-
MaybeTupleY,
|
|
212
|
-
MaybeTupleX,
|
|
213
|
-
MaybeIdentityY,
|
|
214
|
-
MaybeIdentityX,
|
|
215
|
-
MaybeZeroPadding,
|
|
216
|
-
MaybeTuple,
|
|
217
138
|
SortY,
|
|
218
139
|
GroupY,
|
|
219
140
|
GroupColor,
|
|
@@ -221,33 +142,23 @@ import {
|
|
|
221
142
|
Pack,
|
|
222
143
|
BinX,
|
|
223
144
|
Bin,
|
|
224
|
-
MaybeVisualPosition,
|
|
225
|
-
MaybeFunctionAttribute,
|
|
226
|
-
MaybeGradient,
|
|
227
|
-
MaybeTooltip,
|
|
228
145
|
Sample,
|
|
229
146
|
Filter,
|
|
230
147
|
} from '../transform';
|
|
231
148
|
import {
|
|
232
|
-
Fetch,
|
|
233
|
-
SortBy,
|
|
149
|
+
Fetch as DataFetch,
|
|
150
|
+
SortBy as DataSortBy,
|
|
234
151
|
Filter as DataFilter,
|
|
235
|
-
Map,
|
|
236
|
-
Pick,
|
|
237
|
-
Rename,
|
|
238
|
-
Fold,
|
|
239
|
-
Slice,
|
|
240
|
-
Inline,
|
|
241
|
-
Custom,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
Arc as ArcTransform,
|
|
246
|
-
WordCloud,
|
|
247
|
-
Join,
|
|
248
|
-
Sort,
|
|
249
|
-
KDE,
|
|
250
|
-
Venn,
|
|
152
|
+
Map as DataMap,
|
|
153
|
+
Pick as DataPick,
|
|
154
|
+
Rename as DataRename,
|
|
155
|
+
Fold as DataFold,
|
|
156
|
+
Slice as DataSlice,
|
|
157
|
+
Inline as DataInline,
|
|
158
|
+
Custom as DataCustom,
|
|
159
|
+
Join as DataJoin,
|
|
160
|
+
Sort as DataSort,
|
|
161
|
+
KDE as DataKDE,
|
|
251
162
|
} from '../data';
|
|
252
163
|
import {
|
|
253
164
|
OverlapDodgeY,
|
|
@@ -255,36 +166,23 @@ import {
|
|
|
255
166
|
ContrastReverse,
|
|
256
167
|
OverlapHide,
|
|
257
168
|
} from '../label-transform';
|
|
258
|
-
import {
|
|
169
|
+
import { LabelShape } from '../shape';
|
|
259
170
|
|
|
260
|
-
export function
|
|
171
|
+
export function corelib() {
|
|
261
172
|
return {
|
|
262
|
-
'data.fetch':
|
|
263
|
-
'data.inline':
|
|
264
|
-
'data.sortBy':
|
|
265
|
-
'data.sort':
|
|
173
|
+
'data.fetch': DataFetch,
|
|
174
|
+
'data.inline': DataInline,
|
|
175
|
+
'data.sortBy': DataSortBy,
|
|
176
|
+
'data.sort': DataSort,
|
|
266
177
|
'data.filter': DataFilter,
|
|
267
|
-
'data.pick':
|
|
268
|
-
'data.rename':
|
|
269
|
-
'data.fold':
|
|
270
|
-
'data.slice':
|
|
271
|
-
'data.custom':
|
|
272
|
-
'data.map':
|
|
273
|
-
'data.
|
|
274
|
-
'data.
|
|
275
|
-
'data.sankey': SankeyTransform,
|
|
276
|
-
'data.arc': ArcTransform,
|
|
277
|
-
'data.wordCloud': WordCloud,
|
|
278
|
-
'data.join': Join,
|
|
279
|
-
'data.kde': KDE,
|
|
280
|
-
'data.venn': Venn,
|
|
281
|
-
// 'transform.voronoi': Voronoi,
|
|
282
|
-
'transform.maybeZeroY1': MaybeZeroY1,
|
|
283
|
-
'transform.maybeZeroX': MaybeZeroX,
|
|
284
|
-
'transform.maybeStackY': MaybeStackY,
|
|
285
|
-
'transform.maybeTitle': MaybeTitle,
|
|
286
|
-
'transform.maybeSeries': MaybeSeries,
|
|
287
|
-
'transform.maybeZeroPadding': MaybeZeroPadding,
|
|
178
|
+
'data.pick': DataPick,
|
|
179
|
+
'data.rename': DataRename,
|
|
180
|
+
'data.fold': DataFold,
|
|
181
|
+
'data.slice': DataSlice,
|
|
182
|
+
'data.custom': DataCustom,
|
|
183
|
+
'data.map': DataMap,
|
|
184
|
+
'data.join': DataJoin,
|
|
185
|
+
'data.kde': DataKDE,
|
|
288
186
|
'transform.stackY': StackY,
|
|
289
187
|
'transform.binX': BinX,
|
|
290
188
|
'transform.bin': Bin,
|
|
@@ -302,22 +200,10 @@ export function createLibrary(): G2Library {
|
|
|
302
200
|
'transform.groupY': GroupY,
|
|
303
201
|
'transform.groupColor': GroupColor,
|
|
304
202
|
'transform.group': Group,
|
|
305
|
-
'transform.maybeSize': MaybeSize,
|
|
306
|
-
'transform.maybeZeroY': MaybeZeroY,
|
|
307
|
-
'transform.maybeKey': MaybeKey,
|
|
308
203
|
'transform.sortX': SortX,
|
|
309
204
|
'transform.sortY': SortY,
|
|
310
205
|
'transform.sortColor': SortColor,
|
|
311
206
|
'transform.flexX': FlexX,
|
|
312
|
-
'transform.maybeTupleY': MaybeTupleY,
|
|
313
|
-
'transform.maybeTupleX': MaybeTupleX,
|
|
314
|
-
'transform.maybeIdentityY': MaybeIdentityY,
|
|
315
|
-
'transform.maybeIdentityX': MaybeIdentityX,
|
|
316
|
-
'transform.maybeTuple': MaybeTuple,
|
|
317
|
-
'transform.maybeVisualPosition': MaybeVisualPosition,
|
|
318
|
-
'transform.maybeFunctionAttribute': MaybeFunctionAttribute,
|
|
319
|
-
'transform.maybeGradient': MaybeGradient,
|
|
320
|
-
'transform.maybeTooltip': MaybeTooltip,
|
|
321
207
|
'transform.pack': Pack,
|
|
322
208
|
'transform.sample': Sample,
|
|
323
209
|
'transform.filter': Filter,
|
|
@@ -337,111 +223,42 @@ export function createLibrary(): G2Library {
|
|
|
337
223
|
'mark.interval': Interval,
|
|
338
224
|
'mark.rect': Rect,
|
|
339
225
|
'mark.line': Line,
|
|
340
|
-
'mark.point':
|
|
341
|
-
'mark.text':
|
|
226
|
+
'mark.point': Point,
|
|
227
|
+
'mark.text': Text,
|
|
342
228
|
'mark.cell': Cell,
|
|
343
|
-
'mark.area':
|
|
344
|
-
'mark.link':
|
|
345
|
-
'mark.image':
|
|
346
|
-
'mark.polygon':
|
|
347
|
-
'mark.box':
|
|
348
|
-
'mark.vector':
|
|
229
|
+
'mark.area': Area,
|
|
230
|
+
'mark.link': Link,
|
|
231
|
+
'mark.image': Image,
|
|
232
|
+
'mark.polygon': Polygon,
|
|
233
|
+
'mark.box': Box,
|
|
234
|
+
'mark.vector': Vector,
|
|
349
235
|
'mark.lineX': LineX,
|
|
350
236
|
'mark.lineY': LineY,
|
|
351
237
|
'mark.connector': Connector,
|
|
352
238
|
'mark.range': Range,
|
|
353
239
|
'mark.rangeX': RangeX,
|
|
354
240
|
'mark.rangeY': RangeY,
|
|
355
|
-
'mark.sankey': Sankey,
|
|
356
241
|
'mark.path': Path,
|
|
357
|
-
'mark.treemap': Treemap,
|
|
358
|
-
'mark.pack': PackGeometry,
|
|
359
|
-
'mark.boxplot': Boxplot,
|
|
360
242
|
'mark.shape': Shape,
|
|
361
|
-
'mark.
|
|
362
|
-
'mark.gauge': Gauge,
|
|
363
|
-
'mark.tree': TreeGeometry,
|
|
364
|
-
'mark.wordCloud': WordCloudGeometry,
|
|
365
|
-
'mark.density': DensityGeometry,
|
|
243
|
+
'mark.density': Density,
|
|
366
244
|
'mark.heatmap': Heatmap,
|
|
245
|
+
'shape.label.label': LabelShape,
|
|
367
246
|
'palette.category10': Category10,
|
|
368
247
|
'palette.category20': Category20,
|
|
369
|
-
'scale.linear':
|
|
370
|
-
'scale.ordinal':
|
|
371
|
-
'scale.band':
|
|
372
|
-
'scale.identity':
|
|
373
|
-
'scale.point':
|
|
374
|
-
'scale.time':
|
|
375
|
-
'scale.log':
|
|
376
|
-
'scale.pow':
|
|
377
|
-
'scale.sqrt':
|
|
378
|
-
'scale.threshold':
|
|
379
|
-
'scale.quantile':
|
|
380
|
-
'scale.quantize':
|
|
381
|
-
'scale.sequential':
|
|
382
|
-
'scale.constant':
|
|
383
|
-
'shape.interval.rect': RectShape,
|
|
384
|
-
'shape.interval.hollow': HollowRect,
|
|
385
|
-
'shape.interval.funnel': Funnel,
|
|
386
|
-
'shape.interval.pyramid': Pyramid,
|
|
387
|
-
'shape.rect.rect': RectShape,
|
|
388
|
-
'shape.rect.hollow': HollowRect,
|
|
389
|
-
'shape.cell.cell': RectShape,
|
|
390
|
-
'shape.cell.hollow': HollowRect,
|
|
391
|
-
'shape.line.line': LineShape,
|
|
392
|
-
'shape.line.hv': HV,
|
|
393
|
-
'shape.line.vh': VH,
|
|
394
|
-
'shape.line.hvh': HVH,
|
|
395
|
-
'shape.line.trail': Trail,
|
|
396
|
-
'shape.line.smooth': Smooth,
|
|
397
|
-
'shape.point.bowtie': Bowtie,
|
|
398
|
-
'shape.point.cross': Cross,
|
|
399
|
-
'shape.point.diamond': Diamond,
|
|
400
|
-
'shape.point.hexagon': Hexagon,
|
|
401
|
-
'shape.point.hollowBowtie': HollowBowtie,
|
|
402
|
-
'shape.point.hollowDiamond': HollowDiamond,
|
|
403
|
-
'shape.point.hollowHexagon': HollowHexagon,
|
|
404
|
-
'shape.point.hollow': HollowPoint,
|
|
405
|
-
'shape.point.hollowSquare': HollowSquare,
|
|
406
|
-
'shape.point.hollowTriangle': HollowTriangle,
|
|
407
|
-
'shape.point.hollowTriangleDown': HollowTriangleDown,
|
|
408
|
-
'shape.point.hyphen': Hyphen,
|
|
409
|
-
'shape.point.line': LinePoint,
|
|
410
|
-
'shape.point.plus': Plus,
|
|
411
|
-
'shape.point.point': PointShape,
|
|
412
|
-
'shape.point.square': Square,
|
|
413
|
-
'shape.point.tick': Tick,
|
|
414
|
-
'shape.point.triangle': Triangle,
|
|
415
|
-
'shape.point.triangleDown': TriangleDown,
|
|
416
|
-
'shape.text.text': Text,
|
|
417
|
-
'shape.area.area': Area,
|
|
418
|
-
'shape.area.smooth': SmoothArea,
|
|
419
|
-
'shape.area.hvh': HVHArea,
|
|
420
|
-
'shape.area.vh': VHArea,
|
|
421
|
-
'shape.area.hv': HVArea,
|
|
422
|
-
'shape.link.smooth': SmoothEdge,
|
|
423
|
-
'shape.link.vhv': VHVEdge,
|
|
424
|
-
'shape.link.arc': Arc,
|
|
425
|
-
'shape.link.link': Link,
|
|
426
|
-
'shape.image.image': Image,
|
|
427
|
-
'shape.polygon.polygon': Polygon,
|
|
428
|
-
'shape.polygon.ribbon': Ribbon,
|
|
429
|
-
'shape.box.box': Box,
|
|
430
|
-
'shape.box.violin': Violin,
|
|
431
|
-
'shape.vector.vector': Vector,
|
|
432
|
-
'shape.label.label': Label,
|
|
433
|
-
'shape.text.badge': Badge,
|
|
434
|
-
'shape.lineX.line': LineXY,
|
|
435
|
-
'shape.lineY.line': LineXY,
|
|
436
|
-
'shape.shape.shape': CustomShape,
|
|
437
|
-
'shape.connector.connector': ConnectorShape,
|
|
438
|
-
'shape.range.range': RectShape,
|
|
439
|
-
'shape.rangeX.range': RectShape,
|
|
440
|
-
'shape.rangeY.range': RectShape,
|
|
441
|
-
'shape.path.path': PathShape,
|
|
442
|
-
'shape.path.hollow': HollowPath,
|
|
443
|
-
'shape.density.density': DensityShape,
|
|
444
|
-
'shape.heatmap.heatmap': HeatmapShape,
|
|
248
|
+
'scale.linear': ScaleLinear,
|
|
249
|
+
'scale.ordinal': ScaleOrdinal,
|
|
250
|
+
'scale.band': ScaleBand,
|
|
251
|
+
'scale.identity': ScaleIdenity,
|
|
252
|
+
'scale.point': ScalePoint,
|
|
253
|
+
'scale.time': ScaleTime,
|
|
254
|
+
'scale.log': ScaleLog,
|
|
255
|
+
'scale.pow': ScalePow,
|
|
256
|
+
'scale.sqrt': ScaleSqrt,
|
|
257
|
+
'scale.threshold': ScaleThreshold,
|
|
258
|
+
'scale.quantile': ScaleQuantile,
|
|
259
|
+
'scale.quantize': ScaleQuantize,
|
|
260
|
+
'scale.sequential': ScaleSequential,
|
|
261
|
+
'scale.constant': ScaleConstant,
|
|
445
262
|
'theme.classic': Classic,
|
|
446
263
|
'theme.classicDark': ClassicDark,
|
|
447
264
|
'theme.academy': Academy,
|
|
@@ -508,6 +325,5 @@ export function createLibrary(): G2Library {
|
|
|
508
325
|
'labelTransform.overlapDodgeY': OverlapDodgeY,
|
|
509
326
|
'labelTransform.overflowHide': OverflowHide,
|
|
510
327
|
'labelTransform.contrastReverse': ContrastReverse,
|
|
511
|
-
|
|
512
|
-
};
|
|
328
|
+
} as const;
|
|
513
329
|
}
|
package/src/lib/geo.ts
ADDED
package/src/lib/graph.ts
ADDED
package/src/lib/index.ts
ADDED
package/src/lib/lite.ts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Cartesian } from '../coordinate';
|
|
2
|
+
import { Constant, Field, Transform, Column } from '../encode';
|
|
3
|
+
import { Interval } from '../mark';
|
|
4
|
+
import { Category10, Category20 } from '../palette';
|
|
5
|
+
import {
|
|
6
|
+
Linear as ScaleLinear,
|
|
7
|
+
Ordinal as ScaleOrdinal,
|
|
8
|
+
Band as ScaleBand,
|
|
9
|
+
Identity as ScaleIdenity,
|
|
10
|
+
Point as ScalePoint,
|
|
11
|
+
Time as ScaleTime,
|
|
12
|
+
Log as ScaleLog,
|
|
13
|
+
Pow as ScalePow,
|
|
14
|
+
Threshold as ScaleThreshold,
|
|
15
|
+
Quantile as ScaleQuantile,
|
|
16
|
+
Quantize as ScaleQuantize,
|
|
17
|
+
Sqrt as ScaleSqrt,
|
|
18
|
+
Sequential as ScaleSequential,
|
|
19
|
+
Constant as ScaleConstant,
|
|
20
|
+
} from '../scale';
|
|
21
|
+
import { Classic } from '../theme';
|
|
22
|
+
import {
|
|
23
|
+
AxisLinear,
|
|
24
|
+
AxisArc,
|
|
25
|
+
AxisX,
|
|
26
|
+
AxisY,
|
|
27
|
+
AxisRadar,
|
|
28
|
+
LegendCategory,
|
|
29
|
+
LegendContinuous,
|
|
30
|
+
LegendContinuousBlock,
|
|
31
|
+
LegendContinuousBlockSize,
|
|
32
|
+
LegendContinuousSize,
|
|
33
|
+
TitleComponent,
|
|
34
|
+
SliderX,
|
|
35
|
+
SliderY,
|
|
36
|
+
ScrollbarX,
|
|
37
|
+
ScrollbarY,
|
|
38
|
+
Legends,
|
|
39
|
+
} from '../component';
|
|
40
|
+
import {
|
|
41
|
+
ScaleInX,
|
|
42
|
+
ScaleOutX,
|
|
43
|
+
ScaleInY,
|
|
44
|
+
ScaleOutY,
|
|
45
|
+
WaveIn,
|
|
46
|
+
FadeIn,
|
|
47
|
+
FadeOut,
|
|
48
|
+
Morphing,
|
|
49
|
+
} from '../animation';
|
|
50
|
+
import {
|
|
51
|
+
Tooltip,
|
|
52
|
+
LegendFilter,
|
|
53
|
+
LegendHighlight,
|
|
54
|
+
SliderFilter,
|
|
55
|
+
Poptip,
|
|
56
|
+
Event,
|
|
57
|
+
ScrollbarFilter,
|
|
58
|
+
} from '../interaction';
|
|
59
|
+
import { Mark, View } from '../composition';
|
|
60
|
+
import { LabelShape } from '../shape';
|
|
61
|
+
import { Inline } from '../data';
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* In test stage, don't use it.
|
|
65
|
+
*/
|
|
66
|
+
export function litelib() {
|
|
67
|
+
return {
|
|
68
|
+
'data.inline': Inline,
|
|
69
|
+
'coordinate.cartesian': Cartesian,
|
|
70
|
+
'encode.constant': Constant,
|
|
71
|
+
'encode.field': Field,
|
|
72
|
+
'encode.transform': Transform,
|
|
73
|
+
'encode.column': Column,
|
|
74
|
+
'mark.interval': Interval,
|
|
75
|
+
'shape.label.label': LabelShape,
|
|
76
|
+
'palette.category10': Category10,
|
|
77
|
+
'palette.category20': Category20,
|
|
78
|
+
'scale.linear': ScaleLinear,
|
|
79
|
+
'scale.ordinal': ScaleOrdinal,
|
|
80
|
+
'scale.band': ScaleBand,
|
|
81
|
+
'scale.identity': ScaleIdenity,
|
|
82
|
+
'scale.point': ScalePoint,
|
|
83
|
+
'scale.time': ScaleTime,
|
|
84
|
+
'scale.log': ScaleLog,
|
|
85
|
+
'scale.pow': ScalePow,
|
|
86
|
+
'scale.sqrt': ScaleSqrt,
|
|
87
|
+
'scale.threshold': ScaleThreshold,
|
|
88
|
+
'scale.quantile': ScaleQuantile,
|
|
89
|
+
'scale.quantize': ScaleQuantize,
|
|
90
|
+
'scale.sequential': ScaleSequential,
|
|
91
|
+
'scale.constant': ScaleConstant,
|
|
92
|
+
'theme.classic': Classic,
|
|
93
|
+
'component.axisX': AxisX,
|
|
94
|
+
'component.axisY': AxisY,
|
|
95
|
+
'component.axisRadar': AxisRadar,
|
|
96
|
+
'component.axisLinear': AxisLinear,
|
|
97
|
+
'component.axisArc': AxisArc,
|
|
98
|
+
'component.legendCategory': LegendCategory,
|
|
99
|
+
'component.legendContinuous': LegendContinuous,
|
|
100
|
+
'component.legendContinuousBlock': LegendContinuousBlock,
|
|
101
|
+
'component.legendContinuousBlockSize': LegendContinuousBlockSize,
|
|
102
|
+
'component.legendContinuousSize': LegendContinuousSize,
|
|
103
|
+
'component.legends': Legends,
|
|
104
|
+
'component.title': TitleComponent,
|
|
105
|
+
'component.sliderX': SliderX,
|
|
106
|
+
'component.sliderY': SliderY,
|
|
107
|
+
'component.scrollbarX': ScrollbarX,
|
|
108
|
+
'component.scrollbarY': ScrollbarY,
|
|
109
|
+
'animation.scaleInX': ScaleInX,
|
|
110
|
+
'animation.scaleOutX': ScaleOutX,
|
|
111
|
+
'animation.scaleInY': ScaleInY,
|
|
112
|
+
'animation.scaleOutY': ScaleOutY,
|
|
113
|
+
'animation.waveIn': WaveIn,
|
|
114
|
+
'animation.fadeIn': FadeIn,
|
|
115
|
+
'animation.fadeOut': FadeOut,
|
|
116
|
+
'animation.morphing': Morphing,
|
|
117
|
+
'interaction.tooltip': Tooltip,
|
|
118
|
+
'interaction.legendFilter': LegendFilter,
|
|
119
|
+
'interaction.legendHighlight': LegendHighlight,
|
|
120
|
+
'interaction.sliderFilter': SliderFilter,
|
|
121
|
+
'interaction.scrollbarFilter': ScrollbarFilter,
|
|
122
|
+
'interaction.poptip': Poptip,
|
|
123
|
+
'interaction.event': Event,
|
|
124
|
+
'composition.mark': Mark,
|
|
125
|
+
'composition.view': View,
|
|
126
|
+
} as const;
|
|
127
|
+
}
|
package/src/lib/plot.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Sankey, Treemap, Pack, Boxplot, WordCloud, Gauge } from '../mark';
|
|
2
|
+
import { Arc, Cluster, Venn } from '../data';
|
|
3
|
+
|
|
4
|
+
export function plotlib() {
|
|
5
|
+
return {
|
|
6
|
+
'data.venn': Venn,
|
|
7
|
+
'data.arc': Arc,
|
|
8
|
+
'data.cluster': Cluster,
|
|
9
|
+
'mark.sankey': Sankey,
|
|
10
|
+
'mark.treemap': Treemap,
|
|
11
|
+
'mark.boxplot': Boxplot,
|
|
12
|
+
'mark.pack': Pack,
|
|
13
|
+
'mark.gauge': Gauge,
|
|
14
|
+
'mark.wordCloud': WordCloud,
|
|
15
|
+
} as const;
|
|
16
|
+
}
|
package/src/lib/std.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { corelib } from './core';
|
|
2
|
+
import { geolib } from './geo';
|
|
3
|
+
import { graphlib } from './graph';
|
|
4
|
+
import { plotlib } from './plot';
|
|
5
|
+
|
|
6
|
+
export function stdlib() {
|
|
7
|
+
return {
|
|
8
|
+
...geolib(),
|
|
9
|
+
...graphlib(),
|
|
10
|
+
...plotlib(),
|
|
11
|
+
...corelib(),
|
|
12
|
+
} as const;
|
|
13
|
+
}
|
package/src/mark/area.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { group } from 'd3-array';
|
|
2
2
|
import { MarkComponent as MC } from '../runtime';
|
|
3
3
|
import { AreaMark } from '../spec';
|
|
4
|
+
import { AreaShape, AreaHV, AreaHVH, AreaSmooth, AreaVH } from '../shape';
|
|
5
|
+
import { MaybeSeries, MaybeZeroY1, MaybeZeroPadding } from '../transform';
|
|
4
6
|
import {
|
|
5
7
|
baseGeometryChannels,
|
|
6
8
|
basePostInference,
|
|
@@ -8,6 +10,14 @@ import {
|
|
|
8
10
|
tooltip1d,
|
|
9
11
|
} from './utils';
|
|
10
12
|
|
|
13
|
+
const shape = {
|
|
14
|
+
area: AreaShape,
|
|
15
|
+
smooth: AreaSmooth,
|
|
16
|
+
hvh: AreaHVH,
|
|
17
|
+
vh: AreaVH,
|
|
18
|
+
hv: AreaHV,
|
|
19
|
+
};
|
|
20
|
+
|
|
11
21
|
export type AreaOptions = Omit<AreaMark, 'type'>;
|
|
12
22
|
|
|
13
23
|
/*
|
|
@@ -65,14 +75,13 @@ export const Area: MC<AreaOptions> = () => {
|
|
|
65
75
|
};
|
|
66
76
|
};
|
|
67
77
|
|
|
68
|
-
const shapes = ['area', 'smooth', 'hvh', 'hv', 'vh'];
|
|
69
|
-
|
|
70
78
|
Area.props = {
|
|
71
79
|
defaultShape: 'area',
|
|
72
80
|
defaultLabelShape: 'label',
|
|
73
81
|
composite: false,
|
|
82
|
+
shape,
|
|
74
83
|
channels: [
|
|
75
|
-
...baseGeometryChannels({ shapes }),
|
|
84
|
+
...baseGeometryChannels({ shapes: Object.keys(shape) }),
|
|
76
85
|
{ name: 'x', required: true },
|
|
77
86
|
{ name: 'y', required: true },
|
|
78
87
|
{ name: 'size' },
|
|
@@ -80,9 +89,9 @@ Area.props = {
|
|
|
80
89
|
],
|
|
81
90
|
preInference: [
|
|
82
91
|
...basePreInference(),
|
|
83
|
-
{ type:
|
|
84
|
-
{ type:
|
|
85
|
-
{ type:
|
|
92
|
+
{ type: MaybeSeries },
|
|
93
|
+
{ type: MaybeZeroY1 },
|
|
94
|
+
{ type: MaybeZeroPadding },
|
|
86
95
|
],
|
|
87
96
|
postInference: [...basePostInference(), ...tooltip1d()],
|
|
88
97
|
interaction: {
|