@antv/g2plot 2.4.20 → 2.4.23
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/CHANGELOG.md +1627 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/dist/g2plot.min.js +17 -2
- package/dist/g2plot.min.js.map +1 -1
- package/esm/adaptor/brush.d.ts +1 -1
- package/esm/adaptor/brush.js +2 -2
- package/esm/adaptor/brush.js.map +1 -1
- package/esm/adaptor/common.d.ts +1 -1
- package/esm/adaptor/common.js +2 -11
- package/esm/adaptor/common.js.map +1 -1
- package/esm/adaptor/connected-area.d.ts +1 -1
- package/esm/adaptor/connected-area.js.map +1 -1
- package/esm/adaptor/conversion-tag.js +1 -1
- package/esm/adaptor/conversion-tag.js.map +1 -1
- package/esm/adaptor/geometries/area.js +1 -1
- package/esm/adaptor/geometries/area.js.map +1 -1
- package/esm/adaptor/geometries/base.d.ts +2 -2
- package/esm/adaptor/geometries/base.js +4 -2
- package/esm/adaptor/geometries/base.js.map +1 -1
- package/esm/adaptor/geometries/edge.d.ts +1 -1
- package/esm/adaptor/geometries/edge.js +1 -1
- package/esm/adaptor/geometries/edge.js.map +1 -1
- package/esm/adaptor/geometries/index.d.ts +5 -5
- package/esm/adaptor/geometries/index.js +2 -2
- package/esm/adaptor/geometries/index.js.map +1 -1
- package/esm/adaptor/geometries/interval.js.map +1 -1
- package/esm/adaptor/geometries/line.js +1 -1
- package/esm/adaptor/geometries/line.js.map +1 -1
- package/esm/adaptor/geometries/point.d.ts +1 -1
- package/esm/adaptor/geometries/point.js +1 -1
- package/esm/adaptor/geometries/point.js.map +1 -1
- package/esm/adaptor/geometries/polygon.d.ts +1 -1
- package/esm/adaptor/geometries/polygon.js +1 -1
- package/esm/adaptor/geometries/polygon.js.map +1 -1
- package/esm/adaptor/geometries/schema.d.ts +1 -1
- package/esm/adaptor/geometries/schema.js +1 -1
- package/esm/adaptor/geometries/schema.js.map +1 -1
- package/esm/adaptor/geometries/violin.d.ts +1 -1
- package/esm/adaptor/geometries/violin.js +1 -1
- package/esm/adaptor/geometries/violin.js.map +1 -1
- package/esm/adaptor/pattern.d.ts +1 -1
- package/esm/adaptor/pattern.js +1 -1
- package/esm/adaptor/pattern.js.map +1 -1
- package/esm/core/plot.d.ts +2 -2
- package/esm/core/plot.js +2 -2
- package/esm/core/plot.js.map +1 -1
- package/esm/index.d.ts +68 -71
- package/esm/index.js +69 -71
- package/esm/index.js.map +1 -1
- package/esm/interactions/actions/drill-down.js +1 -1
- package/esm/interactions/actions/drill-down.js.map +1 -1
- package/esm/interactions/drill-down.js +1 -1
- package/esm/interactions/drill-down.js.map +1 -1
- package/esm/plots/_template/adaptor.js +1 -1
- package/esm/plots/_template/adaptor.js.map +1 -1
- package/esm/plots/_template/index.d.ts +1 -1
- package/esm/plots/_template/index.js.map +1 -1
- package/esm/plots/area/adaptor.js +4 -5
- package/esm/plots/area/adaptor.js.map +1 -1
- package/esm/plots/area/index.d.ts +1 -1
- package/esm/plots/area/index.js.map +1 -1
- package/esm/plots/bar/adaptor.d.ts +1 -1
- package/esm/plots/bar/adaptor.js.map +1 -1
- package/esm/plots/bar/index.d.ts +1 -1
- package/esm/plots/bar/index.js.map +1 -1
- package/esm/plots/bidirectional-bar/adaptor.js +2 -2
- package/esm/plots/bidirectional-bar/adaptor.js.map +1 -1
- package/esm/plots/bidirectional-bar/index.d.ts +1 -1
- package/esm/plots/bidirectional-bar/index.js +3 -3
- package/esm/plots/bidirectional-bar/index.js.map +1 -1
- package/esm/plots/bidirectional-bar/types.d.ts +1 -1
- package/esm/plots/bidirectional-bar/types.js.map +1 -1
- package/esm/plots/bidirectional-bar/utils.js.map +1 -1
- package/esm/plots/box/adaptor.js +3 -3
- package/esm/plots/box/adaptor.js.map +1 -1
- package/esm/plots/box/index.d.ts +1 -1
- package/esm/plots/box/index.js +1 -1
- package/esm/plots/box/index.js.map +1 -1
- package/esm/plots/bullet/adaptor.js +2 -2
- package/esm/plots/bullet/adaptor.js.map +1 -1
- package/esm/plots/bullet/index.d.ts +1 -1
- package/esm/plots/bullet/index.js +1 -1
- package/esm/plots/bullet/index.js.map +1 -1
- package/esm/plots/bullet/types.d.ts +1 -1
- package/esm/plots/bullet/types.js.map +1 -1
- package/esm/plots/chord/adaptor.js +5 -17
- package/esm/plots/chord/adaptor.js.map +1 -1
- package/esm/plots/chord/constant.d.ts +4 -4
- package/esm/plots/chord/constant.js +4 -4
- package/esm/plots/chord/constant.js.map +1 -1
- package/esm/plots/chord/index.d.ts +1 -1
- package/esm/plots/chord/index.js.map +1 -1
- package/esm/plots/circle-packing/adaptor.js +3 -3
- package/esm/plots/circle-packing/adaptor.js.map +1 -1
- package/esm/plots/circle-packing/index.d.ts +2 -2
- package/esm/plots/circle-packing/index.js.map +1 -1
- package/esm/plots/circle-packing/utils.js +2 -2
- package/esm/plots/circle-packing/utils.js.map +1 -1
- package/esm/plots/column/adaptor.js +7 -5
- package/esm/plots/column/adaptor.js.map +1 -1
- package/esm/plots/column/index.d.ts +1 -1
- package/esm/plots/column/index.js.map +1 -1
- package/esm/plots/column/types.d.ts +2 -2
- package/esm/plots/column/types.js.map +1 -1
- package/esm/plots/dual-axes/adaptor.js +7 -7
- package/esm/plots/dual-axes/adaptor.js.map +1 -1
- package/esm/plots/dual-axes/index.d.ts +1 -1
- package/esm/plots/dual-axes/index.js.map +1 -1
- package/esm/plots/dual-axes/types.d.ts +1 -1
- package/esm/plots/dual-axes/types.js.map +1 -1
- package/esm/plots/dual-axes/util/geometry.js +3 -3
- package/esm/plots/dual-axes/util/geometry.js.map +1 -1
- package/esm/plots/dual-axes/util/legend.d.ts +1 -1
- package/esm/plots/dual-axes/util/legend.js +1 -1
- package/esm/plots/dual-axes/util/legend.js.map +1 -1
- package/esm/plots/dual-axes/util/option.d.ts +1 -1
- package/esm/plots/dual-axes/util/option.js +1 -1
- package/esm/plots/dual-axes/util/option.js.map +1 -1
- package/esm/plots/facet/adaptor.js +1 -1
- package/esm/plots/facet/adaptor.js.map +1 -1
- package/esm/plots/facet/index.d.ts +1 -1
- package/esm/plots/facet/index.js.map +1 -1
- package/esm/plots/facet/types.d.ts +5 -6
- package/esm/plots/facet/types.js.map +1 -1
- package/esm/plots/facet/utils.js +2 -11
- package/esm/plots/facet/utils.js.map +1 -1
- package/esm/plots/funnel/adaptor.d.ts +5 -0
- package/esm/plots/funnel/adaptor.js +34 -5
- package/esm/plots/funnel/adaptor.js.map +1 -1
- package/esm/plots/funnel/geometries/basic.d.ts +5 -0
- package/esm/plots/funnel/geometries/basic.js +11 -7
- package/esm/plots/funnel/geometries/basic.js.map +1 -1
- package/esm/plots/funnel/geometries/common.d.ts +2 -1
- package/esm/plots/funnel/geometries/common.js +7 -4
- package/esm/plots/funnel/geometries/common.js.map +1 -1
- package/esm/plots/funnel/geometries/compare.d.ts +1 -0
- package/esm/plots/funnel/geometries/compare.js +40 -33
- package/esm/plots/funnel/geometries/compare.js.map +1 -1
- package/esm/plots/funnel/geometries/dynamic-height.js +3 -3
- package/esm/plots/funnel/geometries/dynamic-height.js.map +1 -1
- package/esm/plots/funnel/geometries/facet.js +1 -1
- package/esm/plots/funnel/geometries/facet.js.map +1 -1
- package/esm/plots/funnel/index.d.ts +4 -3
- package/esm/plots/funnel/index.js +1 -0
- package/esm/plots/funnel/index.js.map +1 -1
- package/esm/plots/funnel/interactions/funnel-conversion-tag.d.ts +9 -0
- package/esm/plots/funnel/interactions/funnel-conversion-tag.js +57 -0
- package/esm/plots/funnel/interactions/funnel-conversion-tag.js.map +1 -0
- package/esm/plots/funnel/interactions/index.d.ts +5 -0
- package/esm/plots/funnel/interactions/index.js +10 -0
- package/esm/plots/funnel/interactions/index.js.map +1 -0
- package/esm/plots/funnel/types.d.ts +2 -1
- package/esm/plots/funnel/types.js.map +1 -1
- package/esm/plots/gauge/adaptor.js +2 -2
- package/esm/plots/gauge/adaptor.js.map +1 -1
- package/esm/plots/gauge/index.d.ts +2 -2
- package/esm/plots/gauge/index.js +3 -3
- package/esm/plots/gauge/index.js.map +1 -1
- package/esm/plots/gauge/utils.js +7 -6
- package/esm/plots/gauge/utils.js.map +1 -1
- package/esm/plots/heatmap/adaptor.js +11 -14
- package/esm/plots/heatmap/adaptor.js.map +1 -1
- package/esm/plots/heatmap/index.d.ts +2 -2
- package/esm/plots/heatmap/index.js.map +1 -1
- package/esm/plots/heatmap/shapes/circle.js.map +1 -1
- package/esm/plots/heatmap/shapes/square.js.map +1 -1
- package/esm/plots/histogram/adaptor.js +6 -4
- package/esm/plots/histogram/adaptor.js.map +1 -1
- package/esm/plots/histogram/index.d.ts +1 -1
- package/esm/plots/histogram/index.js.map +1 -1
- package/esm/plots/line/adaptor.js +3 -4
- package/esm/plots/line/adaptor.js.map +1 -1
- package/esm/plots/line/index.d.ts +2 -2
- package/esm/plots/line/index.js.map +1 -1
- package/esm/plots/line/interactions/marker-active.js +1 -1
- package/esm/plots/line/interactions/marker-active.js.map +1 -1
- package/esm/plots/line/types.d.ts +1 -1
- package/esm/plots/line/types.js.map +1 -1
- package/esm/plots/liquid/adaptor.js +4 -3
- package/esm/plots/liquid/adaptor.js.map +1 -1
- package/esm/plots/liquid/index.d.ts +2 -2
- package/esm/plots/liquid/index.js +2 -2
- package/esm/plots/liquid/index.js.map +1 -1
- package/esm/plots/liquid/shapes/liquid.js +13 -6
- package/esm/plots/liquid/shapes/liquid.js.map +1 -1
- package/esm/plots/liquid/types.d.ts +6 -1
- package/esm/plots/liquid/types.js.map +1 -1
- package/esm/plots/mix/adaptor.js +2 -2
- package/esm/plots/mix/adaptor.js.map +1 -1
- package/esm/plots/mix/index.d.ts +2 -2
- package/esm/plots/mix/index.js.map +1 -1
- package/esm/plots/mix/interactions/association.js +3 -3
- package/esm/plots/mix/interactions/association.js.map +1 -1
- package/esm/plots/mix/interactions/utils.d.ts +1 -1
- package/esm/plots/mix/interactions/utils.js.map +1 -1
- package/esm/plots/mix/types.d.ts +3 -3
- package/esm/plots/mix/types.js.map +1 -1
- package/esm/plots/mix/utils.d.ts +10 -10
- package/esm/plots/mix/utils.js +22 -22
- package/esm/plots/mix/utils.js.map +1 -1
- package/esm/plots/pie/adaptor.js +8 -6
- package/esm/plots/pie/adaptor.js.map +1 -1
- package/esm/plots/pie/index.d.ts +2 -2
- package/esm/plots/pie/index.js +2 -2
- package/esm/plots/pie/index.js.map +1 -1
- package/esm/plots/pie/interactions/actions/legend-active.js +1 -1
- package/esm/plots/pie/interactions/actions/legend-active.js.map +1 -1
- package/esm/plots/pie/interactions/actions/statistic-active.js.map +1 -1
- package/esm/plots/pie/types.d.ts +6 -1
- package/esm/plots/pie/types.js.map +1 -1
- package/esm/plots/progress/adaptor.js +3 -4
- package/esm/plots/progress/adaptor.js.map +1 -1
- package/esm/plots/progress/index.d.ts +1 -1
- package/esm/plots/progress/index.js.map +1 -1
- package/esm/plots/progress/types.d.ts +1 -1
- package/esm/plots/progress/types.js.map +1 -1
- package/esm/plots/progress/utils.d.ts +1 -0
- package/esm/plots/progress/utils.js +4 -1
- package/esm/plots/progress/utils.js.map +1 -1
- package/esm/plots/radar/adaptor.js +3 -3
- package/esm/plots/radar/adaptor.js.map +1 -1
- package/esm/plots/radar/index.d.ts +2 -2
- package/esm/plots/radar/index.js.map +1 -1
- package/esm/plots/radar/interactions/radar-tooltip-action.d.ts +1 -1
- package/esm/plots/radar/interactions/radar-tooltip-action.js +1 -1
- package/esm/plots/radar/interactions/radar-tooltip-action.js.map +1 -1
- package/esm/plots/radar/types.d.ts +1 -1
- package/esm/plots/radar/types.js.map +1 -1
- package/esm/plots/radial-bar/adaptor.js +2 -3
- package/esm/plots/radial-bar/adaptor.js.map +1 -1
- package/esm/plots/radial-bar/index.d.ts +1 -1
- package/esm/plots/radial-bar/index.js.map +1 -1
- package/esm/plots/ring-progress/adaptor.js +1 -1
- package/esm/plots/ring-progress/adaptor.js.map +1 -1
- package/esm/plots/ring-progress/index.d.ts +1 -1
- package/esm/plots/ring-progress/index.js +1 -1
- package/esm/plots/ring-progress/index.js.map +1 -1
- package/esm/plots/ring-progress/types.d.ts +1 -1
- package/esm/plots/ring-progress/types.js.map +1 -1
- package/esm/plots/rose/adaptor.js +3 -3
- package/esm/plots/rose/adaptor.js.map +1 -1
- package/esm/plots/rose/index.d.ts +1 -1
- package/esm/plots/rose/index.js.map +1 -1
- package/esm/plots/sankey/adaptor.js +4 -13
- package/esm/plots/sankey/adaptor.js.map +1 -1
- package/esm/plots/sankey/helper.js +1 -1
- package/esm/plots/sankey/helper.js.map +1 -1
- package/esm/plots/sankey/index.d.ts +2 -2
- package/esm/plots/sankey/index.js +1 -1
- package/esm/plots/sankey/index.js.map +1 -1
- package/esm/plots/sankey/interactions/node-draggable.js +1 -1
- package/esm/plots/sankey/interactions/node-draggable.js.map +1 -1
- package/esm/plots/sankey/layout.d.ts +1 -1
- package/esm/plots/sankey/layout.js +2 -2
- package/esm/plots/sankey/layout.js.map +1 -1
- package/esm/plots/sankey/sankey/index.d.ts +1 -1
- package/esm/plots/sankey/sankey/index.js +1 -1
- package/esm/plots/sankey/sankey/index.js.map +1 -1
- package/esm/plots/sankey/sankey/sankey.js +1 -1
- package/esm/plots/sankey/sankey/sankey.js.map +1 -1
- package/esm/plots/scatter/adaptor.js +4 -5
- package/esm/plots/scatter/adaptor.js.map +1 -1
- package/esm/plots/scatter/index.d.ts +2 -2
- package/esm/plots/scatter/index.js +1 -1
- package/esm/plots/scatter/index.js.map +1 -1
- package/esm/plots/scatter/types.d.ts +1 -1
- package/esm/plots/scatter/types.js.map +1 -1
- package/esm/plots/scatter/util.js +2 -2
- package/esm/plots/scatter/util.js.map +1 -1
- package/esm/plots/stock/adaptor.js +3 -3
- package/esm/plots/stock/adaptor.js.map +1 -1
- package/esm/plots/stock/index.d.ts +1 -1
- package/esm/plots/stock/index.js +1 -1
- package/esm/plots/stock/index.js.map +1 -1
- package/esm/plots/stock/utils.d.ts +3 -1
- package/esm/plots/stock/utils.js +5 -3
- package/esm/plots/stock/utils.js.map +1 -1
- package/esm/plots/sunburst/adaptor.js +3 -3
- package/esm/plots/sunburst/adaptor.js.map +1 -1
- package/esm/plots/sunburst/index.d.ts +2 -2
- package/esm/plots/sunburst/index.js.map +1 -1
- package/esm/plots/tiny-area/adaptor.js +3 -3
- package/esm/plots/tiny-area/adaptor.js.map +1 -1
- package/esm/plots/tiny-area/index.d.ts +1 -1
- package/esm/plots/tiny-area/index.js.map +1 -1
- package/esm/plots/tiny-area/types.d.ts +1 -1
- package/esm/plots/tiny-area/types.js.map +1 -1
- package/esm/plots/tiny-column/adaptor.js +3 -3
- package/esm/plots/tiny-column/adaptor.js.map +1 -1
- package/esm/plots/tiny-line/adaptor.js +3 -3
- package/esm/plots/tiny-line/adaptor.js.map +1 -1
- package/esm/plots/tiny-line/index.d.ts +1 -1
- package/esm/plots/tiny-line/index.js.map +1 -1
- package/esm/plots/tiny-line/types.d.ts +1 -1
- package/esm/plots/tiny-line/types.js.map +1 -1
- package/esm/plots/treemap/adaptor.js +3 -3
- package/esm/plots/treemap/adaptor.js.map +1 -1
- package/esm/plots/treemap/index.d.ts +2 -2
- package/esm/plots/treemap/index.js +1 -1
- package/esm/plots/treemap/index.js.map +1 -1
- package/esm/plots/treemap/utils.js +1 -1
- package/esm/plots/treemap/utils.js.map +1 -1
- package/esm/plots/venn/adaptor.d.ts +3 -3
- package/esm/plots/venn/adaptor.js +6 -7
- package/esm/plots/venn/adaptor.js.map +1 -1
- package/esm/plots/venn/index.d.ts +1 -1
- package/esm/plots/venn/index.js.map +1 -1
- package/esm/plots/venn/interactions/index.js +1 -1
- package/esm/plots/venn/interactions/index.js.map +1 -1
- package/esm/plots/venn/label.js +1 -1
- package/esm/plots/venn/label.js.map +1 -1
- package/esm/plots/venn/layout/diagram.js +1 -1
- package/esm/plots/venn/layout/diagram.js.map +1 -1
- package/esm/plots/venn/layout/layout.js +2 -2
- package/esm/plots/venn/layout/layout.js.map +1 -1
- package/esm/plots/venn/shape.js.map +1 -1
- package/esm/plots/venn/utils.js +3 -3
- package/esm/plots/venn/utils.js.map +1 -1
- package/esm/plots/violin/adaptor.js +6 -14
- package/esm/plots/violin/adaptor.js.map +1 -1
- package/esm/plots/violin/index.d.ts +1 -1
- package/esm/plots/violin/index.js.map +1 -1
- package/esm/plots/violin/utils.js +1 -1
- package/esm/plots/violin/utils.js.map +1 -1
- package/esm/plots/waterfall/adaptor.d.ts +1 -1
- package/esm/plots/waterfall/adaptor.js +4 -4
- package/esm/plots/waterfall/adaptor.js.map +1 -1
- package/esm/plots/waterfall/index.d.ts +1 -1
- package/esm/plots/waterfall/index.js.map +1 -1
- package/esm/plots/waterfall/shape.js.map +1 -1
- package/esm/plots/waterfall/utils.js +1 -1
- package/esm/plots/waterfall/utils.js.map +1 -1
- package/esm/plots/word-cloud/adaptor.js +4 -4
- package/esm/plots/word-cloud/adaptor.js.map +1 -1
- package/esm/plots/word-cloud/index.d.ts +2 -2
- package/esm/plots/word-cloud/index.js +1 -1
- package/esm/plots/word-cloud/index.js.map +1 -1
- package/esm/plots/word-cloud/shapes/word-cloud.js.map +1 -1
- package/esm/plots/word-cloud/utils.js +1 -1
- package/esm/plots/word-cloud/utils.js.map +1 -1
- package/esm/plugin/index.d.ts +1 -1
- package/esm/plugin/index.js +1 -1
- package/esm/plugin/index.js.map +1 -1
- package/esm/types/common.d.ts +12 -11
- package/esm/types/common.js.map +1 -1
- package/esm/types/index.d.ts +7 -7
- package/esm/types/index.js +7 -7
- package/esm/types/index.js.map +1 -1
- package/esm/types/state.d.ts +2 -2
- package/esm/types/state.js.map +1 -1
- package/esm/utils/conversion.js +4 -3
- package/esm/utils/conversion.js.map +1 -1
- package/esm/utils/data.js +1 -1
- package/esm/utils/data.js.map +1 -1
- package/esm/utils/geometry.d.ts +1 -1
- package/esm/utils/geometry.js +1 -1
- package/esm/utils/geometry.js.map +1 -1
- package/esm/utils/hierarchy/pack.js +2 -2
- package/esm/utils/hierarchy/pack.js.map +1 -1
- package/esm/utils/hierarchy/partition.js +2 -2
- package/esm/utils/hierarchy/partition.js.map +1 -1
- package/esm/utils/hierarchy/treemap.js +2 -2
- package/esm/utils/hierarchy/treemap.js.map +1 -1
- package/esm/utils/hierarchy/util.js +1 -1
- package/esm/utils/hierarchy/util.js.map +1 -1
- package/esm/utils/index.d.ts +10 -10
- package/esm/utils/index.js +10 -10
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/padding.js +1 -1
- package/esm/utils/padding.js.map +1 -1
- package/esm/utils/path.d.ts +1 -1
- package/esm/utils/path.js.map +1 -1
- package/esm/utils/pattern/dot.js +1 -1
- package/esm/utils/pattern/dot.js.map +1 -1
- package/esm/utils/pattern/line.js +1 -1
- package/esm/utils/pattern/line.js.map +1 -1
- package/esm/utils/pattern/square.js +1 -1
- package/esm/utils/pattern/square.js.map +1 -1
- package/esm/utils/statistic.js +3 -2
- package/esm/utils/statistic.js.map +1 -1
- package/esm/utils/transform/histogram.js +1 -1
- package/esm/utils/transform/histogram.js.map +1 -1
- package/esm/utils/transform/word-cloud.js +1 -1
- package/esm/utils/transform/word-cloud.js.map +1 -1
- package/esm/utils/view.d.ts +8 -1
- package/esm/utils/view.js +27 -0
- package/esm/utils/view.js.map +1 -1
- package/lib/adaptor/brush.d.ts +1 -1
- package/lib/adaptor/brush.js +2 -2
- package/lib/adaptor/brush.js.map +1 -1
- package/lib/adaptor/common.d.ts +1 -1
- package/lib/adaptor/common.js +1 -10
- package/lib/adaptor/common.js.map +1 -1
- package/lib/adaptor/connected-area.d.ts +1 -1
- package/lib/adaptor/connected-area.js.map +1 -1
- package/lib/adaptor/conversion-tag.js +1 -1
- package/lib/adaptor/conversion-tag.js.map +1 -1
- package/lib/adaptor/geometries/area.js +1 -1
- package/lib/adaptor/geometries/area.js.map +1 -1
- package/lib/adaptor/geometries/base.d.ts +2 -2
- package/lib/adaptor/geometries/base.js +3 -1
- package/lib/adaptor/geometries/base.js.map +1 -1
- package/lib/adaptor/geometries/edge.d.ts +1 -1
- package/lib/adaptor/geometries/edge.js +1 -1
- package/lib/adaptor/geometries/edge.js.map +1 -1
- package/lib/adaptor/geometries/index.d.ts +5 -5
- package/lib/adaptor/geometries/index.js +4 -4
- package/lib/adaptor/geometries/index.js.map +1 -1
- package/lib/adaptor/geometries/interval.js.map +1 -1
- package/lib/adaptor/geometries/line.js +1 -1
- package/lib/adaptor/geometries/line.js.map +1 -1
- package/lib/adaptor/geometries/point.d.ts +1 -1
- package/lib/adaptor/geometries/point.js +1 -1
- package/lib/adaptor/geometries/point.js.map +1 -1
- package/lib/adaptor/geometries/polygon.d.ts +1 -1
- package/lib/adaptor/geometries/polygon.js +1 -1
- package/lib/adaptor/geometries/polygon.js.map +1 -1
- package/lib/adaptor/geometries/schema.d.ts +1 -1
- package/lib/adaptor/geometries/schema.js +1 -1
- package/lib/adaptor/geometries/schema.js.map +1 -1
- package/lib/adaptor/geometries/violin.d.ts +1 -1
- package/lib/adaptor/geometries/violin.js +1 -1
- package/lib/adaptor/geometries/violin.js.map +1 -1
- package/lib/adaptor/pattern.d.ts +1 -1
- package/lib/adaptor/pattern.js +1 -1
- package/lib/adaptor/pattern.js.map +1 -1
- package/lib/core/plot.d.ts +2 -2
- package/lib/core/plot.js +1 -1
- package/lib/core/plot.js.map +1 -1
- package/lib/index.d.ts +68 -71
- package/lib/index.js +103 -105
- package/lib/index.js.map +1 -1
- package/lib/interactions/actions/drill-down.js.map +1 -1
- package/lib/interactions/drill-down.js.map +1 -1
- package/lib/plots/_template/adaptor.js.map +1 -1
- package/lib/plots/_template/index.d.ts +1 -1
- package/lib/plots/_template/index.js.map +1 -1
- package/lib/plots/area/adaptor.js +6 -7
- package/lib/plots/area/adaptor.js.map +1 -1
- package/lib/plots/area/index.d.ts +1 -1
- package/lib/plots/area/index.js.map +1 -1
- package/lib/plots/bar/adaptor.d.ts +1 -1
- package/lib/plots/bar/adaptor.js.map +1 -1
- package/lib/plots/bar/index.d.ts +1 -1
- package/lib/plots/bar/index.js.map +1 -1
- package/lib/plots/bidirectional-bar/adaptor.js.map +1 -1
- package/lib/plots/bidirectional-bar/index.d.ts +1 -1
- package/lib/plots/bidirectional-bar/index.js +1 -1
- package/lib/plots/bidirectional-bar/index.js.map +1 -1
- package/lib/plots/bidirectional-bar/types.d.ts +1 -1
- package/lib/plots/bidirectional-bar/types.js.map +1 -1
- package/lib/plots/bidirectional-bar/utils.js.map +1 -1
- package/lib/plots/box/adaptor.js +2 -2
- package/lib/plots/box/adaptor.js.map +1 -1
- package/lib/plots/box/index.d.ts +1 -1
- package/lib/plots/box/index.js +1 -1
- package/lib/plots/box/index.js.map +1 -1
- package/lib/plots/bullet/adaptor.js +1 -1
- package/lib/plots/bullet/adaptor.js.map +1 -1
- package/lib/plots/bullet/index.d.ts +1 -1
- package/lib/plots/bullet/index.js +1 -1
- package/lib/plots/bullet/index.js.map +1 -1
- package/lib/plots/bullet/types.d.ts +1 -1
- package/lib/plots/bullet/types.js.map +1 -1
- package/lib/plots/chord/adaptor.js +3 -15
- package/lib/plots/chord/adaptor.js.map +1 -1
- package/lib/plots/chord/constant.d.ts +4 -4
- package/lib/plots/chord/constant.js +4 -4
- package/lib/plots/chord/constant.js.map +1 -1
- package/lib/plots/chord/index.d.ts +1 -1
- package/lib/plots/chord/index.js.map +1 -1
- package/lib/plots/circle-packing/adaptor.js +2 -2
- package/lib/plots/circle-packing/adaptor.js.map +1 -1
- package/lib/plots/circle-packing/index.d.ts +2 -2
- package/lib/plots/circle-packing/index.js.map +1 -1
- package/lib/plots/circle-packing/utils.js +2 -2
- package/lib/plots/circle-packing/utils.js.map +1 -1
- package/lib/plots/column/adaptor.js +5 -3
- package/lib/plots/column/adaptor.js.map +1 -1
- package/lib/plots/column/index.d.ts +1 -1
- package/lib/plots/column/index.js.map +1 -1
- package/lib/plots/column/types.d.ts +2 -2
- package/lib/plots/column/types.js.map +1 -1
- package/lib/plots/dual-axes/adaptor.js +5 -5
- package/lib/plots/dual-axes/adaptor.js.map +1 -1
- package/lib/plots/dual-axes/index.d.ts +1 -1
- package/lib/plots/dual-axes/index.js.map +1 -1
- package/lib/plots/dual-axes/types.d.ts +1 -1
- package/lib/plots/dual-axes/types.js.map +1 -1
- package/lib/plots/dual-axes/util/geometry.js.map +1 -1
- package/lib/plots/dual-axes/util/legend.d.ts +1 -1
- package/lib/plots/dual-axes/util/legend.js +1 -1
- package/lib/plots/dual-axes/util/legend.js.map +1 -1
- package/lib/plots/dual-axes/util/option.d.ts +1 -1
- package/lib/plots/dual-axes/util/option.js +1 -1
- package/lib/plots/dual-axes/util/option.js.map +1 -1
- package/lib/plots/facet/adaptor.js.map +1 -1
- package/lib/plots/facet/index.d.ts +1 -1
- package/lib/plots/facet/index.js.map +1 -1
- package/lib/plots/facet/types.d.ts +5 -6
- package/lib/plots/facet/types.js.map +1 -1
- package/lib/plots/facet/utils.js +1 -10
- package/lib/plots/facet/utils.js.map +1 -1
- package/lib/plots/funnel/adaptor.d.ts +5 -0
- package/lib/plots/funnel/adaptor.js +34 -4
- package/lib/plots/funnel/adaptor.js.map +1 -1
- package/lib/plots/funnel/geometries/basic.d.ts +5 -0
- package/lib/plots/funnel/geometries/basic.js +9 -4
- package/lib/plots/funnel/geometries/basic.js.map +1 -1
- package/lib/plots/funnel/geometries/common.d.ts +2 -1
- package/lib/plots/funnel/geometries/common.js +6 -3
- package/lib/plots/funnel/geometries/common.js.map +1 -1
- package/lib/plots/funnel/geometries/compare.d.ts +1 -0
- package/lib/plots/funnel/geometries/compare.js +39 -31
- package/lib/plots/funnel/geometries/compare.js.map +1 -1
- package/lib/plots/funnel/geometries/dynamic-height.js +2 -2
- package/lib/plots/funnel/geometries/dynamic-height.js.map +1 -1
- package/lib/plots/funnel/geometries/facet.js.map +1 -1
- package/lib/plots/funnel/index.d.ts +4 -3
- package/lib/plots/funnel/index.js +1 -0
- package/lib/plots/funnel/index.js.map +1 -1
- package/lib/plots/funnel/interactions/funnel-conversion-tag.d.ts +9 -0
- package/lib/plots/funnel/interactions/funnel-conversion-tag.js +60 -0
- package/lib/plots/funnel/interactions/funnel-conversion-tag.js.map +1 -0
- package/lib/plots/funnel/interactions/index.d.ts +5 -0
- package/lib/plots/funnel/interactions/index.js +13 -0
- package/lib/plots/funnel/interactions/index.js.map +1 -0
- package/lib/plots/funnel/types.d.ts +2 -1
- package/lib/plots/funnel/types.js.map +1 -1
- package/lib/plots/gauge/adaptor.js.map +1 -1
- package/lib/plots/gauge/index.d.ts +2 -2
- package/lib/plots/gauge/index.js +1 -1
- package/lib/plots/gauge/index.js.map +1 -1
- package/lib/plots/gauge/utils.js +5 -4
- package/lib/plots/gauge/utils.js.map +1 -1
- package/lib/plots/heatmap/adaptor.js +12 -15
- package/lib/plots/heatmap/adaptor.js.map +1 -1
- package/lib/plots/heatmap/index.d.ts +2 -2
- package/lib/plots/heatmap/index.js.map +1 -1
- package/lib/plots/heatmap/shapes/circle.js.map +1 -1
- package/lib/plots/heatmap/shapes/square.js.map +1 -1
- package/lib/plots/histogram/adaptor.js +7 -5
- package/lib/plots/histogram/adaptor.js.map +1 -1
- package/lib/plots/histogram/index.d.ts +1 -1
- package/lib/plots/histogram/index.js.map +1 -1
- package/lib/plots/line/adaptor.js +3 -4
- package/lib/plots/line/adaptor.js.map +1 -1
- package/lib/plots/line/index.d.ts +2 -2
- package/lib/plots/line/index.js.map +1 -1
- package/lib/plots/line/interactions/marker-active.js +1 -1
- package/lib/plots/line/interactions/marker-active.js.map +1 -1
- package/lib/plots/line/types.d.ts +1 -1
- package/lib/plots/line/types.js.map +1 -1
- package/lib/plots/liquid/adaptor.js +3 -2
- package/lib/plots/liquid/adaptor.js.map +1 -1
- package/lib/plots/liquid/index.d.ts +2 -2
- package/lib/plots/liquid/index.js +1 -1
- package/lib/plots/liquid/index.js.map +1 -1
- package/lib/plots/liquid/shapes/liquid.js +12 -5
- package/lib/plots/liquid/shapes/liquid.js.map +1 -1
- package/lib/plots/liquid/types.d.ts +6 -1
- package/lib/plots/liquid/types.js.map +1 -1
- package/lib/plots/mix/adaptor.js +2 -2
- package/lib/plots/mix/adaptor.js.map +1 -1
- package/lib/plots/mix/index.d.ts +2 -2
- package/lib/plots/mix/index.js.map +1 -1
- package/lib/plots/mix/interactions/association.js +1 -1
- package/lib/plots/mix/interactions/association.js.map +1 -1
- package/lib/plots/mix/interactions/utils.d.ts +1 -1
- package/lib/plots/mix/interactions/utils.js.map +1 -1
- package/lib/plots/mix/types.d.ts +3 -3
- package/lib/plots/mix/types.js.map +1 -1
- package/lib/plots/mix/utils.d.ts +10 -10
- package/lib/plots/mix/utils.js +37 -37
- package/lib/plots/mix/utils.js.map +1 -1
- package/lib/plots/pie/adaptor.js +5 -3
- package/lib/plots/pie/adaptor.js.map +1 -1
- package/lib/plots/pie/index.d.ts +2 -2
- package/lib/plots/pie/index.js +1 -1
- package/lib/plots/pie/index.js.map +1 -1
- package/lib/plots/pie/interactions/actions/legend-active.js.map +1 -1
- package/lib/plots/pie/interactions/actions/statistic-active.js.map +1 -1
- package/lib/plots/pie/types.d.ts +6 -1
- package/lib/plots/pie/types.js.map +1 -1
- package/lib/plots/progress/adaptor.js +2 -3
- package/lib/plots/progress/adaptor.js.map +1 -1
- package/lib/plots/progress/index.d.ts +1 -1
- package/lib/plots/progress/index.js.map +1 -1
- package/lib/plots/progress/types.d.ts +1 -1
- package/lib/plots/progress/types.js.map +1 -1
- package/lib/plots/progress/utils.d.ts +1 -0
- package/lib/plots/progress/utils.js +4 -1
- package/lib/plots/progress/utils.js.map +1 -1
- package/lib/plots/radar/adaptor.js.map +1 -1
- package/lib/plots/radar/index.d.ts +2 -2
- package/lib/plots/radar/index.js.map +1 -1
- package/lib/plots/radar/interactions/radar-tooltip-action.d.ts +1 -1
- package/lib/plots/radar/interactions/radar-tooltip-action.js.map +1 -1
- package/lib/plots/radar/types.d.ts +1 -1
- package/lib/plots/radar/types.js.map +1 -1
- package/lib/plots/radial-bar/adaptor.js +6 -7
- package/lib/plots/radial-bar/adaptor.js.map +1 -1
- package/lib/plots/radial-bar/index.d.ts +1 -1
- package/lib/plots/radial-bar/index.js.map +1 -1
- package/lib/plots/ring-progress/adaptor.js +1 -1
- package/lib/plots/ring-progress/adaptor.js.map +1 -1
- package/lib/plots/ring-progress/index.d.ts +1 -1
- package/lib/plots/ring-progress/index.js.map +1 -1
- package/lib/plots/ring-progress/types.d.ts +1 -1
- package/lib/plots/ring-progress/types.js.map +1 -1
- package/lib/plots/rose/adaptor.js +1 -1
- package/lib/plots/rose/adaptor.js.map +1 -1
- package/lib/plots/rose/index.d.ts +1 -1
- package/lib/plots/rose/index.js.map +1 -1
- package/lib/plots/sankey/adaptor.js +4 -13
- package/lib/plots/sankey/adaptor.js.map +1 -1
- package/lib/plots/sankey/helper.js +1 -1
- package/lib/plots/sankey/helper.js.map +1 -1
- package/lib/plots/sankey/index.d.ts +2 -2
- package/lib/plots/sankey/index.js +1 -1
- package/lib/plots/sankey/index.js.map +1 -1
- package/lib/plots/sankey/interactions/node-draggable.js.map +1 -1
- package/lib/plots/sankey/layout.d.ts +1 -1
- package/lib/plots/sankey/layout.js.map +1 -1
- package/lib/plots/sankey/sankey/index.d.ts +1 -1
- package/lib/plots/sankey/sankey/index.js +1 -1
- package/lib/plots/sankey/sankey/index.js.map +1 -1
- package/lib/plots/sankey/sankey/sankey.js.map +1 -1
- package/lib/plots/scatter/adaptor.js +5 -6
- package/lib/plots/scatter/adaptor.js.map +1 -1
- package/lib/plots/scatter/index.d.ts +2 -2
- package/lib/plots/scatter/index.js.map +1 -1
- package/lib/plots/scatter/types.d.ts +1 -1
- package/lib/plots/scatter/types.js.map +1 -1
- package/lib/plots/scatter/util.js +1 -1
- package/lib/plots/scatter/util.js.map +1 -1
- package/lib/plots/stock/adaptor.js +1 -1
- package/lib/plots/stock/adaptor.js.map +1 -1
- package/lib/plots/stock/index.d.ts +1 -1
- package/lib/plots/stock/index.js +1 -1
- package/lib/plots/stock/index.js.map +1 -1
- package/lib/plots/stock/utils.d.ts +3 -1
- package/lib/plots/stock/utils.js +4 -2
- package/lib/plots/stock/utils.js.map +1 -1
- package/lib/plots/sunburst/adaptor.js +1 -1
- package/lib/plots/sunburst/adaptor.js.map +1 -1
- package/lib/plots/sunburst/index.d.ts +2 -2
- package/lib/plots/sunburst/index.js.map +1 -1
- package/lib/plots/tiny-area/adaptor.js +2 -2
- package/lib/plots/tiny-area/adaptor.js.map +1 -1
- package/lib/plots/tiny-area/index.d.ts +1 -1
- package/lib/plots/tiny-area/index.js.map +1 -1
- package/lib/plots/tiny-area/types.d.ts +1 -1
- package/lib/plots/tiny-area/types.js.map +1 -1
- package/lib/plots/tiny-column/adaptor.js +3 -3
- package/lib/plots/tiny-column/adaptor.js.map +1 -1
- package/lib/plots/tiny-line/adaptor.js +2 -2
- package/lib/plots/tiny-line/adaptor.js.map +1 -1
- package/lib/plots/tiny-line/index.d.ts +1 -1
- package/lib/plots/tiny-line/index.js.map +1 -1
- package/lib/plots/tiny-line/types.d.ts +1 -1
- package/lib/plots/tiny-line/types.js.map +1 -1
- package/lib/plots/treemap/adaptor.js +1 -1
- package/lib/plots/treemap/adaptor.js.map +1 -1
- package/lib/plots/treemap/index.d.ts +2 -2
- package/lib/plots/treemap/index.js +1 -1
- package/lib/plots/treemap/index.js.map +1 -1
- package/lib/plots/treemap/utils.js.map +1 -1
- package/lib/plots/venn/adaptor.d.ts +3 -3
- package/lib/plots/venn/adaptor.js +8 -9
- package/lib/plots/venn/adaptor.js.map +1 -1
- package/lib/plots/venn/index.d.ts +1 -1
- package/lib/plots/venn/index.js.map +1 -1
- package/lib/plots/venn/interactions/index.js.map +1 -1
- package/lib/plots/venn/label.js.map +1 -1
- package/lib/plots/venn/layout/diagram.js.map +1 -1
- package/lib/plots/venn/layout/layout.js.map +1 -1
- package/lib/plots/venn/shape.js.map +1 -1
- package/lib/plots/venn/utils.js +3 -3
- package/lib/plots/venn/utils.js.map +1 -1
- package/lib/plots/violin/adaptor.js +4 -12
- package/lib/plots/violin/adaptor.js.map +1 -1
- package/lib/plots/violin/index.d.ts +1 -1
- package/lib/plots/violin/index.js.map +1 -1
- package/lib/plots/violin/utils.js.map +1 -1
- package/lib/plots/waterfall/adaptor.d.ts +1 -1
- package/lib/plots/waterfall/adaptor.js +1 -1
- package/lib/plots/waterfall/adaptor.js.map +1 -1
- package/lib/plots/waterfall/index.d.ts +1 -1
- package/lib/plots/waterfall/index.js.map +1 -1
- package/lib/plots/waterfall/shape.js.map +1 -1
- package/lib/plots/waterfall/utils.js.map +1 -1
- package/lib/plots/word-cloud/adaptor.js +2 -2
- package/lib/plots/word-cloud/adaptor.js.map +1 -1
- package/lib/plots/word-cloud/index.d.ts +2 -2
- package/lib/plots/word-cloud/index.js +1 -1
- package/lib/plots/word-cloud/index.js.map +1 -1
- package/lib/plots/word-cloud/shapes/word-cloud.js.map +1 -1
- package/lib/plots/word-cloud/utils.js +1 -1
- package/lib/plots/word-cloud/utils.js.map +1 -1
- package/lib/plugin/index.d.ts +1 -1
- package/lib/plugin/index.js +1 -1
- package/lib/plugin/index.js.map +1 -1
- package/lib/types/common.d.ts +12 -11
- package/lib/types/common.js.map +1 -1
- package/lib/types/index.d.ts +7 -7
- package/lib/types/index.js +7 -7
- package/lib/types/index.js.map +1 -1
- package/lib/types/state.d.ts +2 -2
- package/lib/types/state.js.map +1 -1
- package/lib/utils/conversion.js +4 -3
- package/lib/utils/conversion.js.map +1 -1
- package/lib/utils/data.js.map +1 -1
- package/lib/utils/geometry.d.ts +1 -1
- package/lib/utils/geometry.js.map +1 -1
- package/lib/utils/hierarchy/pack.js +1 -1
- package/lib/utils/hierarchy/pack.js.map +1 -1
- package/lib/utils/hierarchy/partition.js +1 -1
- package/lib/utils/hierarchy/partition.js.map +1 -1
- package/lib/utils/hierarchy/treemap.js +1 -1
- package/lib/utils/hierarchy/treemap.js.map +1 -1
- package/lib/utils/hierarchy/util.js.map +1 -1
- package/lib/utils/index.d.ts +10 -10
- package/lib/utils/index.js +23 -22
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/padding.js.map +1 -1
- package/lib/utils/path.d.ts +1 -1
- package/lib/utils/path.js.map +1 -1
- package/lib/utils/pattern/dot.js.map +1 -1
- package/lib/utils/pattern/line.js.map +1 -1
- package/lib/utils/pattern/square.js.map +1 -1
- package/lib/utils/statistic.js +8 -7
- package/lib/utils/statistic.js.map +1 -1
- package/lib/utils/transform/histogram.js.map +1 -1
- package/lib/utils/transform/word-cloud.js.map +1 -1
- package/lib/utils/view.d.ts +8 -1
- package/lib/utils/view.js +29 -1
- package/lib/utils/view.js.map +1 -1
- package/package.json +9 -22
- package/src/adaptor/brush.ts +3 -4
- package/src/adaptor/common.ts +5 -14
- package/src/adaptor/connected-area.ts +1 -1
- package/src/adaptor/conversion-tag.ts +3 -3
- package/src/adaptor/geometries/area.ts +2 -2
- package/src/adaptor/geometries/base.ts +6 -4
- package/src/adaptor/geometries/edge.ts +2 -2
- package/src/adaptor/geometries/index.ts +5 -5
- package/src/adaptor/geometries/interval.ts +1 -1
- package/src/adaptor/geometries/line.ts +2 -2
- package/src/adaptor/geometries/point.ts +2 -2
- package/src/adaptor/geometries/polygon.ts +2 -2
- package/src/adaptor/geometries/schema.ts +2 -2
- package/src/adaptor/geometries/violin.ts +2 -2
- package/src/adaptor/pattern.ts +1 -1
- package/src/core/plot.ts +4 -4
- package/src/index.ts +105 -151
- package/src/interactions/actions/drill-down.ts +1 -1
- package/src/interactions/drill-down.ts +1 -1
- package/src/plots/_template/adaptor.ts +1 -1
- package/src/plots/_template/index.ts +2 -2
- package/src/plots/area/adaptor.ts +8 -9
- package/src/plots/area/index.ts +2 -2
- package/src/plots/bar/adaptor.ts +3 -3
- package/src/plots/bar/index.ts +2 -2
- package/src/plots/bidirectional-bar/adaptor.ts +6 -6
- package/src/plots/bidirectional-bar/index.ts +5 -5
- package/src/plots/bidirectional-bar/types.ts +1 -1
- package/src/plots/bidirectional-bar/utils.ts +1 -1
- package/src/plots/box/adaptor.ts +6 -6
- package/src/plots/box/index.ts +3 -3
- package/src/plots/bullet/adaptor.ts +3 -3
- package/src/plots/bullet/index.ts +3 -3
- package/src/plots/bullet/types.ts +1 -1
- package/src/plots/chord/adaptor.ts +5 -18
- package/src/plots/chord/constant.ts +4 -4
- package/src/plots/chord/index.ts +1 -1
- package/src/plots/circle-packing/adaptor.ts +10 -10
- package/src/plots/circle-packing/index.ts +2 -2
- package/src/plots/circle-packing/utils.ts +2 -2
- package/src/plots/column/adaptor.ts +13 -11
- package/src/plots/column/index.ts +2 -2
- package/src/plots/column/types.ts +2 -2
- package/src/plots/dual-axes/adaptor.ts +11 -11
- package/src/plots/dual-axes/index.ts +2 -2
- package/src/plots/dual-axes/types.ts +1 -1
- package/src/plots/dual-axes/util/geometry.ts +4 -4
- package/src/plots/dual-axes/util/legend.ts +3 -3
- package/src/plots/dual-axes/util/option.ts +5 -5
- package/src/plots/facet/adaptor.ts +2 -2
- package/src/plots/facet/index.ts +1 -1
- package/src/plots/facet/types.ts +5 -6
- package/src/plots/facet/utils.ts +4 -12
- package/src/plots/funnel/adaptor.ts +36 -6
- package/src/plots/funnel/geometries/basic.ts +15 -10
- package/src/plots/funnel/geometries/common.ts +9 -6
- package/src/plots/funnel/geometries/compare.ts +54 -45
- package/src/plots/funnel/geometries/dynamic-height.ts +5 -5
- package/src/plots/funnel/geometries/facet.ts +1 -1
- package/src/plots/funnel/index.ts +5 -5
- package/src/plots/funnel/interactions/funnel-conversion-tag.ts +57 -0
- package/src/plots/funnel/interactions/index.ts +11 -0
- package/src/plots/funnel/types.ts +2 -1
- package/src/plots/gauge/adaptor.ts +2 -2
- package/src/plots/gauge/index.ts +5 -6
- package/src/plots/gauge/utils.ts +7 -6
- package/src/plots/heatmap/adaptor.ts +13 -15
- package/src/plots/heatmap/index.ts +2 -2
- package/src/plots/heatmap/shapes/circle.ts +1 -1
- package/src/plots/heatmap/shapes/square.ts +1 -1
- package/src/plots/histogram/adaptor.ts +7 -6
- package/src/plots/histogram/index.ts +2 -2
- package/src/plots/line/adaptor.ts +8 -9
- package/src/plots/line/index.ts +2 -2
- package/src/plots/line/interactions/marker-active.ts +1 -1
- package/src/plots/line/types.ts +1 -1
- package/src/plots/liquid/adaptor.ts +6 -5
- package/src/plots/liquid/index.ts +4 -5
- package/src/plots/liquid/shapes/liquid.ts +20 -9
- package/src/plots/liquid/types.ts +6 -1
- package/src/plots/mix/adaptor.ts +6 -6
- package/src/plots/mix/index.ts +2 -2
- package/src/plots/mix/interactions/association.ts +3 -3
- package/src/plots/mix/interactions/utils.ts +1 -1
- package/src/plots/mix/types.ts +3 -3
- package/src/plots/mix/utils.ts +23 -23
- package/src/plots/pie/adaptor.ts +10 -8
- package/src/plots/pie/index.ts +3 -3
- package/src/plots/pie/interactions/actions/legend-active.ts +1 -1
- package/src/plots/pie/interactions/actions/statistic-active.ts +1 -1
- package/src/plots/pie/types.ts +6 -1
- package/src/plots/progress/adaptor.ts +5 -6
- package/src/plots/progress/index.ts +2 -2
- package/src/plots/progress/types.ts +1 -1
- package/src/plots/progress/utils.ts +4 -1
- package/src/plots/radar/adaptor.ts +3 -3
- package/src/plots/radar/index.ts +2 -2
- package/src/plots/radar/interactions/radar-tooltip-action.ts +1 -1
- package/src/plots/radar/types.ts +1 -1
- package/src/plots/radial-bar/adaptor.ts +3 -4
- package/src/plots/radial-bar/index.ts +2 -2
- package/src/plots/ring-progress/adaptor.ts +1 -1
- package/src/plots/ring-progress/index.ts +3 -3
- package/src/plots/ring-progress/types.ts +1 -1
- package/src/plots/rose/adaptor.ts +4 -4
- package/src/plots/rose/index.ts +2 -2
- package/src/plots/sankey/adaptor.ts +4 -13
- package/src/plots/sankey/helper.ts +2 -2
- package/src/plots/sankey/index.ts +3 -3
- package/src/plots/sankey/interactions/node-draggable.ts +1 -1
- package/src/plots/sankey/layout.ts +2 -2
- package/src/plots/sankey/sankey/index.ts +1 -1
- package/src/plots/sankey/sankey/sankey.ts +1 -1
- package/src/plots/scatter/adaptor.ts +5 -6
- package/src/plots/scatter/index.ts +3 -3
- package/src/plots/scatter/types.ts +5 -5
- package/src/plots/scatter/util.ts +3 -3
- package/src/plots/stock/adaptor.ts +4 -5
- package/src/plots/stock/index.ts +3 -3
- package/src/plots/stock/utils.ts +5 -4
- package/src/plots/sunburst/adaptor.ts +10 -10
- package/src/plots/sunburst/index.ts +2 -2
- package/src/plots/tiny-area/adaptor.ts +4 -4
- package/src/plots/tiny-area/index.ts +2 -2
- package/src/plots/tiny-area/types.ts +1 -1
- package/src/plots/tiny-column/adaptor.ts +4 -4
- package/src/plots/tiny-line/adaptor.ts +5 -5
- package/src/plots/tiny-line/index.ts +2 -2
- package/src/plots/tiny-line/types.ts +1 -1
- package/src/plots/treemap/adaptor.ts +4 -4
- package/src/plots/treemap/index.ts +3 -3
- package/src/plots/treemap/utils.ts +1 -1
- package/src/plots/venn/adaptor.ts +12 -11
- package/src/plots/venn/index.ts +2 -2
- package/src/plots/venn/interactions/index.ts +1 -1
- package/src/plots/venn/label.ts +1 -1
- package/src/plots/venn/layout/diagram.ts +1 -1
- package/src/plots/venn/layout/layout.ts +2 -2
- package/src/plots/venn/shape.ts +2 -2
- package/src/plots/venn/utils.ts +3 -3
- package/src/plots/violin/adaptor.ts +8 -17
- package/src/plots/violin/index.ts +2 -2
- package/src/plots/violin/utils.ts +1 -1
- package/src/plots/waterfall/adaptor.ts +6 -6
- package/src/plots/waterfall/index.ts +2 -2
- package/src/plots/waterfall/shape.ts +2 -3
- package/src/plots/waterfall/utils.ts +1 -1
- package/src/plots/word-cloud/adaptor.ts +5 -5
- package/src/plots/word-cloud/index.ts +3 -3
- package/src/plots/word-cloud/shapes/word-cloud.ts +1 -1
- package/src/plots/word-cloud/utils.ts +3 -4
- package/src/plugin/index.ts +2 -2
- package/src/types/common.ts +13 -11
- package/src/types/index.ts +7 -7
- package/src/types/state.ts +2 -2
- package/src/utils/conversion.ts +6 -3
- package/src/utils/data.ts +1 -1
- package/src/utils/geometry.ts +2 -2
- package/src/utils/hierarchy/pack.ts +2 -2
- package/src/utils/hierarchy/partition.ts +2 -2
- package/src/utils/hierarchy/treemap.ts +2 -2
- package/src/utils/hierarchy/util.ts +1 -1
- package/src/utils/index.ts +10 -10
- package/src/utils/padding.ts +1 -1
- package/src/utils/path.ts +1 -1
- package/src/utils/pattern/dot.ts +3 -3
- package/src/utils/pattern/line.ts +1 -1
- package/src/utils/pattern/square.ts +3 -3
- package/src/utils/statistic.ts +4 -3
- package/src/utils/transform/histogram.ts +1 -1
- package/src/utils/transform/word-cloud.ts +1 -1
- package/src/utils/view.ts +34 -1
package/lib/core/plot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/core/plot.ts"],"names":[],"mappings":";;;;AAAA,+BAAuD;AACvD,mCAAkC;AAClC,8EAAqC;AACrC,2CAAmC;AAEnC,kCAAyF;AAoBzF,IAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD,mBAAmB;AACN,QAAA,sBAAsB,GAAG;IACpC,SAAS;IACT,eAAe;IACf,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,qBAAqB;IACrB,aAAa;CACd,CAAC;AAEF;;GAEG;AACH;IAA0D,gCAAE;IAqC1D,cAAY,SAA+B,EAAE,OAAU;QAAvD,YACE,iBAAO,SAQR;QAPC,KAAI,CAAC,SAAS,GAAG,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEhG,KAAI,CAAC,OAAO,GAAG,kBAAU,CAAC,EAAE,EAAE,KAAI,CAAC,iBAAiB,EAAE,EAAE,OAAO,CAAC,CAAC;QAEjE,KAAI,CAAC,QAAQ,EAAE,CAAC;QAEhB,KAAI,CAAC,UAAU,EAAE,CAAC;;IACpB,CAAC;IA7CD;;;OAGG;IACI,sBAAiB,GAAxB;QACE,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE;oBACL,UAAU,EAAE,KAAK;oBACjB,QA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OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACO,4BAAa,GAAvB;QACE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACK,6BAAc,GAAtB;QAAA,iBAiBC;QAhBC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO;SACR;QAEO,IAAA,KAAmB,IAAI,CAAC,OAAO,QAAjB,EAAd,OAAO,mBAAG,IAAI,KAAA,CAAkB;QACxC,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,MAAM,GAAG,kBAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACjC,YAAY;gBACN,IAAA,KAAoB,wBAAgB,CAAC,KAAI,CAAC,SAAS,CAAC,EAAlD,KAAK,WAAA,EAAE,MAAM,YAAqC,CAAC;gBAE3D,yBAAyB;gBACzB,IAAI,KAAK,KAAK,KAAI,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM,KAAK,KAAI,CAAC,KAAK,CAAC,MAAM,EAAE;oBAC9D,KAAI,CAAC,aAAa,EAAE,CAAC;iBACtB;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IAED;;OAEG;IACK,+BAAgB,GAAxB;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;SACzB;IACH,CAAC;IACH,WAAC;AAAD,CAAC,AAzTD,CAA0D,uBAAE,GAyT3D;AAzTqB,oBAAI","sourcesContent":["import { Chart, Event, Element, View } from '@antv/g2';\nimport { each } from '@antv/util';\nimport EE from '@antv/event-emitter';\nimport { bind } from 'size-sensor';\nimport { Options, StateName, StateCondition, Size, StateObject, Annotation } from '../types';\nimport { getContainerSize, getAllElementsRecursively, deepAssign, pick } from '../utils';\nimport { Adaptor } from './adaptor';\n\n/** 单独 pick 出来的用于基类的类型定义 */\nexport type PickOptions = Pick<\n Options,\n | 'width'\n | 'height'\n | 'padding'\n | 'appendPadding'\n | 'renderer'\n | 'pixelRatio'\n | 'autoFit'\n | 'syncViewPadding'\n | 'supportCSSTransform'\n | 'limitInPlot'\n | 'locale'\n | 'defaultInteractions'\n>;\n\nconst SOURCE_ATTRIBUTE_NAME = 'data-chart-source-type';\n\n/** plot 图表容器的配置 */\nexport const PLOT_CONTAINER_OPTIONS = [\n 'padding',\n 'appendPadding',\n 'renderer',\n 'pixelRatio',\n 'syncViewPadding',\n 'supportCSSTransform',\n 'limitInPlot',\n];\n\n/**\n * 所有 plot 的基类\n */\nexport abstract class Plot<O extends PickOptions> extends EE {\n /**\n * 获取默认的 options 配置项\n * 每个组件都可以复写\n */\n static getDefaultOptions(): any {\n return {\n renderer: 'canvas',\n xAxis: {\n nice: true,\n label: {\n autoRotate: false,\n autoHide: { type: 'equidistance', cfg: { minGap: 6 } },\n },\n },\n yAxis: {\n nice: true,\n label: {\n autoHide: true,\n autoRotate: false,\n },\n },\n animation: true,\n };\n }\n\n /** plot 类型名称 */\n public abstract readonly type: string;\n /** plot 的 schema 配置 */\n public options: O;\n /** plot 绘制的 dom */\n public readonly container: HTMLElement;\n /** G2 chart 实例 */\n public chart: Chart;\n /** resizer unbind */\n private unbind: () => void;\n\n constructor(container: string | HTMLElement, options: O) {\n super();\n this.container = typeof container === 'string' ? document.getElementById(container) : container;\n\n this.options = deepAssign({}, this.getDefaultOptions(), options);\n\n this.createG2();\n\n this.bindEvents();\n }\n\n /**\n * 创建 G2 实例\n */\n private createG2() {\n const { width, height, defaultInteractions } = this.options;\n\n this.chart = new Chart({\n container: this.container,\n autoFit: false, // G2Plot 使用 size-sensor 进行 autoFit\n ...this.getChartSize(width, height),\n localRefresh: false, // 默认关闭,目前 G 还有一些位置问题,难以排查!\n ...pick(this.options, PLOT_CONTAINER_OPTIONS),\n defaultInteractions,\n });\n\n // 给容器增加标识,知道图表的来源区别于 G2\n this.container.setAttribute(SOURCE_ATTRIBUTE_NAME, 'G2Plot');\n }\n\n /**\n * 计算默认的 chart 大小。逻辑简化:如果存在 width 或 height,则直接使用,否则使用容器大小\n * @param width\n * @param height\n */\n private getChartSize(width: number, height: number): Size {\n const chartSize = getContainerSize(this.container);\n return { width: width || chartSize.width || 400, height: height || chartSize.height || 400 };\n }\n\n /**\n * 绑定代理所有 G2 的事件\n */\n private bindEvents() {\n if (this.chart) {\n this.chart.on('*', (e: Event) => {\n if (e?.type) {\n this.emit(e.type, e);\n }\n });\n }\n }\n\n /**\n * 获取默认的 options 配置项\n * 每个组件都可以复写\n */\n protected getDefaultOptions(): any {\n return Plot.getDefaultOptions();\n }\n\n /**\n * 每个组件有自己的 schema adaptor\n */\n protected abstract getSchemaAdaptor(): Adaptor<O>;\n\n /**\n * 绘制\n */\n public render() {\n // 暴力处理,先清空再渲染,需要 G2 层自行做好更新渲染\n this.chart.clear();\n // 因为子 view 会继承父 view 的 options 配置(包括 legend,所以会导致 legend 重复创建)\n // 所以这里给 chart 实例的 options 配置清空\n // 最好的解法是在 G2 view.clear 方法的时候,重置 options 配置。或者提供方法去 resetOptions\n // #1684 理论上在多 view 图形上,只要存在 custom legend,都存在类似问题(子弹图、双轴图)\n // @ts-ignore\n this.chart.options = {\n data: [],\n animate: true,\n };\n this.chart.views = []; // 删除已有的 views\n // 执行 adaptor\n this.execAdaptor();\n // 渲染\n this.chart.render();\n // 绑定\n this.bindSizeSensor();\n }\n\n /**\n * 更新: 更新配置且重新渲染\n * @param options\n */\n public update(options: Partial<O>) {\n this.updateOption(options);\n this.render();\n }\n\n /**\n * 更新配置\n * @param options\n */\n protected updateOption(options: Partial<O>) {\n this.options = deepAssign({}, this.options, options);\n }\n\n /**\n * 设置状态\n * @param type 状态类型,支持 'active' | 'inactive' | 'selected' 三种\n * @param conditions 条件,支持数组\n * @param status 是否激活,默认 true\n */\n public setState(type: StateName, condition: StateCondition, status: boolean = true) {\n const elements = getAllElementsRecursively(this.chart);\n\n each(elements, (ele: Element) => {\n if (condition(ele.getData())) {\n ele.setState(type, status);\n }\n });\n }\n\n /**\n * 获取状态\n */\n public getStates(): StateObject[] {\n const elements = getAllElementsRecursively(this.chart);\n\n const stateObjects: StateObject[] = [];\n each(elements, (element: Element) => {\n const data = element.getData();\n const states = element.getStates();\n each(states, (state) => {\n stateObjects.push({ data, state, geometry: element.geometry, element });\n });\n });\n\n return stateObjects;\n }\n\n /**\n * 更新数据\n * @override\n * @param options\n */\n public changeData(data: any) {\n // @ts-ignore\n this.update({ data });\n // TODO: 临时方案,最好使用下面的方式去更新数据\n // this.chart.changeData(data);\n }\n\n /**\n * 修改画布大小\n * @param width\n * @param height\n */\n public changeSize(width: number, height: number) {\n this.chart.changeSize(width, height);\n }\n\n /**\n * 增加图表标注。通过 id 标识,如果匹配到,就做更新\n */\n public addAnnotations(annotations: Annotation[], view?: View): void {\n view = view ? view : this.chart;\n const incoming = [...annotations];\n const controller = view.getController('annotation');\n const current = controller.getComponents().map((co) => co.extra);\n\n controller.clear(true);\n for (let i = 0; i < current.length; i++) {\n let annotation = current[i];\n\n const findIndex = incoming.findIndex((item) => item.id && item.id === annotation.id);\n if (findIndex !== -1) {\n annotation = deepAssign({}, annotation, incoming[findIndex]);\n incoming.splice(findIndex, 1);\n }\n controller.annotation(annotation);\n }\n\n incoming.forEach((annotation) => controller.annotation(annotation));\n view.render(true);\n }\n\n /**\n * 删除图表标注。通过 id 标识,如果匹配到,就做删除\n */\n public removeAnnotations(annotations: Array<{ id: string } & Partial<Annotation>>): void {\n const controller = this.chart.getController('annotation');\n const current = controller.getComponents().map((co) => co.extra);\n\n controller.clear(true);\n for (let i = 0; i < current.length; i++) {\n const annotation = current[i];\n\n if (!annotations.find((item) => item.id && item.id === annotation.id)) {\n controller.annotation(annotation);\n }\n }\n\n this.chart.render(true);\n }\n /**\n * 销毁\n */\n public destroy() {\n // 取消 size-sensor 的绑定\n this.unbindSizeSensor();\n // G2 的销毁\n this.chart.destroy();\n // 清空已经绑定的事件\n this.off();\n\n this.container.removeAttribute(SOURCE_ATTRIBUTE_NAME);\n }\n\n /**\n * 执行 adaptor 操作\n */\n protected execAdaptor() {\n const adaptor = this.getSchemaAdaptor();\n\n const { padding, appendPadding } = this.options;\n // 更新 padding\n this.chart.padding = padding;\n // 更新 appendPadding\n this.chart.appendPadding = appendPadding;\n\n // 转化成 G2 API\n adaptor({\n chart: this.chart,\n options: this.options,\n });\n }\n\n /**\n * 当图表容器大小变化的时候,执行的函数\n */\n protected triggerResize() {\n this.chart.forceFit();\n }\n\n /**\n * 绑定 dom 容器大小变化的事件\n */\n private bindSizeSensor() {\n if (this.unbind) {\n return;\n }\n\n const { autoFit = true } = this.options;\n if (autoFit) {\n this.unbind = bind(this.container, () => {\n // 获取最新的宽高信息\n const { width, height } = getContainerSize(this.container);\n\n // 主要是防止绑定的时候触发 resize 回调\n if (width !== this.chart.width || height !== this.chart.height) {\n this.triggerResize();\n }\n });\n }\n }\n\n /**\n * 取消绑定\n */\n private unbindSizeSensor() {\n if (this.unbind) {\n this.unbind();\n this.unbind = undefined;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/core/plot.ts"],"names":[],"mappings":";;;;AAAA,8EAAqC;AACrC,+BAAuD;AACvD,mCAAkC;AAClC,2CAAmC;AAEnC,kCAAyF;AAoBzF,IAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD,mBAAmB;AACN,QAAA,sBAAsB,GAAG;IACpC,SAAS;IACT,eAAe;IACf,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,qBAAqB;IACrB,aAAa;CACd,CAAC;AAEF;;GAEG;AACH;IAA0D,gCAAE;IAqC1D,cAAY,SAA+B,EAAE,OAAU;QAAvD,YACE,iBAAO,SAQR;QAPC,KAAI,CAAC,SAAS,GAAG,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QA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M,GAAG,SAAS,CAAC;SACzB;IACH,CAAC;IACH,WAAC;AAAD,CAAC,AAzTD,CAA0D,uBAAE,GAyT3D;AAzTqB,oBAAI","sourcesContent":["import EE from '@antv/event-emitter';\nimport { Chart, Element, Event, View } from '@antv/g2';\nimport { each } from '@antv/util';\nimport { bind } from 'size-sensor';\nimport { Annotation, Options, Size, StateCondition, StateName, StateObject } from '../types';\nimport { deepAssign, getAllElementsRecursively, getContainerSize, pick } from '../utils';\nimport { Adaptor } from './adaptor';\n\n/** 单独 pick 出来的用于基类的类型定义 */\nexport type PickOptions = Pick<\n Options,\n | 'width'\n | 'height'\n | 'padding'\n | 'appendPadding'\n | 'renderer'\n | 'pixelRatio'\n | 'autoFit'\n | 'syncViewPadding'\n | 'supportCSSTransform'\n | 'limitInPlot'\n | 'locale'\n | 'defaultInteractions'\n>;\n\nconst SOURCE_ATTRIBUTE_NAME = 'data-chart-source-type';\n\n/** plot 图表容器的配置 */\nexport const PLOT_CONTAINER_OPTIONS = [\n 'padding',\n 'appendPadding',\n 'renderer',\n 'pixelRatio',\n 'syncViewPadding',\n 'supportCSSTransform',\n 'limitInPlot',\n];\n\n/**\n * 所有 plot 的基类\n */\nexport abstract class Plot<O extends PickOptions> extends EE {\n /**\n * 获取默认的 options 配置项\n * 每个组件都可以复写\n */\n static getDefaultOptions(): any {\n return {\n renderer: 'canvas',\n xAxis: {\n nice: true,\n label: {\n autoRotate: false,\n autoHide: { type: 'equidistance', cfg: { minGap: 6 } },\n },\n },\n yAxis: {\n nice: true,\n label: {\n autoHide: true,\n autoRotate: false,\n },\n },\n animation: true,\n };\n }\n\n /** plot 类型名称 */\n public abstract readonly type: string;\n /** plot 的 schema 配置 */\n public options: O;\n /** plot 绘制的 dom */\n public readonly container: HTMLElement;\n /** G2 chart 实例 */\n public chart: Chart;\n /** resizer unbind */\n private unbind: () => void;\n\n constructor(container: string | HTMLElement, options: O) {\n super();\n this.container = typeof container === 'string' ? document.getElementById(container) : container;\n\n this.options = deepAssign({}, this.getDefaultOptions(), options);\n\n this.createG2();\n\n this.bindEvents();\n }\n\n /**\n * 创建 G2 实例\n */\n private createG2() {\n const { width, height, defaultInteractions } = this.options;\n\n this.chart = new Chart({\n container: this.container,\n autoFit: false, // G2Plot 使用 size-sensor 进行 autoFit\n ...this.getChartSize(width, height),\n localRefresh: false, // 默认关闭,目前 G 还有一些位置问题,难以排查!\n ...pick(this.options, PLOT_CONTAINER_OPTIONS),\n defaultInteractions,\n });\n\n // 给容器增加标识,知道图表的来源区别于 G2\n this.container.setAttribute(SOURCE_ATTRIBUTE_NAME, 'G2Plot');\n }\n\n /**\n * 计算默认的 chart 大小。逻辑简化:如果存在 width 或 height,则直接使用,否则使用容器大小\n * @param width\n * @param height\n */\n private getChartSize(width: number, height: number): Size {\n const chartSize = getContainerSize(this.container);\n return { width: width || chartSize.width || 400, height: height || chartSize.height || 400 };\n }\n\n /**\n * 绑定代理所有 G2 的事件\n */\n private bindEvents() {\n if (this.chart) {\n this.chart.on('*', (e: Event) => {\n if (e?.type) {\n this.emit(e.type, e);\n }\n });\n }\n }\n\n /**\n * 获取默认的 options 配置项\n * 每个组件都可以复写\n */\n protected getDefaultOptions(): any {\n return Plot.getDefaultOptions();\n }\n\n /**\n * 每个组件有自己的 schema adaptor\n */\n protected abstract getSchemaAdaptor(): Adaptor<O>;\n\n /**\n * 绘制\n */\n public render() {\n // 暴力处理,先清空再渲染,需要 G2 层自行做好更新渲染\n this.chart.clear();\n // 因为子 view 会继承父 view 的 options 配置(包括 legend,所以会导致 legend 重复创建)\n // 所以这里给 chart 实例的 options 配置清空\n // 最好的解法是在 G2 view.clear 方法的时候,重置 options 配置。或者提供方法去 resetOptions\n // #1684 理论上在多 view 图形上,只要存在 custom legend,都存在类似问题(子弹图、双轴图)\n // @ts-ignore\n this.chart.options = {\n data: [],\n animate: true,\n };\n this.chart.views = []; // 删除已有的 views\n // 执行 adaptor\n this.execAdaptor();\n // 渲染\n this.chart.render();\n // 绑定\n this.bindSizeSensor();\n }\n\n /**\n * 更新: 更新配置且重新渲染\n * @param options\n */\n public update(options: Partial<O>) {\n this.updateOption(options);\n this.render();\n }\n\n /**\n * 更新配置\n * @param options\n */\n protected updateOption(options: Partial<O>) {\n this.options = deepAssign({}, this.options, options);\n }\n\n /**\n * 设置状态\n * @param type 状态类型,支持 'active' | 'inactive' | 'selected' 三种\n * @param conditions 条件,支持数组\n * @param status 是否激活,默认 true\n */\n public setState(type: StateName, condition: StateCondition, status: boolean = true) {\n const elements = getAllElementsRecursively(this.chart);\n\n each(elements, (ele: Element) => {\n if (condition(ele.getData())) {\n ele.setState(type, status);\n }\n });\n }\n\n /**\n * 获取状态\n */\n public getStates(): StateObject[] {\n const elements = getAllElementsRecursively(this.chart);\n\n const stateObjects: StateObject[] = [];\n each(elements, (element: Element) => {\n const data = element.getData();\n const states = element.getStates();\n each(states, (state) => {\n stateObjects.push({ data, state, geometry: element.geometry, element });\n });\n });\n\n return stateObjects;\n }\n\n /**\n * 更新数据\n * @override\n * @param options\n */\n public changeData(data: any) {\n // @ts-ignore\n this.update({ data });\n // TODO: 临时方案,最好使用下面的方式去更新数据\n // this.chart.changeData(data);\n }\n\n /**\n * 修改画布大小\n * @param width\n * @param height\n */\n public changeSize(width: number, height: number) {\n this.chart.changeSize(width, height);\n }\n\n /**\n * 增加图表标注。通过 id 标识,如果匹配到,就做更新\n */\n public addAnnotations(annotations: Annotation[], view?: View): void {\n view = view ? view : this.chart;\n const incoming = [...annotations];\n const controller = view.getController('annotation');\n const current = controller.getComponents().map((co) => co.extra);\n\n controller.clear(true);\n for (let i = 0; i < current.length; i++) {\n let annotation = current[i];\n\n const findIndex = incoming.findIndex((item) => item.id && item.id === annotation.id);\n if (findIndex !== -1) {\n annotation = deepAssign({}, annotation, incoming[findIndex]);\n incoming.splice(findIndex, 1);\n }\n controller.annotation(annotation);\n }\n\n incoming.forEach((annotation) => controller.annotation(annotation));\n view.render(true);\n }\n\n /**\n * 删除图表标注。通过 id 标识,如果匹配到,就做删除\n */\n public removeAnnotations(annotations: Array<{ id: string } & Partial<Annotation>>): void {\n const controller = this.chart.getController('annotation');\n const current = controller.getComponents().map((co) => co.extra);\n\n controller.clear(true);\n for (let i = 0; i < current.length; i++) {\n const annotation = current[i];\n\n if (!annotations.find((item) => item.id && item.id === annotation.id)) {\n controller.annotation(annotation);\n }\n }\n\n this.chart.render(true);\n }\n /**\n * 销毁\n */\n public destroy() {\n // 取消 size-sensor 的绑定\n this.unbindSizeSensor();\n // G2 的销毁\n this.chart.destroy();\n // 清空已经绑定的事件\n this.off();\n\n this.container.removeAttribute(SOURCE_ATTRIBUTE_NAME);\n }\n\n /**\n * 执行 adaptor 操作\n */\n protected execAdaptor() {\n const adaptor = this.getSchemaAdaptor();\n\n const { padding, appendPadding } = this.options;\n // 更新 padding\n this.chart.padding = padding;\n // 更新 appendPadding\n this.chart.appendPadding = appendPadding;\n\n // 转化成 G2 API\n adaptor({\n chart: this.chart,\n options: this.options,\n });\n }\n\n /**\n * 当图表容器大小变化的时候,执行的函数\n */\n protected triggerResize() {\n this.chart.forceFit();\n }\n\n /**\n * 绑定 dom 容器大小变化的事件\n */\n private bindSizeSensor() {\n if (this.unbind) {\n return;\n }\n\n const { autoFit = true } = this.options;\n if (autoFit) {\n this.unbind = bind(this.container, () => {\n // 获取最新的宽高信息\n const { width, height } = getContainerSize(this.container);\n\n // 主要是防止绑定的时候触发 resize 回调\n if (width !== this.chart.width || height !== this.chart.height) {\n this.triggerResize();\n }\n });\n }\n }\n\n /**\n * 取消绑定\n */\n private unbindSizeSensor() {\n if (this.unbind) {\n this.unbind();\n this.unbind = undefined;\n }\n }\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,100 +1,99 @@
|
|
|
1
|
-
export declare const version = "2.4.
|
|
1
|
+
export declare const version = "2.4.23";
|
|
2
2
|
import * as G2 from '@antv/g2';
|
|
3
|
-
|
|
3
|
+
/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */
|
|
4
|
+
import { animation, annotation, interaction, legend, scale, theme, tooltip } from './adaptor/common';
|
|
4
5
|
import { registerLocale } from './core/locale';
|
|
5
|
-
/**
|
|
6
|
-
export {
|
|
6
|
+
/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */
|
|
7
|
+
export { area, interval, line, point, polygon, schema } from './adaptor/geometries';
|
|
8
|
+
export type { AreaGeometryOptions, IntervalGeometryOptions, LineGeometryOptions, PointGeometryOptions, PolygonGeometryOptions, SchemaGeometryOptions, } from './adaptor/geometries';
|
|
9
|
+
/** Adaptor 及其参数的类型定义 */
|
|
10
|
+
export type { Adaptor, Params } from './core/adaptor';
|
|
7
11
|
/** 全局变量 */
|
|
8
12
|
export { setGlobal } from './core/global';
|
|
9
13
|
/** G2Plot 的 Plot 基类 */
|
|
10
14
|
export { Plot } from './core/plot';
|
|
11
|
-
/**
|
|
12
|
-
export
|
|
13
|
-
export * from './types';
|
|
14
|
-
export { Line } from './plots/line';
|
|
15
|
-
export type { LineOptions } from './plots/line';
|
|
15
|
+
/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
|
|
16
|
+
export { Lab } from './lab';
|
|
16
17
|
export { Area } from './plots/area';
|
|
17
18
|
export type { AreaOptions } from './plots/area';
|
|
18
|
-
export { Column } from './plots/column';
|
|
19
|
-
export type { ColumnOptions } from './plots/column';
|
|
20
19
|
export { Bar } from './plots/bar';
|
|
21
20
|
export type { BarOptions } from './plots/bar';
|
|
22
|
-
export {
|
|
23
|
-
export type {
|
|
24
|
-
export {
|
|
25
|
-
export type {
|
|
26
|
-
export {
|
|
27
|
-
export type {
|
|
28
|
-
export {
|
|
29
|
-
export type {
|
|
30
|
-
export {
|
|
31
|
-
export type {
|
|
21
|
+
export { BidirectionalBar } from './plots/bidirectional-bar';
|
|
22
|
+
export type { BidirectionalBarOptions } from './plots/bidirectional-bar';
|
|
23
|
+
export { Box } from './plots/box';
|
|
24
|
+
export type { BoxOptions } from './plots/box';
|
|
25
|
+
export { Bullet } from './plots/bullet';
|
|
26
|
+
export type { BulletOptions } from './plots/bullet';
|
|
27
|
+
export { Chord } from './plots/chord';
|
|
28
|
+
export type { ChordOptions } from './plots/chord';
|
|
29
|
+
export { CirclePacking } from './plots/circle-packing';
|
|
30
|
+
export type { CirclePackingOptions } from './plots/circle-packing';
|
|
31
|
+
export { Column } from './plots/column';
|
|
32
|
+
export type { ColumnOptions } from './plots/column';
|
|
32
33
|
export { DualAxes } from './plots/dual-axes';
|
|
33
34
|
export type { DualAxesOptions } from './plots/dual-axes';
|
|
34
|
-
export {
|
|
35
|
-
export type {
|
|
36
|
-
export {
|
|
37
|
-
export type {
|
|
38
|
-
export {
|
|
39
|
-
export type {
|
|
35
|
+
export { Facet } from './plots/facet';
|
|
36
|
+
export type { FacetOptions } from './plots/facet';
|
|
37
|
+
export { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';
|
|
38
|
+
export type { FunnelOptions } from './plots/funnel';
|
|
39
|
+
export { Gauge } from './plots/gauge';
|
|
40
|
+
export type { GaugeOptions } from './plots/gauge';
|
|
41
|
+
export { Heatmap } from './plots/heatmap';
|
|
42
|
+
export type { HeatmapOptions } from './plots/heatmap';
|
|
40
43
|
export { Histogram } from './plots/histogram';
|
|
41
44
|
export type { HistogramOptions } from './plots/histogram';
|
|
45
|
+
export { Line } from './plots/line';
|
|
46
|
+
export type { LineOptions } from './plots/line';
|
|
47
|
+
export { addWaterWave, Liquid } from './plots/liquid';
|
|
48
|
+
export type { LiquidOptions } from './plots/liquid';
|
|
49
|
+
export { Mix as Mix, Mix as MultiView } from './plots/mix';
|
|
50
|
+
export type { MixOptions, MixOptions as MultiViewOptions } from './plots/mix';
|
|
51
|
+
export { Pie } from './plots/pie';
|
|
52
|
+
export type { PieOptions } from './plots/pie';
|
|
42
53
|
export { Progress } from './plots/progress';
|
|
43
54
|
export type { ProgressOptions } from './plots/progress';
|
|
55
|
+
export { Radar } from './plots/radar';
|
|
56
|
+
export type { RadarOptions } from './plots/radar';
|
|
57
|
+
export { RadialBar } from './plots/radial-bar';
|
|
58
|
+
export type { RadialBarOptions } from './plots/radial-bar';
|
|
44
59
|
export { RingProgress } from './plots/ring-progress';
|
|
45
60
|
export type { RingProgressOptions } from './plots/ring-progress';
|
|
46
|
-
export {
|
|
47
|
-
export type {
|
|
48
|
-
export {
|
|
49
|
-
export type {
|
|
50
|
-
export {
|
|
51
|
-
export type {
|
|
52
|
-
export { Venn } from './plots/venn';
|
|
53
|
-
export type { VennOptions } from './plots/venn';
|
|
61
|
+
export { Rose } from './plots/rose';
|
|
62
|
+
export type { RoseOptions } from './plots/rose';
|
|
63
|
+
export { Sankey } from './plots/sankey';
|
|
64
|
+
export type { SankeyOptions } from './plots/sankey';
|
|
65
|
+
export { Scatter } from './plots/scatter';
|
|
66
|
+
export type { ScatterOptions } from './plots/scatter';
|
|
54
67
|
export { Stock } from './plots/stock';
|
|
55
68
|
export type { StockOptions } from './plots/stock';
|
|
56
|
-
export { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';
|
|
57
|
-
export type { FunnelOptions } from './plots/funnel';
|
|
58
|
-
export { Liquid, addWaterWave } from './plots/liquid';
|
|
59
|
-
export type { LiquidOptions } from './plots/liquid';
|
|
60
|
-
export { Bullet } from './plots/bullet';
|
|
61
|
-
export type { BulletOptions } from './plots/bullet';
|
|
62
69
|
export { Sunburst } from './plots/sunburst';
|
|
63
70
|
export type { SunburstOptions } from './plots/sunburst';
|
|
64
|
-
export {
|
|
65
|
-
export type {
|
|
66
|
-
export {
|
|
67
|
-
export type {
|
|
68
|
-
export {
|
|
69
|
-
export type {
|
|
70
|
-
export { BidirectionalBar } from './plots/bidirectional-bar';
|
|
71
|
-
export type { BidirectionalBarOptions } from './plots/bidirectional-bar';
|
|
71
|
+
export { TinyArea } from './plots/tiny-area';
|
|
72
|
+
export type { TinyAreaOptions } from './plots/tiny-area';
|
|
73
|
+
export { TinyColumn } from './plots/tiny-column';
|
|
74
|
+
export type { TinyColumnOptions } from './plots/tiny-column';
|
|
75
|
+
export { TinyLine } from './plots/tiny-line';
|
|
76
|
+
export type { TinyLineOptions } from './plots/tiny-line';
|
|
72
77
|
export { Treemap } from './plots/treemap';
|
|
73
78
|
export type { TreemapOptions } from './plots/treemap';
|
|
74
|
-
export {
|
|
75
|
-
export type {
|
|
76
|
-
export {
|
|
77
|
-
export type {
|
|
78
|
-
export {
|
|
79
|
-
export type {
|
|
79
|
+
export { Venn } from './plots/venn';
|
|
80
|
+
export type { VennOptions } from './plots/venn';
|
|
81
|
+
export { Violin } from './plots/violin';
|
|
82
|
+
export type { ViolinOptions } from './plots/violin';
|
|
83
|
+
export { Waterfall } from './plots/waterfall';
|
|
84
|
+
export type { WaterfallOptions } from './plots/waterfall';
|
|
85
|
+
export { WordCloud } from './plots/word-cloud';
|
|
86
|
+
export type { WordCloudOptions } from './plots/word-cloud';
|
|
80
87
|
/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */
|
|
81
88
|
export { P } from './plugin';
|
|
82
|
-
|
|
83
|
-
export { getCanvasPattern } from './utils/pattern';
|
|
84
|
-
export { Mix as MultiView } from './plots/mix';
|
|
85
|
-
export type { MixOptions as MultiViewOptions } from './plots/mix';
|
|
86
|
-
/** 开放多图层图表 (mix) */
|
|
87
|
-
export { Mix as Mix } from './plots/mix';
|
|
88
|
-
export type { MixOptions } from './plots/mix';
|
|
89
|
-
export { Facet } from './plots/facet';
|
|
90
|
-
export type { FacetOptions } from './plots/facet';
|
|
89
|
+
export * from './types';
|
|
91
90
|
/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */
|
|
92
91
|
export { flow, measureTextWidth } from './utils';
|
|
93
|
-
/**
|
|
94
|
-
export {
|
|
95
|
-
export
|
|
96
|
-
/**
|
|
97
|
-
|
|
92
|
+
/** 开放 getCanvasPatterng 方法 */
|
|
93
|
+
export { getCanvasPattern } from './utils/pattern';
|
|
94
|
+
export { G2 };
|
|
95
|
+
/** 透出 国际化 工具函数,便于使用 */
|
|
96
|
+
export { registerLocale };
|
|
98
97
|
export declare const adaptors: {
|
|
99
98
|
scale: typeof scale;
|
|
100
99
|
legend: typeof legend;
|
|
@@ -104,5 +103,3 @@ export declare const adaptors: {
|
|
|
104
103
|
theme: typeof theme;
|
|
105
104
|
animation: typeof animation;
|
|
106
105
|
};
|
|
107
|
-
/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
|
|
108
|
-
export { Lab } from './lab';
|
package/lib/index.js
CHANGED
|
@@ -2,159 +2,157 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.adaptors = exports.registerLocale = exports.G2 = exports.version = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
exports.version = '2.4.
|
|
5
|
+
exports.version = '2.4.23';
|
|
6
6
|
// G2 自定义能力透出
|
|
7
7
|
var G2 = tslib_1.__importStar(require("@antv/g2"));
|
|
8
8
|
exports.G2 = G2;
|
|
9
|
+
/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */
|
|
10
|
+
var common_1 = require("./adaptor/common");
|
|
9
11
|
// 国际化处理
|
|
10
12
|
var locale_1 = require("./core/locale");
|
|
11
13
|
Object.defineProperty(exports, "registerLocale", { enumerable: true, get: function () { return locale_1.registerLocale; } });
|
|
12
14
|
var en_US_1 = require("./locales/en_US");
|
|
13
15
|
var zh_CN_1 = require("./locales/zh_CN");
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */
|
|
17
|
+
var geometries_1 = require("./adaptor/geometries");
|
|
18
|
+
Object.defineProperty(exports, "area", { enumerable: true, get: function () { return geometries_1.area; } });
|
|
19
|
+
Object.defineProperty(exports, "interval", { enumerable: true, get: function () { return geometries_1.interval; } });
|
|
20
|
+
Object.defineProperty(exports, "line", { enumerable: true, get: function () { return geometries_1.line; } });
|
|
21
|
+
Object.defineProperty(exports, "point", { enumerable: true, get: function () { return geometries_1.point; } });
|
|
22
|
+
Object.defineProperty(exports, "polygon", { enumerable: true, get: function () { return geometries_1.polygon; } });
|
|
23
|
+
Object.defineProperty(exports, "schema", { enumerable: true, get: function () { return geometries_1.schema; } });
|
|
17
24
|
/** 全局变量 */
|
|
18
25
|
var global_1 = require("./core/global");
|
|
19
26
|
Object.defineProperty(exports, "setGlobal", { enumerable: true, get: function () { return global_1.setGlobal; } });
|
|
20
27
|
/** G2Plot 的 Plot 基类 */
|
|
21
28
|
var plot_1 = require("./core/plot");
|
|
22
29
|
Object.defineProperty(exports, "Plot", { enumerable: true, get: function () { return plot_1.Plot; } });
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var line_1 = require("./plots/line");
|
|
27
|
-
Object.defineProperty(exports, "Line", { enumerable: true, get: function () { return line_1.Line; } });
|
|
30
|
+
/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
|
|
31
|
+
var lab_1 = require("./lab");
|
|
32
|
+
Object.defineProperty(exports, "Lab", { enumerable: true, get: function () { return lab_1.Lab; } });
|
|
28
33
|
// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)
|
|
29
34
|
var area_1 = require("./plots/area");
|
|
30
35
|
Object.defineProperty(exports, "Area", { enumerable: true, get: function () { return area_1.Area; } });
|
|
31
|
-
// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)
|
|
32
|
-
var column_1 = require("./plots/column");
|
|
33
|
-
Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return column_1.Column; } });
|
|
34
36
|
// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)
|
|
35
37
|
var bar_1 = require("./plots/bar");
|
|
36
38
|
Object.defineProperty(exports, "Bar", { enumerable: true, get: function () { return bar_1.Bar; } });
|
|
37
|
-
//
|
|
38
|
-
var
|
|
39
|
-
Object.defineProperty(exports, "
|
|
40
|
-
//
|
|
41
|
-
var
|
|
42
|
-
Object.defineProperty(exports, "
|
|
43
|
-
//
|
|
44
|
-
var
|
|
45
|
-
Object.defineProperty(exports, "
|
|
46
|
-
//
|
|
47
|
-
var
|
|
48
|
-
Object.defineProperty(exports, "
|
|
49
|
-
//
|
|
50
|
-
var
|
|
51
|
-
Object.defineProperty(exports, "
|
|
39
|
+
// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
|
|
40
|
+
var bidirectional_bar_1 = require("./plots/bidirectional-bar");
|
|
41
|
+
Object.defineProperty(exports, "BidirectionalBar", { enumerable: true, get: function () { return bidirectional_bar_1.BidirectionalBar; } });
|
|
42
|
+
// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)
|
|
43
|
+
var box_1 = require("./plots/box");
|
|
44
|
+
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return box_1.Box; } });
|
|
45
|
+
// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
|
|
46
|
+
var bullet_1 = require("./plots/bullet");
|
|
47
|
+
Object.defineProperty(exports, "Bullet", { enumerable: true, get: function () { return bullet_1.Bullet; } });
|
|
48
|
+
// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)
|
|
49
|
+
var chord_1 = require("./plots/chord");
|
|
50
|
+
Object.defineProperty(exports, "Chord", { enumerable: true, get: function () { return chord_1.Chord; } });
|
|
51
|
+
// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)
|
|
52
|
+
var circle_packing_1 = require("./plots/circle-packing");
|
|
53
|
+
Object.defineProperty(exports, "CirclePacking", { enumerable: true, get: function () { return circle_packing_1.CirclePacking; } });
|
|
54
|
+
// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)
|
|
55
|
+
var column_1 = require("./plots/column");
|
|
56
|
+
Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return column_1.Column; } });
|
|
52
57
|
// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)
|
|
53
58
|
var dual_axes_1 = require("./plots/dual-axes");
|
|
54
59
|
Object.defineProperty(exports, "DualAxes", { enumerable: true, get: function () { return dual_axes_1.DualAxes; } });
|
|
55
|
-
//
|
|
56
|
-
var
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
//
|
|
59
|
-
var
|
|
60
|
-
Object.defineProperty(exports, "
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
// 分面图及类型定义 | author by [visiky](https://github.com/visiky)
|
|
61
|
+
var facet_1 = require("./plots/facet");
|
|
62
|
+
Object.defineProperty(exports, "Facet", { enumerable: true, get: function () { return facet_1.Facet; } });
|
|
63
|
+
// 漏斗图及类型定义
|
|
64
|
+
var funnel_1 = require("./plots/funnel");
|
|
65
|
+
Object.defineProperty(exports, "Funnel", { enumerable: true, get: function () { return funnel_1.Funnel; } });
|
|
66
|
+
Object.defineProperty(exports, "FUNNEL_CONVERSATION_FIELD", { enumerable: true, get: function () { return funnel_1.FUNNEL_CONVERSATION_FIELD; } });
|
|
67
|
+
// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)
|
|
68
|
+
var gauge_1 = require("./plots/gauge");
|
|
69
|
+
Object.defineProperty(exports, "Gauge", { enumerable: true, get: function () { return gauge_1.Gauge; } });
|
|
70
|
+
// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)
|
|
71
|
+
var heatmap_1 = require("./plots/heatmap");
|
|
72
|
+
Object.defineProperty(exports, "Heatmap", { enumerable: true, get: function () { return heatmap_1.Heatmap; } });
|
|
64
73
|
// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)
|
|
65
74
|
var histogram_1 = require("./plots/histogram");
|
|
66
75
|
Object.defineProperty(exports, "Histogram", { enumerable: true, get: function () { return histogram_1.Histogram; } });
|
|
76
|
+
// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)
|
|
77
|
+
var line_1 = require("./plots/line");
|
|
78
|
+
Object.defineProperty(exports, "Line", { enumerable: true, get: function () { return line_1.Line; } });
|
|
79
|
+
// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)
|
|
80
|
+
var liquid_1 = require("./plots/liquid");
|
|
81
|
+
Object.defineProperty(exports, "addWaterWave", { enumerable: true, get: function () { return liquid_1.addWaterWave; } });
|
|
82
|
+
Object.defineProperty(exports, "Liquid", { enumerable: true, get: function () { return liquid_1.Liquid; } });
|
|
83
|
+
// 已经废弃,更名为 Mix
|
|
84
|
+
var mix_1 = require("./plots/mix");
|
|
85
|
+
Object.defineProperty(exports, "Mix", { enumerable: true, get: function () { return mix_1.Mix; } });
|
|
86
|
+
Object.defineProperty(exports, "MultiView", { enumerable: true, get: function () { return mix_1.Mix; } });
|
|
87
|
+
// 饼图及类型定义 | author by [visiky](https://github.com/visiky)
|
|
88
|
+
var pie_1 = require("./plots/pie");
|
|
89
|
+
Object.defineProperty(exports, "Pie", { enumerable: true, get: function () { return pie_1.Pie; } });
|
|
67
90
|
// 进度图及类型定义 | author by [connono](https://github.com/connono)
|
|
68
91
|
var progress_1 = require("./plots/progress");
|
|
69
92
|
Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return progress_1.Progress; } });
|
|
93
|
+
// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)
|
|
94
|
+
var radar_1 = require("./plots/radar");
|
|
95
|
+
Object.defineProperty(exports, "Radar", { enumerable: true, get: function () { return radar_1.Radar; } });
|
|
96
|
+
// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)
|
|
97
|
+
var radial_bar_1 = require("./plots/radial-bar");
|
|
98
|
+
Object.defineProperty(exports, "RadialBar", { enumerable: true, get: function () { return radial_bar_1.RadialBar; } });
|
|
70
99
|
// 环形进度图及类型定义 | author by [connono](https://github.com/connono)
|
|
71
100
|
var ring_progress_1 = require("./plots/ring-progress");
|
|
72
101
|
Object.defineProperty(exports, "RingProgress", { enumerable: true, get: function () { return ring_progress_1.RingProgress; } });
|
|
73
|
-
//
|
|
74
|
-
var
|
|
75
|
-
Object.defineProperty(exports, "
|
|
76
|
-
//
|
|
77
|
-
var
|
|
78
|
-
Object.defineProperty(exports, "
|
|
79
|
-
//
|
|
80
|
-
var
|
|
81
|
-
Object.defineProperty(exports, "
|
|
82
|
-
// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)
|
|
83
|
-
var venn_1 = require("./plots/venn");
|
|
84
|
-
Object.defineProperty(exports, "Venn", { enumerable: true, get: function () { return venn_1.Venn; } });
|
|
102
|
+
// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
|
|
103
|
+
var rose_1 = require("./plots/rose");
|
|
104
|
+
Object.defineProperty(exports, "Rose", { enumerable: true, get: function () { return rose_1.Rose; } });
|
|
105
|
+
// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)
|
|
106
|
+
var sankey_1 = require("./plots/sankey");
|
|
107
|
+
Object.defineProperty(exports, "Sankey", { enumerable: true, get: function () { return sankey_1.Sankey; } });
|
|
108
|
+
// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)
|
|
109
|
+
var scatter_1 = require("./plots/scatter");
|
|
110
|
+
Object.defineProperty(exports, "Scatter", { enumerable: true, get: function () { return scatter_1.Scatter; } });
|
|
85
111
|
// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)
|
|
86
112
|
var stock_1 = require("./plots/stock");
|
|
87
113
|
Object.defineProperty(exports, "Stock", { enumerable: true, get: function () { return stock_1.Stock; } });
|
|
88
|
-
// 漏斗图及类型定义
|
|
89
|
-
var funnel_1 = require("./plots/funnel");
|
|
90
|
-
Object.defineProperty(exports, "Funnel", { enumerable: true, get: function () { return funnel_1.Funnel; } });
|
|
91
|
-
Object.defineProperty(exports, "FUNNEL_CONVERSATION_FIELD", { enumerable: true, get: function () { return funnel_1.FUNNEL_CONVERSATION_FIELD; } });
|
|
92
|
-
// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)
|
|
93
|
-
var liquid_1 = require("./plots/liquid");
|
|
94
|
-
Object.defineProperty(exports, "Liquid", { enumerable: true, get: function () { return liquid_1.Liquid; } });
|
|
95
|
-
Object.defineProperty(exports, "addWaterWave", { enumerable: true, get: function () { return liquid_1.addWaterWave; } });
|
|
96
|
-
// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
|
|
97
|
-
var bullet_1 = require("./plots/bullet");
|
|
98
|
-
Object.defineProperty(exports, "Bullet", { enumerable: true, get: function () { return bullet_1.Bullet; } });
|
|
99
114
|
// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)
|
|
100
115
|
var sunburst_1 = require("./plots/sunburst");
|
|
101
116
|
Object.defineProperty(exports, "Sunburst", { enumerable: true, get: function () { return sunburst_1.Sunburst; } });
|
|
102
|
-
//
|
|
103
|
-
var
|
|
104
|
-
Object.defineProperty(exports, "
|
|
105
|
-
//
|
|
106
|
-
var
|
|
107
|
-
Object.defineProperty(exports, "
|
|
108
|
-
//
|
|
109
|
-
var
|
|
110
|
-
Object.defineProperty(exports, "
|
|
111
|
-
// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
|
|
112
|
-
var bidirectional_bar_1 = require("./plots/bidirectional-bar");
|
|
113
|
-
Object.defineProperty(exports, "BidirectionalBar", { enumerable: true, get: function () { return bidirectional_bar_1.BidirectionalBar; } });
|
|
117
|
+
// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)
|
|
118
|
+
var tiny_area_1 = require("./plots/tiny-area");
|
|
119
|
+
Object.defineProperty(exports, "TinyArea", { enumerable: true, get: function () { return tiny_area_1.TinyArea; } });
|
|
120
|
+
// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)
|
|
121
|
+
var tiny_column_1 = require("./plots/tiny-column");
|
|
122
|
+
Object.defineProperty(exports, "TinyColumn", { enumerable: true, get: function () { return tiny_column_1.TinyColumn; } });
|
|
123
|
+
// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)
|
|
124
|
+
var tiny_line_1 = require("./plots/tiny-line");
|
|
125
|
+
Object.defineProperty(exports, "TinyLine", { enumerable: true, get: function () { return tiny_line_1.TinyLine; } });
|
|
114
126
|
// 矩形树图
|
|
115
127
|
var treemap_1 = require("./plots/treemap");
|
|
116
128
|
Object.defineProperty(exports, "Treemap", { enumerable: true, get: function () { return treemap_1.Treemap; } });
|
|
117
|
-
//
|
|
118
|
-
var
|
|
119
|
-
Object.defineProperty(exports, "
|
|
120
|
-
//
|
|
121
|
-
var
|
|
122
|
-
Object.defineProperty(exports, "
|
|
123
|
-
//
|
|
124
|
-
var
|
|
125
|
-
Object.defineProperty(exports, "
|
|
129
|
+
// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)
|
|
130
|
+
var venn_1 = require("./plots/venn");
|
|
131
|
+
Object.defineProperty(exports, "Venn", { enumerable: true, get: function () { return venn_1.Venn; } });
|
|
132
|
+
// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)
|
|
133
|
+
var violin_1 = require("./plots/violin");
|
|
134
|
+
Object.defineProperty(exports, "Violin", { enumerable: true, get: function () { return violin_1.Violin; } });
|
|
135
|
+
// 瀑布图 | author by [visiky](https://github.com/visiky)
|
|
136
|
+
var waterfall_1 = require("./plots/waterfall");
|
|
137
|
+
Object.defineProperty(exports, "Waterfall", { enumerable: true, get: function () { return waterfall_1.Waterfall; } });
|
|
138
|
+
// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
|
|
139
|
+
var word_cloud_1 = require("./plots/word-cloud");
|
|
140
|
+
Object.defineProperty(exports, "WordCloud", { enumerable: true, get: function () { return word_cloud_1.WordCloud; } });
|
|
126
141
|
// 以下开放自定义图表开发的能力(目前仅仅是孵化中)
|
|
127
142
|
/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */
|
|
128
143
|
var plugin_1 = require("./plugin");
|
|
129
144
|
Object.defineProperty(exports, "P", { enumerable: true, get: function () { return plugin_1.P; } });
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Object.defineProperty(exports, "getCanvasPattern", { enumerable: true, get: function () { return pattern_1.getCanvasPattern; } });
|
|
133
|
-
// 已经废弃,更名为 Mix
|
|
134
|
-
var mix_1 = require("./plots/mix");
|
|
135
|
-
Object.defineProperty(exports, "MultiView", { enumerable: true, get: function () { return mix_1.Mix; } });
|
|
136
|
-
/** 开放多图层图表 (mix) */
|
|
137
|
-
var mix_2 = require("./plots/mix");
|
|
138
|
-
Object.defineProperty(exports, "Mix", { enumerable: true, get: function () { return mix_2.Mix; } });
|
|
139
|
-
// 分面图及类型定义 | author by [visiky](https://github.com/visiky)
|
|
140
|
-
var facet_1 = require("./plots/facet");
|
|
141
|
-
Object.defineProperty(exports, "Facet", { enumerable: true, get: function () { return facet_1.Facet; } });
|
|
145
|
+
// 类型定义导出
|
|
146
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
142
147
|
/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */
|
|
143
148
|
var utils_1 = require("./utils");
|
|
144
149
|
Object.defineProperty(exports, "flow", { enumerable: true, get: function () { return utils_1.flow; } });
|
|
145
150
|
Object.defineProperty(exports, "measureTextWidth", { enumerable: true, get: function () { return utils_1.measureTextWidth; } });
|
|
146
|
-
/**
|
|
147
|
-
var
|
|
148
|
-
Object.defineProperty(exports, "
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Object.defineProperty(exports, "polygon", { enumerable: true, get: function () { return geometries_1.polygon; } });
|
|
153
|
-
Object.defineProperty(exports, "schema", { enumerable: true, get: function () { return geometries_1.schema; } });
|
|
154
|
-
/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */
|
|
155
|
-
var common_1 = require("./adaptor/common");
|
|
151
|
+
/** 开放 getCanvasPatterng 方法 */
|
|
152
|
+
var pattern_1 = require("./utils/pattern");
|
|
153
|
+
Object.defineProperty(exports, "getCanvasPattern", { enumerable: true, get: function () { return pattern_1.getCanvasPattern; } });
|
|
154
|
+
/** default locale register */
|
|
155
|
+
locale_1.registerLocale('en-US', en_US_1.EN_US_LOCALE);
|
|
156
|
+
locale_1.registerLocale('zh-CN', zh_CN_1.ZH_CN_LOCALE);
|
|
156
157
|
exports.adaptors = { scale: common_1.scale, legend: common_1.legend, tooltip: common_1.tooltip, annotation: common_1.annotation, interaction: common_1.interaction, theme: common_1.theme, animation: common_1.animation };
|
|
157
|
-
/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
|
|
158
|
-
var lab_1 = require("./lab");
|
|
159
|
-
Object.defineProperty(exports, "Lab", { enumerable: true, get: function () { return lab_1.Lab; } });
|
|
160
158
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,aAAa;AACb,mDAA+B;AACtB,gBAAE;AAEX,QAAQ;AACR,wCAA+C;AAOtC,+FAPA,uBAAc,OAOA;AANvB,yCAA+C;AAC/C,yCAA+C;AAC/C,8BAA8B;AAC9B,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AACtC,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AAItC,WAAW;AACX,wCAA0C;AAAjC,mGAAA,SAAS,OAAA;AAElB,uBAAuB;AACvB,oCAAmC;AAA1B,4FAAA,IAAI,OAAA;AAKb,SAAS;AACT,kDAAwB;AAExB,2DAA2D;AAC3D,qCAAoC;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uC;AACvC,2CAAqG;AACxF,QAAA,QAAQ,GAAG,EAAE,KAAK,gBAAA,EAAE,MAAM,iBAAA,EAAE,OAAO,kBAAA,EAAE,UAAU,qBAAA,EAAE,WAAW,sBAAA,EAAE,KAAK,gBAAA,EAAE,SAAS,oBAAA,EAAE,CAAC;AAE9F,oDAAoD;AACpD,6BAA4B;AAAnB,0FAAA,GAAG,OAAA","sourcesContent":["export const version = '2.4.20';\n\n// G2 自定义能力透出\nimport * as G2 from '@antv/g2';\nexport { G2 };\n\n// 国际化处理\nimport { registerLocale } from './core/locale';\nimport { EN_US_LOCALE } from './locales/en_US';\nimport { ZH_CN_LOCALE } from './locales/zh_CN';\n/** default locale register */\nregisterLocale('en-US', EN_US_LOCALE);\nregisterLocale('zh-CN', ZH_CN_LOCALE);\n/** 透出 国际化 工具函数,便于使用 */\nexport { registerLocale };\n\n/** 全局变量 */\nexport { setGlobal } from './core/global';\n\n/** G2Plot 的 Plot 基类 */\nexport { Plot } from './core/plot';\n\n/** Adaptor 及其参数的类型定义 */\nexport type { Adaptor, Params } from './core/adaptor';\n\n// 类型定义导出\nexport * from './types';\n\n// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Line } from './plots/line';\nexport type { LineOptions } from './plots/line';\n\n// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Area } from './plots/area';\nexport type { AreaOptions } from './plots/area';\n\n// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)\nexport { Column } from './plots/column';\nexport type { ColumnOptions } from './plots/column';\n\n// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)\nexport { Bar } from './plots/bar';\nexport type { BarOptions } from './plots/bar';\n\n// 饼图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Pie } from './plots/pie';\nexport type { PieOptions } from './plots/pie';\n\n// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { Rose } from './plots/rose';\nexport type { RoseOptions } from './plots/rose';\n\n// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { WordCloud } from './plots/word-cloud';\nexport type { WordCloudOptions } from './plots/word-cloud';\n\n// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)\nexport { Scatter } from './plots/scatter';\nexport type { ScatterOptions } from './plots/scatter';\n\n// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Radar } from './plots/radar';\nexport type { RadarOptions } from './plots/radar';\n\n// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)\nexport { DualAxes } from './plots/dual-axes';\nexport type { DualAxesOptions } from './plots/dual-axes';\n\n// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyLine } from './plots/tiny-line';\nexport type { TinyLineOptions } from './plots/tiny-line';\n\n// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyColumn } from './plots/tiny-column';\nexport type { TinyColumnOptions } from './plots/tiny-column';\n\n// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyArea } from './plots/tiny-area';\nexport type { TinyAreaOptions } from './plots/tiny-area';\n\n// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)\nexport { Histogram } from './plots/histogram';\nexport type { HistogramOptions } from './plots/histogram';\n\n// 进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { Progress } from './plots/progress';\nexport type { ProgressOptions } from './plots/progress';\n\n// 环形进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { RingProgress } from './plots/ring-progress';\nexport type { RingProgressOptions } from './plots/ring-progress';\n\n// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)\nexport { Heatmap } from './plots/heatmap';\nexport type { HeatmapOptions } from './plots/heatmap';\n\n// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)\nexport { Box } from './plots/box';\nexport type { BoxOptions } from './plots/box';\n\n// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)\nexport { Violin } from './plots/violin';\nexport type { ViolinOptions } from './plots/violin';\n\n// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Venn } from './plots/venn';\nexport type { VennOptions } from './plots/venn';\n\n// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)\nexport { Stock } from './plots/stock';\nexport type { StockOptions } from './plots/stock';\n\n// 漏斗图及类型定义\nexport { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';\nexport type { FunnelOptions } from './plots/funnel';\n\n// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)\nexport { Liquid, addWaterWave } from './plots/liquid';\nexport type { LiquidOptions } from './plots/liquid';\n\n// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { Bullet } from './plots/bullet';\nexport type { BulletOptions } from './plots/bullet';\n\n// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)\nexport { Sunburst } from './plots/sunburst';\nexport type { SunburstOptions } from './plots/sunburst';\n\n// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Gauge } from './plots/gauge';\nexport type { GaugeOptions } from './plots/gauge';\n\n// 瀑布图 | author by [visiky](https://github.com/visiky)\nexport { Waterfall } from './plots/waterfall';\nexport type { WaterfallOptions } from './plots/waterfall';\n\n// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)\nexport { RadialBar } from './plots/radial-bar';\nexport type { RadialBarOptions } from './plots/radial-bar';\n\n// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { BidirectionalBar } from './plots/bidirectional-bar';\nexport type { BidirectionalBarOptions } from './plots/bidirectional-bar';\n\n// 矩形树图\nexport { Treemap } from './plots/treemap';\nexport type { TreemapOptions } from './plots/treemap';\n\n// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Sankey } from './plots/sankey';\nexport type { SankeyOptions } from './plots/sankey';\n\n// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)\nexport { Chord } from './plots/chord';\nexport type { ChordOptions } from './plots/chord';\n\n// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)\nexport { CirclePacking } from './plots/circle-packing';\nexport type { CirclePackingOptions } from './plots/circle-packing';\n\n// 以下开放自定义图表开发的能力(目前仅仅是孵化中)\n/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */\nexport { P } from './plugin';\n\n/** 开放 getCanvasPatterng 方法 */\nexport { getCanvasPattern } from './utils/pattern';\n\n// 已经废弃,更名为 Mix\nexport { Mix as MultiView } from './plots/mix';\nexport type { MixOptions as MultiViewOptions } from './plots/mix';\n/** 开放多图层图表 (mix) */\nexport { Mix as Mix } from './plots/mix';\nexport type { MixOptions } from './plots/mix';\n\n// 分面图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Facet } from './plots/facet';\nexport type { FacetOptions } from './plots/facet';\n\n/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */\nexport { flow, measureTextWidth } from './utils';\n\n/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */\nexport { line, interval, area, point, polygon, schema } from './adaptor/geometries';\nexport type {\n LineGeometryOptions,\n IntervalGeometryOptions,\n AreaGeometryOptions,\n PointGeometryOptions,\n PolygonGeometryOptions,\n SchemaGeometryOptions,\n} from './adaptor/geometries';\n/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */\nimport { scale, legend, tooltip, annotation, interaction, theme, animation } from './adaptor/common';\nexport const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };\n\n/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */\nexport { Lab } from './lab';\n"]}
|
|
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AoC;AAA3B,4FAAA,IAAI,OAAA;AAEb,qGAAqG;AACrG,yCAAwC;AAA/B,gGAAA,MAAM,OAAA;AAEf,sDAAsD;AACtD,+CAA8C;AAArC,sGAAA,SAAS,OAAA;AAElB,uEAAuE;AACvE,iDAA+C;AAAtC,uGAAA,SAAS,OAAA;AAElB,2BAA2B;AAC3B,mEAAmE;AACnE,mCAA6B;AAApB,2FAAA,CAAC,OAAA;AACV,SAAS;AACT,kDAAwB;AACxB,uCAAuC;AACvC,iCAAiD;AAAxC,6FAAA,IAAI,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAC/B,8BAA8B;AAC9B,2CAAmD;AAA1C,2GAAA,gBAAgB,OAAA;AAKzB,8BAA8B;AAC9B,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AACtC,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AAEzB,QAAA,QAAQ,GAAG,EAAE,KAAK,gBAAA,EAAE,MAAM,iBAAA,EAAE,OAAO,kBAAA,EAAE,UAAU,qBAAA,EAAE,WAAW,sBAAA,EAAE,KAAK,gBAAA,EAAE,SAAS,oBAAA,EAAE,CAAC","sourcesContent":["export const version = '2.4.23';\n\n// G2 自定义能力透出\nimport * as G2 from '@antv/g2';\n/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */\nimport { animation, annotation, interaction, legend, scale, theme, tooltip } from './adaptor/common';\n// 国际化处理\nimport { registerLocale } from './core/locale';\nimport { EN_US_LOCALE } from './locales/en_US';\nimport { ZH_CN_LOCALE } from './locales/zh_CN';\n/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */\nexport { area, interval, line, point, polygon, schema } from './adaptor/geometries';\nexport type {\n AreaGeometryOptions,\n IntervalGeometryOptions,\n LineGeometryOptions,\n PointGeometryOptions,\n PolygonGeometryOptions,\n SchemaGeometryOptions,\n} from './adaptor/geometries';\n/** Adaptor 及其参数的类型定义 */\nexport type { Adaptor, Params } from './core/adaptor';\n/** 全局变量 */\nexport { setGlobal } from './core/global';\n/** G2Plot 的 Plot 基类 */\nexport { Plot } from './core/plot';\n/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */\nexport { Lab } from './lab';\n// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Area } from './plots/area';\nexport type { AreaOptions } from './plots/area';\n// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)\nexport { Bar } from './plots/bar';\nexport type { BarOptions } from './plots/bar';\n// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { BidirectionalBar } from './plots/bidirectional-bar';\nexport type { BidirectionalBarOptions } from './plots/bidirectional-bar';\n// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)\nexport { Box } from './plots/box';\nexport type { BoxOptions } from './plots/box';\n// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { Bullet } from './plots/bullet';\nexport type { BulletOptions } from './plots/bullet';\n// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)\nexport { Chord } from './plots/chord';\nexport type { ChordOptions } from './plots/chord';\n// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)\nexport { CirclePacking } from './plots/circle-packing';\nexport type { CirclePackingOptions } from './plots/circle-packing';\n// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)\nexport { Column } from './plots/column';\nexport type { ColumnOptions } from './plots/column';\n// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)\nexport { DualAxes } from './plots/dual-axes';\nexport type { DualAxesOptions } from './plots/dual-axes';\n// 分面图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Facet } from './plots/facet';\nexport type { FacetOptions } from './plots/facet';\n// 漏斗图及类型定义\nexport { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';\nexport type { FunnelOptions } from './plots/funnel';\n// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Gauge } from './plots/gauge';\nexport type { GaugeOptions } from './plots/gauge';\n// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)\nexport { Heatmap } from './plots/heatmap';\nexport type { HeatmapOptions } from './plots/heatmap';\n// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)\nexport { Histogram } from './plots/histogram';\nexport type { HistogramOptions } from './plots/histogram';\n// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Line } from './plots/line';\nexport type { LineOptions } from './plots/line';\n// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)\nexport { addWaterWave, Liquid } from './plots/liquid';\nexport type { LiquidOptions } from './plots/liquid';\n// 已经废弃,更名为 Mix\nexport { Mix as Mix, Mix as MultiView } from './plots/mix';\nexport type { MixOptions, MixOptions as MultiViewOptions } from './plots/mix';\n// 饼图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Pie } from './plots/pie';\nexport type { PieOptions } from './plots/pie';\n// 进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { Progress } from './plots/progress';\nexport type { ProgressOptions } from './plots/progress';\n// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Radar } from './plots/radar';\nexport type { RadarOptions } from './plots/radar';\n// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)\nexport { RadialBar } from './plots/radial-bar';\nexport type { RadialBarOptions } from './plots/radial-bar';\n// 环形进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { RingProgress } from './plots/ring-progress';\nexport type { RingProgressOptions } from './plots/ring-progress';\n// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { Rose } from './plots/rose';\nexport type { RoseOptions } from './plots/rose';\n// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Sankey } from './plots/sankey';\nexport type { SankeyOptions } from './plots/sankey';\n// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)\nexport { Scatter } from './plots/scatter';\nexport type { ScatterOptions } from './plots/scatter';\n// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)\nexport { Stock } from './plots/stock';\nexport type { StockOptions } from './plots/stock';\n// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)\nexport { Sunburst } from './plots/sunburst';\nexport type { SunburstOptions } from './plots/sunburst';\n// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyArea } from './plots/tiny-area';\nexport type { TinyAreaOptions } from './plots/tiny-area';\n// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyColumn } from './plots/tiny-column';\nexport type { TinyColumnOptions } from './plots/tiny-column';\n// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyLine } from './plots/tiny-line';\nexport type { TinyLineOptions } from './plots/tiny-line';\n// 矩形树图\nexport { Treemap } from './plots/treemap';\nexport type { TreemapOptions } from './plots/treemap';\n// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Venn } from './plots/venn';\nexport type { VennOptions } from './plots/venn';\n// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)\nexport { Violin } from './plots/violin';\nexport type { ViolinOptions } from './plots/violin';\n// 瀑布图 | author by [visiky](https://github.com/visiky)\nexport { Waterfall } from './plots/waterfall';\nexport type { WaterfallOptions } from './plots/waterfall';\n// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { WordCloud } from './plots/word-cloud';\nexport type { WordCloudOptions } from './plots/word-cloud';\n// 以下开放自定义图表开发的能力(目前仅仅是孵化中)\n/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */\nexport { P } from './plugin';\n// 类型定义导出\nexport * from './types';\n/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */\nexport { flow, measureTextWidth } from './utils';\n/** 开放 getCanvasPatterng 方法 */\nexport { getCanvasPattern } from './utils/pattern';\nexport { G2 };\n/** 透出 国际化 工具函数,便于使用 */\nexport { registerLocale };\n\n/** default locale register */\nregisterLocale('en-US', EN_US_LOCALE);\nregisterLocale('zh-CN', ZH_CN_LOCALE);\n\nexport const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };\n"]}
|