@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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Action } from '@antv/g2';
|
|
2
|
+
import { each, filter, get, map } from '@antv/util';
|
|
3
|
+
import { conversionTag as basicConversionTag } from '../geometries/basic';
|
|
4
|
+
import { CONVERSION_TAG_NAME, transformData } from '../geometries/common';
|
|
5
|
+
import { compareConversionTag } from '../geometries/compare';
|
|
6
|
+
import { FunnelOptions } from '../types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Funnel 转化率跟随 legend 变化事件
|
|
10
|
+
*/
|
|
11
|
+
export class ConversionTagAction extends Action {
|
|
12
|
+
private rendering = false;
|
|
13
|
+
public change(options: FunnelOptions) {
|
|
14
|
+
// 防止多次重复渲染
|
|
15
|
+
if (!this.rendering) {
|
|
16
|
+
const { seriesField, compareField } = options;
|
|
17
|
+
const conversionTag = compareField ? compareConversionTag : basicConversionTag;
|
|
18
|
+
const { view } = this.context;
|
|
19
|
+
// 兼容分面漏斗图
|
|
20
|
+
const views = seriesField || compareField ? view.views : [view];
|
|
21
|
+
map(views, (v, index) => {
|
|
22
|
+
// 防止影响其他 annotations 被去除
|
|
23
|
+
const annotationController = v.getController('annotation');
|
|
24
|
+
|
|
25
|
+
const annotations = filter(
|
|
26
|
+
get(annotationController, ['option'], []),
|
|
27
|
+
({ name }) => name !== CONVERSION_TAG_NAME
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
annotationController.clear(true);
|
|
31
|
+
|
|
32
|
+
each(annotations, (annotation) => {
|
|
33
|
+
if (typeof annotation === 'object') {
|
|
34
|
+
v.annotation()[annotation.type](annotation);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const data = get(v, ['filteredData'], v.getOptions().data);
|
|
39
|
+
|
|
40
|
+
conversionTag({
|
|
41
|
+
chart: v,
|
|
42
|
+
index,
|
|
43
|
+
options: {
|
|
44
|
+
...options,
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
filteredData: transformData(data, data, options),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
v.filterData(data);
|
|
51
|
+
this.rendering = true;
|
|
52
|
+
v.render(true);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
this.rendering = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { registerAction, registerInteraction } from '@antv/g2';
|
|
2
|
+
import { ConversionTagAction } from './funnel-conversion-tag';
|
|
3
|
+
|
|
4
|
+
const FUNNEL_CONVERSION_TAG = 'funnel-conversion-tag';
|
|
5
|
+
export const FUNNEL_LEGEND_FILTER = 'funnel-afterrender';
|
|
6
|
+
export const interactionStart = { trigger: 'afterrender', action: `${FUNNEL_CONVERSION_TAG}:change` };
|
|
7
|
+
|
|
8
|
+
registerAction(FUNNEL_CONVERSION_TAG, ConversionTagAction);
|
|
9
|
+
registerInteraction(FUNNEL_LEGEND_FILTER, {
|
|
10
|
+
start: [interactionStart],
|
|
11
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StyleAttr } from '../../types/attr';
|
|
2
|
-
import {
|
|
2
|
+
import { AnnotationPosition, Data, Datum, Options, TextStyle } from '../../types/common';
|
|
3
|
+
export { Interaction } from '../../types';
|
|
3
4
|
|
|
4
5
|
export type ConversionPosition = {
|
|
5
6
|
start: AnnotationPosition;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Geometry } from '@antv/g2';
|
|
2
2
|
import { get, isString } from '@antv/util';
|
|
3
|
-
import {
|
|
3
|
+
import { animation, annotation, interaction, scale, theme } from '../../adaptor/common';
|
|
4
4
|
import { interval } from '../../adaptor/geometries';
|
|
5
5
|
import { AXIS_META_CONFIG_KEYS } from '../../constant';
|
|
6
6
|
import { Params } from '../../core/adaptor';
|
|
7
7
|
import { deepAssign, flow, pick, renderGaugeStatistic } from '../../utils';
|
|
8
|
-
import {
|
|
8
|
+
import { DEFAULT_COLOR, INDICATEOR_VIEW_ID, PERCENT, RANGE_TYPE, RANGE_VALUE, RANGE_VIEW_ID } from './constants';
|
|
9
9
|
import { GaugeOptions } from './types';
|
|
10
10
|
import { getIndicatorData, getRangeData } from './utils';
|
|
11
11
|
|
package/src/plots/gauge/index.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Plot } from '../../core/plot';
|
|
1
|
+
import { Event, VIEW_LIFE_CIRCLE } from '@antv/g2';
|
|
3
2
|
import { Adaptor } from '../../core/adaptor';
|
|
4
|
-
import {
|
|
3
|
+
import { Plot } from '../../core/plot';
|
|
5
4
|
import { adaptor, statistic } from './adaptor';
|
|
6
|
-
import { INDICATEOR_VIEW_ID, RANGE_VIEW_ID
|
|
7
|
-
import { getIndicatorData, getRangeData } from './utils';
|
|
8
|
-
|
|
5
|
+
import { DEFAULT_OPTIONS, INDICATEOR_VIEW_ID, RANGE_VIEW_ID } from './constants';
|
|
9
6
|
// 注册 shape
|
|
10
7
|
import './shapes/indicator';
|
|
11
8
|
import './shapes/meter-gauge';
|
|
9
|
+
import { GaugeOptions } from './types';
|
|
10
|
+
import { getIndicatorData, getRangeData } from './utils';
|
|
12
11
|
|
|
13
12
|
export type { GaugeOptions };
|
|
14
13
|
|
package/src/plots/gauge/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { clamp, get, size } from '@antv/util';
|
|
2
|
-
import { Data
|
|
3
|
-
import {
|
|
1
|
+
import { clamp, get, size, uniq } from '@antv/util';
|
|
2
|
+
import { Data } from '../../types';
|
|
3
|
+
import { PERCENT, RANGE_TYPE, RANGE_VALUE } from './constants';
|
|
4
4
|
import { GaugeOptions, GaugeRangeData } from './types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,8 +16,6 @@ export function processRangeData(range: number[], percent: GaugeOptions['percent
|
|
|
16
16
|
.map((r: number, idx: number) => {
|
|
17
17
|
return { [RANGE_VALUE]: r - (range[idx - 1] || 0), [RANGE_TYPE]: `${idx}`, [PERCENT]: percent };
|
|
18
18
|
})
|
|
19
|
-
// 去掉 0 的数据
|
|
20
|
-
.filter((d: Datum) => !!d[RANGE_VALUE])
|
|
21
19
|
);
|
|
22
20
|
}
|
|
23
21
|
|
|
@@ -37,6 +35,9 @@ export function getIndicatorData(percent: GaugeOptions['percent']): Data {
|
|
|
37
35
|
export function getRangeData(percent: GaugeOptions['percent'], range?: GaugeOptions['range']): GaugeRangeData {
|
|
38
36
|
const ticks = get(range, ['ticks'], []);
|
|
39
37
|
|
|
40
|
-
const clampTicks = size(ticks) ? ticks : [0, clamp(percent, 0, 1), 1];
|
|
38
|
+
const clampTicks = size(ticks) ? uniq(ticks) : [0, clamp(percent, 0, 1), 1];
|
|
39
|
+
if (!clampTicks[0]) {
|
|
40
|
+
clampTicks.shift();
|
|
41
|
+
}
|
|
41
42
|
return processRangeData(clampTicks as number[], percent);
|
|
42
43
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { get } from '@antv/util';
|
|
2
|
-
import {
|
|
3
|
-
import { deepAssign, findGeometry } from '../../utils';
|
|
4
|
-
import { flow, transformLabel } from '../../utils';
|
|
5
|
-
import { tooltip, interaction, animation, theme, scale, annotation, state, pattern } from '../../adaptor/common';
|
|
1
|
+
import { get, isNumber } from '@antv/util';
|
|
2
|
+
import { animation, annotation, interaction, pattern, scale, state, theme, tooltip } from '../../adaptor/common';
|
|
6
3
|
import { geometry as geometryAdaptor } from '../../adaptor/geometries/base';
|
|
4
|
+
import { Params } from '../../core/adaptor';
|
|
5
|
+
import { deepAssign, findGeometry, flow, transformLabel } from '../../utils';
|
|
7
6
|
import { getTooltipMapping } from '../../utils/tooltip';
|
|
8
7
|
import { HeatmapOptions } from './types';
|
|
9
8
|
|
|
10
9
|
function geometry(params: Params<HeatmapOptions>): Params<HeatmapOptions> {
|
|
11
10
|
const { chart, options } = params;
|
|
12
|
-
const { data, type, xField, yField, colorField, sizeField, sizeRatio, shape, color, tooltip, heatmapStyle } =
|
|
11
|
+
const { data, type, xField, yField, colorField, sizeField, sizeRatio, shape, color, tooltip, heatmapStyle, meta } =
|
|
12
|
+
options;
|
|
13
13
|
|
|
14
14
|
chart.data(data);
|
|
15
15
|
let geometryType = 'polygon';
|
|
@@ -51,8 +51,9 @@ function geometry(params: Params<HeatmapOptions>): Params<HeatmapOptions> {
|
|
|
51
51
|
(sizeField
|
|
52
52
|
? (dautm) => {
|
|
53
53
|
const field = data.map((row) => row[sizeField]);
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
let { min, max } = meta?.[sizeField] || {};
|
|
55
|
+
min = isNumber(min) ? min : Math.min(...field);
|
|
56
|
+
max = isNumber(max) ? max : Math.max(...field);
|
|
56
57
|
return [shape, (get(dautm, sizeField) - min) / (max - min), checkedSizeRatio];
|
|
57
58
|
}
|
|
58
59
|
: () => [shape, 1, checkedSizeRatio]),
|
|
@@ -167,17 +168,14 @@ function coordinate(params: Params<HeatmapOptions>): Params<HeatmapOptions> {
|
|
|
167
168
|
const { chart, options } = params;
|
|
168
169
|
const { coordinate, reflect } = options;
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
chart.coordinate({
|
|
172
|
-
type: coordinate.type || 'rect',
|
|
173
|
-
cfg: coordinate.cfg,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
171
|
+
const coordinateOption = deepAssign({ actions: [] }, coordinate ?? { type: 'rect' });
|
|
176
172
|
|
|
177
173
|
if (reflect) {
|
|
178
|
-
|
|
174
|
+
coordinateOption.actions?.push?.(['reflect', reflect]);
|
|
179
175
|
}
|
|
180
176
|
|
|
177
|
+
chart.coordinate(coordinateOption);
|
|
178
|
+
|
|
181
179
|
return params;
|
|
182
180
|
}
|
|
183
181
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Plot } from '../../core/plot';
|
|
2
1
|
import { Adaptor } from '../../core/adaptor';
|
|
3
|
-
import {
|
|
2
|
+
import { Plot } from '../../core/plot';
|
|
4
3
|
import { adaptor } from './adaptor';
|
|
5
4
|
import { DEFAULT_OPTIONS } from './constant';
|
|
6
5
|
// registered shapes
|
|
7
6
|
import './shapes/circle';
|
|
8
7
|
import './shapes/square';
|
|
8
|
+
import { HeatmapOptions } from './types';
|
|
9
9
|
|
|
10
10
|
export type { HeatmapOptions };
|
|
11
11
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { tooltip, interaction, animation, theme, scale, state } from '../../adaptor/common';
|
|
3
|
-
import { pattern } from '../../adaptor/pattern';
|
|
4
|
-
import { findGeometry, deepAssign } from '../../utils';
|
|
5
|
-
import { flow, transformLabel } from '../../utils';
|
|
1
|
+
import { animation, interaction, scale, state, theme, tooltip } from '../../adaptor/common';
|
|
6
2
|
import { interval } from '../../adaptor/geometries';
|
|
3
|
+
import { pattern } from '../../adaptor/pattern';
|
|
4
|
+
import { Params } from '../../core/adaptor';
|
|
5
|
+
import { deepAssign, findGeometry, flow, transformLabel } from '../../utils';
|
|
7
6
|
import { binHistogram } from '../../utils/transform/histogram';
|
|
8
|
-
import { HistogramOptions } from './types';
|
|
9
7
|
import { HISTOGRAM_X_FIELD, HISTOGRAM_Y_FIELD } from './constant';
|
|
8
|
+
import { HistogramOptions } from './types';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* geometry 处理
|
|
@@ -39,6 +38,8 @@ function geometry(params: Params<HistogramOptions>): Params<HistogramOptions> {
|
|
|
39
38
|
// 图例
|
|
40
39
|
if (legend && stackField) {
|
|
41
40
|
chart.legend(stackField, legend);
|
|
41
|
+
} else {
|
|
42
|
+
chart.legend(false);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
return params;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Plot } from '../../core/plot';
|
|
2
1
|
import { Adaptor } from '../../core/adaptor';
|
|
2
|
+
import { Plot } from '../../core/plot';
|
|
3
3
|
import { binHistogram } from '../../utils/transform/histogram';
|
|
4
|
-
import { HistogramOptions } from './types';
|
|
5
4
|
import { adaptor } from './adaptor';
|
|
6
5
|
import { DEFAULT_OPTIONS } from './constant';
|
|
6
|
+
import { HistogramOptions } from './types';
|
|
7
7
|
|
|
8
8
|
export type { HistogramOptions };
|
|
9
9
|
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { Geometry } from '@antv/g2';
|
|
2
2
|
import { each, isArray } from '@antv/util';
|
|
3
|
-
import { Params } from '../../core/adaptor';
|
|
4
3
|
import {
|
|
5
|
-
tooltip,
|
|
6
|
-
slider,
|
|
7
|
-
interaction,
|
|
8
4
|
animation,
|
|
9
|
-
theme,
|
|
10
|
-
scale,
|
|
11
5
|
annotation,
|
|
6
|
+
interaction,
|
|
12
7
|
limitInPlot,
|
|
8
|
+
scale,
|
|
13
9
|
scrollbar,
|
|
10
|
+
slider,
|
|
11
|
+
theme,
|
|
12
|
+
tooltip,
|
|
14
13
|
} from '../../adaptor/common';
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { flow } from '../../utils';
|
|
14
|
+
import { area, line, point } from '../../adaptor/geometries';
|
|
15
|
+
import { Params } from '../../core/adaptor';
|
|
16
|
+
import { deepAssign, findGeometry, flow, transformLabel } from '../../utils';
|
|
18
17
|
import { adjustYMetaByZero } from '../../utils/data';
|
|
19
18
|
import { LineOptions } from './types';
|
|
20
19
|
|
package/src/plots/line/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Plot } from '../../core/plot';
|
|
2
1
|
import { Adaptor } from '../../core/adaptor';
|
|
3
|
-
import {
|
|
2
|
+
import { Plot } from '../../core/plot';
|
|
4
3
|
import { adaptor, meta } from './adaptor';
|
|
5
4
|
import { DEFAULT_OPTIONS } from './constants';
|
|
6
5
|
import './interactions';
|
|
6
|
+
import { LineOptions } from './types';
|
|
7
7
|
|
|
8
8
|
export type { LineOptions };
|
|
9
9
|
|
package/src/plots/line/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Geometry } from '@antv/g2';
|
|
2
2
|
import { get, isNil } from '@antv/util';
|
|
3
|
-
import {
|
|
4
|
-
import { Params } from '../../core/adaptor';
|
|
5
|
-
import { flow, deepAssign, renderStatistic } from '../../utils';
|
|
3
|
+
import { animation, interaction, pattern, scale, theme } from '../../adaptor/common';
|
|
6
4
|
import { interval } from '../../adaptor/geometries';
|
|
7
|
-
import {
|
|
5
|
+
import { Params } from '../../core/adaptor';
|
|
6
|
+
import { deepAssign, flow, renderStatistic } from '../../utils';
|
|
7
|
+
import { CustomInfo, LiquidOptions } from './types';
|
|
8
8
|
import { getLiquidData } from './utils';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -13,7 +13,7 @@ import { getLiquidData } from './utils';
|
|
|
13
13
|
*/
|
|
14
14
|
function geometry(params: Params<LiquidOptions>): Params<LiquidOptions> {
|
|
15
15
|
const { chart, options } = params;
|
|
16
|
-
const { percent, liquidStyle, radius, outline, wave, shape, animation } = options;
|
|
16
|
+
const { percent, liquidStyle, radius, outline, wave, shape, shapeStyle, animation } = options;
|
|
17
17
|
|
|
18
18
|
chart.scale({
|
|
19
19
|
percent: {
|
|
@@ -48,6 +48,7 @@ function geometry(params: Params<LiquidOptions>): Params<LiquidOptions> {
|
|
|
48
48
|
outline,
|
|
49
49
|
wave,
|
|
50
50
|
shape,
|
|
51
|
+
shapeStyle,
|
|
51
52
|
background,
|
|
52
53
|
animation,
|
|
53
54
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Plot } from '../../core/plot';
|
|
1
|
+
import { Event, VIEW_LIFE_CIRCLE } from '@antv/g2';
|
|
3
2
|
import { Adaptor } from '../../core/adaptor';
|
|
4
|
-
import {
|
|
3
|
+
import { Plot } from '../../core/plot';
|
|
5
4
|
import { adaptor, statistic } from './adaptor';
|
|
6
5
|
import { DEFAULT_OPTIONS } from './constants';
|
|
7
|
-
import { getLiquidData } from './utils';
|
|
8
6
|
// register liquid shape
|
|
9
7
|
import './shapes/liquid';
|
|
8
|
+
import { LiquidOptions } from './types';
|
|
9
|
+
import { getLiquidData } from './utils';
|
|
10
10
|
|
|
11
11
|
export { addWaterWave } from './shapes/liquid';
|
|
12
|
-
|
|
13
12
|
export type { LiquidOptions };
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { registerShape } from '@antv/g2';
|
|
2
1
|
import { IGroup, IShape } from '@antv/g-base';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { registerShape } from '@antv/g2';
|
|
3
|
+
import { isNumber, mix, reduce } from '@antv/util';
|
|
5
4
|
import { Point, ShapeStyle } from '../../../types';
|
|
6
|
-
import {
|
|
5
|
+
import { transform } from '../../../utils/matrix';
|
|
6
|
+
import { CustomInfo, LiquidOptions } from '../types';
|
|
7
7
|
|
|
8
8
|
const DURATION = 5000;
|
|
9
9
|
|
|
@@ -223,7 +223,7 @@ export function addWaterWave(
|
|
|
223
223
|
|
|
224
224
|
// 循环 waveCount 个数
|
|
225
225
|
for (let idx = 0; idx < waveCount; idx++) {
|
|
226
|
-
const factor = waveCount <= 1 ?
|
|
226
|
+
const factor = waveCount <= 1 ? 1 : idx / (waveCount - 1);
|
|
227
227
|
|
|
228
228
|
// 画波
|
|
229
229
|
const wave = group.addShape('path', {
|
|
@@ -389,7 +389,7 @@ registerShape('interval', 'liquid-fill-gauge', {
|
|
|
389
389
|
const cy = 0.5;
|
|
390
390
|
|
|
391
391
|
const { customInfo } = cfg;
|
|
392
|
-
const { radius: radio, shape, background, animation } = customInfo as CustomInfo;
|
|
392
|
+
const { radius: radio, shape, shapeStyle, background, animation } = customInfo as CustomInfo;
|
|
393
393
|
const outline: LiquidOptions['outline'] = customInfo.outline;
|
|
394
394
|
const wave: LiquidOptions['wave'] = customInfo.wave;
|
|
395
395
|
const { border, distance } = outline;
|
|
@@ -417,7 +417,18 @@ registerShape('interval', 'liquid-fill-gauge', {
|
|
|
417
417
|
const buildPath = typeof shape === 'function' ? shape : builtInShapeByName[shape] || builtInShapeByName['circle'];
|
|
418
418
|
const shapePath = buildPath(center.x, center.y, innerRadius * 2, innerRadius * 2);
|
|
419
419
|
|
|
420
|
-
// 1.
|
|
420
|
+
// 1. 当 shapeStyle 不为空时,绘制形状样式作为背景
|
|
421
|
+
if (shapeStyle) {
|
|
422
|
+
container.addShape('path', {
|
|
423
|
+
name: 'shape',
|
|
424
|
+
attrs: {
|
|
425
|
+
path: shapePath,
|
|
426
|
+
...shapeStyle,
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// 2. 绘制一个波
|
|
421
432
|
const waves = container.addGroup({
|
|
422
433
|
name: 'waves',
|
|
423
434
|
});
|
|
@@ -444,7 +455,7 @@ registerShape('interval', 'liquid-fill-gauge', {
|
|
|
444
455
|
animation
|
|
445
456
|
);
|
|
446
457
|
|
|
447
|
-
//
|
|
458
|
+
// 5. 绘制一个 distance 宽的 border
|
|
448
459
|
container.addShape('path', {
|
|
449
460
|
name: 'distance',
|
|
450
461
|
attrs: {
|
|
@@ -455,7 +466,7 @@ registerShape('interval', 'liquid-fill-gauge', {
|
|
|
455
466
|
},
|
|
456
467
|
});
|
|
457
468
|
|
|
458
|
-
//
|
|
469
|
+
// 6. 绘制一个 border 宽的 border
|
|
459
470
|
container.addShape('path', {
|
|
460
471
|
name: 'wrap',
|
|
461
472
|
attrs: mix(outlineAttrs, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PathCommand } from '@antv/g-base';
|
|
2
|
-
import {
|
|
2
|
+
import { ColorAttr, Options, ShapeStyle, Statistic, StyleAttr } from '../../types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @title 轮廓
|
|
@@ -61,6 +61,10 @@ export interface LiquidOptions extends Omit<Options, 'data'> {
|
|
|
61
61
|
* @title 水波图的样式
|
|
62
62
|
*/
|
|
63
63
|
readonly liquidStyle?: StyleAttr;
|
|
64
|
+
/**
|
|
65
|
+
* @title 形状的样式
|
|
66
|
+
*/
|
|
67
|
+
readonly shapeStyle?: StyleAttr;
|
|
64
68
|
/**
|
|
65
69
|
* @title 指标文本组件
|
|
66
70
|
*/
|
|
@@ -88,6 +92,7 @@ export type CustomInfo = {
|
|
|
88
92
|
outline?: LiquidOptions['outline'];
|
|
89
93
|
wave?: LiquidOptions['wave'];
|
|
90
94
|
shape?: LiquidOptions['shape'];
|
|
95
|
+
shapeStyle?: LiquidOptions['shapeStyle'];
|
|
91
96
|
background?: string;
|
|
92
97
|
animation?: LiquidOptions['animation'];
|
|
93
98
|
};
|
package/src/plots/mix/adaptor.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { each } from '@antv/util';
|
|
2
1
|
import { Geometry } from '@antv/g2';
|
|
2
|
+
import { each } from '@antv/util';
|
|
3
|
+
import { animation, annotation, interaction, theme, tooltip } from '../../adaptor/common';
|
|
3
4
|
import { geometry as geometryAdaptor } from '../../adaptor/geometries/base';
|
|
4
|
-
import {
|
|
5
|
+
import { AXIS_META_CONFIG_KEYS } from '../../constant';
|
|
5
6
|
import { Params } from '../../core/adaptor';
|
|
6
7
|
import { PLOT_CONTAINER_OPTIONS } from '../../core/plot';
|
|
7
|
-
import { AXIS_META_CONFIG_KEYS } from '../../constant';
|
|
8
|
-
import { deepAssign, flow, pick } from '../../utils';
|
|
9
8
|
import { Axis } from '../../types/axis';
|
|
10
|
-
import { Legend } from '../../types/legend';
|
|
11
9
|
import { Interaction } from '../../types/interaction';
|
|
12
|
-
import {
|
|
10
|
+
import { Legend } from '../../types/legend';
|
|
11
|
+
import { deepAssign, flow, pick } from '../../utils';
|
|
12
|
+
import { IGeometry, IView, MixOptions } from './types';
|
|
13
13
|
import { execPlotAdaptor } from './utils';
|
|
14
14
|
|
|
15
15
|
/**
|
package/src/plots/mix/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Plot } from '../../core/plot';
|
|
2
1
|
import { Adaptor } from '../../core/adaptor';
|
|
3
|
-
import {
|
|
2
|
+
import { Plot } from '../../core/plot';
|
|
4
3
|
import { adaptor } from './adaptor';
|
|
5
4
|
import './interactions';
|
|
5
|
+
import { MixOptions } from './types';
|
|
6
6
|
|
|
7
7
|
export type { MixOptions };
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { getAllElements,
|
|
1
|
+
import { Action, Element, registerAction, registerInteraction, View } from '@antv/g2';
|
|
2
|
+
import { each, get, isArray, map } from '@antv/util';
|
|
3
|
+
import { getAllElements, getSiblingViews, getViews } from '../../../utils';
|
|
4
4
|
import { clearHighlight, getElementValue } from './utils';
|
|
5
5
|
|
|
6
6
|
type EventItem = { element: Element; view: View; active: boolean; inactive: boolean };
|
package/src/plots/mix/types.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Types } from '@antv/g2';
|
|
2
|
-
import { Data, Meta, Options, Region, Tooltip } from '../../types';
|
|
3
|
-
import { Axis } from '../../types/axis';
|
|
4
|
-
import { Legend } from '../../types/legend';
|
|
5
2
|
import { Geometry } from '../../adaptor/geometries/base';
|
|
3
|
+
import { Data, Meta, Options, Region, Tooltip } from '../../types';
|
|
6
4
|
import { Animation } from '../../types/animation';
|
|
7
5
|
import { Annotation } from '../../types/annotation';
|
|
6
|
+
import { Axis } from '../../types/axis';
|
|
8
7
|
import { Interaction } from '../../types/interaction';
|
|
8
|
+
import { Legend } from '../../types/legend';
|
|
9
9
|
import { Slider } from '../../types/slider';
|
|
10
10
|
import { IPlotTypes } from './utils';
|
|
11
11
|
|
package/src/plots/mix/utils.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { View } from '@antv/g2';
|
|
2
2
|
import { get } from '@antv/util';
|
|
3
|
+
import { Options } from '../../types';
|
|
3
4
|
import { deepAssign } from '../../utils';
|
|
4
|
-
import {
|
|
5
|
-
import { adaptor as pieAdaptor } from '../pie/adaptor';
|
|
6
|
-
import { adaptor as columnAdaptor } from '../column/adaptor';
|
|
7
|
-
import { adaptor as barAdaptor } from '../bar/adaptor';
|
|
5
|
+
import { Area, AreaOptions } from '../area';
|
|
8
6
|
import { adaptor as areaAdaptor } from '../area/adaptor';
|
|
7
|
+
import { Bar, BarOptions } from '../bar';
|
|
8
|
+
import { adaptor as barAdaptor } from '../bar/adaptor';
|
|
9
|
+
import { Column, ColumnOptions } from '../column';
|
|
10
|
+
import { adaptor as columnAdaptor } from '../column/adaptor';
|
|
11
|
+
import { Funnel, FunnelOptions } from '../funnel';
|
|
12
|
+
import { adaptor as funnelAdaptor } from '../funnel/adaptor';
|
|
13
|
+
import { Gauge, GaugeOptions } from '../gauge';
|
|
9
14
|
import { adaptor as gaugeAdaptor } from '../gauge/adaptor';
|
|
10
|
-
import {
|
|
11
|
-
import { adaptor as tinyColumnAdaptor } from '../tiny-column/adaptor';
|
|
12
|
-
import { adaptor as tinyAreaAdaptor } from '../tiny-area/adaptor';
|
|
13
|
-
import { adaptor as ringProgressAdaptor } from '../ring-progress/adaptor';
|
|
14
|
-
import { adaptor as progressAdaptor } from '../progress/adaptor';
|
|
15
|
-
import { adaptor as scatterAdaptor } from '../scatter/adaptor';
|
|
15
|
+
import { Histogram, HistogramOptions } from '../histogram';
|
|
16
16
|
import { adaptor as histogramAdaptor } from '../histogram/adaptor';
|
|
17
|
-
import { adaptor as funnelAdaptor } from '../funnel/adaptor';
|
|
18
|
-
import { adaptor as stockAdaptor } from '../stock/adaptor';
|
|
19
17
|
import { Line, LineOptions } from '../line';
|
|
18
|
+
import { adaptor as lineAdaptor } from '../line/adaptor';
|
|
20
19
|
import { Pie, PieOptions } from '../pie';
|
|
21
|
-
import {
|
|
22
|
-
import { Column, ColumnOptions } from '../column';
|
|
23
|
-
import { Area, AreaOptions } from '../area';
|
|
24
|
-
import { Gauge, GaugeOptions } from '../gauge';
|
|
25
|
-
import { TinyLine, TinyLineOptions } from '../tiny-line';
|
|
26
|
-
import { TinyArea, TinyAreaOptions } from '../tiny-area';
|
|
27
|
-
import { TinyColumn, TinyColumnOptions } from '../tiny-column';
|
|
28
|
-
import { RingProgress, RingProgressOptions } from '../ring-progress';
|
|
20
|
+
import { adaptor as pieAdaptor } from '../pie/adaptor';
|
|
29
21
|
import { Progress, ProgressOptions } from '../progress';
|
|
22
|
+
import { adaptor as progressAdaptor } from '../progress/adaptor';
|
|
23
|
+
import { RingProgress, RingProgressOptions } from '../ring-progress';
|
|
24
|
+
import { adaptor as ringProgressAdaptor } from '../ring-progress/adaptor';
|
|
30
25
|
import { Scatter, ScatterOptions } from '../scatter';
|
|
31
|
-
import {
|
|
32
|
-
import { Funnel, FunnelOptions } from '../funnel';
|
|
26
|
+
import { adaptor as scatterAdaptor } from '../scatter/adaptor';
|
|
33
27
|
import { Stock, StockOptions } from '../stock';
|
|
34
|
-
import {
|
|
28
|
+
import { adaptor as stockAdaptor } from '../stock/adaptor';
|
|
29
|
+
import { TinyArea, TinyAreaOptions } from '../tiny-area';
|
|
30
|
+
import { adaptor as tinyAreaAdaptor } from '../tiny-area/adaptor';
|
|
31
|
+
import { TinyColumn, TinyColumnOptions } from '../tiny-column';
|
|
32
|
+
import { adaptor as tinyColumnAdaptor } from '../tiny-column/adaptor';
|
|
33
|
+
import { TinyLine, TinyLineOptions } from '../tiny-line';
|
|
34
|
+
import { adaptor as tinyLineAdaptor } from '../tiny-line/adaptor';
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* 移除 options 中的 width、height 设置, 将 options 的 data 设置为可选
|