@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/lib/api/library.d.ts
CHANGED
|
@@ -1,3 +1,172 @@
|
|
|
1
1
|
import { G2ComponentNamespaces, G2Component } from '../runtime';
|
|
2
|
-
export declare const library:
|
|
2
|
+
export declare const library: {
|
|
3
|
+
readonly 'data.fetch': import("../runtime").DataComponent<import("../data").FetchOptions>;
|
|
4
|
+
readonly 'data.inline': import("../runtime").DataComponent<import("../data").InlineOptions>;
|
|
5
|
+
readonly 'data.sortBy': import("../runtime").DataComponent<import("../data").SortByOptions>;
|
|
6
|
+
readonly 'data.sort': import("../runtime").DataComponent<import("../data").SortOptions>;
|
|
7
|
+
readonly 'data.filter': import("../runtime").DataComponent<import("../data").FilterDataOptions>;
|
|
8
|
+
readonly 'data.pick': import("../runtime").DataComponent<import("../data").PickOptions>;
|
|
9
|
+
readonly 'data.rename': import("../runtime").DataComponent<import("../data").RenameOptions>;
|
|
10
|
+
readonly 'data.fold': import("../runtime").DataComponent<import("../data").FoldOptions>;
|
|
11
|
+
readonly 'data.slice': import("../runtime").DataComponent<import("../data").SliceOptions>;
|
|
12
|
+
readonly 'data.custom': import("../runtime").DataComponent<import("../data").CustomOptions>;
|
|
13
|
+
readonly 'data.map': import("../runtime").DataComponent<import("../data").MapOptions>;
|
|
14
|
+
readonly 'data.join': import("../runtime").DataComponent<import("../data").JoinOptions>;
|
|
15
|
+
readonly 'data.kde': import("../runtime").DataComponent<import("../data").KDEOptions>;
|
|
16
|
+
readonly 'transform.stackY': import("../runtime").TransformComponent<import("../transform").StackYOptions>;
|
|
17
|
+
readonly 'transform.binX': import("../runtime").TransformComponent<import("../transform").BinXOptions>;
|
|
18
|
+
readonly 'transform.bin': import("../runtime").TransformComponent<import("../transform").BinOptions>;
|
|
19
|
+
readonly 'transform.dodgeX': import("../runtime").TransformComponent<import("../transform").DodgeXOptions>;
|
|
20
|
+
readonly 'transform.jitter': import("../runtime").TransformComponent<import("../transform").JitterOptions>;
|
|
21
|
+
readonly 'transform.jitterX': import("../runtime").TransformComponent<import("../transform").JitterXOptions>;
|
|
22
|
+
readonly 'transform.symmetryY': import("../runtime").TransformComponent<import("../transform").SymmetryYOptions>;
|
|
23
|
+
readonly 'transform.diffY': import("../runtime").TransformComponent<import("../transform").DiffYOptions>;
|
|
24
|
+
readonly 'transform.stackEnter': import("../runtime").TransformComponent<import("../transform").StackEnterOptions>;
|
|
25
|
+
readonly 'transform.normalizeY': import("../runtime").TransformComponent<import("../transform").NormalizeYOptions>;
|
|
26
|
+
readonly 'transform.select': import("../runtime").TransformComponent<import("../transform").SelectOptions>;
|
|
27
|
+
readonly 'transform.selectX': import("../runtime").TransformComponent<import("../transform").SelectXOptions>;
|
|
28
|
+
readonly 'transform.selectY': import("../runtime").TransformComponent<import("../transform").SelectYOptions>;
|
|
29
|
+
readonly 'transform.groupX': import("../runtime").TransformComponent<import("../transform").GroupXOptions>;
|
|
30
|
+
readonly 'transform.groupY': import("../runtime").TransformComponent<import("../transform").GroupYOptions>;
|
|
31
|
+
readonly 'transform.groupColor': import("../runtime").TransformComponent<import("../transform").GroupColorOptions>;
|
|
32
|
+
readonly 'transform.group': import("../runtime").TransformComponent<import("../transform").GroupOptions>;
|
|
33
|
+
readonly 'transform.sortX': import("../runtime").TransformComponent<import("../transform").SortXOptions>;
|
|
34
|
+
readonly 'transform.sortY': import("../runtime").TransformComponent<import("../transform").SortYOptions>;
|
|
35
|
+
readonly 'transform.sortColor': import("../runtime").TransformComponent<import("../transform").SortColorOptions>;
|
|
36
|
+
readonly 'transform.flexX': import("../runtime").TransformComponent<import("../transform").FlexXOptions>;
|
|
37
|
+
readonly 'transform.pack': import("../runtime").TransformComponent<import("../transform").PackOptions>;
|
|
38
|
+
readonly 'transform.sample': import("../runtime").TransformComponent<import("../transform").SampleOptions>;
|
|
39
|
+
readonly 'transform.filter': import("../runtime").TransformComponent<import("../transform").FilterOptions>;
|
|
40
|
+
readonly 'coordinate.cartesian': import("../runtime").CoordinateComponent<import("../coordinate").CartesianOptions>;
|
|
41
|
+
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>;
|
|
42
|
+
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>;
|
|
43
|
+
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>;
|
|
44
|
+
readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>;
|
|
45
|
+
readonly 'coordinate.parallel': import("../runtime").CoordinateComponent<import("../coordinate").ParallelOptions>;
|
|
46
|
+
readonly 'coordinate.fisheye': import("../runtime").CoordinateComponent<import("..").FisheyeCoordinate>;
|
|
47
|
+
readonly 'coordinate.radial': import("../runtime").CoordinateComponent<import("../coordinate").RadialOptions>;
|
|
48
|
+
readonly 'coordinate.radar': import("../runtime").CoordinateComponent<import("..").RadarCoordinate>;
|
|
49
|
+
readonly 'encode.constant': import("../runtime").EncodeComponent<import("../encode").ConstantOptions>;
|
|
50
|
+
readonly 'encode.field': import("../runtime").EncodeComponent<import("../encode").FieldOptions>;
|
|
51
|
+
readonly 'encode.transform': import("../runtime").EncodeComponent<import("../encode").TransformOptions>;
|
|
52
|
+
readonly 'encode.column': import("../runtime").EncodeComponent<import("../encode").ColumnOptions>;
|
|
53
|
+
readonly 'mark.interval': import("../runtime").MarkComponent<import("..").IntervalOptions>;
|
|
54
|
+
readonly 'mark.rect': import("../runtime").MarkComponent<import("..").RectOptions>;
|
|
55
|
+
readonly 'mark.line': import("../runtime").MarkComponent<import("..").LineOptions>;
|
|
56
|
+
readonly 'mark.point': import("../runtime").MarkComponent<import("..").PointOptions>;
|
|
57
|
+
readonly 'mark.text': import("../runtime").MarkComponent<import("..").TextOptions>;
|
|
58
|
+
readonly 'mark.cell': import("../runtime").MarkComponent<import("..").CellOptions>;
|
|
59
|
+
readonly 'mark.area': import("../runtime").MarkComponent<import("..").AreaOptions>;
|
|
60
|
+
readonly 'mark.link': import("../runtime").MarkComponent<import("..").LinkOptions>;
|
|
61
|
+
readonly 'mark.image': import("../runtime").MarkComponent<import("..").ImageOptions>;
|
|
62
|
+
readonly 'mark.polygon': import("../runtime").MarkComponent<import("..").PolygonOptions>;
|
|
63
|
+
readonly 'mark.box': import("../runtime").MarkComponent<import("..").BoxOptions>;
|
|
64
|
+
readonly 'mark.vector': import("../runtime").MarkComponent<import("..").VectorOptions>;
|
|
65
|
+
readonly 'mark.lineX': import("../runtime").MarkComponent<import("..").LineXOptions>;
|
|
66
|
+
readonly 'mark.lineY': import("../runtime").MarkComponent<import("..").LineYOptions>;
|
|
67
|
+
readonly 'mark.connector': import("../runtime").MarkComponent<import("..").ConnectorOptions>;
|
|
68
|
+
readonly 'mark.range': import("../runtime").MarkComponent<import("..").RangeOptions>;
|
|
69
|
+
readonly 'mark.rangeX': import("../runtime").MarkComponent<import("..").RangeXOptions>;
|
|
70
|
+
readonly 'mark.rangeY': import("../runtime").MarkComponent<import("..").RangeYOptions>;
|
|
71
|
+
readonly 'mark.path': import("../runtime").MarkComponent<import("../mark/path").PathOptions>;
|
|
72
|
+
readonly 'mark.shape': import("../runtime").MarkComponent<import("..").ShapeOptions>;
|
|
73
|
+
readonly 'mark.density': import("../runtime").MarkComponent<import("..").DensityOptions>;
|
|
74
|
+
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>;
|
|
75
|
+
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>;
|
|
76
|
+
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>;
|
|
77
|
+
readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>;
|
|
78
|
+
readonly 'scale.linear': import("../runtime").ScaleComponent<import("../scale").LinearOptions>;
|
|
79
|
+
readonly 'scale.ordinal': import("../runtime").ScaleComponent<import("../scale").OrdinalOptions>;
|
|
80
|
+
readonly 'scale.band': import("../runtime").ScaleComponent<import("../scale").BandOptions>;
|
|
81
|
+
readonly 'scale.identity': import("../runtime").ScaleComponent<import("../scale").IdentityOptions>;
|
|
82
|
+
readonly 'scale.point': import("../runtime").ScaleComponent<import("../scale").PointOptions>;
|
|
83
|
+
readonly 'scale.time': import("../runtime").ScaleComponent<import("../scale").TimeOptions>;
|
|
84
|
+
readonly 'scale.log': import("../runtime").ScaleComponent<import("../scale").LogOptions>;
|
|
85
|
+
readonly 'scale.pow': import("../runtime").ScaleComponent<import("../scale").PowOptions>;
|
|
86
|
+
readonly 'scale.sqrt': import("../runtime").ScaleComponent<import("../scale").SqrtOptions>;
|
|
87
|
+
readonly 'scale.threshold': import("../runtime").ScaleComponent<import("../scale").ThresholdOptions>;
|
|
88
|
+
readonly 'scale.quantile': import("../runtime").ScaleComponent<import("../scale").QuantileOptions>;
|
|
89
|
+
readonly 'scale.quantize': import("../runtime").ScaleComponent<import("../scale").QuantizeOptions>;
|
|
90
|
+
readonly 'scale.sequential': import("../runtime").ScaleComponent<import("../scale").SequentialOptions>;
|
|
91
|
+
readonly 'scale.constant': import("../runtime").ScaleComponent<import("../scale").ConstantOptions>;
|
|
92
|
+
readonly 'theme.classic': import("../runtime").ThemeComponent<import("../runtime").G2Theme>;
|
|
93
|
+
readonly 'theme.classicDark': import("../runtime").ThemeComponent<import("../runtime").G2Theme>;
|
|
94
|
+
readonly 'theme.academy': import("../runtime").ThemeComponent<import("../runtime").G2Theme>;
|
|
95
|
+
readonly 'component.axisX': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
96
|
+
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
97
|
+
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>;
|
|
98
|
+
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
99
|
+
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
100
|
+
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>;
|
|
101
|
+
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
102
|
+
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
103
|
+
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
104
|
+
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
105
|
+
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>;
|
|
106
|
+
readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>;
|
|
107
|
+
readonly 'component.sliderX': import("../runtime").GuideComponentComponent<import("../component/slider").SliderOptions>;
|
|
108
|
+
readonly 'component.sliderY': import("../runtime").GuideComponentComponent<import("../component/slider").SliderOptions>;
|
|
109
|
+
readonly 'component.scrollbarX': import("../runtime").GuideComponentComponent<import("../component/scrollbar").ScrollbarOptions>;
|
|
110
|
+
readonly 'component.scrollbarY': import("../runtime").GuideComponentComponent<import("../component/scrollbar").ScrollbarOptions>;
|
|
111
|
+
readonly 'animation.scaleInX': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
112
|
+
readonly 'animation.scaleOutX': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
113
|
+
readonly 'animation.scaleInY': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
114
|
+
readonly 'animation.scaleOutY': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
115
|
+
readonly 'animation.waveIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
116
|
+
readonly 'animation.fadeIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
117
|
+
readonly 'animation.fadeOut': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
118
|
+
readonly 'animation.zoomIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
119
|
+
readonly 'animation.zoomOut': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
120
|
+
readonly 'animation.pathIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
121
|
+
readonly 'animation.morphing': import("../runtime").AnimationComponent<import("../animation").MorphingOptions>;
|
|
122
|
+
readonly 'animation.growInX': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
123
|
+
readonly 'animation.growInY': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
124
|
+
readonly 'interaction.elementHighlight': typeof import("../interaction").ElementHighlight;
|
|
125
|
+
readonly 'interaction.elementHighlightByX': typeof import("../interaction").ElementHighlightByX;
|
|
126
|
+
readonly 'interaction.elementHighlightByColor': typeof import("../interaction").ElementHighlightByColor;
|
|
127
|
+
readonly 'interaction.elementSelect': typeof import("../interaction").ElementSelect;
|
|
128
|
+
readonly 'interaction.elementSelectByX': typeof import("../interaction").ElementSelectByX;
|
|
129
|
+
readonly 'interaction.elementSelectByColor': typeof import("../interaction").ElementSelectByColor;
|
|
130
|
+
readonly 'interaction.fisheye': typeof import("../interaction").Fisheye;
|
|
131
|
+
readonly 'interaction.chartIndex': typeof import("../interaction").ChartIndex;
|
|
132
|
+
readonly 'interaction.tooltip': typeof import("../interaction").Tooltip;
|
|
133
|
+
readonly 'interaction.legendFilter': typeof import("../interaction").LegendFilter;
|
|
134
|
+
readonly 'interaction.legendHighlight': typeof import("../interaction").LegendHighlight;
|
|
135
|
+
readonly 'interaction.brushHighlight': typeof import("../interaction").BrushHighlight;
|
|
136
|
+
readonly 'interaction.brushXHighlight': typeof import("../interaction").BrushXHighlight;
|
|
137
|
+
readonly 'interaction.brushYHighlight': typeof import("../interaction").BrushYHighlight;
|
|
138
|
+
readonly 'interaction.brushAxisHighlight': typeof import("../interaction").BrushAxisHighlight;
|
|
139
|
+
readonly 'interaction.brushFilter': typeof import("../interaction").BrushFilter;
|
|
140
|
+
readonly 'interaction.brushXFilter': typeof import("../interaction").BrushXFilter;
|
|
141
|
+
readonly 'interaction.brushYFilter': typeof import("../interaction").BrushYFilter;
|
|
142
|
+
readonly 'interaction.sliderFilter': typeof import("../interaction").SliderFilter;
|
|
143
|
+
readonly 'interaction.scrollbarFilter': typeof import("../interaction").ScrollbarFilter;
|
|
144
|
+
readonly 'interaction.poptip': typeof import("../interaction").Poptip;
|
|
145
|
+
readonly 'interaction.event': typeof import("../interaction").Event;
|
|
146
|
+
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>;
|
|
147
|
+
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>;
|
|
148
|
+
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>;
|
|
149
|
+
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>;
|
|
150
|
+
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>;
|
|
151
|
+
readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>;
|
|
152
|
+
readonly 'composition.facetCircle': import("../runtime").CompositionComponent<import("..").FacetCircleComposition>;
|
|
153
|
+
readonly 'composition.timingKeyframe': import("../runtime").CompositionComponent<import("../composition").TimingKeyframeOptions>;
|
|
154
|
+
readonly 'labelTransform.overlapHide': import("../runtime").LabelTransformComponent<import("../label-transform").OverlapHideOptions>;
|
|
155
|
+
readonly 'labelTransform.overlapDodgeY': import("../runtime").LabelTransformComponent<import("../label-transform").OverlapDodgeYOptions>;
|
|
156
|
+
readonly 'labelTransform.overflowHide': import("../runtime").LabelTransformComponent<import("../label-transform").OverflowHideOptions>;
|
|
157
|
+
readonly 'labelTransform.contrastReverse': import("../runtime").LabelTransformComponent<import("../label-transform").ContrastReverseOptions>;
|
|
158
|
+
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>;
|
|
159
|
+
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>;
|
|
160
|
+
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>;
|
|
161
|
+
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>;
|
|
162
|
+
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>;
|
|
163
|
+
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>;
|
|
164
|
+
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>;
|
|
165
|
+
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>;
|
|
166
|
+
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>;
|
|
167
|
+
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>;
|
|
168
|
+
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>;
|
|
169
|
+
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>;
|
|
170
|
+
readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>;
|
|
171
|
+
};
|
|
3
172
|
export declare function register(key: `${G2ComponentNamespaces}.${any}`, component: G2Component): void;
|
package/lib/api/library.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = exports.library = void 0;
|
|
4
|
-
const
|
|
5
|
-
exports.library = (0,
|
|
4
|
+
const std_1 = require("../lib/std");
|
|
5
|
+
exports.library = (0, std_1.stdlib)();
|
|
6
6
|
// @todo Warn if override existing key.
|
|
7
7
|
function register(key, component) {
|
|
8
8
|
Object.assign(exports.library, { [key]: component });
|
package/lib/api/library.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"src/","sources":["api/library.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"src/","sources":["api/library.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AAGvB,QAAA,OAAO,GAAG,IAAA,YAAM,GAAE,CAAC;AAEhC,uCAAuC;AACvC,SAAgB,QAAQ,CACtB,GAAsC,EACtC,SAAsB;IAEtB,MAAM,CAAC,MAAM,CAAC,eAAO,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AAC/C,CAAC;AALD,4BAKC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DisplayObject } from '@antv/g';
|
|
2
|
+
import { G2MarkState, Scale } from '../runtime';
|
|
3
|
+
import { Mark as Spec } from '../spec';
|
|
4
|
+
import { Node } from './node';
|
|
5
|
+
import { markProps } from './props';
|
|
6
|
+
import { PropsOf } from './types';
|
|
7
|
+
export interface MarkNode extends PropsOf<typeof markProps, Spec, MarkNode> {
|
|
8
|
+
}
|
|
9
|
+
export declare class MarkNode extends Node<Spec & {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}> {
|
|
12
|
+
changeData(data: any): Promise<import("./runtime").Runtime<import("../spec").G2Spec>>;
|
|
13
|
+
/**
|
|
14
|
+
* Get mark from chart views.
|
|
15
|
+
*/
|
|
16
|
+
getMark(): G2MarkState;
|
|
17
|
+
/**
|
|
18
|
+
* Get all scales instance.
|
|
19
|
+
*/
|
|
20
|
+
getScale(): Record<string, Scale>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the scale instance by channel.
|
|
23
|
+
*/
|
|
24
|
+
getScaleByChannel(channel: string): Scale;
|
|
25
|
+
/**
|
|
26
|
+
* Get canvas group.
|
|
27
|
+
*/
|
|
28
|
+
getGroup(): DisplayObject;
|
|
29
|
+
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.MarkNode = void 0;
|
|
4
|
-
const node_1 = require("
|
|
5
|
-
|
|
10
|
+
const node_1 = require("./node");
|
|
11
|
+
const define_1 = require("./define");
|
|
12
|
+
const props_1 = require("./props");
|
|
13
|
+
let MarkNode = class MarkNode extends node_1.Node {
|
|
6
14
|
changeData(data) {
|
|
7
15
|
const chart = this.getRoot();
|
|
8
16
|
if (!chart)
|
|
@@ -53,6 +61,9 @@ class MarkNode extends node_1.Node {
|
|
|
53
61
|
const chartGroup = chart.getContext().canvas.getRoot();
|
|
54
62
|
return chartGroup.getElementById(key);
|
|
55
63
|
}
|
|
56
|
-
}
|
|
64
|
+
};
|
|
65
|
+
MarkNode = __decorate([
|
|
66
|
+
(0, define_1.defineProps)(props_1.markProps)
|
|
67
|
+
], MarkNode);
|
|
57
68
|
exports.MarkNode = MarkNode;
|
|
58
|
-
//# sourceMappingURL=
|
|
69
|
+
//# sourceMappingURL=mark.js.map
|
|
@@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AAE,0CAAE,OAAO,EAAE,CAAC;QAC5C,IAAI,CAAC,SAAS;YAAE,OAAO,SAAS,CAAC;QACjC,OAAO,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,0CAAG,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,GAAG;YAAE,OAAO,SAAS,CAAC;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACvD,OAAO,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;CACF,CAAA;AAjDY,QAAQ;IADpB,IAAA,oBAAW,EAAC,iBAAS,CAAC;GACV,QAAQ,CAiDpB;AAjDY,4BAAQ"}
|
package/lib/api/node.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Runtime } from './runtime';
|
|
2
2
|
/**
|
|
3
3
|
* Hierarchy container.
|
|
4
4
|
*/
|
|
@@ -36,5 +36,5 @@ export declare class Node<Value extends Record<string, any> = Record<string, any
|
|
|
36
36
|
* Apply specified callback to the node value.
|
|
37
37
|
*/
|
|
38
38
|
call(callback: (node: this, ...params: any[]) => any, ...params: any[]): this;
|
|
39
|
-
getRoot():
|
|
39
|
+
getRoot(): Runtime;
|
|
40
40
|
}
|
package/lib/api/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"src/","sources":["api/node.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAS,GAAG,CAAC,IAAU,EAAE,QAAmC;IAC1D,MAAM,UAAU,GAAW,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,UAAU,CAA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CAAC;QAC5C,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA+C,EAC/C,GAAG,MAAa;QAEhB,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,kCAAkC;QAClC,IAAI,IAAI,GAAS,IAAI,CAAC;QACtB,OAAO,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;YAC9B,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;SACxB;QACD,OAAO,IAAe,CAAC;IACzB,CAAC;CACF;AAlID,oBAkIC"}
|
package/lib/api/props.d.ts
CHANGED
|
@@ -1,13 +1,171 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare const commonProps: {
|
|
2
|
+
readonly encode: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
};
|
|
5
|
+
readonly scale: {
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
};
|
|
8
|
+
readonly data: {
|
|
9
|
+
readonly type: "value";
|
|
10
|
+
};
|
|
11
|
+
readonly transform: {
|
|
12
|
+
readonly type: "array";
|
|
13
|
+
};
|
|
14
|
+
readonly style: {
|
|
15
|
+
readonly type: "object";
|
|
16
|
+
};
|
|
17
|
+
readonly animate: {
|
|
18
|
+
readonly type: "object";
|
|
19
|
+
};
|
|
20
|
+
readonly coordinate: {
|
|
21
|
+
readonly type: "object";
|
|
22
|
+
};
|
|
23
|
+
readonly interaction: {
|
|
24
|
+
readonly type: "object";
|
|
25
|
+
};
|
|
26
|
+
readonly label: {
|
|
27
|
+
readonly type: "array";
|
|
28
|
+
readonly key: "labels";
|
|
29
|
+
};
|
|
30
|
+
readonly axis: {
|
|
31
|
+
readonly type: "object";
|
|
32
|
+
};
|
|
33
|
+
readonly legend: {
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
};
|
|
36
|
+
readonly slider: {
|
|
37
|
+
readonly type: "object";
|
|
38
|
+
};
|
|
39
|
+
readonly scrollbar: {
|
|
40
|
+
readonly type: "object";
|
|
41
|
+
};
|
|
42
|
+
readonly state: {
|
|
43
|
+
readonly type: "object";
|
|
44
|
+
};
|
|
45
|
+
readonly layout: {
|
|
46
|
+
readonly type: "object";
|
|
47
|
+
};
|
|
48
|
+
readonly theme: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
};
|
|
51
|
+
readonly title: {
|
|
52
|
+
readonly type: "value";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare const markProps: {
|
|
56
|
+
readonly tooltip: {
|
|
57
|
+
readonly type: "mix";
|
|
58
|
+
};
|
|
59
|
+
readonly viewStyle: {
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
};
|
|
62
|
+
readonly encode: {
|
|
63
|
+
readonly type: "object";
|
|
64
|
+
};
|
|
65
|
+
readonly scale: {
|
|
66
|
+
readonly type: "object";
|
|
67
|
+
};
|
|
68
|
+
readonly data: {
|
|
69
|
+
readonly type: "value";
|
|
70
|
+
};
|
|
71
|
+
readonly transform: {
|
|
72
|
+
readonly type: "array";
|
|
73
|
+
};
|
|
74
|
+
readonly style: {
|
|
75
|
+
readonly type: "object";
|
|
76
|
+
};
|
|
77
|
+
readonly animate: {
|
|
78
|
+
readonly type: "object";
|
|
79
|
+
};
|
|
80
|
+
readonly coordinate: {
|
|
81
|
+
readonly type: "object";
|
|
82
|
+
};
|
|
83
|
+
readonly interaction: {
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
};
|
|
86
|
+
readonly label: {
|
|
87
|
+
readonly type: "array";
|
|
88
|
+
readonly key: "labels";
|
|
89
|
+
};
|
|
90
|
+
readonly axis: {
|
|
91
|
+
readonly type: "object";
|
|
92
|
+
};
|
|
93
|
+
readonly legend: {
|
|
94
|
+
readonly type: "object";
|
|
95
|
+
};
|
|
96
|
+
readonly slider: {
|
|
97
|
+
readonly type: "object";
|
|
98
|
+
};
|
|
99
|
+
readonly scrollbar: {
|
|
100
|
+
readonly type: "object";
|
|
101
|
+
};
|
|
102
|
+
readonly state: {
|
|
103
|
+
readonly type: "object";
|
|
104
|
+
};
|
|
105
|
+
readonly layout: {
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
};
|
|
108
|
+
readonly theme: {
|
|
109
|
+
readonly type: "object";
|
|
110
|
+
};
|
|
111
|
+
readonly title: {
|
|
112
|
+
readonly type: "value";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export declare const compositionProps: {
|
|
116
|
+
readonly labelTransform: {
|
|
117
|
+
readonly type: "array";
|
|
118
|
+
};
|
|
119
|
+
readonly encode: {
|
|
120
|
+
readonly type: "object";
|
|
121
|
+
};
|
|
122
|
+
readonly scale: {
|
|
123
|
+
readonly type: "object";
|
|
124
|
+
};
|
|
125
|
+
readonly data: {
|
|
126
|
+
readonly type: "value";
|
|
127
|
+
};
|
|
128
|
+
readonly transform: {
|
|
129
|
+
readonly type: "array";
|
|
130
|
+
};
|
|
131
|
+
readonly style: {
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
};
|
|
134
|
+
readonly animate: {
|
|
135
|
+
readonly type: "object";
|
|
136
|
+
};
|
|
137
|
+
readonly coordinate: {
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
};
|
|
140
|
+
readonly interaction: {
|
|
141
|
+
readonly type: "object";
|
|
142
|
+
};
|
|
143
|
+
readonly label: {
|
|
144
|
+
readonly type: "array";
|
|
145
|
+
readonly key: "labels";
|
|
146
|
+
};
|
|
147
|
+
readonly axis: {
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
};
|
|
150
|
+
readonly legend: {
|
|
151
|
+
readonly type: "object";
|
|
152
|
+
};
|
|
153
|
+
readonly slider: {
|
|
154
|
+
readonly type: "object";
|
|
155
|
+
};
|
|
156
|
+
readonly scrollbar: {
|
|
157
|
+
readonly type: "object";
|
|
158
|
+
};
|
|
159
|
+
readonly state: {
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
};
|
|
162
|
+
readonly layout: {
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
};
|
|
165
|
+
readonly theme: {
|
|
166
|
+
readonly type: "object";
|
|
167
|
+
};
|
|
168
|
+
readonly title: {
|
|
169
|
+
readonly type: "value";
|
|
170
|
+
};
|
|
6
171
|
};
|
|
7
|
-
/**
|
|
8
|
-
* A decorator to define different type of attribute setter or
|
|
9
|
-
* getter for current node.
|
|
10
|
-
*/
|
|
11
|
-
export declare function defineProps(descriptors: NodePropertyDescriptor[]): (Node: any) => any;
|
|
12
|
-
export declare function nodeProps(node: Record<string, new (...args: any[]) => any>): NodePropertyDescriptor[];
|
|
13
|
-
export declare function containerProps(node: Record<string, new (...args: any[]) => any>): NodePropertyDescriptor[];
|
package/lib/api/props.js
CHANGED
|
@@ -1,109 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return this.attr(k);
|
|
26
|
-
if (arguments.length === 1 && typeof key !== 'string') {
|
|
27
|
-
return this.attr(k, key);
|
|
28
|
-
}
|
|
29
|
-
const obj = this.attr(k) || {};
|
|
30
|
-
obj[key] = arguments.length === 1 ? true : value;
|
|
31
|
-
return this.attr(k, obj);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function defineMixProp(Node, { name }) {
|
|
35
|
-
Node.prototype[name] = function (key) {
|
|
36
|
-
if (arguments.length === 0)
|
|
37
|
-
return this.attr(name);
|
|
38
|
-
if (Array.isArray(key))
|
|
39
|
-
return this.attr(name, { items: key });
|
|
40
|
-
if ((0, helper_1.isStrictObject)(key) &&
|
|
41
|
-
(key.title !== undefined || key.items !== undefined)) {
|
|
42
|
-
return this.attr(name, key);
|
|
43
|
-
}
|
|
44
|
-
if (key === null || key === false)
|
|
45
|
-
return this.attr(name, key);
|
|
46
|
-
const obj = this.attr(name) || {};
|
|
47
|
-
const { items = [] } = obj;
|
|
48
|
-
items.push(key);
|
|
49
|
-
obj.items = items;
|
|
50
|
-
return this.attr(name, obj);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function defineNodeProp(Node, { name, ctor }) {
|
|
54
|
-
Node.prototype[name] = function (hocMark) {
|
|
55
|
-
const node = this.append(ctor);
|
|
56
|
-
if (name === 'mark') {
|
|
57
|
-
node.type = hocMark;
|
|
58
|
-
}
|
|
59
|
-
return node;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function defineContainerProp(Node, { name, ctor }) {
|
|
63
|
-
Node.prototype[name] = function () {
|
|
64
|
-
this.type = null;
|
|
65
|
-
return this.append(ctor);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* A decorator to define different type of attribute setter or
|
|
70
|
-
* getter for current node.
|
|
71
|
-
*/
|
|
72
|
-
function defineProps(descriptors) {
|
|
73
|
-
return (Node) => {
|
|
74
|
-
for (const descriptor of descriptors) {
|
|
75
|
-
const { type } = descriptor;
|
|
76
|
-
if (type === 'value')
|
|
77
|
-
defineValueProp(Node, descriptor);
|
|
78
|
-
else if (type === 'array')
|
|
79
|
-
defineArrayProp(Node, descriptor);
|
|
80
|
-
else if (type === 'object')
|
|
81
|
-
defineObjectProp(Node, descriptor);
|
|
82
|
-
else if (type === 'node')
|
|
83
|
-
defineNodeProp(Node, descriptor);
|
|
84
|
-
else if (type === 'container')
|
|
85
|
-
defineContainerProp(Node, descriptor);
|
|
86
|
-
else if (type === 'mix')
|
|
87
|
-
defineMixProp(Node, descriptor);
|
|
88
|
-
}
|
|
89
|
-
return Node;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
exports.defineProps = defineProps;
|
|
93
|
-
function nodeProps(node) {
|
|
94
|
-
return Object.entries(node).map(([name, ctor]) => ({
|
|
95
|
-
type: 'node',
|
|
96
|
-
name,
|
|
97
|
-
ctor,
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
exports.nodeProps = nodeProps;
|
|
101
|
-
function containerProps(node) {
|
|
102
|
-
return Object.entries(node).map(([name, ctor]) => ({
|
|
103
|
-
type: 'container',
|
|
104
|
-
name,
|
|
105
|
-
ctor,
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
exports.containerProps = containerProps;
|
|
3
|
+
exports.compositionProps = exports.markProps = exports.commonProps = void 0;
|
|
4
|
+
exports.commonProps = {
|
|
5
|
+
encode: { type: 'object' },
|
|
6
|
+
scale: { type: 'object' },
|
|
7
|
+
data: { type: 'value' },
|
|
8
|
+
transform: { type: 'array' },
|
|
9
|
+
style: { type: 'object' },
|
|
10
|
+
animate: { type: 'object' },
|
|
11
|
+
coordinate: { type: 'object' },
|
|
12
|
+
interaction: { type: 'object' },
|
|
13
|
+
label: { type: 'array', key: 'labels' },
|
|
14
|
+
axis: { type: 'object' },
|
|
15
|
+
legend: { type: 'object' },
|
|
16
|
+
slider: { type: 'object' },
|
|
17
|
+
scrollbar: { type: 'object' },
|
|
18
|
+
state: { type: 'object' },
|
|
19
|
+
layout: { type: 'object' },
|
|
20
|
+
theme: { type: 'object' },
|
|
21
|
+
title: { type: 'value' },
|
|
22
|
+
};
|
|
23
|
+
exports.markProps = Object.assign(Object.assign({}, exports.commonProps), { tooltip: { type: 'mix' }, viewStyle: { type: 'object' } });
|
|
24
|
+
exports.compositionProps = Object.assign(Object.assign({}, exports.commonProps), { labelTransform: { type: 'array' } });
|
|
109
25
|
//# sourceMappingURL=props.js.map
|
package/lib/api/props.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sourceRoot":"src/","sources":["api/props.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"src/","sources":["api/props.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;IACvB,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;IAC5B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC3B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE;IACvC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC7B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;CAChB,CAAC;AAEE,QAAA,SAAS,GAAG,gCACpB,mBAAW,KACd,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EACxB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GACrB,CAAC;AA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