@visactor/vchart 1.8.8-alpha.1 → 1.8.10-alpha.0
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.js +635 -581
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/config.js +1 -1
- package/cjs/animation/config.js.map +1 -1
- package/cjs/component/axis/base-axis.d.ts +2 -1
- package/cjs/component/axis/base-axis.js +11 -1
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +9 -2
- package/cjs/component/axis/cartesian/axis.js +23 -8
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/spec.d.ts +19 -3
- package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
- package/cjs/component/axis/mixin/band-axis-mixin.d.ts +6 -1
- package/cjs/component/axis/mixin/band-axis-mixin.js +17 -1
- package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +9 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js +18 -5
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/axis/polar/axis.d.ts +1 -1
- package/cjs/component/axis/polar/axis.js +4 -4
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/brush/brush.js +3 -3
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/base.js +5 -4
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.js +20 -17
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +6 -3
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.d.ts +1 -0
- package/cjs/component/geo/geo-coordinate.js +7 -6
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/indicator/indicator.js +2 -2
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/label/label.js +3 -3
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/label/total-label.js +3 -3
- package/cjs/component/label/total-label.js.map +1 -1
- package/cjs/component/label/util.js.map +1 -1
- package/cjs/component/map-label/component.js +1 -1
- package/cjs/component/map-label/component.js.map +1 -1
- package/cjs/component/marker/mark-line/mark-line.js +3 -3
- package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
- package/cjs/component/marker/utils.js +6 -6
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/component/player/player.js +2 -1
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/tooltip/utils/show-tooltip.js +1 -1
- package/cjs/component/tooltip/utils/show-tooltip.js.map +1 -1
- package/cjs/constant/event.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -2
- 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/vchart.js +1 -1
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/env/env.js +1 -1
- package/cjs/env/index.js +1 -1
- package/cjs/event/event-dispatcher.js +4 -6
- package/cjs/event/event-dispatcher.js.map +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/index.js +1 -1
- package/cjs/event/interface.js +1 -1
- package/cjs/interaction/interface.js +2 -1
- package/cjs/interaction/trigger.js +1 -1
- package/cjs/interaction/zoom/zoomable.js +9 -9
- package/cjs/interaction/zoom/zoomable.js.map +1 -1
- package/cjs/layout/base-layout.d.ts +46 -2
- package/cjs/layout/base-layout.js +194 -36
- package/cjs/layout/base-layout.js.map +1 -1
- package/cjs/layout/index.js +1 -1
- package/cjs/layout/interface.d.ts +1 -4
- package/cjs/layout/interface.js +1 -1
- package/cjs/layout/interface.js.map +1 -1
- package/cjs/layout/layout-item.d.ts +1 -5
- package/cjs/layout/layout-item.js +5 -25
- package/cjs/layout/layout-item.js.map +1 -1
- package/cjs/layout/layout3d/index.d.ts +1 -8
- package/cjs/layout/layout3d/index.js +10 -69
- package/cjs/layout/layout3d/index.js.map +1 -1
- package/cjs/layout/util.js +27 -69
- package/cjs/layout/util.js.map +1 -1
- package/cjs/model/base-model-transformer.d.ts +2 -1
- package/cjs/model/base-model-transformer.js +6 -2
- package/cjs/model/base-model-transformer.js.map +1 -1
- package/cjs/model/interface.d.ts +0 -2
- package/cjs/model/interface.js.map +1 -1
- package/cjs/model/layout-model.d.ts +0 -8
- package/cjs/model/layout-model.js +0 -15
- package/cjs/model/layout-model.js.map +1 -1
- package/cjs/series/area/area-transformer.d.ts +2 -0
- package/cjs/series/area/area-transformer.js +18 -1
- package/cjs/series/area/area-transformer.js.map +1 -1
- package/cjs/series/area/area.d.ts +0 -1
- package/cjs/series/area/area.js +1 -17
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/bar/bar.js +1 -1
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/base/base-series-transformer.js +1 -2
- package/cjs/series/base/base-series-transformer.js.map +1 -1
- package/cjs/series/base/base-series.js +14 -13
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/cartesian/cartesian.js +4 -3
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/correlation/correlation.js +1 -1
- package/cjs/series/correlation/correlation.js.map +1 -1
- package/cjs/series/mixin/line-mixin.js +1 -1
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/3d/pie-3d.js +1 -1
- package/cjs/series/pie/3d/pie-3d.js.map +1 -1
- package/cjs/series/pie/pie.js +7 -7
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/polar.js +1 -1
- package/cjs/series/polar/polar.js.map +1 -1
- package/cjs/series/radar/animation.js +1 -1
- package/cjs/series/radar/animation.js.map +1 -1
- package/cjs/series/sankey/sankey.js +1 -1
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/sunburst/sunburst.js +2 -2
- package/cjs/series/sunburst/sunburst.js.map +1 -1
- package/cjs/series/word-cloud/base.js +3 -3
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/theme/builtin/index.js +3 -1
- package/cjs/theme/builtin/index.js.map +1 -1
- package/cjs/typings/layout.d.ts +1 -1
- package/cjs/typings/layout.js.map +1 -1
- package/esm/animation/config.js +1 -1
- package/esm/animation/config.js.map +1 -1
- package/esm/component/axis/base-axis.d.ts +2 -1
- package/esm/component/axis/base-axis.js +11 -1
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +9 -2
- package/esm/component/axis/cartesian/axis.js +23 -8
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/interface/spec.d.ts +19 -3
- package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
- package/esm/component/axis/mixin/band-axis-mixin.d.ts +6 -1
- package/esm/component/axis/mixin/band-axis-mixin.js +17 -1
- package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.d.ts +9 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js +19 -5
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/axis/polar/axis.d.ts +1 -1
- package/esm/component/axis/polar/axis.js +4 -4
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/brush/brush.js +3 -3
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/base.js +5 -4
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.js +20 -17
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js +6 -4
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/geo/geo-coordinate.d.ts +1 -0
- package/esm/component/geo/geo-coordinate.js +7 -6
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/indicator/indicator.js +2 -2
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/label/label.js +3 -3
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/label/total-label.js +3 -3
- package/esm/component/label/total-label.js.map +1 -1
- package/esm/component/label/util.js.map +1 -1
- package/esm/component/map-label/component.js +1 -1
- package/esm/component/map-label/component.js.map +1 -1
- package/esm/component/marker/mark-line/mark-line.js +3 -3
- package/esm/component/marker/mark-line/mark-line.js.map +1 -1
- package/esm/component/marker/utils.js +6 -6
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/component/player/player.js +2 -1
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/tooltip/utils/show-tooltip.js +1 -1
- package/esm/component/tooltip/utils/show-tooltip.js.map +1 -1
- package/esm/constant/event.js +2 -1
- package/esm/constant/scroll-bar.js +1 -2
- 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/vchart.js +1 -1
- package/esm/core/vchart.js.map +1 -1
- package/esm/env/env.js +1 -1
- package/esm/env/index.js +1 -1
- package/esm/event/event-dispatcher.js +4 -6
- package/esm/event/event-dispatcher.js.map +1 -1
- package/esm/event/event.js +1 -1
- package/esm/event/index.js +1 -1
- package/esm/event/interface.js +1 -1
- package/esm/interaction/interface.js +2 -1
- package/esm/interaction/trigger.js +1 -1
- package/esm/interaction/zoom/zoomable.js +8 -9
- package/esm/interaction/zoom/zoomable.js.map +1 -1
- package/esm/layout/base-layout.d.ts +46 -2
- package/esm/layout/base-layout.js +192 -36
- package/esm/layout/base-layout.js.map +1 -1
- package/esm/layout/index.js +1 -1
- package/esm/layout/interface.d.ts +1 -4
- package/esm/layout/interface.js +1 -1
- package/esm/layout/interface.js.map +1 -1
- package/esm/layout/layout-item.d.ts +1 -5
- package/esm/layout/layout-item.js +5 -24
- package/esm/layout/layout-item.js.map +1 -1
- package/esm/layout/layout3d/index.d.ts +1 -8
- package/esm/layout/layout3d/index.js +10 -69
- package/esm/layout/layout3d/index.js.map +1 -1
- package/esm/layout/util.js +27 -69
- package/esm/layout/util.js.map +1 -1
- package/esm/model/base-model-transformer.d.ts +2 -1
- package/esm/model/base-model-transformer.js +6 -2
- package/esm/model/base-model-transformer.js.map +1 -1
- package/esm/model/interface.d.ts +0 -2
- package/esm/model/interface.js.map +1 -1
- package/esm/model/layout-model.d.ts +0 -8
- package/esm/model/layout-model.js +0 -15
- package/esm/model/layout-model.js.map +1 -1
- package/esm/series/area/area-transformer.d.ts +2 -0
- package/esm/series/area/area-transformer.js +19 -0
- package/esm/series/area/area-transformer.js.map +1 -1
- package/esm/series/area/area.d.ts +0 -1
- package/esm/series/area/area.js +1 -18
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/bar/bar.js +1 -1
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/base/base-series-transformer.js +1 -2
- package/esm/series/base/base-series-transformer.js.map +1 -1
- package/esm/series/base/base-series.js +13 -12
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/cartesian/cartesian.js +3 -2
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/correlation/correlation.js +1 -1
- package/esm/series/correlation/correlation.js.map +1 -1
- package/esm/series/mixin/line-mixin.js +1 -1
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/3d/pie-3d.js +1 -1
- package/esm/series/pie/3d/pie-3d.js.map +1 -1
- package/esm/series/pie/pie.js +7 -7
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/polar.js +1 -1
- package/esm/series/polar/polar.js.map +1 -1
- package/esm/series/radar/animation.js +1 -1
- package/esm/series/radar/animation.js.map +1 -1
- package/esm/series/sankey/sankey.js +1 -1
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/sunburst/sunburst.js +2 -2
- package/esm/series/sunburst/sunburst.js.map +1 -1
- package/esm/series/word-cloud/base.js +3 -3
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/theme/builtin/index.js +2 -1
- package/esm/theme/builtin/index.js.map +1 -1
- package/esm/typings/layout.d.ts +1 -1
- package/esm/typings/layout.js.map +1 -1
- package/package.json +14 -14
- package/cjs/theme/builtin/common-mobile/component/axis/band-axis.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/axis/band-axis.js +0 -22
- package/cjs/theme/builtin/common-mobile/component/axis/band-axis.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +0 -4
- package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js +0 -40
- package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/axis/common-axis.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/axis/common-axis.js +0 -42
- package/cjs/theme/builtin/common-mobile/component/axis/common-axis.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.js +0 -22
- package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +0 -3
- package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.js +0 -25
- package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/crosshair.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/crosshair.js +0 -39
- package/cjs/theme/builtin/common-mobile/component/crosshair.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/data-zoom.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/data-zoom.js +0 -40
- package/cjs/theme/builtin/common-mobile/component/data-zoom.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/index.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/index.js +0 -34
- package/cjs/theme/builtin/common-mobile/component/index.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/indicator.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/indicator.js +0 -23
- package/cjs/theme/builtin/common-mobile/component/indicator.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/legend/color-legend.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/legend/color-legend.js +0 -23
- package/cjs/theme/builtin/common-mobile/component/legend/color-legend.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/legend/continuous.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/legend/continuous.js +0 -44
- package/cjs/theme/builtin/common-mobile/component/legend/continuous.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.js +0 -39
- package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/legend/size-legend.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/legend/size-legend.js +0 -23
- package/cjs/theme/builtin/common-mobile/component/legend/size-legend.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/map-label.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/map-label.js +0 -39
- package/cjs/theme/builtin/common-mobile/component/map-label.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/mark-area.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/mark-area.js +0 -24
- package/cjs/theme/builtin/common-mobile/component/mark-area.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/mark-line.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/mark-line.js +0 -33
- package/cjs/theme/builtin/common-mobile/component/mark-line.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/mark-point.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/mark-point.js +0 -19
- package/cjs/theme/builtin/common-mobile/component/mark-point.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/player.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/player.js +0 -51
- package/cjs/theme/builtin/common-mobile/component/player.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/poptip.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/poptip.js +0 -25
- package/cjs/theme/builtin/common-mobile/component/poptip.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/title.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/title.js +0 -23
- package/cjs/theme/builtin/common-mobile/component/title.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/tooltip.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/tooltip.js +0 -43
- package/cjs/theme/builtin/common-mobile/component/tooltip.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/component/total-label.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/component/total-label.js +0 -16
- package/cjs/theme/builtin/common-mobile/component/total-label.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/constants.d.ts +0 -2
- package/cjs/theme/builtin/common-mobile/constants.js +0 -23
- package/cjs/theme/builtin/common-mobile/constants.js.map +0 -1
- package/cjs/theme/builtin/common-mobile/mark.d.ts +0 -3
- package/cjs/theme/builtin/common-mobile/mark.js +0 -35
- package/cjs/theme/builtin/common-mobile/mark.js.map +0 -1
- package/cjs/theme/builtin/dark-mobile/index.d.ts +0 -2
- package/cjs/theme/builtin/dark-mobile/index.js +0 -18
- package/cjs/theme/builtin/dark-mobile/index.js.map +0 -1
- package/cjs/theme/builtin/light-mobile/index.d.ts +0 -2
- package/cjs/theme/builtin/light-mobile/index.js +0 -18
- package/cjs/theme/builtin/light-mobile/index.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/axis/band-axis.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/axis/band-axis.js +0 -18
- package/esm/theme/builtin/common-mobile/component/axis/band-axis.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +0 -4
- package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js +0 -38
- package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/axis/common-axis.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/axis/common-axis.js +0 -36
- package/esm/theme/builtin/common-mobile/component/axis/common-axis.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/axis/linear-axis.js +0 -18
- package/esm/theme/builtin/common-mobile/component/axis/linear-axis.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +0 -3
- package/esm/theme/builtin/common-mobile/component/axis/polar-axis.js +0 -23
- package/esm/theme/builtin/common-mobile/component/axis/polar-axis.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/crosshair.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/crosshair.js +0 -35
- package/esm/theme/builtin/common-mobile/component/crosshair.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/data-zoom.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/data-zoom.js +0 -34
- package/esm/theme/builtin/common-mobile/component/data-zoom.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/index.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/index.js +0 -66
- package/esm/theme/builtin/common-mobile/component/index.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/indicator.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/indicator.js +0 -17
- package/esm/theme/builtin/common-mobile/component/indicator.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/legend/color-legend.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/legend/color-legend.js +0 -17
- package/esm/theme/builtin/common-mobile/component/legend/color-legend.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/legend/continuous.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/legend/continuous.js +0 -38
- package/esm/theme/builtin/common-mobile/component/legend/continuous.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.js +0 -33
- package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/legend/size-legend.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/legend/size-legend.js +0 -17
- package/esm/theme/builtin/common-mobile/component/legend/size-legend.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/map-label.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/map-label.js +0 -33
- package/esm/theme/builtin/common-mobile/component/map-label.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/mark-area.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/mark-area.js +0 -18
- package/esm/theme/builtin/common-mobile/component/mark-area.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/mark-line.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/mark-line.js +0 -27
- package/esm/theme/builtin/common-mobile/component/mark-line.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/mark-point.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/mark-point.js +0 -15
- package/esm/theme/builtin/common-mobile/component/mark-point.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/player.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/player.js +0 -47
- package/esm/theme/builtin/common-mobile/component/player.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/poptip.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/poptip.js +0 -19
- package/esm/theme/builtin/common-mobile/component/poptip.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/title.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/title.js +0 -17
- package/esm/theme/builtin/common-mobile/component/title.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/tooltip.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/tooltip.js +0 -37
- package/esm/theme/builtin/common-mobile/component/tooltip.js.map +0 -1
- package/esm/theme/builtin/common-mobile/component/total-label.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/component/total-label.js +0 -10
- package/esm/theme/builtin/common-mobile/component/total-label.js.map +0 -1
- package/esm/theme/builtin/common-mobile/constants.d.ts +0 -2
- package/esm/theme/builtin/common-mobile/constants.js +0 -19
- package/esm/theme/builtin/common-mobile/constants.js.map +0 -1
- package/esm/theme/builtin/common-mobile/mark.d.ts +0 -3
- package/esm/theme/builtin/common-mobile/mark.js +0 -31
- package/esm/theme/builtin/common-mobile/mark.js.map +0 -1
- package/esm/theme/builtin/dark-mobile/index.d.ts +0 -2
- package/esm/theme/builtin/dark-mobile/index.js +0 -16
- package/esm/theme/builtin/dark-mobile/index.js.map +0 -1
- package/esm/theme/builtin/light-mobile/index.d.ts +0 -2
- package/esm/theme/builtin/light-mobile/index.js +0 -16
- package/esm/theme/builtin/light-mobile/index.js.map +0 -1
package/build/index.js
CHANGED
|
@@ -10829,11 +10829,13 @@
|
|
|
10829
10829
|
global: global,
|
|
10830
10830
|
viewport: viewport,
|
|
10831
10831
|
autoPreventDefault = !1,
|
|
10832
|
-
clickInterval: clickInterval
|
|
10832
|
+
clickInterval: clickInterval,
|
|
10833
|
+
supportsTouchEvents = global.supportsTouchEvents,
|
|
10834
|
+
supportsPointerEvents = global.supportsPointerEvents
|
|
10833
10835
|
} = params;
|
|
10834
10836
|
this.manager = new EventManager(rootNode, {
|
|
10835
10837
|
clickInterval: clickInterval
|
|
10836
|
-
}), this.globalObj = global, this.supportsPointerEvents =
|
|
10838
|
+
}), this.globalObj = global, this.supportsPointerEvents = supportsPointerEvents, this.supportsTouchEvents = supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.viewport = viewport, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
|
|
10837
10839
|
default: "inherit",
|
|
10838
10840
|
pointer: "pointer"
|
|
10839
10841
|
}, this.resolution = resolution, this.setTargetElement(targetElement);
|
|
@@ -13185,7 +13187,8 @@
|
|
|
13185
13187
|
}
|
|
13186
13188
|
constructor() {
|
|
13187
13189
|
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13188
|
-
|
|
13190
|
+
var _a;
|
|
13191
|
+
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), params.background && this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0);
|
|
13189
13192
|
}
|
|
13190
13193
|
setMode(mode) {
|
|
13191
13194
|
"3d" === mode ? this.set3dMode() : this.set2dMode();
|
|
@@ -18592,20 +18595,22 @@
|
|
|
18592
18595
|
const resW = data.width,
|
|
18593
18596
|
resH = data.height;
|
|
18594
18597
|
if ("repeat-x" === backgroundMode) {
|
|
18595
|
-
w = resW * (targetH / resH);
|
|
18598
|
+
w = resW * (targetH / resH), h = targetH;
|
|
18596
18599
|
} else if ("repeat-y" === backgroundMode) {
|
|
18597
|
-
h = resH * (targetW / resW);
|
|
18600
|
+
h = resH * (targetW / resW), w = targetW;
|
|
18598
18601
|
}
|
|
18599
|
-
const
|
|
18602
|
+
const dpr = context.dpr,
|
|
18603
|
+
canvas = canvasAllocate.allocate({
|
|
18600
18604
|
width: w,
|
|
18601
18605
|
height: h,
|
|
18602
|
-
dpr:
|
|
18606
|
+
dpr: dpr
|
|
18603
18607
|
}),
|
|
18604
18608
|
ctx = canvas.getContext("2d");
|
|
18605
|
-
ctx && (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, w, h), ctx.drawImage(data, 0, 0, w, h), data = canvas.nativeCanvas),
|
|
18609
|
+
ctx && (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, w, h), ctx.drawImage(data, 0, 0, w, h), data = canvas.nativeCanvas), canvasAllocate.free(canvas);
|
|
18606
18610
|
}
|
|
18607
|
-
const
|
|
18608
|
-
|
|
18611
|
+
const dpr = context.dpr,
|
|
18612
|
+
pattern = context.createPattern(data, backgroundMode);
|
|
18613
|
+
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0])), context.fillStyle = pattern, context.translate(b.x1, b.y1), context.fillRect(0, 0, targetW, targetH), context.translate(-b.x1, -b.y1);
|
|
18609
18614
|
}
|
|
18610
18615
|
}
|
|
18611
18616
|
}
|
|
@@ -20251,23 +20256,68 @@
|
|
|
20251
20256
|
};
|
|
20252
20257
|
DefaultCanvasSymbolRender = __decorate$1h([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(SymbolRenderContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
|
|
20253
20258
|
|
|
20259
|
+
class DefaultBoundsAllocate {
|
|
20260
|
+
constructor() {
|
|
20261
|
+
this.pools = [];
|
|
20262
|
+
for (let i = 0; i < 10; i++) this.pools.push(new AABBBounds());
|
|
20263
|
+
}
|
|
20264
|
+
allocate(x1, y1, x2, y2) {
|
|
20265
|
+
if (!this.pools.length) return new AABBBounds().setValue(x1, y1, x2, y2);
|
|
20266
|
+
const b = this.pools.pop();
|
|
20267
|
+
return b.x1 = x1, b.y1 = y1, b.x2 = x2, b.y2 = y2, b;
|
|
20268
|
+
}
|
|
20269
|
+
allocateByObj(b) {
|
|
20270
|
+
if (!this.pools.length) return new AABBBounds(b);
|
|
20271
|
+
const _b = this.pools.pop();
|
|
20272
|
+
return _b.x1 = b.x1, _b.y1 = b.y1, _b.x2 = b.x2, _b.y2 = b.y2, _b;
|
|
20273
|
+
}
|
|
20274
|
+
free(b) {
|
|
20275
|
+
this.pools.push(b);
|
|
20276
|
+
}
|
|
20277
|
+
get length() {
|
|
20278
|
+
return this.pools.length;
|
|
20279
|
+
}
|
|
20280
|
+
release() {
|
|
20281
|
+
this.pools = [];
|
|
20282
|
+
}
|
|
20283
|
+
}
|
|
20284
|
+
const boundsAllocate = new DefaultBoundsAllocate();
|
|
20285
|
+
|
|
20254
20286
|
class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
|
|
20255
20287
|
constructor() {
|
|
20256
20288
|
super(...arguments), this.time = BaseRenderContributionTime.beforeFillStroke;
|
|
20257
20289
|
}
|
|
20258
20290
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
20291
|
+
var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
20259
20292
|
const {
|
|
20260
|
-
background: background,
|
|
20261
20293
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
20262
20294
|
backgroundFit = graphicAttribute.backgroundFit
|
|
20263
20295
|
} = graphic.attribute;
|
|
20296
|
+
let b,
|
|
20297
|
+
{
|
|
20298
|
+
background: background
|
|
20299
|
+
} = graphic.attribute;
|
|
20264
20300
|
if (!background) return;
|
|
20265
|
-
const
|
|
20301
|
+
const shouldReCalBounds = isObject$2(background) && background.background,
|
|
20302
|
+
onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
20303
|
+
if (shouldReCalBounds) {
|
|
20304
|
+
const _b = graphic.AABBBounds,
|
|
20305
|
+
x = (null !== (_a = background.x) && void 0 !== _a ? _a : _b.x1) + (null !== (_c = background.dx) && void 0 !== _c ? _c : 0),
|
|
20306
|
+
y = (null !== (_d = background.y) && void 0 !== _d ? _d : _b.y1) + (null !== (_e = background.dy) && void 0 !== _e ? _e : 0),
|
|
20307
|
+
w = null !== (_f = background.width) && void 0 !== _f ? _f : _b.width(),
|
|
20308
|
+
h = null !== (_g = background.height) && void 0 !== _g ? _g : _b.height();
|
|
20309
|
+
if (b = boundsAllocate.allocate(x, y, x + w, y + h), background = background.background, !onlyTranslate) {
|
|
20310
|
+
const w = b.width(),
|
|
20311
|
+
h = b.height();
|
|
20312
|
+
b.set((null !== (_h = background.x) && void 0 !== _h ? _h : 0) + (null !== (_j = background.dx) && void 0 !== _j ? _j : 0), (null !== (_k = background.y) && void 0 !== _k ? _k : 0) + (null !== (_l = background.dy) && void 0 !== _l ? _l : 0), w, h);
|
|
20313
|
+
}
|
|
20314
|
+
} else b = graphic.AABBBounds, onlyTranslate || b.set(0, 0, b.width(), b.height());
|
|
20266
20315
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20267
20316
|
const res = graphic.resources.get(background);
|
|
20268
20317
|
if ("success" !== res.state || !res.data) return;
|
|
20269
|
-
context.highPerformanceSave(), context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
20270
|
-
} else context.highPerformanceSave(), context.fillStyle = background, context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
20318
|
+
context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
20319
|
+
} else context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
20320
|
+
shouldReCalBounds && boundsAllocate.free(b);
|
|
20271
20321
|
}
|
|
20272
20322
|
}
|
|
20273
20323
|
const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
|
|
@@ -21410,33 +21460,6 @@
|
|
|
21410
21460
|
}
|
|
21411
21461
|
}
|
|
21412
21462
|
|
|
21413
|
-
class DefaultBoundsAllocate {
|
|
21414
|
-
constructor() {
|
|
21415
|
-
this.pools = [];
|
|
21416
|
-
for (let i = 0; i < 10; i++) this.pools.push(new AABBBounds());
|
|
21417
|
-
}
|
|
21418
|
-
allocate(x1, y1, x2, y2) {
|
|
21419
|
-
if (!this.pools.length) return new AABBBounds().setValue(x1, y1, x2, y2);
|
|
21420
|
-
const b = this.pools.pop();
|
|
21421
|
-
return b.x1 = x1, b.y1 = y1, b.x2 = x2, b.y2 = y2, b;
|
|
21422
|
-
}
|
|
21423
|
-
allocateByObj(b) {
|
|
21424
|
-
if (!this.pools.length) return new AABBBounds(b);
|
|
21425
|
-
const _b = this.pools.pop();
|
|
21426
|
-
return _b.x1 = b.x1, _b.y1 = b.y1, _b.x2 = b.x2, _b.y2 = b.y2, _b;
|
|
21427
|
-
}
|
|
21428
|
-
free(b) {
|
|
21429
|
-
this.pools.push(b);
|
|
21430
|
-
}
|
|
21431
|
-
get length() {
|
|
21432
|
-
return this.pools.length;
|
|
21433
|
-
}
|
|
21434
|
-
release() {
|
|
21435
|
-
this.pools = [];
|
|
21436
|
-
}
|
|
21437
|
-
}
|
|
21438
|
-
const boundsAllocate = new DefaultBoundsAllocate();
|
|
21439
|
-
|
|
21440
21463
|
var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21441
21464
|
var d,
|
|
21442
21465
|
c = arguments.length,
|
|
@@ -22161,13 +22184,11 @@
|
|
|
22161
22184
|
})), wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
|
|
22162
22185
|
let left = 0,
|
|
22163
22186
|
top = 0;
|
|
22164
|
-
|
|
22187
|
+
const b = graphic.globalAABBBounds;
|
|
22188
|
+
if ("position" === anchorType || b.empty()) {
|
|
22165
22189
|
const matrix = graphic.globalTransMatrix;
|
|
22166
22190
|
left = matrix.e, top = matrix.f;
|
|
22167
|
-
} else
|
|
22168
|
-
const b = graphic.globalAABBBounds;
|
|
22169
|
-
left = b.x1, top = b.y1;
|
|
22170
|
-
}
|
|
22191
|
+
} else left = b.x1, top = b.y1;
|
|
22171
22192
|
const containerTL = application.global.getElementTopLeft(nativeContainer, !1),
|
|
22172
22193
|
windowTL = stage.window.getTopLeft(!1),
|
|
22173
22194
|
offsetX = left + windowTL.left - containerTL.left,
|
|
@@ -22527,21 +22548,16 @@
|
|
|
22527
22548
|
|
|
22528
22549
|
let _isBrowserEnv;
|
|
22529
22550
|
function initIsBrowserEnv() {
|
|
22530
|
-
if (null == _isBrowserEnv) {
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
|
|
22534
|
-
_isBrowserEnv = !1;
|
|
22535
|
-
}
|
|
22536
|
-
if (_isBrowserEnv) try {
|
|
22537
|
-
_isBrowserEnv = !tt;
|
|
22538
|
-
} catch (err) {
|
|
22539
|
-
_isBrowserEnv = !0;
|
|
22540
|
-
}
|
|
22551
|
+
if (null == _isBrowserEnv) try {
|
|
22552
|
+
_isBrowserEnv = globalThis === window, _isBrowserEnv && (_isBrowserEnv = !!document.createElement);
|
|
22553
|
+
} catch (err) {
|
|
22554
|
+
_isBrowserEnv = !1;
|
|
22541
22555
|
}
|
|
22542
22556
|
}
|
|
22543
22557
|
function isBrowserEnv() {
|
|
22544
|
-
|
|
22558
|
+
initIsBrowserEnv();
|
|
22559
|
+
const env = application.global && application.global.env;
|
|
22560
|
+
return env ? "browser" === env : _isBrowserEnv;
|
|
22545
22561
|
}
|
|
22546
22562
|
|
|
22547
22563
|
const DefaultConfig$1 = {
|
|
@@ -22645,6 +22661,8 @@
|
|
|
22645
22661
|
resolution: this.window.dpr || this.global.devicePixelRatio,
|
|
22646
22662
|
rootNode: this,
|
|
22647
22663
|
global: this.global,
|
|
22664
|
+
supportsPointerEvents: this.params.supportsPointerEvents,
|
|
22665
|
+
supportsTouchEvents: this.params.supportsTouchEvents,
|
|
22648
22666
|
viewport: {
|
|
22649
22667
|
viewBox: this._viewBox,
|
|
22650
22668
|
get x() {
|
|
@@ -33193,7 +33211,10 @@
|
|
|
33193
33211
|
function labelingLineOrArea(textBounds, graphicBounds) {
|
|
33194
33212
|
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
|
|
33195
33213
|
let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
33196
|
-
if (!textBounds || !graphicBounds) return
|
|
33214
|
+
if (!textBounds || !graphicBounds) return {
|
|
33215
|
+
x: 1 / 0,
|
|
33216
|
+
y: 1 / 0
|
|
33217
|
+
};
|
|
33197
33218
|
const {
|
|
33198
33219
|
x1: x1,
|
|
33199
33220
|
x2: x2
|
|
@@ -33360,11 +33381,14 @@
|
|
|
33360
33381
|
baseMark = currentBaseMarks[i];
|
|
33361
33382
|
textData && baseMark && (isValid$1(textData.id) || (textData.id = `vrender-component-${this.name}-${i}`), this._idToGraphic.set(textData.id, baseMark));
|
|
33362
33383
|
}
|
|
33363
|
-
!1 !== this.attribute.animation
|
|
33364
|
-
|
|
33365
|
-
|
|
33366
|
-
|
|
33367
|
-
|
|
33384
|
+
if (!1 !== this.attribute.animation) {
|
|
33385
|
+
const animation = isObject$2(this.attribute.animation) ? this.attribute.animation : {};
|
|
33386
|
+
this._animationConfig = {
|
|
33387
|
+
enter: merge$1({}, DefaultLabelAnimation, animation, null !== (_c = this.attribute.animationEnter) && void 0 !== _c ? _c : {}),
|
|
33388
|
+
exit: merge$1({}, DefaultLabelAnimation, animation, null !== (_d = this.attribute.animationExit) && void 0 !== _d ? _d : {}),
|
|
33389
|
+
update: isArray$1(this.attribute.animationUpdate) ? this.attribute.animationUpdate : merge$1({}, DefaultLabelAnimation, animation, null !== (_e = this.attribute.animationUpdate) && void 0 !== _e ? _e : {})
|
|
33390
|
+
};
|
|
33391
|
+
}
|
|
33368
33392
|
}
|
|
33369
33393
|
}
|
|
33370
33394
|
getRelatedGraphic(item) {
|
|
@@ -33380,8 +33404,9 @@
|
|
|
33380
33404
|
labels = [];
|
|
33381
33405
|
for (let i = 0; i < data.length; i++) {
|
|
33382
33406
|
const textData = data[i],
|
|
33383
|
-
baseMark = this.getRelatedGraphic(textData)
|
|
33384
|
-
|
|
33407
|
+
baseMark = this.getRelatedGraphic(textData);
|
|
33408
|
+
if (!baseMark) continue;
|
|
33409
|
+
const labelAttribute = Object.assign(Object.assign({
|
|
33385
33410
|
fill: this._isCollectionBase ? isArray$1(baseMark.attribute.stroke) ? baseMark.attribute.stroke.find(entry => !!entry && !0 !== entry) : baseMark.attribute.stroke : baseMark.attribute.fill
|
|
33386
33411
|
}, textStyle), textData),
|
|
33387
33412
|
text = this._createLabelText(labelAttribute),
|
|
@@ -33399,7 +33424,7 @@
|
|
|
33399
33424
|
_overlapping(labels) {
|
|
33400
33425
|
var _a, _b, _c, _d;
|
|
33401
33426
|
if (0 === labels.length) return [];
|
|
33402
|
-
const option = this.attribute.overlap,
|
|
33427
|
+
const option = isObject$2(this.attribute.overlap) ? this.attribute.overlap : {},
|
|
33403
33428
|
result = [],
|
|
33404
33429
|
baseMarkGroup = this.getBaseMarkGroup(),
|
|
33405
33430
|
size = null !== (_a = option.size) && void 0 !== _a ? _a : {
|
|
@@ -33555,9 +33580,7 @@
|
|
|
33555
33580
|
duration: duration,
|
|
33556
33581
|
easing: easing
|
|
33557
33582
|
} = this._animationConfig.update;
|
|
33558
|
-
updateAnimation(prevText, text, this._animationConfig.update), prevLabel.labelLine && labelLine && prevLabel.labelLine.animate().to(
|
|
33559
|
-
points: labelLine.attribute.points
|
|
33560
|
-
}), duration, easing);
|
|
33583
|
+
updateAnimation(prevText, text, this._animationConfig.update), prevLabel.labelLine && labelLine && prevLabel.labelLine.animate().to(labelLine.attribute, duration, easing);
|
|
33561
33584
|
}
|
|
33562
33585
|
}), prevTextMap.forEach(label => {
|
|
33563
33586
|
var _a;
|
|
@@ -33585,9 +33608,7 @@
|
|
|
33585
33608
|
text: text
|
|
33586
33609
|
}), this.add(text), labelLine && this.add(labelLine), this._syncStateWithRelatedGraphic(relatedGraphic);else if ("update" === state) {
|
|
33587
33610
|
const prevLabel = prevTextMap.get(textKey);
|
|
33588
|
-
prevTextMap.delete(textKey), currentTextMap.set(textKey, prevLabel), prevLabel.text.setAttributes(text.attribute), prevLabel.labelLine && labelLine && prevLabel.labelLine.setAttributes(
|
|
33589
|
-
points: labelLine.attribute.points
|
|
33590
|
-
});
|
|
33611
|
+
prevTextMap.delete(textKey), currentTextMap.set(textKey, prevLabel), prevLabel.text.setAttributes(text.attribute), prevLabel.labelLine && labelLine && prevLabel.labelLine.setAttributes(labelLine.attribute);
|
|
33591
33612
|
}
|
|
33592
33613
|
}), prevTextMap.forEach(label => {
|
|
33593
33614
|
this.removeChild(label.text), label.labelLine && this.removeChild(label.labelLine);
|
|
@@ -33645,7 +33666,7 @@
|
|
|
33645
33666
|
}
|
|
33646
33667
|
_smartInvert(labels) {
|
|
33647
33668
|
var _a, _b, _c, _d, _e;
|
|
33648
|
-
const option = this.attribute.smartInvert
|
|
33669
|
+
const option = isObject$2(this.attribute.smartInvert) ? this.attribute.smartInvert : {},
|
|
33649
33670
|
{
|
|
33650
33671
|
textType: textType,
|
|
33651
33672
|
contrastRatiosThreshold: contrastRatiosThreshold,
|
|
@@ -33842,16 +33863,15 @@
|
|
|
33842
33863
|
getGraphicBounds(graphic) {
|
|
33843
33864
|
let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
33844
33865
|
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
|
|
33845
|
-
var _a;
|
|
33846
33866
|
if (!graphic || "line" !== graphic.type) return super.getGraphicBounds(graphic, point);
|
|
33847
|
-
const points =
|
|
33867
|
+
const points = graphic.attribute.points || [point],
|
|
33848
33868
|
index = "start" === position ? 0 : points.length - 1;
|
|
33849
|
-
return {
|
|
33869
|
+
return points[index] ? {
|
|
33850
33870
|
x1: points[index].x,
|
|
33851
33871
|
x2: points[index].x,
|
|
33852
33872
|
y1: points[index].y,
|
|
33853
33873
|
y2: points[index].y
|
|
33854
|
-
};
|
|
33874
|
+
} : void 0;
|
|
33855
33875
|
}
|
|
33856
33876
|
labeling(textBounds, graphicBounds) {
|
|
33857
33877
|
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
|
|
@@ -35540,6 +35560,7 @@
|
|
|
35540
35560
|
};
|
|
35541
35561
|
}
|
|
35542
35562
|
beforeLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
|
|
35563
|
+
var _a, _b, _c, _d;
|
|
35543
35564
|
const {
|
|
35544
35565
|
flush = !1
|
|
35545
35566
|
} = this.attribute.label || {};
|
|
@@ -35554,55 +35575,51 @@
|
|
|
35554
35575
|
last$1 = last(labelShapes),
|
|
35555
35576
|
isInverse = isX ? first.attribute.x > last$1.attribute.x : first.attribute.y < last$1.attribute.y;
|
|
35556
35577
|
if (isX) {
|
|
35557
|
-
|
|
35558
|
-
|
|
35559
|
-
|
|
35560
|
-
|
|
35561
|
-
|
|
35562
|
-
|
|
35563
|
-
|
|
35564
|
-
|
|
35565
|
-
|
|
35566
|
-
|
|
35578
|
+
const leftMostLabel = isInverse ? last$1 : first,
|
|
35579
|
+
rightMostLabel = isInverse ? first : last$1,
|
|
35580
|
+
left = axisStart.x,
|
|
35581
|
+
right = axisEnd.x,
|
|
35582
|
+
leftBound = leftMostLabel.AABBBounds.x1,
|
|
35583
|
+
rightBound = rightMostLabel.AABBBounds.x2;
|
|
35584
|
+
if (leftBound < left) {
|
|
35585
|
+
leftMostLabel.attribute.angle ? leftMostLabel.setAttributes({
|
|
35586
|
+
dx: (null !== (_a = leftMostLabel.attribute.dx) && void 0 !== _a ? _a : 0) + left - leftBound
|
|
35587
|
+
}) : leftMostLabel.setAttributes({
|
|
35588
|
+
x: left,
|
|
35567
35589
|
textAlign: "left"
|
|
35568
35590
|
});
|
|
35569
|
-
}
|
|
35570
|
-
|
|
35571
|
-
|
|
35572
|
-
|
|
35573
|
-
|
|
35574
|
-
|
|
35575
|
-
x: start,
|
|
35576
|
-
textAlign: "left"
|
|
35577
|
-
}), endBound > end && last$1.setAttributes({
|
|
35578
|
-
x: end,
|
|
35591
|
+
}
|
|
35592
|
+
if (rightBound > right) {
|
|
35593
|
+
rightMostLabel.attribute.angle ? rightMostLabel.setAttributes({
|
|
35594
|
+
dx: (null !== (_b = rightMostLabel.attribute.dx) && void 0 !== _b ? _b : 0) + right - rightBound
|
|
35595
|
+
}) : rightMostLabel.setAttributes({
|
|
35596
|
+
x: right,
|
|
35579
35597
|
textAlign: "right"
|
|
35580
35598
|
});
|
|
35581
35599
|
}
|
|
35582
|
-
} else if (isInverse) {
|
|
35583
|
-
const startBound = first.AABBBounds.y1,
|
|
35584
|
-
endBound = last$1.AABBBounds.y2,
|
|
35585
|
-
start = axisStart.y,
|
|
35586
|
-
end = axisEnd.y;
|
|
35587
|
-
startBound < start && first.setAttributes({
|
|
35588
|
-
y: start,
|
|
35589
|
-
textBaseline: "top"
|
|
35590
|
-
}), endBound > end && last$1.setAttributes({
|
|
35591
|
-
y: end,
|
|
35592
|
-
textBaseline: "bottom"
|
|
35593
|
-
});
|
|
35594
35600
|
} else {
|
|
35595
|
-
const
|
|
35596
|
-
|
|
35597
|
-
|
|
35598
|
-
|
|
35599
|
-
|
|
35600
|
-
y
|
|
35601
|
-
|
|
35602
|
-
|
|
35603
|
-
|
|
35604
|
-
|
|
35605
|
-
|
|
35601
|
+
const bottomMostLabel = isInverse ? last$1 : first,
|
|
35602
|
+
topMostLabel = isInverse ? first : last$1,
|
|
35603
|
+
bottomBound = bottomMostLabel.AABBBounds.y2,
|
|
35604
|
+
topBound = topMostLabel.AABBBounds.y1,
|
|
35605
|
+
top = axisStart.y,
|
|
35606
|
+
bottom = axisEnd.y;
|
|
35607
|
+
if (topBound < top) {
|
|
35608
|
+
topMostLabel.attribute.angle ? topMostLabel.setAttributes({
|
|
35609
|
+
dy: (null !== (_c = topMostLabel.attribute.dy) && void 0 !== _c ? _c : 0) + top - topBound
|
|
35610
|
+
}) : topMostLabel.setAttributes({
|
|
35611
|
+
y: top,
|
|
35612
|
+
textBaseline: "top"
|
|
35613
|
+
});
|
|
35614
|
+
}
|
|
35615
|
+
if (bottomBound > bottom) {
|
|
35616
|
+
bottomMostLabel.attribute.angle ? bottomMostLabel.setAttributes({
|
|
35617
|
+
dy: (null !== (_d = bottomMostLabel.attribute.dy) && void 0 !== _d ? _d : 0) + bottom - bottomBound
|
|
35618
|
+
}) : bottomMostLabel.setAttributes({
|
|
35619
|
+
y: bottom,
|
|
35620
|
+
textBaseline: "bottom"
|
|
35621
|
+
});
|
|
35622
|
+
}
|
|
35606
35623
|
}
|
|
35607
35624
|
}
|
|
35608
35625
|
}
|
|
@@ -40427,7 +40444,7 @@
|
|
|
40427
40444
|
const brushMoved = null === (_a = this.attribute.brushMoved) || void 0 === _a || _a;
|
|
40428
40445
|
this._activeMoveState = brushMoved && this._isPosInBrushMask(e), this._activeDrawState = !this._activeMoveState, this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e);
|
|
40429
40446
|
}, this._onBrushing = e => {
|
|
40430
|
-
this._outOfInteractiveRange(e) || (e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
|
|
40447
|
+
this._outOfInteractiveRange(e) || ((this._activeDrawState || this._activeMoveState) && e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
|
|
40431
40448
|
}, this._onBrushEnd = e => {
|
|
40432
40449
|
e.preventDefault();
|
|
40433
40450
|
const {
|
|
@@ -41857,7 +41874,9 @@
|
|
|
41857
41874
|
autoRender: !0,
|
|
41858
41875
|
pluginList: viewOptions.pluginList,
|
|
41859
41876
|
enableHtmlAttribute: viewOptions.enableHtmlAttribute,
|
|
41860
|
-
optimize: viewOptions.optimize
|
|
41877
|
+
optimize: viewOptions.optimize,
|
|
41878
|
+
supportsTouchEvents: viewOptions.supportsTouchEvents,
|
|
41879
|
+
supportsPointerEvents: viewOptions.supportsPointerEvents
|
|
41861
41880
|
});
|
|
41862
41881
|
(null === (_b = viewOptions.options3d) || void 0 === _b ? void 0 : _b.enable) && stage.set3dOptions(viewOptions.options3d), stage.enableIncrementalAutoRender(), this._viewBox = viewOptions.viewBox, this._view.emit(exports.VGRAMMAR_HOOK_EVENT.AFTER_CREATE_VRENDER_STAGE), this._view.emit(exports.VGRAMMAR_HOOK_EVENT.BEFORE_CREATE_VRENDER_LAYER);
|
|
41863
41882
|
const layer = null !== (_c = viewOptions.layer) && void 0 !== _c ? _c : stage.defaultLayer;
|
|
@@ -44960,10 +44979,18 @@
|
|
|
44960
44979
|
}
|
|
44961
44980
|
getMarksBySelector(selector) {
|
|
44962
44981
|
if (!selector) return null;
|
|
44963
|
-
const selectors = array(selector)
|
|
44964
|
-
|
|
44982
|
+
const selectors = array(selector),
|
|
44983
|
+
res = [];
|
|
44965
44984
|
return selectors.forEach(selectorStr => {
|
|
44966
|
-
|
|
44985
|
+
if (isGrammar(selectorStr)) return void res.push(selectorStr);
|
|
44986
|
+
if (selectorStr[0] === ID_PREFIX) {
|
|
44987
|
+
const mark = this.getMarkById(selectorStr.slice(1));
|
|
44988
|
+
return void (mark && res.push(mark));
|
|
44989
|
+
}
|
|
44990
|
+
const marks = selectorStr[0] === NAME_PREFIX ? this.getMarksByName(selectorStr.slice(1)) : isMarkType(selectorStr) ? this.getMarksByType(selectorStr) : null;
|
|
44991
|
+
marks && marks.length && marks.forEach(mark => {
|
|
44992
|
+
res.push(mark);
|
|
44993
|
+
});
|
|
44967
44994
|
}), res;
|
|
44968
44995
|
}
|
|
44969
44996
|
updateSignal(signal, value) {
|
|
@@ -50690,7 +50717,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50690
50717
|
return themes.has(name);
|
|
50691
50718
|
};
|
|
50692
50719
|
const getMergedTheme = (theme) => {
|
|
50693
|
-
|
|
50720
|
+
var _a;
|
|
50721
|
+
const baseThemeName = (_a = theme.type) !== null && _a !== void 0 ? _a : defaultThemeName;
|
|
50722
|
+
const baseTheme = getTheme(baseThemeName);
|
|
50694
50723
|
return mergeTheme({}, baseTheme, theme);
|
|
50695
50724
|
};
|
|
50696
50725
|
|
|
@@ -52099,13 +52128,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
52099
52128
|
const filter = handler.filter;
|
|
52100
52129
|
if (!handler.query || this._filter(filter, type, params)) {
|
|
52101
52130
|
const callback = handler.wrappedCallback || handler.callback;
|
|
52102
|
-
|
|
52103
|
-
|
|
52104
|
-
|
|
52131
|
+
const stopBubble = callback.call(null, this._prepareParams(filter, params));
|
|
52132
|
+
const doStopBubble = stopBubble !== null && stopBubble !== void 0 ? stopBubble : (_a = handler.query) === null || _a === void 0 ? void 0 : _a.consume;
|
|
52133
|
+
if (doStopBubble) {
|
|
52105
52134
|
(_b = params.event) === null || _b === void 0 ? void 0 : _b.stopPropagation();
|
|
52106
52135
|
(_c = params.event) === null || _c === void 0 ? void 0 : _c.preventDefault();
|
|
52107
52136
|
}
|
|
52108
|
-
return
|
|
52137
|
+
return !!doStopBubble;
|
|
52109
52138
|
}
|
|
52110
52139
|
return undefined;
|
|
52111
52140
|
});
|
|
@@ -53623,10 +53652,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53623
53652
|
return undefined;
|
|
53624
53653
|
}
|
|
53625
53654
|
transformSpec(spec, chartSpec, chartSpecInfo) {
|
|
53626
|
-
this.
|
|
53627
|
-
|
|
53655
|
+
this._transformSpecBeforeMergingTheme(spec, chartSpec, chartSpecInfo);
|
|
53656
|
+
const result = this._initTheme(spec, chartSpec);
|
|
53657
|
+
this._transformSpecAfterMergingTheme(result.spec, chartSpec, chartSpecInfo);
|
|
53658
|
+
return result;
|
|
53659
|
+
}
|
|
53660
|
+
_transformSpecBeforeMergingTheme(spec, chartSpec, chartSpecInfo) {
|
|
53628
53661
|
}
|
|
53629
|
-
|
|
53662
|
+
_transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
|
|
53630
53663
|
}
|
|
53631
53664
|
_mergeThemeToSpec(spec, chartSpec) {
|
|
53632
53665
|
const theme = this._theme;
|
|
@@ -53895,12 +53928,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53895
53928
|
set layoutOrient(v) {
|
|
53896
53929
|
this._layoutOrient = v;
|
|
53897
53930
|
}
|
|
53898
|
-
get indent() {
|
|
53899
|
-
return this._indent;
|
|
53900
|
-
}
|
|
53901
|
-
get layoutExcludeIndent() {
|
|
53902
|
-
return this._layoutExcludeIndent;
|
|
53903
|
-
}
|
|
53904
53931
|
get model() {
|
|
53905
53932
|
return this._model;
|
|
53906
53933
|
}
|
|
@@ -53935,18 +53962,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53935
53962
|
this.layoutPaddingTop = 0;
|
|
53936
53963
|
this.layoutPaddingRight = 0;
|
|
53937
53964
|
this.layoutPaddingBottom = 0;
|
|
53938
|
-
this._indent = {
|
|
53939
|
-
left: 0,
|
|
53940
|
-
top: 0,
|
|
53941
|
-
right: 0,
|
|
53942
|
-
bottom: 0
|
|
53943
|
-
};
|
|
53944
|
-
this._layoutExcludeIndent = {
|
|
53945
|
-
x: 0,
|
|
53946
|
-
y: 0,
|
|
53947
|
-
width: 0,
|
|
53948
|
-
height: 0
|
|
53949
|
-
};
|
|
53950
53965
|
this.layoutOffsetX = 0;
|
|
53951
53966
|
this.layoutOffsetY = 0;
|
|
53952
53967
|
this.layoutLevel = exports.LayoutLevel.Region;
|
|
@@ -53971,8 +53986,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53971
53986
|
this.layoutPaddingRight = paddingValue.right;
|
|
53972
53987
|
this.layoutPaddingTop = paddingValue.top;
|
|
53973
53988
|
this.layoutPaddingBottom = paddingValue.bottom;
|
|
53974
|
-
const indent = normalizeLayoutPaddingSpec(spec.indent);
|
|
53975
|
-
this._indent = calcPadding(indent, chartViewRect, chartViewRect);
|
|
53976
53989
|
this._minHeight = isNil$1(spec.minHeight)
|
|
53977
53990
|
? (_a = this._minHeight) !== null && _a !== void 0 ? _a : null
|
|
53978
53991
|
: calcLayoutNumber(spec.minHeight, chartViewRect.height, chartViewRect);
|
|
@@ -54083,8 +54096,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54083
54096
|
if (isValidNumber$1(pos.y)) {
|
|
54084
54097
|
this._layoutStartPoint.y = pos.y;
|
|
54085
54098
|
}
|
|
54086
|
-
this._layoutExcludeIndent.x = this._layoutStartPoint.x + this._indent.left;
|
|
54087
|
-
this._layoutExcludeIndent.y = this._layoutStartPoint.y + this._indent.top;
|
|
54088
54099
|
(_b = (_a = this._model).afterSetLayoutStartPoint) === null || _b === void 0 ? void 0 : _b.call(_a, this._layoutStartPoint);
|
|
54089
54100
|
}
|
|
54090
54101
|
setLayoutRect({ width, height }, levelMap) {
|
|
@@ -54098,8 +54109,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54098
54109
|
this._layoutRectLevelMap.height = (_d = levelMap === null || levelMap === void 0 ? void 0 : levelMap.height) !== null && _d !== void 0 ? _d : DEFAULT_LAYOUT_RECT_LEVEL;
|
|
54099
54110
|
}
|
|
54100
54111
|
this.setRectInSpec(this._layoutRect);
|
|
54101
|
-
this._layoutExcludeIndent.width = Math.max(this._layoutRect.width - this._indent.left - this._indent.right, 1);
|
|
54102
|
-
this._layoutExcludeIndent.height = Math.max(this._layoutRect.height - this._indent.top - this._indent.bottom, 1);
|
|
54103
54112
|
}
|
|
54104
54113
|
getLayout() {
|
|
54105
54114
|
return {
|
|
@@ -54267,18 +54276,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54267
54276
|
this._forceLayoutTag = true;
|
|
54268
54277
|
(_a = this._option.globalInstance.getChart()) === null || _a === void 0 ? void 0 : _a.setLayoutTag(true);
|
|
54269
54278
|
}
|
|
54270
|
-
getLayoutPositionExcludeIndent() {
|
|
54271
|
-
let { x, y } = this.getLayoutStartPoint();
|
|
54272
|
-
x += this._layout.indent.left;
|
|
54273
|
-
y += this._layout.indent.top;
|
|
54274
|
-
return { x, y };
|
|
54275
|
-
}
|
|
54276
|
-
getLayoutRectExcludeIndent() {
|
|
54277
|
-
let { width, height } = this.getLayoutRect();
|
|
54278
|
-
width -= this._layout.indent.left + this._layout.indent.right;
|
|
54279
|
-
height -= this._layout.indent.top + this._layout.indent.bottom;
|
|
54280
|
-
return { width, height };
|
|
54281
|
-
}
|
|
54282
54279
|
getLayoutStartPoint() {
|
|
54283
54280
|
return this._layout ? this._layout.getLayoutStartPoint() : this._layoutStartPos;
|
|
54284
54281
|
}
|
|
@@ -54628,10 +54625,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54628
54625
|
});
|
|
54629
54626
|
}
|
|
54630
54627
|
}
|
|
54631
|
-
function
|
|
54628
|
+
function layoutLeftRightStartOrMiddleItems(items, layout, limitHeight, isMiddle, position) {
|
|
54632
54629
|
if (items.length) {
|
|
54633
54630
|
let maxWidth = 0;
|
|
54634
|
-
|
|
54631
|
+
const isRight = position === 'right';
|
|
54632
|
+
const xSign = isRight ? -1 : 1;
|
|
54633
|
+
let preX = isRight ? layout.rightCurrent : layout.leftCurrent;
|
|
54635
54634
|
let preTop = layout.topCurrent;
|
|
54636
54635
|
const allItems = [];
|
|
54637
54636
|
let singleLineItems = [];
|
|
@@ -54641,18 +54640,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54641
54640
|
item.setLayoutRect(rect);
|
|
54642
54641
|
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54643
54642
|
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54643
|
+
const itemOffsetX = isRight ? -rect.width - item.layoutPaddingRight : item.layoutPaddingLeft;
|
|
54644
54644
|
item.setLayoutStartPosition({
|
|
54645
|
-
x:
|
|
54645
|
+
x: preX + item.layoutOffsetX + itemOffsetX,
|
|
54646
54646
|
y: preTop + item.layoutOffsetY + item.layoutPaddingTop
|
|
54647
54647
|
});
|
|
54648
54648
|
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54649
54649
|
preTop += itemTotalHeight;
|
|
54650
|
-
if (preTop > limitHeight) {
|
|
54651
|
-
|
|
54650
|
+
if (preTop > limitHeight && singleLineItems.length) {
|
|
54651
|
+
preX += xSign * maxWidth;
|
|
54652
54652
|
maxWidth = itemTotalWidth;
|
|
54653
54653
|
preTop = layout.topCurrent + itemTotalHeight;
|
|
54654
54654
|
item.setLayoutStartPosition({
|
|
54655
|
-
x:
|
|
54655
|
+
x: preX + item.layoutOffsetX + itemOffsetX,
|
|
54656
54656
|
y: layout.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
|
|
54657
54657
|
});
|
|
54658
54658
|
allItems.push(singleLineItems);
|
|
@@ -54666,55 +54666,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54666
54666
|
if (isMiddle) {
|
|
54667
54667
|
adjustItemsToCenter(allItems, true, limitHeight);
|
|
54668
54668
|
}
|
|
54669
|
-
|
|
54670
|
-
|
|
54671
|
-
|
|
54672
|
-
|
|
54673
|
-
|
|
54674
|
-
let maxWidth = 0;
|
|
54675
|
-
let preLeft = layout.leftCurrent;
|
|
54676
|
-
let preTop = layout.topCurrent;
|
|
54677
|
-
const allItems = [];
|
|
54678
|
-
let singleLineItems = [];
|
|
54679
|
-
items.forEach(item => {
|
|
54680
|
-
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54681
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
54682
|
-
item.setLayoutRect(rect);
|
|
54683
|
-
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54684
|
-
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54685
|
-
item.setLayoutStartPosition({
|
|
54686
|
-
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54687
|
-
y: preTop + item.layoutOffsetY + item.layoutPaddingTop
|
|
54688
|
-
});
|
|
54689
|
-
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54690
|
-
preTop += itemTotalHeight;
|
|
54691
|
-
if (preTop > limitHeight) {
|
|
54692
|
-
preLeft += maxWidth;
|
|
54693
|
-
maxWidth = itemTotalWidth;
|
|
54694
|
-
preTop = layout.topCurrent + itemTotalHeight;
|
|
54695
|
-
item.setLayoutStartPosition({
|
|
54696
|
-
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54697
|
-
y: layout.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
|
|
54698
|
-
});
|
|
54699
|
-
allItems.push(singleLineItems);
|
|
54700
|
-
singleLineItems = [item];
|
|
54701
|
-
}
|
|
54702
|
-
else {
|
|
54703
|
-
singleLineItems.push(item);
|
|
54704
|
-
}
|
|
54705
|
-
});
|
|
54706
|
-
allItems.push(singleLineItems);
|
|
54707
|
-
if (isMiddle) {
|
|
54708
|
-
adjustItemsToCenter(allItems, true, limitHeight);
|
|
54669
|
+
if (isRight) {
|
|
54670
|
+
layout.rightCurrent = preX + xSign * maxWidth;
|
|
54671
|
+
}
|
|
54672
|
+
else {
|
|
54673
|
+
layout.leftCurrent = preX + xSign * maxWidth;
|
|
54709
54674
|
}
|
|
54710
|
-
layout.leftCurrent = preLeft + maxWidth;
|
|
54711
54675
|
}
|
|
54712
54676
|
}
|
|
54713
|
-
function
|
|
54677
|
+
function layoutTopBottomStartOrMiddleItems(items, layout, limitWidth, isMiddle, position) {
|
|
54714
54678
|
if (items.length) {
|
|
54679
|
+
const isTop = position === 'top';
|
|
54680
|
+
const ySign = isTop ? 1 : -1;
|
|
54715
54681
|
let maxHeight = 0;
|
|
54716
54682
|
let preLeft = layout.leftCurrent;
|
|
54717
|
-
let
|
|
54683
|
+
let preY = isTop ? layout.topCurrent : layout.bottomCurrent;
|
|
54718
54684
|
const allItems = [];
|
|
54719
54685
|
let singleLineItems = [];
|
|
54720
54686
|
items.forEach(item => {
|
|
@@ -54723,19 +54689,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54723
54689
|
item.setLayoutRect(rect);
|
|
54724
54690
|
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54725
54691
|
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54692
|
+
const itemOffsetY = isTop ? item.layoutPaddingTop : -rect.height - item.layoutPaddingBottom;
|
|
54726
54693
|
item.setLayoutStartPosition({
|
|
54727
54694
|
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54728
|
-
y:
|
|
54695
|
+
y: preY + item.layoutOffsetY + itemOffsetY
|
|
54729
54696
|
});
|
|
54730
54697
|
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54731
54698
|
preLeft += itemTotalWidth;
|
|
54732
|
-
if (preLeft > limitWidth) {
|
|
54699
|
+
if (preLeft > limitWidth && singleLineItems.length) {
|
|
54733
54700
|
preLeft = layout.leftCurrent + itemTotalWidth;
|
|
54734
|
-
|
|
54701
|
+
preY += ySign * maxHeight;
|
|
54735
54702
|
maxHeight = itemTotalHeight;
|
|
54736
54703
|
item.setLayoutStartPosition({
|
|
54737
54704
|
x: layout.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54738
|
-
y:
|
|
54705
|
+
y: preY + item.layoutOffsetY + itemOffsetY
|
|
54739
54706
|
});
|
|
54740
54707
|
allItems.push(singleLineItems);
|
|
54741
54708
|
singleLineItems = [item];
|
|
@@ -54748,57 +54715,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54748
54715
|
if (isMiddle) {
|
|
54749
54716
|
adjustItemsToCenter(allItems, false, limitWidth);
|
|
54750
54717
|
}
|
|
54751
|
-
|
|
54752
|
-
|
|
54753
|
-
|
|
54754
|
-
|
|
54755
|
-
|
|
54756
|
-
let maxHeight = 0;
|
|
54757
|
-
let preLeft = layout.leftCurrent;
|
|
54758
|
-
let preBottom = layout.bottomCurrent;
|
|
54759
|
-
const allItems = [];
|
|
54760
|
-
let singleLineItems = [];
|
|
54761
|
-
items.forEach(item => {
|
|
54762
|
-
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54763
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
54764
|
-
item.setLayoutRect(rect);
|
|
54765
|
-
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54766
|
-
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54767
|
-
item.setLayoutStartPosition({
|
|
54768
|
-
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54769
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54770
|
-
});
|
|
54771
|
-
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54772
|
-
preLeft += itemTotalWidth;
|
|
54773
|
-
if (preLeft > limitWidth) {
|
|
54774
|
-
allItems.push(singleLineItems);
|
|
54775
|
-
preLeft = layout.leftCurrent + itemTotalWidth;
|
|
54776
|
-
preBottom -= maxHeight;
|
|
54777
|
-
maxHeight = itemTotalHeight;
|
|
54778
|
-
item.setLayoutStartPosition({
|
|
54779
|
-
x: layout.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54780
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54781
|
-
});
|
|
54782
|
-
singleLineItems = [item];
|
|
54783
|
-
}
|
|
54784
|
-
else {
|
|
54785
|
-
singleLineItems.push(item);
|
|
54786
|
-
}
|
|
54787
|
-
});
|
|
54788
|
-
allItems.push(singleLineItems);
|
|
54789
|
-
if (isMiddle) {
|
|
54790
|
-
adjustItemsToCenter(allItems, false, limitWidth);
|
|
54718
|
+
if (isTop) {
|
|
54719
|
+
layout.topCurrent = preY + ySign * maxHeight;
|
|
54720
|
+
}
|
|
54721
|
+
else {
|
|
54722
|
+
layout.bottomCurrent = preY + ySign * maxHeight;
|
|
54791
54723
|
}
|
|
54792
|
-
layout.bottomCurrent = preBottom - maxHeight;
|
|
54793
54724
|
}
|
|
54794
54725
|
}
|
|
54795
54726
|
function layoutLeftInlineItems(items, layout, limitHeight) {
|
|
54796
54727
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54797
54728
|
if (startItems.length) {
|
|
54798
|
-
|
|
54729
|
+
layoutLeftRightStartOrMiddleItems(startItems, layout, limitHeight, false, 'left');
|
|
54799
54730
|
}
|
|
54800
54731
|
if (middleItems.length) {
|
|
54801
|
-
|
|
54732
|
+
layoutLeftRightStartOrMiddleItems(middleItems, layout, limitHeight, true, 'left');
|
|
54802
54733
|
}
|
|
54803
54734
|
if (endItems.length) {
|
|
54804
54735
|
let maxWidth = 0;
|
|
@@ -54834,10 +54765,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54834
54765
|
function layoutRightInlineItems(items, layout, limitHeight) {
|
|
54835
54766
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54836
54767
|
if (startItems.length) {
|
|
54837
|
-
|
|
54768
|
+
layoutLeftRightStartOrMiddleItems(startItems, layout, limitHeight, false, 'right');
|
|
54838
54769
|
}
|
|
54839
54770
|
if (middleItems.length) {
|
|
54840
|
-
|
|
54771
|
+
layoutLeftRightStartOrMiddleItems(middleItems, layout, limitHeight, true, 'right');
|
|
54841
54772
|
}
|
|
54842
54773
|
if (endItems.length) {
|
|
54843
54774
|
let maxWidth = 0;
|
|
@@ -54873,10 +54804,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54873
54804
|
function layoutTopInlineItems(items, layout, limitWidth) {
|
|
54874
54805
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54875
54806
|
if (startItems.length) {
|
|
54876
|
-
|
|
54807
|
+
layoutTopBottomStartOrMiddleItems(startItems, layout, limitWidth, false, 'top');
|
|
54877
54808
|
}
|
|
54878
54809
|
if (middleItems.length) {
|
|
54879
|
-
|
|
54810
|
+
layoutTopBottomStartOrMiddleItems(middleItems, layout, limitWidth, true, 'top');
|
|
54880
54811
|
}
|
|
54881
54812
|
if (endItems.length) {
|
|
54882
54813
|
let maxHeight = 0;
|
|
@@ -54912,10 +54843,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54912
54843
|
function layoutBottomInlineItems(items, layout, limitWidth) {
|
|
54913
54844
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54914
54845
|
if (startItems.length) {
|
|
54915
|
-
|
|
54846
|
+
layoutTopBottomStartOrMiddleItems(startItems, layout, limitWidth, false, 'bottom');
|
|
54916
54847
|
}
|
|
54917
54848
|
if (middleItems.length) {
|
|
54918
|
-
|
|
54849
|
+
layoutTopBottomStartOrMiddleItems(middleItems, layout, limitWidth, true, 'bottom');
|
|
54919
54850
|
}
|
|
54920
54851
|
if (endItems.length) {
|
|
54921
54852
|
let maxHeight = 0;
|
|
@@ -54957,7 +54888,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54957
54888
|
this.bottomCurrent = 0;
|
|
54958
54889
|
this._onError = ctx === null || ctx === void 0 ? void 0 : ctx.onError;
|
|
54959
54890
|
}
|
|
54960
|
-
|
|
54891
|
+
_layoutInit(_chart, items, chartLayoutRect, chartViewBox) {
|
|
54961
54892
|
this._chartLayoutRect = chartLayoutRect;
|
|
54962
54893
|
this._chartViewBox = chartViewBox;
|
|
54963
54894
|
this.leftCurrent = chartLayoutRect.x;
|
|
@@ -54965,28 +54896,65 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54965
54896
|
this.rightCurrent = chartLayoutRect.x + chartLayoutRect.width;
|
|
54966
54897
|
this.bottomCurrent = chartLayoutRect.height + chartLayoutRect.y;
|
|
54967
54898
|
items.sort((a, b) => b.layoutLevel - a.layoutLevel);
|
|
54899
|
+
}
|
|
54900
|
+
_layoutNormalItems(items) {
|
|
54968
54901
|
this.layoutNormalInlineItems(items.filter(x => x.layoutType === 'normal-inline'));
|
|
54969
54902
|
this.layoutNormalItems(items.filter(x => x.layoutType === 'normal'));
|
|
54903
|
+
}
|
|
54904
|
+
_groupItems(items) {
|
|
54905
|
+
const regionItems = items.filter(x => x.layoutType === 'region');
|
|
54906
|
+
const relativeItems = items.filter(x => x.layoutType === 'region-relative');
|
|
54907
|
+
const relativeOverlapItems = items.filter(x => x.layoutType === 'region-relative-overlap');
|
|
54908
|
+
const allRelatives = relativeItems.concat(relativeOverlapItems);
|
|
54909
|
+
const overlapItems = {
|
|
54910
|
+
left: { items: [], rect: { width: 0, height: 0 } },
|
|
54911
|
+
right: { items: [], rect: { width: 0, height: 0 } },
|
|
54912
|
+
top: { items: [], rect: { width: 0, height: 0 } },
|
|
54913
|
+
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
54914
|
+
z: { items: [], rect: { width: 0, height: 0 } }
|
|
54915
|
+
};
|
|
54916
|
+
relativeOverlapItems.forEach(i => {
|
|
54917
|
+
overlapItems[i.layoutOrient].items.push(i);
|
|
54918
|
+
});
|
|
54919
|
+
return {
|
|
54920
|
+
regionItems,
|
|
54921
|
+
relativeItems,
|
|
54922
|
+
relativeOverlapItems,
|
|
54923
|
+
allRelatives,
|
|
54924
|
+
overlapItems
|
|
54925
|
+
};
|
|
54926
|
+
}
|
|
54927
|
+
layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
|
|
54928
|
+
this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
|
|
54929
|
+
this._layoutNormalItems(items);
|
|
54970
54930
|
const layoutTemp = {
|
|
54971
54931
|
left: this.leftCurrent,
|
|
54972
54932
|
top: this.topCurrent,
|
|
54973
54933
|
right: this.rightCurrent,
|
|
54974
54934
|
bottom: this.bottomCurrent
|
|
54975
54935
|
};
|
|
54976
|
-
const regionItems
|
|
54977
|
-
|
|
54978
|
-
this.
|
|
54979
|
-
|
|
54980
|
-
|
|
54936
|
+
const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
|
|
54937
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
54938
|
+
this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp);
|
|
54939
|
+
this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
|
|
54940
|
+
}
|
|
54941
|
+
_processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems = {
|
|
54942
|
+
left: { items: [], rect: { width: 0, height: 0 } },
|
|
54943
|
+
right: { items: [], rect: { width: 0, height: 0 } },
|
|
54944
|
+
top: { items: [], rect: { width: 0, height: 0 } },
|
|
54945
|
+
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
54946
|
+
z: { items: [], rect: { width: 0, height: 0 } }
|
|
54947
|
+
}, allRelatives, layoutTemp) {
|
|
54948
|
+
if (allRelatives.some(i => i.autoIndent)) {
|
|
54949
|
+
const { top, bottom, left, right } = this._checkAutoIndent(allRelatives, layoutTemp);
|
|
54981
54950
|
if (top || bottom || left || right) {
|
|
54982
54951
|
this.topCurrent = layoutTemp.top + top;
|
|
54983
54952
|
this.bottomCurrent = layoutTemp.bottom - bottom;
|
|
54984
54953
|
this.leftCurrent = layoutTemp.left + left;
|
|
54985
54954
|
this.rightCurrent = layoutTemp.right - right;
|
|
54986
|
-
this.layoutRegionItems(regionItems, relativeItems);
|
|
54955
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
54987
54956
|
}
|
|
54988
54957
|
}
|
|
54989
|
-
this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
|
|
54990
54958
|
}
|
|
54991
54959
|
layoutNormalItems(normalItems) {
|
|
54992
54960
|
normalItems.forEach(item => {
|
|
@@ -55030,54 +54998,88 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55030
54998
|
const bottomItems = normalItems.filter(item => item.layoutOrient === 'bottom');
|
|
55031
54999
|
const limitWidth = this._chartLayoutRect.width + this._chartLayoutRect.x;
|
|
55032
55000
|
const limitHeight = this._chartLayoutRect.height + this._chartLayoutRect.y;
|
|
55033
|
-
layoutLeftInlineItems(leftItems, this, limitHeight);
|
|
55034
|
-
layoutTopInlineItems(topItems, this, limitWidth);
|
|
55035
|
-
layoutRightInlineItems(rightItems, this, limitHeight);
|
|
55036
|
-
layoutBottomInlineItems(bottomItems, this, limitWidth);
|
|
55001
|
+
leftItems.length && layoutLeftInlineItems(leftItems, this, limitHeight);
|
|
55002
|
+
topItems.length && layoutTopInlineItems(topItems, this, limitWidth);
|
|
55003
|
+
rightItems.length && layoutRightInlineItems(rightItems, this, limitHeight);
|
|
55004
|
+
bottomItems.length && layoutBottomInlineItems(bottomItems, this, limitWidth);
|
|
55037
55005
|
}
|
|
55038
|
-
|
|
55039
|
-
|
|
55040
|
-
let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
55041
|
-
regionRelativeItems
|
|
55042
|
-
.filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
|
|
55043
|
-
.forEach(item => {
|
|
55006
|
+
_layoutRelativeOverlap(orient, info) {
|
|
55007
|
+
info.items.forEach((item) => {
|
|
55044
55008
|
const layoutRect = this.getItemComputeLayoutRect(item);
|
|
55045
55009
|
const rect = item.computeBoundsInRect(layoutRect);
|
|
55046
|
-
|
|
55047
|
-
|
|
55010
|
+
info.rect.width = Math.max(rect.width, info.rect.width);
|
|
55011
|
+
info.rect.height = Math.max(rect.height, info.rect.height);
|
|
55012
|
+
});
|
|
55013
|
+
info.items.forEach((item) => {
|
|
55014
|
+
item.setLayoutRect(info.rect);
|
|
55015
|
+
if (orient === 'left') {
|
|
55048
55016
|
item.setLayoutStartPosition({
|
|
55049
55017
|
x: this.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55050
55018
|
});
|
|
55051
|
-
this.leftCurrent += rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
55052
55019
|
}
|
|
55053
|
-
else if (
|
|
55054
|
-
this.rightCurrent -= rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
55020
|
+
else if (orient === 'right') {
|
|
55055
55021
|
item.setLayoutStartPosition({
|
|
55056
55022
|
x: this.rightCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55057
55023
|
});
|
|
55058
55024
|
}
|
|
55059
|
-
|
|
55060
|
-
regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
55061
|
-
regionRelativeItems
|
|
55062
|
-
.filter(x => x.layoutOrient === 'top' || x.layoutOrient === 'bottom')
|
|
55063
|
-
.forEach(item => {
|
|
55064
|
-
const layoutRect = this.getItemComputeLayoutRect(item);
|
|
55065
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
55066
|
-
item.setLayoutRect({ height: rect.height });
|
|
55067
|
-
if (item.layoutOrient === 'top') {
|
|
55025
|
+
else if (orient === 'top') {
|
|
55068
55026
|
item.setLayoutStartPosition({
|
|
55069
|
-
|
|
55027
|
+
x: this.topCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55070
55028
|
});
|
|
55071
|
-
this.topCurrent += rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
55072
55029
|
}
|
|
55073
|
-
else
|
|
55074
|
-
this.bottomCurrent -= rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
55030
|
+
else {
|
|
55075
55031
|
item.setLayoutStartPosition({
|
|
55076
|
-
|
|
55032
|
+
x: this.bottomCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55077
55033
|
});
|
|
55078
55034
|
}
|
|
55079
55035
|
});
|
|
55080
|
-
|
|
55036
|
+
if (orient === 'left') {
|
|
55037
|
+
this.leftCurrent += info.rect.width;
|
|
55038
|
+
}
|
|
55039
|
+
else if (orient === 'right') {
|
|
55040
|
+
this.rightCurrent -= info.rect.width;
|
|
55041
|
+
}
|
|
55042
|
+
else if (orient === 'top') {
|
|
55043
|
+
this.topCurrent += info.rect.height;
|
|
55044
|
+
}
|
|
55045
|
+
else {
|
|
55046
|
+
this.bottomCurrent -= info.rect.height;
|
|
55047
|
+
}
|
|
55048
|
+
}
|
|
55049
|
+
_layoutRelativeItem(item, layoutRect) {
|
|
55050
|
+
const rect = item.computeBoundsInRect(layoutRect);
|
|
55051
|
+
if (item.layoutOrient === 'left' || item.layoutOrient === 'right') {
|
|
55052
|
+
item.setLayoutRect({ width: rect.width });
|
|
55053
|
+
}
|
|
55054
|
+
else {
|
|
55055
|
+
item.setLayoutRect({ height: rect.height });
|
|
55056
|
+
}
|
|
55057
|
+
if (item.layoutOrient === 'left') {
|
|
55058
|
+
item.setLayoutStartPosition({
|
|
55059
|
+
x: this.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55060
|
+
});
|
|
55061
|
+
this.leftCurrent += rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
55062
|
+
}
|
|
55063
|
+
else if (item.layoutOrient === 'right') {
|
|
55064
|
+
this.rightCurrent -= rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
55065
|
+
item.setLayoutStartPosition({
|
|
55066
|
+
x: this.rightCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55067
|
+
});
|
|
55068
|
+
}
|
|
55069
|
+
else if (item.layoutOrient === 'top') {
|
|
55070
|
+
item.setLayoutStartPosition({
|
|
55071
|
+
y: this.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
|
|
55072
|
+
});
|
|
55073
|
+
this.topCurrent += rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
55074
|
+
}
|
|
55075
|
+
else if (item.layoutOrient === 'bottom') {
|
|
55076
|
+
this.bottomCurrent -= rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
55077
|
+
item.setLayoutStartPosition({
|
|
55078
|
+
y: this.bottomCurrent + item.layoutOffsetY + item.layoutPaddingTop
|
|
55079
|
+
});
|
|
55080
|
+
}
|
|
55081
|
+
}
|
|
55082
|
+
_layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight) {
|
|
55081
55083
|
const regionWidth = Math.max(Math.min(regionRelativeTotalWidth, ...regionItems.map(region => { var _a; return (_a = region.maxWidth) !== null && _a !== void 0 ? _a : Number.MAX_VALUE; })), 0);
|
|
55082
55084
|
const regionHeight = Math.max(Math.min(regionRelativeTotalHeight, ...regionItems.map(region => { var _a; return (_a = region.maxHeight) !== null && _a !== void 0 ? _a : Number.MAX_VALUE; })), 0);
|
|
55083
55085
|
regionItems.forEach(region => {
|
|
@@ -55090,14 +55092,45 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55090
55092
|
y: this.topCurrent + region.layoutOffsetY + region.layoutPaddingTop
|
|
55091
55093
|
});
|
|
55092
55094
|
});
|
|
55093
|
-
|
|
55095
|
+
return {
|
|
55096
|
+
regionHeight,
|
|
55097
|
+
regionWidth
|
|
55098
|
+
};
|
|
55099
|
+
}
|
|
55100
|
+
layoutRegionItems(regionItems, regionRelativeItems, regionRelativeOverlapItems, overlapItems = {
|
|
55101
|
+
left: { items: [], rect: { width: 0, height: 0 } },
|
|
55102
|
+
right: { items: [], rect: { width: 0, height: 0 } },
|
|
55103
|
+
top: { items: [], rect: { width: 0, height: 0 } },
|
|
55104
|
+
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
55105
|
+
z: { items: [], rect: { width: 0, height: 0 } }
|
|
55106
|
+
}) {
|
|
55107
|
+
let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
55108
|
+
let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
55109
|
+
regionRelativeItems
|
|
55110
|
+
.filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
|
|
55111
|
+
.forEach(item => {
|
|
55112
|
+
this._layoutRelativeItem(item, this.getItemComputeLayoutRect(item));
|
|
55113
|
+
});
|
|
55114
|
+
this._layoutRelativeOverlap('left', overlapItems.left);
|
|
55115
|
+
this._layoutRelativeOverlap('right', overlapItems.right);
|
|
55116
|
+
regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
55117
|
+
regionRelativeItems
|
|
55118
|
+
.filter(x => x.layoutOrient === 'top' || x.layoutOrient === 'bottom')
|
|
55119
|
+
.forEach(item => {
|
|
55120
|
+
this._layoutRelativeItem(item, this.getItemComputeLayoutRect(item));
|
|
55121
|
+
});
|
|
55122
|
+
this._layoutRelativeOverlap('top', overlapItems.top);
|
|
55123
|
+
this._layoutRelativeOverlap('bottom', overlapItems.bottom);
|
|
55124
|
+
regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
55125
|
+
const { regionWidth, regionHeight } = this._layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight);
|
|
55126
|
+
regionRelativeItems.concat(regionRelativeOverlapItems).forEach(item => {
|
|
55094
55127
|
if (['left', 'right'].includes(item.layoutOrient)) {
|
|
55095
55128
|
const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
|
|
55096
55129
|
item.setLayoutRect({
|
|
55097
|
-
height: relativeRegion.
|
|
55130
|
+
height: relativeRegion.getLayoutRect().height
|
|
55098
55131
|
});
|
|
55099
55132
|
item.setLayoutStartPosition({
|
|
55100
|
-
y: relativeRegion.
|
|
55133
|
+
y: relativeRegion.getLayoutStartPoint().y + item.layoutOffsetY + item.layoutPaddingTop
|
|
55101
55134
|
});
|
|
55102
55135
|
if (item.layoutOrient === 'right') {
|
|
55103
55136
|
item.setLayoutStartPosition({
|
|
@@ -55108,10 +55141,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55108
55141
|
else if (['top', 'bottom'].includes(item.layoutOrient)) {
|
|
55109
55142
|
const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
|
|
55110
55143
|
item.setLayoutRect({
|
|
55111
|
-
width: relativeRegion.
|
|
55144
|
+
width: relativeRegion.getLayoutRect().width
|
|
55112
55145
|
});
|
|
55113
55146
|
item.setLayoutStartPosition({
|
|
55114
|
-
x: relativeRegion.
|
|
55147
|
+
x: relativeRegion.getLayoutStartPoint().x + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55115
55148
|
});
|
|
55116
55149
|
if (item.layoutOrient === 'bottom') {
|
|
55117
55150
|
item.setLayoutStartPosition({
|
|
@@ -56382,7 +56415,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56382
56415
|
update: [
|
|
56383
56416
|
{
|
|
56384
56417
|
type: 'update',
|
|
56385
|
-
options: { excludeChannels: 'points' }
|
|
56418
|
+
options: { excludeChannels: ['points', 'defined'] }
|
|
56386
56419
|
},
|
|
56387
56420
|
{
|
|
56388
56421
|
channel: ['points'],
|
|
@@ -57649,7 +57682,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57649
57682
|
const handledDatum = series
|
|
57650
57683
|
.getViewData()
|
|
57651
57684
|
.latestData.find((viewDatum) => keys.every(k => viewDatum[k] == datum[k]));
|
|
57652
|
-
const seriesLayoutStartPoint = series.getRegion().
|
|
57685
|
+
const seriesLayoutStartPoint = series.getRegion().getLayoutStartPoint();
|
|
57653
57686
|
let point;
|
|
57654
57687
|
if (handledDatum) {
|
|
57655
57688
|
point = series.dataToPosition(handledDatum);
|
|
@@ -58131,7 +58164,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58131
58164
|
registerChartPlugin(MediaQuery);
|
|
58132
58165
|
};
|
|
58133
58166
|
|
|
58134
|
-
const version = "1.8.
|
|
58167
|
+
const version = "1.8.10-alpha.0";
|
|
58135
58168
|
|
|
58136
58169
|
var ChartTypeEnum;
|
|
58137
58170
|
(function (ChartTypeEnum) {
|
|
@@ -58984,8 +59017,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58984
59017
|
return mergeSpec({}, theme, themeWithDirection);
|
|
58985
59018
|
}
|
|
58986
59019
|
transformSpec(spec, chartSpec, chartSpecInfo) {
|
|
58987
|
-
|
|
58988
|
-
const result = this._initTheme(spec, chartSpec);
|
|
59020
|
+
const result = super.transformSpec(spec, chartSpec, chartSpecInfo);
|
|
58989
59021
|
this._transformLabelSpec(result.spec);
|
|
58990
59022
|
return Object.assign(Object.assign({}, result), { markLabelSpec: this.markLabelSpec });
|
|
58991
59023
|
}
|
|
@@ -59019,7 +59051,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59019
59051
|
return this._region;
|
|
59020
59052
|
}
|
|
59021
59053
|
getLayoutStartPoint() {
|
|
59022
|
-
return this._region.
|
|
59054
|
+
return this._region.getLayoutStartPoint();
|
|
59023
59055
|
}
|
|
59024
59056
|
getRootMark() {
|
|
59025
59057
|
return this._rootMark;
|
|
@@ -59111,8 +59143,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59111
59143
|
this.getLayoutRect = () => {
|
|
59112
59144
|
var _a, _b;
|
|
59113
59145
|
return {
|
|
59114
|
-
width: (_a = this._layoutRect.width) !== null && _a !== void 0 ? _a : this._region.
|
|
59115
|
-
height: (_b = this._layoutRect.height) !== null && _b !== void 0 ? _b : this._region.
|
|
59146
|
+
width: (_a = this._layoutRect.width) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().width,
|
|
59147
|
+
height: (_b = this._layoutRect.height) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height
|
|
59116
59148
|
};
|
|
59117
59149
|
};
|
|
59118
59150
|
this._rootMark = null;
|
|
@@ -59242,7 +59274,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59242
59274
|
}
|
|
59243
59275
|
}
|
|
59244
59276
|
getRawDataStatisticsByField(field, isNumeric) {
|
|
59245
|
-
var _a;
|
|
59277
|
+
var _a, _b;
|
|
59246
59278
|
if (!this._rawStatisticsCache) {
|
|
59247
59279
|
this._rawStatisticsCache = {};
|
|
59248
59280
|
}
|
|
@@ -59254,9 +59286,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59254
59286
|
this._rawStatisticsCache[field] = this._viewDataStatistics.latestData[field];
|
|
59255
59287
|
}
|
|
59256
59288
|
else if (this._rawData) {
|
|
59257
|
-
|
|
59258
|
-
|
|
59259
|
-
|
|
59289
|
+
const fieldInfo = (_b = this._rawData.getFields()) === null || _b === void 0 ? void 0 : _b[field];
|
|
59290
|
+
if (fieldInfo && fieldInfo.lockStatisticsByDomain && fieldInfo.domain) {
|
|
59291
|
+
this._rawStatisticsCache[field] = {};
|
|
59292
|
+
if (isNumeric) {
|
|
59293
|
+
this._rawStatisticsCache[field].min = Math.min(fieldInfo.domain);
|
|
59294
|
+
this._rawStatisticsCache[field].max = Math.max(fieldInfo.domain);
|
|
59295
|
+
}
|
|
59296
|
+
else {
|
|
59297
|
+
this._rawStatisticsCache[field].values = fieldInfo.domain;
|
|
59298
|
+
}
|
|
59299
|
+
}
|
|
59300
|
+
else {
|
|
59301
|
+
this._rawStatisticsCache[field] = dimensionStatisticsOfSimpleData(this._rawData.latestData, [
|
|
59302
|
+
{ key: field, operations: isNumeric ? ['min', 'max'] : ['values'] }
|
|
59303
|
+
])[field];
|
|
59304
|
+
}
|
|
59260
59305
|
}
|
|
59261
59306
|
}
|
|
59262
59307
|
return this._rawStatisticsCache[field];
|
|
@@ -59431,10 +59476,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59431
59476
|
parent: (_b = (_a = this._region).getGroupMark) === null || _b === void 0 ? void 0 : _b.call(_a),
|
|
59432
59477
|
dataView: false
|
|
59433
59478
|
});
|
|
59434
|
-
this.setMarkStyle(this._rootMark, {
|
|
59435
|
-
x: () => this._region.layout.indent.left,
|
|
59436
|
-
y: () => this._region.layout.indent.top
|
|
59437
|
-
}, 'normal', exports.AttributeLevel.Base_Series);
|
|
59438
59479
|
this._rootMark.setZIndex(this.layoutZIndex);
|
|
59439
59480
|
}
|
|
59440
59481
|
_initExtensionMark(options) {
|
|
@@ -60346,9 +60387,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60346
60387
|
}
|
|
60347
60388
|
}
|
|
60348
60389
|
_sortDataInAxisDomain() {
|
|
60349
|
-
var _a, _b;
|
|
60390
|
+
var _a, _b, _c;
|
|
60350
60391
|
if ((_b = (_a = this.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData) === null || _b === void 0 ? void 0 : _b.length) {
|
|
60351
60392
|
sortDataInAxisHelper(this._direction === Direction.horizontal ? this._yAxisHelper : this._xAxisHelper, this._direction === Direction.horizontal ? this._fieldY[0] : this._fieldX[0], this.getViewData().latestData);
|
|
60393
|
+
(_c = this._data) === null || _c === void 0 ? void 0 : _c.updateData(true);
|
|
60352
60394
|
}
|
|
60353
60395
|
}
|
|
60354
60396
|
reInit(spec) {
|
|
@@ -60365,7 +60407,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60365
60407
|
class LineLikeSeriesMixin {
|
|
60366
60408
|
addSamplingCompile() {
|
|
60367
60409
|
if (this._spec.sampling) {
|
|
60368
|
-
const { width, height } = this._region.
|
|
60410
|
+
const { width, height } = this._region.getLayoutRect();
|
|
60369
60411
|
const samplingTrans = [];
|
|
60370
60412
|
const fieldsY = this._fieldY;
|
|
60371
60413
|
const fieldsX = this._fieldX;
|
|
@@ -62540,58 +62582,56 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62540
62582
|
this._addMarkLabelSpec(spec, exports.SeriesMarkNameEnum.area);
|
|
62541
62583
|
}
|
|
62542
62584
|
}
|
|
62543
|
-
|
|
62544
|
-
|
|
62545
|
-
|
|
62546
|
-
|
|
62547
|
-
|
|
62548
|
-
|
|
62549
|
-
|
|
62550
|
-
|
|
62551
|
-
|
|
62552
|
-
|
|
62553
|
-
|
|
62554
|
-
|
|
62555
|
-
|
|
62556
|
-
|
|
62557
|
-
|
|
62558
|
-
|
|
62559
|
-
|
|
62560
|
-
areaSpec.interactive = areaSpec.interactive || lineSpec.interactive;
|
|
62561
|
-
areaSpec.support3d = areaSpec.support3d || lineSpec.support3d;
|
|
62562
|
-
areaSpec.zIndex =
|
|
62563
|
-
isValid$1(areaSpec.zIndex) || isValid$1(lineSpec.zIndex)
|
|
62564
|
-
? Math.max((_j = areaSpec.zIndex) !== null && _j !== void 0 ? _j : 0, (_k = lineSpec.zIndex) !== null && _k !== void 0 ? _k : 0)
|
|
62565
|
-
: undefined;
|
|
62566
|
-
if (areaSpec.style) {
|
|
62567
|
-
delete areaSpec.style.stroke;
|
|
62568
|
-
}
|
|
62569
|
-
if (areaSpec.state) {
|
|
62570
|
-
Object.keys(areaSpec.state).forEach(state => {
|
|
62571
|
-
if ('style' in areaSpec.state[state]) {
|
|
62572
|
-
delete areaSpec.state[state].style.stroke;
|
|
62585
|
+
_transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
|
|
62586
|
+
var _a, _b, _c, _d, _e;
|
|
62587
|
+
super._transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo);
|
|
62588
|
+
const { area = {}, line = {}, seriesMark = 'area' } = spec;
|
|
62589
|
+
const isAreaVisible = area.visible !== false && ((_a = area.style) === null || _a === void 0 ? void 0 : _a.visible) !== false;
|
|
62590
|
+
const isLineVisible = line.visible !== false && ((_b = line.style) === null || _b === void 0 ? void 0 : _b.visible) !== false;
|
|
62591
|
+
area.interactive = !!(area.interactive || ((_c = line.interactive) !== null && _c !== void 0 ? _c : true));
|
|
62592
|
+
area.support3d = !!(area.support3d || line.support3d);
|
|
62593
|
+
area.zIndex =
|
|
62594
|
+
isValid$1(area.zIndex) || isValid$1(line.zIndex) ? Math.max((_d = area.zIndex) !== null && _d !== void 0 ? _d : 0, (_e = line.zIndex) !== null && _e !== void 0 ? _e : 0) : undefined;
|
|
62595
|
+
if (area.style) {
|
|
62596
|
+
delete area.style.stroke;
|
|
62597
|
+
}
|
|
62598
|
+
if (area.state) {
|
|
62599
|
+
Object.keys(area.state).forEach(state => {
|
|
62600
|
+
if ('style' in area.state[state]) {
|
|
62601
|
+
delete area.state[state].style.stroke;
|
|
62573
62602
|
}
|
|
62574
62603
|
else {
|
|
62575
|
-
delete
|
|
62604
|
+
delete area.state[state].stroke;
|
|
62576
62605
|
}
|
|
62577
62606
|
});
|
|
62578
62607
|
}
|
|
62579
|
-
let mainSpec =
|
|
62580
|
-
let subSpec =
|
|
62581
|
-
const seriesMark = (_l = this._spec.seriesMark) !== null && _l !== void 0 ? _l : 'area';
|
|
62608
|
+
let mainSpec = area;
|
|
62609
|
+
let subSpec = line;
|
|
62582
62610
|
if (seriesMark === 'line' || (isLineVisible && !isAreaVisible)) {
|
|
62583
|
-
mainSpec =
|
|
62584
|
-
subSpec =
|
|
62611
|
+
mainSpec = line;
|
|
62612
|
+
subSpec = area;
|
|
62585
62613
|
}
|
|
62586
|
-
|
|
62587
|
-
|
|
62614
|
+
area.style = mergeSpec({}, subSpec.style, mainSpec.style);
|
|
62615
|
+
area.state = mergeSpec({}, subSpec.state, mainSpec.state);
|
|
62588
62616
|
if (!isAreaVisible) {
|
|
62589
|
-
|
|
62617
|
+
area.style.fill = false;
|
|
62590
62618
|
}
|
|
62591
62619
|
if (!isLineVisible) {
|
|
62592
|
-
|
|
62620
|
+
area.style.stroke = false;
|
|
62593
62621
|
}
|
|
62594
|
-
|
|
62622
|
+
area.visible = !(!isAreaVisible && !isLineVisible);
|
|
62623
|
+
spec.area = area;
|
|
62624
|
+
spec.line = line;
|
|
62625
|
+
}
|
|
62626
|
+
}
|
|
62627
|
+
|
|
62628
|
+
class AreaSeries extends CartesianSeries {
|
|
62629
|
+
constructor() {
|
|
62630
|
+
super(...arguments);
|
|
62631
|
+
this.type = exports.SeriesTypeEnum.area;
|
|
62632
|
+
this.transformerConstructor = AreaSeriesSpecTransformer;
|
|
62633
|
+
this._supportStack = true;
|
|
62634
|
+
this._sortDataByAxis = false;
|
|
62595
62635
|
}
|
|
62596
62636
|
initMark() {
|
|
62597
62637
|
var _a, _b, _c, _d, _e;
|
|
@@ -63347,7 +63387,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63347
63387
|
compile() {
|
|
63348
63388
|
super.compile();
|
|
63349
63389
|
if (this._spec.sampling) {
|
|
63350
|
-
const { width, height } = this._region.
|
|
63390
|
+
const { width, height } = this._region.getLayoutRect();
|
|
63351
63391
|
const samplingTrans = [];
|
|
63352
63392
|
const fieldsY = this._fieldY;
|
|
63353
63393
|
const fieldsX = this._fieldX;
|
|
@@ -64862,30 +64902,32 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64862
64902
|
}
|
|
64863
64903
|
}
|
|
64864
64904
|
_scrollEventDispatch(params, regionOrSeries, callback) {
|
|
64905
|
+
let stopBubble = false;
|
|
64865
64906
|
if (!this._isGestureListener && (!params.event || this._option.disableTriggerEvent)) {
|
|
64866
|
-
return;
|
|
64907
|
+
return stopBubble;
|
|
64867
64908
|
}
|
|
64868
64909
|
const event = this._isGestureListener ? params : params.event;
|
|
64869
64910
|
this._zoomableTrigger.parserScrollEvent(event);
|
|
64870
64911
|
const { scrollX, scrollY, canvasX, canvasY } = event;
|
|
64871
64912
|
if (isNil$1(scrollX) && isNil$1(scrollY)) {
|
|
64872
|
-
return;
|
|
64913
|
+
return stopBubble;
|
|
64873
64914
|
}
|
|
64874
64915
|
if (!pointInRect({
|
|
64875
64916
|
x: canvasX,
|
|
64876
64917
|
y: canvasY
|
|
64877
64918
|
}, this._getRegionOrSeriesLayout(regionOrSeries), false)) {
|
|
64878
|
-
return;
|
|
64919
|
+
return stopBubble;
|
|
64879
64920
|
}
|
|
64880
64921
|
this._clickEnable = false;
|
|
64881
64922
|
if (callback) {
|
|
64882
|
-
callback({ scrollX, scrollY }, event);
|
|
64923
|
+
stopBubble = callback({ scrollX, scrollY }, event);
|
|
64883
64924
|
}
|
|
64884
64925
|
this._eventObj.emit('scroll', {
|
|
64885
64926
|
scrollX,
|
|
64886
64927
|
scrollY,
|
|
64887
64928
|
model: this
|
|
64888
64929
|
});
|
|
64930
|
+
return stopBubble;
|
|
64889
64931
|
}
|
|
64890
64932
|
_bindScrollEventAsRegion(eventObj, regionOrSeries, callback, option) {
|
|
64891
64933
|
var _a, _b;
|
|
@@ -64902,7 +64944,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64902
64944
|
this._zoomableTrigger.clearScroll();
|
|
64903
64945
|
}, delayTime));
|
|
64904
64946
|
event.on(...scrollParams, delayMap[delayType]((params) => {
|
|
64905
|
-
this._scrollEventDispatch(params, regionOrSeries, callback);
|
|
64947
|
+
return this._scrollEventDispatch(params, regionOrSeries, callback);
|
|
64906
64948
|
}, delayTime));
|
|
64907
64949
|
}
|
|
64908
64950
|
initScrollEventOfSeries(s, callback, option) {
|
|
@@ -65058,6 +65100,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65058
65100
|
type: 'mercator'
|
|
65059
65101
|
};
|
|
65060
65102
|
this._actualScale = 1;
|
|
65103
|
+
this._initialScale = 1;
|
|
65061
65104
|
this.effect = {
|
|
65062
65105
|
scaleUpdate: () => {
|
|
65063
65106
|
this.coordinateHelper();
|
|
@@ -65139,6 +65182,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65139
65182
|
this._projectionSpec.zoom = this._spec.zoomLimit.min;
|
|
65140
65183
|
}
|
|
65141
65184
|
this._actualScale = (_c = this._projectionSpec.zoom) !== null && _c !== void 0 ? _c : 1;
|
|
65185
|
+
this._initialScale = this._actualScale;
|
|
65142
65186
|
this._longitudeField = this._spec.longitudeField;
|
|
65143
65187
|
this._latitudeField = this._spec.latitudeField;
|
|
65144
65188
|
}
|
|
@@ -65244,8 +65288,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65244
65288
|
});
|
|
65245
65289
|
}
|
|
65246
65290
|
onLayoutEnd(ctx) {
|
|
65247
|
-
this.setLayoutRect(this._regions[0].
|
|
65248
|
-
this.setLayoutStartPosition(this._regions[0].
|
|
65291
|
+
this.setLayoutRect(this._regions[0].getLayoutRect());
|
|
65292
|
+
this.setLayoutStartPosition(this._regions[0].getLayoutStartPoint());
|
|
65249
65293
|
const { width, height } = this.getLayoutRect();
|
|
65250
65294
|
const { translate, scale, center } = this.evaluateProjection([0, 0], [width, height]);
|
|
65251
65295
|
translate && this._projection.translate(translate);
|
|
@@ -65265,7 +65309,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65265
65309
|
}
|
|
65266
65310
|
}
|
|
65267
65311
|
});
|
|
65268
|
-
this._actualScale =
|
|
65312
|
+
this._actualScale = this._initialScale;
|
|
65269
65313
|
super.onLayoutEnd(ctx);
|
|
65270
65314
|
}
|
|
65271
65315
|
onRender(ctx) {
|
|
@@ -65324,11 +65368,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65324
65368
|
return this._projection.invert(point);
|
|
65325
65369
|
}
|
|
65326
65370
|
evaluateProjection(start, size) {
|
|
65327
|
-
var _a
|
|
65371
|
+
var _a;
|
|
65328
65372
|
const evaluated = this._projection.evaluate(start, size, this.collectFeatures());
|
|
65329
65373
|
let translate = evaluated.translate();
|
|
65330
|
-
const scale = evaluated.scale() *
|
|
65331
|
-
const center = (
|
|
65374
|
+
const scale = evaluated.scale() * this._initialScale;
|
|
65375
|
+
const center = (_a = this._projectionSpec.center) !== null && _a !== void 0 ? _a : evaluated.invert([size[0] / 2, size[1] / 2]);
|
|
65332
65376
|
center && (translate = [size[0] / 2, size[1] / 2]);
|
|
65333
65377
|
return { translate, scale, center };
|
|
65334
65378
|
}
|
|
@@ -67335,7 +67379,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67335
67379
|
this._trigger.setStateKeys([...this._angleField, ...this._radiusField]);
|
|
67336
67380
|
}
|
|
67337
67381
|
_computeLayoutRadius() {
|
|
67338
|
-
const { width, height } = this._region.
|
|
67382
|
+
const { width, height } = this._region.getLayoutRect();
|
|
67339
67383
|
return Math.min(width / 2, height / 2);
|
|
67340
67384
|
}
|
|
67341
67385
|
fillData() {
|
|
@@ -67665,16 +67709,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67665
67709
|
get center() {
|
|
67666
67710
|
var _a, _b, _c, _d;
|
|
67667
67711
|
return {
|
|
67668
|
-
x: (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX) !== null && _b !== void 0 ? _b : this._region.
|
|
67669
|
-
y: (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.centerY) !== null && _d !== void 0 ? _d : this._region.
|
|
67712
|
+
x: (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2,
|
|
67713
|
+
y: (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.centerY) !== null && _d !== void 0 ? _d : this._region.getLayoutRect().height / 2
|
|
67670
67714
|
};
|
|
67671
67715
|
}
|
|
67672
67716
|
_buildMarkAttributeContext() {
|
|
67673
67717
|
super._buildMarkAttributeContext();
|
|
67674
67718
|
this._markAttributeContext.getCenter = () => {
|
|
67675
67719
|
return {
|
|
67676
|
-
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.
|
|
67677
|
-
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.
|
|
67720
|
+
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2; },
|
|
67721
|
+
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height / 2; }
|
|
67678
67722
|
};
|
|
67679
67723
|
};
|
|
67680
67724
|
this._markAttributeContext.startAngleScale = (datum) => this.startAngleScale(datum);
|
|
@@ -67748,8 +67792,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67748
67792
|
const pieMark = this._pieMark;
|
|
67749
67793
|
if (pieMark) {
|
|
67750
67794
|
this.setMarkStyle(pieMark, {
|
|
67751
|
-
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.
|
|
67752
|
-
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.
|
|
67795
|
+
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2; },
|
|
67796
|
+
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height / 2; },
|
|
67753
67797
|
fill: this.getColorAttribute(),
|
|
67754
67798
|
outerRadius: isSpecValueWithScale(this._outerRadius)
|
|
67755
67799
|
? this._outerRadius
|
|
@@ -67835,7 +67879,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67835
67879
|
return style;
|
|
67836
67880
|
}
|
|
67837
67881
|
computeLayoutRadius() {
|
|
67838
|
-
const { width, height } = this._region.
|
|
67882
|
+
const { width, height } = this._region.getLayoutRect();
|
|
67839
67883
|
return Math.min(width / 2, height / 2);
|
|
67840
67884
|
}
|
|
67841
67885
|
computeCenter(datum) {
|
|
@@ -68030,8 +68074,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68030
68074
|
params3d.anchor3d = (datum) => {
|
|
68031
68075
|
var _a, _b, _c, _d;
|
|
68032
68076
|
const anchor = [
|
|
68033
|
-
(_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.
|
|
68034
|
-
(_d = (_c = this._center) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : this._region.
|
|
68077
|
+
(_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2,
|
|
68078
|
+
(_d = (_c = this._center) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : this._region.getLayoutRect().height / 2
|
|
68035
68079
|
];
|
|
68036
68080
|
return anchor;
|
|
68037
68081
|
};
|
|
@@ -68434,7 +68478,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68434
68478
|
disappear: preset === 'clipIn' ? undefined : radarPresetAnimation(params, preset, 'out'),
|
|
68435
68479
|
update: [
|
|
68436
68480
|
{
|
|
68437
|
-
options: { excludeChannels: 'points' }
|
|
68481
|
+
options: { excludeChannels: ['points', 'defined'] }
|
|
68438
68482
|
},
|
|
68439
68483
|
{
|
|
68440
68484
|
channel: ['points'],
|
|
@@ -70294,7 +70338,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
70294
70338
|
compile() {
|
|
70295
70339
|
var _a, _b;
|
|
70296
70340
|
super.compile();
|
|
70297
|
-
const { width, height } = this._region.
|
|
70341
|
+
const { width, height } = this._region.getLayoutRect();
|
|
70298
70342
|
if (!isValidNumber$1(width) || !isValidNumber$1(height) || !(height > 0 && width > 0)) {
|
|
70299
70343
|
return;
|
|
70300
70344
|
}
|
|
@@ -70351,7 +70395,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
70351
70395
|
}
|
|
70352
70396
|
_wordCloudTransformOption() {
|
|
70353
70397
|
var _a, _b, _c, _d, _e;
|
|
70354
|
-
const { width, height } = this._region.
|
|
70398
|
+
const { width, height } = this._region.getLayoutRect();
|
|
70355
70399
|
const wordStyleSpec = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
|
|
70356
70400
|
return {
|
|
70357
70401
|
layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,
|
|
@@ -70381,7 +70425,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
70381
70425
|
}
|
|
70382
70426
|
_wordCloudShapeTransformOption() {
|
|
70383
70427
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
70384
|
-
const { width, height } = this._region.
|
|
70428
|
+
const { width, height } = this._region.getLayoutRect();
|
|
70385
70429
|
const wordStyleSpec = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
|
|
70386
70430
|
const wordCloudShapeConfig = (_c = this._wordCloudShapeConfig) !== null && _c !== void 0 ? _c : {};
|
|
70387
70431
|
const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
|
|
@@ -74652,11 +74696,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74652
74696
|
_computeRadius(radius) {
|
|
74653
74697
|
if (isArray$1(radius)) {
|
|
74654
74698
|
return radius.map(r => {
|
|
74655
|
-
const { width, height } = this.getRegion().
|
|
74699
|
+
const { width, height } = this.getRegion().getLayoutRect();
|
|
74656
74700
|
return Math.min(width / 2, height / 2) * r;
|
|
74657
74701
|
});
|
|
74658
74702
|
}
|
|
74659
|
-
const { width, height } = this.getRegion().
|
|
74703
|
+
const { width, height } = this.getRegion().getLayoutRect();
|
|
74660
74704
|
return Math.min(width / 2, height / 2) * radius;
|
|
74661
74705
|
}
|
|
74662
74706
|
_computeLevel() {
|
|
@@ -76830,7 +76874,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76830
76874
|
}
|
|
76831
76875
|
onLayoutEnd(ctx) {
|
|
76832
76876
|
super.onLayoutEnd(ctx);
|
|
76833
|
-
this._viewBox.set(0, 0, this._region.
|
|
76877
|
+
this._viewBox.set(0, 0, this._region.getLayoutRect().width, this._region.getLayoutRect().height);
|
|
76834
76878
|
this.getViewData().reRunAllTransform();
|
|
76835
76879
|
this._nodesSeriesData.updateData();
|
|
76836
76880
|
this._linksSeriesData.updateData();
|
|
@@ -78283,7 +78327,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78283
78327
|
}
|
|
78284
78328
|
onLayoutEnd(ctx) {
|
|
78285
78329
|
super.onLayoutEnd(ctx);
|
|
78286
|
-
this._viewBox.set(0, 0, this._region.
|
|
78330
|
+
this._viewBox.set(0, 0, this._region.getLayoutRect().width, this._region.getLayoutRect().height);
|
|
78287
78331
|
this._rawData.reRunAllTransform();
|
|
78288
78332
|
this.getViewData().reRunAllTransform();
|
|
78289
78333
|
}
|
|
@@ -80396,9 +80440,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80396
80440
|
this.updateScaleDomain();
|
|
80397
80441
|
});
|
|
80398
80442
|
}
|
|
80443
|
+
eachSeries(this._regions, s => {
|
|
80444
|
+
s.event.on(exports.ChartEvent.rawDataUpdate, { filter: ({ model }) => (model === null || model === void 0 ? void 0 : model.id) === s.id }, () => {
|
|
80445
|
+
this._clearRawDomain();
|
|
80446
|
+
});
|
|
80447
|
+
}, {
|
|
80448
|
+
userId: this._seriesUserId,
|
|
80449
|
+
specIndex: this._seriesIndex
|
|
80450
|
+
});
|
|
80399
80451
|
}
|
|
80400
80452
|
updateScaleDomain() {
|
|
80401
80453
|
}
|
|
80454
|
+
_clearRawDomain() {
|
|
80455
|
+
}
|
|
80402
80456
|
computeData(updateType) {
|
|
80403
80457
|
if (this._tickData && (updateType === 'force' || !isEqual$1(this._scale.range(), [0, 1]))) {
|
|
80404
80458
|
this._tickData.getDataView().reRunAllTransform();
|
|
@@ -80655,6 +80709,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80655
80709
|
this._scales = [];
|
|
80656
80710
|
this._tick = undefined;
|
|
80657
80711
|
this._layoutCache = { width: 0, height: 0, _lastComputeOutBounds: { x1: 0, x2: 0, y1: 0, y2: 0 } };
|
|
80712
|
+
this._innerOffset = {
|
|
80713
|
+
top: 0,
|
|
80714
|
+
bottom: 0,
|
|
80715
|
+
left: 0,
|
|
80716
|
+
right: 0
|
|
80717
|
+
};
|
|
80658
80718
|
this.effect = {
|
|
80659
80719
|
scaleUpdate: params => {
|
|
80660
80720
|
this.computeData(params === null || params === void 0 ? void 0 : params.value);
|
|
@@ -80835,21 +80895,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80835
80895
|
updateScaleRange() {
|
|
80836
80896
|
let isScaleChange = false;
|
|
80837
80897
|
const { width, height } = this.getLayoutRect();
|
|
80898
|
+
const { left, right, top, bottom } = this._innerOffset;
|
|
80838
80899
|
let newRange = [];
|
|
80839
80900
|
if (isXAxis(this.getOrient())) {
|
|
80840
80901
|
if (isValidNumber$1(width)) {
|
|
80841
|
-
newRange = this._inverse ? [width,
|
|
80902
|
+
newRange = this._inverse ? [width - right, left] : [left, width - right];
|
|
80842
80903
|
}
|
|
80843
80904
|
}
|
|
80844
80905
|
else if (isZAxis(this.getOrient())) {
|
|
80845
80906
|
if (isValidNumber$1(width)) {
|
|
80846
|
-
newRange = this._inverse ? [width,
|
|
80907
|
+
newRange = this._inverse ? [width - right, left] : [left, width - right];
|
|
80847
80908
|
this._scale.range(newRange);
|
|
80848
80909
|
}
|
|
80849
80910
|
}
|
|
80850
80911
|
else {
|
|
80851
80912
|
if (isValidNumber$1(height)) {
|
|
80852
|
-
newRange = this._inverse ? [
|
|
80913
|
+
newRange = this._inverse ? [top, height - bottom] : [height - bottom, top];
|
|
80853
80914
|
}
|
|
80854
80915
|
}
|
|
80855
80916
|
const [start, end] = this._scale.range();
|
|
@@ -80889,6 +80950,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80889
80950
|
const chartSpec = (_a = this._option.getChart()) === null || _a === void 0 ? void 0 : _a.getSpec();
|
|
80890
80951
|
this._inverse = transformInverse(this._spec, (chartSpec === null || chartSpec === void 0 ? void 0 : chartSpec.direction) === Direction.horizontal);
|
|
80891
80952
|
}
|
|
80953
|
+
onLayoutStart(layoutRect, viewRect, ctx) {
|
|
80954
|
+
super.onLayoutStart(layoutRect, viewRect, ctx);
|
|
80955
|
+
if (!isZAxis(this.getOrient()) && this._spec.innerOffset) {
|
|
80956
|
+
const spec = this._spec;
|
|
80957
|
+
if (isYAxis(this.getOrient())) {
|
|
80958
|
+
['top', 'bottom'].forEach(orient => {
|
|
80959
|
+
this._innerOffset[orient] = calcLayoutNumber(spec.innerOffset[orient], viewRect.height, viewRect);
|
|
80960
|
+
});
|
|
80961
|
+
}
|
|
80962
|
+
else {
|
|
80963
|
+
['left', 'right'].forEach(orient => {
|
|
80964
|
+
this._innerOffset[orient] = calcLayoutNumber(spec.innerOffset[orient], viewRect.width, viewRect);
|
|
80965
|
+
});
|
|
80966
|
+
}
|
|
80967
|
+
}
|
|
80968
|
+
}
|
|
80892
80969
|
getSeriesStatisticsField(s) {
|
|
80893
80970
|
let f;
|
|
80894
80971
|
if (isXAxis(this.getOrient())) {
|
|
@@ -80996,7 +81073,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80996
81073
|
});
|
|
80997
81074
|
return scales;
|
|
80998
81075
|
}
|
|
80999
|
-
collectData(depth) {
|
|
81076
|
+
collectData(depth, rawData) {
|
|
81000
81077
|
const data = [];
|
|
81001
81078
|
eachSeries(this._regions, s => {
|
|
81002
81079
|
var _a, _b, _c;
|
|
@@ -81025,8 +81102,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81025
81102
|
if (field) {
|
|
81026
81103
|
field.forEach(f => {
|
|
81027
81104
|
var _a;
|
|
81028
|
-
if (
|
|
81029
|
-
data.push(
|
|
81105
|
+
if (rawData) {
|
|
81106
|
+
data.push(s.getRawDataStatisticsByField(f, false));
|
|
81107
|
+
}
|
|
81108
|
+
else {
|
|
81109
|
+
if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
|
|
81110
|
+
data.push(seriesData.latestData[f]);
|
|
81111
|
+
}
|
|
81030
81112
|
}
|
|
81031
81113
|
});
|
|
81032
81114
|
}
|
|
@@ -81133,12 +81215,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81133
81215
|
if (!ignoreGrid) {
|
|
81134
81216
|
const regions = this.getRegions();
|
|
81135
81217
|
let { x: minX, y: minY } = regions[0].getLayoutStartPoint();
|
|
81136
|
-
let maxX = minX + regions[0].
|
|
81137
|
-
let maxY = minY + regions[0].
|
|
81218
|
+
let maxX = minX + regions[0].getLayoutRect().width;
|
|
81219
|
+
let maxY = minY + regions[0].getLayoutRect().height;
|
|
81138
81220
|
for (let index = 1; index < regions.length; index++) {
|
|
81139
81221
|
const region = regions[index];
|
|
81140
|
-
const { x, y } = region.
|
|
81141
|
-
const { width, height } = region.
|
|
81222
|
+
const { x, y } = region.getLayoutStartPoint();
|
|
81223
|
+
const { width, height } = region.getLayoutRect();
|
|
81142
81224
|
minX = Math.min(minX, x);
|
|
81143
81225
|
maxX = Math.max(maxX, width + x);
|
|
81144
81226
|
minY = Math.min(minY, y);
|
|
@@ -81352,15 +81434,34 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81352
81434
|
this.setScaleNice();
|
|
81353
81435
|
}
|
|
81354
81436
|
setLinearScaleNice() {
|
|
81355
|
-
var _a
|
|
81356
|
-
let tickCount =
|
|
81357
|
-
|
|
81437
|
+
var _a;
|
|
81438
|
+
let tickCount = DEFAULT_TICK_COUNT;
|
|
81439
|
+
const tick = this._spec.tick || {};
|
|
81440
|
+
if (isValidNumber$1(tick.forceTickCount)) {
|
|
81441
|
+
tickCount = tick.forceTickCount;
|
|
81442
|
+
}
|
|
81443
|
+
else if (isFunction$1(tick.tickCount)) {
|
|
81444
|
+
const range = this._scale.range();
|
|
81445
|
+
let rangeSize = Math.abs(range[range.length - 1] - range[0]);
|
|
81446
|
+
if (rangeSize === 1 && this._option) {
|
|
81447
|
+
const isX = isXAxis(this._orient);
|
|
81448
|
+
rangeSize = isX ? this._option.getChartViewRect().width : this._option.getChartViewRect().height;
|
|
81449
|
+
}
|
|
81450
|
+
tickCount = tick.tickCount({
|
|
81451
|
+
rangeSize,
|
|
81452
|
+
labelStyle: this._spec.label && this._spec.label.style
|
|
81453
|
+
});
|
|
81454
|
+
}
|
|
81455
|
+
else if (isValidNumber$1(tick.tickCount)) {
|
|
81456
|
+
tickCount = tick.tickCount;
|
|
81457
|
+
}
|
|
81458
|
+
else {
|
|
81358
81459
|
tickCount = DEFAULT_TICK_COUNT;
|
|
81359
81460
|
}
|
|
81360
81461
|
if (this._spec.niceType === 'accurateFirst') {
|
|
81361
81462
|
tickCount = Math.max(DEFAULT_TICK_COUNT, tickCount);
|
|
81362
81463
|
}
|
|
81363
|
-
const { min, max } = (
|
|
81464
|
+
const { min, max } = (_a = this._domain) !== null && _a !== void 0 ? _a : {};
|
|
81364
81465
|
if (isNil$1(min) && isNil$1(max)) {
|
|
81365
81466
|
this._nice && this._scale.nice(tickCount);
|
|
81366
81467
|
}
|
|
@@ -81581,6 +81682,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81581
81682
|
};
|
|
81582
81683
|
|
|
81583
81684
|
class BandAxisMixin {
|
|
81685
|
+
constructor() {
|
|
81686
|
+
this._rawDomainIndex = [];
|
|
81687
|
+
}
|
|
81584
81688
|
dataToPosition(values, cfg = {}) {
|
|
81585
81689
|
var _a, _b;
|
|
81586
81690
|
if (values.length === 0 || this._scales.length === 0) {
|
|
@@ -81645,9 +81749,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81645
81749
|
return Array.from(tempSet);
|
|
81646
81750
|
}
|
|
81647
81751
|
updateScaleDomain() {
|
|
81752
|
+
var _a;
|
|
81648
81753
|
if (!this.isSeriesDataEnable()) {
|
|
81649
81754
|
return;
|
|
81650
81755
|
}
|
|
81756
|
+
if (!((_a = this._rawDomainIndex) === null || _a === void 0 ? void 0 : _a.length) && this._scales.length) {
|
|
81757
|
+
this._updateRawDomain();
|
|
81758
|
+
}
|
|
81651
81759
|
const userDomain = this._spec.domain;
|
|
81652
81760
|
for (let i = 0; i < this._scales.length; i++) {
|
|
81653
81761
|
if (userDomain && userDomain.length && i === 0) {
|
|
@@ -81656,13 +81764,31 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81656
81764
|
else {
|
|
81657
81765
|
const data = this.collectData(i);
|
|
81658
81766
|
const domain = this.computeDomain(data);
|
|
81659
|
-
this._scales[i].domain(domain);
|
|
81767
|
+
this._scales[i].domain(domain.sort((a, b) => this._rawDomainIndex[i][a] - this._rawDomainIndex[i][b]));
|
|
81660
81768
|
}
|
|
81661
81769
|
}
|
|
81662
81770
|
this.transformScaleDomain();
|
|
81663
81771
|
this.event.emit(exports.ChartEvent.scaleDomainUpdate, { model: this });
|
|
81664
81772
|
this.event.emit(exports.ChartEvent.scaleUpdate, { model: this, value: 'domain' });
|
|
81665
81773
|
}
|
|
81774
|
+
_updateRawDomain() {
|
|
81775
|
+
this._rawDomainIndex = [];
|
|
81776
|
+
const userDomain = this._spec.domain;
|
|
81777
|
+
for (let i = 0; i < this._scales.length; i++) {
|
|
81778
|
+
if (userDomain && userDomain.length && i === 0) {
|
|
81779
|
+
this._scales[i].domain(userDomain);
|
|
81780
|
+
}
|
|
81781
|
+
else {
|
|
81782
|
+
const data = this.collectData(i, true);
|
|
81783
|
+
const domain = this.computeDomain(data);
|
|
81784
|
+
this._rawDomainIndex[i] = {};
|
|
81785
|
+
domain.forEach((d, _i) => (this._rawDomainIndex[i][d] = _i));
|
|
81786
|
+
}
|
|
81787
|
+
}
|
|
81788
|
+
}
|
|
81789
|
+
_clearRawDomain() {
|
|
81790
|
+
this._rawDomainIndex = [];
|
|
81791
|
+
}
|
|
81666
81792
|
}
|
|
81667
81793
|
|
|
81668
81794
|
class CartesianBandAxis extends CartesianAxis {
|
|
@@ -81930,7 +82056,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81930
82056
|
this._transformLayoutPosition = (pos) => {
|
|
81931
82057
|
var _a;
|
|
81932
82058
|
const region = (_a = this.getRegions()) === null || _a === void 0 ? void 0 : _a[0];
|
|
81933
|
-
return region ? region.
|
|
82059
|
+
return region ? region.getLayoutStartPoint() : pos;
|
|
81934
82060
|
};
|
|
81935
82061
|
}
|
|
81936
82062
|
get center() {
|
|
@@ -82079,7 +82205,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82079
82205
|
this._scale.range(newRange);
|
|
82080
82206
|
return true;
|
|
82081
82207
|
}
|
|
82082
|
-
collectData(depth) {
|
|
82208
|
+
collectData(depth, rawData) {
|
|
82083
82209
|
const data = [];
|
|
82084
82210
|
eachSeries(this._regions, s => {
|
|
82085
82211
|
var _a, _b, _c;
|
|
@@ -82099,8 +82225,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82099
82225
|
if (field) {
|
|
82100
82226
|
field.forEach(f => {
|
|
82101
82227
|
var _a;
|
|
82102
|
-
if (
|
|
82103
|
-
data.push(
|
|
82228
|
+
if (rawData) {
|
|
82229
|
+
data.push(s.getRawDataStatisticsByField(f, false));
|
|
82230
|
+
}
|
|
82231
|
+
else {
|
|
82232
|
+
if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
|
|
82233
|
+
data.push(seriesData.latestData[f]);
|
|
82234
|
+
}
|
|
82104
82235
|
}
|
|
82105
82236
|
});
|
|
82106
82237
|
}
|
|
@@ -82300,7 +82431,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82300
82431
|
return (Math.min(width, height) / 2) * innerRadius;
|
|
82301
82432
|
}
|
|
82302
82433
|
getRefLayoutRect() {
|
|
82303
|
-
return this.getRegions()[0].
|
|
82434
|
+
return this.getRegions()[0].getLayoutRect();
|
|
82304
82435
|
}
|
|
82305
82436
|
getRefSeriesRadius() {
|
|
82306
82437
|
let outerRadius = POLAR_DEFAULT_RADIUS;
|
|
@@ -85575,8 +85706,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
85575
85706
|
}
|
|
85576
85707
|
});
|
|
85577
85708
|
const activeType = (_a = opt.activeType) !== null && _a !== void 0 ? _a : (markInfoList.length > 1 ? 'dimension' : 'mark');
|
|
85578
|
-
const regionPos = region.
|
|
85579
|
-
const regionRect = region.
|
|
85709
|
+
const regionPos = region.getLayoutStartPoint();
|
|
85710
|
+
const regionRect = region.getLayoutRect();
|
|
85580
85711
|
const container = componentOptions.globalInstance.getContainer();
|
|
85581
85712
|
const containerPos = Object.assign({ x: 0, y: 0 }, (container ? getElementAbsolutePosition(container) : {}));
|
|
85582
85713
|
const bound = (pos) => ({
|
|
@@ -86281,6 +86412,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86281
86412
|
this.trigger = 'hover';
|
|
86282
86413
|
this.triggerOff = 'hover';
|
|
86283
86414
|
this._handleEvent = throttle((params) => {
|
|
86415
|
+
if (!this._option) {
|
|
86416
|
+
return;
|
|
86417
|
+
}
|
|
86284
86418
|
const { event } = params;
|
|
86285
86419
|
const layer = this._option.getCompiler().getStage().getLayer(undefined);
|
|
86286
86420
|
const point = { x: event.viewX, y: event.viewY };
|
|
@@ -86414,11 +86548,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86414
86548
|
}
|
|
86415
86549
|
const regions = axis.getRegions();
|
|
86416
86550
|
regions.forEach(r => {
|
|
86417
|
-
const { x: regionStartX, y: regionStartY } = r.
|
|
86551
|
+
const { x: regionStartX, y: regionStartY } = r.getLayoutStartPoint();
|
|
86418
86552
|
x1 = Math.min(x1, regionStartX - sx);
|
|
86419
86553
|
y1 = Math.min(y1, regionStartY - sy);
|
|
86420
|
-
x2 = Math.max(x2, regionStartX + r.
|
|
86421
|
-
y2 = Math.max(y2, regionStartY + r.
|
|
86554
|
+
x2 = Math.max(x2, regionStartX + r.getLayoutRect().width - sx);
|
|
86555
|
+
y2 = Math.max(y2, regionStartY + r.getLayoutRect().height - sy);
|
|
86422
86556
|
});
|
|
86423
86557
|
map.set(idx, { x1, y1, x2, y2, axis: axis });
|
|
86424
86558
|
});
|
|
@@ -86428,8 +86562,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86428
86562
|
}
|
|
86429
86563
|
onLayoutEnd(ctx) {
|
|
86430
86564
|
const region = this._regions[0];
|
|
86431
|
-
this.setLayoutRect(region.
|
|
86432
|
-
this.setLayoutStartPosition(region.
|
|
86565
|
+
this.setLayoutRect(region.getLayoutRect());
|
|
86566
|
+
this.setLayoutStartPosition(region.getLayoutStartPoint());
|
|
86433
86567
|
super.onLayoutEnd(ctx);
|
|
86434
86568
|
}
|
|
86435
86569
|
onRender(ctx) {
|
|
@@ -86720,6 +86854,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86720
86854
|
let xCrossHairInfo = {
|
|
86721
86855
|
height: 0,
|
|
86722
86856
|
leftPos: 0,
|
|
86857
|
+
rightPos: 0,
|
|
86723
86858
|
topPos: 0,
|
|
86724
86859
|
x: 0,
|
|
86725
86860
|
bottom: { visible: false, text: '', dx: 0, dy: 0 },
|
|
@@ -86731,6 +86866,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86731
86866
|
width: 0,
|
|
86732
86867
|
leftPos: 0,
|
|
86733
86868
|
topPos: 0,
|
|
86869
|
+
bottomPos: 0,
|
|
86734
86870
|
y: 0,
|
|
86735
86871
|
left: { visible: false, text: '', dx: 0, dy: 0 },
|
|
86736
86872
|
right: { visible: false, text: '', dx: 0, dy: 0 },
|
|
@@ -86767,7 +86903,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86767
86903
|
getRegionArea(xRegion, this._currValueX);
|
|
86768
86904
|
getRegionArea(yRegion, this._currValueY);
|
|
86769
86905
|
let indexWidth;
|
|
86906
|
+
let offsetWidth = 0;
|
|
86770
86907
|
let valueHeight;
|
|
86908
|
+
let offsetHeight = 0;
|
|
86771
86909
|
if (this._xHair) {
|
|
86772
86910
|
this._currValueX.forEach(({ axis, v }) => {
|
|
86773
86911
|
var _a;
|
|
@@ -86775,6 +86913,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86775
86913
|
const xScale = axis.getScale();
|
|
86776
86914
|
if (isDiscrete(xScale.type)) {
|
|
86777
86915
|
indexWidth = xScale.bandwidth();
|
|
86916
|
+
if (indexWidth === 0 && xScale.step) {
|
|
86917
|
+
offsetWidth = xScale.step();
|
|
86918
|
+
}
|
|
86778
86919
|
}
|
|
86779
86920
|
else if (isContinuous(xScale.type)) {
|
|
86780
86921
|
const fieldX = series.fieldX[0];
|
|
@@ -86816,6 +86957,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86816
86957
|
const yScale = axis.getScale();
|
|
86817
86958
|
if (isDiscrete(yScale.type)) {
|
|
86818
86959
|
valueHeight = yScale.bandwidth();
|
|
86960
|
+
if (valueHeight === 0 && yScale.step) {
|
|
86961
|
+
offsetHeight = yScale.step();
|
|
86962
|
+
}
|
|
86819
86963
|
}
|
|
86820
86964
|
else if (isContinuous(yScale.type)) {
|
|
86821
86965
|
const fieldY = series.fieldY[0];
|
|
@@ -86855,6 +86999,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86855
86999
|
}
|
|
86856
87000
|
else {
|
|
86857
87001
|
xCrossHairInfo.leftPos = xRegion.x1;
|
|
87002
|
+
xCrossHairInfo.rightPos = xRegion.x2;
|
|
86858
87003
|
xCrossHairInfo.topPos = xRegion.y1;
|
|
86859
87004
|
xCrossHairInfo.height = xRegion.y2 - xRegion.y1;
|
|
86860
87005
|
xCrossHairInfo.x = x + this.getLayoutStartPoint().x;
|
|
@@ -86870,6 +87015,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86870
87015
|
else {
|
|
86871
87016
|
yCrossHairInfo.leftPos = yRegion.x1;
|
|
86872
87017
|
yCrossHairInfo.topPos = yRegion.y1;
|
|
87018
|
+
yCrossHairInfo.bottomPos = yRegion.y2;
|
|
86873
87019
|
yCrossHairInfo.width = yRegion.x2 - yRegion.x1;
|
|
86874
87020
|
yCrossHairInfo.y = y + this.getLayoutStartPoint().y;
|
|
86875
87021
|
if ((_d = (_c = this._yHair) === null || _c === void 0 ? void 0 : _c.label) === null || _d === void 0 ? void 0 : _d.formatMethod) {
|
|
@@ -86879,15 +87025,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86879
87025
|
}
|
|
86880
87026
|
}
|
|
86881
87027
|
if (tag) {
|
|
86882
|
-
LayoutType.HORIZONTAL && this._layoutHorizontal(yCrossHairInfo, valueHeight !== null && valueHeight !== void 0 ? valueHeight : 0);
|
|
86883
|
-
LayoutType.VERTICAL && this._layoutVertical(xCrossHairInfo, indexWidth !== null && indexWidth !== void 0 ? indexWidth : 0);
|
|
87028
|
+
LayoutType.HORIZONTAL && this._layoutHorizontal(yCrossHairInfo, valueHeight !== null && valueHeight !== void 0 ? valueHeight : 0, offsetHeight);
|
|
87029
|
+
LayoutType.VERTICAL && this._layoutVertical(xCrossHairInfo, indexWidth !== null && indexWidth !== void 0 ? indexWidth : 0, offsetWidth);
|
|
86884
87030
|
}
|
|
86885
87031
|
if (this.enableRemain) {
|
|
86886
87032
|
this._cacheXCrossHairInfo = Object.assign(Object.assign({}, xCrossHairInfo), { _isCache: true });
|
|
86887
87033
|
this._cacheYCrossHairInfo = Object.assign(Object.assign({}, yCrossHairInfo), { _isCache: true });
|
|
86888
87034
|
}
|
|
86889
87035
|
}
|
|
86890
|
-
_layoutVertical(crosshairInfo, bandWidth) {
|
|
87036
|
+
_layoutVertical(crosshairInfo, bandWidth, offsetWidth) {
|
|
86891
87037
|
var _a, _b;
|
|
86892
87038
|
if ((crosshairInfo._isCache && this.enableRemain) || !this._xHair) {
|
|
86893
87039
|
return;
|
|
@@ -86904,9 +87050,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86904
87050
|
}
|
|
86905
87051
|
else if (type === 'rect') {
|
|
86906
87052
|
const extend = this._getRectSize(this._xHair, bandWidth, crosshairInfo.axis);
|
|
87053
|
+
const { leftPos, rightPos } = crosshairInfo;
|
|
86907
87054
|
positionAttribute = {
|
|
86908
|
-
start: { x: x - extend / 2, y: topPos },
|
|
86909
|
-
end: { x: x + bandWidth + extend / 2, y: topPos + height }
|
|
87055
|
+
start: { x: Math.max(x - extend / 2 - offsetWidth / 2, leftPos), y: topPos },
|
|
87056
|
+
end: { x: Math.min(x + bandWidth + extend / 2 + offsetWidth / 2, rightPos), y: topPos + height }
|
|
86910
87057
|
};
|
|
86911
87058
|
}
|
|
86912
87059
|
this._updateCrosshair('x', type, positionAttribute);
|
|
@@ -86932,7 +87079,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86932
87079
|
}
|
|
86933
87080
|
}
|
|
86934
87081
|
}
|
|
86935
|
-
_layoutHorizontal(crosshairInfo, bandHeight) {
|
|
87082
|
+
_layoutHorizontal(crosshairInfo, bandHeight, offsetHeight) {
|
|
86936
87083
|
var _a, _b;
|
|
86937
87084
|
if ((crosshairInfo._isCache && this.enableRemain) || !this._yHair) {
|
|
86938
87085
|
return;
|
|
@@ -86949,9 +87096,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86949
87096
|
}
|
|
86950
87097
|
else if (type === 'rect') {
|
|
86951
87098
|
const extend = this._getRectSize(this._yHair, bandHeight, crosshairInfo.axis);
|
|
87099
|
+
const { topPos, bottomPos } = crosshairInfo;
|
|
86952
87100
|
positionAttribute = {
|
|
86953
|
-
start: { x: leftPos, y: y - extend / 2 },
|
|
86954
|
-
end: { x: leftPos + width, y: y + bandHeight + extend / 2 }
|
|
87101
|
+
start: { x: leftPos, y: Math.max(y - extend / 2 - offsetHeight / 2, topPos) },
|
|
87102
|
+
end: { x: leftPos + width, y: Math.min(y + bandHeight + extend / 2 + offsetHeight / 2, bottomPos) }
|
|
86955
87103
|
};
|
|
86956
87104
|
}
|
|
86957
87105
|
this._updateCrosshair('y', type, positionAttribute);
|
|
@@ -87616,7 +87764,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87616
87764
|
}
|
|
87617
87765
|
const { zoomDelta, zoomX, zoomY } = params;
|
|
87618
87766
|
const { x, y } = this._regions[0].getLayoutStartPoint();
|
|
87619
|
-
const { width, height } = this._regions[0].
|
|
87767
|
+
const { width, height } = this._regions[0].getLayoutRect();
|
|
87620
87768
|
const delta = Math.abs(this._start - this._end);
|
|
87621
87769
|
const zoomRate = (_b = (_a = this._spec.roamZoom) === null || _a === void 0 ? void 0 : _a.rate) !== null && _b !== void 0 ? _b : 1;
|
|
87622
87770
|
if (delta >= 1 && zoomDelta < 1) {
|
|
@@ -87642,14 +87790,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87642
87790
|
this._handleChartScroll = (params, e) => {
|
|
87643
87791
|
var _a;
|
|
87644
87792
|
if (!this._activeRoam) {
|
|
87645
|
-
return;
|
|
87793
|
+
return false;
|
|
87646
87794
|
}
|
|
87647
87795
|
const { scrollX, scrollY } = params;
|
|
87648
87796
|
let value = this._isHorizontal ? scrollX : scrollY;
|
|
87797
|
+
const active = this._isHorizontal ? abs$1(scrollX / scrollY) >= 0.5 : abs$1(scrollY / scrollX) >= 0.5;
|
|
87649
87798
|
if (!this._scrollAttr.reverse) {
|
|
87650
87799
|
value = -value;
|
|
87651
87800
|
}
|
|
87652
|
-
|
|
87801
|
+
if (active) {
|
|
87802
|
+
this._handleChartMove(value, (_a = this._scrollAttr.rate) !== null && _a !== void 0 ? _a : 1);
|
|
87803
|
+
}
|
|
87804
|
+
return active;
|
|
87653
87805
|
};
|
|
87654
87806
|
this._handleChartDrag = (delta, e) => {
|
|
87655
87807
|
var _a;
|
|
@@ -88819,8 +88971,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88819
88971
|
}
|
|
88820
88972
|
_getIndicatorAttrs() {
|
|
88821
88973
|
const region = this._regions[0];
|
|
88822
|
-
const { width, height } = region.
|
|
88823
|
-
const { x, y } = region.
|
|
88974
|
+
const { width, height } = region.getLayoutRect();
|
|
88975
|
+
const { x, y } = region.getLayoutStartPoint();
|
|
88824
88976
|
const contentComponentSpec = [];
|
|
88825
88977
|
array(this._spec.content).forEach((eachItem) => {
|
|
88826
88978
|
const contentSpec = mergeSpec({}, this._theme.content, eachItem);
|
|
@@ -88885,7 +89037,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88885
89037
|
}
|
|
88886
89038
|
_computeLayoutRadius() {
|
|
88887
89039
|
const region = this._regions[0];
|
|
88888
|
-
const { width, height } = region.
|
|
89040
|
+
const { width, height } = region.getLayoutRect();
|
|
88889
89041
|
return Math.min(width / 2, height / 2);
|
|
88890
89042
|
}
|
|
88891
89043
|
isRelativeModel(model) {
|
|
@@ -89040,13 +89192,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89040
89192
|
}
|
|
89041
89193
|
function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
|
|
89042
89194
|
const regionStart = startRelativeSeries.getRegion();
|
|
89043
|
-
const regionStartLayoutStartPoint = regionStart.
|
|
89195
|
+
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
89044
89196
|
const regionEnd = endRelativeSeries.getRegion();
|
|
89045
|
-
const regionEndLayoutStartPoint = regionEnd.
|
|
89197
|
+
const regionEndLayoutStartPoint = regionEnd.getLayoutStartPoint();
|
|
89046
89198
|
const regionWidth = Math.abs(Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x) -
|
|
89047
|
-
Math.max(regionStartLayoutStartPoint.x + regionStart.
|
|
89199
|
+
Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width));
|
|
89048
89200
|
const regionHeight = Math.abs(Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y) -
|
|
89049
|
-
Math.max(regionStartLayoutStartPoint.y + regionStart.
|
|
89201
|
+
Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height));
|
|
89050
89202
|
const refSeries = {
|
|
89051
89203
|
relativeSeries,
|
|
89052
89204
|
startRelativeSeries,
|
|
@@ -89066,7 +89218,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89066
89218
|
}
|
|
89067
89219
|
else if (isValid$1(datum.x)) {
|
|
89068
89220
|
const x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
|
|
89069
|
-
const y = Math.max(regionStartLayoutStartPoint.y + regionStart.
|
|
89221
|
+
const y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
|
|
89070
89222
|
const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
|
|
89071
89223
|
lines.push([
|
|
89072
89224
|
{
|
|
@@ -89082,7 +89234,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89082
89234
|
else if (isValid$1(datum.y)) {
|
|
89083
89235
|
const x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
|
|
89084
89236
|
const y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
|
|
89085
|
-
const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.
|
|
89237
|
+
const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
|
|
89086
89238
|
lines.push([
|
|
89087
89239
|
{
|
|
89088
89240
|
x: x,
|
|
@@ -89105,8 +89257,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89105
89257
|
var _a, _b, _c, _d;
|
|
89106
89258
|
const refRelativeSeries = (datum === null || datum === void 0 ? void 0 : datum.getRefRelativeSeries) ? datum.getRefRelativeSeries() : relativeSeries;
|
|
89107
89259
|
const regionStart = refRelativeSeries.getRegion();
|
|
89108
|
-
const regionStartLayoutStartPoint = regionStart.
|
|
89109
|
-
const { width: regionWidth, height: regionHeight } = regionStart.
|
|
89260
|
+
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
89261
|
+
const { width: regionWidth, height: regionHeight } = regionStart.getLayoutRect();
|
|
89110
89262
|
let offsetX = 0;
|
|
89111
89263
|
let offsetY = 0;
|
|
89112
89264
|
if (coordinatesOffset) {
|
|
@@ -89142,8 +89294,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89142
89294
|
function positionLayout(positions, series, regionRelative) {
|
|
89143
89295
|
if (regionRelative) {
|
|
89144
89296
|
const region = series.getRegion();
|
|
89145
|
-
const { x: regionStartX, y: regionStartY } = region.
|
|
89146
|
-
const { width: regionWidth, height: regionHeight } = region.
|
|
89297
|
+
const { x: regionStartX, y: regionStartY } = region.getLayoutStartPoint();
|
|
89298
|
+
const { width: regionWidth, height: regionHeight } = region.getLayoutRect();
|
|
89147
89299
|
return positions.map(position => {
|
|
89148
89300
|
let { x, y } = position;
|
|
89149
89301
|
if (isPercent(x)) {
|
|
@@ -89181,8 +89333,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89181
89333
|
let minY = Infinity;
|
|
89182
89334
|
let maxY = -Infinity;
|
|
89183
89335
|
regions.forEach((region) => {
|
|
89184
|
-
const regionPos = region.
|
|
89185
|
-
const regionRect = region.
|
|
89336
|
+
const regionPos = region.getLayoutStartPoint();
|
|
89337
|
+
const regionRect = region.getLayoutRect();
|
|
89186
89338
|
if (regionPos.x < minX) {
|
|
89187
89339
|
minX = regionPos.x;
|
|
89188
89340
|
}
|
|
@@ -89589,17 +89741,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89589
89741
|
let expandDistanceValue;
|
|
89590
89742
|
if (isPercent(expandDistance)) {
|
|
89591
89743
|
const regionStart = startRelativeSeries.getRegion();
|
|
89592
|
-
const regionStartLayoutStartPoint = regionStart.
|
|
89744
|
+
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
89593
89745
|
const regionEnd = endRelativeSeries.getRegion();
|
|
89594
|
-
const regionEndLayoutStartPoint = regionEnd.
|
|
89746
|
+
const regionEndLayoutStartPoint = regionEnd.getLayoutStartPoint();
|
|
89595
89747
|
if (connectDirection === 'bottom' || connectDirection === 'top') {
|
|
89596
89748
|
const regionHeight = Math.abs(Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y) -
|
|
89597
|
-
Math.max(regionStartLayoutStartPoint.y + regionStart.
|
|
89749
|
+
Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height));
|
|
89598
89750
|
expandDistanceValue = (Number(expandDistance.substring(0, expandDistance.length - 1)) * regionHeight) / 100;
|
|
89599
89751
|
}
|
|
89600
89752
|
else {
|
|
89601
89753
|
const regionWidth = Math.abs(Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x) -
|
|
89602
|
-
Math.max(regionStartLayoutStartPoint.x + regionStart.
|
|
89754
|
+
Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width));
|
|
89603
89755
|
expandDistanceValue = (Number(expandDistance.substring(0, expandDistance.length - 1)) * regionWidth) / 100;
|
|
89604
89756
|
}
|
|
89605
89757
|
}
|
|
@@ -90111,6 +90263,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90111
90263
|
if (!isEqual$1(attrs, this._cacheAttrs)) {
|
|
90112
90264
|
this._cacheAttrs = attrs;
|
|
90113
90265
|
this._playerComponent.setAttributes(attrs);
|
|
90266
|
+
this._playerComponent._initAttributes();
|
|
90267
|
+
this._playerComponent.render();
|
|
90114
90268
|
}
|
|
90115
90269
|
}
|
|
90116
90270
|
else {
|
|
@@ -90933,8 +91087,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90933
91087
|
.filter(cmp => cmp.type === 'totalLabel')
|
|
90934
91088
|
.map(cmp => cmp.getMarks()[0].getProductId())
|
|
90935
91089
|
},
|
|
90936
|
-
x:
|
|
90937
|
-
y:
|
|
91090
|
+
x: 0,
|
|
91091
|
+
y: 0
|
|
90938
91092
|
}, defaultLabelConfig(rule, labelInfo), Object.assign(Object.assign(Object.assign({}, pickWithout(labelSpec, ['position', 'style', 'state', 'type'])), interactive), { centerOffset }));
|
|
90939
91093
|
if (rule === 'line' || rule === 'area') {
|
|
90940
91094
|
spec.type = rule;
|
|
@@ -90951,7 +91105,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90951
91105
|
: textAttribute(labelInfos[params.labelIndex], datum, labelSpec.formatMethod, labelSpec.formatter);
|
|
90952
91106
|
}
|
|
90953
91107
|
})
|
|
90954
|
-
.size(() => labelInfos[0].series.getRegion().
|
|
91108
|
+
.size(() => labelInfos[0].series.getRegion().getLayoutRect());
|
|
90955
91109
|
}
|
|
90956
91110
|
compileMarks() {
|
|
90957
91111
|
this.getMarks().forEach(m => {
|
|
@@ -91072,8 +91226,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91072
91226
|
return mergeSpec({
|
|
91073
91227
|
textStyle: { pickable: this._spec.interactive === true },
|
|
91074
91228
|
position: totalLabelPosition(series, this._baseMark.type),
|
|
91075
|
-
x:
|
|
91076
|
-
y:
|
|
91229
|
+
x: 0,
|
|
91230
|
+
y: 0
|
|
91077
91231
|
}, Object.assign({ offset,
|
|
91078
91232
|
animation,
|
|
91079
91233
|
overlap, dataFilter: (data) => {
|
|
@@ -91089,7 +91243,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91089
91243
|
labelSpec: series.getSpec().totalLabel
|
|
91090
91244
|
}, datum, this._spec.formatMethod);
|
|
91091
91245
|
})
|
|
91092
|
-
.size(() => this._regions[0].
|
|
91246
|
+
.size(() => this._regions[0].getLayoutRect());
|
|
91093
91247
|
});
|
|
91094
91248
|
}
|
|
91095
91249
|
compileMarks() {
|
|
@@ -91352,8 +91506,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91352
91506
|
return data;
|
|
91353
91507
|
}
|
|
91354
91508
|
_getBrushInteractiveAttr(region) {
|
|
91355
|
-
const regionLayoutPosition = region.
|
|
91356
|
-
const regionLayoutRect = region.
|
|
91509
|
+
const regionLayoutPosition = region.getLayoutStartPoint();
|
|
91510
|
+
const regionLayoutRect = region.getLayoutRect();
|
|
91357
91511
|
const seriesRegionStartX = regionLayoutPosition.x;
|
|
91358
91512
|
const seriesRegionEndX = seriesRegionStartX + regionLayoutRect.width;
|
|
91359
91513
|
const seriesRegionStartY = regionLayoutPosition.y;
|
|
@@ -91489,11 +91643,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91489
91643
|
});
|
|
91490
91644
|
}
|
|
91491
91645
|
_reconfigLinkedItem(operateMask, region) {
|
|
91492
|
-
const regionLayoutPos = region.
|
|
91646
|
+
const regionLayoutPos = region.getLayoutStartPoint();
|
|
91493
91647
|
const seriesId = region.getSeries().map(s => s.id);
|
|
91494
91648
|
this._linkedSeries.forEach((s) => {
|
|
91495
91649
|
if (!seriesId.includes(s.id)) {
|
|
91496
|
-
const sRegionLayoutPos = s.getRegion().
|
|
91650
|
+
const sRegionLayoutPos = s.getRegion().getLayoutStartPoint();
|
|
91497
91651
|
const regionOffsetX = sRegionLayoutPos.x - regionLayoutPos.x;
|
|
91498
91652
|
const regionOffsetY = sRegionLayoutPos.y - regionLayoutPos.y;
|
|
91499
91653
|
this._linkedItemMap[s.id].forEach((mark) => {
|
|
@@ -92306,7 +92460,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92306
92460
|
});
|
|
92307
92461
|
const datum = this._data.getLatestData()[i];
|
|
92308
92462
|
const anchor = this.dataToPosition(datum);
|
|
92309
|
-
const regionPos = this.getRegions()[0].
|
|
92463
|
+
const regionPos = this.getRegions()[0].getLayoutStartPoint();
|
|
92310
92464
|
const showLeader = !!(((_b = this._spec.leader) === null || _b === void 0 ? void 0 : _b.visible) && (icon || nameLabel || valueLabel));
|
|
92311
92465
|
this._markerComponents[i].setAttributes({
|
|
92312
92466
|
x: regionPos.x,
|
|
@@ -92649,22 +92803,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92649
92803
|
|
|
92650
92804
|
class Layout3d extends Layout {
|
|
92651
92805
|
layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
|
|
92652
|
-
this.
|
|
92653
|
-
this.
|
|
92654
|
-
this.leftCurrent = chartLayoutRect.x;
|
|
92655
|
-
this.topCurrent = chartLayoutRect.y;
|
|
92656
|
-
this.rightCurrent = chartLayoutRect.x + chartLayoutRect.width;
|
|
92657
|
-
this.bottomCurrent = chartLayoutRect.height + chartLayoutRect.y;
|
|
92658
|
-
items.sort((a, b) => b.layoutLevel - a.layoutLevel);
|
|
92659
|
-
this.layoutNormalItems(items.filter(x => x.layoutType === 'normal'));
|
|
92806
|
+
this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
|
|
92807
|
+
this._layoutNormalItems(items);
|
|
92660
92808
|
const layoutTemp = {
|
|
92661
|
-
|
|
92662
|
-
|
|
92663
|
-
|
|
92664
|
-
|
|
92809
|
+
left: this.leftCurrent,
|
|
92810
|
+
top: this.topCurrent,
|
|
92811
|
+
right: this.rightCurrent,
|
|
92812
|
+
bottom: this.bottomCurrent
|
|
92665
92813
|
};
|
|
92666
|
-
const regionItems = items.filter(x => x.layoutType === 'region');
|
|
92667
|
-
const relativeItems = items.filter(x => x.layoutType === 'region-relative');
|
|
92668
92814
|
const absoluteItem = items.filter(x => x.layoutType === 'absolute');
|
|
92669
92815
|
const zItems = absoluteItem.filter(i => {
|
|
92670
92816
|
return i.layoutOrient === 'z';
|
|
@@ -92678,23 +92824,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92678
92824
|
this.rightCurrent -= extraWH.width / 8;
|
|
92679
92825
|
this.topCurrent += extraWH.height / 8;
|
|
92680
92826
|
this.bottomCurrent -= extraWH.height / 8;
|
|
92681
|
-
const
|
|
92682
|
-
|
|
92683
|
-
|
|
92684
|
-
offsetLeft: 0,
|
|
92685
|
-
offsetRight: 0
|
|
92686
|
-
};
|
|
92687
|
-
this.layoutRegionItems(regionItems, relativeItems, offsetWH);
|
|
92688
|
-
if (relativeItems.some(i => i.autoIndent)) {
|
|
92689
|
-
const { top, bottom, left, right } = this._checkAutoIndent(relativeItems);
|
|
92690
|
-
if (top || bottom || left || right) {
|
|
92691
|
-
this.topCurrent = layoutTemp._topCurrent + top;
|
|
92692
|
-
this.bottomCurrent = layoutTemp._bottomCurrent - bottom;
|
|
92693
|
-
this.leftCurrent = layoutTemp.leftCurrent + left;
|
|
92694
|
-
this.rightCurrent = layoutTemp._rightCurrent - right;
|
|
92695
|
-
this.layoutRegionItems(regionItems, relativeItems);
|
|
92696
|
-
}
|
|
92697
|
-
}
|
|
92827
|
+
const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
|
|
92828
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
92829
|
+
this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp);
|
|
92698
92830
|
const absoluteItemExceptZAxis = absoluteItem.filter(i => i.layoutOrient !== 'z');
|
|
92699
92831
|
this.layoutAbsoluteItems(absoluteItemExceptZAxis);
|
|
92700
92832
|
const xAxis = relativeItems.filter(item => {
|
|
@@ -92731,84 +92863,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92731
92863
|
item.absoluteLayoutInRect(zRect);
|
|
92732
92864
|
});
|
|
92733
92865
|
}
|
|
92734
|
-
layoutRegionItems(regionItems, regionRelativeItems, extraOffset) {
|
|
92735
|
-
let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
92736
|
-
let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
92737
|
-
if (!extraOffset) {
|
|
92738
|
-
extraOffset = { offsetLeft: 0, offsetRight: 0, offsetTop: 0, offsetBottom: 0 };
|
|
92739
|
-
}
|
|
92740
|
-
regionRelativeItems
|
|
92741
|
-
.filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
|
|
92742
|
-
.forEach(item => {
|
|
92743
|
-
const layoutRect = this.getItemComputeLayoutRect(item, extraOffset);
|
|
92744
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
92745
|
-
item.setLayoutRect({ width: rect.width });
|
|
92746
|
-
if (item.layoutOrient === 'left') {
|
|
92747
|
-
item.setLayoutStartPosition({
|
|
92748
|
-
x: this.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft + extraOffset.offsetLeft
|
|
92749
|
-
});
|
|
92750
|
-
this.leftCurrent += rect.width + item.layoutPaddingLeft + item.layoutPaddingRight + extraOffset.offsetLeft;
|
|
92751
|
-
}
|
|
92752
|
-
else if (item.layoutOrient === 'right') {
|
|
92753
|
-
this.rightCurrent -= rect.width + item.layoutPaddingLeft + item.layoutPaddingRight + extraOffset.offsetRight;
|
|
92754
|
-
item.setLayoutStartPosition({
|
|
92755
|
-
x: this.rightCurrent + item.layoutOffsetX + item.layoutPaddingLeft
|
|
92756
|
-
});
|
|
92757
|
-
}
|
|
92758
|
-
});
|
|
92759
|
-
regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
92760
|
-
regionRelativeItems
|
|
92761
|
-
.filter(x => x.layoutOrient === 'top' || x.layoutOrient === 'bottom')
|
|
92762
|
-
.forEach(item => {
|
|
92763
|
-
const layoutRect = this.getItemComputeLayoutRect(item, extraOffset);
|
|
92764
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
92765
|
-
item.setLayoutRect({ height: rect.height });
|
|
92766
|
-
if (item.layoutOrient === 'top') {
|
|
92767
|
-
item.setLayoutStartPosition({
|
|
92768
|
-
y: this.topCurrent + item.layoutOffsetY + item.layoutPaddingTop + extraOffset.offsetTop
|
|
92769
|
-
});
|
|
92770
|
-
this.topCurrent += rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
92771
|
-
}
|
|
92772
|
-
else if (item.layoutOrient === 'bottom') {
|
|
92773
|
-
this.bottomCurrent -=
|
|
92774
|
-
rect.height + item.layoutPaddingTop + item.layoutPaddingBottom + extraOffset.offsetBottom;
|
|
92775
|
-
item.setLayoutStartPosition({
|
|
92776
|
-
y: this.bottomCurrent + item.layoutOffsetY + item.layoutPaddingTop
|
|
92777
|
-
});
|
|
92778
|
-
}
|
|
92779
|
-
});
|
|
92780
|
-
regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
92781
|
-
regionItems.forEach(region => {
|
|
92782
|
-
region.setLayoutRect({
|
|
92783
|
-
width: regionRelativeTotalWidth,
|
|
92784
|
-
height: regionRelativeTotalHeight
|
|
92785
|
-
});
|
|
92786
|
-
region.setLayoutStartPosition({
|
|
92787
|
-
x: this.leftCurrent + region.layoutOffsetX + region.layoutPaddingLeft,
|
|
92788
|
-
y: this.topCurrent + region.layoutOffsetY + region.layoutPaddingTop
|
|
92789
|
-
});
|
|
92790
|
-
});
|
|
92791
|
-
regionRelativeItems.forEach(item => {
|
|
92792
|
-
if (['left', 'right'].includes(item.layoutOrient)) {
|
|
92793
|
-
const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
|
|
92794
|
-
item.setLayoutRect({
|
|
92795
|
-
height: relativeRegion.layoutExcludeIndent.height
|
|
92796
|
-
});
|
|
92797
|
-
item.setLayoutStartPosition({
|
|
92798
|
-
y: relativeRegion.layoutExcludeIndent.y + item.layoutOffsetY + item.layoutPaddingTop
|
|
92799
|
-
});
|
|
92800
|
-
}
|
|
92801
|
-
else if (['top', 'bottom'].includes(item.layoutOrient)) {
|
|
92802
|
-
const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
|
|
92803
|
-
item.setLayoutRect({
|
|
92804
|
-
width: relativeRegion.layoutExcludeIndent.width
|
|
92805
|
-
});
|
|
92806
|
-
item.setLayoutStartPosition({
|
|
92807
|
-
x: relativeRegion.layoutExcludeIndent.x + item.layoutOffsetX + item.layoutPaddingLeft
|
|
92808
|
-
});
|
|
92809
|
-
}
|
|
92810
|
-
});
|
|
92811
|
-
}
|
|
92812
92866
|
getItemComputeLayoutRect(item, extraOffset) {
|
|
92813
92867
|
if (!extraOffset) {
|
|
92814
92868
|
extraOffset = { offsetLeft: 0, offsetRight: 0, offsetTop: 0, offsetBottom: 0 };
|