@antv/g2 5.0.18 → 5.0.20
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 +175 -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 +10 -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 +171 -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/data/index.d.ts +2 -0
- package/esm/data/index.js +1 -0
- package/esm/data/index.js.map +1 -1
- package/esm/data/log.d.ts +7 -0
- package/esm/data/log.js +11 -0
- package/esm/data/log.js.map +1 -0
- package/esm/index.d.ts +4 -3
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/interaction/brushFilter.js +18 -16
- package/esm/interaction/brushFilter.js.map +1 -1
- package/esm/interaction/chartIndex.js +25 -22
- package/esm/interaction/chartIndex.js.map +1 -1
- package/esm/interaction/fisheye.js +17 -13
- package/esm/interaction/fisheye.js.map +1 -1
- package/esm/interaction/legendFilter.js +32 -26
- package/esm/interaction/legendFilter.js.map +1 -1
- package/esm/interaction/sliderFilter.js +8 -9
- package/esm/interaction/sliderFilter.js.map +1 -1
- package/esm/interaction/tooltip.d.ts +1 -1
- package/esm/interaction/tooltip.js +39 -4
- package/esm/interaction/tooltip.js.map +1 -1
- package/esm/label-transform/overlapDodgeY.js.map +1 -1
- package/esm/lib/core.d.ts +159 -0
- package/esm/lib/core.js +175 -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 +171 -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 +32 -13
- 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/dataTransform.d.ts +3 -2
- package/esm/spec/index.d.ts +1 -0
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/interaction.d.ts +4 -1
- 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 +175 -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 +10 -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 +171 -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/data/index.d.ts +2 -0
- package/lib/data/index.js +3 -1
- package/lib/data/index.js.map +1 -1
- package/lib/data/log.d.ts +7 -0
- package/lib/data/log.js +15 -0
- package/lib/data/log.js.map +1 -0
- package/lib/index.d.ts +4 -3
- package/lib/index.js +8 -3
- package/lib/index.js.map +1 -1
- package/lib/interaction/brushFilter.js +18 -16
- package/lib/interaction/brushFilter.js.map +1 -1
- package/lib/interaction/chartIndex.js +25 -22
- package/lib/interaction/chartIndex.js.map +1 -1
- package/lib/interaction/fisheye.js +17 -13
- package/lib/interaction/fisheye.js.map +1 -1
- package/lib/interaction/legendFilter.js +32 -26
- package/lib/interaction/legendFilter.js.map +1 -1
- package/lib/interaction/sliderFilter.js +8 -9
- package/lib/interaction/sliderFilter.js.map +1 -1
- package/lib/interaction/tooltip.d.ts +1 -1
- package/lib/interaction/tooltip.js +38 -3
- package/lib/interaction/tooltip.js.map +1 -1
- package/lib/label-transform/overlapDodgeY.js.map +1 -1
- package/lib/lib/core.d.ts +159 -0
- package/lib/lib/core.js +179 -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 +171 -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 +32 -13
- 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/dataTransform.d.ts +3 -2
- package/lib/spec/index.d.ts +1 -0
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/interaction.d.ts +4 -1
- 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 +36 -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/data/index.ts +2 -0
- package/src/data/log.ts +16 -0
- package/src/index.ts +12 -3
- package/src/interaction/brushFilter.ts +31 -28
- package/src/interaction/chartIndex.ts +26 -23
- package/src/interaction/fisheye.ts +16 -12
- package/src/interaction/legendFilter.ts +45 -40
- package/src/interaction/sliderFilter.ts +15 -16
- package/src/interaction/tooltip.ts +47 -3
- package/src/label-transform/overlapDodgeY.ts +0 -1
- package/src/{stdlib/index.ts → lib/core.ts} +76 -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 +41 -17
- 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/dataTransform.ts +5 -0
- package/src/spec/index.ts +1 -0
- package/src/spec/interaction.ts +5 -1
- 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/chart.d.ts
CHANGED
|
@@ -1,86 +1,176 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { NodePropertyDescriptor } from './props';
|
|
6
|
-
import { ValueAttribute, Concrete, ArrayAttribute, ObjectAttribute } from './types';
|
|
7
|
-
import { Mark } from './mark';
|
|
8
|
-
import { Composition, View } from './composition';
|
|
9
|
-
export declare const G2_CHART_KEY = "G2_CHART_KEY";
|
|
10
|
-
export type ChartOptions = ViewComposition & {
|
|
11
|
-
container?: string | HTMLElement;
|
|
12
|
-
canvas?: GCanvas;
|
|
13
|
-
width?: number;
|
|
14
|
-
height?: number;
|
|
15
|
-
autoFit?: boolean;
|
|
16
|
-
renderer?: IRenderer;
|
|
17
|
-
plugins?: RendererPlugin[];
|
|
18
|
-
theme?: string;
|
|
19
|
-
};
|
|
20
|
-
type ChartProps = Concrete<ViewComposition>;
|
|
21
|
-
export interface Chart extends Composition, Mark {
|
|
22
|
-
data: ValueAttribute<ChartProps['data'], Chart>;
|
|
23
|
-
width: ValueAttribute<ChartProps['width'], Chart>;
|
|
24
|
-
height: ValueAttribute<ChartProps['height'], Chart>;
|
|
25
|
-
coordinate: ValueAttribute<ChartProps['coordinate'], Chart>;
|
|
26
|
-
interaction: ObjectAttribute<ChartProps['interaction'], Chart>;
|
|
27
|
-
key: ValueAttribute<ChartProps['key'], Chart>;
|
|
28
|
-
transform: ArrayAttribute<ChartProps['transform'], Chart>;
|
|
29
|
-
theme: ObjectAttribute<ChartProps['theme'], Chart>;
|
|
30
|
-
title: ValueAttribute<ChartProps['title'], Chart>;
|
|
31
|
-
scale: ObjectAttribute<ChartOptions['scale'], Chart>;
|
|
32
|
-
axis: ObjectAttribute<ChartOptions['axis'], Chart>;
|
|
33
|
-
legend: ObjectAttribute<ChartOptions['legend'], Chart>;
|
|
34
|
-
style: ObjectAttribute<ChartOptions['style'], Chart>;
|
|
35
|
-
labelTransform: ArrayAttribute<ChartOptions['labelTransform'], Chart>;
|
|
1
|
+
import { G2Spec } from '../spec';
|
|
2
|
+
import { API } from './extend';
|
|
3
|
+
import { library } from './library';
|
|
4
|
+
export interface Chart extends API<G2Spec, typeof library> {
|
|
36
5
|
}
|
|
37
|
-
export declare const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
6
|
+
export declare const Chart: new (options?: import("./runtime").RuntimeOptions) => API<G2Spec, {
|
|
7
|
+
readonly 'data.fetch': import("../runtime").DataComponent<import("../data").FetchOptions>;
|
|
8
|
+
readonly 'data.inline': import("../runtime").DataComponent<import("../data").InlineOptions>;
|
|
9
|
+
readonly 'data.sortBy': import("../runtime").DataComponent<import("../data").SortByOptions>;
|
|
10
|
+
readonly 'data.sort': import("../runtime").DataComponent<import("../data").SortOptions>;
|
|
11
|
+
readonly 'data.filter': import("../runtime").DataComponent<import("../data").FilterDataOptions>;
|
|
12
|
+
readonly 'data.pick': import("../runtime").DataComponent<import("../data").PickOptions>;
|
|
13
|
+
readonly 'data.rename': import("../runtime").DataComponent<import("../data").RenameOptions>;
|
|
14
|
+
readonly 'data.fold': import("../runtime").DataComponent<import("../data").FoldOptions>;
|
|
15
|
+
readonly 'data.slice': import("../runtime").DataComponent<import("../data").SliceOptions>;
|
|
16
|
+
readonly 'data.custom': import("../runtime").DataComponent<import("../data").CustomOptions>;
|
|
17
|
+
readonly 'data.map': import("../runtime").DataComponent<import("../data").MapOptions>;
|
|
18
|
+
readonly 'data.join': import("../runtime").DataComponent<import("../data").JoinOptions>;
|
|
19
|
+
readonly 'data.kde': import("../runtime").DataComponent<import("../data").KDEOptions>;
|
|
20
|
+
readonly 'data.log': import("../runtime").DataComponent<import("../data").LogDataOptions>;
|
|
21
|
+
readonly 'transform.stackY': import("../runtime").TransformComponent<import("../transform").StackYOptions>;
|
|
22
|
+
readonly 'transform.binX': import("../runtime").TransformComponent<import("../transform").BinXOptions>;
|
|
23
|
+
readonly 'transform.bin': import("../runtime").TransformComponent<import("../transform").BinOptions>;
|
|
24
|
+
readonly 'transform.dodgeX': import("../runtime").TransformComponent<import("../transform").DodgeXOptions>;
|
|
25
|
+
readonly 'transform.jitter': import("../runtime").TransformComponent<import("../transform").JitterOptions>;
|
|
26
|
+
readonly 'transform.jitterX': import("../runtime").TransformComponent<import("../transform").JitterXOptions>;
|
|
27
|
+
readonly 'transform.symmetryY': import("../runtime").TransformComponent<import("../transform").SymmetryYOptions>;
|
|
28
|
+
readonly 'transform.diffY': import("../runtime").TransformComponent<import("../transform").DiffYOptions>;
|
|
29
|
+
readonly 'transform.stackEnter': import("../runtime").TransformComponent<import("../transform").StackEnterOptions>;
|
|
30
|
+
readonly 'transform.normalizeY': import("../runtime").TransformComponent<import("../transform").NormalizeYOptions>;
|
|
31
|
+
readonly 'transform.select': import("../runtime").TransformComponent<import("../transform").SelectOptions>;
|
|
32
|
+
readonly 'transform.selectX': import("../runtime").TransformComponent<import("../transform").SelectXOptions>;
|
|
33
|
+
readonly 'transform.selectY': import("../runtime").TransformComponent<import("../transform").SelectYOptions>;
|
|
34
|
+
readonly 'transform.groupX': import("../runtime").TransformComponent<import("../transform").GroupXOptions>;
|
|
35
|
+
readonly 'transform.groupY': import("../runtime").TransformComponent<import("../transform").GroupYOptions>;
|
|
36
|
+
readonly 'transform.groupColor': import("../runtime").TransformComponent<import("../transform").GroupColorOptions>;
|
|
37
|
+
readonly 'transform.group': import("../runtime").TransformComponent<import("../transform").GroupOptions>;
|
|
38
|
+
readonly 'transform.sortX': import("../runtime").TransformComponent<import("../transform").SortXOptions>;
|
|
39
|
+
readonly 'transform.sortY': import("../runtime").TransformComponent<import("../transform").SortYOptions>;
|
|
40
|
+
readonly 'transform.sortColor': import("../runtime").TransformComponent<import("../transform").SortColorOptions>;
|
|
41
|
+
readonly 'transform.flexX': import("../runtime").TransformComponent<import("../transform").FlexXOptions>;
|
|
42
|
+
readonly 'transform.pack': import("../runtime").TransformComponent<import("../transform").PackOptions>;
|
|
43
|
+
readonly 'transform.sample': import("../runtime").TransformComponent<import("../transform").SampleOptions>;
|
|
44
|
+
readonly 'transform.filter': import("../runtime").TransformComponent<import("../transform").FilterOptions>;
|
|
45
|
+
readonly 'coordinate.cartesian': import("../runtime").CoordinateComponent<import("../coordinate").CartesianOptions>;
|
|
46
|
+
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>;
|
|
47
|
+
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("../spec").HelixCoordinate>;
|
|
48
|
+
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>;
|
|
49
|
+
readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("../spec").ThetaCoordinate>;
|
|
50
|
+
readonly 'coordinate.parallel': import("../runtime").CoordinateComponent<import("../coordinate").ParallelOptions>;
|
|
51
|
+
readonly 'coordinate.fisheye': import("../runtime").CoordinateComponent<import("../spec").FisheyeCoordinate>;
|
|
52
|
+
readonly 'coordinate.radial': import("../runtime").CoordinateComponent<import("../coordinate").RadialOptions>;
|
|
53
|
+
readonly 'coordinate.radar': import("../runtime").CoordinateComponent<import("../spec").RadarCoordinate>;
|
|
54
|
+
readonly 'encode.constant': import("../runtime").EncodeComponent<import("../encode").ConstantOptions>;
|
|
55
|
+
readonly 'encode.field': import("../runtime").EncodeComponent<import("../encode").FieldOptions>;
|
|
56
|
+
readonly 'encode.transform': import("../runtime").EncodeComponent<import("../encode").TransformOptions>;
|
|
57
|
+
readonly 'encode.column': import("../runtime").EncodeComponent<import("../encode").ColumnOptions>;
|
|
58
|
+
readonly 'mark.interval': import("../runtime").MarkComponent<import("..").IntervalOptions>;
|
|
59
|
+
readonly 'mark.rect': import("../runtime").MarkComponent<import("..").RectOptions>;
|
|
60
|
+
readonly 'mark.line': import("../runtime").MarkComponent<import("..").LineOptions>;
|
|
61
|
+
readonly 'mark.point': import("../runtime").MarkComponent<import("..").PointOptions>;
|
|
62
|
+
readonly 'mark.text': import("../runtime").MarkComponent<import("..").TextOptions>;
|
|
63
|
+
readonly 'mark.cell': import("../runtime").MarkComponent<import("..").CellOptions>;
|
|
64
|
+
readonly 'mark.area': import("../runtime").MarkComponent<import("..").AreaOptions>;
|
|
65
|
+
readonly 'mark.link': import("../runtime").MarkComponent<import("..").LinkOptions>;
|
|
66
|
+
readonly 'mark.image': import("../runtime").MarkComponent<import("..").ImageOptions>;
|
|
67
|
+
readonly 'mark.polygon': import("../runtime").MarkComponent<import("..").PolygonOptions>;
|
|
68
|
+
readonly 'mark.box': import("../runtime").MarkComponent<import("..").BoxOptions>;
|
|
69
|
+
readonly 'mark.vector': import("../runtime").MarkComponent<import("..").VectorOptions>;
|
|
70
|
+
readonly 'mark.lineX': import("../runtime").MarkComponent<import("..").LineXOptions>;
|
|
71
|
+
readonly 'mark.lineY': import("../runtime").MarkComponent<import("..").LineYOptions>;
|
|
72
|
+
readonly 'mark.connector': import("../runtime").MarkComponent<import("..").ConnectorOptions>;
|
|
73
|
+
readonly 'mark.range': import("../runtime").MarkComponent<import("..").RangeOptions>;
|
|
74
|
+
readonly 'mark.rangeX': import("../runtime").MarkComponent<import("..").RangeXOptions>;
|
|
75
|
+
readonly 'mark.rangeY': import("../runtime").MarkComponent<import("..").RangeYOptions>;
|
|
76
|
+
readonly 'mark.path': import("../runtime").MarkComponent<import("../mark/path").PathOptions>;
|
|
77
|
+
readonly 'mark.shape': import("../runtime").MarkComponent<import("..").ShapeOptions>;
|
|
78
|
+
readonly 'mark.density': import("../runtime").MarkComponent<import("..").DensityOptions>;
|
|
79
|
+
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>;
|
|
80
|
+
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>;
|
|
81
|
+
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>;
|
|
82
|
+
readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>;
|
|
83
|
+
readonly 'scale.linear': import("../runtime").ScaleComponent<import("../scale").LinearOptions>;
|
|
84
|
+
readonly 'scale.ordinal': import("../runtime").ScaleComponent<import("../scale").OrdinalOptions>;
|
|
85
|
+
readonly 'scale.band': import("../runtime").ScaleComponent<import("../scale").BandOptions>;
|
|
86
|
+
readonly 'scale.identity': import("../runtime").ScaleComponent<import("../scale").IdentityOptions>;
|
|
87
|
+
readonly 'scale.point': import("../runtime").ScaleComponent<import("../scale").PointOptions>;
|
|
88
|
+
readonly 'scale.time': import("../runtime").ScaleComponent<import("../scale").TimeOptions>;
|
|
89
|
+
readonly 'scale.log': import("../runtime").ScaleComponent<import("../scale").LogOptions>;
|
|
90
|
+
readonly 'scale.pow': import("../runtime").ScaleComponent<import("../scale").PowOptions>;
|
|
91
|
+
readonly 'scale.sqrt': import("../runtime").ScaleComponent<import("../scale").SqrtOptions>;
|
|
92
|
+
readonly 'scale.threshold': import("../runtime").ScaleComponent<import("../scale").ThresholdOptions>;
|
|
93
|
+
readonly 'scale.quantile': import("../runtime").ScaleComponent<import("../scale").QuantileOptions>;
|
|
94
|
+
readonly 'scale.quantize': import("../runtime").ScaleComponent<import("../scale").QuantizeOptions>;
|
|
95
|
+
readonly 'scale.sequential': import("../runtime").ScaleComponent<import("../scale").SequentialOptions>;
|
|
96
|
+
readonly 'scale.constant': import("../runtime").ScaleComponent<import("../scale").ConstantOptions>;
|
|
97
|
+
readonly 'theme.classic': import("../runtime").ThemeComponent<import("../runtime").G2Theme>;
|
|
98
|
+
readonly 'theme.classicDark': import("../runtime").ThemeComponent<import("../runtime").G2Theme>;
|
|
99
|
+
readonly 'theme.academy': import("../runtime").ThemeComponent<import("../runtime").G2Theme>;
|
|
100
|
+
readonly 'component.axisX': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
101
|
+
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
102
|
+
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>;
|
|
103
|
+
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
104
|
+
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>;
|
|
105
|
+
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>;
|
|
106
|
+
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
107
|
+
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
108
|
+
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
109
|
+
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>;
|
|
110
|
+
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>;
|
|
111
|
+
readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>;
|
|
112
|
+
readonly 'component.sliderX': import("../runtime").GuideComponentComponent<import("../component/slider").SliderOptions>;
|
|
113
|
+
readonly 'component.sliderY': import("../runtime").GuideComponentComponent<import("../component/slider").SliderOptions>;
|
|
114
|
+
readonly 'component.scrollbarX': import("../runtime").GuideComponentComponent<import("../component/scrollbar").ScrollbarOptions>;
|
|
115
|
+
readonly 'component.scrollbarY': import("../runtime").GuideComponentComponent<import("../component/scrollbar").ScrollbarOptions>;
|
|
116
|
+
readonly 'animation.scaleInX': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
117
|
+
readonly 'animation.scaleOutX': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
118
|
+
readonly 'animation.scaleInY': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
119
|
+
readonly 'animation.scaleOutY': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
120
|
+
readonly 'animation.waveIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
121
|
+
readonly 'animation.fadeIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
122
|
+
readonly 'animation.fadeOut': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
123
|
+
readonly 'animation.zoomIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
124
|
+
readonly 'animation.zoomOut': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
125
|
+
readonly 'animation.pathIn': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
126
|
+
readonly 'animation.morphing': import("../runtime").AnimationComponent<import("../animation").MorphingOptions>;
|
|
127
|
+
readonly 'animation.growInX': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
128
|
+
readonly 'animation.growInY': import("../runtime").AnimationComponent<import("../animation/types").Animation>;
|
|
129
|
+
readonly 'interaction.elementHighlight': typeof import("../interaction").ElementHighlight;
|
|
130
|
+
readonly 'interaction.elementHighlightByX': typeof import("../interaction").ElementHighlightByX;
|
|
131
|
+
readonly 'interaction.elementHighlightByColor': typeof import("../interaction").ElementHighlightByColor;
|
|
132
|
+
readonly 'interaction.elementSelect': typeof import("../interaction").ElementSelect;
|
|
133
|
+
readonly 'interaction.elementSelectByX': typeof import("../interaction").ElementSelectByX;
|
|
134
|
+
readonly 'interaction.elementSelectByColor': typeof import("../interaction").ElementSelectByColor;
|
|
135
|
+
readonly 'interaction.fisheye': typeof import("../interaction").Fisheye;
|
|
136
|
+
readonly 'interaction.chartIndex': typeof import("../interaction").ChartIndex;
|
|
137
|
+
readonly 'interaction.tooltip': typeof import("../interaction").Tooltip;
|
|
138
|
+
readonly 'interaction.legendFilter': typeof import("../interaction").LegendFilter;
|
|
139
|
+
readonly 'interaction.legendHighlight': typeof import("../interaction").LegendHighlight;
|
|
140
|
+
readonly 'interaction.brushHighlight': typeof import("../interaction").BrushHighlight;
|
|
141
|
+
readonly 'interaction.brushXHighlight': typeof import("../interaction").BrushXHighlight;
|
|
142
|
+
readonly 'interaction.brushYHighlight': typeof import("../interaction").BrushYHighlight;
|
|
143
|
+
readonly 'interaction.brushAxisHighlight': typeof import("../interaction").BrushAxisHighlight;
|
|
144
|
+
readonly 'interaction.brushFilter': typeof import("../interaction").BrushFilter;
|
|
145
|
+
readonly 'interaction.brushXFilter': typeof import("../interaction").BrushXFilter;
|
|
146
|
+
readonly 'interaction.brushYFilter': typeof import("../interaction").BrushYFilter;
|
|
147
|
+
readonly 'interaction.sliderFilter': typeof import("../interaction").SliderFilter;
|
|
148
|
+
readonly 'interaction.scrollbarFilter': typeof import("../interaction").ScrollbarFilter;
|
|
149
|
+
readonly 'interaction.poptip': typeof import("../interaction").Poptip;
|
|
150
|
+
readonly 'interaction.event': typeof import("../interaction").Event;
|
|
151
|
+
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>;
|
|
152
|
+
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>;
|
|
153
|
+
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>;
|
|
154
|
+
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>;
|
|
155
|
+
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>;
|
|
156
|
+
readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("../spec").RepeatMatrixComposition>;
|
|
157
|
+
readonly 'composition.facetCircle': import("../runtime").CompositionComponent<import("../spec").FacetCircleComposition>;
|
|
158
|
+
readonly 'composition.timingKeyframe': import("../runtime").CompositionComponent<import("../composition").TimingKeyframeOptions>;
|
|
159
|
+
readonly 'labelTransform.overlapHide': import("../runtime").LabelTransformComponent<import("../label-transform").OverlapHideOptions>;
|
|
160
|
+
readonly 'labelTransform.overlapDodgeY': import("../runtime").LabelTransformComponent<import("../label-transform").OverlapDodgeYOptions>;
|
|
161
|
+
readonly 'labelTransform.overflowHide': import("../runtime").LabelTransformComponent<import("../label-transform").OverflowHideOptions>;
|
|
162
|
+
readonly 'labelTransform.contrastReverse': import("../runtime").LabelTransformComponent<import("../label-transform").ContrastReverseOptions>;
|
|
163
|
+
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>;
|
|
164
|
+
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>;
|
|
165
|
+
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>;
|
|
166
|
+
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>;
|
|
167
|
+
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>;
|
|
168
|
+
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>;
|
|
169
|
+
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>;
|
|
170
|
+
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>;
|
|
171
|
+
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>;
|
|
172
|
+
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>;
|
|
173
|
+
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>;
|
|
174
|
+
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>;
|
|
175
|
+
readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>;
|
|
176
|
+
}>;
|
package/lib/api/chart.js
CHANGED
|
@@ -1,267 +1,8 @@
|
|
|
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
|
-
};
|
|
8
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
9
|
-
var t = {};
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
13
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
14
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
15
|
-
t[p[i]] = s[p[i]];
|
|
16
|
-
}
|
|
17
|
-
return t;
|
|
18
|
-
};
|
|
19
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
|
-
};
|
|
22
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.Chart =
|
|
24
|
-
const
|
|
25
|
-
const g_canvas_1 = require("@antv/g-canvas");
|
|
26
|
-
const g_plugin_dragndrop_1 = require("@antv/g-plugin-dragndrop");
|
|
27
|
-
const util_1 = require("@antv/util");
|
|
28
|
-
const event_emitter_1 = __importDefault(require("@antv/event-emitter"));
|
|
29
|
-
const runtime_1 = require("../runtime");
|
|
30
|
-
const event_1 = require("../utils/event");
|
|
31
|
-
const props_1 = require("./props");
|
|
32
|
-
const mark_1 = require("./mark");
|
|
33
|
-
const composition_1 = require("./composition");
|
|
3
|
+
exports.Chart = void 0;
|
|
4
|
+
const extend_1 = require("./extend");
|
|
34
5
|
const library_1 = require("./library");
|
|
35
|
-
const
|
|
36
|
-
exports.
|
|
37
|
-
exports.props = [
|
|
38
|
-
{ name: 'data', type: 'value' },
|
|
39
|
-
{ name: 'width', type: 'value' },
|
|
40
|
-
{ name: 'height', type: 'value' },
|
|
41
|
-
{ name: 'coordinate', type: 'value' },
|
|
42
|
-
{ name: 'interaction', type: 'object' },
|
|
43
|
-
{ name: 'theme', type: 'object' },
|
|
44
|
-
{ name: 'title', type: 'value' },
|
|
45
|
-
{ name: 'transform', type: 'array' },
|
|
46
|
-
{ name: 'scale', type: 'object' },
|
|
47
|
-
{ name: 'axis', type: 'object' },
|
|
48
|
-
{ name: 'legend', type: 'object' },
|
|
49
|
-
{ name: 'style', type: 'object' },
|
|
50
|
-
{ name: 'labelTransform', type: 'array' },
|
|
51
|
-
...(0, props_1.nodeProps)(mark_1.mark),
|
|
52
|
-
...(0, props_1.containerProps)(composition_1.composition),
|
|
53
|
-
];
|
|
54
|
-
let Chart = class Chart extends composition_1.View {
|
|
55
|
-
constructor(options) {
|
|
56
|
-
const _a = options || {}, { container, canvas, renderer, plugins } = _a, rest = __rest(_a, ["container", "canvas", "renderer", "plugins"]);
|
|
57
|
-
super(rest, 'view');
|
|
58
|
-
// Identifies whether bindAutoFit.
|
|
59
|
-
this._hasBindAutoFit = false;
|
|
60
|
-
this._rendering = false;
|
|
61
|
-
this._trailing = false;
|
|
62
|
-
this._trailingResolve = null;
|
|
63
|
-
this._trailingReject = null;
|
|
64
|
-
this._previousDefinedType = null;
|
|
65
|
-
this._onResize = (0, util_1.debounce)(() => {
|
|
66
|
-
this.forceFit();
|
|
67
|
-
}, 300);
|
|
68
|
-
this._renderer = renderer || new g_canvas_1.Renderer();
|
|
69
|
-
this._plugins = plugins || [];
|
|
70
|
-
this._container = (0, utils_1.normalizeContainer)(container);
|
|
71
|
-
this._emitter = new event_emitter_1.default();
|
|
72
|
-
this._context = { library: library_1.library, emitter: this._emitter, canvas };
|
|
73
|
-
}
|
|
74
|
-
render() {
|
|
75
|
-
if (this._rendering)
|
|
76
|
-
return this._addToTrailing();
|
|
77
|
-
if (!this._context.canvas)
|
|
78
|
-
this._createCanvas();
|
|
79
|
-
this._bindAutoFit();
|
|
80
|
-
this._rendering = true;
|
|
81
|
-
const finished = new Promise((resolve, reject) => (0, runtime_1.render)(this._computedOptions(), this._context, this._createResolve(resolve), this._createReject(reject)));
|
|
82
|
-
const [finished1, resolve, reject] = (0, utils_1.createEmptyPromise)();
|
|
83
|
-
finished
|
|
84
|
-
.then(resolve)
|
|
85
|
-
.catch(reject)
|
|
86
|
-
.then(() => this._renderTrailing());
|
|
87
|
-
return finished1;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* @overload
|
|
91
|
-
* @param {G2ViewTree} [options]
|
|
92
|
-
* @returns {Chart|G2ViewTree}
|
|
93
|
-
*/
|
|
94
|
-
options(options) {
|
|
95
|
-
if (arguments.length === 0)
|
|
96
|
-
return (0, utils_1.optionsOf)(this);
|
|
97
|
-
const { type } = options;
|
|
98
|
-
if (type)
|
|
99
|
-
this._previousDefinedType = type;
|
|
100
|
-
(0, utils_1.updateRoot)(this, options, this._previousDefinedType);
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
getContainer() {
|
|
104
|
-
return this._container;
|
|
105
|
-
}
|
|
106
|
-
getContext() {
|
|
107
|
-
return this._context;
|
|
108
|
-
}
|
|
109
|
-
on(event, callback, once) {
|
|
110
|
-
this._emitter.on(event, callback, once);
|
|
111
|
-
return this;
|
|
112
|
-
}
|
|
113
|
-
once(event, callback) {
|
|
114
|
-
this._emitter.once(event, callback);
|
|
115
|
-
return this;
|
|
116
|
-
}
|
|
117
|
-
emit(event, ...args) {
|
|
118
|
-
this._emitter.emit(event, ...args);
|
|
119
|
-
return this;
|
|
120
|
-
}
|
|
121
|
-
off(event, callback) {
|
|
122
|
-
this._emitter.off(event, callback);
|
|
123
|
-
return this;
|
|
124
|
-
}
|
|
125
|
-
clear() {
|
|
126
|
-
const options = this.options();
|
|
127
|
-
this.emit(event_1.ChartEvent.BEFORE_CLEAR);
|
|
128
|
-
this._reset();
|
|
129
|
-
(0, runtime_1.destroy)(options, this._context, false);
|
|
130
|
-
this.emit(event_1.ChartEvent.AFTER_CLEAR);
|
|
131
|
-
}
|
|
132
|
-
destroy() {
|
|
133
|
-
const options = this.options();
|
|
134
|
-
this.emit(event_1.ChartEvent.BEFORE_DESTROY);
|
|
135
|
-
this._unbindAutoFit();
|
|
136
|
-
this._reset();
|
|
137
|
-
(0, runtime_1.destroy)(options, this._context, true);
|
|
138
|
-
(0, utils_1.removeContainer)(this._container);
|
|
139
|
-
this.emit(event_1.ChartEvent.AFTER_DESTROY);
|
|
140
|
-
}
|
|
141
|
-
forceFit() {
|
|
142
|
-
// Don't fit if size do not change.
|
|
143
|
-
this.options['autoFit'] = true;
|
|
144
|
-
const { width, height } = (0, utils_1.sizeOf)(this.options(), this._container);
|
|
145
|
-
if (width === this._width && height === this._height) {
|
|
146
|
-
return Promise.resolve(this);
|
|
147
|
-
}
|
|
148
|
-
// Don't call changeSize to prevent update width and height of options.
|
|
149
|
-
this.emit(event_1.ChartEvent.BEFORE_CHANGE_SIZE);
|
|
150
|
-
const finished = this.render();
|
|
151
|
-
finished.then(() => {
|
|
152
|
-
this.emit(event_1.ChartEvent.AFTER_CHANGE_SIZE);
|
|
153
|
-
});
|
|
154
|
-
return finished;
|
|
155
|
-
}
|
|
156
|
-
changeSize(width, height) {
|
|
157
|
-
if (width === this._width && height === this._height) {
|
|
158
|
-
return Promise.resolve(this);
|
|
159
|
-
}
|
|
160
|
-
this.emit(event_1.ChartEvent.BEFORE_CHANGE_SIZE);
|
|
161
|
-
this.width(width);
|
|
162
|
-
this.height(height);
|
|
163
|
-
const finished = this.render();
|
|
164
|
-
finished.then(() => {
|
|
165
|
-
this.emit(event_1.ChartEvent.AFTER_CHANGE_SIZE);
|
|
166
|
-
});
|
|
167
|
-
return finished;
|
|
168
|
-
}
|
|
169
|
-
_reset() {
|
|
170
|
-
const KEYS = ['theme', 'type', 'width', 'height', 'autoFit'];
|
|
171
|
-
this.type = 'view';
|
|
172
|
-
this.value = Object.fromEntries(Object.entries(this.value).filter(([key]) => key.startsWith('margin') ||
|
|
173
|
-
key.startsWith('padding') ||
|
|
174
|
-
key.startsWith('inset') ||
|
|
175
|
-
KEYS.includes(key)));
|
|
176
|
-
this.children = [];
|
|
177
|
-
}
|
|
178
|
-
_renderTrailing() {
|
|
179
|
-
if (!this._trailing)
|
|
180
|
-
return;
|
|
181
|
-
this._trailing = false;
|
|
182
|
-
this.render()
|
|
183
|
-
.then(() => {
|
|
184
|
-
const trailingResolve = this._trailingResolve.bind(this);
|
|
185
|
-
this._trailingResolve = null;
|
|
186
|
-
trailingResolve(this);
|
|
187
|
-
})
|
|
188
|
-
.catch((error) => {
|
|
189
|
-
const trailingReject = this._trailingReject.bind(this);
|
|
190
|
-
this._trailingReject = null;
|
|
191
|
-
trailingReject(error);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
_createResolve(resolve) {
|
|
195
|
-
return () => {
|
|
196
|
-
this._rendering = false;
|
|
197
|
-
resolve(this);
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
_createReject(reject) {
|
|
201
|
-
return (error) => {
|
|
202
|
-
this._rendering = false;
|
|
203
|
-
reject(error);
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
// Update actual size and key.
|
|
207
|
-
_computedOptions() {
|
|
208
|
-
const options = this.options();
|
|
209
|
-
const { key = exports.G2_CHART_KEY } = options;
|
|
210
|
-
const { width, height } = (0, utils_1.sizeOf)(options, this._container);
|
|
211
|
-
this._width = width;
|
|
212
|
-
this._height = height;
|
|
213
|
-
this._key = key;
|
|
214
|
-
return Object.assign(Object.assign({ key: this._key }, options), { width, height });
|
|
215
|
-
}
|
|
216
|
-
// Create canvas if it does not exist.
|
|
217
|
-
// DragAndDropPlugin is for interaction.
|
|
218
|
-
// It is OK to register more than one time, G will handle this.
|
|
219
|
-
_createCanvas() {
|
|
220
|
-
const { width, height } = (0, utils_1.sizeOf)(this.options(), this._container);
|
|
221
|
-
this._plugins.push(new g_plugin_dragndrop_1.Plugin());
|
|
222
|
-
this._plugins.forEach((d) => this._renderer.registerPlugin(d));
|
|
223
|
-
this._context.canvas = new g_1.Canvas({
|
|
224
|
-
container: this._container,
|
|
225
|
-
width,
|
|
226
|
-
height,
|
|
227
|
-
renderer: this._renderer,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
_addToTrailing() {
|
|
231
|
-
var _a;
|
|
232
|
-
// Resolve previous promise, and give up this task.
|
|
233
|
-
(_a = this._trailingResolve) === null || _a === void 0 ? void 0 : _a.call(this, this);
|
|
234
|
-
// Create new task.
|
|
235
|
-
this._trailing = true;
|
|
236
|
-
const promise = new Promise((resolve, reject) => {
|
|
237
|
-
this._trailingResolve = resolve;
|
|
238
|
-
this._trailingReject = reject;
|
|
239
|
-
});
|
|
240
|
-
return promise;
|
|
241
|
-
}
|
|
242
|
-
_bindAutoFit() {
|
|
243
|
-
const options = this.options();
|
|
244
|
-
const { autoFit } = options;
|
|
245
|
-
if (this._hasBindAutoFit) {
|
|
246
|
-
// If it was bind before, unbind it now.
|
|
247
|
-
if (!autoFit)
|
|
248
|
-
this._unbindAutoFit();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
if (autoFit) {
|
|
252
|
-
this._hasBindAutoFit = true;
|
|
253
|
-
window.addEventListener('resize', this._onResize);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
_unbindAutoFit() {
|
|
257
|
-
if (this._hasBindAutoFit) {
|
|
258
|
-
this._hasBindAutoFit = false;
|
|
259
|
-
window.removeEventListener('resize', this._onResize);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
Chart = __decorate([
|
|
264
|
-
(0, props_1.defineProps)(exports.props)
|
|
265
|
-
], Chart);
|
|
266
|
-
exports.Chart = Chart;
|
|
6
|
+
const runtime_1 = require("./runtime");
|
|
7
|
+
exports.Chart = (0, extend_1.extend)(runtime_1.Runtime, library_1.library);
|
|
267
8
|
//# sourceMappingURL=chart.js.map
|
package/lib/api/chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.js","sourceRoot":"src/","sources":["api/chart.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chart.js","sourceRoot":"src/","sources":["api/chart.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,uCAAoC;AACpC,uCAAoC;AAIvB,QAAA,KAAK,GAAG,IAAA,eAAM,EAAC,iBAAO,EAAE,iBAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Coordinate } from '@antv/coord';
|
|
2
|
+
import { DisplayObject } from '@antv/g';
|
|
3
|
+
import { Scale, G2Theme, G2ViewDescriptor } from '../runtime';
|
|
4
|
+
import { Composition as Spec } from '../spec';
|
|
5
|
+
import { Node } from './node';
|
|
6
|
+
import { compositionProps } from './props';
|
|
7
|
+
import { PropsOf } from './types';
|
|
8
|
+
export interface CompositionNode<T = any> extends PropsOf<typeof compositionProps, any, // todo Remove this when update types of Spec.
|
|
9
|
+
// todo Remove this when update types of Spec.
|
|
10
|
+
CompositionNode & T> {
|
|
11
|
+
}
|
|
12
|
+
export declare class CompositionNode extends Node<Spec & {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}> {
|
|
15
|
+
protected _key: string;
|
|
16
|
+
/**
|
|
17
|
+
* Change current node data and its children data.
|
|
18
|
+
*/
|
|
19
|
+
changeData(data: any): Promise<import("./runtime").Runtime<import("../spec").G2Spec>>;
|
|
20
|
+
/**
|
|
21
|
+
* Get view instance by key.
|
|
22
|
+
*/
|
|
23
|
+
getView(): G2ViewDescriptor;
|
|
24
|
+
getScale(): Record<string, Scale>;
|
|
25
|
+
getScaleByChannel(channel: string): Scale;
|
|
26
|
+
getCoordinate(): Coordinate;
|
|
27
|
+
getTheme(): G2Theme;
|
|
28
|
+
getGroup(): DisplayObject;
|
|
29
|
+
/**
|
|
30
|
+
* Show the view.
|
|
31
|
+
*/
|
|
32
|
+
show(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Hide the view.
|
|
35
|
+
*/
|
|
36
|
+
hide(): void;
|
|
37
|
+
}
|
|
@@ -1,9 +1,17 @@
|
|
|
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.CompositionNode = void 0;
|
|
4
|
-
const style_1 = require("
|
|
5
|
-
const node_1 = require("
|
|
6
|
-
|
|
10
|
+
const style_1 = require("../utils/style");
|
|
11
|
+
const node_1 = require("./node");
|
|
12
|
+
const define_1 = require("./define");
|
|
13
|
+
const props_1 = require("./props");
|
|
14
|
+
let CompositionNode = class CompositionNode extends node_1.Node {
|
|
7
15
|
/**
|
|
8
16
|
* Change current node data and its children data.
|
|
9
17
|
*/
|
|
@@ -74,6 +82,9 @@ class CompositionNode extends node_1.Node {
|
|
|
74
82
|
return;
|
|
75
83
|
group.isVisible() && (0, style_1.hide)(group);
|
|
76
84
|
}
|
|
77
|
-
}
|
|
85
|
+
};
|
|
86
|
+
CompositionNode = __decorate([
|
|
87
|
+
(0, define_1.defineProps)(props_1.compositionProps)
|
|
88
|
+
], CompositionNode);
|
|
78
89
|
exports.CompositionNode = CompositionNode;
|
|
79
|
-
//# sourceMappingURL=
|
|
90
|
+
//# sourceMappingURL=composition.js.map
|