@visactor/vchart 1.13.1 → 1.13.2
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/build/es5/index.js +1 -1
- package/build/index.es.js +1376 -1225
- package/build/index.js +1379 -1224
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/config.js.map +1 -1
- package/cjs/animation/utils.d.ts +2 -2
- package/cjs/chart/base/base-chart.d.ts +1 -2
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/common/interface.d.ts +5 -4
- package/cjs/chart/common/interface.js.map +1 -1
- package/cjs/chart/gauge/interface.d.ts +2 -2
- package/cjs/chart/gauge/interface.js.map +1 -1
- package/cjs/chart/index.js +2 -1
- package/cjs/chart/interface/common.d.ts +2 -2
- package/cjs/chart/interface/common.js.map +1 -1
- package/cjs/chart/polar/interface.d.ts +1 -1
- package/cjs/chart/polar/interface.js.map +1 -1
- package/cjs/chart/sequence/interface.d.ts +2 -1
- package/cjs/chart/sequence/interface.js.map +1 -1
- package/cjs/compile/compilable-base.d.ts +2 -3
- package/cjs/compile/compilable-base.js +1 -2
- package/cjs/compile/compilable-base.js.map +1 -1
- package/cjs/compile/compiler.d.ts +8 -8
- package/cjs/compile/compiler.js +23 -11
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compilable-item.d.ts +63 -5
- package/cjs/compile/interface/compilable-item.js.map +1 -1
- package/cjs/compile/interface/compiler.d.ts +4 -20
- package/cjs/compile/interface/compiler.js.map +1 -1
- package/cjs/compile/mark/compilable-mark.d.ts +4 -5
- package/cjs/compile/mark/compilable-mark.js.map +1 -1
- package/cjs/compile/mark/interface.d.ts +19 -7
- package/cjs/compile/mark/interface.js.map +1 -1
- package/cjs/compile/mark/mark-data.d.ts +2 -2
- package/cjs/compile/mark/mark-data.js.map +1 -1
- package/cjs/compile/mark/mark-state-manager.d.ts +2 -2
- package/cjs/compile/mark/mark-state-manager.js.map +1 -1
- package/cjs/component/axis/base-axis.d.ts +1 -1
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.js +28 -59
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
- package/cjs/component/axis/interface/common.d.ts +2 -2
- package/cjs/component/axis/interface/common.js.map +1 -1
- package/cjs/component/axis/interface/spec.js.map +1 -1
- package/cjs/component/axis/polar/interface/common.d.ts +1 -1
- package/cjs/component/axis/polar/interface/common.js.map +1 -1
- package/cjs/component/axis/util.js.map +1 -1
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/crosshair/interface/cartesian.d.ts +1 -1
- package/cjs/component/crosshair/interface/cartesian.js.map +1 -1
- package/cjs/component/crosshair/interface/common.d.ts +1 -1
- package/cjs/component/crosshair/interface/common.js.map +1 -1
- package/cjs/component/crosshair/interface/polar.d.ts +1 -1
- package/cjs/component/crosshair/interface/polar.js.map +1 -1
- package/cjs/component/crosshair/interface/spec.js.map +1 -1
- package/cjs/component/crosshair/interface/theme.d.ts +1 -1
- package/cjs/component/crosshair/interface/theme.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.d.ts +1 -2
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/scroll-bar/interface.d.ts +1 -2
- package/cjs/component/data-zoom/scroll-bar/interface.js.map +1 -1
- package/cjs/component/interface/theme.d.ts +13 -9
- package/cjs/component/interface/theme.js.map +1 -1
- package/cjs/component/label/interface.d.ts +14 -2
- package/cjs/component/label/interface.js.map +1 -1
- package/cjs/component/label/label.d.ts +2 -15
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/label/total-label.js.map +1 -1
- package/cjs/component/label/util.d.ts +1 -2
- package/cjs/component/label/util.js.map +1 -1
- package/cjs/component/legend/interface.d.ts +5 -2
- package/cjs/component/legend/interface.js.map +1 -1
- package/cjs/component/legend/util.d.ts +2 -2
- package/cjs/component/marker/base-marker.d.ts +1 -1
- package/cjs/component/marker/base-marker.js.map +1 -1
- package/cjs/component/marker/interface.d.ts +3 -4
- package/cjs/component/marker/interface.js.map +1 -1
- package/cjs/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/spec.js.map +1 -1
- package/cjs/component/marker/mark-area/polar-mark-area.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/spec.d.ts +1 -1
- package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
- package/cjs/component/marker/mark-line/polar-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
- package/cjs/component/marker/mark-point/interface/spec.js.map +1 -1
- package/cjs/component/marker/mark-point/interface/theme.d.ts +1 -1
- package/cjs/component/marker/mark-point/interface/theme.js.map +1 -1
- package/cjs/component/player/interface/theme.d.ts +1 -2
- package/cjs/component/player/interface/theme.js.map +1 -1
- package/cjs/component/poptip/interface.d.ts +1 -1
- package/cjs/component/poptip/interface.js.map +1 -1
- package/cjs/component/title/interface/theme.d.ts +1 -1
- package/cjs/component/title/interface/theme.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +1 -1
- package/cjs/component/tooltip/interface/theme.js.map +1 -1
- package/cjs/core/factory.d.ts +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/instance-manager.js +1 -2
- package/cjs/core/interface.d.ts +6 -7
- package/cjs/core/interface.js.map +1 -1
- package/cjs/core/util.js +2 -1
- package/cjs/core/vchart.d.ts +3 -3
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/cjs/data/transforms/aggregation.d.ts +2 -29
- package/cjs/data/transforms/aggregation.js.map +1 -1
- package/cjs/data/transforms/dimension-statistics.d.ts +1 -13
- package/cjs/data/transforms/dimension-statistics.js.map +1 -1
- package/cjs/data/transforms/hierarchy-dimension-statistics.d.ts +1 -1
- package/cjs/data/transforms/hierarchy-dimension-statistics.js.map +1 -1
- package/cjs/data/transforms/interface.d.ts +47 -0
- package/cjs/data/transforms/interface.js +6 -0
- package/cjs/data/transforms/interface.js.map +1 -0
- package/cjs/data/transforms/regression.d.ts +1 -4
- package/cjs/data/transforms/regression.js.map +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/events/dimension/interface.d.ts +1 -1
- package/cjs/event/events/dimension/interface.js.map +1 -1
- package/cjs/event/index.js +1 -1
- package/cjs/event/interface.d.ts +1 -2
- package/cjs/event/interface.js.map +1 -1
- package/cjs/interaction/interface.d.ts +1 -5
- package/cjs/interaction/interface.js.map +1 -1
- package/cjs/layout/interface.js.map +1 -1
- package/cjs/mark/arc-3d.d.ts +1 -2
- package/cjs/mark/arc-3d.js.map +1 -1
- package/cjs/mark/arc.d.ts +1 -2
- package/cjs/mark/arc.js.map +1 -1
- package/cjs/mark/area.d.ts +1 -2
- package/cjs/mark/area.js.map +1 -1
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/mark/box-plot.d.ts +1 -2
- package/cjs/mark/box-plot.js.map +1 -1
- package/cjs/mark/cell.d.ts +1 -2
- package/cjs/mark/cell.js.map +1 -1
- package/cjs/mark/component.d.ts +1 -2
- package/cjs/mark/component.js.map +1 -1
- package/cjs/mark/group.d.ts +1 -9
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/image.d.ts +1 -2
- package/cjs/mark/image.js.map +1 -1
- package/cjs/mark/interface/common.d.ts +1 -1
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/mark/interface/index.d.ts +1 -0
- package/cjs/mark/interface/index.js +2 -1
- package/cjs/mark/interface/index.js.map +1 -1
- package/cjs/mark/interface/mark.d.ts +44 -0
- package/cjs/mark/interface/mark.js +6 -0
- package/cjs/mark/interface/mark.js.map +1 -0
- package/cjs/mark/label.d.ts +2 -11
- package/cjs/mark/label.js.map +1 -1
- package/cjs/mark/line.d.ts +1 -2
- package/cjs/mark/line.js.map +1 -1
- package/cjs/mark/link-path.d.ts +1 -2
- package/cjs/mark/link-path.js.map +1 -1
- package/cjs/mark/path.d.ts +1 -2
- package/cjs/mark/path.js.map +1 -1
- package/cjs/mark/polygon/polygon.d.ts +1 -2
- package/cjs/mark/polygon/polygon.js.map +1 -1
- package/cjs/mark/polygon/pyramid-3d.d.ts +1 -2
- package/cjs/mark/polygon/pyramid-3d.js.map +1 -1
- package/cjs/mark/rect-3d.d.ts +1 -2
- package/cjs/mark/rect-3d.js.map +1 -1
- package/cjs/mark/rect.d.ts +1 -2
- package/cjs/mark/rect.js.map +1 -1
- package/cjs/mark/ripple.d.ts +1 -2
- package/cjs/mark/ripple.js.map +1 -1
- package/cjs/mark/rule.d.ts +1 -2
- package/cjs/mark/rule.js.map +1 -1
- package/cjs/mark/symbol.d.ts +1 -2
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/mark/text.d.ts +2 -8
- package/cjs/mark/text.js.map +1 -1
- package/cjs/model/interface.d.ts +5 -5
- package/cjs/model/interface.js.map +1 -1
- package/cjs/plugin/chart/interface.d.ts +1 -2
- package/cjs/plugin/chart/interface.js.map +1 -1
- package/cjs/plugin/chart/media-query/interface/common.d.ts +2 -2
- package/cjs/plugin/chart/media-query/interface/common.js.map +1 -1
- package/cjs/plugin/chart/media-query/util/filter.js +1 -1
- package/cjs/plugin/chart/media-query/util/filter.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/base.d.ts +3 -3
- package/cjs/plugin/components/tooltip-handler/base.js +18 -16
- package/cjs/plugin/components/tooltip-handler/base.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -6
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/cjs/region/interface.d.ts +1 -2
- package/cjs/region/interface.js.map +1 -1
- package/cjs/region/region.d.ts +1 -2
- package/cjs/region/region.js.map +1 -1
- package/cjs/scale/global-scale.d.ts +1 -1
- package/cjs/scale/global-scale.js.map +1 -1
- package/cjs/scale/interface.d.ts +1 -1
- package/cjs/scale/interface.js.map +1 -1
- package/cjs/series/area/animation.d.ts +1 -5
- package/cjs/series/area/animation.js.map +1 -1
- package/cjs/series/area/area.d.ts +1 -2
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/area/interface.d.ts +7 -4
- package/cjs/series/area/interface.js.map +1 -1
- package/cjs/series/bar/animation.d.ts +1 -8
- package/cjs/series/bar/animation.js.map +1 -1
- package/cjs/series/bar/bar.d.ts +1 -3
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/bar/interface.d.ts +10 -4
- package/cjs/series/bar/interface.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +2 -3
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/box-plot/box-plot.d.ts +1 -1
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/series/cartesian/cartesian.d.ts +2 -2
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/cartesian/interface.d.ts +1 -1
- package/cjs/series/cartesian/interface.js.map +1 -1
- package/cjs/series/circle-packing/animation.d.ts +1 -2
- package/cjs/series/circle-packing/animation.js.map +1 -1
- package/cjs/series/circle-packing/circle-packing.d.ts +1 -1
- package/cjs/series/circle-packing/circle-packing.js.map +1 -1
- package/cjs/series/circle-packing/interface.d.ts +2 -1
- package/cjs/series/circle-packing/interface.js.map +1 -1
- package/cjs/series/correlation/animation.d.ts +1 -5
- package/cjs/series/correlation/animation.js.map +1 -1
- package/cjs/series/correlation/correlation.d.ts +1 -2
- package/cjs/series/correlation/correlation.js.map +1 -1
- package/cjs/series/correlation/interface.d.ts +7 -4
- package/cjs/series/correlation/interface.js.map +1 -1
- package/cjs/series/dot/dot.d.ts +1 -1
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/funnel/3d/funnel-3d.d.ts +1 -1
- package/cjs/series/funnel/3d/funnel-3d.js.map +1 -1
- package/cjs/series/funnel/funnel.d.ts +1 -5
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/funnel/interface.d.ts +1 -1
- package/cjs/series/funnel/interface.js.map +1 -1
- package/cjs/series/gauge/gauge-pointer.js.map +1 -1
- package/cjs/series/gauge/gauge.d.ts +2 -0
- package/cjs/series/gauge/gauge.js +14 -1
- package/cjs/series/gauge/gauge.js.map +1 -1
- package/cjs/series/gauge/interface.d.ts +1 -2
- package/cjs/series/gauge/interface.js.map +1 -1
- package/cjs/series/heatmap/animation.d.ts +1 -1
- package/cjs/series/heatmap/animation.js.map +1 -1
- package/cjs/series/heatmap/heatmap.d.ts +1 -3
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/heatmap/interface.d.ts +2 -2
- package/cjs/series/heatmap/interface.js.map +1 -1
- package/cjs/series/index.d.ts +7 -3
- package/cjs/series/index.js +30 -2
- package/cjs/series/index.js.map +1 -1
- package/cjs/series/interface/common.d.ts +2 -3
- package/cjs/series/interface/common.js.map +1 -1
- package/cjs/series/interface/series.d.ts +6 -9
- package/cjs/series/interface/series.js.map +1 -1
- package/cjs/series/interface/theme.d.ts +1 -1
- package/cjs/series/interface/theme.js.map +1 -1
- package/cjs/series/line/animation.d.ts +1 -5
- package/cjs/series/line/animation.js.map +1 -1
- package/cjs/series/line/interface.d.ts +7 -4
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/link/link.d.ts +1 -1
- package/cjs/series/link/link.js.map +1 -1
- package/cjs/series/liquid/animation.d.ts +1 -11
- package/cjs/series/liquid/animation.js.map +1 -1
- package/cjs/series/liquid/interface.d.ts +12 -2
- package/cjs/series/liquid/interface.js.map +1 -1
- package/cjs/series/liquid/liquid.js.map +1 -1
- package/cjs/series/map/interface.d.ts +1 -1
- package/cjs/series/map/interface.js.map +1 -1
- package/cjs/series/map/map.d.ts +1 -2
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/mixin/interface.d.ts +14 -0
- package/cjs/series/mixin/interface.js +6 -0
- package/cjs/series/mixin/interface.js.map +1 -0
- package/cjs/series/mixin/line-mixin.d.ts +3 -18
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/mosaic/interface.js.map +1 -1
- package/cjs/series/pictogram/interface.js.map +1 -1
- package/cjs/series/pictogram/pictogram.d.ts +8 -7
- package/cjs/series/pictogram/pictogram.js.map +1 -1
- package/cjs/series/pie/3d/pie-3d.d.ts +1 -1
- package/cjs/series/pie/3d/pie-3d.js.map +1 -1
- package/cjs/series/pie/animation/animation.d.ts +1 -5
- package/cjs/series/pie/animation/animation.js.map +1 -1
- package/cjs/series/pie/animation/centerOffset.d.ts +1 -4
- package/cjs/series/pie/animation/centerOffset.js.map +1 -1
- package/cjs/series/pie/interface.d.ts +9 -2
- package/cjs/series/pie/interface.js.map +1 -1
- package/cjs/series/pie/pie.d.ts +1 -4
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/progress-like/animation.d.ts +1 -4
- package/cjs/series/polar/progress-like/animation.js.map +1 -1
- package/cjs/series/polar/progress-like/interface.d.ts +4 -0
- package/cjs/series/polar/progress-like/interface.js.map +1 -1
- package/cjs/series/polar/progress-like/progress-like.d.ts +1 -2
- package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
- package/cjs/series/progress/circular/circular.js.map +1 -1
- package/cjs/series/progress/circular/interface.d.ts +1 -2
- package/cjs/series/progress/circular/interface.js.map +1 -1
- package/cjs/series/progress/linear/animation.d.ts +1 -5
- package/cjs/series/progress/linear/animation.js.map +1 -1
- package/cjs/series/progress/linear/interface.d.ts +4 -1
- package/cjs/series/progress/linear/interface.js.map +1 -1
- package/cjs/series/progress/linear/linear.js.map +1 -1
- package/cjs/series/radar/animation.d.ts +2 -8
- package/cjs/series/radar/animation.js.map +1 -1
- package/cjs/series/radar/interface.d.ts +11 -4
- package/cjs/series/radar/interface.js.map +1 -1
- package/cjs/series/radar/radar.js.map +1 -1
- package/cjs/series/range-area/range-area.js.map +1 -1
- package/cjs/series/range-column/animation.d.ts +1 -5
- package/cjs/series/range-column/animation.js.map +1 -1
- package/cjs/series/range-column/interface.d.ts +6 -2
- package/cjs/series/range-column/interface.js.map +1 -1
- package/cjs/series/range-column/range-column.d.ts +1 -1
- package/cjs/series/range-column/range-column.js.map +1 -1
- package/cjs/series/range-column/tooltip-helper.js.map +1 -1
- package/cjs/series/rose/animation.d.ts +1 -5
- package/cjs/series/rose/animation.js.map +1 -1
- package/cjs/series/rose/interface.d.ts +7 -3
- package/cjs/series/rose/interface.js.map +1 -1
- package/cjs/series/rose/rose.d.ts +1 -3
- package/cjs/series/rose/rose.js.map +1 -1
- package/cjs/series/sankey/animation.d.ts +1 -7
- package/cjs/series/sankey/animation.js.map +1 -1
- package/cjs/series/sankey/interface.d.ts +7 -2
- package/cjs/series/sankey/interface.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +2 -3
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/scatter/animation.d.ts +1 -5
- package/cjs/series/scatter/animation.js.map +1 -1
- package/cjs/series/scatter/interface.d.ts +7 -3
- package/cjs/series/scatter/interface.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +1 -2
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/cjs/series/sunburst/interface.d.ts +1 -1
- package/cjs/series/sunburst/interface.js.map +1 -1
- package/cjs/series/sunburst/sunburst.d.ts +1 -1
- package/cjs/series/sunburst/sunburst.js.map +1 -1
- package/cjs/series/treemap/animation.d.ts +1 -2
- package/cjs/series/treemap/animation.js.map +1 -1
- package/cjs/series/treemap/interface.d.ts +3 -2
- package/cjs/series/treemap/interface.js.map +1 -1
- package/cjs/series/treemap/tooltip-helper.d.ts +1 -1
- package/cjs/series/treemap/tooltip-helper.js.map +1 -1
- package/cjs/series/treemap/treemap.d.ts +2 -3
- package/cjs/series/treemap/treemap.js.map +1 -1
- package/cjs/series/util/label-mark.d.ts +1 -1
- package/cjs/series/util/label-mark.js.map +1 -1
- package/cjs/series/util/utils.d.ts +1 -1
- package/cjs/series/util/utils.js.map +1 -1
- package/cjs/series/venn/animation.d.ts +1 -2
- package/cjs/series/venn/animation.js.map +1 -1
- package/cjs/series/venn/interface.d.ts +3 -2
- package/cjs/series/venn/interface.js.map +1 -1
- package/cjs/series/venn/venn.d.ts +3 -4
- package/cjs/series/venn/venn.js.map +1 -1
- package/cjs/series/waterfall/animation.d.ts +3 -3
- package/cjs/series/waterfall/animation.js.map +1 -1
- package/cjs/series/waterfall/interface.d.ts +3 -3
- package/cjs/series/waterfall/interface.js.map +1 -1
- package/cjs/series/waterfall/waterfall.d.ts +2 -4
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/cjs/series/word-cloud/animation.d.ts +1 -8
- package/cjs/series/word-cloud/animation.js.map +1 -1
- package/cjs/series/word-cloud/base.d.ts +1 -3
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/series/word-cloud/interface.d.ts +9 -1
- package/cjs/series/word-cloud/interface.js.map +1 -1
- package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/theme/interface.d.ts +1 -1
- package/cjs/theme/interface.js.map +1 -1
- package/cjs/typings/layout.js.map +1 -1
- package/cjs/typings/params.d.ts +1 -1
- package/cjs/typings/params.js.map +1 -1
- package/cjs/typings/space.js.map +1 -1
- package/cjs/typings/spec/chart.d.ts +26 -26
- package/cjs/typings/spec/chart.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +10 -9
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/spec/index.d.ts +1 -1
- package/cjs/typings/spec/index.js.map +1 -1
- package/cjs/typings/spec/media-query.d.ts +3 -2
- package/cjs/typings/spec/media-query.js.map +1 -1
- package/cjs/typings/visual.d.ts +3 -3
- package/cjs/typings/visual.js.map +1 -1
- package/cjs/util/data.d.ts +1 -1
- package/cjs/util/data.js.map +1 -1
- package/esm/animation/config.js.map +1 -1
- package/esm/animation/utils.d.ts +2 -2
- package/esm/chart/base/base-chart.d.ts +1 -2
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/common/interface.d.ts +5 -4
- package/esm/chart/common/interface.js.map +1 -1
- package/esm/chart/gauge/interface.d.ts +2 -2
- package/esm/chart/gauge/interface.js.map +1 -1
- package/esm/chart/index.js +2 -1
- package/esm/chart/interface/common.d.ts +2 -2
- package/esm/chart/interface/common.js.map +1 -1
- package/esm/chart/polar/interface.d.ts +1 -1
- package/esm/chart/polar/interface.js.map +1 -1
- package/esm/chart/sequence/interface.d.ts +2 -1
- package/esm/chart/sequence/interface.js.map +1 -1
- package/esm/compile/compilable-base.d.ts +2 -3
- package/esm/compile/compilable-base.js +1 -2
- package/esm/compile/compilable-base.js.map +1 -1
- package/esm/compile/compiler.d.ts +8 -8
- package/esm/compile/compiler.js +23 -9
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compilable-item.d.ts +63 -5
- package/esm/compile/interface/compilable-item.js.map +1 -1
- package/esm/compile/interface/compiler.d.ts +4 -20
- package/esm/compile/interface/compiler.js.map +1 -1
- package/esm/compile/mark/compilable-mark.d.ts +4 -5
- package/esm/compile/mark/compilable-mark.js.map +1 -1
- package/esm/compile/mark/interface.d.ts +19 -7
- package/esm/compile/mark/interface.js.map +1 -1
- package/esm/compile/mark/mark-data.d.ts +2 -2
- package/esm/compile/mark/mark-data.js.map +1 -1
- package/esm/compile/mark/mark-state-manager.d.ts +2 -2
- package/esm/compile/mark/mark-state-manager.js.map +1 -1
- package/esm/component/axis/base-axis.d.ts +1 -1
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.js +28 -59
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
- package/esm/component/axis/interface/common.d.ts +2 -2
- package/esm/component/axis/interface/common.js.map +1 -1
- package/esm/component/axis/interface/spec.js.map +1 -1
- package/esm/component/axis/polar/interface/common.d.ts +1 -1
- package/esm/component/axis/polar/interface/common.js.map +1 -1
- package/esm/component/axis/util.js.map +1 -1
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/crosshair/interface/cartesian.d.ts +1 -1
- package/esm/component/crosshair/interface/cartesian.js.map +1 -1
- package/esm/component/crosshair/interface/common.d.ts +1 -1
- package/esm/component/crosshair/interface/common.js.map +1 -1
- package/esm/component/crosshair/interface/polar.d.ts +1 -1
- package/esm/component/crosshair/interface/polar.js.map +1 -1
- package/esm/component/crosshair/interface/spec.js.map +1 -1
- package/esm/component/crosshair/interface/theme.d.ts +1 -1
- package/esm/component/crosshair/interface/theme.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.d.ts +1 -2
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/scroll-bar/interface.d.ts +1 -2
- package/esm/component/data-zoom/scroll-bar/interface.js.map +1 -1
- package/esm/component/interface/theme.d.ts +13 -9
- package/esm/component/interface/theme.js.map +1 -1
- package/esm/component/label/interface.d.ts +14 -2
- package/esm/component/label/interface.js.map +1 -1
- package/esm/component/label/label.d.ts +2 -15
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/label/total-label.js.map +1 -1
- package/esm/component/label/util.d.ts +1 -2
- package/esm/component/label/util.js.map +1 -1
- package/esm/component/legend/interface.d.ts +5 -2
- package/esm/component/legend/interface.js.map +1 -1
- package/esm/component/legend/util.d.ts +2 -2
- package/esm/component/marker/base-marker.d.ts +1 -1
- package/esm/component/marker/base-marker.js.map +1 -1
- package/esm/component/marker/interface.d.ts +3 -4
- package/esm/component/marker/interface.js.map +1 -1
- package/esm/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
- package/esm/component/marker/mark-area/interface/spec.js.map +1 -1
- package/esm/component/marker/mark-area/polar-mark-area.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/spec.d.ts +1 -1
- package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
- package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
- package/esm/component/marker/mark-line/polar-mark-line.js.map +1 -1
- package/esm/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
- package/esm/component/marker/mark-point/interface/spec.js.map +1 -1
- package/esm/component/marker/mark-point/interface/theme.d.ts +1 -1
- package/esm/component/marker/mark-point/interface/theme.js.map +1 -1
- package/esm/component/player/interface/theme.d.ts +1 -2
- package/esm/component/player/interface/theme.js.map +1 -1
- package/esm/component/poptip/interface.d.ts +1 -1
- package/esm/component/poptip/interface.js.map +1 -1
- package/esm/component/title/interface/theme.d.ts +1 -1
- package/esm/component/title/interface/theme.js.map +1 -1
- package/esm/component/tooltip/interface/theme.d.ts +1 -1
- package/esm/component/tooltip/interface/theme.js.map +1 -1
- package/esm/core/factory.d.ts +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/instance-manager.js +1 -2
- package/esm/core/interface.d.ts +6 -7
- package/esm/core/interface.js.map +1 -1
- package/esm/core/util.js +2 -1
- package/esm/core/vchart.d.ts +3 -3
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/esm/data/transforms/aggregation.d.ts +2 -29
- package/esm/data/transforms/aggregation.js.map +1 -1
- package/esm/data/transforms/dimension-statistics.d.ts +1 -13
- package/esm/data/transforms/dimension-statistics.js.map +1 -1
- package/esm/data/transforms/hierarchy-dimension-statistics.d.ts +1 -1
- package/esm/data/transforms/hierarchy-dimension-statistics.js.map +1 -1
- package/esm/data/transforms/interface.d.ts +47 -0
- package/esm/data/transforms/interface.js +2 -0
- package/esm/data/transforms/interface.js.map +1 -0
- package/esm/data/transforms/regression.d.ts +1 -4
- package/esm/data/transforms/regression.js.map +1 -1
- package/esm/event/event.js +1 -1
- package/esm/event/events/dimension/interface.d.ts +1 -1
- package/esm/event/events/dimension/interface.js.map +1 -1
- package/esm/event/index.js +1 -1
- package/esm/event/interface.d.ts +1 -2
- package/esm/event/interface.js.map +1 -1
- package/esm/interaction/interface.d.ts +1 -5
- package/esm/interaction/interface.js.map +1 -1
- package/esm/layout/interface.js.map +1 -1
- package/esm/mark/arc-3d.d.ts +1 -2
- package/esm/mark/arc-3d.js.map +1 -1
- package/esm/mark/arc.d.ts +1 -2
- package/esm/mark/arc.js.map +1 -1
- package/esm/mark/area.d.ts +1 -2
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/mark/box-plot.d.ts +1 -2
- package/esm/mark/box-plot.js.map +1 -1
- package/esm/mark/cell.d.ts +1 -2
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/component.d.ts +1 -2
- package/esm/mark/component.js.map +1 -1
- package/esm/mark/group.d.ts +1 -9
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/image.d.ts +1 -2
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/interface/common.d.ts +1 -1
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/mark/interface/index.d.ts +1 -0
- package/esm/mark/interface/index.js +2 -0
- package/esm/mark/interface/index.js.map +1 -1
- package/esm/mark/interface/mark.d.ts +44 -0
- package/esm/mark/interface/mark.js +2 -0
- package/esm/mark/interface/mark.js.map +1 -0
- package/esm/mark/label.d.ts +2 -11
- package/esm/mark/label.js.map +1 -1
- package/esm/mark/line.d.ts +1 -2
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/link-path.d.ts +1 -2
- package/esm/mark/link-path.js.map +1 -1
- package/esm/mark/path.d.ts +1 -2
- package/esm/mark/path.js.map +1 -1
- package/esm/mark/polygon/polygon.d.ts +1 -2
- package/esm/mark/polygon/polygon.js.map +1 -1
- package/esm/mark/polygon/pyramid-3d.d.ts +1 -2
- package/esm/mark/polygon/pyramid-3d.js.map +1 -1
- package/esm/mark/rect-3d.d.ts +1 -2
- package/esm/mark/rect-3d.js.map +1 -1
- package/esm/mark/rect.d.ts +1 -2
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/ripple.d.ts +1 -2
- package/esm/mark/ripple.js.map +1 -1
- package/esm/mark/rule.d.ts +1 -2
- package/esm/mark/rule.js.map +1 -1
- package/esm/mark/symbol.d.ts +1 -2
- package/esm/mark/symbol.js.map +1 -1
- package/esm/mark/text.d.ts +2 -8
- package/esm/mark/text.js.map +1 -1
- package/esm/model/interface.d.ts +5 -5
- package/esm/model/interface.js.map +1 -1
- package/esm/plugin/chart/interface.d.ts +1 -2
- package/esm/plugin/chart/interface.js.map +1 -1
- package/esm/plugin/chart/media-query/interface/common.d.ts +2 -2
- package/esm/plugin/chart/media-query/interface/common.js.map +1 -1
- package/esm/plugin/chart/media-query/util/filter.js +1 -1
- package/esm/plugin/chart/media-query/util/filter.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/base.d.ts +3 -3
- package/esm/plugin/components/tooltip-handler/base.js +17 -15
- package/esm/plugin/components/tooltip-handler/base.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -6
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/region/interface.d.ts +1 -2
- package/esm/region/interface.js.map +1 -1
- package/esm/region/region.d.ts +1 -2
- package/esm/region/region.js.map +1 -1
- package/esm/scale/global-scale.d.ts +1 -1
- package/esm/scale/global-scale.js.map +1 -1
- package/esm/scale/interface.d.ts +1 -1
- package/esm/scale/interface.js.map +1 -1
- package/esm/series/area/animation.d.ts +1 -5
- package/esm/series/area/animation.js.map +1 -1
- package/esm/series/area/area.d.ts +1 -2
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/area/interface.d.ts +7 -4
- package/esm/series/area/interface.js.map +1 -1
- package/esm/series/bar/animation.d.ts +1 -8
- package/esm/series/bar/animation.js.map +1 -1
- package/esm/series/bar/bar.d.ts +1 -3
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/bar/interface.d.ts +10 -4
- package/esm/series/bar/interface.js.map +1 -1
- package/esm/series/base/base-series.d.ts +2 -3
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/box-plot/box-plot.d.ts +1 -1
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/series/cartesian/cartesian.d.ts +2 -2
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/cartesian/interface.d.ts +1 -1
- package/esm/series/cartesian/interface.js.map +1 -1
- package/esm/series/circle-packing/animation.d.ts +1 -2
- package/esm/series/circle-packing/animation.js.map +1 -1
- package/esm/series/circle-packing/circle-packing.d.ts +1 -1
- package/esm/series/circle-packing/circle-packing.js.map +1 -1
- package/esm/series/circle-packing/interface.d.ts +2 -1
- package/esm/series/circle-packing/interface.js.map +1 -1
- package/esm/series/correlation/animation.d.ts +1 -5
- package/esm/series/correlation/animation.js.map +1 -1
- package/esm/series/correlation/correlation.d.ts +1 -2
- package/esm/series/correlation/correlation.js.map +1 -1
- package/esm/series/correlation/interface.d.ts +7 -4
- package/esm/series/correlation/interface.js.map +1 -1
- package/esm/series/dot/dot.d.ts +1 -1
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/funnel/3d/funnel-3d.d.ts +1 -1
- package/esm/series/funnel/3d/funnel-3d.js.map +1 -1
- package/esm/series/funnel/funnel.d.ts +1 -5
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/funnel/interface.d.ts +1 -1
- package/esm/series/funnel/interface.js.map +1 -1
- package/esm/series/gauge/gauge-pointer.js.map +1 -1
- package/esm/series/gauge/gauge.d.ts +2 -0
- package/esm/series/gauge/gauge.js +15 -0
- package/esm/series/gauge/gauge.js.map +1 -1
- package/esm/series/gauge/interface.d.ts +1 -2
- package/esm/series/gauge/interface.js.map +1 -1
- package/esm/series/heatmap/animation.d.ts +1 -1
- package/esm/series/heatmap/animation.js.map +1 -1
- package/esm/series/heatmap/heatmap.d.ts +1 -3
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/heatmap/interface.d.ts +2 -2
- package/esm/series/heatmap/interface.js.map +1 -1
- package/esm/series/index.d.ts +7 -3
- package/esm/series/index.js +6 -2
- package/esm/series/index.js.map +1 -1
- package/esm/series/interface/common.d.ts +2 -3
- package/esm/series/interface/common.js.map +1 -1
- package/esm/series/interface/series.d.ts +6 -9
- package/esm/series/interface/series.js.map +1 -1
- package/esm/series/interface/theme.d.ts +1 -1
- package/esm/series/interface/theme.js.map +1 -1
- package/esm/series/line/animation.d.ts +1 -5
- package/esm/series/line/animation.js.map +1 -1
- package/esm/series/line/interface.d.ts +7 -4
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/link/link.d.ts +1 -1
- package/esm/series/link/link.js.map +1 -1
- package/esm/series/liquid/animation.d.ts +1 -11
- package/esm/series/liquid/animation.js.map +1 -1
- package/esm/series/liquid/interface.d.ts +12 -2
- package/esm/series/liquid/interface.js.map +1 -1
- package/esm/series/liquid/liquid.js.map +1 -1
- package/esm/series/map/interface.d.ts +1 -1
- package/esm/series/map/interface.js.map +1 -1
- package/esm/series/map/map.d.ts +1 -2
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/mixin/interface.d.ts +14 -0
- package/esm/series/mixin/interface.js +2 -0
- package/esm/series/mixin/interface.js.map +1 -0
- package/esm/series/mixin/line-mixin.d.ts +3 -18
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/mosaic/interface.js.map +1 -1
- package/esm/series/pictogram/interface.js.map +1 -1
- package/esm/series/pictogram/pictogram.d.ts +8 -7
- package/esm/series/pictogram/pictogram.js.map +1 -1
- package/esm/series/pie/3d/pie-3d.d.ts +1 -1
- package/esm/series/pie/3d/pie-3d.js.map +1 -1
- package/esm/series/pie/animation/animation.d.ts +1 -5
- package/esm/series/pie/animation/animation.js.map +1 -1
- package/esm/series/pie/animation/centerOffset.d.ts +1 -4
- package/esm/series/pie/animation/centerOffset.js.map +1 -1
- package/esm/series/pie/interface.d.ts +9 -2
- package/esm/series/pie/interface.js.map +1 -1
- package/esm/series/pie/pie.d.ts +1 -4
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/progress-like/animation.d.ts +1 -4
- package/esm/series/polar/progress-like/animation.js.map +1 -1
- package/esm/series/polar/progress-like/interface.d.ts +4 -0
- package/esm/series/polar/progress-like/interface.js.map +1 -1
- package/esm/series/polar/progress-like/progress-like.d.ts +1 -2
- package/esm/series/polar/progress-like/progress-like.js.map +1 -1
- package/esm/series/progress/circular/circular.js.map +1 -1
- package/esm/series/progress/circular/interface.d.ts +1 -2
- package/esm/series/progress/circular/interface.js.map +1 -1
- package/esm/series/progress/linear/animation.d.ts +1 -5
- package/esm/series/progress/linear/animation.js.map +1 -1
- package/esm/series/progress/linear/interface.d.ts +4 -1
- package/esm/series/progress/linear/interface.js.map +1 -1
- package/esm/series/progress/linear/linear.js.map +1 -1
- package/esm/series/radar/animation.d.ts +2 -8
- package/esm/series/radar/animation.js.map +1 -1
- package/esm/series/radar/interface.d.ts +11 -4
- package/esm/series/radar/interface.js.map +1 -1
- package/esm/series/radar/radar.js.map +1 -1
- package/esm/series/range-area/range-area.js.map +1 -1
- package/esm/series/range-column/animation.d.ts +1 -5
- package/esm/series/range-column/animation.js.map +1 -1
- package/esm/series/range-column/interface.d.ts +6 -2
- package/esm/series/range-column/interface.js.map +1 -1
- package/esm/series/range-column/range-column.d.ts +1 -1
- package/esm/series/range-column/range-column.js.map +1 -1
- package/esm/series/range-column/tooltip-helper.js.map +1 -1
- package/esm/series/rose/animation.d.ts +1 -5
- package/esm/series/rose/animation.js.map +1 -1
- package/esm/series/rose/interface.d.ts +7 -3
- package/esm/series/rose/interface.js.map +1 -1
- package/esm/series/rose/rose.d.ts +1 -3
- package/esm/series/rose/rose.js.map +1 -1
- package/esm/series/sankey/animation.d.ts +1 -7
- package/esm/series/sankey/animation.js.map +1 -1
- package/esm/series/sankey/interface.d.ts +7 -2
- package/esm/series/sankey/interface.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +2 -3
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/scatter/animation.d.ts +1 -5
- package/esm/series/scatter/animation.js.map +1 -1
- package/esm/series/scatter/interface.d.ts +7 -3
- package/esm/series/scatter/interface.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +1 -2
- package/esm/series/scatter/scatter.js.map +1 -1
- package/esm/series/sunburst/interface.d.ts +1 -1
- package/esm/series/sunburst/interface.js.map +1 -1
- package/esm/series/sunburst/sunburst.d.ts +1 -1
- package/esm/series/sunburst/sunburst.js.map +1 -1
- package/esm/series/treemap/animation.d.ts +1 -2
- package/esm/series/treemap/animation.js.map +1 -1
- package/esm/series/treemap/interface.d.ts +3 -2
- package/esm/series/treemap/interface.js.map +1 -1
- package/esm/series/treemap/tooltip-helper.d.ts +1 -1
- package/esm/series/treemap/tooltip-helper.js.map +1 -1
- package/esm/series/treemap/treemap.d.ts +2 -3
- package/esm/series/treemap/treemap.js.map +1 -1
- package/esm/series/util/label-mark.d.ts +1 -1
- package/esm/series/util/label-mark.js.map +1 -1
- package/esm/series/util/utils.d.ts +1 -1
- package/esm/series/util/utils.js.map +1 -1
- package/esm/series/venn/animation.d.ts +1 -2
- package/esm/series/venn/animation.js.map +1 -1
- package/esm/series/venn/interface.d.ts +3 -2
- package/esm/series/venn/interface.js.map +1 -1
- package/esm/series/venn/venn.d.ts +3 -4
- package/esm/series/venn/venn.js.map +1 -1
- package/esm/series/waterfall/animation.d.ts +3 -3
- package/esm/series/waterfall/animation.js.map +1 -1
- package/esm/series/waterfall/interface.d.ts +3 -3
- package/esm/series/waterfall/interface.js.map +1 -1
- package/esm/series/waterfall/waterfall.d.ts +2 -4
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/esm/series/word-cloud/animation.d.ts +1 -8
- package/esm/series/word-cloud/animation.js.map +1 -1
- package/esm/series/word-cloud/base.d.ts +1 -3
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/series/word-cloud/interface.d.ts +9 -1
- package/esm/series/word-cloud/interface.js.map +1 -1
- package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/theme/interface.d.ts +1 -1
- package/esm/theme/interface.js.map +1 -1
- package/esm/typings/layout.js.map +1 -1
- package/esm/typings/params.d.ts +1 -1
- package/esm/typings/params.js.map +1 -1
- package/esm/typings/space.js.map +1 -1
- package/esm/typings/spec/chart.d.ts +26 -26
- package/esm/typings/spec/chart.js.map +1 -1
- package/esm/typings/spec/common.d.ts +10 -9
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/spec/index.d.ts +1 -1
- package/esm/typings/spec/index.js.map +1 -1
- package/esm/typings/spec/media-query.d.ts +3 -2
- package/esm/typings/spec/media-query.js.map +1 -1
- package/esm/typings/visual.d.ts +3 -3
- package/esm/typings/visual.js.map +1 -1
- package/esm/util/data.d.ts +1 -1
- package/esm/util/data.js.map +1 -1
- package/package.json +16 -15
package/build/index.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
return t;
|
|
28
28
|
}
|
|
29
|
-
function __awaiter$
|
|
29
|
+
function __awaiter$a(thisArg, _arguments, P, generator) {
|
|
30
30
|
function adopt(value) {
|
|
31
31
|
return value instanceof P ? value : new P(function (resolve) {
|
|
32
32
|
resolve(value);
|
|
@@ -7890,6 +7890,31 @@
|
|
|
7890
7890
|
return function (target, key) {
|
|
7891
7891
|
decorator(target, key, paramIndex);
|
|
7892
7892
|
};
|
|
7893
|
+
},
|
|
7894
|
+
__awaiter$9 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
7895
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7896
|
+
function fulfilled(value) {
|
|
7897
|
+
try {
|
|
7898
|
+
step(generator.next(value));
|
|
7899
|
+
} catch (e) {
|
|
7900
|
+
reject(e);
|
|
7901
|
+
}
|
|
7902
|
+
}
|
|
7903
|
+
function rejected(value) {
|
|
7904
|
+
try {
|
|
7905
|
+
step(generator.throw(value));
|
|
7906
|
+
} catch (e) {
|
|
7907
|
+
reject(e);
|
|
7908
|
+
}
|
|
7909
|
+
}
|
|
7910
|
+
function step(result) {
|
|
7911
|
+
var value;
|
|
7912
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
7913
|
+
resolve(value);
|
|
7914
|
+
})).then(fulfilled, rejected);
|
|
7915
|
+
}
|
|
7916
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7917
|
+
});
|
|
7893
7918
|
};
|
|
7894
7919
|
let DefaultGlobal = class {
|
|
7895
7920
|
get env() {
|
|
@@ -8015,6 +8040,11 @@
|
|
|
8015
8040
|
loadBlob(url) {
|
|
8016
8041
|
return this._env || this.setEnv("browser"), this.envContribution.loadBlob(url);
|
|
8017
8042
|
}
|
|
8043
|
+
loadFont(name, source, descriptors) {
|
|
8044
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8045
|
+
return this._env || this.setEnv("browser"), this.envContribution.loadFont(name, source, descriptors);
|
|
8046
|
+
});
|
|
8047
|
+
}
|
|
8018
8048
|
isChrome() {
|
|
8019
8049
|
return null != this._isChrome || (this._env || this.setEnv("browser"), this._isChrome = "browser" === this._env && navigator.userAgent.indexOf("Chrome") > -1), this._isChrome;
|
|
8020
8050
|
}
|
|
@@ -11168,7 +11198,7 @@
|
|
|
11168
11198
|
return null;
|
|
11169
11199
|
}
|
|
11170
11200
|
|
|
11171
|
-
var __awaiter$
|
|
11201
|
+
var __awaiter$8 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
11172
11202
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11173
11203
|
function fulfilled(value) {
|
|
11174
11204
|
try {
|
|
@@ -11238,7 +11268,7 @@
|
|
|
11238
11268
|
}
|
|
11239
11269
|
forEachChildrenAsync(cb) {
|
|
11240
11270
|
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
11241
|
-
return __awaiter$
|
|
11271
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
11242
11272
|
if (reverse) {
|
|
11243
11273
|
let child = this._lastChild,
|
|
11244
11274
|
i = 0;
|
|
@@ -15300,7 +15330,7 @@
|
|
|
15300
15330
|
return str.startsWith("<svg") || str.startsWith("<?xml");
|
|
15301
15331
|
}
|
|
15302
15332
|
|
|
15303
|
-
var __awaiter$
|
|
15333
|
+
var __awaiter$7 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15304
15334
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15305
15335
|
function fulfilled(value) {
|
|
15306
15336
|
try {
|
|
@@ -15326,7 +15356,7 @@
|
|
|
15326
15356
|
});
|
|
15327
15357
|
};
|
|
15328
15358
|
function waitForAllSubLayers(stage) {
|
|
15329
|
-
return __awaiter$
|
|
15359
|
+
return __awaiter$7(this, void 0, void 0, function* () {
|
|
15330
15360
|
const promiseList = [],
|
|
15331
15361
|
layers = stage.getChildren();
|
|
15332
15362
|
yield new Promise(resolve => {
|
|
@@ -17157,7 +17187,9 @@
|
|
|
17157
17187
|
const {
|
|
17158
17188
|
background: background,
|
|
17159
17189
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
17160
|
-
backgroundFit = graphicAttribute.backgroundFit
|
|
17190
|
+
backgroundFit = graphicAttribute.backgroundFit,
|
|
17191
|
+
width: width,
|
|
17192
|
+
height: height
|
|
17161
17193
|
} = graphic.attribute;
|
|
17162
17194
|
if (background) if (graphic.backgroundImg) {
|
|
17163
17195
|
const res = graphic.resources.get(background);
|
|
@@ -17190,11 +17222,7 @@
|
|
|
17190
17222
|
height: height
|
|
17191
17223
|
} = getActualPosition(graphic);
|
|
17192
17224
|
cornerRadius ? createRectPath(context, x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius) : context.rect(x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
|
|
17193
|
-
} else
|
|
17194
|
-
context.beginPath();
|
|
17195
|
-
const b = graphic.AABBBounds;
|
|
17196
|
-
context.rect(x, y, b.width(), b.height()), context.fillStyle = background, context.globalAlpha = 1, context.fill();
|
|
17197
|
-
}
|
|
17225
|
+
} else context.beginPath(), context.rect(x, y, width || 0, height || 0), context.fillStyle = background, context.globalAlpha = 1, context.fill();
|
|
17198
17226
|
}
|
|
17199
17227
|
}
|
|
17200
17228
|
function getActualPosition(graphic) {
|
|
@@ -18901,7 +18929,7 @@
|
|
|
18901
18929
|
doFill: doFill,
|
|
18902
18930
|
doStroke: doStroke
|
|
18903
18931
|
} = data;
|
|
18904
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(image, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
18932
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
18905
18933
|
const _runFill = () => {
|
|
18906
18934
|
if (doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
|
|
18907
18935
|
if (!url || !image.resources) return;
|
|
@@ -18918,7 +18946,7 @@
|
|
|
18918
18946
|
}
|
|
18919
18947
|
},
|
|
18920
18948
|
_runStroke = () => {
|
|
18921
|
-
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.
|
|
18949
|
+
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.strokeRect(x, y, width, height)));
|
|
18922
18950
|
};
|
|
18923
18951
|
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
18924
18952
|
}
|
|
@@ -22389,7 +22417,7 @@
|
|
|
22389
22417
|
container.load(envModules), container.load(textMeasureModules), container.load(layerHandlerModules);
|
|
22390
22418
|
}
|
|
22391
22419
|
|
|
22392
|
-
var __awaiter$
|
|
22420
|
+
var __awaiter$6 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
22393
22421
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22394
22422
|
function fulfilled(value) {
|
|
22395
22423
|
try {
|
|
@@ -22462,7 +22490,7 @@
|
|
|
22462
22490
|
}
|
|
22463
22491
|
function foreachAsync(graphic, defaultZIndex, cb) {
|
|
22464
22492
|
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
22465
|
-
return __awaiter$
|
|
22493
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
22466
22494
|
yield graphic.forEachChildrenAsync(cb, reverse);
|
|
22467
22495
|
});
|
|
22468
22496
|
}
|
|
@@ -22823,7 +22851,7 @@
|
|
|
22823
22851
|
decorator(target, key, paramIndex);
|
|
22824
22852
|
};
|
|
22825
22853
|
},
|
|
22826
|
-
__awaiter$
|
|
22854
|
+
__awaiter$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
22827
22855
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22828
22856
|
function fulfilled(value) {
|
|
22829
22857
|
try {
|
|
@@ -22858,7 +22886,7 @@
|
|
|
22858
22886
|
}, this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender), this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
|
|
22859
22887
|
}
|
|
22860
22888
|
draw(renderService, drawContext) {
|
|
22861
|
-
return __awaiter$
|
|
22889
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22862
22890
|
if (this.checkingForDrawPromise) return;
|
|
22863
22891
|
this.lastRenderService = renderService, this.lastDrawContext = drawContext, this.checkingForDrawPromise = this.checkForDraw(drawContext);
|
|
22864
22892
|
const skipDraw = yield this.checkingForDrawPromise;
|
|
@@ -22879,15 +22907,15 @@
|
|
|
22879
22907
|
});
|
|
22880
22908
|
}
|
|
22881
22909
|
_increaseRender(group, drawContext) {
|
|
22882
|
-
return __awaiter$
|
|
22910
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22883
22911
|
this.rendering = !0, yield this._renderIncrementalGroup(group, drawContext);
|
|
22884
22912
|
});
|
|
22885
22913
|
}
|
|
22886
22914
|
_renderIncrementalGroup(group, drawContext) {
|
|
22887
|
-
return __awaiter$
|
|
22915
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22888
22916
|
this.count = group.count, yield new Promise(resolve => {
|
|
22889
22917
|
this.renderItem(group, drawContext, {
|
|
22890
|
-
drawingCb: () => __awaiter$
|
|
22918
|
+
drawingCb: () => __awaiter$5(this, void 0, void 0, function* () {
|
|
22891
22919
|
if (2 !== group.count) yield foreachAsync(group, DefaultAttribute.zIndex, (item, i) => {
|
|
22892
22920
|
if (this.status === STATUS.STOP) return !0;
|
|
22893
22921
|
if (item.isContainer) return !1;
|
|
@@ -22908,7 +22936,7 @@
|
|
|
22908
22936
|
});
|
|
22909
22937
|
}
|
|
22910
22938
|
waitToNextFrame() {
|
|
22911
|
-
return __awaiter$
|
|
22939
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22912
22940
|
return new Promise(resolve => {
|
|
22913
22941
|
this.global.getRequestAnimationFrame()(() => {
|
|
22914
22942
|
resolve(!1);
|
|
@@ -22917,13 +22945,13 @@
|
|
|
22917
22945
|
});
|
|
22918
22946
|
}
|
|
22919
22947
|
checkForDraw(drawContext) {
|
|
22920
|
-
return __awaiter$
|
|
22948
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22921
22949
|
let skip = this.rendering;
|
|
22922
22950
|
return drawContext.restartIncremental && (skip = !1, yield this.forceStop(), this.resetToInit()), skip;
|
|
22923
22951
|
});
|
|
22924
22952
|
}
|
|
22925
22953
|
forceStop() {
|
|
22926
|
-
return __awaiter$
|
|
22954
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22927
22955
|
this.rendering && (this.status = STATUS.STOP, yield new Promise(resolve => {
|
|
22928
22956
|
this.hooks.completeDraw.tap("stopCb", () => {
|
|
22929
22957
|
this.status = STATUS.NORMAL, this.hooks.completeDraw.taps = this.hooks.completeDraw.taps.filter(item => "stopCb" !== item.name), resolve(!1);
|
|
@@ -22935,11 +22963,11 @@
|
|
|
22935
22963
|
this.currFrameStartAt = 0, this.currentIdx = 0;
|
|
22936
22964
|
}
|
|
22937
22965
|
renderGroup(group, drawContext) {
|
|
22938
|
-
return __awaiter$
|
|
22966
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
22939
22967
|
if (!drawContext.break && !1 !== group.attribute.visibleAll) return group.incremental && drawContext.startAtId === group._uid ? (yield this._increaseRender(group, drawContext), void (drawContext.break = !0)) : void (yield new Promise(resolve => {
|
|
22940
22968
|
this.renderItem(group, drawContext, {
|
|
22941
|
-
drawingCb: () => __awaiter$
|
|
22942
|
-
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$
|
|
22969
|
+
drawingCb: () => __awaiter$5(this, void 0, void 0, function* () {
|
|
22970
|
+
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$5(this, void 0, void 0, function* () {
|
|
22943
22971
|
drawContext.break || item.isContainer && (yield this.renderGroup(item, drawContext));
|
|
22944
22972
|
})), resolve(!1);
|
|
22945
22973
|
})
|
|
@@ -23953,12 +23981,37 @@
|
|
|
23953
23981
|
BaseCanvas.env = "browser";
|
|
23954
23982
|
|
|
23955
23983
|
var __decorate$17 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
23956
|
-
|
|
23957
|
-
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
23984
|
+
var d,
|
|
23985
|
+
c = arguments.length,
|
|
23986
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
23987
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
23988
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23989
|
+
},
|
|
23990
|
+
__awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
23991
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23992
|
+
function fulfilled(value) {
|
|
23993
|
+
try {
|
|
23994
|
+
step(generator.next(value));
|
|
23995
|
+
} catch (e) {
|
|
23996
|
+
reject(e);
|
|
23997
|
+
}
|
|
23998
|
+
}
|
|
23999
|
+
function rejected(value) {
|
|
24000
|
+
try {
|
|
24001
|
+
step(generator.throw(value));
|
|
24002
|
+
} catch (e) {
|
|
24003
|
+
reject(e);
|
|
24004
|
+
}
|
|
24005
|
+
}
|
|
24006
|
+
function step(result) {
|
|
24007
|
+
var value;
|
|
24008
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
24009
|
+
resolve(value);
|
|
24010
|
+
})).then(fulfilled, rejected);
|
|
24011
|
+
}
|
|
24012
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24013
|
+
});
|
|
24014
|
+
};
|
|
23962
24015
|
let BaseEnvContribution = class {
|
|
23963
24016
|
configure(service) {
|
|
23964
24017
|
service.env === this.type && service.setActiveEnvContribution(this);
|
|
@@ -24027,6 +24080,13 @@
|
|
|
24027
24080
|
left: 0
|
|
24028
24081
|
};
|
|
24029
24082
|
}
|
|
24083
|
+
loadFont(font, source, descriptors) {
|
|
24084
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
24085
|
+
return {
|
|
24086
|
+
loadState: "fail"
|
|
24087
|
+
};
|
|
24088
|
+
});
|
|
24089
|
+
}
|
|
24030
24090
|
};
|
|
24031
24091
|
BaseEnvContribution = __decorate$17([injectable()], BaseEnvContribution);
|
|
24032
24092
|
|
|
@@ -24409,7 +24469,7 @@
|
|
|
24409
24469
|
const fVisible = fillVisible(opacity, fillOpacity, !0),
|
|
24410
24470
|
sVisible = fillVisible(opacity, strokeOpacity, !0);
|
|
24411
24471
|
if (!fVisible) return;
|
|
24412
|
-
context.translate(x, y), this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
24472
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(richtext, richtext.attribute, richtextAttribute), context.translate(x, y), this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
24413
24473
|
richtext.getFrameCache().draw(context, this.drawIcon), this.afterRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
24414
24474
|
}
|
|
24415
24475
|
drawIcon(icon, context, x, y, baseline) {
|
|
@@ -24839,11 +24899,18 @@
|
|
|
24839
24899
|
|
|
24840
24900
|
class HtmlAttributePlugin {
|
|
24841
24901
|
constructor() {
|
|
24842
|
-
this.name = "HtmlAttributePlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.htmlMap = {}, this.renderId = 0
|
|
24902
|
+
this.name = "HtmlAttributePlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.htmlMap = {}, this.renderId = 0, this.onWheel = ev => {
|
|
24903
|
+
try {
|
|
24904
|
+
const newEvent = new ev.constructor(ev.type, ev);
|
|
24905
|
+
this.pluginService.stage.window.getContext().getCanvas().nativeCanvas.dispatchEvent(newEvent);
|
|
24906
|
+
} catch (err) {
|
|
24907
|
+
return;
|
|
24908
|
+
}
|
|
24909
|
+
};
|
|
24843
24910
|
}
|
|
24844
24911
|
activate(context) {
|
|
24845
24912
|
this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
|
|
24846
|
-
stage && stage === this.pluginService.stage && this.drawHTML(context.stage.
|
|
24913
|
+
stage && stage === this.pluginService.stage && this.drawHTML([...context.stage.getChildren()]);
|
|
24847
24914
|
});
|
|
24848
24915
|
}
|
|
24849
24916
|
deactivate(context) {
|
|
@@ -24905,10 +24972,13 @@
|
|
|
24905
24972
|
}
|
|
24906
24973
|
updateStyleOfWrapContainer(graphic, stage, wrapContainer, nativeContainer, options) {
|
|
24907
24974
|
const {
|
|
24908
|
-
pointerEvents: pointerEvents
|
|
24975
|
+
pointerEvents: pointerEvents,
|
|
24976
|
+
penetrateEventList = []
|
|
24909
24977
|
} = options;
|
|
24910
24978
|
let calculateStyle = this.parseDefaultStyleFromGraphic(graphic);
|
|
24911
|
-
calculateStyle.display = !1 !== graphic.attribute.visible ? "block" : "none", calculateStyle.pointerEvents = !0 === pointerEvents ? "all" : pointerEvents || "none",
|
|
24979
|
+
calculateStyle.display = !1 !== graphic.attribute.visible ? "block" : "none", calculateStyle.pointerEvents = !0 === pointerEvents ? "all" : pointerEvents || "none", "none" !== calculateStyle.pointerEvents && (this.removeWrapContainerEventListener(wrapContainer), penetrateEventList.forEach(event => {
|
|
24980
|
+
"wheel" === event && wrapContainer.addEventListener("wheel", this.onWheel);
|
|
24981
|
+
})), wrapContainer.style.position || (wrapContainer.style.position = "absolute", nativeContainer.style.position = "relative");
|
|
24912
24982
|
let left = 0,
|
|
24913
24983
|
top = 0;
|
|
24914
24984
|
const b = graphic.globalAABBBounds;
|
|
@@ -24945,8 +25015,8 @@
|
|
|
24945
25015
|
this.htmlMap[key] && this.htmlMap[key].renderId !== this.renderId && this.removeElement(key);
|
|
24946
25016
|
}), this.renderId += 1;
|
|
24947
25017
|
}
|
|
24948
|
-
drawHTML(
|
|
24949
|
-
"browser" === application.global.env && (
|
|
25018
|
+
drawHTML(layers) {
|
|
25019
|
+
"browser" === application.global.env && (layers.sort((a, b) => {
|
|
24950
25020
|
var _a, _b;
|
|
24951
25021
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
24952
25022
|
}).forEach(group => {
|
|
@@ -24965,6 +25035,9 @@
|
|
|
24965
25035
|
} = this.htmlMap[id];
|
|
24966
25036
|
wrapContainer && application.global.removeDom(wrapContainer), this.htmlMap[id] = null;
|
|
24967
25037
|
}
|
|
25038
|
+
removeWrapContainerEventListener(wrapContainer) {
|
|
25039
|
+
wrapContainer.removeEventListener("wheel", this.onWheel);
|
|
25040
|
+
}
|
|
24968
25041
|
renderGraphicHTML(graphic) {
|
|
24969
25042
|
var _a;
|
|
24970
25043
|
const {
|
|
@@ -25845,6 +25918,7 @@
|
|
|
25845
25918
|
});
|
|
25846
25919
|
}
|
|
25847
25920
|
emitEvent(type, e) {
|
|
25921
|
+
if (!this.element) return;
|
|
25848
25922
|
const listeners = this.element._events[WILDCARD];
|
|
25849
25923
|
if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
|
|
25850
25924
|
this.emit(type, e);
|
|
@@ -26722,6 +26796,31 @@
|
|
|
26722
26796
|
},
|
|
26723
26797
|
__metadata$J = undefined && undefined.__metadata || function (k, v) {
|
|
26724
26798
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
26799
|
+
},
|
|
26800
|
+
__awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
26801
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26802
|
+
function fulfilled(value) {
|
|
26803
|
+
try {
|
|
26804
|
+
step(generator.next(value));
|
|
26805
|
+
} catch (e) {
|
|
26806
|
+
reject(e);
|
|
26807
|
+
}
|
|
26808
|
+
}
|
|
26809
|
+
function rejected(value) {
|
|
26810
|
+
try {
|
|
26811
|
+
step(generator.throw(value));
|
|
26812
|
+
} catch (e) {
|
|
26813
|
+
reject(e);
|
|
26814
|
+
}
|
|
26815
|
+
}
|
|
26816
|
+
function step(result) {
|
|
26817
|
+
var value;
|
|
26818
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
26819
|
+
resolve(value);
|
|
26820
|
+
})).then(fulfilled, rejected);
|
|
26821
|
+
}
|
|
26822
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26823
|
+
});
|
|
26725
26824
|
};
|
|
26726
26825
|
class DynamicB {
|
|
26727
26826
|
get x1() {
|
|
@@ -26917,6 +27016,19 @@
|
|
|
26917
27016
|
left: actualLeft
|
|
26918
27017
|
};
|
|
26919
27018
|
}
|
|
27019
|
+
loadFont(font, source, descriptors) {
|
|
27020
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
27021
|
+
return new FontFace(font, isString$1(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
|
|
27022
|
+
return document.fonts.add(loadedFont), {
|
|
27023
|
+
loadState: "success"
|
|
27024
|
+
};
|
|
27025
|
+
}).catch(function (error) {
|
|
27026
|
+
return console.error("Failed to load font:", error), {
|
|
27027
|
+
loadState: "fail"
|
|
27028
|
+
};
|
|
27029
|
+
});
|
|
27030
|
+
});
|
|
27031
|
+
}
|
|
26920
27032
|
};
|
|
26921
27033
|
BrowserEnvContribution = __decorate$W([injectable(), __metadata$J("design:paramtypes", [])], BrowserEnvContribution);
|
|
26922
27034
|
|
|
@@ -32207,11 +32319,11 @@
|
|
|
32207
32319
|
maxX = Math.max(x1, x2),
|
|
32208
32320
|
minY = Math.min(y1, y2),
|
|
32209
32321
|
maxY = Math.max(y1, y2),
|
|
32210
|
-
|
|
32211
|
-
|
|
32322
|
+
maxXWithPadding = width + right,
|
|
32323
|
+
maxYWithPadding = height + bottom;
|
|
32212
32324
|
let dx = 0,
|
|
32213
32325
|
dy = 0;
|
|
32214
|
-
return minX <
|
|
32326
|
+
return minX < 0 - left ? dx = -minX : maxX > maxXWithPadding && (dx = maxXWithPadding - maxX), minY < 0 - top ? dy = -minY : maxY > maxYWithPadding && (dy = maxYWithPadding - maxY), {
|
|
32215
32327
|
dx: dx,
|
|
32216
32328
|
dy: dy
|
|
32217
32329
|
};
|
|
@@ -32925,7 +33037,7 @@
|
|
|
32925
33037
|
range = boundToRange(bmpTool, bounds, !0);
|
|
32926
33038
|
if (canPlace(bmpTool, bitmap, bounds, clampForce, overlapPadding)) bitmap.setRange(range);else {
|
|
32927
33039
|
if (clampForce) {
|
|
32928
|
-
if (this._processClampForce(text, bmpTool, bitmap)) continue;
|
|
33040
|
+
if (this._processClampForce(text, bmpTool, bitmap, overlapPadding)) continue;
|
|
32929
33041
|
}
|
|
32930
33042
|
hideOnHit ? text.setAttributes({
|
|
32931
33043
|
visible: !1
|
|
@@ -32935,12 +33047,13 @@
|
|
|
32935
33047
|
return result;
|
|
32936
33048
|
}
|
|
32937
33049
|
_processClampForce(text, bmpTool, bitmap) {
|
|
33050
|
+
let overlapPadding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
32938
33051
|
const {
|
|
32939
33052
|
dy = 0,
|
|
32940
33053
|
dx = 0
|
|
32941
33054
|
} = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
|
|
32942
33055
|
if (0 === dx && 0 === dy) {
|
|
32943
|
-
if (canPlace(bmpTool, bitmap, text.AABBBounds)) return bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), !0;
|
|
33056
|
+
if (canPlace(bmpTool, bitmap, text.AABBBounds, !1, overlapPadding)) return bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), !0;
|
|
32944
33057
|
} else if (canPlace(bmpTool, bitmap, {
|
|
32945
33058
|
x1: text.AABBBounds.x1 + dx,
|
|
32946
33059
|
x2: text.AABBBounds.x2 + dx,
|
|
@@ -33000,7 +33113,7 @@
|
|
|
33000
33113
|
break;
|
|
33001
33114
|
}
|
|
33002
33115
|
if (!hasPlace && clampForce) {
|
|
33003
|
-
if (this._processClampForce(text, bmpTool, bitmap)) {
|
|
33116
|
+
if (this._processClampForce(text, bmpTool, bitmap, overlapPadding)) {
|
|
33004
33117
|
result.push(text);
|
|
33005
33118
|
continue;
|
|
33006
33119
|
}
|
|
@@ -34414,6 +34527,52 @@
|
|
|
34414
34527
|
zIndex: 1
|
|
34415
34528
|
};
|
|
34416
34529
|
|
|
34530
|
+
function genNormalBounds(item) {
|
|
34531
|
+
const bounds = item.AABBBounds;
|
|
34532
|
+
return {
|
|
34533
|
+
x1: bounds.x1,
|
|
34534
|
+
x2: bounds.x2,
|
|
34535
|
+
y1: bounds.y1,
|
|
34536
|
+
y2: bounds.y2,
|
|
34537
|
+
centerX: item.attribute.x,
|
|
34538
|
+
centerY: item.attribute.y,
|
|
34539
|
+
angle: item.attribute.angle
|
|
34540
|
+
};
|
|
34541
|
+
}
|
|
34542
|
+
function genRotateBounds(items) {
|
|
34543
|
+
items.forEach(item => {
|
|
34544
|
+
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
34545
|
+
const bounds = genNormalBounds(item),
|
|
34546
|
+
rotatedCenter = rotatePoint({
|
|
34547
|
+
x: item.attribute.x,
|
|
34548
|
+
y: item.attribute.y
|
|
34549
|
+
}, bounds.angle, {
|
|
34550
|
+
x: bounds.centerX,
|
|
34551
|
+
y: bounds.centerY
|
|
34552
|
+
}),
|
|
34553
|
+
deltaX = rotatedCenter.x - bounds.centerX,
|
|
34554
|
+
deltaY = rotatedCenter.y - bounds.centerY;
|
|
34555
|
+
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
34556
|
+
});
|
|
34557
|
+
}
|
|
34558
|
+
function itemIntersect(item1, item2) {
|
|
34559
|
+
var _a, _b;
|
|
34560
|
+
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
34561
|
+
}
|
|
34562
|
+
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
34563
|
+
function isAngleVertical(angle) {
|
|
34564
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
34565
|
+
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34566
|
+
cos = hasAngle ? Math.cos(angle) : 1;
|
|
34567
|
+
return hasAngle && Math.abs(cos) <= delta;
|
|
34568
|
+
}
|
|
34569
|
+
function isAngleHorizontal(angle) {
|
|
34570
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
34571
|
+
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34572
|
+
sin = hasAngle ? Math.sin(angle) : 0;
|
|
34573
|
+
return !hasAngle || Math.abs(sin) <= delta;
|
|
34574
|
+
}
|
|
34575
|
+
|
|
34417
34576
|
function getCircleLabelPosition(tickPosition, tickVector) {
|
|
34418
34577
|
return {
|
|
34419
34578
|
x: tickPosition.x + tickVector[0],
|
|
@@ -34484,9 +34643,11 @@
|
|
|
34484
34643
|
}), closed && (path += "Z")), path;
|
|
34485
34644
|
}
|
|
34486
34645
|
function textIntersect(textA, textB, sep) {
|
|
34487
|
-
|
|
34488
|
-
|
|
34489
|
-
|
|
34646
|
+
var _a;
|
|
34647
|
+
let a, b;
|
|
34648
|
+
const angle = null === (_a = textA.attribute) || void 0 === _a ? void 0 : _a.angle,
|
|
34649
|
+
isAABBIntersects = (textA, textB, sep) => (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
|
|
34650
|
+
return isAngleHorizontal(angle, Number.EPSILON) ? isAABBIntersects(textA, textB, sep) : (a = textA.OBBBounds, b = textB.OBBBounds, !a || !b || a.empty() || b.empty() ? isAABBIntersects(textA, textB, sep) : a.intersects(b));
|
|
34490
34651
|
}
|
|
34491
34652
|
function hasOverlap$1(items, pad) {
|
|
34492
34653
|
for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
|
|
@@ -34870,50 +35031,6 @@
|
|
|
34870
35031
|
});
|
|
34871
35032
|
}
|
|
34872
35033
|
|
|
34873
|
-
function genNormalBounds(item) {
|
|
34874
|
-
const bounds = item.AABBBounds;
|
|
34875
|
-
return {
|
|
34876
|
-
x1: bounds.x1,
|
|
34877
|
-
x2: bounds.x2,
|
|
34878
|
-
y1: bounds.y1,
|
|
34879
|
-
y2: bounds.y2,
|
|
34880
|
-
centerX: item.attribute.x,
|
|
34881
|
-
centerY: item.attribute.y,
|
|
34882
|
-
angle: item.attribute.angle
|
|
34883
|
-
};
|
|
34884
|
-
}
|
|
34885
|
-
function genRotateBounds(items) {
|
|
34886
|
-
items.forEach(item => {
|
|
34887
|
-
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
34888
|
-
const bounds = genNormalBounds(item),
|
|
34889
|
-
rotatedCenter = rotatePoint({
|
|
34890
|
-
x: item.attribute.x,
|
|
34891
|
-
y: item.attribute.y
|
|
34892
|
-
}, bounds.angle, {
|
|
34893
|
-
x: bounds.centerX,
|
|
34894
|
-
y: bounds.centerY
|
|
34895
|
-
}),
|
|
34896
|
-
deltaX = rotatedCenter.x - bounds.centerX,
|
|
34897
|
-
deltaY = rotatedCenter.y - bounds.centerY;
|
|
34898
|
-
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
34899
|
-
});
|
|
34900
|
-
}
|
|
34901
|
-
function itemIntersect(item1, item2) {
|
|
34902
|
-
var _a, _b;
|
|
34903
|
-
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
34904
|
-
}
|
|
34905
|
-
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
34906
|
-
function isAngleVertical(angle) {
|
|
34907
|
-
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34908
|
-
cos = hasAngle ? Math.cos(angle) : 1;
|
|
34909
|
-
return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
|
|
34910
|
-
}
|
|
34911
|
-
function isAngleHorizontal(angle) {
|
|
34912
|
-
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34913
|
-
sin = hasAngle ? Math.sin(angle) : 0;
|
|
34914
|
-
return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
|
|
34915
|
-
}
|
|
34916
|
-
|
|
34917
35034
|
function autoRotate(items, rotateConfig) {
|
|
34918
35035
|
if (isEmpty(items)) return;
|
|
34919
35036
|
const {
|
|
@@ -37059,7 +37176,7 @@
|
|
|
37059
37176
|
breakData: breakData
|
|
37060
37177
|
} = op;
|
|
37061
37178
|
let scaleTicks;
|
|
37062
|
-
if (isValid$1(tickStep))
|
|
37179
|
+
if (isValid$1(tickStep)) ticks = scale.stepTicks(tickStep), breakDomains = breakData && breakData() ? breakData().breakDomains : null, scaleTicks = breakDomains && breakDomains.length ? ticks.filter(tick => breakDomains.every(breakDomain => tick < breakDomain[0] || tick > breakDomain[1])) : ticks;else if (isValid$1(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
|
|
37063
37180
|
const count = null !== (_a = isFunction$1(tickCount) ? tickCount({
|
|
37064
37181
|
axisLength: rangeSize,
|
|
37065
37182
|
labelStyle: labelStyle
|
|
@@ -37083,19 +37200,30 @@
|
|
|
37083
37200
|
customTicks: customTicks
|
|
37084
37201
|
}));
|
|
37085
37202
|
}
|
|
37203
|
+
var ticks, breakDomains;
|
|
37086
37204
|
const domain = scale.domain();
|
|
37087
37205
|
if (op.labelFirstVisible && domain[0] !== scaleTicks[0] && !scaleTicks.includes(domain[0]) && scaleTicks.unshift(domain[0]), op.labelLastVisible && domain[domain.length - 1] !== scaleTicks[scaleTicks.length - 1] && !scaleTicks.includes(domain[domain.length - 1]) && scaleTicks.push(domain[domain.length - 1]), op.sampling && scaleTicks.length > 1 && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
|
|
37088
37206
|
const {
|
|
37089
|
-
|
|
37090
|
-
|
|
37091
|
-
|
|
37092
|
-
|
|
37207
|
+
labelGap = 4,
|
|
37208
|
+
labelFlush: labelFlush
|
|
37209
|
+
} = op,
|
|
37210
|
+
MIN_FONT_SIZE = 6;
|
|
37211
|
+
let items;
|
|
37212
|
+
if (scaleTicks.length * MIN_FONT_SIZE > rangeSize) {
|
|
37213
|
+
const samplingScaleTicks = [],
|
|
37214
|
+
step = Math.floor(scaleTicks.length * MIN_FONT_SIZE / rangeSize);
|
|
37215
|
+
scaleTicks.forEach((tick, index) => {
|
|
37216
|
+
index % step != 0 && index !== scaleTicks.length - 1 || samplingScaleTicks.push(tick);
|
|
37217
|
+
}), items = getCartesianLabelBounds(scale, samplingScaleTicks, op).map((bounds, i) => ({
|
|
37218
|
+
AABBBounds: bounds,
|
|
37219
|
+
value: samplingScaleTicks[i]
|
|
37220
|
+
}));
|
|
37221
|
+
} else items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
|
|
37093
37222
|
AABBBounds: bounds,
|
|
37094
37223
|
value: scaleTicks[i]
|
|
37095
37224
|
}));
|
|
37096
|
-
const
|
|
37097
|
-
|
|
37098
|
-
lastSourceItem = last(source),
|
|
37225
|
+
const firstSourceItem = items[0],
|
|
37226
|
+
lastSourceItem = last(items),
|
|
37099
37227
|
samplingMethod = breakData && breakData() ? methods$1.greedy : methods$1.parity;
|
|
37100
37228
|
for (; items.length >= 3 && hasOverlap$1(items, labelGap);) items = samplingMethod(items, labelGap);
|
|
37101
37229
|
const checkFirst = op.labelFirstVisible;
|
|
@@ -40683,7 +40811,8 @@
|
|
|
40683
40811
|
} = this.attribute,
|
|
40684
40812
|
{
|
|
40685
40813
|
spaceCol = DEFAULT_ITEM_SPACE_COL,
|
|
40686
|
-
spaceRow = DEFAULT_ITEM_SPACE_ROW
|
|
40814
|
+
spaceRow = DEFAULT_ITEM_SPACE_ROW,
|
|
40815
|
+
verticalAlign = "middle"
|
|
40687
40816
|
} = itemAttrs,
|
|
40688
40817
|
itemsContainer = this._itemsContainer,
|
|
40689
40818
|
{
|
|
@@ -40702,7 +40831,9 @@
|
|
|
40702
40831
|
startY: startY,
|
|
40703
40832
|
pages: pages
|
|
40704
40833
|
} = this._itemContext,
|
|
40705
|
-
lastItemWidth = 0
|
|
40834
|
+
lastItemWidth = 0,
|
|
40835
|
+
lastLineHeight = 0;
|
|
40836
|
+
const lastLineItemGroup = [];
|
|
40706
40837
|
for (let index = startIndex, len = legendItems.length; index < len && !(lazyload && pages > this._itemContext.currentPage * maxPages); index++) {
|
|
40707
40838
|
lazyload && (this._itemContext.startIndex = index + 1), item = legendItems[index], item.id || (item.id = item.label), item.index = index;
|
|
40708
40839
|
let isSelected = !0;
|
|
@@ -40710,15 +40841,23 @@
|
|
|
40710
40841
|
const itemGroup = this._renderEachItem(item, isSelected, index, legendItems),
|
|
40711
40842
|
itemWidth = itemGroup.attribute.width,
|
|
40712
40843
|
itemHeight = itemGroup.attribute.height;
|
|
40713
|
-
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$1(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && (
|
|
40844
|
+
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$1(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && ("middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
|
|
40845
|
+
i.setAttributes({
|
|
40846
|
+
y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
|
|
40847
|
+
});
|
|
40848
|
+
}), pages += 1, startX = 0, startY += lastLineHeight + spaceRow, lastLineHeight = 0, lastLineItemGroup.length = 0))), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
40714
40849
|
x: startX,
|
|
40715
40850
|
y: startY
|
|
40716
|
-
}), startX += spaceCol + itemWidth) : (isValid$1(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
40851
|
+
}), startX += spaceCol + itemWidth, lastLineHeight = Math.max(lastLineHeight, itemHeight), lastLineItemGroup.push(itemGroup)) : (isValid$1(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
40717
40852
|
x: startX,
|
|
40718
40853
|
y: startY
|
|
40719
40854
|
}), startY += spaceRow + itemHeight), itemsContainer.add(itemGroup), lastItemWidth = itemWidth;
|
|
40720
40855
|
}
|
|
40721
|
-
return
|
|
40856
|
+
return !isHorizontal || "middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
|
|
40857
|
+
i.setAttributes({
|
|
40858
|
+
y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
|
|
40859
|
+
});
|
|
40860
|
+
}), this._itemContext.doWrap = doWrap, this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.maxWidthInCol = maxWidthInCol, this._itemContext.pages = pages, this._itemContext.maxPages = maxPages, isScrollbar && (this._itemContext.totalPage = pages), lazyload || (this._itemContext.startIndex = legendItems.length), this._itemContext;
|
|
40722
40861
|
}
|
|
40723
40862
|
_renderContent() {
|
|
40724
40863
|
const {
|
|
@@ -49679,6 +49818,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49679
49818
|
ticker: viewOptions.ticker,
|
|
49680
49819
|
supportsTouchEvents: viewOptions.supportsTouchEvents,
|
|
49681
49820
|
supportsPointerEvents: viewOptions.supportsPointerEvents,
|
|
49821
|
+
event: {
|
|
49822
|
+
clickInterval: this._eventConfig.clickInterval,
|
|
49823
|
+
autoPreventDefault: !!this._eventConfig.autoPreventDefault
|
|
49824
|
+
},
|
|
49682
49825
|
ReactDOM: viewOptions.ReactDOM,
|
|
49683
49826
|
autoRefresh: viewOptions.autoRefresh
|
|
49684
49827
|
});
|
|
@@ -57092,18 +57235,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57092
57235
|
(_b = (_a = this._option) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, ...args);
|
|
57093
57236
|
});
|
|
57094
57237
|
}
|
|
57095
|
-
|
|
57096
|
-
|
|
57097
|
-
|
|
57098
|
-
|
|
57099
|
-
|
|
57238
|
+
const _e = this._option, { performanceHook, autoRefreshDpr, dpr, mode, gestureConfig, interactive, clickInterval, autoPreventDefault } = _e, restOption = __rest$e(_e, ["performanceHook", "autoRefreshDpr", "dpr", "mode", "gestureConfig", "interactive", "clickInterval", "autoPreventDefault"]);
|
|
57239
|
+
this._view = new View(Object.assign(Object.assign({ width: this._width, height: this._height, container: (_c = this._container.dom) !== null && _c !== void 0 ? _c : null, renderCanvas: (_d = this._container.canvas) !== null && _d !== void 0 ? _d : null, hooks: performanceHook }, restOption), { autoRefresh: isValid$1(autoRefreshDpr) ? autoRefreshDpr : !isValid$1(dpr), mode: toRenderMode(mode), autoFit: false, eventConfig: {
|
|
57240
|
+
gesture: isValid$1(gestureConfig) ? gestureConfig : isMobileLikeMode(mode),
|
|
57241
|
+
disable: interactive === false,
|
|
57242
|
+
clickInterval,
|
|
57243
|
+
autoPreventDefault
|
|
57100
57244
|
}, doLayout: () => {
|
|
57101
57245
|
var _a;
|
|
57102
57246
|
(_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.onLayout(this._view);
|
|
57103
57247
|
}, logger: logger, logLevel: logger.level() }));
|
|
57104
57248
|
this._setCanvasStyle();
|
|
57105
57249
|
this.getStage().hooks.afterRender.tap('chart-event', this.handleStageRender);
|
|
57106
|
-
const interactive = this._option.interactive;
|
|
57107
57250
|
if (interactive !== false) {
|
|
57108
57251
|
this._viewListeners.forEach(listener => {
|
|
57109
57252
|
var _a;
|
|
@@ -57467,7 +57610,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57467
57610
|
}
|
|
57468
57611
|
function getCanvasDataURL(c, ctx) {
|
|
57469
57612
|
var _a;
|
|
57470
|
-
return __awaiter$
|
|
57613
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
57471
57614
|
if (!c) {
|
|
57472
57615
|
return '';
|
|
57473
57616
|
}
|
|
@@ -61645,7 +61788,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61645
61788
|
});
|
|
61646
61789
|
}
|
|
61647
61790
|
renderAsync(morphConfig) {
|
|
61648
|
-
return __awaiter$
|
|
61791
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61649
61792
|
return this._renderAsync({
|
|
61650
61793
|
morphConfig,
|
|
61651
61794
|
transformSpec: true,
|
|
@@ -61654,7 +61797,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61654
61797
|
});
|
|
61655
61798
|
}
|
|
61656
61799
|
_renderAsync(option = {}) {
|
|
61657
|
-
return __awaiter$
|
|
61800
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61658
61801
|
return this._renderSync(option);
|
|
61659
61802
|
});
|
|
61660
61803
|
}
|
|
@@ -61702,7 +61845,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61702
61845
|
InstanceManager.unregisterInstance(this);
|
|
61703
61846
|
}
|
|
61704
61847
|
updateData(id, data, parserOptions, userUpdateOptions) {
|
|
61705
|
-
return __awaiter$
|
|
61848
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61706
61849
|
return this.updateDataSync(id, data, parserOptions, userUpdateOptions);
|
|
61707
61850
|
});
|
|
61708
61851
|
}
|
|
@@ -61729,7 +61872,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61729
61872
|
}
|
|
61730
61873
|
}
|
|
61731
61874
|
updateDataInBatches(list) {
|
|
61732
|
-
return __awaiter$
|
|
61875
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61733
61876
|
if (this._chart) {
|
|
61734
61877
|
this._chart.updateFullData(list.map(({ id, data, options }) => {
|
|
61735
61878
|
return { id, values: data, parser: options };
|
|
@@ -61800,12 +61943,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61800
61943
|
return this;
|
|
61801
61944
|
}
|
|
61802
61945
|
updateFullData(data, reRender = true) {
|
|
61803
|
-
return __awaiter$
|
|
61946
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61804
61947
|
return this.updateFullDataSync(data, reRender);
|
|
61805
61948
|
});
|
|
61806
61949
|
}
|
|
61807
61950
|
updateSpec(spec, forceMerge = false, morphConfig, userUpdateOptions) {
|
|
61808
|
-
return __awaiter$
|
|
61951
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61809
61952
|
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);
|
|
61810
61953
|
if (!result) {
|
|
61811
61954
|
return this;
|
|
@@ -61835,7 +61978,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61835
61978
|
return this._updateCustomConfigAndRecompile(result, Object.assign({ actionSource: 'updateSpecAndRecompile' }, option));
|
|
61836
61979
|
}
|
|
61837
61980
|
updateModelSpec(filter, spec, forceMerge = false, morphConfig) {
|
|
61838
|
-
return __awaiter$
|
|
61981
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61839
61982
|
if (!spec || !this._spec) {
|
|
61840
61983
|
return this;
|
|
61841
61984
|
}
|
|
@@ -61888,7 +62031,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61888
62031
|
});
|
|
61889
62032
|
}
|
|
61890
62033
|
resize(width, height) {
|
|
61891
|
-
return __awaiter$
|
|
62034
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
61892
62035
|
return this.resizeSync(width, height);
|
|
61893
62036
|
});
|
|
61894
62037
|
}
|
|
@@ -62080,7 +62223,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62080
62223
|
}
|
|
62081
62224
|
setCurrentTheme(name) {
|
|
62082
62225
|
var _a;
|
|
62083
|
-
return __awaiter$
|
|
62226
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
62084
62227
|
if (!ThemeManager$1.themeExist(name)) {
|
|
62085
62228
|
return this;
|
|
62086
62229
|
}
|
|
@@ -62203,7 +62346,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62203
62346
|
}
|
|
62204
62347
|
getDataURL() {
|
|
62205
62348
|
var _a;
|
|
62206
|
-
return __awaiter$
|
|
62349
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
62207
62350
|
const stage = this.getStage();
|
|
62208
62351
|
if (this._chart && stage) {
|
|
62209
62352
|
stage.render();
|
|
@@ -62219,7 +62362,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62219
62362
|
}
|
|
62220
62363
|
exportImg(name) {
|
|
62221
62364
|
var _a, _b;
|
|
62222
|
-
return __awaiter$
|
|
62365
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
62223
62366
|
if (!isTrueBrowser(this._option.mode)) {
|
|
62224
62367
|
(_a = this._option) === null || _a === void 0 ? void 0 : _a.onError(new TypeError(`non-browser environment can not export img`));
|
|
62225
62368
|
return;
|
|
@@ -62510,7 +62653,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62510
62653
|
};
|
|
62511
62654
|
registerVChartCore();
|
|
62512
62655
|
|
|
62513
|
-
const version = "1.13.
|
|
62656
|
+
const version = "1.13.2";
|
|
62514
62657
|
|
|
62515
62658
|
const addVChartProperty = (data, op) => {
|
|
62516
62659
|
const context = op.beforeCall();
|
|
@@ -67367,8 +67510,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67367
67510
|
}
|
|
67368
67511
|
_getTitleLimit(isX) {
|
|
67369
67512
|
var _a, _b, _c, _d, _e;
|
|
67370
|
-
|
|
67371
|
-
|
|
67513
|
+
const titleSpec = this._spec.title;
|
|
67514
|
+
if (titleSpec.visible && isNil$1((_a = titleSpec.style) === null || _a === void 0 ? void 0 : _a.maxLineWidth)) {
|
|
67515
|
+
const angle = (_e = (_c = (_b = this._axisStyle.title) === null || _b === void 0 ? void 0 : _b.angle) !== null && _c !== void 0 ? _c : (_d = titleSpec.style) === null || _d === void 0 ? void 0 : _d.angle) !== null && _e !== void 0 ? _e : 0;
|
|
67372
67516
|
if (isX) {
|
|
67373
67517
|
const width = this.getLayoutRect().width;
|
|
67374
67518
|
const cosValue = Math.abs(Math.cos(angle));
|
|
@@ -67405,64 +67549,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67405
67549
|
const isX = isXAxis(this._orient);
|
|
67406
67550
|
const isY = isYAxis(this._orient);
|
|
67407
67551
|
const isZ = isZAxis(this._orient);
|
|
67408
|
-
let end = { x: 0, y: 0 };
|
|
67409
|
-
let gridLength = 0;
|
|
67410
|
-
let axisLength = 0;
|
|
67411
67552
|
const depth = this.layout3dBox ? this.layout3dBox.length : 0;
|
|
67553
|
+
let end = { x: 0, y: 0 };
|
|
67554
|
+
let gridLength = regionHeight;
|
|
67555
|
+
let axisLength = width;
|
|
67412
67556
|
if (isX) {
|
|
67413
67557
|
end = { x: width, y: 0 };
|
|
67414
|
-
gridLength = regionHeight;
|
|
67415
|
-
axisLength = width;
|
|
67416
67558
|
}
|
|
67417
67559
|
else if (isY) {
|
|
67418
67560
|
end = { x: 0, y: height };
|
|
67419
67561
|
gridLength = regionWidth;
|
|
67420
67562
|
axisLength = height;
|
|
67421
67563
|
}
|
|
67422
|
-
if (isZ) {
|
|
67423
|
-
|
|
67424
|
-
const depthZ = this.layout3dBox ? this.layout3dBox.width : 0;
|
|
67425
|
-
let anchor3d = [0, 0];
|
|
67426
|
-
let alpha = -Math.PI / 2;
|
|
67427
|
-
let z = 0;
|
|
67428
|
-
if (directionStr === 'l2r') {
|
|
67429
|
-
z = this.layout3dBox.length;
|
|
67430
|
-
anchor3d = [0, 0, 0];
|
|
67431
|
-
alpha = Math.PI / 2;
|
|
67432
|
-
}
|
|
67433
|
-
const items = this.getLabelItems(width);
|
|
67434
|
-
const axisAttrs = {
|
|
67435
|
-
start: { x: 0, y: 0 },
|
|
67436
|
-
end: { x: depth, y: 0 },
|
|
67437
|
-
z: z,
|
|
67438
|
-
alpha,
|
|
67439
|
-
anchor3d,
|
|
67440
|
-
title: {
|
|
67441
|
-
text: this._spec.title.text || this._dataFieldText,
|
|
67442
|
-
maxWidth: this._getTitleLimit(isX)
|
|
67443
|
-
},
|
|
67444
|
-
items
|
|
67445
|
-
};
|
|
67446
|
-
if (!ignoreGrid) {
|
|
67447
|
-
axisAttrs.grid = {
|
|
67448
|
-
type: 'line',
|
|
67449
|
-
start: { x: 0, y: 0 },
|
|
67450
|
-
end: { x: depth, y: 0 },
|
|
67451
|
-
items: items[0],
|
|
67452
|
-
verticalFactor: this._axisStyle.verticalFactor,
|
|
67453
|
-
depth: depthZ,
|
|
67454
|
-
length: regionHeight,
|
|
67455
|
-
z: z,
|
|
67456
|
-
alpha,
|
|
67457
|
-
anchor3d
|
|
67458
|
-
};
|
|
67459
|
-
}
|
|
67460
|
-
return axisAttrs;
|
|
67461
|
-
}
|
|
67462
|
-
let verticalMinSize = isX ? this.layout.minHeight : this.layout.minWidth;
|
|
67463
|
-
if ((isX && this._layout.layoutRectLevelMap.height === USER_LAYOUT_RECT_LEVEL) ||
|
|
67464
|
-
(isY && this._layout.layoutRectLevelMap.width === USER_LAYOUT_RECT_LEVEL)) {
|
|
67465
|
-
verticalMinSize = this._verticalLimitSize;
|
|
67564
|
+
else if (isZ) {
|
|
67565
|
+
end = { x: depth, y: 0 };
|
|
67466
67566
|
}
|
|
67467
67567
|
const items = this.getLabelItems(axisLength);
|
|
67468
67568
|
const attrs = {
|
|
@@ -67472,12 +67572,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67472
67572
|
text: this._spec.title.text || this._dataFieldText,
|
|
67473
67573
|
maxWidth: this._getTitleLimit(isX)
|
|
67474
67574
|
},
|
|
67475
|
-
items
|
|
67476
|
-
verticalLimitSize: this._verticalLimitSize,
|
|
67477
|
-
verticalMinSize,
|
|
67478
|
-
label: {
|
|
67479
|
-
overflowLimitLength: this._getLabelOverflowLimit(isX)
|
|
67480
|
-
}
|
|
67575
|
+
items
|
|
67481
67576
|
};
|
|
67482
67577
|
if (!ignoreGrid) {
|
|
67483
67578
|
attrs.grid = {
|
|
@@ -67490,6 +67585,36 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67490
67585
|
length: gridLength
|
|
67491
67586
|
};
|
|
67492
67587
|
}
|
|
67588
|
+
if (isZ) {
|
|
67589
|
+
const directionStr = (_a = this.directionStr) !== null && _a !== void 0 ? _a : 'r2l';
|
|
67590
|
+
const depthZ = this.layout3dBox ? this.layout3dBox.width : 0;
|
|
67591
|
+
let anchor3d = [0, 0];
|
|
67592
|
+
let alpha = -Math.PI / 2;
|
|
67593
|
+
let z = 0;
|
|
67594
|
+
if (directionStr === 'l2r') {
|
|
67595
|
+
z = this.layout3dBox.length;
|
|
67596
|
+
anchor3d = [0, 0, 0];
|
|
67597
|
+
alpha = Math.PI / 2;
|
|
67598
|
+
}
|
|
67599
|
+
attrs.z = z;
|
|
67600
|
+
attrs.alpha = alpha;
|
|
67601
|
+
attrs.anchor3d = anchor3d;
|
|
67602
|
+
if (!ignoreGrid) {
|
|
67603
|
+
attrs.grid.depth = depthZ;
|
|
67604
|
+
}
|
|
67605
|
+
}
|
|
67606
|
+
else {
|
|
67607
|
+
let verticalMinSize = isX ? this.layout.minHeight : this.layout.minWidth;
|
|
67608
|
+
if ((isX && this._layout.layoutRectLevelMap.height === USER_LAYOUT_RECT_LEVEL) ||
|
|
67609
|
+
(isY && this._layout.layoutRectLevelMap.width === USER_LAYOUT_RECT_LEVEL)) {
|
|
67610
|
+
verticalMinSize = this._verticalLimitSize;
|
|
67611
|
+
}
|
|
67612
|
+
attrs.verticalLimitSize = this._verticalLimitSize;
|
|
67613
|
+
attrs.verticalMinSize = verticalMinSize;
|
|
67614
|
+
attrs.label = {
|
|
67615
|
+
overflowLimitLength: this._getLabelOverflowLimit(isX)
|
|
67616
|
+
};
|
|
67617
|
+
}
|
|
67493
67618
|
return attrs;
|
|
67494
67619
|
}
|
|
67495
67620
|
getLabelItems(length) {
|
|
@@ -84195,9 +84320,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84195
84320
|
return Math.min(val, (this._viewBox.height - sumGapY) / sumValue);
|
|
84196
84321
|
}, 1 / 0);else {
|
|
84197
84322
|
const maxRowCount = columns.reduce((cnt, column) => Math.max(cnt, column.length), 0),
|
|
84198
|
-
maxStepHeight = this._viewBox.height / maxRowCount
|
|
84199
|
-
|
|
84200
|
-
if (
|
|
84323
|
+
maxStepHeight = this._viewBox.height / maxRowCount;
|
|
84324
|
+
let gapY = Math.min(this.options.nodeGap, maxStepHeight);
|
|
84325
|
+
if (minNodeHeight + gapY > maxStepHeight && (gapY = minNodeHeight >= maxStepHeight ? maxStepHeight / 2 : (maxStepHeight - minNodeHeight) / 2, minNodeHeight = Math.min(maxStepHeight - gapY, minNodeHeight)), getGapY = () => gapY, this._gapY = gapY, this.options.equalNodeHeight) forceNodeHeight = this._viewBox.height / maxRowCount - gapY;else {
|
|
84201
84326
|
const calGapY = minNodeHeight > 0 ? Math.max(gapY, minNodeHeight) : gapY;
|
|
84202
84327
|
ky = columns.reduce((val, column) => {
|
|
84203
84328
|
const sumValue = column.reduce((sum, node) => sum + node.value, 0);
|
|
@@ -86354,6 +86479,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86354
86479
|
});
|
|
86355
86480
|
}
|
|
86356
86481
|
}
|
|
86482
|
+
generateRadiusStyle(spec) {
|
|
86483
|
+
if (!spec) {
|
|
86484
|
+
return;
|
|
86485
|
+
}
|
|
86486
|
+
const style = {};
|
|
86487
|
+
spec.outerRadius && (style.outerRadius = () => this._computeLayoutRadius() * spec.outerRadius);
|
|
86488
|
+
spec.innerRadius && (style.innerRadius = () => this._computeLayoutRadius() * spec.innerRadius);
|
|
86489
|
+
return style;
|
|
86490
|
+
}
|
|
86491
|
+
initMarkStyleWithSpec(mark, spec, key) {
|
|
86492
|
+
super.initMarkStyleWithSpec(mark, spec, key);
|
|
86493
|
+
if (mark && mark.name === "segment") {
|
|
86494
|
+
const segmentSpec = this.getSpec()["segment"];
|
|
86495
|
+
if (segmentSpec) {
|
|
86496
|
+
for (const state in segmentSpec.state || {}) {
|
|
86497
|
+
this.setMarkStyle(mark, this.generateRadiusStyle(segmentSpec.state[state]), state, AttributeLevel.User_Mark);
|
|
86498
|
+
}
|
|
86499
|
+
}
|
|
86500
|
+
}
|
|
86501
|
+
}
|
|
86357
86502
|
initTooltip() {
|
|
86358
86503
|
super.initTooltip();
|
|
86359
86504
|
this._segmentMark && this._tooltipHelper.activeTriggerSet.mark.add(this._segmentMark);
|
|
@@ -88548,371 +88693,689 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88548
88693
|
Factory$1.registerSeries(VennSeries.type, VennSeries);
|
|
88549
88694
|
};
|
|
88550
88695
|
|
|
88551
|
-
class
|
|
88552
|
-
_isValidSeries(type) {
|
|
88553
|
-
return type === exports.SeriesTypeEnum.map;
|
|
88554
|
-
}
|
|
88555
|
-
_getDefaultSeriesSpec(spec) {
|
|
88556
|
-
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { type: spec.type, nameField: spec.nameField, valueField: spec.valueField, seriesField: spec.seriesField, map: spec.map, nameProperty: spec.nameProperty, centroidProperty: spec.centroidProperty, nameMap: spec.nameMap, area: spec.area, defaultFillColor: spec.defaultFillColor, showDefaultName: spec.showDefaultName });
|
|
88557
|
-
return series;
|
|
88558
|
-
}
|
|
88559
|
-
transformSpec(spec) {
|
|
88560
|
-
super.transformSpec(spec);
|
|
88561
|
-
spec.region.forEach((r) => {
|
|
88562
|
-
r.coordinate = 'geo';
|
|
88563
|
-
});
|
|
88564
|
-
const defaultSeriesSpec = this._getDefaultSeriesSpec(spec);
|
|
88565
|
-
if (!spec.series || spec.series.length === 0) {
|
|
88566
|
-
spec.series = [defaultSeriesSpec];
|
|
88567
|
-
}
|
|
88568
|
-
else {
|
|
88569
|
-
spec.series.forEach((s) => {
|
|
88570
|
-
if (!this._isValidSeries(s.type)) {
|
|
88571
|
-
return;
|
|
88572
|
-
}
|
|
88573
|
-
Object.keys(defaultSeriesSpec).forEach(k => {
|
|
88574
|
-
if (!(k in s)) {
|
|
88575
|
-
s[k] = defaultSeriesSpec[k];
|
|
88576
|
-
}
|
|
88577
|
-
});
|
|
88578
|
-
});
|
|
88579
|
-
}
|
|
88580
|
-
}
|
|
88581
|
-
}
|
|
88582
|
-
|
|
88583
|
-
class MapChart extends BaseChart {
|
|
88696
|
+
class MosaicSeries extends BarSeries {
|
|
88584
88697
|
constructor() {
|
|
88585
88698
|
super(...arguments);
|
|
88586
|
-
this.
|
|
88587
|
-
this.
|
|
88588
|
-
this.seriesType = exports.SeriesTypeEnum.map;
|
|
88589
|
-
}
|
|
88590
|
-
}
|
|
88591
|
-
MapChart.type = "map";
|
|
88592
|
-
MapChart.seriesType = exports.SeriesTypeEnum.map;
|
|
88593
|
-
MapChart.transformerConstructor = MapChartSpecTransformer;
|
|
88594
|
-
const registerMapChart = () => {
|
|
88595
|
-
registerMapSeries();
|
|
88596
|
-
Factory$1.registerChart(MapChart.type, MapChart);
|
|
88597
|
-
};
|
|
88598
|
-
|
|
88599
|
-
class PolarChartSpecTransformer extends BaseChartSpecTransformer {
|
|
88600
|
-
_isValidSeries(type) {
|
|
88601
|
-
return this.seriesType ? type === this.seriesType : true;
|
|
88602
|
-
}
|
|
88603
|
-
getIndicatorSpec(spec) {
|
|
88604
|
-
var _a, _b, _c;
|
|
88605
|
-
const indicatorSpec = array(spec.indicator);
|
|
88606
|
-
const limitRatio = (_a = spec.innerRadius) !== null && _a !== void 0 ? _a : (_c = (_b = spec.series) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.innerRadius;
|
|
88607
|
-
if (isValid$1(limitRatio)) {
|
|
88608
|
-
indicatorSpec.forEach(indicator => {
|
|
88609
|
-
if (isNil$1(indicator.limitRatio)) {
|
|
88610
|
-
indicator.limitRatio = limitRatio;
|
|
88611
|
-
}
|
|
88612
|
-
});
|
|
88613
|
-
}
|
|
88614
|
-
return indicatorSpec;
|
|
88615
|
-
}
|
|
88616
|
-
_getDefaultSeriesSpec(spec) {
|
|
88617
|
-
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { radius: spec.radius, outerRadius: spec.outerRadius, innerRadius: spec.innerRadius, startAngle: spec.startAngle, endAngle: spec.endAngle, sortDataByAxis: spec.sortDataByAxis });
|
|
88618
|
-
const seriesType = this.seriesType;
|
|
88619
|
-
if (seriesType) {
|
|
88620
|
-
series.type = seriesType;
|
|
88621
|
-
series[seriesType] = spec[seriesType];
|
|
88622
|
-
}
|
|
88623
|
-
return series;
|
|
88699
|
+
this.type = exports.SeriesTypeEnum.mosaic;
|
|
88700
|
+
this.transformerConstructor = BarSeriesSpecTransformer;
|
|
88624
88701
|
}
|
|
88625
|
-
|
|
88626
|
-
|
|
88627
|
-
if (isArray$1(spec.dataZoom) && spec.dataZoom.length > 0) {
|
|
88628
|
-
spec.dataZoom.forEach((zoom) => {
|
|
88629
|
-
if (zoom.filterMode === 'axis') {
|
|
88630
|
-
zoom.filterMode = 'filter';
|
|
88631
|
-
}
|
|
88632
|
-
});
|
|
88633
|
-
}
|
|
88634
|
-
this.transformSeriesSpec(spec);
|
|
88635
|
-
if (isValid$1(spec.indicator)) {
|
|
88636
|
-
spec.indicator = this.getIndicatorSpec(spec);
|
|
88637
|
-
}
|
|
88702
|
+
getStack() {
|
|
88703
|
+
return true;
|
|
88638
88704
|
}
|
|
88639
|
-
|
|
88640
|
-
|
|
88641
|
-
class ProgressLikeChartSpecTransformer extends PolarChartSpecTransformer {
|
|
88642
|
-
needAxes() {
|
|
88643
|
-
return false;
|
|
88705
|
+
getPercent() {
|
|
88706
|
+
return !!this.getSeriesField();
|
|
88644
88707
|
}
|
|
88645
|
-
|
|
88646
|
-
|
|
88647
|
-
return series;
|
|
88708
|
+
getGroupFields() {
|
|
88709
|
+
return this.direction === 'vertical' ? this._specXField : this._specYField;
|
|
88648
88710
|
}
|
|
88649
|
-
|
|
88650
|
-
|
|
88651
|
-
|
|
88652
|
-
|
|
88653
|
-
|
|
88654
|
-
|
|
88655
|
-
|
|
88656
|
-
|
|
88657
|
-
|
|
88658
|
-
|
|
88659
|
-
}
|
|
88660
|
-
if (!radiusAxis) {
|
|
88661
|
-
radiusAxis = radiusAxisDefaultSpec;
|
|
88662
|
-
spec.axes.push(radiusAxis);
|
|
88663
|
-
}
|
|
88664
|
-
if (isNil$1(angleAxis.type)) {
|
|
88665
|
-
angleAxis.type = 'linear';
|
|
88666
|
-
}
|
|
88667
|
-
if (isNil$1(radiusAxis.type)) {
|
|
88668
|
-
radiusAxis.type = 'band';
|
|
88669
|
-
}
|
|
88670
|
-
const domain = getLinearAxisSpecDomain(angleAxis, { min: 0, max: 1 });
|
|
88671
|
-
if (isNil$1(angleAxis.min)) {
|
|
88672
|
-
angleAxis.min = domain.min;
|
|
88673
|
-
}
|
|
88674
|
-
if (isNil$1(angleAxis.max)) {
|
|
88675
|
-
angleAxis.max = domain.max;
|
|
88676
|
-
}
|
|
88677
|
-
if (angleAxisAppendSpec) {
|
|
88678
|
-
Object.assign(angleAxis, mergeSpec({}, angleAxisAppendSpec, angleAxis));
|
|
88711
|
+
setAttrFromSpec() {
|
|
88712
|
+
super.setAttrFromSpec();
|
|
88713
|
+
const isPercent = this.getPercent();
|
|
88714
|
+
if (this.direction === "horizontal") {
|
|
88715
|
+
if (isPercent) {
|
|
88716
|
+
this.setFieldX(MOSAIC_VALUE_END_PERCENT);
|
|
88717
|
+
this.setFieldX2(MOSAIC_VALUE_START_PERCENT);
|
|
88718
|
+
}
|
|
88719
|
+
this.setFieldY(MOSAIC_CAT_END_PERCENT);
|
|
88720
|
+
this.setFieldY2(MOSAIC_CAT_START_PERCENT);
|
|
88679
88721
|
}
|
|
88680
|
-
|
|
88681
|
-
|
|
88722
|
+
else {
|
|
88723
|
+
if (isPercent) {
|
|
88724
|
+
this.setFieldY(MOSAIC_VALUE_END_PERCENT);
|
|
88725
|
+
this.setFieldY2(MOSAIC_VALUE_START_PERCENT);
|
|
88726
|
+
}
|
|
88727
|
+
this.setFieldX(MOSAIC_CAT_END_PERCENT);
|
|
88728
|
+
this.setFieldX2(MOSAIC_CAT_START_PERCENT);
|
|
88682
88729
|
}
|
|
88683
88730
|
}
|
|
88684
|
-
|
|
88685
|
-
|
|
88686
|
-
|
|
88687
|
-
|
|
88688
|
-
|
|
88689
|
-
|
|
88690
|
-
|
|
88691
|
-
|
|
88692
|
-
return series;
|
|
88693
|
-
}
|
|
88694
|
-
transformSpec(spec) {
|
|
88695
|
-
var _a;
|
|
88696
|
-
super.transformSpec(spec);
|
|
88697
|
-
if (this.needAxes()) {
|
|
88698
|
-
if (!spec.axes) {
|
|
88699
|
-
spec.axes = [];
|
|
88731
|
+
parseLabelStyle(labelStyle, labelSpec) {
|
|
88732
|
+
if ((labelSpec === null || labelSpec === void 0 ? void 0 : labelSpec.filterByGroup) && isNil$1(labelStyle.dataFilter)) {
|
|
88733
|
+
const allGroupFields = this.getGroupFields();
|
|
88734
|
+
const { field, type: filterType = 'max', filter } = labelSpec.filterByGroup;
|
|
88735
|
+
delete labelStyle.filterField;
|
|
88736
|
+
const fieldIndex = allGroupFields.indexOf(field);
|
|
88737
|
+
if (fieldIndex < 0) {
|
|
88738
|
+
return;
|
|
88700
88739
|
}
|
|
88701
|
-
const
|
|
88702
|
-
|
|
88703
|
-
|
|
88704
|
-
|
|
88705
|
-
|
|
88706
|
-
|
|
88707
|
-
|
|
88708
|
-
|
|
88740
|
+
const isCatField = !!(fieldIndex % 2);
|
|
88741
|
+
const valueField = isCatField
|
|
88742
|
+
? filterType === 'min'
|
|
88743
|
+
? this.direction === "horizontal"
|
|
88744
|
+
? this._fieldY2
|
|
88745
|
+
: this._fieldX2
|
|
88746
|
+
: this.direction === "horizontal"
|
|
88747
|
+
? this._fieldY
|
|
88748
|
+
: this._fieldX
|
|
88749
|
+
: filterType === 'min'
|
|
88750
|
+
? this.direction === "horizontal"
|
|
88751
|
+
? this._fieldX2
|
|
88752
|
+
: this._fieldY2
|
|
88753
|
+
: this.direction === "horizontal"
|
|
88754
|
+
? this._fieldX
|
|
88755
|
+
: this._fieldY;
|
|
88756
|
+
const filterFunc = filterType === 'min'
|
|
88757
|
+
? (a, b) => {
|
|
88758
|
+
var _a, _b;
|
|
88759
|
+
return ((_a = a.data) === null || _a === void 0 ? void 0 : _a[valueField]) < ((_b = b.data) === null || _b === void 0 ? void 0 : _b[valueField]);
|
|
88709
88760
|
}
|
|
88710
|
-
|
|
88711
|
-
|
|
88712
|
-
|
|
88713
|
-
|
|
88761
|
+
: (a, b) => {
|
|
88762
|
+
var _a, _b;
|
|
88763
|
+
return ((_a = a.data) === null || _a === void 0 ? void 0 : _a[valueField]) > ((_b = b.data) === null || _b === void 0 ? void 0 : _b[valueField]);
|
|
88764
|
+
};
|
|
88765
|
+
labelStyle.dataFilter = (data) => {
|
|
88766
|
+
const filteredData = {};
|
|
88767
|
+
data.forEach((d) => {
|
|
88768
|
+
const datum = d.data;
|
|
88769
|
+
const fieldValue = datum === null || datum === void 0 ? void 0 : datum[field];
|
|
88770
|
+
if (isNil$1(fieldValue) || (filter && !filter(d))) {
|
|
88771
|
+
return;
|
|
88772
|
+
}
|
|
88773
|
+
if (!filteredData[fieldValue] || filterFunc(d, filteredData[fieldValue])) {
|
|
88774
|
+
filteredData[fieldValue] = d;
|
|
88775
|
+
}
|
|
88714
88776
|
});
|
|
88715
|
-
|
|
88716
|
-
|
|
88717
|
-
|
|
88718
|
-
|
|
88777
|
+
return data.filter((d) => {
|
|
88778
|
+
var _a;
|
|
88779
|
+
const fieldValue = (_a = d.data) === null || _a === void 0 ? void 0 : _a[field];
|
|
88780
|
+
return filteredData[fieldValue] && filteredData[fieldValue] === d;
|
|
88719
88781
|
});
|
|
88720
|
-
}
|
|
88782
|
+
};
|
|
88721
88783
|
}
|
|
88784
|
+
return labelStyle;
|
|
88722
88785
|
}
|
|
88723
88786
|
}
|
|
88787
|
+
MosaicSeries.type = exports.SeriesTypeEnum.mosaic;
|
|
88788
|
+
MosaicSeries.transformerConstructor = BarSeriesSpecTransformer;
|
|
88789
|
+
const registerMosaicSeries = () => {
|
|
88790
|
+
registerRectMark();
|
|
88791
|
+
registerTextMark();
|
|
88792
|
+
registerFadeInOutAnimation();
|
|
88793
|
+
registerCartesianLinearAxis();
|
|
88794
|
+
Factory$1.registerSeries(MosaicSeries.type, MosaicSeries);
|
|
88795
|
+
};
|
|
88724
88796
|
|
|
88725
|
-
|
|
88726
|
-
needAxes() {
|
|
88727
|
-
return false;
|
|
88728
|
-
}
|
|
88729
|
-
_getDefaultSeriesSpec(spec) {
|
|
88730
|
-
var _a;
|
|
88731
|
-
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField || spec.seriesField, valueField: spec.valueField || spec.angleField, center: spec.center, centerOffset: spec.centerOffset, cornerRadius: spec.cornerRadius, padAngle: spec.padAngle, minAngle: spec.minAngle, emptyPlaceholder: spec.emptyPlaceholder, emptyCircle: (_a = spec.emptyPlaceholder) === null || _a === void 0 ? void 0 : _a.emptyCircle, showAllZero: spec.showAllZero, supportNegative: spec.supportNegative, layoutRadius: spec.layoutRadius });
|
|
88732
|
-
}
|
|
88733
|
-
}
|
|
88797
|
+
const PictogramSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["pictogram"]: { name: "pictogram", type: "group" } });
|
|
88734
88798
|
|
|
88735
|
-
class
|
|
88736
|
-
|
|
88737
|
-
|
|
88738
|
-
|
|
88799
|
+
class PictogramSeriesSpecTransformer extends BaseSeriesSpecTransformer {
|
|
88800
|
+
_getDefaultSpecFromChart(chartSpec) {
|
|
88801
|
+
var _a, _b, _c;
|
|
88802
|
+
const spec = (_a = super._getDefaultSpecFromChart(chartSpec)) !== null && _a !== void 0 ? _a : {};
|
|
88803
|
+
const svg = chartSpec.svg;
|
|
88804
|
+
const elements = (_c = (_b = svgSourceMap.get(svg)) === null || _b === void 0 ? void 0 : _b.latestData) === null || _c === void 0 ? void 0 : _c.elements;
|
|
88805
|
+
if (elements && elements.length) {
|
|
88806
|
+
const names = elements.map(e => e.name).filter(n => isValid$1(n));
|
|
88807
|
+
names.forEach(name => {
|
|
88808
|
+
if (chartSpec[name]) {
|
|
88809
|
+
spec[name] = chartSpec[name];
|
|
88810
|
+
}
|
|
88811
|
+
});
|
|
88812
|
+
}
|
|
88813
|
+
return spec;
|
|
88739
88814
|
}
|
|
88740
88815
|
}
|
|
88741
|
-
BasePieChart.transformerConstructor = BasePieChartSpecTransformer;
|
|
88742
88816
|
|
|
88743
|
-
class
|
|
88817
|
+
class PictogramSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
88744
88818
|
constructor() {
|
|
88745
88819
|
super(...arguments);
|
|
88746
|
-
this.
|
|
88747
|
-
|
|
88748
|
-
|
|
88820
|
+
this.dimensionTooltipTitleCallback = (datum) => {
|
|
88821
|
+
var _a;
|
|
88822
|
+
const series = this.series;
|
|
88823
|
+
return (_a = this._getDimensionData(datum)) !== null && _a !== void 0 ? _a : series.getDatumName(datum);
|
|
88824
|
+
};
|
|
88825
|
+
this.markTooltipValueCallback = (datum, params) => {
|
|
88826
|
+
const { measureFields } = this._seriesCacheInfo;
|
|
88827
|
+
if (measureFields[0] && datum.data) {
|
|
88828
|
+
return datum.data[measureFields[0]];
|
|
88829
|
+
}
|
|
88830
|
+
};
|
|
88831
|
+
this.markTooltipKeyCallback = (datum) => {
|
|
88832
|
+
var _a;
|
|
88833
|
+
return (_a = datum.data) === null || _a === void 0 ? void 0 : _a[this.series.getDimensionField()[0]];
|
|
88834
|
+
};
|
|
88749
88835
|
}
|
|
88750
88836
|
}
|
|
88751
|
-
PieChart.type = "pie";
|
|
88752
|
-
PieChart.seriesType = exports.SeriesTypeEnum.pie;
|
|
88753
|
-
PieChart.transformerConstructor = BasePieChartSpecTransformer;
|
|
88754
|
-
const registerPieChart = () => {
|
|
88755
|
-
registerPieSeries();
|
|
88756
|
-
Factory$1.registerChart(PieChart.type, PieChart);
|
|
88757
|
-
};
|
|
88758
88837
|
|
|
88759
|
-
|
|
88760
|
-
|
|
88761
|
-
|
|
88762
|
-
spec.series.forEach((s) => {
|
|
88763
|
-
if (s.type === 'pie3d') {
|
|
88764
|
-
s.angle3d = spec.angle3d;
|
|
88765
|
-
}
|
|
88766
|
-
});
|
|
88767
|
-
}
|
|
88838
|
+
function isValidStrokeOrFill(attr) {
|
|
88839
|
+
var _a;
|
|
88840
|
+
return isValid$1(attr) && attr !== 'none' && !((_a = attr.includes) === null || _a === void 0 ? void 0 : _a.call(attr, 'url'));
|
|
88768
88841
|
}
|
|
88769
|
-
|
|
88770
|
-
|
|
88771
|
-
|
|
88772
|
-
|
|
88773
|
-
|
|
88774
|
-
|
|
88842
|
+
const getLineWidth = (attributes) => {
|
|
88843
|
+
const strokeWidth = parseFloat(attributes['strokeWidth']);
|
|
88844
|
+
if (!isNaN(strokeWidth))
|
|
88845
|
+
return strokeWidth;
|
|
88846
|
+
const stroke = attributes['stroke'];
|
|
88847
|
+
return stroke && isValidStrokeOrFill(stroke) ? 1 : 0;
|
|
88848
|
+
};
|
|
88849
|
+
const getFill = (attributes, defaultFill) => {
|
|
88850
|
+
var _a;
|
|
88851
|
+
const fill = (_a = attributes['fill']) !== null && _a !== void 0 ? _a : defaultFill;
|
|
88852
|
+
return fill && isValidStrokeOrFill(fill) ? fill : undefined;
|
|
88853
|
+
};
|
|
88854
|
+
const getStroke = (attributes, defaultStroke) => {
|
|
88855
|
+
var _a;
|
|
88856
|
+
const stroke = (_a = attributes['stroke']) !== null && _a !== void 0 ? _a : defaultStroke;
|
|
88857
|
+
return stroke && isValidStrokeOrFill(stroke) ? stroke : false;
|
|
88858
|
+
};
|
|
88859
|
+
const commonAttributes = (attributes) => {
|
|
88860
|
+
return Object.assign(Object.assign({}, attributes), { x: parseFloat(attributes.x) || undefined, y: parseFloat(attributes.y) || undefined, fillStrokeOrder: false, fill: getFill(attributes), lineWidth: getLineWidth(attributes), stroke: getStroke(attributes) });
|
|
88861
|
+
};
|
|
88862
|
+
const graphicAttributeTransform = {
|
|
88863
|
+
group: (attributes) => {
|
|
88864
|
+
const common = commonAttributes(attributes);
|
|
88865
|
+
return Object.assign(Object.assign({}, common), { visibleAll: common['visible'] !== false });
|
|
88866
|
+
},
|
|
88867
|
+
rule: (attributes) => {
|
|
88868
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { x: parseFloat(attributes.x1), y: parseFloat(attributes.y1), x1: parseFloat(attributes.x2), y1: parseFloat(attributes.y2) });
|
|
88869
|
+
},
|
|
88870
|
+
rect: (attributes) => {
|
|
88871
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { fill: getFill(attributes, '#000'), width: parseFloat(attributes.width), height: parseFloat(attributes.height) });
|
|
88872
|
+
},
|
|
88873
|
+
polygon: (attributes) => {
|
|
88874
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { fill: getFill(attributes, '#000'), points: attributes.points
|
|
88875
|
+
.trim()
|
|
88876
|
+
.split(/\s+/)
|
|
88877
|
+
.map((pair) => {
|
|
88878
|
+
const [x, y] = pair.split(',').map(Number);
|
|
88879
|
+
return { x, y };
|
|
88880
|
+
}) });
|
|
88881
|
+
},
|
|
88882
|
+
line: (attributes) => {
|
|
88883
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { points: attributes.points
|
|
88884
|
+
.trim()
|
|
88885
|
+
.split(/\s+/)
|
|
88886
|
+
.map((pair) => {
|
|
88887
|
+
const [x, y] = pair.split(',').map(Number);
|
|
88888
|
+
return { x, y };
|
|
88889
|
+
}) });
|
|
88890
|
+
},
|
|
88891
|
+
path: (attributes) => {
|
|
88892
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { path: attributes.d, fillStrokeOrder: false });
|
|
88893
|
+
},
|
|
88894
|
+
arc: (attributes) => {
|
|
88895
|
+
var _a;
|
|
88896
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { outerRadius: (_a = attributes.r) !== null && _a !== void 0 ? _a : attributes.ry, x: parseFloat(attributes.cx), y: parseFloat(attributes.cy), startAngle: 0, endAngle: Math.PI * 2, scaleX: parseFloat(attributes.rx) / parseFloat(attributes.ry) || 1, fill: getFill(attributes, '#000') });
|
|
88897
|
+
},
|
|
88898
|
+
text: (attributes, value) => {
|
|
88899
|
+
var _a, _b;
|
|
88900
|
+
return Object.assign(Object.assign({}, commonAttributes(attributes)), { text: value, textAlign: (_a = attributes.textAlign) !== null && _a !== void 0 ? _a : 'left', textBaseLine: (_b = attributes.textAnchor) !== null && _b !== void 0 ? _b : 'middle', anchor: [0, 0], fill: getFill(attributes, '#000') });
|
|
88775
88901
|
}
|
|
88776
|
-
}
|
|
88777
|
-
Pie3dChart.type = "pie3d";
|
|
88778
|
-
Pie3dChart.seriesType = exports.SeriesTypeEnum.pie3d;
|
|
88779
|
-
Pie3dChart.transformerConstructor = Pie3dChartSpecTransformer;
|
|
88780
|
-
const registerPie3dChart = () => {
|
|
88781
|
-
register3DPlugin();
|
|
88782
|
-
registerPie3dSeries();
|
|
88783
|
-
Factory$1.registerChart(Pie3dChart.type, Pie3dChart);
|
|
88784
88902
|
};
|
|
88785
|
-
|
|
88786
|
-
|
|
88787
|
-
|
|
88788
|
-
|
|
88789
|
-
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { radius: (_a = spec.radius) !== null && _a !== void 0 ? _a : POLAR_DEFAULT_RADIUS, outerRadius: (_b = spec.outerRadius) !== null && _b !== void 0 ? _b : POLAR_DEFAULT_RADIUS, innerRadius: (_c = spec.innerRadius) !== null && _c !== void 0 ? _c : 0, seriesField: spec.seriesField, stack: spec.stack, percent: spec.percent });
|
|
88903
|
+
const pictogram = (data) => {
|
|
88904
|
+
var _a, _b;
|
|
88905
|
+
if (!data || !data[0]) {
|
|
88906
|
+
return {};
|
|
88790
88907
|
}
|
|
88791
|
-
|
|
88792
|
-
|
|
88793
|
-
|
|
88794
|
-
|
|
88795
|
-
[
|
|
88796
|
-
|
|
88797
|
-
|
|
88798
|
-
|
|
88799
|
-
|
|
88800
|
-
|
|
88801
|
-
|
|
88908
|
+
const { elements } = data[0].latestData;
|
|
88909
|
+
if (elements && elements.length) {
|
|
88910
|
+
elements.forEach((el, index) => {
|
|
88911
|
+
var _a;
|
|
88912
|
+
el[DEFAULT_DATA_INDEX] = index;
|
|
88913
|
+
el._uniqueId = `${el.id}-${index}`;
|
|
88914
|
+
el.data = undefined;
|
|
88915
|
+
const { graphicType: type, transform } = el;
|
|
88916
|
+
let finalAttributes = {
|
|
88917
|
+
visible: el.attributes.visibility !== 'hidden' && el.attributes.visibility !== 'collapse'
|
|
88918
|
+
};
|
|
88919
|
+
if (el.graphicType === 'text') {
|
|
88920
|
+
merge$1(finalAttributes, el._inheritStyle, (_a = el.parent) === null || _a === void 0 ? void 0 : _a._textGroupStyle, el.attributes);
|
|
88921
|
+
}
|
|
88922
|
+
else if (el.graphicType !== 'group') {
|
|
88923
|
+
merge$1(finalAttributes, el._inheritStyle, el.attributes);
|
|
88924
|
+
}
|
|
88925
|
+
if (graphicAttributeTransform[type]) {
|
|
88926
|
+
el._finalAttributes = graphicAttributeTransform[type](finalAttributes, el.value);
|
|
88927
|
+
}
|
|
88928
|
+
else {
|
|
88929
|
+
el._finalAttributes = finalAttributes;
|
|
88930
|
+
}
|
|
88931
|
+
if (transform) {
|
|
88932
|
+
el._finalAttributes.postMatrix = Object.assign({}, transform);
|
|
88802
88933
|
}
|
|
88803
88934
|
});
|
|
88804
|
-
|
|
88805
|
-
|
|
88806
|
-
|
|
88807
|
-
|
|
88808
|
-
|
|
88809
|
-
|
|
88810
|
-
|
|
88935
|
+
const texts = elements.filter(el => el.tagName === 'text');
|
|
88936
|
+
for (let i = 0; i < texts.length; i++) {
|
|
88937
|
+
const textId = texts[i]._uniqueId;
|
|
88938
|
+
const children = elements.filter(el => {
|
|
88939
|
+
let result = false;
|
|
88940
|
+
let parent = el.parent;
|
|
88941
|
+
while (parent) {
|
|
88942
|
+
if (parent._uniqueId === textId) {
|
|
88943
|
+
result = true;
|
|
88944
|
+
break;
|
|
88811
88945
|
}
|
|
88946
|
+
parent = parent.parent;
|
|
88812
88947
|
}
|
|
88813
|
-
|
|
88814
|
-
|
|
88948
|
+
return result;
|
|
88949
|
+
});
|
|
88950
|
+
if (children && children.length) {
|
|
88951
|
+
let startX = (_b = (_a = texts[i]._textGroupStyle) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0;
|
|
88952
|
+
let curX = startX;
|
|
88953
|
+
for (let j = 0; j < children.length; j++) {
|
|
88954
|
+
const currentChild = children[j];
|
|
88955
|
+
if (currentChild.graphicType === 'group') {
|
|
88956
|
+
curX = startX;
|
|
88957
|
+
}
|
|
88958
|
+
else if (currentChild.value) {
|
|
88959
|
+
if (currentChild.parent._textGroupStyle.x === undefined) {
|
|
88960
|
+
const lastText = children
|
|
88961
|
+
.slice(0, j)
|
|
88962
|
+
.reverse()
|
|
88963
|
+
.find(c => c.graphicType === 'text' && c.value);
|
|
88964
|
+
if (lastText) {
|
|
88965
|
+
const width = measureText(lastText.value, lastText._finalAttributes).width;
|
|
88966
|
+
curX += width;
|
|
88967
|
+
}
|
|
88968
|
+
currentChild._finalAttributes.x = curX;
|
|
88969
|
+
}
|
|
88970
|
+
}
|
|
88971
|
+
}
|
|
88972
|
+
}
|
|
88973
|
+
}
|
|
88815
88974
|
}
|
|
88816
|
-
|
|
88975
|
+
return elements;
|
|
88976
|
+
};
|
|
88817
88977
|
|
|
88818
|
-
class
|
|
88978
|
+
class PictogramSeries extends GeoSeries {
|
|
88819
88979
|
constructor() {
|
|
88820
88980
|
super(...arguments);
|
|
88821
|
-
this.
|
|
88822
|
-
this.type = "rose";
|
|
88823
|
-
this.seriesType = exports.SeriesTypeEnum.rose;
|
|
88981
|
+
this.type = exports.SeriesTypeEnum.pictogram;
|
|
88824
88982
|
}
|
|
88825
|
-
|
|
88826
|
-
|
|
88827
|
-
|
|
88828
|
-
|
|
88829
|
-
|
|
88830
|
-
|
|
88831
|
-
|
|
88832
|
-
|
|
88833
|
-
|
|
88834
|
-
|
|
88835
|
-
|
|
88836
|
-
|
|
88837
|
-
|
|
88838
|
-
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { seriesField: spec.seriesField, line: spec.line, point: spec.point, stack: spec.stack, percent: spec.percent, area: mergeSpec({
|
|
88839
|
-
visible: false
|
|
88840
|
-
}, spec.area), seriesMark: (_a = spec.seriesMark) !== null && _a !== void 0 ? _a : 'area', activePoint: spec.activePoint, pointDis: spec.pointDis, pointDisMul: spec.pointDisMul, markOverlap: spec.markOverlap });
|
|
88983
|
+
setAttrFromSpec() {
|
|
88984
|
+
var _a, _b, _c;
|
|
88985
|
+
super.setAttrFromSpec();
|
|
88986
|
+
this.svg = this._spec.svg;
|
|
88987
|
+
this._nameField = this._spec.nameField;
|
|
88988
|
+
this._valueField = this._spec.valueField;
|
|
88989
|
+
if (!this.svg) {
|
|
88990
|
+
(_a = this._option) === null || _a === void 0 ? void 0 : _a.onError(`svg source is not specified !`);
|
|
88991
|
+
}
|
|
88992
|
+
this._parsedSvgResult = (_b = getSVGSource(this.svg)) === null || _b === void 0 ? void 0 : _b.latestData;
|
|
88993
|
+
if (!this._parsedSvgResult) {
|
|
88994
|
+
(_c = this._option) === null || _c === void 0 ? void 0 : _c.onError(`'${this.svg}' is not registered !`);
|
|
88995
|
+
}
|
|
88841
88996
|
}
|
|
88842
|
-
|
|
88997
|
+
getDatumCenter(datum) {
|
|
88998
|
+
return [Number.NaN, Number.NaN];
|
|
88999
|
+
}
|
|
89000
|
+
getDatumName(datum) {
|
|
89001
|
+
return datum.name || datum._nameFromParent;
|
|
89002
|
+
}
|
|
89003
|
+
getMarksWithoutRoot() {
|
|
89004
|
+
return this.getMarks().filter(m => m.name && !m.name.includes('seriesGroup') && !m.name.includes('root') && m !== this._pictogramMark);
|
|
89005
|
+
}
|
|
89006
|
+
_buildMarkAttributeContext() {
|
|
89007
|
+
super._buildMarkAttributeContext();
|
|
89008
|
+
this._markAttributeContext.getTransformMatrix = this.getRootMatrix.bind(this);
|
|
89009
|
+
this._markAttributeContext.coordToPosition = this.coordToPosition.bind(this);
|
|
89010
|
+
this._markAttributeContext.dataToPosition = this.dataToPosition.bind(this);
|
|
89011
|
+
}
|
|
89012
|
+
_defaultHoverConfig(selector, finalHoverSpec) {
|
|
89013
|
+
return {
|
|
89014
|
+
seriesId: this.id,
|
|
89015
|
+
regionId: this._region.id,
|
|
89016
|
+
selector,
|
|
89017
|
+
type: 'element-highlight-by-graphic-name',
|
|
89018
|
+
trigger: finalHoverSpec.trigger,
|
|
89019
|
+
triggerOff: 'pointerout',
|
|
89020
|
+
blurState: STATE_VALUE_ENUM.STATE_HOVER_REVERSE,
|
|
89021
|
+
highlightState: STATE_VALUE_ENUM.STATE_HOVER
|
|
89022
|
+
};
|
|
89023
|
+
}
|
|
89024
|
+
_defaultSelectConfig(selector, finalSelectSpec) {
|
|
89025
|
+
const isMultiple = finalSelectSpec.mode === 'multiple';
|
|
89026
|
+
const triggerOff = isValid$1(finalSelectSpec.triggerOff)
|
|
89027
|
+
? finalSelectSpec.triggerOff
|
|
89028
|
+
: isMultiple
|
|
89029
|
+
? ['empty', 'self']
|
|
89030
|
+
: ['empty', finalSelectSpec.trigger];
|
|
89031
|
+
return {
|
|
89032
|
+
type: 'element-select-by-graphic-name',
|
|
89033
|
+
seriesId: this.id,
|
|
89034
|
+
regionId: this._region.id,
|
|
89035
|
+
selector,
|
|
89036
|
+
trigger: finalSelectSpec.trigger,
|
|
89037
|
+
triggerOff: triggerOff,
|
|
89038
|
+
reverseState: STATE_VALUE_ENUM.STATE_SELECTED_REVERSE,
|
|
89039
|
+
state: STATE_VALUE_ENUM.STATE_SELECTED,
|
|
89040
|
+
isMultiple
|
|
89041
|
+
};
|
|
89042
|
+
}
|
|
89043
|
+
initMark() {
|
|
88843
89044
|
var _a;
|
|
88844
|
-
|
|
88845
|
-
|
|
88846
|
-
|
|
88847
|
-
|
|
88848
|
-
|
|
88849
|
-
|
|
89045
|
+
this._pictogramMark = this._createMark(PictogramSeries.mark.pictogram, {
|
|
89046
|
+
groupKey: this.getDimensionField()[0],
|
|
89047
|
+
isSeriesMark: true,
|
|
89048
|
+
skipBeforeLayouted: true,
|
|
89049
|
+
dataView: this._mapViewData.getDataView(),
|
|
89050
|
+
dataProductId: this._mapViewData.getProductId()
|
|
89051
|
+
}, {
|
|
89052
|
+
morph: shouldMarkDoMorph(this._spec, PictogramSeries.mark.pictogram.name)
|
|
89053
|
+
});
|
|
89054
|
+
if (!this._pictogramMark) {
|
|
89055
|
+
return;
|
|
89056
|
+
}
|
|
89057
|
+
this._pictogramMark.setUserId(PictogramSeries.mark.pictogram.name);
|
|
89058
|
+
for (const element of this._mapViewData.getDataView().latestData) {
|
|
89059
|
+
const { graphicType: type, name, parent, id, _nameFromParent, _uniqueId } = element;
|
|
89060
|
+
const mark = this._createMark({ type, name: name !== null && name !== void 0 ? name : _nameFromParent }, {
|
|
89061
|
+
groupKey: _uniqueId,
|
|
89062
|
+
isSeriesMark: false,
|
|
89063
|
+
skipBeforeLayouted: true,
|
|
89064
|
+
dataView: this._mapViewData.getDataView(),
|
|
89065
|
+
dataProductId: this._mapViewData.getProductId(),
|
|
89066
|
+
parent: (_a = this._pictogramMark.getMarkInUserId(parent === null || parent === void 0 ? void 0 : parent._uniqueId)) !== null && _a !== void 0 ? _a : this._pictogramMark
|
|
89067
|
+
}, {
|
|
89068
|
+
morph: shouldMarkDoMorph(this._spec, PictogramSeries.mark.pictogram.name)
|
|
89069
|
+
});
|
|
89070
|
+
if (mark) {
|
|
89071
|
+
mark.setUserId(_uniqueId);
|
|
89072
|
+
if (mark.type !== 'group') {
|
|
89073
|
+
mark.setMarkConfig({ graphicName: mark.name });
|
|
89074
|
+
}
|
|
89075
|
+
mark.setTransform([
|
|
89076
|
+
{
|
|
89077
|
+
type: 'filter',
|
|
89078
|
+
callback: (datum) => {
|
|
89079
|
+
return datum._uniqueId === _uniqueId;
|
|
89080
|
+
}
|
|
88850
89081
|
}
|
|
89082
|
+
]);
|
|
89083
|
+
}
|
|
89084
|
+
}
|
|
89085
|
+
this._initLabelMark();
|
|
89086
|
+
}
|
|
89087
|
+
_initLabelMark() {
|
|
89088
|
+
if (this._spec.label.visible !== true) {
|
|
89089
|
+
return;
|
|
89090
|
+
}
|
|
89091
|
+
const labelMark = this._createMark(PictogramSeries.mark.label, {
|
|
89092
|
+
isSeriesMark: false,
|
|
89093
|
+
parent: this._pictogramMark,
|
|
89094
|
+
groupKey: '_uniqueId',
|
|
89095
|
+
skipBeforeLayouted: true,
|
|
89096
|
+
depend: this.getMarksWithoutRoot()
|
|
89097
|
+
});
|
|
89098
|
+
if (labelMark) {
|
|
89099
|
+
this._labelMark = labelMark;
|
|
89100
|
+
this._labelMark.setDataView(this._mapViewData.getDataView());
|
|
89101
|
+
}
|
|
89102
|
+
}
|
|
89103
|
+
initLabelMarkStyle() {
|
|
89104
|
+
if (!this._labelMark) {
|
|
89105
|
+
return;
|
|
89106
|
+
}
|
|
89107
|
+
this.setMarkStyle(this._labelMark, {
|
|
89108
|
+
visible: d => !!this._validElement(d),
|
|
89109
|
+
x: d => { var _a; return (_a = this.dataToPosition(d, true)) === null || _a === void 0 ? void 0 : _a.x; },
|
|
89110
|
+
y: d => { var _a; return (_a = this.dataToPosition(d, true)) === null || _a === void 0 ? void 0 : _a.y; },
|
|
89111
|
+
text: d => d[this.nameField],
|
|
89112
|
+
textAlign: 'center',
|
|
89113
|
+
textBaseline: 'middle'
|
|
89114
|
+
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
89115
|
+
}
|
|
89116
|
+
initMarkStyle() {
|
|
89117
|
+
const { root, viewBoxRect } = this._parsedSvgResult;
|
|
89118
|
+
const elements = this._mapViewData.getDataView().latestData;
|
|
89119
|
+
if (root) {
|
|
89120
|
+
this.setMarkStyle(this._pictogramMark, graphicAttributeTransform.group(root.attributes), 'normal', AttributeLevel.Built_In);
|
|
89121
|
+
if (root.transform) {
|
|
89122
|
+
this.setMarkStyle(this._pictogramMark, {
|
|
89123
|
+
postMatrix: () => root.transform
|
|
89124
|
+
}, 'normal', AttributeLevel.Built_In);
|
|
89125
|
+
}
|
|
89126
|
+
if (viewBoxRect) {
|
|
89127
|
+
this._pictogramMark.setMarkConfig({
|
|
89128
|
+
clip: true,
|
|
89129
|
+
clipPath: [createRect(Object.assign(Object.assign({}, viewBoxRect), { fill: true }))]
|
|
88851
89130
|
});
|
|
88852
|
-
|
|
88853
|
-
|
|
89131
|
+
}
|
|
89132
|
+
}
|
|
89133
|
+
for (const element of elements) {
|
|
89134
|
+
const { _uniqueId, _finalAttributes: attributes } = element;
|
|
89135
|
+
const mark = this._pictogramMark.getMarkInUserId(_uniqueId);
|
|
89136
|
+
const valid = this._validElement(element);
|
|
89137
|
+
if (mark) {
|
|
89138
|
+
this.setMarkStyle(mark, { keepStrokeScale: true }, 'normal', AttributeLevel.Built_In);
|
|
89139
|
+
if (valid) {
|
|
89140
|
+
this.initMarkStyleWithSpec(mark, merge$1({}, this._spec.pictogram, this._spec[mark.name]));
|
|
89141
|
+
this.setMarkStyle(mark, attributes, 'normal', AttributeLevel.Series);
|
|
89142
|
+
mark.setPostProcess('fill', (result, datum) => {
|
|
89143
|
+
return isValid$1(result) ? result : this._spec.defaultFillColor;
|
|
89144
|
+
});
|
|
89145
|
+
}
|
|
89146
|
+
else {
|
|
89147
|
+
mark.setMarkConfig({ interactive: false });
|
|
89148
|
+
this.setMarkStyle(mark, attributes, 'normal', AttributeLevel.Built_In);
|
|
88854
89149
|
}
|
|
88855
89150
|
}
|
|
89151
|
+
}
|
|
89152
|
+
this.initLabelMarkStyle();
|
|
89153
|
+
}
|
|
89154
|
+
_validElement(element) {
|
|
89155
|
+
return element.name || element._nameFromParent;
|
|
89156
|
+
}
|
|
89157
|
+
initTooltip() {
|
|
89158
|
+
this._tooltipHelper = new PictogramSeriesTooltipHelper(this);
|
|
89159
|
+
this.getMarksWithoutRoot().forEach(mark => {
|
|
89160
|
+
if (mark && mark.name) {
|
|
89161
|
+
this._tooltipHelper.activeTriggerSet.mark.add(mark);
|
|
89162
|
+
}
|
|
88856
89163
|
});
|
|
88857
|
-
|
|
88858
|
-
|
|
88859
|
-
|
|
88860
|
-
|
|
88861
|
-
|
|
88862
|
-
|
|
88863
|
-
|
|
89164
|
+
}
|
|
89165
|
+
dataToPosition(datum, global = false) {
|
|
89166
|
+
if (!datum) {
|
|
89167
|
+
return null;
|
|
89168
|
+
}
|
|
89169
|
+
const name = datum[this.nameField];
|
|
89170
|
+
if (!name) {
|
|
89171
|
+
return null;
|
|
89172
|
+
}
|
|
89173
|
+
const mark = this.getMarksWithoutRoot().filter(mark => mark.name === name);
|
|
89174
|
+
if (!mark || mark.length === 0) {
|
|
89175
|
+
return null;
|
|
89176
|
+
}
|
|
89177
|
+
let bounds = new Bounds();
|
|
89178
|
+
if (global) {
|
|
89179
|
+
mark.forEach(m => {
|
|
89180
|
+
bounds = bounds.union(m.getProduct().getGroupGraphicItem().globalAABBBounds);
|
|
89181
|
+
});
|
|
89182
|
+
}
|
|
89183
|
+
else {
|
|
89184
|
+
mark.forEach(m => {
|
|
89185
|
+
bounds = bounds.union(m.getProduct().getBounds());
|
|
89186
|
+
});
|
|
89187
|
+
}
|
|
89188
|
+
const point = { x: (bounds.x1 + bounds.x2) / 2, y: (bounds.y1 + bounds.y2) / 2 };
|
|
89189
|
+
if (global) {
|
|
89190
|
+
const { x, y } = this.getLayoutStartPoint();
|
|
89191
|
+
point.x -= x;
|
|
89192
|
+
point.y -= y;
|
|
89193
|
+
}
|
|
89194
|
+
return point;
|
|
89195
|
+
}
|
|
89196
|
+
coordToPosition(point) {
|
|
89197
|
+
if (!point) {
|
|
89198
|
+
return null;
|
|
89199
|
+
}
|
|
89200
|
+
const { x, y } = point;
|
|
89201
|
+
const matrix = this.getRootMatrix();
|
|
89202
|
+
if (!matrix) {
|
|
89203
|
+
return null;
|
|
89204
|
+
}
|
|
89205
|
+
const position = {};
|
|
89206
|
+
matrix.getInverse().transformPoint({ x, y }, position);
|
|
89207
|
+
return position;
|
|
89208
|
+
}
|
|
89209
|
+
getRootMatrix() {
|
|
89210
|
+
var _a;
|
|
89211
|
+
return (_a = this.getPictogramRootGraphic()) === null || _a === void 0 ? void 0 : _a.transMatrix;
|
|
89212
|
+
}
|
|
89213
|
+
getPictogramRootGraphic() {
|
|
89214
|
+
var _a;
|
|
89215
|
+
return (_a = this._pictogramMark.getProduct()) === null || _a === void 0 ? void 0 : _a.getGroupGraphicItem();
|
|
89216
|
+
}
|
|
89217
|
+
initData() {
|
|
89218
|
+
var _a, _b;
|
|
89219
|
+
super.initData();
|
|
89220
|
+
const parsedSvg = svgSourceMap.get(this.svg);
|
|
89221
|
+
if (!parsedSvg) {
|
|
89222
|
+
(_a = this._option) === null || _a === void 0 ? void 0 : _a.onError('no valid svg found!');
|
|
89223
|
+
}
|
|
89224
|
+
const svgData = new DataView(this._dataSet, { name: `pictogram_${this.id}_data` });
|
|
89225
|
+
registerDataSetInstanceTransform(this._dataSet, 'pictogram', pictogram);
|
|
89226
|
+
registerDataSetInstanceTransform(this._dataSet, 'lookup', lookup);
|
|
89227
|
+
svgData
|
|
89228
|
+
.parse([parsedSvg], {
|
|
89229
|
+
type: 'dataview'
|
|
89230
|
+
})
|
|
89231
|
+
.transform({ type: 'pictogram' })
|
|
89232
|
+
.transform({
|
|
89233
|
+
type: 'lookup',
|
|
89234
|
+
options: {
|
|
89235
|
+
from: () => this.getViewData().latestData,
|
|
89236
|
+
key: 'name',
|
|
89237
|
+
fields: this._nameField,
|
|
89238
|
+
set: (a, b) => {
|
|
89239
|
+
if (b) {
|
|
89240
|
+
a.data = b;
|
|
88864
89241
|
}
|
|
88865
89242
|
}
|
|
88866
|
-
}
|
|
89243
|
+
}
|
|
89244
|
+
})
|
|
89245
|
+
.transform({
|
|
89246
|
+
type: 'lookup',
|
|
89247
|
+
options: {
|
|
89248
|
+
from: () => this.getViewData().latestData,
|
|
89249
|
+
key: '_nameFromParent',
|
|
89250
|
+
fields: this._nameField,
|
|
89251
|
+
set: (a, b) => {
|
|
89252
|
+
if (b) {
|
|
89253
|
+
a.data = b;
|
|
89254
|
+
}
|
|
89255
|
+
}
|
|
89256
|
+
}
|
|
88867
89257
|
});
|
|
89258
|
+
(_b = this._data) === null || _b === void 0 ? void 0 : _b.getDataView().target.addListener('change', svgData.reRunAllTransform);
|
|
89259
|
+
this._mapViewData = new SeriesData(this._option, svgData);
|
|
88868
89260
|
}
|
|
88869
|
-
|
|
88870
|
-
|
|
88871
|
-
class RadarChart extends BaseChart {
|
|
88872
|
-
constructor() {
|
|
88873
|
-
super(...arguments);
|
|
88874
|
-
this.transformerConstructor = RadarChartSpecTransformer;
|
|
88875
|
-
this.type = "radar";
|
|
88876
|
-
this.seriesType = exports.SeriesTypeEnum.radar;
|
|
89261
|
+
mapViewDataUpdate() {
|
|
89262
|
+
this._mapViewData.updateData();
|
|
88877
89263
|
}
|
|
88878
|
-
|
|
88879
|
-
|
|
88880
|
-
|
|
88881
|
-
|
|
88882
|
-
mixin(RadarChart, StackChartMixin);
|
|
88883
|
-
const registerRadarChart = () => {
|
|
88884
|
-
registerRadarSeries();
|
|
88885
|
-
Factory$1.registerChart(RadarChart.type, RadarChart);
|
|
88886
|
-
};
|
|
88887
|
-
|
|
88888
|
-
class CommonChartSpecTransformer extends BaseChartSpecTransformer {
|
|
88889
|
-
_getDefaultSeriesSpec(spec) {
|
|
88890
|
-
const defaultSpec = super._getDefaultSeriesSpec(spec);
|
|
88891
|
-
delete defaultSpec.data;
|
|
88892
|
-
return defaultSpec;
|
|
89264
|
+
onLayoutEnd(ctx) {
|
|
89265
|
+
var _a;
|
|
89266
|
+
super.onLayoutEnd(ctx);
|
|
89267
|
+
(_a = this._mapViewData) === null || _a === void 0 ? void 0 : _a.getDataView().reRunAllTransform();
|
|
88893
89268
|
}
|
|
88894
|
-
|
|
88895
|
-
|
|
89269
|
+
updateSVGSize() {
|
|
89270
|
+
const { width: regionWidth, height: regionHeight } = this.getLayoutRect();
|
|
89271
|
+
const regionCenterX = regionWidth / 2;
|
|
89272
|
+
const regionCenterY = regionHeight / 2;
|
|
89273
|
+
const root = this.getPictogramRootGraphic();
|
|
89274
|
+
if (root) {
|
|
89275
|
+
const bounds = root.AABBBounds;
|
|
89276
|
+
const { x1, x2, y1, y2 } = root.AABBBounds;
|
|
89277
|
+
const width = bounds.width();
|
|
89278
|
+
const height = bounds.height();
|
|
89279
|
+
const rootCenterX = (x1 + x2) / 2;
|
|
89280
|
+
const rootCenterY = (y1 + y2) / 2;
|
|
89281
|
+
const scaleX = regionWidth / width;
|
|
89282
|
+
const scaleY = regionHeight / height;
|
|
89283
|
+
const scale = Math.min(scaleX, scaleY);
|
|
89284
|
+
root.scale(scale, scale, { x: rootCenterX, y: rootCenterY });
|
|
89285
|
+
root.translate(regionCenterX - rootCenterX, regionCenterY - rootCenterY);
|
|
89286
|
+
}
|
|
89287
|
+
}
|
|
89288
|
+
initEvent() {
|
|
89289
|
+
var _a;
|
|
89290
|
+
super.initEvent();
|
|
89291
|
+
(_a = this._mapViewData.getDataView()) === null || _a === void 0 ? void 0 : _a.target.addListener('change', this.mapViewDataUpdate.bind(this));
|
|
89292
|
+
this.event.on(HOOK_EVENT.AFTER_MARK_LAYOUT_END, this.updateSVGSize.bind(this));
|
|
89293
|
+
}
|
|
89294
|
+
handleZoom(e) {
|
|
89295
|
+
const { scale, scaleCenter } = e;
|
|
89296
|
+
if (scale === 1) {
|
|
88896
89297
|
return;
|
|
88897
89298
|
}
|
|
88898
|
-
|
|
88899
|
-
|
|
88900
|
-
|
|
88901
|
-
|
|
88902
|
-
|
|
88903
|
-
|
|
88904
|
-
|
|
88905
|
-
|
|
88906
|
-
|
|
88907
|
-
|
|
88908
|
-
|
|
88909
|
-
|
|
89299
|
+
const root = this.getPictogramRootGraphic();
|
|
89300
|
+
if (root) {
|
|
89301
|
+
if (!root.attribute.postMatrix) {
|
|
89302
|
+
root.setAttributes({
|
|
89303
|
+
postMatrix: new Matrix()
|
|
89304
|
+
});
|
|
89305
|
+
}
|
|
89306
|
+
root.scale(scale, scale, scaleCenter);
|
|
89307
|
+
}
|
|
89308
|
+
}
|
|
89309
|
+
handlePan(e) {
|
|
89310
|
+
const { delta } = e;
|
|
89311
|
+
if (delta[0] === 0 && delta[1] === 0) {
|
|
89312
|
+
return;
|
|
89313
|
+
}
|
|
89314
|
+
const root = this.getPictogramRootGraphic();
|
|
89315
|
+
if (root) {
|
|
89316
|
+
if (!root.attribute.postMatrix) {
|
|
89317
|
+
root.setAttributes({
|
|
89318
|
+
postMatrix: new Matrix()
|
|
89319
|
+
});
|
|
89320
|
+
}
|
|
89321
|
+
root.translate(delta[0], delta[1]);
|
|
88910
89322
|
}
|
|
88911
89323
|
}
|
|
89324
|
+
getMarkData(datum) {
|
|
89325
|
+
var _a;
|
|
89326
|
+
return (_a = datum.data) !== null && _a !== void 0 ? _a : {};
|
|
89327
|
+
}
|
|
89328
|
+
getMeasureField() {
|
|
89329
|
+
return [this.valueField];
|
|
89330
|
+
}
|
|
89331
|
+
getDimensionField() {
|
|
89332
|
+
return [this.nameField];
|
|
89333
|
+
}
|
|
89334
|
+
_getSeriesInfo(field, keys) {
|
|
89335
|
+
const defaultShapeType = this.getDefaultShapeType();
|
|
89336
|
+
return keys.map(key => {
|
|
89337
|
+
return {
|
|
89338
|
+
key,
|
|
89339
|
+
originalKey: key,
|
|
89340
|
+
style: this.getSeriesStyle({
|
|
89341
|
+
data: {
|
|
89342
|
+
[field]: key
|
|
89343
|
+
}
|
|
89344
|
+
}),
|
|
89345
|
+
shapeType: defaultShapeType
|
|
89346
|
+
};
|
|
89347
|
+
});
|
|
89348
|
+
}
|
|
89349
|
+
}
|
|
89350
|
+
PictogramSeries.type = exports.SeriesTypeEnum.pictogram;
|
|
89351
|
+
PictogramSeries.mark = PictogramSeriesMark;
|
|
89352
|
+
PictogramSeries.transformerConstructor = PictogramSeriesSpecTransformer;
|
|
89353
|
+
const registerPictogramSeries = () => {
|
|
89354
|
+
Factory$1.registerSeries(PictogramSeries.type, PictogramSeries);
|
|
89355
|
+
Factory$1.registerImplement('registerSVG', registerSVGSource);
|
|
89356
|
+
Factory$1.registerImplement('unregisterSVG', unregisterSVGSource);
|
|
89357
|
+
registerElementHighlightByGraphicName();
|
|
89358
|
+
registerElementSelectByGraphicName();
|
|
89359
|
+
};
|
|
89360
|
+
|
|
89361
|
+
class MapChartSpecTransformer extends BaseChartSpecTransformer {
|
|
89362
|
+
_isValidSeries(type) {
|
|
89363
|
+
return type === exports.SeriesTypeEnum.map;
|
|
89364
|
+
}
|
|
89365
|
+
_getDefaultSeriesSpec(spec) {
|
|
89366
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { type: spec.type, nameField: spec.nameField, valueField: spec.valueField, seriesField: spec.seriesField, map: spec.map, nameProperty: spec.nameProperty, centroidProperty: spec.centroidProperty, nameMap: spec.nameMap, area: spec.area, defaultFillColor: spec.defaultFillColor, showDefaultName: spec.showDefaultName });
|
|
89367
|
+
return series;
|
|
89368
|
+
}
|
|
88912
89369
|
transformSpec(spec) {
|
|
88913
89370
|
super.transformSpec(spec);
|
|
88914
|
-
|
|
88915
|
-
|
|
89371
|
+
spec.region.forEach((r) => {
|
|
89372
|
+
r.coordinate = 'geo';
|
|
89373
|
+
});
|
|
89374
|
+
const defaultSeriesSpec = this._getDefaultSeriesSpec(spec);
|
|
89375
|
+
if (!spec.series || spec.series.length === 0) {
|
|
89376
|
+
spec.series = [defaultSeriesSpec];
|
|
89377
|
+
}
|
|
89378
|
+
else {
|
|
88916
89379
|
spec.series.forEach((s) => {
|
|
88917
89380
|
if (!this._isValidSeries(s.type)) {
|
|
88918
89381
|
return;
|
|
@@ -88924,71 +89387,418 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88924
89387
|
});
|
|
88925
89388
|
});
|
|
88926
89389
|
}
|
|
88927
|
-
if (spec.axes && spec.axes.length) {
|
|
88928
|
-
spec.axes.forEach((axis) => {
|
|
88929
|
-
if (get$1(axis, 'trimPadding')) {
|
|
88930
|
-
mergeSpec(axis, getTrimPaddingConfig(this.type, spec));
|
|
88931
|
-
}
|
|
88932
|
-
});
|
|
88933
|
-
}
|
|
88934
|
-
this._transformAxisSpec(spec);
|
|
88935
89390
|
}
|
|
88936
89391
|
}
|
|
88937
89392
|
|
|
88938
|
-
class
|
|
89393
|
+
class MapChart extends BaseChart {
|
|
88939
89394
|
constructor() {
|
|
88940
89395
|
super(...arguments);
|
|
88941
|
-
this.transformerConstructor =
|
|
88942
|
-
this.type = "
|
|
89396
|
+
this.transformerConstructor = MapChartSpecTransformer;
|
|
89397
|
+
this.type = "map";
|
|
89398
|
+
this.seriesType = exports.SeriesTypeEnum.map;
|
|
88943
89399
|
}
|
|
88944
89400
|
}
|
|
88945
|
-
|
|
88946
|
-
|
|
88947
|
-
|
|
88948
|
-
const
|
|
88949
|
-
|
|
89401
|
+
MapChart.type = "map";
|
|
89402
|
+
MapChart.seriesType = exports.SeriesTypeEnum.map;
|
|
89403
|
+
MapChart.transformerConstructor = MapChartSpecTransformer;
|
|
89404
|
+
const registerMapChart = () => {
|
|
89405
|
+
registerMapSeries();
|
|
89406
|
+
Factory$1.registerChart(MapChart.type, MapChart);
|
|
88950
89407
|
};
|
|
88951
89408
|
|
|
88952
|
-
|
|
88953
|
-
|
|
88954
|
-
|
|
88955
|
-
|
|
88956
|
-
|
|
88957
|
-
|
|
88958
|
-
|
|
88959
|
-
|
|
88960
|
-
|
|
88961
|
-
|
|
88962
|
-
|
|
88963
|
-
|
|
88964
|
-
const dataTemp = array(spec.data).find((_d, index) => {
|
|
88965
|
-
if (seriesSpec.dataId) {
|
|
88966
|
-
if (_d instanceof DataView) {
|
|
88967
|
-
return _d.name === seriesSpec.dataId;
|
|
89409
|
+
class PolarChartSpecTransformer extends BaseChartSpecTransformer {
|
|
89410
|
+
_isValidSeries(type) {
|
|
89411
|
+
return this.seriesType ? type === this.seriesType : true;
|
|
89412
|
+
}
|
|
89413
|
+
getIndicatorSpec(spec) {
|
|
89414
|
+
var _a, _b, _c;
|
|
89415
|
+
const indicatorSpec = array(spec.indicator);
|
|
89416
|
+
const limitRatio = (_a = spec.innerRadius) !== null && _a !== void 0 ? _a : (_c = (_b = spec.series) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.innerRadius;
|
|
89417
|
+
if (isValid$1(limitRatio)) {
|
|
89418
|
+
indicatorSpec.forEach(indicator => {
|
|
89419
|
+
if (isNil$1(indicator.limitRatio)) {
|
|
89420
|
+
indicator.limitRatio = limitRatio;
|
|
88968
89421
|
}
|
|
88969
|
-
|
|
88970
|
-
}
|
|
88971
|
-
return seriesSpec.dataIndex === index;
|
|
88972
|
-
});
|
|
88973
|
-
if (!dataTemp) {
|
|
88974
|
-
return 0;
|
|
89422
|
+
});
|
|
88975
89423
|
}
|
|
88976
|
-
|
|
88977
|
-
|
|
89424
|
+
return indicatorSpec;
|
|
89425
|
+
}
|
|
89426
|
+
_getDefaultSeriesSpec(spec) {
|
|
89427
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { radius: spec.radius, outerRadius: spec.outerRadius, innerRadius: spec.innerRadius, startAngle: spec.startAngle, endAngle: spec.endAngle, sortDataByAxis: spec.sortDataByAxis });
|
|
89428
|
+
const seriesType = this.seriesType;
|
|
89429
|
+
if (seriesType) {
|
|
89430
|
+
series.type = seriesType;
|
|
89431
|
+
series[seriesType] = spec[seriesType];
|
|
88978
89432
|
}
|
|
88979
|
-
return
|
|
89433
|
+
return series;
|
|
88980
89434
|
}
|
|
88981
|
-
|
|
88982
|
-
|
|
88983
|
-
|
|
89435
|
+
transformSpec(spec) {
|
|
89436
|
+
super.transformSpec(spec);
|
|
89437
|
+
if (isArray$1(spec.dataZoom) && spec.dataZoom.length > 0) {
|
|
89438
|
+
spec.dataZoom.forEach((zoom) => {
|
|
89439
|
+
if (zoom.filterMode === 'axis') {
|
|
89440
|
+
zoom.filterMode = 'filter';
|
|
89441
|
+
}
|
|
89442
|
+
});
|
|
88984
89443
|
}
|
|
88985
|
-
|
|
88986
|
-
|
|
89444
|
+
this.transformSeriesSpec(spec);
|
|
89445
|
+
if (isValid$1(spec.indicator)) {
|
|
89446
|
+
spec.indicator = this.getIndicatorSpec(spec);
|
|
88987
89447
|
}
|
|
88988
|
-
return componentSpec;
|
|
88989
89448
|
}
|
|
88990
|
-
|
|
88991
|
-
|
|
89449
|
+
}
|
|
89450
|
+
|
|
89451
|
+
class ProgressLikeChartSpecTransformer extends PolarChartSpecTransformer {
|
|
89452
|
+
needAxes() {
|
|
89453
|
+
return false;
|
|
89454
|
+
}
|
|
89455
|
+
_getDefaultSeriesSpec(spec) {
|
|
89456
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { seriesField: spec.seriesField, categoryField: spec.categoryField || spec.radiusField, valueField: spec.valueField || spec.angleField, startAngle: spec.startAngle, endAngle: spec.endAngle, radius: spec.radius, innerRadius: spec.innerRadius, centerX: spec.centerX, centerY: spec.centerY });
|
|
89457
|
+
return series;
|
|
89458
|
+
}
|
|
89459
|
+
_transformProgressAxisSpec(spec, angleAxisDefaultSpec, radiusAxisDefaultSpec, angleAxisAppendSpec, radiusAxisAppendSpec) {
|
|
89460
|
+
var _a, _b;
|
|
89461
|
+
if (!spec.axes) {
|
|
89462
|
+
spec.axes = [];
|
|
89463
|
+
}
|
|
89464
|
+
let radiusAxis = ((_a = spec.axes) !== null && _a !== void 0 ? _a : []).find((axis) => axis.orient === 'radius');
|
|
89465
|
+
let angleAxis = ((_b = spec.axes) !== null && _b !== void 0 ? _b : []).find((axis) => axis.orient === 'angle');
|
|
89466
|
+
if (!angleAxis) {
|
|
89467
|
+
angleAxis = angleAxisDefaultSpec;
|
|
89468
|
+
spec.axes.push(angleAxis);
|
|
89469
|
+
}
|
|
89470
|
+
if (!radiusAxis) {
|
|
89471
|
+
radiusAxis = radiusAxisDefaultSpec;
|
|
89472
|
+
spec.axes.push(radiusAxis);
|
|
89473
|
+
}
|
|
89474
|
+
if (isNil$1(angleAxis.type)) {
|
|
89475
|
+
angleAxis.type = 'linear';
|
|
89476
|
+
}
|
|
89477
|
+
if (isNil$1(radiusAxis.type)) {
|
|
89478
|
+
radiusAxis.type = 'band';
|
|
89479
|
+
}
|
|
89480
|
+
const domain = getLinearAxisSpecDomain(angleAxis, { min: 0, max: 1 });
|
|
89481
|
+
if (isNil$1(angleAxis.min)) {
|
|
89482
|
+
angleAxis.min = domain.min;
|
|
89483
|
+
}
|
|
89484
|
+
if (isNil$1(angleAxis.max)) {
|
|
89485
|
+
angleAxis.max = domain.max;
|
|
89486
|
+
}
|
|
89487
|
+
if (angleAxisAppendSpec) {
|
|
89488
|
+
Object.assign(angleAxis, mergeSpec({}, angleAxisAppendSpec, angleAxis));
|
|
89489
|
+
}
|
|
89490
|
+
if (radiusAxisAppendSpec) {
|
|
89491
|
+
Object.assign(radiusAxis, mergeSpec({}, radiusAxisAppendSpec, radiusAxis));
|
|
89492
|
+
}
|
|
89493
|
+
}
|
|
89494
|
+
}
|
|
89495
|
+
|
|
89496
|
+
class RoseLikeChartSpecTransformer extends PolarChartSpecTransformer {
|
|
89497
|
+
needAxes() {
|
|
89498
|
+
return true;
|
|
89499
|
+
}
|
|
89500
|
+
_getDefaultSeriesSpec(spec) {
|
|
89501
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField || spec.angleField, valueField: spec.valueField || spec.radiusField });
|
|
89502
|
+
return series;
|
|
89503
|
+
}
|
|
89504
|
+
transformSpec(spec) {
|
|
89505
|
+
var _a;
|
|
89506
|
+
super.transformSpec(spec);
|
|
89507
|
+
if (this.needAxes()) {
|
|
89508
|
+
if (!spec.axes) {
|
|
89509
|
+
spec.axes = [];
|
|
89510
|
+
}
|
|
89511
|
+
const haxAxes = { radius: false, angle: false };
|
|
89512
|
+
((_a = spec.axes) !== null && _a !== void 0 ? _a : []).forEach((axis) => {
|
|
89513
|
+
const { orient } = axis;
|
|
89514
|
+
if (orient === 'radius') {
|
|
89515
|
+
haxAxes.radius = true;
|
|
89516
|
+
}
|
|
89517
|
+
if (orient === 'angle') {
|
|
89518
|
+
haxAxes.angle = true;
|
|
89519
|
+
}
|
|
89520
|
+
});
|
|
89521
|
+
if (!haxAxes.angle) {
|
|
89522
|
+
spec.axes.push({
|
|
89523
|
+
orient: 'angle'
|
|
89524
|
+
});
|
|
89525
|
+
}
|
|
89526
|
+
if (!haxAxes.radius) {
|
|
89527
|
+
spec.axes.push({
|
|
89528
|
+
orient: 'radius'
|
|
89529
|
+
});
|
|
89530
|
+
}
|
|
89531
|
+
}
|
|
89532
|
+
}
|
|
89533
|
+
}
|
|
89534
|
+
|
|
89535
|
+
class BasePieChartSpecTransformer extends PolarChartSpecTransformer {
|
|
89536
|
+
needAxes() {
|
|
89537
|
+
return false;
|
|
89538
|
+
}
|
|
89539
|
+
_getDefaultSeriesSpec(spec) {
|
|
89540
|
+
var _a;
|
|
89541
|
+
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField || spec.seriesField, valueField: spec.valueField || spec.angleField, center: spec.center, centerOffset: spec.centerOffset, cornerRadius: spec.cornerRadius, padAngle: spec.padAngle, minAngle: spec.minAngle, emptyPlaceholder: spec.emptyPlaceholder, emptyCircle: (_a = spec.emptyPlaceholder) === null || _a === void 0 ? void 0 : _a.emptyCircle, showAllZero: spec.showAllZero, supportNegative: spec.supportNegative, layoutRadius: spec.layoutRadius });
|
|
89542
|
+
}
|
|
89543
|
+
}
|
|
89544
|
+
|
|
89545
|
+
class BasePieChart extends BaseChart {
|
|
89546
|
+
constructor() {
|
|
89547
|
+
super(...arguments);
|
|
89548
|
+
this.transformerConstructor = BasePieChartSpecTransformer;
|
|
89549
|
+
}
|
|
89550
|
+
}
|
|
89551
|
+
BasePieChart.transformerConstructor = BasePieChartSpecTransformer;
|
|
89552
|
+
|
|
89553
|
+
class PieChart extends BasePieChart {
|
|
89554
|
+
constructor() {
|
|
89555
|
+
super(...arguments);
|
|
89556
|
+
this.transformerConstructor = BasePieChartSpecTransformer;
|
|
89557
|
+
this.type = "pie";
|
|
89558
|
+
this.seriesType = exports.SeriesTypeEnum.pie;
|
|
89559
|
+
}
|
|
89560
|
+
}
|
|
89561
|
+
PieChart.type = "pie";
|
|
89562
|
+
PieChart.seriesType = exports.SeriesTypeEnum.pie;
|
|
89563
|
+
PieChart.transformerConstructor = BasePieChartSpecTransformer;
|
|
89564
|
+
const registerPieChart = () => {
|
|
89565
|
+
registerPieSeries();
|
|
89566
|
+
Factory$1.registerChart(PieChart.type, PieChart);
|
|
89567
|
+
};
|
|
89568
|
+
|
|
89569
|
+
class Pie3dChartSpecTransformer extends BasePieChartSpecTransformer {
|
|
89570
|
+
transformSpec(spec) {
|
|
89571
|
+
super.transformSpec(spec);
|
|
89572
|
+
spec.series.forEach((s) => {
|
|
89573
|
+
if (s.type === 'pie3d') {
|
|
89574
|
+
s.angle3d = spec.angle3d;
|
|
89575
|
+
}
|
|
89576
|
+
});
|
|
89577
|
+
}
|
|
89578
|
+
}
|
|
89579
|
+
class Pie3dChart extends BasePieChart {
|
|
89580
|
+
constructor() {
|
|
89581
|
+
super(...arguments);
|
|
89582
|
+
this.transformerConstructor = Pie3dChartSpecTransformer;
|
|
89583
|
+
this.type = "pie3d";
|
|
89584
|
+
this.seriesType = exports.SeriesTypeEnum.pie3d;
|
|
89585
|
+
}
|
|
89586
|
+
}
|
|
89587
|
+
Pie3dChart.type = "pie3d";
|
|
89588
|
+
Pie3dChart.seriesType = exports.SeriesTypeEnum.pie3d;
|
|
89589
|
+
Pie3dChart.transformerConstructor = Pie3dChartSpecTransformer;
|
|
89590
|
+
const registerPie3dChart = () => {
|
|
89591
|
+
register3DPlugin();
|
|
89592
|
+
registerPie3dSeries();
|
|
89593
|
+
Factory$1.registerChart(Pie3dChart.type, Pie3dChart);
|
|
89594
|
+
};
|
|
89595
|
+
|
|
89596
|
+
class RoseChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
89597
|
+
_getDefaultSeriesSpec(spec) {
|
|
89598
|
+
var _a, _b, _c;
|
|
89599
|
+
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { radius: (_a = spec.radius) !== null && _a !== void 0 ? _a : POLAR_DEFAULT_RADIUS, outerRadius: (_b = spec.outerRadius) !== null && _b !== void 0 ? _b : POLAR_DEFAULT_RADIUS, innerRadius: (_c = spec.innerRadius) !== null && _c !== void 0 ? _c : 0, seriesField: spec.seriesField, stack: spec.stack, percent: spec.percent });
|
|
89600
|
+
}
|
|
89601
|
+
transformSpec(spec) {
|
|
89602
|
+
var _a;
|
|
89603
|
+
super.transformSpec(spec);
|
|
89604
|
+
((_a = spec.axes) !== null && _a !== void 0 ? _a : []).forEach((axis) => {
|
|
89605
|
+
['domainLine', 'grid', 'label', 'tick'].forEach(configName => {
|
|
89606
|
+
if (!axis[configName]) {
|
|
89607
|
+
axis[configName] = { visible: false };
|
|
89608
|
+
}
|
|
89609
|
+
});
|
|
89610
|
+
if (axis.orient === 'angle' && isNil$1(axis.bandPosition)) {
|
|
89611
|
+
axis.bandPosition = 0.5;
|
|
89612
|
+
}
|
|
89613
|
+
});
|
|
89614
|
+
spec.crosshair = array(spec.crosshair || {}).map(crosshairCfg => {
|
|
89615
|
+
return mergeSpec({
|
|
89616
|
+
categoryField: {
|
|
89617
|
+
visible: true,
|
|
89618
|
+
line: {
|
|
89619
|
+
visible: true,
|
|
89620
|
+
type: 'rect'
|
|
89621
|
+
}
|
|
89622
|
+
}
|
|
89623
|
+
}, crosshairCfg);
|
|
89624
|
+
});
|
|
89625
|
+
}
|
|
89626
|
+
}
|
|
89627
|
+
|
|
89628
|
+
class RoseChart extends BaseChart {
|
|
89629
|
+
constructor() {
|
|
89630
|
+
super(...arguments);
|
|
89631
|
+
this.transformerConstructor = RoseChartSpecTransformer;
|
|
89632
|
+
this.type = "rose";
|
|
89633
|
+
this.seriesType = exports.SeriesTypeEnum.rose;
|
|
89634
|
+
}
|
|
89635
|
+
}
|
|
89636
|
+
RoseChart.type = "rose";
|
|
89637
|
+
RoseChart.seriesType = exports.SeriesTypeEnum.rose;
|
|
89638
|
+
RoseChart.transformerConstructor = RoseChartSpecTransformer;
|
|
89639
|
+
mixin(RoseChart, StackChartMixin);
|
|
89640
|
+
const registerRoseChart = () => {
|
|
89641
|
+
registerRoseSeries();
|
|
89642
|
+
Factory$1.registerChart(RoseChart.type, RoseChart);
|
|
89643
|
+
};
|
|
89644
|
+
|
|
89645
|
+
class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
89646
|
+
_getDefaultSeriesSpec(spec) {
|
|
89647
|
+
var _a;
|
|
89648
|
+
return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { seriesField: spec.seriesField, line: spec.line, point: spec.point, stack: spec.stack, percent: spec.percent, area: mergeSpec({
|
|
89649
|
+
visible: false
|
|
89650
|
+
}, spec.area), seriesMark: (_a = spec.seriesMark) !== null && _a !== void 0 ? _a : 'area', activePoint: spec.activePoint, pointDis: spec.pointDis, pointDisMul: spec.pointDisMul, markOverlap: spec.markOverlap });
|
|
89651
|
+
}
|
|
89652
|
+
transformSpec(spec) {
|
|
89653
|
+
var _a;
|
|
89654
|
+
super.transformSpec(spec);
|
|
89655
|
+
((_a = spec.axes) !== null && _a !== void 0 ? _a : []).forEach((axis) => {
|
|
89656
|
+
if (axis.orient === 'radius') {
|
|
89657
|
+
['domainLine', 'label', 'tick'].forEach(configName => {
|
|
89658
|
+
if (!axis[configName]) {
|
|
89659
|
+
axis[configName] = { visible: false };
|
|
89660
|
+
}
|
|
89661
|
+
});
|
|
89662
|
+
if (!axis.grid) {
|
|
89663
|
+
axis.grid = { visible: true };
|
|
89664
|
+
}
|
|
89665
|
+
}
|
|
89666
|
+
});
|
|
89667
|
+
spec.crosshair = array(spec.crosshair || {}).map(crosshairCfg => {
|
|
89668
|
+
return mergeSpec({
|
|
89669
|
+
categoryField: {
|
|
89670
|
+
visible: true,
|
|
89671
|
+
line: {
|
|
89672
|
+
visible: true,
|
|
89673
|
+
type: 'line'
|
|
89674
|
+
}
|
|
89675
|
+
}
|
|
89676
|
+
}, crosshairCfg);
|
|
89677
|
+
});
|
|
89678
|
+
}
|
|
89679
|
+
}
|
|
89680
|
+
|
|
89681
|
+
class RadarChart extends BaseChart {
|
|
89682
|
+
constructor() {
|
|
89683
|
+
super(...arguments);
|
|
89684
|
+
this.transformerConstructor = RadarChartSpecTransformer;
|
|
89685
|
+
this.type = "radar";
|
|
89686
|
+
this.seriesType = exports.SeriesTypeEnum.radar;
|
|
89687
|
+
}
|
|
89688
|
+
}
|
|
89689
|
+
RadarChart.type = "radar";
|
|
89690
|
+
RadarChart.seriesType = exports.SeriesTypeEnum.radar;
|
|
89691
|
+
RadarChart.transformerConstructor = RadarChartSpecTransformer;
|
|
89692
|
+
mixin(RadarChart, StackChartMixin);
|
|
89693
|
+
const registerRadarChart = () => {
|
|
89694
|
+
registerRadarSeries();
|
|
89695
|
+
Factory$1.registerChart(RadarChart.type, RadarChart);
|
|
89696
|
+
};
|
|
89697
|
+
|
|
89698
|
+
class CommonChartSpecTransformer extends BaseChartSpecTransformer {
|
|
89699
|
+
_getDefaultSeriesSpec(spec) {
|
|
89700
|
+
const defaultSpec = super._getDefaultSeriesSpec(spec);
|
|
89701
|
+
delete defaultSpec.data;
|
|
89702
|
+
return defaultSpec;
|
|
89703
|
+
}
|
|
89704
|
+
_transformAxisSpec(spec) {
|
|
89705
|
+
if (!spec.axes) {
|
|
89706
|
+
return;
|
|
89707
|
+
}
|
|
89708
|
+
if (!!spec.autoBandSize) {
|
|
89709
|
+
spec.series.forEach((series, seriesIndex) => {
|
|
89710
|
+
var _a;
|
|
89711
|
+
if (series.type === 'bar') {
|
|
89712
|
+
const relatedAxis = this._findBandAxisBySeries(series, seriesIndex, spec.axes);
|
|
89713
|
+
if (relatedAxis && !relatedAxis.bandSize && !relatedAxis.maxBandSize && !relatedAxis.minBandSize) {
|
|
89714
|
+
const extend = isObject$2(series.autoBandSize) ? (_a = series.autoBandSize.extend) !== null && _a !== void 0 ? _a : 0 : 0;
|
|
89715
|
+
const { barMaxWidth, barMinWidth, barWidth, barGapInGroup } = series;
|
|
89716
|
+
this._applyAxisBandSize(relatedAxis, extend, { barMaxWidth, barMinWidth, barWidth, barGapInGroup });
|
|
89717
|
+
}
|
|
89718
|
+
}
|
|
89719
|
+
});
|
|
89720
|
+
}
|
|
89721
|
+
}
|
|
89722
|
+
transformSpec(spec) {
|
|
89723
|
+
super.transformSpec(spec);
|
|
89724
|
+
if (spec.series && spec.series.length) {
|
|
89725
|
+
const defaultSeriesSpec = this._getDefaultSeriesSpec(spec);
|
|
89726
|
+
spec.series.forEach((s) => {
|
|
89727
|
+
if (!this._isValidSeries(s.type)) {
|
|
89728
|
+
return;
|
|
89729
|
+
}
|
|
89730
|
+
Object.keys(defaultSeriesSpec).forEach(k => {
|
|
89731
|
+
if (!(k in s)) {
|
|
89732
|
+
s[k] = defaultSeriesSpec[k];
|
|
89733
|
+
}
|
|
89734
|
+
});
|
|
89735
|
+
});
|
|
89736
|
+
}
|
|
89737
|
+
if (spec.axes && spec.axes.length) {
|
|
89738
|
+
spec.axes.forEach((axis) => {
|
|
89739
|
+
if (get$1(axis, 'trimPadding')) {
|
|
89740
|
+
mergeSpec(axis, getTrimPaddingConfig(this.type, spec));
|
|
89741
|
+
}
|
|
89742
|
+
});
|
|
89743
|
+
}
|
|
89744
|
+
this._transformAxisSpec(spec);
|
|
89745
|
+
}
|
|
89746
|
+
}
|
|
89747
|
+
|
|
89748
|
+
class CommonChart extends BaseChart {
|
|
89749
|
+
constructor() {
|
|
89750
|
+
super(...arguments);
|
|
89751
|
+
this.transformerConstructor = CommonChartSpecTransformer;
|
|
89752
|
+
this.type = "common";
|
|
89753
|
+
}
|
|
89754
|
+
}
|
|
89755
|
+
CommonChart.type = "common";
|
|
89756
|
+
CommonChart.transformerConstructor = CommonChartSpecTransformer;
|
|
89757
|
+
mixin(CommonChart, StackChartMixin);
|
|
89758
|
+
const registerCommonChart = () => {
|
|
89759
|
+
Factory$1.registerChart(CommonChart.type, CommonChart);
|
|
89760
|
+
};
|
|
89761
|
+
|
|
89762
|
+
const SCROLL_BAR_DEFAULT_SIZE = 12;
|
|
89763
|
+
|
|
89764
|
+
class SequenceChartSpecTransformer extends BaseChartSpecTransformer {
|
|
89765
|
+
_getSeriesDataLength(spec, seriesSpec) {
|
|
89766
|
+
var _a, _b;
|
|
89767
|
+
if (seriesSpec.data) {
|
|
89768
|
+
const _d = array(seriesSpec.data)[0];
|
|
89769
|
+
if (_d instanceof DataView) {
|
|
89770
|
+
return (_a = _d.latestData) === null || _a === void 0 ? void 0 : _a.length;
|
|
89771
|
+
}
|
|
89772
|
+
return (_b = _d.values) === null || _b === void 0 ? void 0 : _b.length;
|
|
89773
|
+
}
|
|
89774
|
+
const dataTemp = array(spec.data).find((_d, index) => {
|
|
89775
|
+
if (seriesSpec.dataId) {
|
|
89776
|
+
if (_d instanceof DataView) {
|
|
89777
|
+
return _d.name === seriesSpec.dataId;
|
|
89778
|
+
}
|
|
89779
|
+
return _d.id === seriesSpec.dataId;
|
|
89780
|
+
}
|
|
89781
|
+
return seriesSpec.dataIndex === index;
|
|
89782
|
+
});
|
|
89783
|
+
if (!dataTemp) {
|
|
89784
|
+
return 0;
|
|
89785
|
+
}
|
|
89786
|
+
if (dataTemp instanceof DataView) {
|
|
89787
|
+
return dataTemp.latestData.length;
|
|
89788
|
+
}
|
|
89789
|
+
return dataTemp.values.length;
|
|
89790
|
+
}
|
|
89791
|
+
addAttrToComponentSpec(componentSpec, attr, value) {
|
|
89792
|
+
if (Array.isArray(componentSpec)) {
|
|
89793
|
+
componentSpec[0][attr] = value;
|
|
89794
|
+
}
|
|
89795
|
+
else {
|
|
89796
|
+
componentSpec[attr] = value;
|
|
89797
|
+
}
|
|
89798
|
+
return componentSpec;
|
|
89799
|
+
}
|
|
89800
|
+
addPaddingRow(rowHeight, rowNum, size) {
|
|
89801
|
+
rowHeight.push({
|
|
88992
89802
|
index: rowNum,
|
|
88993
89803
|
size
|
|
88994
89804
|
});
|
|
@@ -100042,28 +100852,30 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100042
100852
|
};
|
|
100043
100853
|
let relativePosOffset = { x: 0, y: 0 };
|
|
100044
100854
|
let tooltipParentElementRect = { x: 0, y: 0 };
|
|
100855
|
+
let chartElementRect;
|
|
100045
100856
|
let chartElementScale = 1;
|
|
100046
100857
|
let tooltipParentElementScale = 1;
|
|
100047
|
-
|
|
100858
|
+
const isBrowser = isTrueBrowser(this._env);
|
|
100859
|
+
if (isBrowser && !tooltipSpec.confine) {
|
|
100048
100860
|
containerSize.width = window.innerWidth;
|
|
100049
100861
|
containerSize.height = window.innerHeight;
|
|
100050
|
-
if (!isCanvas) {
|
|
100051
|
-
const tooltipParentElement = this._getParentElement(tooltipSpec);
|
|
100052
|
-
tooltipParentElementRect = (_h = (_g = tooltipParentElement === null || tooltipParentElement === void 0 ? void 0 : tooltipParentElement.getBoundingClientRect) === null || _g === void 0 ? void 0 : _g.call(tooltipParentElement)) !== null && _h !== void 0 ? _h : invalidPosition;
|
|
100053
|
-
const chartElement = ((_j = this._compiler.getCanvas()) !== null && _j !== void 0 ? _j : this._chartContainer);
|
|
100054
|
-
const chartElementRect = chartElement === null || chartElement === void 0 ? void 0 : chartElement.getBoundingClientRect();
|
|
100055
|
-
relativePosOffset = {
|
|
100056
|
-
x: chartElementRect.x - tooltipParentElementRect.x,
|
|
100057
|
-
y: chartElementRect.y - tooltipParentElementRect.y
|
|
100058
|
-
};
|
|
100059
|
-
chartElementScale = getScale(chartElement, chartElementRect);
|
|
100060
|
-
tooltipParentElementScale = getScale(tooltipParentElement, tooltipParentElementRect);
|
|
100061
|
-
}
|
|
100062
100862
|
}
|
|
100063
100863
|
else {
|
|
100064
100864
|
containerSize.width = canvasWidth;
|
|
100065
100865
|
containerSize.height = canvasHeight;
|
|
100066
100866
|
}
|
|
100867
|
+
if (isBrowser && !isCanvas) {
|
|
100868
|
+
const tooltipParentElement = this._getParentElement(tooltipSpec);
|
|
100869
|
+
tooltipParentElementRect = (_h = (_g = tooltipParentElement === null || tooltipParentElement === void 0 ? void 0 : tooltipParentElement.getBoundingClientRect) === null || _g === void 0 ? void 0 : _g.call(tooltipParentElement)) !== null && _h !== void 0 ? _h : invalidPosition;
|
|
100870
|
+
const chartElement = ((_j = this._compiler.getCanvas()) !== null && _j !== void 0 ? _j : this._chartContainer);
|
|
100871
|
+
chartElementRect = chartElement === null || chartElement === void 0 ? void 0 : chartElement.getBoundingClientRect();
|
|
100872
|
+
relativePosOffset = {
|
|
100873
|
+
x: chartElementRect.x - tooltipParentElementRect.x,
|
|
100874
|
+
y: chartElementRect.y - tooltipParentElementRect.y
|
|
100875
|
+
};
|
|
100876
|
+
chartElementScale = getScale(chartElement, chartElementRect);
|
|
100877
|
+
tooltipParentElementScale = getScale(tooltipParentElement, tooltipParentElementRect);
|
|
100878
|
+
}
|
|
100067
100879
|
const tooltipSizeScale = tooltipParentElementScale / chartElementScale;
|
|
100068
100880
|
const calcPos = {};
|
|
100069
100881
|
const pointerFixedPosition = { x: position, y: position };
|
|
@@ -100146,8 +100958,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100146
100958
|
processCartesianFixedPosition({ orient: position, mode: positionMode }, 'y');
|
|
100147
100959
|
}
|
|
100148
100960
|
const result = { x: null, y: null };
|
|
100149
|
-
const isBrowser = isTrueBrowser(this._env);
|
|
100150
100961
|
dims.forEach(dim => {
|
|
100962
|
+
var _a;
|
|
100151
100963
|
const boxSize = dim === 'x' ? tooltipBoxWidth : tooltipBoxHeight;
|
|
100152
100964
|
const canvasSize = dim === 'x' ? canvasWidth : canvasHeight;
|
|
100153
100965
|
const offset = dim === 'x' ? offsetX : offsetY;
|
|
@@ -100176,8 +100988,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100176
100988
|
}
|
|
100177
100989
|
result[dim] /= tooltipParentElementScale;
|
|
100178
100990
|
const containerDimSize = dim === 'x' ? containerSize.width : containerSize.height;
|
|
100179
|
-
const leftOrTop = -tooltipParentElementRect[dim] /
|
|
100180
|
-
|
|
100991
|
+
const leftOrTop = -(tooltipParentElementRect[dim] - ((_a = chartElementRect === null || chartElementRect === void 0 ? void 0 : chartElementRect[dim]) !== null && _a !== void 0 ? _a : 0) / chartElementScale) /
|
|
100992
|
+
tooltipParentElementScale;
|
|
100993
|
+
const rightOrBottom = containerDimSize / tooltipParentElementScale + leftOrTop - boxSize;
|
|
100181
100994
|
if (posType !== 2 && result[dim] < leftOrTop) {
|
|
100182
100995
|
if (isFixedPosition) {
|
|
100183
100996
|
result[dim] = leftOrTop;
|
|
@@ -100624,7 +101437,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100624
101437
|
columnDivs.forEach((colDiv, index) => {
|
|
100625
101438
|
const colName = colDiv.getAttribute('data-col');
|
|
100626
101439
|
if (colName && columns.includes(colName)) {
|
|
100627
|
-
|
|
101440
|
+
const hideColumn = colName === 'shape' && content.every(c => !c.hasShape || !c.shapeType);
|
|
101441
|
+
setStyleToDom(colDiv, Object.assign(Object.assign({}, this._domStyle[colName]), { display: hideColumn ? 'none' : 'inline-block', verticalAlign: 'top' }));
|
|
100628
101442
|
const rows = [...colDiv.children];
|
|
100629
101443
|
rows.slice(content.length).forEach(extraRow => {
|
|
100630
101444
|
extraRow.parentNode.removeChild(extraRow);
|
|
@@ -100636,7 +101450,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100636
101450
|
row.classList.add(`${TOOLTIP_PREFIX}-${colName}`);
|
|
100637
101451
|
colDiv.appendChild(row);
|
|
100638
101452
|
}
|
|
100639
|
-
let styleByRow = index === content.length - 1 ? {
|
|
101453
|
+
let styleByRow = index === content.length - 1 ? {} : Object.assign({}, rowStyle);
|
|
101454
|
+
styleByRow.display = entry.visible === false ? 'none' : 'block';
|
|
101455
|
+
styleByRow.height = 'initial';
|
|
100640
101456
|
if (colName === 'key') {
|
|
100641
101457
|
row.innerHTML = formatContent(entry.key);
|
|
100642
101458
|
if (entry.keyStyle) {
|
|
@@ -101397,107 +102213,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101397
102213
|
}
|
|
101398
102214
|
}
|
|
101399
102215
|
|
|
101400
|
-
class MosaicSeries extends BarSeries {
|
|
101401
|
-
constructor() {
|
|
101402
|
-
super(...arguments);
|
|
101403
|
-
this.type = exports.SeriesTypeEnum.mosaic;
|
|
101404
|
-
this.transformerConstructor = BarSeriesSpecTransformer;
|
|
101405
|
-
}
|
|
101406
|
-
getStack() {
|
|
101407
|
-
return true;
|
|
101408
|
-
}
|
|
101409
|
-
getPercent() {
|
|
101410
|
-
return !!this.getSeriesField();
|
|
101411
|
-
}
|
|
101412
|
-
getGroupFields() {
|
|
101413
|
-
return this.direction === 'vertical' ? this._specXField : this._specYField;
|
|
101414
|
-
}
|
|
101415
|
-
setAttrFromSpec() {
|
|
101416
|
-
super.setAttrFromSpec();
|
|
101417
|
-
const isPercent = this.getPercent();
|
|
101418
|
-
if (this.direction === "horizontal") {
|
|
101419
|
-
if (isPercent) {
|
|
101420
|
-
this.setFieldX(MOSAIC_VALUE_END_PERCENT);
|
|
101421
|
-
this.setFieldX2(MOSAIC_VALUE_START_PERCENT);
|
|
101422
|
-
}
|
|
101423
|
-
this.setFieldY(MOSAIC_CAT_END_PERCENT);
|
|
101424
|
-
this.setFieldY2(MOSAIC_CAT_START_PERCENT);
|
|
101425
|
-
}
|
|
101426
|
-
else {
|
|
101427
|
-
if (isPercent) {
|
|
101428
|
-
this.setFieldY(MOSAIC_VALUE_END_PERCENT);
|
|
101429
|
-
this.setFieldY2(MOSAIC_VALUE_START_PERCENT);
|
|
101430
|
-
}
|
|
101431
|
-
this.setFieldX(MOSAIC_CAT_END_PERCENT);
|
|
101432
|
-
this.setFieldX2(MOSAIC_CAT_START_PERCENT);
|
|
101433
|
-
}
|
|
101434
|
-
}
|
|
101435
|
-
parseLabelStyle(labelStyle, labelSpec) {
|
|
101436
|
-
if ((labelSpec === null || labelSpec === void 0 ? void 0 : labelSpec.filterByGroup) && isNil$1(labelStyle.dataFilter)) {
|
|
101437
|
-
const allGroupFields = this.getGroupFields();
|
|
101438
|
-
const { field, type: filterType = 'max', filter } = labelSpec.filterByGroup;
|
|
101439
|
-
delete labelStyle.filterField;
|
|
101440
|
-
const fieldIndex = allGroupFields.indexOf(field);
|
|
101441
|
-
if (fieldIndex < 0) {
|
|
101442
|
-
return;
|
|
101443
|
-
}
|
|
101444
|
-
const isCatField = !!(fieldIndex % 2);
|
|
101445
|
-
const valueField = isCatField
|
|
101446
|
-
? filterType === 'min'
|
|
101447
|
-
? this.direction === "horizontal"
|
|
101448
|
-
? this._fieldY2
|
|
101449
|
-
: this._fieldX2
|
|
101450
|
-
: this.direction === "horizontal"
|
|
101451
|
-
? this._fieldY
|
|
101452
|
-
: this._fieldX
|
|
101453
|
-
: filterType === 'min'
|
|
101454
|
-
? this.direction === "horizontal"
|
|
101455
|
-
? this._fieldX2
|
|
101456
|
-
: this._fieldY2
|
|
101457
|
-
: this.direction === "horizontal"
|
|
101458
|
-
? this._fieldX
|
|
101459
|
-
: this._fieldY;
|
|
101460
|
-
const filterFunc = filterType === 'min'
|
|
101461
|
-
? (a, b) => {
|
|
101462
|
-
var _a, _b;
|
|
101463
|
-
return ((_a = a.data) === null || _a === void 0 ? void 0 : _a[valueField]) < ((_b = b.data) === null || _b === void 0 ? void 0 : _b[valueField]);
|
|
101464
|
-
}
|
|
101465
|
-
: (a, b) => {
|
|
101466
|
-
var _a, _b;
|
|
101467
|
-
return ((_a = a.data) === null || _a === void 0 ? void 0 : _a[valueField]) > ((_b = b.data) === null || _b === void 0 ? void 0 : _b[valueField]);
|
|
101468
|
-
};
|
|
101469
|
-
labelStyle.dataFilter = (data) => {
|
|
101470
|
-
const filteredData = {};
|
|
101471
|
-
data.forEach((d) => {
|
|
101472
|
-
const datum = d.data;
|
|
101473
|
-
const fieldValue = datum === null || datum === void 0 ? void 0 : datum[field];
|
|
101474
|
-
if (isNil$1(fieldValue) || (filter && !filter(d))) {
|
|
101475
|
-
return;
|
|
101476
|
-
}
|
|
101477
|
-
if (!filteredData[fieldValue] || filterFunc(d, filteredData[fieldValue])) {
|
|
101478
|
-
filteredData[fieldValue] = d;
|
|
101479
|
-
}
|
|
101480
|
-
});
|
|
101481
|
-
return data.filter((d) => {
|
|
101482
|
-
var _a;
|
|
101483
|
-
const fieldValue = (_a = d.data) === null || _a === void 0 ? void 0 : _a[field];
|
|
101484
|
-
return filteredData[fieldValue] && filteredData[fieldValue] === d;
|
|
101485
|
-
});
|
|
101486
|
-
};
|
|
101487
|
-
}
|
|
101488
|
-
return labelStyle;
|
|
101489
|
-
}
|
|
101490
|
-
}
|
|
101491
|
-
MosaicSeries.type = exports.SeriesTypeEnum.mosaic;
|
|
101492
|
-
MosaicSeries.transformerConstructor = BarSeriesSpecTransformer;
|
|
101493
|
-
const registerMosaicSeries = () => {
|
|
101494
|
-
registerRectMark();
|
|
101495
|
-
registerTextMark();
|
|
101496
|
-
registerFadeInOutAnimation();
|
|
101497
|
-
registerCartesianLinearAxis();
|
|
101498
|
-
Factory$1.registerSeries(MosaicSeries.type, MosaicSeries);
|
|
101499
|
-
};
|
|
101500
|
-
|
|
101501
102216
|
class MosaicChart extends BaseChart {
|
|
101502
102217
|
constructor() {
|
|
101503
102218
|
super(...arguments);
|
|
@@ -101568,570 +102283,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101568
102283
|
}
|
|
101569
102284
|
}
|
|
101570
102285
|
|
|
101571
|
-
const PictogramSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["pictogram"]: { name: "pictogram", type: "group" } });
|
|
101572
|
-
|
|
101573
|
-
class PictogramSeriesSpecTransformer extends BaseSeriesSpecTransformer {
|
|
101574
|
-
_getDefaultSpecFromChart(chartSpec) {
|
|
101575
|
-
var _a, _b, _c;
|
|
101576
|
-
const spec = (_a = super._getDefaultSpecFromChart(chartSpec)) !== null && _a !== void 0 ? _a : {};
|
|
101577
|
-
const svg = chartSpec.svg;
|
|
101578
|
-
const elements = (_c = (_b = svgSourceMap.get(svg)) === null || _b === void 0 ? void 0 : _b.latestData) === null || _c === void 0 ? void 0 : _c.elements;
|
|
101579
|
-
if (elements && elements.length) {
|
|
101580
|
-
const names = elements.map(e => e.name).filter(n => isValid$1(n));
|
|
101581
|
-
names.forEach(name => {
|
|
101582
|
-
if (chartSpec[name]) {
|
|
101583
|
-
spec[name] = chartSpec[name];
|
|
101584
|
-
}
|
|
101585
|
-
});
|
|
101586
|
-
}
|
|
101587
|
-
return spec;
|
|
101588
|
-
}
|
|
101589
|
-
}
|
|
101590
|
-
|
|
101591
|
-
class PictogramSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
101592
|
-
constructor() {
|
|
101593
|
-
super(...arguments);
|
|
101594
|
-
this.dimensionTooltipTitleCallback = (datum) => {
|
|
101595
|
-
var _a;
|
|
101596
|
-
const series = this.series;
|
|
101597
|
-
return (_a = this._getDimensionData(datum)) !== null && _a !== void 0 ? _a : series.getDatumName(datum);
|
|
101598
|
-
};
|
|
101599
|
-
this.markTooltipValueCallback = (datum, params) => {
|
|
101600
|
-
const { measureFields } = this._seriesCacheInfo;
|
|
101601
|
-
if (measureFields[0] && datum.data) {
|
|
101602
|
-
return datum.data[measureFields[0]];
|
|
101603
|
-
}
|
|
101604
|
-
};
|
|
101605
|
-
this.markTooltipKeyCallback = (datum) => {
|
|
101606
|
-
var _a;
|
|
101607
|
-
return (_a = datum.data) === null || _a === void 0 ? void 0 : _a[this.series.getDimensionField()[0]];
|
|
101608
|
-
};
|
|
101609
|
-
}
|
|
101610
|
-
}
|
|
101611
|
-
|
|
101612
|
-
function isValidStrokeOrFill(attr) {
|
|
101613
|
-
var _a;
|
|
101614
|
-
return isValid$1(attr) && attr !== 'none' && !((_a = attr.includes) === null || _a === void 0 ? void 0 : _a.call(attr, 'url'));
|
|
101615
|
-
}
|
|
101616
|
-
const getLineWidth = (attributes) => {
|
|
101617
|
-
const strokeWidth = parseFloat(attributes['strokeWidth']);
|
|
101618
|
-
if (!isNaN(strokeWidth))
|
|
101619
|
-
return strokeWidth;
|
|
101620
|
-
const stroke = attributes['stroke'];
|
|
101621
|
-
return stroke && isValidStrokeOrFill(stroke) ? 1 : 0;
|
|
101622
|
-
};
|
|
101623
|
-
const getFill = (attributes, defaultFill) => {
|
|
101624
|
-
var _a;
|
|
101625
|
-
const fill = (_a = attributes['fill']) !== null && _a !== void 0 ? _a : defaultFill;
|
|
101626
|
-
return fill && isValidStrokeOrFill(fill) ? fill : undefined;
|
|
101627
|
-
};
|
|
101628
|
-
const getStroke = (attributes, defaultStroke) => {
|
|
101629
|
-
var _a;
|
|
101630
|
-
const stroke = (_a = attributes['stroke']) !== null && _a !== void 0 ? _a : defaultStroke;
|
|
101631
|
-
return stroke && isValidStrokeOrFill(stroke) ? stroke : false;
|
|
101632
|
-
};
|
|
101633
|
-
const commonAttributes = (attributes) => {
|
|
101634
|
-
return Object.assign(Object.assign({}, attributes), { x: parseFloat(attributes.x) || undefined, y: parseFloat(attributes.y) || undefined, fillStrokeOrder: false, fill: getFill(attributes), lineWidth: getLineWidth(attributes), stroke: getStroke(attributes) });
|
|
101635
|
-
};
|
|
101636
|
-
const graphicAttributeTransform = {
|
|
101637
|
-
group: (attributes) => {
|
|
101638
|
-
const common = commonAttributes(attributes);
|
|
101639
|
-
return Object.assign(Object.assign({}, common), { visibleAll: common['visible'] !== false });
|
|
101640
|
-
},
|
|
101641
|
-
rule: (attributes) => {
|
|
101642
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { x: parseFloat(attributes.x1), y: parseFloat(attributes.y1), x1: parseFloat(attributes.x2), y1: parseFloat(attributes.y2) });
|
|
101643
|
-
},
|
|
101644
|
-
rect: (attributes) => {
|
|
101645
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { fill: getFill(attributes, '#000'), width: parseFloat(attributes.width), height: parseFloat(attributes.height) });
|
|
101646
|
-
},
|
|
101647
|
-
polygon: (attributes) => {
|
|
101648
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { fill: getFill(attributes, '#000'), points: attributes.points
|
|
101649
|
-
.trim()
|
|
101650
|
-
.split(/\s+/)
|
|
101651
|
-
.map((pair) => {
|
|
101652
|
-
const [x, y] = pair.split(',').map(Number);
|
|
101653
|
-
return { x, y };
|
|
101654
|
-
}) });
|
|
101655
|
-
},
|
|
101656
|
-
line: (attributes) => {
|
|
101657
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { points: attributes.points
|
|
101658
|
-
.trim()
|
|
101659
|
-
.split(/\s+/)
|
|
101660
|
-
.map((pair) => {
|
|
101661
|
-
const [x, y] = pair.split(',').map(Number);
|
|
101662
|
-
return { x, y };
|
|
101663
|
-
}) });
|
|
101664
|
-
},
|
|
101665
|
-
path: (attributes) => {
|
|
101666
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { path: attributes.d, fillStrokeOrder: false });
|
|
101667
|
-
},
|
|
101668
|
-
arc: (attributes) => {
|
|
101669
|
-
var _a;
|
|
101670
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { outerRadius: (_a = attributes.r) !== null && _a !== void 0 ? _a : attributes.ry, x: parseFloat(attributes.cx), y: parseFloat(attributes.cy), startAngle: 0, endAngle: Math.PI * 2, scaleX: parseFloat(attributes.rx) / parseFloat(attributes.ry) || 1, fill: getFill(attributes, '#000') });
|
|
101671
|
-
},
|
|
101672
|
-
text: (attributes, value) => {
|
|
101673
|
-
var _a, _b;
|
|
101674
|
-
return Object.assign(Object.assign({}, commonAttributes(attributes)), { text: value, textAlign: (_a = attributes.textAlign) !== null && _a !== void 0 ? _a : 'left', textBaseLine: (_b = attributes.textAnchor) !== null && _b !== void 0 ? _b : 'middle', anchor: [0, 0], fill: getFill(attributes, '#000') });
|
|
101675
|
-
}
|
|
101676
|
-
};
|
|
101677
|
-
const pictogram = (data) => {
|
|
101678
|
-
var _a, _b;
|
|
101679
|
-
if (!data || !data[0]) {
|
|
101680
|
-
return {};
|
|
101681
|
-
}
|
|
101682
|
-
const { elements } = data[0].latestData;
|
|
101683
|
-
if (elements && elements.length) {
|
|
101684
|
-
elements.forEach((el, index) => {
|
|
101685
|
-
var _a;
|
|
101686
|
-
el[DEFAULT_DATA_INDEX] = index;
|
|
101687
|
-
el._uniqueId = `${el.id}-${index}`;
|
|
101688
|
-
el.data = undefined;
|
|
101689
|
-
const { graphicType: type, transform } = el;
|
|
101690
|
-
let finalAttributes = {
|
|
101691
|
-
visible: el.attributes.visibility !== 'hidden' && el.attributes.visibility !== 'collapse'
|
|
101692
|
-
};
|
|
101693
|
-
if (el.graphicType === 'text') {
|
|
101694
|
-
merge$1(finalAttributes, el._inheritStyle, (_a = el.parent) === null || _a === void 0 ? void 0 : _a._textGroupStyle, el.attributes);
|
|
101695
|
-
}
|
|
101696
|
-
else if (el.graphicType !== 'group') {
|
|
101697
|
-
merge$1(finalAttributes, el._inheritStyle, el.attributes);
|
|
101698
|
-
}
|
|
101699
|
-
if (graphicAttributeTransform[type]) {
|
|
101700
|
-
el._finalAttributes = graphicAttributeTransform[type](finalAttributes, el.value);
|
|
101701
|
-
}
|
|
101702
|
-
else {
|
|
101703
|
-
el._finalAttributes = finalAttributes;
|
|
101704
|
-
}
|
|
101705
|
-
if (transform) {
|
|
101706
|
-
el._finalAttributes.postMatrix = Object.assign({}, transform);
|
|
101707
|
-
}
|
|
101708
|
-
});
|
|
101709
|
-
const texts = elements.filter(el => el.tagName === 'text');
|
|
101710
|
-
for (let i = 0; i < texts.length; i++) {
|
|
101711
|
-
const textId = texts[i]._uniqueId;
|
|
101712
|
-
const children = elements.filter(el => {
|
|
101713
|
-
let result = false;
|
|
101714
|
-
let parent = el.parent;
|
|
101715
|
-
while (parent) {
|
|
101716
|
-
if (parent._uniqueId === textId) {
|
|
101717
|
-
result = true;
|
|
101718
|
-
break;
|
|
101719
|
-
}
|
|
101720
|
-
parent = parent.parent;
|
|
101721
|
-
}
|
|
101722
|
-
return result;
|
|
101723
|
-
});
|
|
101724
|
-
if (children && children.length) {
|
|
101725
|
-
let startX = (_b = (_a = texts[i]._textGroupStyle) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0;
|
|
101726
|
-
let curX = startX;
|
|
101727
|
-
for (let j = 0; j < children.length; j++) {
|
|
101728
|
-
const currentChild = children[j];
|
|
101729
|
-
if (currentChild.graphicType === 'group') {
|
|
101730
|
-
curX = startX;
|
|
101731
|
-
}
|
|
101732
|
-
else if (currentChild.value) {
|
|
101733
|
-
if (currentChild.parent._textGroupStyle.x === undefined) {
|
|
101734
|
-
const lastText = children
|
|
101735
|
-
.slice(0, j)
|
|
101736
|
-
.reverse()
|
|
101737
|
-
.find(c => c.graphicType === 'text' && c.value);
|
|
101738
|
-
if (lastText) {
|
|
101739
|
-
const width = measureText(lastText.value, lastText._finalAttributes).width;
|
|
101740
|
-
curX += width;
|
|
101741
|
-
}
|
|
101742
|
-
currentChild._finalAttributes.x = curX;
|
|
101743
|
-
}
|
|
101744
|
-
}
|
|
101745
|
-
}
|
|
101746
|
-
}
|
|
101747
|
-
}
|
|
101748
|
-
}
|
|
101749
|
-
return elements;
|
|
101750
|
-
};
|
|
101751
|
-
|
|
101752
|
-
class PictogramSeries extends GeoSeries {
|
|
101753
|
-
constructor() {
|
|
101754
|
-
super(...arguments);
|
|
101755
|
-
this.type = exports.SeriesTypeEnum.pictogram;
|
|
101756
|
-
}
|
|
101757
|
-
setAttrFromSpec() {
|
|
101758
|
-
var _a, _b, _c;
|
|
101759
|
-
super.setAttrFromSpec();
|
|
101760
|
-
this.svg = this._spec.svg;
|
|
101761
|
-
this._nameField = this._spec.nameField;
|
|
101762
|
-
this._valueField = this._spec.valueField;
|
|
101763
|
-
if (!this.svg) {
|
|
101764
|
-
(_a = this._option) === null || _a === void 0 ? void 0 : _a.onError(`svg source is not specified !`);
|
|
101765
|
-
}
|
|
101766
|
-
this._parsedSvgResult = (_b = getSVGSource(this.svg)) === null || _b === void 0 ? void 0 : _b.latestData;
|
|
101767
|
-
if (!this._parsedSvgResult) {
|
|
101768
|
-
(_c = this._option) === null || _c === void 0 ? void 0 : _c.onError(`'${this.svg}' is not registered !`);
|
|
101769
|
-
}
|
|
101770
|
-
}
|
|
101771
|
-
getDatumCenter(datum) {
|
|
101772
|
-
return [Number.NaN, Number.NaN];
|
|
101773
|
-
}
|
|
101774
|
-
getDatumName(datum) {
|
|
101775
|
-
return datum.name || datum._nameFromParent;
|
|
101776
|
-
}
|
|
101777
|
-
getMarksWithoutRoot() {
|
|
101778
|
-
return this.getMarks().filter(m => m.name && !m.name.includes('seriesGroup') && !m.name.includes('root') && m !== this._pictogramMark);
|
|
101779
|
-
}
|
|
101780
|
-
_buildMarkAttributeContext() {
|
|
101781
|
-
super._buildMarkAttributeContext();
|
|
101782
|
-
this._markAttributeContext.getTransformMatrix = this.getRootMatrix.bind(this);
|
|
101783
|
-
this._markAttributeContext.coordToPosition = this.coordToPosition.bind(this);
|
|
101784
|
-
this._markAttributeContext.dataToPosition = this.dataToPosition.bind(this);
|
|
101785
|
-
}
|
|
101786
|
-
_defaultHoverConfig(selector, finalHoverSpec) {
|
|
101787
|
-
return {
|
|
101788
|
-
seriesId: this.id,
|
|
101789
|
-
regionId: this._region.id,
|
|
101790
|
-
selector,
|
|
101791
|
-
type: 'element-highlight-by-graphic-name',
|
|
101792
|
-
trigger: finalHoverSpec.trigger,
|
|
101793
|
-
triggerOff: 'pointerout',
|
|
101794
|
-
blurState: STATE_VALUE_ENUM.STATE_HOVER_REVERSE,
|
|
101795
|
-
highlightState: STATE_VALUE_ENUM.STATE_HOVER
|
|
101796
|
-
};
|
|
101797
|
-
}
|
|
101798
|
-
_defaultSelectConfig(selector, finalSelectSpec) {
|
|
101799
|
-
const isMultiple = finalSelectSpec.mode === 'multiple';
|
|
101800
|
-
const triggerOff = isValid$1(finalSelectSpec.triggerOff)
|
|
101801
|
-
? finalSelectSpec.triggerOff
|
|
101802
|
-
: isMultiple
|
|
101803
|
-
? ['empty', 'self']
|
|
101804
|
-
: ['empty', finalSelectSpec.trigger];
|
|
101805
|
-
return {
|
|
101806
|
-
type: 'element-select-by-graphic-name',
|
|
101807
|
-
seriesId: this.id,
|
|
101808
|
-
regionId: this._region.id,
|
|
101809
|
-
selector,
|
|
101810
|
-
trigger: finalSelectSpec.trigger,
|
|
101811
|
-
triggerOff: triggerOff,
|
|
101812
|
-
reverseState: STATE_VALUE_ENUM.STATE_SELECTED_REVERSE,
|
|
101813
|
-
state: STATE_VALUE_ENUM.STATE_SELECTED,
|
|
101814
|
-
isMultiple
|
|
101815
|
-
};
|
|
101816
|
-
}
|
|
101817
|
-
initMark() {
|
|
101818
|
-
var _a;
|
|
101819
|
-
this._pictogramMark = this._createMark(PictogramSeries.mark.pictogram, {
|
|
101820
|
-
groupKey: this.getDimensionField()[0],
|
|
101821
|
-
isSeriesMark: true,
|
|
101822
|
-
skipBeforeLayouted: true,
|
|
101823
|
-
dataView: this._mapViewData.getDataView(),
|
|
101824
|
-
dataProductId: this._mapViewData.getProductId()
|
|
101825
|
-
}, {
|
|
101826
|
-
morph: shouldMarkDoMorph(this._spec, PictogramSeries.mark.pictogram.name)
|
|
101827
|
-
});
|
|
101828
|
-
if (!this._pictogramMark) {
|
|
101829
|
-
return;
|
|
101830
|
-
}
|
|
101831
|
-
this._pictogramMark.setUserId(PictogramSeries.mark.pictogram.name);
|
|
101832
|
-
for (const element of this._mapViewData.getDataView().latestData) {
|
|
101833
|
-
const { graphicType: type, name, parent, id, _nameFromParent, _uniqueId } = element;
|
|
101834
|
-
const mark = this._createMark({ type, name: name !== null && name !== void 0 ? name : _nameFromParent }, {
|
|
101835
|
-
groupKey: _uniqueId,
|
|
101836
|
-
isSeriesMark: false,
|
|
101837
|
-
skipBeforeLayouted: true,
|
|
101838
|
-
dataView: this._mapViewData.getDataView(),
|
|
101839
|
-
dataProductId: this._mapViewData.getProductId(),
|
|
101840
|
-
parent: (_a = this._pictogramMark.getMarkInUserId(parent === null || parent === void 0 ? void 0 : parent._uniqueId)) !== null && _a !== void 0 ? _a : this._pictogramMark
|
|
101841
|
-
}, {
|
|
101842
|
-
morph: shouldMarkDoMorph(this._spec, PictogramSeries.mark.pictogram.name)
|
|
101843
|
-
});
|
|
101844
|
-
if (mark) {
|
|
101845
|
-
mark.setUserId(_uniqueId);
|
|
101846
|
-
if (mark.type !== 'group') {
|
|
101847
|
-
mark.setMarkConfig({ graphicName: mark.name });
|
|
101848
|
-
}
|
|
101849
|
-
mark.setTransform([
|
|
101850
|
-
{
|
|
101851
|
-
type: 'filter',
|
|
101852
|
-
callback: (datum) => {
|
|
101853
|
-
return datum._uniqueId === _uniqueId;
|
|
101854
|
-
}
|
|
101855
|
-
}
|
|
101856
|
-
]);
|
|
101857
|
-
}
|
|
101858
|
-
}
|
|
101859
|
-
this._initLabelMark();
|
|
101860
|
-
}
|
|
101861
|
-
_initLabelMark() {
|
|
101862
|
-
if (this._spec.label.visible !== true) {
|
|
101863
|
-
return;
|
|
101864
|
-
}
|
|
101865
|
-
const labelMark = this._createMark(PictogramSeries.mark.label, {
|
|
101866
|
-
isSeriesMark: false,
|
|
101867
|
-
parent: this._pictogramMark,
|
|
101868
|
-
groupKey: '_uniqueId',
|
|
101869
|
-
skipBeforeLayouted: true,
|
|
101870
|
-
depend: this.getMarksWithoutRoot()
|
|
101871
|
-
});
|
|
101872
|
-
if (labelMark) {
|
|
101873
|
-
this._labelMark = labelMark;
|
|
101874
|
-
this._labelMark.setDataView(this._mapViewData.getDataView());
|
|
101875
|
-
}
|
|
101876
|
-
}
|
|
101877
|
-
initLabelMarkStyle() {
|
|
101878
|
-
if (!this._labelMark) {
|
|
101879
|
-
return;
|
|
101880
|
-
}
|
|
101881
|
-
this.setMarkStyle(this._labelMark, {
|
|
101882
|
-
visible: d => !!this._validElement(d),
|
|
101883
|
-
x: d => { var _a; return (_a = this.dataToPosition(d, true)) === null || _a === void 0 ? void 0 : _a.x; },
|
|
101884
|
-
y: d => { var _a; return (_a = this.dataToPosition(d, true)) === null || _a === void 0 ? void 0 : _a.y; },
|
|
101885
|
-
text: d => d[this.nameField],
|
|
101886
|
-
textAlign: 'center',
|
|
101887
|
-
textBaseline: 'middle'
|
|
101888
|
-
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
101889
|
-
}
|
|
101890
|
-
initMarkStyle() {
|
|
101891
|
-
const { root, viewBoxRect } = this._parsedSvgResult;
|
|
101892
|
-
const elements = this._mapViewData.getDataView().latestData;
|
|
101893
|
-
if (root) {
|
|
101894
|
-
this.setMarkStyle(this._pictogramMark, graphicAttributeTransform.group(root.attributes), 'normal', AttributeLevel.Built_In);
|
|
101895
|
-
if (root.transform) {
|
|
101896
|
-
this.setMarkStyle(this._pictogramMark, {
|
|
101897
|
-
postMatrix: () => root.transform
|
|
101898
|
-
}, 'normal', AttributeLevel.Built_In);
|
|
101899
|
-
}
|
|
101900
|
-
if (viewBoxRect) {
|
|
101901
|
-
this._pictogramMark.setMarkConfig({
|
|
101902
|
-
clip: true,
|
|
101903
|
-
clipPath: [createRect(Object.assign(Object.assign({}, viewBoxRect), { fill: true }))]
|
|
101904
|
-
});
|
|
101905
|
-
}
|
|
101906
|
-
}
|
|
101907
|
-
for (const element of elements) {
|
|
101908
|
-
const { _uniqueId, _finalAttributes: attributes } = element;
|
|
101909
|
-
const mark = this._pictogramMark.getMarkInUserId(_uniqueId);
|
|
101910
|
-
const valid = this._validElement(element);
|
|
101911
|
-
if (mark) {
|
|
101912
|
-
this.setMarkStyle(mark, { keepStrokeScale: true }, 'normal', AttributeLevel.Built_In);
|
|
101913
|
-
if (valid) {
|
|
101914
|
-
this.initMarkStyleWithSpec(mark, merge$1({}, this._spec.pictogram, this._spec[mark.name]));
|
|
101915
|
-
this.setMarkStyle(mark, attributes, 'normal', AttributeLevel.Series);
|
|
101916
|
-
mark.setPostProcess('fill', (result, datum) => {
|
|
101917
|
-
return isValid$1(result) ? result : this._spec.defaultFillColor;
|
|
101918
|
-
});
|
|
101919
|
-
}
|
|
101920
|
-
else {
|
|
101921
|
-
mark.setMarkConfig({ interactive: false });
|
|
101922
|
-
this.setMarkStyle(mark, attributes, 'normal', AttributeLevel.Built_In);
|
|
101923
|
-
}
|
|
101924
|
-
}
|
|
101925
|
-
}
|
|
101926
|
-
this.initLabelMarkStyle();
|
|
101927
|
-
}
|
|
101928
|
-
_validElement(element) {
|
|
101929
|
-
return element.name || element._nameFromParent;
|
|
101930
|
-
}
|
|
101931
|
-
initTooltip() {
|
|
101932
|
-
this._tooltipHelper = new PictogramSeriesTooltipHelper(this);
|
|
101933
|
-
this.getMarksWithoutRoot().forEach(mark => {
|
|
101934
|
-
if (mark && mark.name) {
|
|
101935
|
-
this._tooltipHelper.activeTriggerSet.mark.add(mark);
|
|
101936
|
-
}
|
|
101937
|
-
});
|
|
101938
|
-
}
|
|
101939
|
-
dataToPosition(datum, global = false) {
|
|
101940
|
-
if (!datum) {
|
|
101941
|
-
return null;
|
|
101942
|
-
}
|
|
101943
|
-
const name = datum[this.nameField];
|
|
101944
|
-
if (!name) {
|
|
101945
|
-
return null;
|
|
101946
|
-
}
|
|
101947
|
-
const mark = this.getMarksWithoutRoot().filter(mark => mark.name === name);
|
|
101948
|
-
if (!mark || mark.length === 0) {
|
|
101949
|
-
return null;
|
|
101950
|
-
}
|
|
101951
|
-
let bounds = new Bounds();
|
|
101952
|
-
if (global) {
|
|
101953
|
-
mark.forEach(m => {
|
|
101954
|
-
bounds = bounds.union(m.getProduct().getGroupGraphicItem().globalAABBBounds);
|
|
101955
|
-
});
|
|
101956
|
-
}
|
|
101957
|
-
else {
|
|
101958
|
-
mark.forEach(m => {
|
|
101959
|
-
bounds = bounds.union(m.getProduct().getBounds());
|
|
101960
|
-
});
|
|
101961
|
-
}
|
|
101962
|
-
const point = { x: (bounds.x1 + bounds.x2) / 2, y: (bounds.y1 + bounds.y2) / 2 };
|
|
101963
|
-
if (global) {
|
|
101964
|
-
const { x, y } = this.getLayoutStartPoint();
|
|
101965
|
-
point.x -= x;
|
|
101966
|
-
point.y -= y;
|
|
101967
|
-
}
|
|
101968
|
-
return point;
|
|
101969
|
-
}
|
|
101970
|
-
coordToPosition(point) {
|
|
101971
|
-
if (!point) {
|
|
101972
|
-
return null;
|
|
101973
|
-
}
|
|
101974
|
-
const { x, y } = point;
|
|
101975
|
-
const matrix = this.getRootMatrix();
|
|
101976
|
-
if (!matrix) {
|
|
101977
|
-
return null;
|
|
101978
|
-
}
|
|
101979
|
-
const position = {};
|
|
101980
|
-
matrix.getInverse().transformPoint({ x, y }, position);
|
|
101981
|
-
return position;
|
|
101982
|
-
}
|
|
101983
|
-
getRootMatrix() {
|
|
101984
|
-
var _a;
|
|
101985
|
-
return (_a = this.getPictogramRootGraphic()) === null || _a === void 0 ? void 0 : _a.transMatrix;
|
|
101986
|
-
}
|
|
101987
|
-
getPictogramRootGraphic() {
|
|
101988
|
-
var _a;
|
|
101989
|
-
return (_a = this._pictogramMark.getProduct()) === null || _a === void 0 ? void 0 : _a.getGroupGraphicItem();
|
|
101990
|
-
}
|
|
101991
|
-
initData() {
|
|
101992
|
-
var _a, _b;
|
|
101993
|
-
super.initData();
|
|
101994
|
-
const parsedSvg = svgSourceMap.get(this.svg);
|
|
101995
|
-
if (!parsedSvg) {
|
|
101996
|
-
(_a = this._option) === null || _a === void 0 ? void 0 : _a.onError('no valid svg found!');
|
|
101997
|
-
}
|
|
101998
|
-
const svgData = new DataView(this._dataSet, { name: `pictogram_${this.id}_data` });
|
|
101999
|
-
registerDataSetInstanceTransform(this._dataSet, 'pictogram', pictogram);
|
|
102000
|
-
registerDataSetInstanceTransform(this._dataSet, 'lookup', lookup);
|
|
102001
|
-
svgData
|
|
102002
|
-
.parse([parsedSvg], {
|
|
102003
|
-
type: 'dataview'
|
|
102004
|
-
})
|
|
102005
|
-
.transform({ type: 'pictogram' })
|
|
102006
|
-
.transform({
|
|
102007
|
-
type: 'lookup',
|
|
102008
|
-
options: {
|
|
102009
|
-
from: () => this.getViewData().latestData,
|
|
102010
|
-
key: 'name',
|
|
102011
|
-
fields: this._nameField,
|
|
102012
|
-
set: (a, b) => {
|
|
102013
|
-
if (b) {
|
|
102014
|
-
a.data = b;
|
|
102015
|
-
}
|
|
102016
|
-
}
|
|
102017
|
-
}
|
|
102018
|
-
})
|
|
102019
|
-
.transform({
|
|
102020
|
-
type: 'lookup',
|
|
102021
|
-
options: {
|
|
102022
|
-
from: () => this.getViewData().latestData,
|
|
102023
|
-
key: '_nameFromParent',
|
|
102024
|
-
fields: this._nameField,
|
|
102025
|
-
set: (a, b) => {
|
|
102026
|
-
if (b) {
|
|
102027
|
-
a.data = b;
|
|
102028
|
-
}
|
|
102029
|
-
}
|
|
102030
|
-
}
|
|
102031
|
-
});
|
|
102032
|
-
(_b = this._data) === null || _b === void 0 ? void 0 : _b.getDataView().target.addListener('change', svgData.reRunAllTransform);
|
|
102033
|
-
this._mapViewData = new SeriesData(this._option, svgData);
|
|
102034
|
-
}
|
|
102035
|
-
mapViewDataUpdate() {
|
|
102036
|
-
this._mapViewData.updateData();
|
|
102037
|
-
}
|
|
102038
|
-
onLayoutEnd(ctx) {
|
|
102039
|
-
var _a;
|
|
102040
|
-
super.onLayoutEnd(ctx);
|
|
102041
|
-
(_a = this._mapViewData) === null || _a === void 0 ? void 0 : _a.getDataView().reRunAllTransform();
|
|
102042
|
-
}
|
|
102043
|
-
updateSVGSize() {
|
|
102044
|
-
const { width: regionWidth, height: regionHeight } = this.getLayoutRect();
|
|
102045
|
-
const regionCenterX = regionWidth / 2;
|
|
102046
|
-
const regionCenterY = regionHeight / 2;
|
|
102047
|
-
const root = this.getPictogramRootGraphic();
|
|
102048
|
-
if (root) {
|
|
102049
|
-
const bounds = root.AABBBounds;
|
|
102050
|
-
const { x1, x2, y1, y2 } = root.AABBBounds;
|
|
102051
|
-
const width = bounds.width();
|
|
102052
|
-
const height = bounds.height();
|
|
102053
|
-
const rootCenterX = (x1 + x2) / 2;
|
|
102054
|
-
const rootCenterY = (y1 + y2) / 2;
|
|
102055
|
-
const scaleX = regionWidth / width;
|
|
102056
|
-
const scaleY = regionHeight / height;
|
|
102057
|
-
const scale = Math.min(scaleX, scaleY);
|
|
102058
|
-
root.scale(scale, scale, { x: rootCenterX, y: rootCenterY });
|
|
102059
|
-
root.translate(regionCenterX - rootCenterX, regionCenterY - rootCenterY);
|
|
102060
|
-
}
|
|
102061
|
-
}
|
|
102062
|
-
initEvent() {
|
|
102063
|
-
var _a;
|
|
102064
|
-
super.initEvent();
|
|
102065
|
-
(_a = this._mapViewData.getDataView()) === null || _a === void 0 ? void 0 : _a.target.addListener('change', this.mapViewDataUpdate.bind(this));
|
|
102066
|
-
this.event.on(HOOK_EVENT.AFTER_MARK_LAYOUT_END, this.updateSVGSize.bind(this));
|
|
102067
|
-
}
|
|
102068
|
-
handleZoom(e) {
|
|
102069
|
-
const { scale, scaleCenter } = e;
|
|
102070
|
-
if (scale === 1) {
|
|
102071
|
-
return;
|
|
102072
|
-
}
|
|
102073
|
-
const root = this.getPictogramRootGraphic();
|
|
102074
|
-
if (root) {
|
|
102075
|
-
if (!root.attribute.postMatrix) {
|
|
102076
|
-
root.setAttributes({
|
|
102077
|
-
postMatrix: new Matrix()
|
|
102078
|
-
});
|
|
102079
|
-
}
|
|
102080
|
-
root.scale(scale, scale, scaleCenter);
|
|
102081
|
-
}
|
|
102082
|
-
}
|
|
102083
|
-
handlePan(e) {
|
|
102084
|
-
const { delta } = e;
|
|
102085
|
-
if (delta[0] === 0 && delta[1] === 0) {
|
|
102086
|
-
return;
|
|
102087
|
-
}
|
|
102088
|
-
const root = this.getPictogramRootGraphic();
|
|
102089
|
-
if (root) {
|
|
102090
|
-
if (!root.attribute.postMatrix) {
|
|
102091
|
-
root.setAttributes({
|
|
102092
|
-
postMatrix: new Matrix()
|
|
102093
|
-
});
|
|
102094
|
-
}
|
|
102095
|
-
root.translate(delta[0], delta[1]);
|
|
102096
|
-
}
|
|
102097
|
-
}
|
|
102098
|
-
getMarkData(datum) {
|
|
102099
|
-
var _a;
|
|
102100
|
-
return (_a = datum.data) !== null && _a !== void 0 ? _a : {};
|
|
102101
|
-
}
|
|
102102
|
-
getMeasureField() {
|
|
102103
|
-
return [this.valueField];
|
|
102104
|
-
}
|
|
102105
|
-
getDimensionField() {
|
|
102106
|
-
return [this.nameField];
|
|
102107
|
-
}
|
|
102108
|
-
_getSeriesInfo(field, keys) {
|
|
102109
|
-
const defaultShapeType = this.getDefaultShapeType();
|
|
102110
|
-
return keys.map(key => {
|
|
102111
|
-
return {
|
|
102112
|
-
key,
|
|
102113
|
-
originalKey: key,
|
|
102114
|
-
style: this.getSeriesStyle({
|
|
102115
|
-
data: {
|
|
102116
|
-
[field]: key
|
|
102117
|
-
}
|
|
102118
|
-
}),
|
|
102119
|
-
shapeType: defaultShapeType
|
|
102120
|
-
};
|
|
102121
|
-
});
|
|
102122
|
-
}
|
|
102123
|
-
}
|
|
102124
|
-
PictogramSeries.type = exports.SeriesTypeEnum.pictogram;
|
|
102125
|
-
PictogramSeries.mark = PictogramSeriesMark;
|
|
102126
|
-
PictogramSeries.transformerConstructor = PictogramSeriesSpecTransformer;
|
|
102127
|
-
const registerPictogramSeries = () => {
|
|
102128
|
-
Factory$1.registerSeries(PictogramSeries.type, PictogramSeries);
|
|
102129
|
-
Factory$1.registerImplement('registerSVG', registerSVGSource);
|
|
102130
|
-
Factory$1.registerImplement('unregisterSVG', unregisterSVGSource);
|
|
102131
|
-
registerElementHighlightByGraphicName();
|
|
102132
|
-
registerElementSelectByGraphicName();
|
|
102133
|
-
};
|
|
102134
|
-
|
|
102135
102286
|
class PictogramChart extends BaseChart {
|
|
102136
102287
|
constructor() {
|
|
102137
102288
|
super(...arguments);
|
|
@@ -102273,7 +102424,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
102273
102424
|
const infoList = array((_k = (_j = chartSpecInfo.component) === null || _j === void 0 ? void 0 : _j[specKey]) !== null && _k !== void 0 ? _k : []);
|
|
102274
102425
|
array((_l = chartSpec[specKey]) !== null && _l !== void 0 ? _l : []).forEach((componentSpec, i) => {
|
|
102275
102426
|
const specInfo = infoList[i];
|
|
102276
|
-
if (componentTypes.includes(specInfo.type)) {
|
|
102427
|
+
if (specInfo && componentTypes.includes(specInfo.type)) {
|
|
102277
102428
|
result.modelInfo.push(Object.assign(Object.assign({}, specInfo), { spec: componentSpec }));
|
|
102278
102429
|
}
|
|
102279
102430
|
});
|
|
@@ -102613,9 +102764,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
102613
102764
|
exports.MapSeries = MapSeries;
|
|
102614
102765
|
exports.MediaQuery = MediaQuery;
|
|
102615
102766
|
exports.MosaicChart = MosaicChart;
|
|
102767
|
+
exports.MosaicSeries = MosaicSeries;
|
|
102616
102768
|
exports.PREFIX = PREFIX;
|
|
102617
102769
|
exports.PathMark = PathMark;
|
|
102618
102770
|
exports.PictogramChart = PictogramChart;
|
|
102771
|
+
exports.PictogramSeries = PictogramSeries;
|
|
102619
102772
|
exports.Pie3dChart = Pie3dChart;
|
|
102620
102773
|
exports.Pie3dSeries = Pie3dSeries;
|
|
102621
102774
|
exports.PieChart = PieChart;
|
|
@@ -102784,9 +102937,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
102784
102937
|
exports.registerMediaQuery = registerMediaQuery;
|
|
102785
102938
|
exports.registerMorph = registerMorph;
|
|
102786
102939
|
exports.registerMosaicChart = registerMosaicChart;
|
|
102940
|
+
exports.registerMosaicSeries = registerMosaicSeries;
|
|
102787
102941
|
exports.registerNodeEnv = registerNodeEnv;
|
|
102788
102942
|
exports.registerPathMark = registerPathMark;
|
|
102789
102943
|
exports.registerPictogramChart = registerPictogramChart;
|
|
102944
|
+
exports.registerPictogramSeries = registerPictogramSeries;
|
|
102790
102945
|
exports.registerPie3dChart = registerPie3dChart;
|
|
102791
102946
|
exports.registerPie3dSeries = registerPie3dSeries;
|
|
102792
102947
|
exports.registerPieChart = registerPieChart;
|