@visactor/vchart 1.8.8-alpha.1 → 1.8.9

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.
Files changed (415) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +1068 -756
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/animation/config.js +1 -1
  6. package/cjs/animation/config.js.map +1 -1
  7. package/cjs/compile/interface/compiler.d.ts +2 -0
  8. package/cjs/compile/interface/compiler.js.map +1 -1
  9. package/cjs/component/axis/base-axis.d.ts +2 -1
  10. package/cjs/component/axis/base-axis.js +11 -1
  11. package/cjs/component/axis/base-axis.js.map +1 -1
  12. package/cjs/component/axis/cartesian/axis.d.ts +1 -1
  13. package/cjs/component/axis/cartesian/axis.js +6 -6
  14. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  15. package/cjs/component/axis/mixin/band-axis-mixin.d.ts +6 -1
  16. package/cjs/component/axis/mixin/band-axis-mixin.js +17 -1
  17. package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
  18. package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +9 -1
  19. package/cjs/component/axis/mixin/linear-axis-mixin.js +18 -5
  20. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  21. package/cjs/component/axis/polar/axis.d.ts +1 -1
  22. package/cjs/component/axis/polar/axis.js +4 -4
  23. package/cjs/component/axis/polar/axis.js.map +1 -1
  24. package/cjs/component/brush/brush.js +3 -3
  25. package/cjs/component/brush/brush.js.map +1 -1
  26. package/cjs/component/crosshair/base.js +5 -4
  27. package/cjs/component/crosshair/base.js.map +1 -1
  28. package/cjs/component/crosshair/cartesian.js +20 -17
  29. package/cjs/component/crosshair/cartesian.js.map +1 -1
  30. package/cjs/component/data-zoom/data-filter-base-component.d.ts +1 -1
  31. package/cjs/component/data-zoom/data-filter-base-component.js +6 -3
  32. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  33. package/cjs/component/geo/geo-coordinate.d.ts +1 -0
  34. package/cjs/component/geo/geo-coordinate.js +7 -6
  35. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  36. package/cjs/component/indicator/indicator.js +2 -2
  37. package/cjs/component/indicator/indicator.js.map +1 -1
  38. package/cjs/component/label/label.js +3 -3
  39. package/cjs/component/label/label.js.map +1 -1
  40. package/cjs/component/label/total-label.js +3 -3
  41. package/cjs/component/label/total-label.js.map +1 -1
  42. package/cjs/component/label/util.js.map +1 -1
  43. package/cjs/component/legend/base-legend.d.ts +1 -1
  44. package/cjs/component/legend/util.d.ts +1 -1
  45. package/cjs/component/map-label/component.js +1 -1
  46. package/cjs/component/map-label/component.js.map +1 -1
  47. package/cjs/component/marker/mark-line/mark-line.js +3 -3
  48. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  49. package/cjs/component/marker/utils.js +6 -6
  50. package/cjs/component/marker/utils.js.map +1 -1
  51. package/cjs/component/player/player.js +2 -1
  52. package/cjs/component/player/player.js.map +1 -1
  53. package/cjs/component/tooltip/utils/show-tooltip.js +1 -1
  54. package/cjs/component/tooltip/utils/show-tooltip.js.map +1 -1
  55. package/cjs/constant/event.js +2 -1
  56. package/cjs/constant/scroll-bar.js +1 -2
  57. package/cjs/core/index.d.ts +1 -1
  58. package/cjs/core/index.js +1 -1
  59. package/cjs/core/index.js.map +1 -1
  60. package/cjs/core/vchart.js +1 -1
  61. package/cjs/core/vchart.js.map +1 -1
  62. package/cjs/env/env.js +1 -1
  63. package/cjs/env/index.js +1 -1
  64. package/cjs/event/event-dispatcher.js +4 -6
  65. package/cjs/event/event-dispatcher.js.map +1 -1
  66. package/cjs/event/event.js +1 -1
  67. package/cjs/event/index.js +1 -1
  68. package/cjs/event/interface.js +1 -1
  69. package/cjs/interaction/interface.js +2 -1
  70. package/cjs/interaction/trigger.js +1 -1
  71. package/cjs/interaction/zoom/zoomable.js +9 -9
  72. package/cjs/interaction/zoom/zoomable.js.map +1 -1
  73. package/cjs/layout/base-layout.d.ts +46 -2
  74. package/cjs/layout/base-layout.js +194 -36
  75. package/cjs/layout/base-layout.js.map +1 -1
  76. package/cjs/layout/index.js +1 -1
  77. package/cjs/layout/interface.d.ts +3 -3
  78. package/cjs/layout/interface.js +1 -1
  79. package/cjs/layout/interface.js.map +1 -1
  80. package/cjs/layout/layout-item.d.ts +3 -6
  81. package/cjs/layout/layout-item.js +7 -26
  82. package/cjs/layout/layout-item.js.map +1 -1
  83. package/cjs/layout/layout3d/index.d.ts +1 -8
  84. package/cjs/layout/layout3d/index.js +10 -69
  85. package/cjs/layout/layout3d/index.js.map +1 -1
  86. package/cjs/layout/util.js +91 -119
  87. package/cjs/layout/util.js.map +1 -1
  88. package/cjs/model/base-model-transformer.d.ts +2 -1
  89. package/cjs/model/base-model-transformer.js +6 -2
  90. package/cjs/model/base-model-transformer.js.map +1 -1
  91. package/cjs/model/interface.d.ts +0 -2
  92. package/cjs/model/interface.js.map +1 -1
  93. package/cjs/model/layout-model.d.ts +0 -8
  94. package/cjs/model/layout-model.js +0 -15
  95. package/cjs/model/layout-model.js.map +1 -1
  96. package/cjs/series/area/area-transformer.d.ts +2 -0
  97. package/cjs/series/area/area-transformer.js +18 -1
  98. package/cjs/series/area/area-transformer.js.map +1 -1
  99. package/cjs/series/area/area.d.ts +0 -1
  100. package/cjs/series/area/area.js +1 -17
  101. package/cjs/series/area/area.js.map +1 -1
  102. package/cjs/series/bar/bar.js +1 -1
  103. package/cjs/series/bar/bar.js.map +1 -1
  104. package/cjs/series/base/base-series-transformer.js +1 -2
  105. package/cjs/series/base/base-series-transformer.js.map +1 -1
  106. package/cjs/series/base/base-series.js +14 -13
  107. package/cjs/series/base/base-series.js.map +1 -1
  108. package/cjs/series/cartesian/cartesian.js +4 -3
  109. package/cjs/series/cartesian/cartesian.js.map +1 -1
  110. package/cjs/series/correlation/correlation.js +1 -1
  111. package/cjs/series/correlation/correlation.js.map +1 -1
  112. package/cjs/series/mixin/line-mixin.js +1 -1
  113. package/cjs/series/mixin/line-mixin.js.map +1 -1
  114. package/cjs/series/pie/3d/pie-3d.js +1 -1
  115. package/cjs/series/pie/3d/pie-3d.js.map +1 -1
  116. package/cjs/series/pie/pie.js +7 -7
  117. package/cjs/series/pie/pie.js.map +1 -1
  118. package/cjs/series/polar/polar.js +1 -1
  119. package/cjs/series/polar/polar.js.map +1 -1
  120. package/cjs/series/radar/animation.js +1 -1
  121. package/cjs/series/radar/animation.js.map +1 -1
  122. package/cjs/series/sankey/sankey.js +1 -1
  123. package/cjs/series/sankey/sankey.js.map +1 -1
  124. package/cjs/series/sunburst/sunburst.js +2 -2
  125. package/cjs/series/sunburst/sunburst.js.map +1 -1
  126. package/cjs/series/word-cloud/base.js +3 -3
  127. package/cjs/series/word-cloud/base.js.map +1 -1
  128. package/cjs/theme/builtin/index.js +3 -1
  129. package/cjs/theme/builtin/index.js.map +1 -1
  130. package/cjs/typings/layout.d.ts +2 -1
  131. package/cjs/typings/layout.js.map +1 -1
  132. package/esm/animation/config.js +1 -1
  133. package/esm/animation/config.js.map +1 -1
  134. package/esm/compile/interface/compiler.d.ts +2 -0
  135. package/esm/compile/interface/compiler.js.map +1 -1
  136. package/esm/component/axis/base-axis.d.ts +2 -1
  137. package/esm/component/axis/base-axis.js +11 -1
  138. package/esm/component/axis/base-axis.js.map +1 -1
  139. package/esm/component/axis/cartesian/axis.d.ts +1 -1
  140. package/esm/component/axis/cartesian/axis.js +5 -5
  141. package/esm/component/axis/cartesian/axis.js.map +1 -1
  142. package/esm/component/axis/mixin/band-axis-mixin.d.ts +6 -1
  143. package/esm/component/axis/mixin/band-axis-mixin.js +17 -1
  144. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  145. package/esm/component/axis/mixin/linear-axis-mixin.d.ts +9 -1
  146. package/esm/component/axis/mixin/linear-axis-mixin.js +19 -5
  147. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  148. package/esm/component/axis/polar/axis.d.ts +1 -1
  149. package/esm/component/axis/polar/axis.js +4 -4
  150. package/esm/component/axis/polar/axis.js.map +1 -1
  151. package/esm/component/brush/brush.js +3 -3
  152. package/esm/component/brush/brush.js.map +1 -1
  153. package/esm/component/crosshair/base.js +5 -4
  154. package/esm/component/crosshair/base.js.map +1 -1
  155. package/esm/component/crosshair/cartesian.js +20 -17
  156. package/esm/component/crosshair/cartesian.js.map +1 -1
  157. package/esm/component/data-zoom/data-filter-base-component.d.ts +1 -1
  158. package/esm/component/data-zoom/data-filter-base-component.js +6 -4
  159. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  160. package/esm/component/geo/geo-coordinate.d.ts +1 -0
  161. package/esm/component/geo/geo-coordinate.js +7 -6
  162. package/esm/component/geo/geo-coordinate.js.map +1 -1
  163. package/esm/component/indicator/indicator.js +2 -2
  164. package/esm/component/indicator/indicator.js.map +1 -1
  165. package/esm/component/label/label.js +3 -3
  166. package/esm/component/label/label.js.map +1 -1
  167. package/esm/component/label/total-label.js +3 -3
  168. package/esm/component/label/total-label.js.map +1 -1
  169. package/esm/component/label/util.js.map +1 -1
  170. package/esm/component/legend/base-legend.d.ts +1 -1
  171. package/esm/component/legend/util.d.ts +1 -1
  172. package/esm/component/map-label/component.js +1 -1
  173. package/esm/component/map-label/component.js.map +1 -1
  174. package/esm/component/marker/mark-line/mark-line.js +3 -3
  175. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  176. package/esm/component/marker/utils.js +6 -6
  177. package/esm/component/marker/utils.js.map +1 -1
  178. package/esm/component/player/player.js +2 -1
  179. package/esm/component/player/player.js.map +1 -1
  180. package/esm/component/tooltip/utils/show-tooltip.js +1 -1
  181. package/esm/component/tooltip/utils/show-tooltip.js.map +1 -1
  182. package/esm/constant/event.js +2 -1
  183. package/esm/constant/scroll-bar.js +1 -2
  184. package/esm/core/index.d.ts +1 -1
  185. package/esm/core/index.js +1 -1
  186. package/esm/core/index.js.map +1 -1
  187. package/esm/core/vchart.js +1 -1
  188. package/esm/core/vchart.js.map +1 -1
  189. package/esm/env/env.js +1 -1
  190. package/esm/env/index.js +1 -1
  191. package/esm/event/event-dispatcher.js +4 -6
  192. package/esm/event/event-dispatcher.js.map +1 -1
  193. package/esm/event/event.js +1 -1
  194. package/esm/event/index.js +1 -1
  195. package/esm/event/interface.js +1 -1
  196. package/esm/interaction/interface.js +2 -1
  197. package/esm/interaction/trigger.js +1 -1
  198. package/esm/interaction/zoom/zoomable.js +8 -9
  199. package/esm/interaction/zoom/zoomable.js.map +1 -1
  200. package/esm/layout/base-layout.d.ts +46 -2
  201. package/esm/layout/base-layout.js +192 -36
  202. package/esm/layout/base-layout.js.map +1 -1
  203. package/esm/layout/index.js +1 -1
  204. package/esm/layout/interface.d.ts +3 -3
  205. package/esm/layout/interface.js +1 -1
  206. package/esm/layout/interface.js.map +1 -1
  207. package/esm/layout/layout-item.d.ts +3 -6
  208. package/esm/layout/layout-item.js +7 -25
  209. package/esm/layout/layout-item.js.map +1 -1
  210. package/esm/layout/layout3d/index.d.ts +1 -8
  211. package/esm/layout/layout3d/index.js +10 -69
  212. package/esm/layout/layout3d/index.js.map +1 -1
  213. package/esm/layout/util.js +91 -119
  214. package/esm/layout/util.js.map +1 -1
  215. package/esm/model/base-model-transformer.d.ts +2 -1
  216. package/esm/model/base-model-transformer.js +6 -2
  217. package/esm/model/base-model-transformer.js.map +1 -1
  218. package/esm/model/interface.d.ts +0 -2
  219. package/esm/model/interface.js.map +1 -1
  220. package/esm/model/layout-model.d.ts +0 -8
  221. package/esm/model/layout-model.js +0 -15
  222. package/esm/model/layout-model.js.map +1 -1
  223. package/esm/series/area/area-transformer.d.ts +2 -0
  224. package/esm/series/area/area-transformer.js +19 -0
  225. package/esm/series/area/area-transformer.js.map +1 -1
  226. package/esm/series/area/area.d.ts +0 -1
  227. package/esm/series/area/area.js +1 -18
  228. package/esm/series/area/area.js.map +1 -1
  229. package/esm/series/bar/bar.js +1 -1
  230. package/esm/series/bar/bar.js.map +1 -1
  231. package/esm/series/base/base-series-transformer.js +1 -2
  232. package/esm/series/base/base-series-transformer.js.map +1 -1
  233. package/esm/series/base/base-series.js +13 -12
  234. package/esm/series/base/base-series.js.map +1 -1
  235. package/esm/series/cartesian/cartesian.js +3 -2
  236. package/esm/series/cartesian/cartesian.js.map +1 -1
  237. package/esm/series/correlation/correlation.js +1 -1
  238. package/esm/series/correlation/correlation.js.map +1 -1
  239. package/esm/series/mixin/line-mixin.js +1 -1
  240. package/esm/series/mixin/line-mixin.js.map +1 -1
  241. package/esm/series/pie/3d/pie-3d.js +1 -1
  242. package/esm/series/pie/3d/pie-3d.js.map +1 -1
  243. package/esm/series/pie/pie.js +7 -7
  244. package/esm/series/pie/pie.js.map +1 -1
  245. package/esm/series/polar/polar.js +1 -1
  246. package/esm/series/polar/polar.js.map +1 -1
  247. package/esm/series/radar/animation.js +1 -1
  248. package/esm/series/radar/animation.js.map +1 -1
  249. package/esm/series/sankey/sankey.js +1 -1
  250. package/esm/series/sankey/sankey.js.map +1 -1
  251. package/esm/series/sunburst/sunburst.js +2 -2
  252. package/esm/series/sunburst/sunburst.js.map +1 -1
  253. package/esm/series/word-cloud/base.js +3 -3
  254. package/esm/series/word-cloud/base.js.map +1 -1
  255. package/esm/theme/builtin/index.js +2 -1
  256. package/esm/theme/builtin/index.js.map +1 -1
  257. package/esm/typings/layout.d.ts +2 -1
  258. package/esm/typings/layout.js.map +1 -1
  259. package/package.json +14 -14
  260. package/cjs/theme/builtin/common-mobile/component/axis/band-axis.d.ts +0 -2
  261. package/cjs/theme/builtin/common-mobile/component/axis/band-axis.js +0 -22
  262. package/cjs/theme/builtin/common-mobile/component/axis/band-axis.js.map +0 -1
  263. package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +0 -4
  264. package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js +0 -40
  265. package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +0 -1
  266. package/cjs/theme/builtin/common-mobile/component/axis/common-axis.d.ts +0 -2
  267. package/cjs/theme/builtin/common-mobile/component/axis/common-axis.js +0 -42
  268. package/cjs/theme/builtin/common-mobile/component/axis/common-axis.js.map +0 -1
  269. package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +0 -2
  270. package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.js +0 -22
  271. package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.js.map +0 -1
  272. package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +0 -3
  273. package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.js +0 -25
  274. package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.js.map +0 -1
  275. package/cjs/theme/builtin/common-mobile/component/crosshair.d.ts +0 -2
  276. package/cjs/theme/builtin/common-mobile/component/crosshair.js +0 -39
  277. package/cjs/theme/builtin/common-mobile/component/crosshair.js.map +0 -1
  278. package/cjs/theme/builtin/common-mobile/component/data-zoom.d.ts +0 -2
  279. package/cjs/theme/builtin/common-mobile/component/data-zoom.js +0 -40
  280. package/cjs/theme/builtin/common-mobile/component/data-zoom.js.map +0 -1
  281. package/cjs/theme/builtin/common-mobile/component/index.d.ts +0 -2
  282. package/cjs/theme/builtin/common-mobile/component/index.js +0 -34
  283. package/cjs/theme/builtin/common-mobile/component/index.js.map +0 -1
  284. package/cjs/theme/builtin/common-mobile/component/indicator.d.ts +0 -2
  285. package/cjs/theme/builtin/common-mobile/component/indicator.js +0 -23
  286. package/cjs/theme/builtin/common-mobile/component/indicator.js.map +0 -1
  287. package/cjs/theme/builtin/common-mobile/component/legend/color-legend.d.ts +0 -2
  288. package/cjs/theme/builtin/common-mobile/component/legend/color-legend.js +0 -23
  289. package/cjs/theme/builtin/common-mobile/component/legend/color-legend.js.map +0 -1
  290. package/cjs/theme/builtin/common-mobile/component/legend/continuous.d.ts +0 -2
  291. package/cjs/theme/builtin/common-mobile/component/legend/continuous.js +0 -44
  292. package/cjs/theme/builtin/common-mobile/component/legend/continuous.js.map +0 -1
  293. package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +0 -2
  294. package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.js +0 -39
  295. package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.js.map +0 -1
  296. package/cjs/theme/builtin/common-mobile/component/legend/size-legend.d.ts +0 -2
  297. package/cjs/theme/builtin/common-mobile/component/legend/size-legend.js +0 -23
  298. package/cjs/theme/builtin/common-mobile/component/legend/size-legend.js.map +0 -1
  299. package/cjs/theme/builtin/common-mobile/component/map-label.d.ts +0 -2
  300. package/cjs/theme/builtin/common-mobile/component/map-label.js +0 -39
  301. package/cjs/theme/builtin/common-mobile/component/map-label.js.map +0 -1
  302. package/cjs/theme/builtin/common-mobile/component/mark-area.d.ts +0 -2
  303. package/cjs/theme/builtin/common-mobile/component/mark-area.js +0 -24
  304. package/cjs/theme/builtin/common-mobile/component/mark-area.js.map +0 -1
  305. package/cjs/theme/builtin/common-mobile/component/mark-line.d.ts +0 -2
  306. package/cjs/theme/builtin/common-mobile/component/mark-line.js +0 -33
  307. package/cjs/theme/builtin/common-mobile/component/mark-line.js.map +0 -1
  308. package/cjs/theme/builtin/common-mobile/component/mark-point.d.ts +0 -2
  309. package/cjs/theme/builtin/common-mobile/component/mark-point.js +0 -19
  310. package/cjs/theme/builtin/common-mobile/component/mark-point.js.map +0 -1
  311. package/cjs/theme/builtin/common-mobile/component/player.d.ts +0 -2
  312. package/cjs/theme/builtin/common-mobile/component/player.js +0 -51
  313. package/cjs/theme/builtin/common-mobile/component/player.js.map +0 -1
  314. package/cjs/theme/builtin/common-mobile/component/poptip.d.ts +0 -2
  315. package/cjs/theme/builtin/common-mobile/component/poptip.js +0 -25
  316. package/cjs/theme/builtin/common-mobile/component/poptip.js.map +0 -1
  317. package/cjs/theme/builtin/common-mobile/component/title.d.ts +0 -2
  318. package/cjs/theme/builtin/common-mobile/component/title.js +0 -23
  319. package/cjs/theme/builtin/common-mobile/component/title.js.map +0 -1
  320. package/cjs/theme/builtin/common-mobile/component/tooltip.d.ts +0 -2
  321. package/cjs/theme/builtin/common-mobile/component/tooltip.js +0 -43
  322. package/cjs/theme/builtin/common-mobile/component/tooltip.js.map +0 -1
  323. package/cjs/theme/builtin/common-mobile/component/total-label.d.ts +0 -2
  324. package/cjs/theme/builtin/common-mobile/component/total-label.js +0 -16
  325. package/cjs/theme/builtin/common-mobile/component/total-label.js.map +0 -1
  326. package/cjs/theme/builtin/common-mobile/constants.d.ts +0 -2
  327. package/cjs/theme/builtin/common-mobile/constants.js +0 -23
  328. package/cjs/theme/builtin/common-mobile/constants.js.map +0 -1
  329. package/cjs/theme/builtin/common-mobile/mark.d.ts +0 -3
  330. package/cjs/theme/builtin/common-mobile/mark.js +0 -35
  331. package/cjs/theme/builtin/common-mobile/mark.js.map +0 -1
  332. package/cjs/theme/builtin/dark-mobile/index.d.ts +0 -2
  333. package/cjs/theme/builtin/dark-mobile/index.js +0 -18
  334. package/cjs/theme/builtin/dark-mobile/index.js.map +0 -1
  335. package/cjs/theme/builtin/light-mobile/index.d.ts +0 -2
  336. package/cjs/theme/builtin/light-mobile/index.js +0 -18
  337. package/cjs/theme/builtin/light-mobile/index.js.map +0 -1
  338. package/esm/theme/builtin/common-mobile/component/axis/band-axis.d.ts +0 -2
  339. package/esm/theme/builtin/common-mobile/component/axis/band-axis.js +0 -18
  340. package/esm/theme/builtin/common-mobile/component/axis/band-axis.js.map +0 -1
  341. package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +0 -4
  342. package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js +0 -38
  343. package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +0 -1
  344. package/esm/theme/builtin/common-mobile/component/axis/common-axis.d.ts +0 -2
  345. package/esm/theme/builtin/common-mobile/component/axis/common-axis.js +0 -36
  346. package/esm/theme/builtin/common-mobile/component/axis/common-axis.js.map +0 -1
  347. package/esm/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +0 -2
  348. package/esm/theme/builtin/common-mobile/component/axis/linear-axis.js +0 -18
  349. package/esm/theme/builtin/common-mobile/component/axis/linear-axis.js.map +0 -1
  350. package/esm/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +0 -3
  351. package/esm/theme/builtin/common-mobile/component/axis/polar-axis.js +0 -23
  352. package/esm/theme/builtin/common-mobile/component/axis/polar-axis.js.map +0 -1
  353. package/esm/theme/builtin/common-mobile/component/crosshair.d.ts +0 -2
  354. package/esm/theme/builtin/common-mobile/component/crosshair.js +0 -35
  355. package/esm/theme/builtin/common-mobile/component/crosshair.js.map +0 -1
  356. package/esm/theme/builtin/common-mobile/component/data-zoom.d.ts +0 -2
  357. package/esm/theme/builtin/common-mobile/component/data-zoom.js +0 -34
  358. package/esm/theme/builtin/common-mobile/component/data-zoom.js.map +0 -1
  359. package/esm/theme/builtin/common-mobile/component/index.d.ts +0 -2
  360. package/esm/theme/builtin/common-mobile/component/index.js +0 -66
  361. package/esm/theme/builtin/common-mobile/component/index.js.map +0 -1
  362. package/esm/theme/builtin/common-mobile/component/indicator.d.ts +0 -2
  363. package/esm/theme/builtin/common-mobile/component/indicator.js +0 -17
  364. package/esm/theme/builtin/common-mobile/component/indicator.js.map +0 -1
  365. package/esm/theme/builtin/common-mobile/component/legend/color-legend.d.ts +0 -2
  366. package/esm/theme/builtin/common-mobile/component/legend/color-legend.js +0 -17
  367. package/esm/theme/builtin/common-mobile/component/legend/color-legend.js.map +0 -1
  368. package/esm/theme/builtin/common-mobile/component/legend/continuous.d.ts +0 -2
  369. package/esm/theme/builtin/common-mobile/component/legend/continuous.js +0 -38
  370. package/esm/theme/builtin/common-mobile/component/legend/continuous.js.map +0 -1
  371. package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +0 -2
  372. package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.js +0 -33
  373. package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.js.map +0 -1
  374. package/esm/theme/builtin/common-mobile/component/legend/size-legend.d.ts +0 -2
  375. package/esm/theme/builtin/common-mobile/component/legend/size-legend.js +0 -17
  376. package/esm/theme/builtin/common-mobile/component/legend/size-legend.js.map +0 -1
  377. package/esm/theme/builtin/common-mobile/component/map-label.d.ts +0 -2
  378. package/esm/theme/builtin/common-mobile/component/map-label.js +0 -33
  379. package/esm/theme/builtin/common-mobile/component/map-label.js.map +0 -1
  380. package/esm/theme/builtin/common-mobile/component/mark-area.d.ts +0 -2
  381. package/esm/theme/builtin/common-mobile/component/mark-area.js +0 -18
  382. package/esm/theme/builtin/common-mobile/component/mark-area.js.map +0 -1
  383. package/esm/theme/builtin/common-mobile/component/mark-line.d.ts +0 -2
  384. package/esm/theme/builtin/common-mobile/component/mark-line.js +0 -27
  385. package/esm/theme/builtin/common-mobile/component/mark-line.js.map +0 -1
  386. package/esm/theme/builtin/common-mobile/component/mark-point.d.ts +0 -2
  387. package/esm/theme/builtin/common-mobile/component/mark-point.js +0 -15
  388. package/esm/theme/builtin/common-mobile/component/mark-point.js.map +0 -1
  389. package/esm/theme/builtin/common-mobile/component/player.d.ts +0 -2
  390. package/esm/theme/builtin/common-mobile/component/player.js +0 -47
  391. package/esm/theme/builtin/common-mobile/component/player.js.map +0 -1
  392. package/esm/theme/builtin/common-mobile/component/poptip.d.ts +0 -2
  393. package/esm/theme/builtin/common-mobile/component/poptip.js +0 -19
  394. package/esm/theme/builtin/common-mobile/component/poptip.js.map +0 -1
  395. package/esm/theme/builtin/common-mobile/component/title.d.ts +0 -2
  396. package/esm/theme/builtin/common-mobile/component/title.js +0 -17
  397. package/esm/theme/builtin/common-mobile/component/title.js.map +0 -1
  398. package/esm/theme/builtin/common-mobile/component/tooltip.d.ts +0 -2
  399. package/esm/theme/builtin/common-mobile/component/tooltip.js +0 -37
  400. package/esm/theme/builtin/common-mobile/component/tooltip.js.map +0 -1
  401. package/esm/theme/builtin/common-mobile/component/total-label.d.ts +0 -2
  402. package/esm/theme/builtin/common-mobile/component/total-label.js +0 -10
  403. package/esm/theme/builtin/common-mobile/component/total-label.js.map +0 -1
  404. package/esm/theme/builtin/common-mobile/constants.d.ts +0 -2
  405. package/esm/theme/builtin/common-mobile/constants.js +0 -19
  406. package/esm/theme/builtin/common-mobile/constants.js.map +0 -1
  407. package/esm/theme/builtin/common-mobile/mark.d.ts +0 -3
  408. package/esm/theme/builtin/common-mobile/mark.js +0 -31
  409. package/esm/theme/builtin/common-mobile/mark.js.map +0 -1
  410. package/esm/theme/builtin/dark-mobile/index.d.ts +0 -2
  411. package/esm/theme/builtin/dark-mobile/index.js +0 -16
  412. package/esm/theme/builtin/dark-mobile/index.js.map +0 -1
  413. package/esm/theme/builtin/light-mobile/index.d.ts +0 -2
  414. package/esm/theme/builtin/light-mobile/index.js +0 -16
  415. 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 = global.supportsPointerEvents, this.supportsTouchEvents = global.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 = {
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
- super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), params.background && this.loadImage(params.background, !0);
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();
@@ -13319,7 +13322,7 @@
13319
13322
  const context = {
13320
13323
  type: AttributeUpdateType.INIT
13321
13324
  };
13322
- params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = UpdateTag.INIT, this.onAttributeUpdate(context);
13325
+ params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
13323
13326
  }
13324
13327
  translate(x, y) {
13325
13328
  var _a, _b;
@@ -16694,6 +16697,12 @@
16694
16697
  this.failCallback && this.failCallback();
16695
16698
  });
16696
16699
  }
16700
+ setAttributes(params, forceUpdateTag, context) {
16701
+ return params.image && this.loadImage(params.image), super.setAttributes(params, forceUpdateTag, context);
16702
+ }
16703
+ setAttribute(key, value, forceUpdateTag, context) {
16704
+ return "image" === key && this.loadImage(value), super.setAttribute(key, value, forceUpdateTag, context);
16705
+ }
16697
16706
  doUpdateAABBBounds() {
16698
16707
  const imageTheme = getTheme$1(this).image;
16699
16708
  this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
@@ -18319,7 +18328,7 @@
18319
18328
 
18320
18329
  let text, richText;
18321
18330
  function getTextBounds(params) {
18322
- return text || (text = graphicCreator.CreateGraphic("text", {})), text.setAttributes(params), text.AABBBounds;
18331
+ return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
18323
18332
  }
18324
18333
  function getRichTextBounds(params) {
18325
18334
  return richText || (richText = graphicCreator.CreateGraphic("richtext", {})), richText.setAttributes(params), richText.AABBBounds;
@@ -18453,6 +18462,234 @@
18453
18462
  }
18454
18463
  }
18455
18464
 
18465
+ const parse = function () {
18466
+ const tokens = {
18467
+ linearGradient: /^(linear\-gradient)/i,
18468
+ radialGradient: /^(radial\-gradient)/i,
18469
+ conicGradient: /^(conic\-gradient)/i,
18470
+ sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
18471
+ extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
18472
+ positionKeywords: /^(left|center|right|top|bottom)/i,
18473
+ pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
18474
+ percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
18475
+ emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
18476
+ angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
18477
+ fromAngleValue: /^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
18478
+ startCall: /^\(/,
18479
+ endCall: /^\)/,
18480
+ comma: /^,/,
18481
+ hexColor: /(^\#[0-9a-fA-F]+)/,
18482
+ literalColor: /^([a-zA-Z]+)/,
18483
+ rgbColor: /^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,
18484
+ rgbaColor: /^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,
18485
+ number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
18486
+ };
18487
+ let input = "";
18488
+ function error(msg) {
18489
+ const err = new Error(input + ": " + msg);
18490
+ throw err.source = input, err;
18491
+ }
18492
+ function getAST() {
18493
+ const ast = matchListing(matchDefinition);
18494
+ return input.length > 0 && error("Invalid input not EOF"), ast;
18495
+ }
18496
+ function matchDefinition() {
18497
+ return matchGradient("linear", tokens.linearGradient, matchLinearOrientation) || matchGradient("radial", tokens.radialGradient, matchListRadialOrientations) || matchGradient("conic", tokens.conicGradient, matchConicalOrientation);
18498
+ }
18499
+ function matchGradient(gradientType, pattern, orientationMatcher) {
18500
+ return function (pattern, callback) {
18501
+ const captures = scan(pattern);
18502
+ if (captures) {
18503
+ scan(tokens.startCall) || error("Missing (");
18504
+ const result = callback(captures);
18505
+ return scan(tokens.endCall) || error("Missing )"), result;
18506
+ }
18507
+ }(pattern, function (captures) {
18508
+ const orientation = orientationMatcher();
18509
+ return orientation && (scan(tokens.comma) || error("Missing comma before color stops")), {
18510
+ type: gradientType,
18511
+ orientation: orientation,
18512
+ colorStops: matchListing(matchColorStop)
18513
+ };
18514
+ });
18515
+ }
18516
+ function matchLinearOrientation() {
18517
+ return match("directional", tokens.sideOrCorner, 1) || match("angular", tokens.angleValue, 1);
18518
+ }
18519
+ function matchConicalOrientation() {
18520
+ return match("angular", tokens.fromAngleValue, 1);
18521
+ }
18522
+ function matchListRadialOrientations() {
18523
+ let radialOrientations,
18524
+ lookaheadCache,
18525
+ radialOrientation = matchRadialOrientation();
18526
+ return radialOrientation && (radialOrientations = [], radialOrientations.push(radialOrientation), lookaheadCache = input, scan(tokens.comma) && (radialOrientation = matchRadialOrientation(), radialOrientation ? radialOrientations.push(radialOrientation) : input = lookaheadCache)), radialOrientations;
18527
+ }
18528
+ function matchRadialOrientation() {
18529
+ let radialType = function () {
18530
+ const circle = match("shape", /^(circle)/i, 0);
18531
+ circle && (circle.style = matchLength() || matchExtentKeyword());
18532
+ return circle;
18533
+ }() || function () {
18534
+ const ellipse = match("shape", /^(ellipse)/i, 0);
18535
+ ellipse && (ellipse.style = matchDistance() || matchExtentKeyword());
18536
+ return ellipse;
18537
+ }();
18538
+ if (radialType) radialType.at = matchAtPosition();else {
18539
+ const extent = matchExtentKeyword();
18540
+ if (extent) {
18541
+ radialType = extent;
18542
+ const positionAt = matchAtPosition();
18543
+ positionAt && (radialType.at = positionAt);
18544
+ } else {
18545
+ const defaultPosition = matchPositioning();
18546
+ defaultPosition && (radialType = {
18547
+ type: "default-radial",
18548
+ at: defaultPosition
18549
+ });
18550
+ }
18551
+ }
18552
+ return radialType;
18553
+ }
18554
+ function matchExtentKeyword() {
18555
+ return match("extent-keyword", tokens.extentKeywords, 1);
18556
+ }
18557
+ function matchAtPosition() {
18558
+ if (match("position", /^at/, 0)) {
18559
+ const positioning = matchPositioning();
18560
+ return positioning || error("Missing positioning value"), positioning;
18561
+ }
18562
+ }
18563
+ function matchPositioning() {
18564
+ const location = {
18565
+ x: matchDistance(),
18566
+ y: matchDistance()
18567
+ };
18568
+ if (location.x || location.y) return {
18569
+ type: "position",
18570
+ value: location
18571
+ };
18572
+ }
18573
+ function matchListing(matcher) {
18574
+ let captures = matcher();
18575
+ const result = [];
18576
+ if (captures) for (result.push(captures); scan(tokens.comma);) captures = matcher(), captures ? result.push(captures) : error("One extra comma");
18577
+ return result;
18578
+ }
18579
+ function matchColorStop() {
18580
+ const color = match("hex", tokens.hexColor, 1) || match("rgba", tokens.rgbaColor, 1) || match("rgb", tokens.rgbColor, 1) || match("literal", tokens.literalColor, 0);
18581
+ return color || error("Expected color definition"), color.length = matchDistance(), color;
18582
+ }
18583
+ function matchDistance() {
18584
+ return match("%", tokens.percentageValue, 1) || match("position-keyword", tokens.positionKeywords, 1) || matchLength();
18585
+ }
18586
+ function matchLength() {
18587
+ return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
18588
+ }
18589
+ function match(type, pattern, captureIndex) {
18590
+ const captures = scan(pattern);
18591
+ if (captures) return {
18592
+ type: type,
18593
+ value: captures[captureIndex]
18594
+ };
18595
+ }
18596
+ function scan(regexp) {
18597
+ const blankCaptures = /^[\n\r\t\s]+/.exec(input);
18598
+ blankCaptures && consume(blankCaptures[0].length);
18599
+ const captures = regexp.exec(input);
18600
+ return captures && consume(captures[0].length), captures;
18601
+ }
18602
+ function consume(size) {
18603
+ input = input.substr(size);
18604
+ }
18605
+ return function (code) {
18606
+ return input = code.toString(), getAST();
18607
+ };
18608
+ }();
18609
+ class GradientParser {
18610
+ static IsGradient(c) {
18611
+ return !("string" == typeof c && c.length < 10);
18612
+ }
18613
+ static IsGradientStr(c) {
18614
+ return "string" == typeof c && c.length > 10;
18615
+ }
18616
+ static Parse(c) {
18617
+ if (GradientParser.IsGradientStr(c)) try {
18618
+ const datum = parse(c)[0];
18619
+ if (datum) {
18620
+ if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
18621
+ if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
18622
+ if ("conic" === datum.type) return GradientParser.ParseConic(datum);
18623
+ }
18624
+ } catch (err) {
18625
+ return c;
18626
+ }
18627
+ return c;
18628
+ }
18629
+ static ParseConic(datum) {
18630
+ const {
18631
+ orientation: orientation,
18632
+ colorStops = []
18633
+ } = datum,
18634
+ halfPi = pi$1 / 2,
18635
+ sa = parseFloat(orientation.value) / 180 * pi$1 - halfPi;
18636
+ return {
18637
+ gradient: "conical",
18638
+ x: .5,
18639
+ y: .5,
18640
+ startAngle: sa,
18641
+ endAngle: sa + pi2,
18642
+ stops: colorStops.map(item => ({
18643
+ color: item.value,
18644
+ offset: parseFloat(item.length.value) / 100
18645
+ }))
18646
+ };
18647
+ }
18648
+ static ParseRadial(datum) {
18649
+ const {
18650
+ colorStops = []
18651
+ } = datum;
18652
+ return {
18653
+ gradient: "radial",
18654
+ x0: .5,
18655
+ y0: .5,
18656
+ x1: .5,
18657
+ y1: .5,
18658
+ r0: 0,
18659
+ r1: 1,
18660
+ stops: colorStops.map(item => ({
18661
+ color: item.value,
18662
+ offset: parseFloat(item.length.value) / 100
18663
+ }))
18664
+ };
18665
+ }
18666
+ static ParseLinear(datum) {
18667
+ const {
18668
+ orientation: orientation,
18669
+ colorStops = []
18670
+ } = datum,
18671
+ halfPi = pi$1 / 2;
18672
+ let angle = "angular" === orientation.type ? parseFloat(orientation.value) / 180 * pi$1 : 0;
18673
+ for (; angle < 0;) angle += pi2;
18674
+ for (; angle > pi2;) angle -= pi2;
18675
+ let x0 = 0,
18676
+ y0 = 0,
18677
+ x1 = 0,
18678
+ y1 = 0;
18679
+ return angle < halfPi ? (x0 = 0, y0 = 1, x1 = Math.sin(angle), y1 = Math.cos(angle)) : angle < pi$1 ? (x0 = 0, y0 = 0, x1 = Math.cos(angle - halfPi), y1 = Math.sin(angle - halfPi)) : angle < pi$1 + halfPi ? (x0 = 1, y0 = 0, x1 = x0 - Math.sin(angle - pi$1), y1 = Math.cos(angle - pi$1)) : (x0 = 1, x1 = x0 - Math.cos(angle - halfPi - pi$1), y1 -= Math.sin(angle - halfPi - pi$1)), {
18680
+ gradient: "linear",
18681
+ x0: x0,
18682
+ y0: y0,
18683
+ x1: x1,
18684
+ y1: y1,
18685
+ stops: colorStops.map(item => ({
18686
+ color: item.value,
18687
+ offset: parseFloat(item.length.value) / 100
18688
+ }))
18689
+ };
18690
+ }
18691
+ }
18692
+
18456
18693
  function getScaledStroke(context, width, dpr) {
18457
18694
  let strokeWidth = width;
18458
18695
  const {
@@ -18469,7 +18706,7 @@
18469
18706
  if (!c || !0 === c) return "black";
18470
18707
  let result, color;
18471
18708
  if (isArray$1(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
18472
- return "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
18709
+ return color = GradientParser.Parse(color), "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
18473
18710
  }
18474
18711
  function createLinearGradient(context, color, params) {
18475
18712
  let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
@@ -18592,20 +18829,22 @@
18592
18829
  const resW = data.width,
18593
18830
  resH = data.height;
18594
18831
  if ("repeat-x" === backgroundMode) {
18595
- w = resW * (targetH / resH);
18832
+ w = resW * (targetH / resH), h = targetH;
18596
18833
  } else if ("repeat-y" === backgroundMode) {
18597
- h = resH * (targetW / resW);
18834
+ h = resH * (targetW / resW), w = targetW;
18598
18835
  }
18599
- const canvas = canvasAllocate.allocate({
18836
+ const dpr = context.dpr,
18837
+ canvas = canvasAllocate.allocate({
18600
18838
  width: w,
18601
18839
  height: h,
18602
- dpr: context.dpr
18840
+ dpr: dpr
18603
18841
  }),
18604
18842
  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), document.body.appendChild(data), canvasAllocate.free(canvas);
18843
+ 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
18844
  }
18607
- const pattern = context.createPattern(data, backgroundMode);
18608
- context.fillStyle = pattern, context.translate(b.x1, b.y1), context.fillRect(0, 0, targetW, targetH), context.translate(-b.x1, -b.y1);
18845
+ const dpr = context.dpr,
18846
+ pattern = context.createPattern(data, backgroundMode);
18847
+ 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
18848
  }
18610
18849
  }
18611
18850
  }
@@ -20251,23 +20490,68 @@
20251
20490
  };
20252
20491
  DefaultCanvasSymbolRender = __decorate$1h([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(SymbolRenderContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
20253
20492
 
20493
+ class DefaultBoundsAllocate {
20494
+ constructor() {
20495
+ this.pools = [];
20496
+ for (let i = 0; i < 10; i++) this.pools.push(new AABBBounds());
20497
+ }
20498
+ allocate(x1, y1, x2, y2) {
20499
+ if (!this.pools.length) return new AABBBounds().setValue(x1, y1, x2, y2);
20500
+ const b = this.pools.pop();
20501
+ return b.x1 = x1, b.y1 = y1, b.x2 = x2, b.y2 = y2, b;
20502
+ }
20503
+ allocateByObj(b) {
20504
+ if (!this.pools.length) return new AABBBounds(b);
20505
+ const _b = this.pools.pop();
20506
+ return _b.x1 = b.x1, _b.y1 = b.y1, _b.x2 = b.x2, _b.y2 = b.y2, _b;
20507
+ }
20508
+ free(b) {
20509
+ this.pools.push(b);
20510
+ }
20511
+ get length() {
20512
+ return this.pools.length;
20513
+ }
20514
+ release() {
20515
+ this.pools = [];
20516
+ }
20517
+ }
20518
+ const boundsAllocate = new DefaultBoundsAllocate();
20519
+
20254
20520
  class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
20255
20521
  constructor() {
20256
20522
  super(...arguments), this.time = BaseRenderContributionTime.beforeFillStroke;
20257
20523
  }
20258
20524
  drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
20525
+ var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
20259
20526
  const {
20260
- background: background,
20261
20527
  backgroundMode = graphicAttribute.backgroundMode,
20262
20528
  backgroundFit = graphicAttribute.backgroundFit
20263
20529
  } = graphic.attribute;
20530
+ let b,
20531
+ {
20532
+ background: background
20533
+ } = graphic.attribute;
20264
20534
  if (!background) return;
20265
- const b = graphic.AABBBounds;
20535
+ const shouldReCalBounds = isObject$2(background) && background.background,
20536
+ onlyTranslate = graphic.transMatrix.onlyTranslate();
20537
+ if (shouldReCalBounds) {
20538
+ const _b = graphic.AABBBounds,
20539
+ x = (null !== (_a = background.x) && void 0 !== _a ? _a : _b.x1) + (null !== (_c = background.dx) && void 0 !== _c ? _c : 0),
20540
+ y = (null !== (_d = background.y) && void 0 !== _d ? _d : _b.y1) + (null !== (_e = background.dy) && void 0 !== _e ? _e : 0),
20541
+ w = null !== (_f = background.width) && void 0 !== _f ? _f : _b.width(),
20542
+ h = null !== (_g = background.height) && void 0 !== _g ? _g : _b.height();
20543
+ if (b = boundsAllocate.allocate(x, y, x + w, y + h), background = background.background, !onlyTranslate) {
20544
+ const w = b.width(),
20545
+ h = b.height();
20546
+ 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);
20547
+ }
20548
+ } else b = graphic.AABBBounds, onlyTranslate || b.set(0, 0, b.width(), b.height());
20266
20549
  if (graphic.backgroundImg && graphic.resources) {
20267
20550
  const res = graphic.resources.get(background);
20268
20551
  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();
20552
+ 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();
20553
+ } 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();
20554
+ shouldReCalBounds && boundsAllocate.free(b);
20271
20555
  }
20272
20556
  }
20273
20557
  const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
@@ -21410,33 +21694,6 @@
21410
21694
  }
21411
21695
  }
21412
21696
 
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
21697
  var __decorate$16 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21441
21698
  var d,
21442
21699
  c = arguments.length,
@@ -21982,11 +22239,10 @@
21982
22239
  container.load(renderModule);
21983
22240
  }
21984
22241
 
21985
- let loaded$r = !1;
21986
22242
  function preLoadAllModule() {
21987
- loaded$r || (loaded$r = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$2(container), load$1(container));
22243
+ preLoadAllModule.__loaded || (preLoadAllModule.__loaded = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$2(container), load$1(container));
21988
22244
  }
21989
- preLoadAllModule();
22245
+ preLoadAllModule.__loaded = !1, preLoadAllModule();
21990
22246
  const vglobal = container.get(VGlobal);
21991
22247
  application.global = vglobal;
21992
22248
  const graphicUtil = container.get(GraphicUtil);
@@ -22144,7 +22400,7 @@
22144
22400
  wrapGroup: wrapGroup
22145
22401
  } = _ref;
22146
22402
  application.global.removeDom(wrapGroup);
22147
- }), nativeDom = "string" == typeof dom ? new DOMParser().parseFromString(dom, "text/html").firstChild : dom;
22403
+ }), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
22148
22404
  const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
22149
22405
  nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
22150
22406
  const wrapGroup = application.global.createDom({
@@ -22161,13 +22417,11 @@
22161
22417
  })), wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
22162
22418
  let left = 0,
22163
22419
  top = 0;
22164
- if ("position" === anchorType) {
22420
+ const b = graphic.globalAABBBounds;
22421
+ if ("position" === anchorType || b.empty()) {
22165
22422
  const matrix = graphic.globalTransMatrix;
22166
22423
  left = matrix.e, top = matrix.f;
22167
- } else {
22168
- const b = graphic.globalAABBBounds;
22169
- left = b.x1, top = b.y1;
22170
- }
22424
+ } else left = b.x1, top = b.y1;
22171
22425
  const containerTL = application.global.getElementTopLeft(nativeContainer, !1),
22172
22426
  windowTL = stage.window.getTopLeft(!1),
22173
22427
  offsetX = left + windowTL.left - containerTL.left,
@@ -22527,21 +22781,16 @@
22527
22781
 
22528
22782
  let _isBrowserEnv;
22529
22783
  function initIsBrowserEnv() {
22530
- if (null == _isBrowserEnv) {
22531
- try {
22532
- _isBrowserEnv = !!window;
22533
- } catch (err) {
22534
- _isBrowserEnv = !1;
22535
- }
22536
- if (_isBrowserEnv) try {
22537
- _isBrowserEnv = !tt;
22538
- } catch (err) {
22539
- _isBrowserEnv = !0;
22540
- }
22784
+ if (null == _isBrowserEnv) try {
22785
+ _isBrowserEnv = globalThis === window, _isBrowserEnv && (_isBrowserEnv = !!document.createElement);
22786
+ } catch (err) {
22787
+ _isBrowserEnv = !1;
22541
22788
  }
22542
22789
  }
22543
22790
  function isBrowserEnv() {
22544
- return initIsBrowserEnv(), _isBrowserEnv;
22791
+ initIsBrowserEnv();
22792
+ const env = application.global && application.global.env;
22793
+ return env ? "browser" === env : _isBrowserEnv;
22545
22794
  }
22546
22795
 
22547
22796
  const DefaultConfig$1 = {
@@ -22645,6 +22894,8 @@
22645
22894
  resolution: this.window.dpr || this.global.devicePixelRatio,
22646
22895
  rootNode: this,
22647
22896
  global: this.global,
22897
+ supportsPointerEvents: this.params.supportsPointerEvents,
22898
+ supportsTouchEvents: this.params.supportsTouchEvents,
22648
22899
  viewport: {
22649
22900
  viewBox: this._viewBox,
22650
22901
  get x() {
@@ -26797,7 +27048,7 @@
26797
27048
  encodeGraphic(attrs) {
26798
27049
  this.coordinateTransformEncode(this.items);
26799
27050
  const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);
26800
- attrs && Object.assign(graphicAttributes, attrs), this.graphicItem ? (this.graphicItem.clearStates(), this.graphicItem.states = {}, this.graphicItem.stateProxy = null, this.applyGraphicAttributes(graphicAttributes)) : this.initGraphicItem(graphicAttributes), this.diffState !== DiffState.enter && this.diffState !== DiffState.update || !this.states.length || this.useStates(this.states), this.mark.markType === GrammarMarkType.shape && (this.graphicItem.datum = this.items[0].datum), this.items.forEach(item => {
27051
+ attrs && (this.mark.isCollectionMark() && delete attrs.defined, Object.assign(graphicAttributes, attrs)), this.graphicItem ? (this.graphicItem.clearStates(), this.graphicItem.states = {}, this.graphicItem.stateProxy = null, this.applyGraphicAttributes(graphicAttributes)) : this.initGraphicItem(graphicAttributes), this.diffState !== DiffState.enter && this.diffState !== DiffState.update || !this.states.length || this.useStates(this.states), this.mark.markType === GrammarMarkType.shape && (this.graphicItem.datum = this.items[0].datum), this.items.forEach(item => {
26801
27052
  item.nextAttrs = {};
26802
27053
  }), this._setCustomizedShape();
26803
27054
  }
@@ -27997,10 +28248,11 @@
27997
28248
  };
27998
28249
  DefaultCanvasGroupPicker = __decorate$Q([injectable()], DefaultCanvasGroupPicker);
27999
28250
 
28000
- let loaded$q = !1;
28001
- var canvasModule = new ContainerModule((bind, unbind, isBound, rebind) => {
28002
- loaded$q || (loaded$q = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
28251
+ const m$2 = new ContainerModule((bind, unbind, isBound, rebind) => {
28252
+ m$2.__vloaded || (m$2.__vloaded = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
28003
28253
  });
28254
+ m$2.__vloaded = !1;
28255
+ var canvasModule = m$2;
28004
28256
 
28005
28257
  const canvasPickerModule = new ContainerModule((bind, unbind, isBound, rebind) => {
28006
28258
  isBound(DefaultCanvasPickerService) || bind(DefaultCanvasPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultCanvasPickerService) : bind(PickerService).toService(DefaultCanvasPickerService);
@@ -28261,7 +28513,7 @@
28261
28513
  }
28262
28514
  getNativeAABBBounds(_dom) {
28263
28515
  let dom = _dom;
28264
- if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild), dom.getBoundingClientRect) {
28516
+ if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild, dom.lastChild && (dom = dom.lastChild.firstChild)), dom.getBoundingClientRect) {
28265
28517
  const b = dom.getBoundingClientRect();
28266
28518
  return new DynamicB(b);
28267
28519
  }
@@ -28374,15 +28626,15 @@
28374
28626
  };
28375
28627
  BrowserEnvContribution = __decorate$O([injectable(), __metadata$D("design:paramtypes", [])], BrowserEnvContribution);
28376
28628
 
28377
- let isBrowserBound = !1;
28378
28629
  const browserEnvModule = new ContainerModule(bind => {
28379
- isBrowserBound || (isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
28630
+ browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
28380
28631
  });
28381
- let loaded$p = !1;
28632
+ browserEnvModule.isBrowserBound = !1;
28382
28633
  function loadBrowserEnv(container) {
28383
28634
  let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
28384
- loaded$p || (loaded$p = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
28635
+ loadBrowserEnv.__loaded || (loadBrowserEnv.__loaded = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
28385
28636
  }
28637
+ loadBrowserEnv.__loaded = !1;
28386
28638
 
28387
28639
  var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28388
28640
  var d,
@@ -28645,10 +28897,11 @@
28645
28897
  };
28646
28898
  DefaultMathPickerService = __decorate$K([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(MathPickerContribution)), __param$r(1, inject(ContributionProvider)), __param$r(1, named(PickItemInterceptor)), __metadata$A("design:paramtypes", [Object, Object])], DefaultMathPickerService);
28647
28899
 
28648
- let loaded$o = !1;
28649
- var mathModule = new ContainerModule(bind => {
28650
- loaded$o || (loaded$o = !0, bindContributionProvider(bind, MathPickerContribution));
28900
+ const m$1 = new ContainerModule(bind => {
28901
+ m$1.__vloaded || (m$1.__vloaded = !0, bindContributionProvider(bind, MathPickerContribution));
28651
28902
  });
28903
+ m$1.__vloaded = !1;
28904
+ var mathModule = m$1;
28652
28905
 
28653
28906
  const mathPickerModule = new ContainerModule((bind, unbind, isBound, rebind) => {
28654
28907
  isBound(DefaultMathPickerService) || bind(DefaultMathPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultMathPickerService) : bind(PickerService).toService(DefaultMathPickerService);
@@ -28763,15 +29016,15 @@
28763
29016
  };
28764
29017
  FeishuEnvContribution = __decorate$J([injectable(), __metadata$z("design:paramtypes", [])], FeishuEnvContribution);
28765
29018
 
28766
- let isFeishuBound = !1;
28767
29019
  const feishuEnvModule = new ContainerModule(bind => {
28768
- isFeishuBound || (isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
29020
+ feishuEnvModule.isFeishuBound || (feishuEnvModule.isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
28769
29021
  });
28770
- let loaded$n = !1;
29022
+ feishuEnvModule.isFeishuBound = !1;
28771
29023
  function loadFeishuEnv(container) {
28772
29024
  let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
28773
- loaded$n || (loaded$n = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
29025
+ loadFeishuEnv.__loaded || (loadFeishuEnv.__loaded = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
28774
29026
  }
29027
+ loadFeishuEnv.__loaded = !1;
28775
29028
 
28776
29029
  var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
28777
29030
  var d,
@@ -29140,15 +29393,15 @@
29140
29393
  };
29141
29394
  LynxEnvContribution = __decorate$F([injectable(), __metadata$w("design:paramtypes", [])], LynxEnvContribution);
29142
29395
 
29143
- let isLynxBound = !1;
29144
29396
  const lynxEnvModule = new ContainerModule(bind => {
29145
- isLynxBound || (isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
29397
+ lynxEnvModule.isLynxBound || (lynxEnvModule.isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
29146
29398
  });
29147
- let loaded$m = !1;
29399
+ lynxEnvModule.isLynxBound = !1;
29148
29400
  function loadLynxEnv(container) {
29149
29401
  let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
29150
- loaded$m || (loaded$m = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
29402
+ loadLynxEnv.__loaded || (loadLynxEnv.__loaded = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
29151
29403
  }
29404
+ loadLynxEnv.__loaded = !1;
29152
29405
 
29153
29406
  var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29154
29407
  var d,
@@ -29390,14 +29643,14 @@
29390
29643
  };
29391
29644
  NodeEnvContribution = __decorate$B([injectable()], NodeEnvContribution);
29392
29645
 
29393
- let isNodeBound = !1;
29394
29646
  const nodeEnvModule = new ContainerModule(bind => {
29395
- isNodeBound || (isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
29647
+ nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
29396
29648
  });
29397
- let loaded$l = !1;
29649
+ nodeEnvModule.isNodeBound = !1;
29398
29650
  function loadNodeEnv(container) {
29399
- loaded$l || (loaded$l = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
29651
+ loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
29400
29652
  }
29653
+ loadNodeEnv.__loaded = !1;
29401
29654
 
29402
29655
  var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29403
29656
  var d,
@@ -29786,15 +30039,15 @@
29786
30039
  };
29787
30040
  TaroEnvContribution = __decorate$x([injectable(), __metadata$q("design:paramtypes", [])], TaroEnvContribution);
29788
30041
 
29789
- let isTaroBound = !1;
29790
30042
  const taroEnvModule = new ContainerModule(bind => {
29791
- isTaroBound || (isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
30043
+ taroEnvModule.isTaroBound || (taroEnvModule.isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
29792
30044
  });
29793
- let loaded$k = !1;
30045
+ taroEnvModule.isTaroBound = !1;
29794
30046
  function loadTaroEnv(container) {
29795
30047
  let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
29796
- loaded$k || (loaded$k = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
30048
+ loadTaroEnv.__loaded || (loadTaroEnv.__loaded = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
29797
30049
  }
30050
+ loadTaroEnv.__loaded = !1;
29798
30051
 
29799
30052
  var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
29800
30053
  var d,
@@ -30108,25 +30361,25 @@
30108
30361
  };
30109
30362
  WxEnvContribution = __decorate$t([injectable(), __metadata$n("design:paramtypes", [])], WxEnvContribution);
30110
30363
 
30111
- let isWxBound = !1;
30112
30364
  const wxEnvModule = new ContainerModule(bind => {
30113
- isWxBound || (isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
30365
+ wxEnvModule._isWxBound || (wxEnvModule._isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
30114
30366
  });
30115
- let loaded$j = !1;
30367
+ wxEnvModule._isWxBound = !1;
30116
30368
  function loadWxEnv(container) {
30117
30369
  let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
30118
- loaded$j || (loaded$j = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
30370
+ loadWxEnv.__loaded || (loadWxEnv.__loaded = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
30119
30371
  }
30372
+ loadWxEnv.__loaded = !1;
30120
30373
 
30121
30374
  function loadAllEnv(container) {
30122
30375
  loadAllModule(container);
30123
30376
  }
30124
- let loaded$i = !1;
30125
30377
  function loadAllModule(container) {
30126
- loaded$i || (loaded$i = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
30378
+ loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
30127
30379
  "browser" !== env && loadMathPicker(container);
30128
30380
  }));
30129
30381
  }
30382
+ loadAllModule.__loaded = !1;
30130
30383
  function initAllEnv() {
30131
30384
  loadAllEnv(container);
30132
30385
  }
@@ -31437,95 +31690,113 @@
31437
31690
 
31438
31691
  const browser = isBrowserEnv();
31439
31692
 
31440
- let loaded$h = !1;
31441
- function registerArc() {
31442
- loaded$h || (loaded$h = !0, registerArcGraphic$1(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
31693
+ function _registerArc() {
31694
+ _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic$1(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
31443
31695
  }
31696
+ _registerArc.__loaded = !1;
31697
+ const registerArc = _registerArc;
31444
31698
 
31445
- let loaded$g = !1;
31446
- function registerArc3d() {
31447
- loaded$g || (loaded$g = !0, registerArc3dGraphic$1(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
31699
+ function _registerArc3d() {
31700
+ _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic$1(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
31448
31701
  }
31702
+ _registerArc3d.__loaded = !1;
31703
+ const registerArc3d = _registerArc3d;
31449
31704
 
31450
- let loaded$f = !1;
31451
- function registerArea() {
31452
- loaded$f || (loaded$f = !0, registerAreaGraphic$1(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
31705
+ function _registerArea() {
31706
+ _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic$1(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
31453
31707
  }
31708
+ _registerArea.__loaded = !1;
31709
+ const registerArea = _registerArea;
31454
31710
 
31455
- let loaded$e = !1;
31456
- function registerCircle() {
31457
- loaded$e || (loaded$e = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
31711
+ function _registerCircle() {
31712
+ _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
31458
31713
  }
31714
+ _registerCircle.__loaded = !1;
31715
+ const registerCircle = _registerCircle;
31459
31716
 
31460
- let loaded$d = !1;
31461
- function registerGlyph() {
31462
- loaded$d || (loaded$d = !0, registerGlyphGraphic$1(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
31717
+ function _registerGlyph() {
31718
+ _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic$1(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
31463
31719
  }
31720
+ _registerGlyph.__loaded = !1;
31721
+ const registerGlyph = _registerGlyph;
31464
31722
 
31465
- let loaded$c = !1;
31466
- function registerGroup() {
31467
- loaded$c || (loaded$c = !0, registerGroupGraphic$1());
31723
+ function _registerGroup() {
31724
+ _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic$1());
31468
31725
  }
31726
+ _registerGroup.__loaded = !1;
31727
+ const registerGroup = _registerGroup;
31469
31728
 
31470
- let loaded$b = !1;
31471
- function registerImage() {
31472
- loaded$b || (loaded$b = !0, registerImageGraphic$1(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
31729
+ function _registerImage() {
31730
+ _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic$1(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
31473
31731
  }
31732
+ _registerImage.__loaded = !1;
31733
+ const registerImage = _registerImage;
31474
31734
 
31475
- let loaded$a = !1;
31476
- function registerLine() {
31477
- loaded$a || (loaded$a = !0, registerLineGraphic$1(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
31735
+ function _registerLine() {
31736
+ _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic$1(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
31478
31737
  }
31738
+ _registerLine.__loaded = !1;
31739
+ const registerLine = _registerLine;
31479
31740
 
31480
- let loaded$9 = !1;
31481
- function registerPath() {
31482
- loaded$9 || (loaded$9 = !0, registerPathGraphic$1(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
31741
+ function _registerPath() {
31742
+ _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic$1(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
31483
31743
  }
31744
+ _registerPath.__loaded = !1;
31745
+ const registerPath = _registerPath;
31484
31746
 
31485
- let loaded$8 = !1;
31486
- function registerPolygon() {
31487
- loaded$8 || (loaded$8 = !0, registerPolygonGraphic$1(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
31747
+ function _registerPolygon() {
31748
+ _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic$1(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
31488
31749
  }
31750
+ _registerPolygon.__loaded = !1;
31751
+ const registerPolygon = _registerPolygon;
31489
31752
 
31490
- let loaded$7 = !1;
31491
- function registerPyramid3d() {
31492
- loaded$7 || (loaded$7 = !0, registerPyramid3dGraphic$1(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
31753
+ function _registerPyramid3d() {
31754
+ _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic$1(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
31493
31755
  }
31756
+ _registerPyramid3d.__loaded = !1;
31757
+ const registerPyramid3d = _registerPyramid3d;
31494
31758
 
31495
- let loaded$6 = !1;
31496
- function registerRect() {
31497
- loaded$6 || (loaded$6 = !0, registerRectGraphic$1(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
31759
+ function _registerRect() {
31760
+ _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic$1(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
31498
31761
  }
31762
+ _registerRect.__loaded = !1;
31763
+ const registerRect = _registerRect;
31499
31764
 
31500
- let loaded$5 = !1;
31501
- function registerRect3d() {
31502
- loaded$5 || (loaded$5 = !0, registerRect3dGraphic$1(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
31765
+ function _registerRect3d() {
31766
+ _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic$1(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
31503
31767
  }
31768
+ _registerRect3d.__loaded = !1;
31769
+ const registerRect3d = _registerRect3d;
31504
31770
 
31505
- let loaded$4 = !1;
31506
- function registerRichtext() {
31507
- loaded$4 || (loaded$4 = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
31771
+ function _registerRichtext() {
31772
+ _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
31508
31773
  }
31774
+ _registerRichtext.__loaded = !1;
31775
+ const registerRichtext = _registerRichtext;
31509
31776
 
31510
- let loaded$3 = !1;
31511
- function registerShadowRoot() {
31512
- loaded$3 || (loaded$3 = !0, registerShadowRootGraphic());
31777
+ function _registerShadowRoot() {
31778
+ _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
31513
31779
  }
31780
+ _registerShadowRoot.__loaded = !1;
31781
+ const registerShadowRoot = _registerShadowRoot;
31514
31782
 
31515
- let loaded$2 = !1;
31516
- function registerSymbol() {
31517
- loaded$2 || (loaded$2 = !0, registerSymbolGraphic$1(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
31783
+ function _registerSymbol() {
31784
+ _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic$1(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
31518
31785
  }
31786
+ _registerSymbol.__loaded = !1;
31787
+ const registerSymbol = _registerSymbol;
31519
31788
 
31520
- let loaded$1 = !1;
31521
- function registerText() {
31522
- loaded$1 || (loaded$1 = !0, registerTextGraphic$1(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
31789
+ function _registerText() {
31790
+ _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic$1(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
31523
31791
  }
31792
+ _registerText.__loaded = !1;
31793
+ const registerText = _registerText;
31524
31794
 
31525
- let loaded = !1;
31526
- function registerWrapText() {
31527
- loaded || (loaded = !0, registerWrapTextGraphic());
31795
+ function _registerWrapText() {
31796
+ _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
31528
31797
  }
31798
+ _registerWrapText.__loaded = !1;
31799
+ const registerWrapText = _registerWrapText;
31529
31800
 
31530
31801
  function loadScrollbarComponent() {
31531
31802
  registerGroup(), registerRect();
@@ -33193,7 +33464,10 @@
33193
33464
  function labelingLineOrArea(textBounds, graphicBounds) {
33194
33465
  let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
33195
33466
  let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
33196
- if (!textBounds || !graphicBounds) return;
33467
+ if (!textBounds || !graphicBounds) return {
33468
+ x: 1 / 0,
33469
+ y: 1 / 0
33470
+ };
33197
33471
  const {
33198
33472
  x1: x1,
33199
33473
  x2: x2
@@ -33360,11 +33634,14 @@
33360
33634
  baseMark = currentBaseMarks[i];
33361
33635
  textData && baseMark && (isValid$1(textData.id) || (textData.id = `vrender-component-${this.name}-${i}`), this._idToGraphic.set(textData.id, baseMark));
33362
33636
  }
33363
- !1 !== this.attribute.animation && (this._animationConfig = {
33364
- enter: merge$1({}, DefaultLabelAnimation, this.attribute.animation, null !== (_c = this.attribute.animationEnter) && void 0 !== _c ? _c : {}),
33365
- exit: merge$1({}, DefaultLabelAnimation, this.attribute.animation, null !== (_d = this.attribute.animationExit) && void 0 !== _d ? _d : {}),
33366
- update: isArray$1(this.attribute.animationUpdate) ? this.attribute.animationUpdate : merge$1({}, DefaultLabelAnimation, this.attribute.animation, null !== (_e = this.attribute.animationUpdate) && void 0 !== _e ? _e : {})
33367
- });
33637
+ if (!1 !== this.attribute.animation) {
33638
+ const animation = isObject$2(this.attribute.animation) ? this.attribute.animation : {};
33639
+ this._animationConfig = {
33640
+ enter: merge$1({}, DefaultLabelAnimation, animation, null !== (_c = this.attribute.animationEnter) && void 0 !== _c ? _c : {}),
33641
+ exit: merge$1({}, DefaultLabelAnimation, animation, null !== (_d = this.attribute.animationExit) && void 0 !== _d ? _d : {}),
33642
+ update: isArray$1(this.attribute.animationUpdate) ? this.attribute.animationUpdate : merge$1({}, DefaultLabelAnimation, animation, null !== (_e = this.attribute.animationUpdate) && void 0 !== _e ? _e : {})
33643
+ };
33644
+ }
33368
33645
  }
33369
33646
  }
33370
33647
  getRelatedGraphic(item) {
@@ -33380,8 +33657,9 @@
33380
33657
  labels = [];
33381
33658
  for (let i = 0; i < data.length; i++) {
33382
33659
  const textData = data[i],
33383
- baseMark = this.getRelatedGraphic(textData),
33384
- labelAttribute = Object.assign(Object.assign({
33660
+ baseMark = this.getRelatedGraphic(textData);
33661
+ if (!baseMark) continue;
33662
+ const labelAttribute = Object.assign(Object.assign({
33385
33663
  fill: this._isCollectionBase ? isArray$1(baseMark.attribute.stroke) ? baseMark.attribute.stroke.find(entry => !!entry && !0 !== entry) : baseMark.attribute.stroke : baseMark.attribute.fill
33386
33664
  }, textStyle), textData),
33387
33665
  text = this._createLabelText(labelAttribute),
@@ -33399,7 +33677,7 @@
33399
33677
  _overlapping(labels) {
33400
33678
  var _a, _b, _c, _d;
33401
33679
  if (0 === labels.length) return [];
33402
- const option = this.attribute.overlap,
33680
+ const option = isObject$2(this.attribute.overlap) ? this.attribute.overlap : {},
33403
33681
  result = [],
33404
33682
  baseMarkGroup = this.getBaseMarkGroup(),
33405
33683
  size = null !== (_a = option.size) && void 0 !== _a ? _a : {
@@ -33555,9 +33833,7 @@
33555
33833
  duration: duration,
33556
33834
  easing: easing
33557
33835
  } = this._animationConfig.update;
33558
- updateAnimation(prevText, text, this._animationConfig.update), prevLabel.labelLine && labelLine && prevLabel.labelLine.animate().to(merge$1({}, prevLabel.labelLine.attribute, {
33559
- points: labelLine.attribute.points
33560
- }), duration, easing);
33836
+ updateAnimation(prevText, text, this._animationConfig.update), prevLabel.labelLine && labelLine && prevLabel.labelLine.animate().to(labelLine.attribute, duration, easing);
33561
33837
  }
33562
33838
  }), prevTextMap.forEach(label => {
33563
33839
  var _a;
@@ -33585,9 +33861,7 @@
33585
33861
  text: text
33586
33862
  }), this.add(text), labelLine && this.add(labelLine), this._syncStateWithRelatedGraphic(relatedGraphic);else if ("update" === state) {
33587
33863
  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
- });
33864
+ prevTextMap.delete(textKey), currentTextMap.set(textKey, prevLabel), prevLabel.text.setAttributes(text.attribute), prevLabel.labelLine && labelLine && prevLabel.labelLine.setAttributes(labelLine.attribute);
33591
33865
  }
33592
33866
  }), prevTextMap.forEach(label => {
33593
33867
  this.removeChild(label.text), label.labelLine && this.removeChild(label.labelLine);
@@ -33645,7 +33919,7 @@
33645
33919
  }
33646
33920
  _smartInvert(labels) {
33647
33921
  var _a, _b, _c, _d, _e;
33648
- const option = this.attribute.smartInvert || {},
33922
+ const option = isObject$2(this.attribute.smartInvert) ? this.attribute.smartInvert : {},
33649
33923
  {
33650
33924
  textType: textType,
33651
33925
  contrastRatiosThreshold: contrastRatiosThreshold,
@@ -33842,16 +34116,15 @@
33842
34116
  getGraphicBounds(graphic) {
33843
34117
  let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
33844
34118
  let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
33845
- var _a;
33846
34119
  if (!graphic || "line" !== graphic.type) return super.getGraphicBounds(graphic, point);
33847
- const points = (null === (_a = null == graphic ? void 0 : graphic.attribute) || void 0 === _a ? void 0 : _a.points) || [point],
34120
+ const points = graphic.attribute.points || [point],
33848
34121
  index = "start" === position ? 0 : points.length - 1;
33849
- return {
34122
+ return points[index] ? {
33850
34123
  x1: points[index].x,
33851
34124
  x2: points[index].x,
33852
34125
  y1: points[index].y,
33853
34126
  y2: points[index].y
33854
- };
34127
+ } : void 0;
33855
34128
  }
33856
34129
  labeling(textBounds, graphicBounds) {
33857
34130
  let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
@@ -35540,6 +35813,7 @@
35540
35813
  };
35541
35814
  }
35542
35815
  beforeLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
35816
+ var _a, _b, _c, _d;
35543
35817
  const {
35544
35818
  flush = !1
35545
35819
  } = this.attribute.label || {};
@@ -35554,55 +35828,51 @@
35554
35828
  last$1 = last(labelShapes),
35555
35829
  isInverse = isX ? first.attribute.x > last$1.attribute.x : first.attribute.y < last$1.attribute.y;
35556
35830
  if (isX) {
35557
- if (isInverse) {
35558
- const start = axisEnd.x,
35559
- end = axisStart.x,
35560
- startBound = first.AABBBounds.x2,
35561
- endBound = last$1.AABBBounds.x1;
35562
- startBound > start && first.setAttributes({
35563
- x: start,
35564
- textAlign: "right"
35565
- }), endBound < end && last$1.setAttributes({
35566
- x: end,
35831
+ const leftMostLabel = isInverse ? last$1 : first,
35832
+ rightMostLabel = isInverse ? first : last$1,
35833
+ left = axisStart.x,
35834
+ right = axisEnd.x,
35835
+ leftBound = leftMostLabel.AABBBounds.x1,
35836
+ rightBound = rightMostLabel.AABBBounds.x2;
35837
+ if (leftBound < left) {
35838
+ leftMostLabel.attribute.angle ? leftMostLabel.setAttributes({
35839
+ dx: (null !== (_a = leftMostLabel.attribute.dx) && void 0 !== _a ? _a : 0) + left - leftBound
35840
+ }) : leftMostLabel.setAttributes({
35841
+ x: left,
35567
35842
  textAlign: "left"
35568
35843
  });
35569
- } else {
35570
- const start = axisStart.x,
35571
- end = axisEnd.x,
35572
- startBound = first.AABBBounds.x1,
35573
- endBound = last$1.AABBBounds.x2;
35574
- startBound < start && first.setAttributes({
35575
- x: start,
35576
- textAlign: "left"
35577
- }), endBound > end && last$1.setAttributes({
35578
- x: end,
35844
+ }
35845
+ if (rightBound > right) {
35846
+ rightMostLabel.attribute.angle ? rightMostLabel.setAttributes({
35847
+ dx: (null !== (_b = rightMostLabel.attribute.dx) && void 0 !== _b ? _b : 0) + right - rightBound
35848
+ }) : rightMostLabel.setAttributes({
35849
+ x: right,
35579
35850
  textAlign: "right"
35580
35851
  });
35581
35852
  }
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
35853
  } else {
35595
- const start = axisEnd.y,
35596
- end = axisStart.y,
35597
- startBound = first.AABBBounds.y2,
35598
- endBound = last$1.AABBBounds.y1;
35599
- startBound > start && first.setAttributes({
35600
- y: start,
35601
- textBaseline: "bottom"
35602
- }), endBound < end && last$1.setAttributes({
35603
- y: end,
35604
- textBaseline: "top"
35605
- });
35854
+ const bottomMostLabel = isInverse ? last$1 : first,
35855
+ topMostLabel = isInverse ? first : last$1,
35856
+ bottomBound = bottomMostLabel.AABBBounds.y2,
35857
+ topBound = topMostLabel.AABBBounds.y1,
35858
+ top = axisStart.y,
35859
+ bottom = axisEnd.y;
35860
+ if (topBound < top) {
35861
+ topMostLabel.attribute.angle ? topMostLabel.setAttributes({
35862
+ dy: (null !== (_c = topMostLabel.attribute.dy) && void 0 !== _c ? _c : 0) + top - topBound
35863
+ }) : topMostLabel.setAttributes({
35864
+ y: top,
35865
+ textBaseline: "top"
35866
+ });
35867
+ }
35868
+ if (bottomBound > bottom) {
35869
+ bottomMostLabel.attribute.angle ? bottomMostLabel.setAttributes({
35870
+ dy: (null !== (_d = bottomMostLabel.attribute.dy) && void 0 !== _d ? _d : 0) + bottom - bottomBound
35871
+ }) : bottomMostLabel.setAttributes({
35872
+ y: bottom,
35873
+ textBaseline: "bottom"
35874
+ });
35875
+ }
35606
35876
  }
35607
35877
  }
35608
35878
  }
@@ -39527,7 +39797,7 @@
39527
39797
  }, textStyle);
39528
39798
  this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
39529
39799
  } else isValid$1(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
39530
- text: [text]
39800
+ text: isArray$1(text) ? text : [text]
39531
39801
  }, textStyle), {
39532
39802
  maxLineWidth: null !== (_t = textStyle.maxLineWidth) && void 0 !== _t ? _t : width,
39533
39803
  heightLimit: textStyle.heightLimit,
@@ -39568,7 +39838,7 @@
39568
39838
  }, subtextStyle);
39569
39839
  this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
39570
39840
  } else isValid$1(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
39571
- text: [subtext]
39841
+ text: isArray$1(subtext) ? subtext : [subtext]
39572
39842
  }, subtextStyle), {
39573
39843
  maxLineWidth: null !== (_12 = subtextStyle.maxLineWidth) && void 0 !== _12 ? _12 : width,
39574
39844
  heightLimit: subtextStyle.heightLimit,
@@ -40427,7 +40697,7 @@
40427
40697
  const brushMoved = null === (_a = this.attribute.brushMoved) || void 0 === _a || _a;
40428
40698
  this._activeMoveState = brushMoved && this._isPosInBrushMask(e), this._activeDrawState = !this._activeMoveState, this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e);
40429
40699
  }, this._onBrushing = e => {
40430
- this._outOfInteractiveRange(e) || (e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
40700
+ this._outOfInteractiveRange(e) || ((this._activeDrawState || this._activeMoveState) && e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
40431
40701
  }, this._onBrushEnd = e => {
40432
40702
  e.preventDefault();
40433
40703
  const {
@@ -41857,7 +42127,9 @@
41857
42127
  autoRender: !0,
41858
42128
  pluginList: viewOptions.pluginList,
41859
42129
  enableHtmlAttribute: viewOptions.enableHtmlAttribute,
41860
- optimize: viewOptions.optimize
42130
+ optimize: viewOptions.optimize,
42131
+ supportsTouchEvents: viewOptions.supportsTouchEvents,
42132
+ supportsPointerEvents: viewOptions.supportsPointerEvents
41861
42133
  });
41862
42134
  (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
42135
  const layer = null !== (_c = viewOptions.layer) && void 0 !== _c ? _c : stage.defaultLayer;
@@ -42414,7 +42686,7 @@
42414
42686
  const computePoints = isValidPointsChannel(fromKeys, element.mark.markType) && !isValid$1(from.segments);
42415
42687
  if (computePoints) {
42416
42688
  const items = element.items.map(item => Object.assign({}, item, {
42417
- nextAttrs: from
42689
+ nextAttrs: Object.assign({}, from)
42418
42690
  }));
42419
42691
  attributes.from = element.transformElementItems(items, element.mark.markType, computePoints);
42420
42692
  }
@@ -42428,7 +42700,7 @@
42428
42700
  const computePoints = isValidPointsChannel(toKeys, element.mark.markType) && !isValid$1(to.segments);
42429
42701
  if (computePoints) {
42430
42702
  const items = element.items.map(item => Object.assign({}, item, {
42431
- nextAttrs: to
42703
+ nextAttrs: Object.assign({}, to)
42432
42704
  }));
42433
42705
  attributes.to = element.transformElementItems(items, element.mark.markType, computePoints);
42434
42706
  }
@@ -43256,14 +43528,8 @@
43256
43528
  if (!this._groupKeys || !groupEncode) return;
43257
43529
  const res = {};
43258
43530
  return this._groupKeys.forEach(key => {
43259
- var _a;
43260
43531
  const el = elements.find(el => el.groupKey === key);
43261
- if (!el) return;
43262
- const nextAttrs = {},
43263
- items = [Object.assign({}, null === (_a = el.items) || void 0 === _a ? void 0 : _a[0], {
43264
- nextAttrs: nextAttrs
43265
- })];
43266
- invokeEncoderToItems(el, items, groupEncode, parameters), res[key] = nextAttrs;
43532
+ el && (res[key] = invokeEncoder(groupEncode, el.items && el.items[0] && el.items[0].datum, el, parameters));
43267
43533
  }), res;
43268
43534
  }
43269
43535
  evaluateEncode(elements, encoders, parameters) {
@@ -44960,10 +45226,18 @@
44960
45226
  }
44961
45227
  getMarksBySelector(selector) {
44962
45228
  if (!selector) return null;
44963
- const selectors = array(selector);
44964
- let res = [];
45229
+ const selectors = array(selector),
45230
+ res = [];
44965
45231
  return selectors.forEach(selectorStr => {
44966
- isGrammar(selectorStr) ? res = res.concat(selectorStr) : (selectorStr[0] === ID_PREFIX && (res = res.concat(this.getMarkById(selectorStr.slice(1)))), selectorStr[0] === NAME_PREFIX && (res = res.concat(this.getMarksByName(selectorStr.slice(1)))), isMarkType(selectorStr) && (res = res.concat(this.getMarksByType(selectorStr))));
45232
+ if (isGrammar(selectorStr)) return void res.push(selectorStr);
45233
+ if (selectorStr[0] === ID_PREFIX) {
45234
+ const mark = this.getMarkById(selectorStr.slice(1));
45235
+ return void (mark && res.push(mark));
45236
+ }
45237
+ const marks = selectorStr[0] === NAME_PREFIX ? this.getMarksByName(selectorStr.slice(1)) : isMarkType(selectorStr) ? this.getMarksByType(selectorStr) : null;
45238
+ marks && marks.length && marks.forEach(mark => {
45239
+ res.push(mark);
45240
+ });
44967
45241
  }), res;
44968
45242
  }
44969
45243
  updateSignal(signal, value) {
@@ -50690,7 +50964,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
50690
50964
  return themes.has(name);
50691
50965
  };
50692
50966
  const getMergedTheme = (theme) => {
50693
- const baseTheme = getTheme(defaultThemeName);
50967
+ var _a;
50968
+ const baseThemeName = (_a = theme.type) !== null && _a !== void 0 ? _a : defaultThemeName;
50969
+ const baseTheme = getTheme(baseThemeName);
50694
50970
  return mergeTheme({}, baseTheme, theme);
50695
50971
  };
50696
50972
 
@@ -52099,13 +52375,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
52099
52375
  const filter = handler.filter;
52100
52376
  if (!handler.query || this._filter(filter, type, params)) {
52101
52377
  const callback = handler.wrappedCallback || handler.callback;
52102
- let stopBubble = callback.call(null, this._prepareParams(filter, params));
52103
- if ((_a = handler.query) === null || _a === void 0 ? void 0 : _a.consume) {
52104
- stopBubble = true;
52378
+ const stopBubble = callback.call(null, this._prepareParams(filter, params));
52379
+ const doStopBubble = stopBubble !== null && stopBubble !== void 0 ? stopBubble : (_a = handler.query) === null || _a === void 0 ? void 0 : _a.consume;
52380
+ if (doStopBubble) {
52105
52381
  (_b = params.event) === null || _b === void 0 ? void 0 : _b.stopPropagation();
52106
52382
  (_c = params.event) === null || _c === void 0 ? void 0 : _c.preventDefault();
52107
52383
  }
52108
- return stopBubble;
52384
+ return !!doStopBubble;
52109
52385
  }
52110
52386
  return undefined;
52111
52387
  });
@@ -53623,10 +53899,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
53623
53899
  return undefined;
53624
53900
  }
53625
53901
  transformSpec(spec, chartSpec, chartSpecInfo) {
53626
- this._transformSpec(spec, chartSpec, chartSpecInfo);
53627
- return this._initTheme(spec, chartSpec);
53902
+ this._transformSpecBeforeMergingTheme(spec, chartSpec, chartSpecInfo);
53903
+ const result = this._initTheme(spec, chartSpec);
53904
+ this._transformSpecAfterMergingTheme(result.spec, chartSpec, chartSpecInfo);
53905
+ return result;
53628
53906
  }
53629
- _transformSpec(spec, chartSpec, chartSpecInfo) {
53907
+ _transformSpecBeforeMergingTheme(spec, chartSpec, chartSpecInfo) {
53908
+ }
53909
+ _transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
53630
53910
  }
53631
53911
  _mergeThemeToSpec(spec, chartSpec) {
53632
53912
  const theme = this._theme;
@@ -53895,12 +54175,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
53895
54175
  set layoutOrient(v) {
53896
54176
  this._layoutOrient = v;
53897
54177
  }
53898
- get indent() {
53899
- return this._indent;
53900
- }
53901
- get layoutExcludeIndent() {
53902
- return this._layoutExcludeIndent;
53903
- }
53904
54178
  get model() {
53905
54179
  return this._model;
53906
54180
  }
@@ -53935,18 +54209,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
53935
54209
  this.layoutPaddingTop = 0;
53936
54210
  this.layoutPaddingRight = 0;
53937
54211
  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
54212
  this.layoutOffsetX = 0;
53951
54213
  this.layoutOffsetY = 0;
53952
54214
  this.layoutLevel = exports.LayoutLevel.Region;
@@ -53971,8 +54233,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
53971
54233
  this.layoutPaddingRight = paddingValue.right;
53972
54234
  this.layoutPaddingTop = paddingValue.top;
53973
54235
  this.layoutPaddingBottom = paddingValue.bottom;
53974
- const indent = normalizeLayoutPaddingSpec(spec.indent);
53975
- this._indent = calcPadding(indent, chartViewRect, chartViewRect);
53976
54236
  this._minHeight = isNil$1(spec.minHeight)
53977
54237
  ? (_a = this._minHeight) !== null && _a !== void 0 ? _a : null
53978
54238
  : calcLayoutNumber(spec.minHeight, chartViewRect.height, chartViewRect);
@@ -54005,6 +54265,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54005
54265
  if (!isNil$1(spec.offsetY)) {
54006
54266
  this.layoutOffsetY = calcLayoutNumber(spec.offsetY, chartViewRect.height, chartViewRect);
54007
54267
  }
54268
+ if (spec.alignSelf) {
54269
+ this.alignSelf = spec.alignSelf;
54270
+ }
54008
54271
  }
54009
54272
  }
54010
54273
  setAttrFromSpec(spec, chartViewRect) {
@@ -54083,8 +54346,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54083
54346
  if (isValidNumber$1(pos.y)) {
54084
54347
  this._layoutStartPoint.y = pos.y;
54085
54348
  }
54086
- this._layoutExcludeIndent.x = this._layoutStartPoint.x + this._indent.left;
54087
- this._layoutExcludeIndent.y = this._layoutStartPoint.y + this._indent.top;
54088
54349
  (_b = (_a = this._model).afterSetLayoutStartPoint) === null || _b === void 0 ? void 0 : _b.call(_a, this._layoutStartPoint);
54089
54350
  }
54090
54351
  setLayoutRect({ width, height }, levelMap) {
@@ -54098,8 +54359,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54098
54359
  this._layoutRectLevelMap.height = (_d = levelMap === null || levelMap === void 0 ? void 0 : levelMap.height) !== null && _d !== void 0 ? _d : DEFAULT_LAYOUT_RECT_LEVEL;
54099
54360
  }
54100
54361
  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
54362
  }
54104
54363
  getLayout() {
54105
54364
  return {
@@ -54267,18 +54526,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54267
54526
  this._forceLayoutTag = true;
54268
54527
  (_a = this._option.globalInstance.getChart()) === null || _a === void 0 ? void 0 : _a.setLayoutTag(true);
54269
54528
  }
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
54529
  getLayoutStartPoint() {
54283
54530
  return this._layout ? this._layout.getLayoutStartPoint() : this._layoutStartPos;
54284
54531
  }
@@ -54628,324 +54875,287 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54628
54875
  });
54629
54876
  }
54630
54877
  }
54631
- function layoutRightStartOrMiddleItems(items, layout, limitHeight, isMiddle) {
54878
+ function alignSelfOfItems(allItems, isVertical, maxSizes, sign) {
54879
+ let maxSize;
54880
+ allItems.forEach((lineItems, index) => {
54881
+ if (lineItems.length > 1) {
54882
+ maxSize = maxSizes[index];
54883
+ lineItems.forEach(item => {
54884
+ if (!item.alignSelf || item.alignSelf === 'start') {
54885
+ return;
54886
+ }
54887
+ const pos = item.getLayoutStartPoint();
54888
+ const ratio = item.alignSelf === 'middle' ? 0.5 : 1;
54889
+ const delta = isVertical
54890
+ ? maxSize - (item.getLayoutRect().width + item.layoutPaddingLeft + item.layoutPaddingRight)
54891
+ : maxSize - (item.getLayoutRect().height + item.layoutPaddingTop + item.layoutPaddingBottom);
54892
+ if (isVertical) {
54893
+ item.setLayoutStartPosition({
54894
+ x: pos.x + sign * delta * ratio,
54895
+ y: pos.y
54896
+ });
54897
+ }
54898
+ else {
54899
+ item.setLayoutStartPosition({
54900
+ x: pos.x,
54901
+ y: pos.y + sign * delta * ratio
54902
+ });
54903
+ }
54904
+ });
54905
+ }
54906
+ });
54907
+ }
54908
+ function layoutLeftRightStartOrMiddleItems(items, layout, limitHeight, isMiddle, position) {
54632
54909
  if (items.length) {
54633
54910
  let maxWidth = 0;
54634
- let preRight = layout.rightCurrent;
54911
+ const isRight = position === 'right';
54912
+ const xSign = isRight ? -1 : 1;
54913
+ let preX = isRight ? layout.rightCurrent : layout.leftCurrent;
54635
54914
  let preTop = layout.topCurrent;
54636
54915
  const allItems = [];
54637
54916
  let singleLineItems = [];
54917
+ const maxWidths = [];
54638
54918
  items.forEach(item => {
54639
54919
  const layoutRect = layout.getItemComputeLayoutRect(item);
54640
54920
  const rect = item.computeBoundsInRect(layoutRect);
54641
54921
  item.setLayoutRect(rect);
54642
54922
  const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54643
54923
  const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
54924
+ const itemOffsetX = isRight ? -rect.width - item.layoutPaddingRight : item.layoutPaddingLeft;
54644
54925
  item.setLayoutStartPosition({
54645
- x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54926
+ x: preX + item.layoutOffsetX + itemOffsetX,
54646
54927
  y: preTop + item.layoutOffsetY + item.layoutPaddingTop
54647
54928
  });
54648
- maxWidth = Math.max(maxWidth, itemTotalWidth);
54649
54929
  preTop += itemTotalHeight;
54650
- if (preTop > limitHeight) {
54651
- preRight -= maxWidth;
54930
+ if (preTop > limitHeight && singleLineItems.length) {
54931
+ maxWidths.push(maxWidth);
54932
+ preX += xSign * maxWidth;
54652
54933
  maxWidth = itemTotalWidth;
54653
54934
  preTop = layout.topCurrent + itemTotalHeight;
54654
54935
  item.setLayoutStartPosition({
54655
- x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54936
+ x: preX + item.layoutOffsetX + itemOffsetX,
54656
54937
  y: layout.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
54657
54938
  });
54658
54939
  allItems.push(singleLineItems);
54659
54940
  singleLineItems = [item];
54660
54941
  }
54661
54942
  else {
54943
+ maxWidth = Math.max(maxWidth, itemTotalWidth);
54662
54944
  singleLineItems.push(item);
54663
54945
  }
54664
54946
  });
54947
+ maxWidths.push(maxWidth);
54665
54948
  allItems.push(singleLineItems);
54949
+ alignSelfOfItems(allItems, true, maxWidths, xSign);
54666
54950
  if (isMiddle) {
54667
54951
  adjustItemsToCenter(allItems, true, limitHeight);
54668
54952
  }
54669
- layout.rightCurrent = preRight - maxWidth;
54953
+ if (isRight) {
54954
+ layout.rightCurrent = preX + xSign * maxWidth;
54955
+ }
54956
+ else {
54957
+ layout.leftCurrent = preX + xSign * maxWidth;
54958
+ }
54670
54959
  }
54671
54960
  }
54672
- function layoutLeftStartOrMiddleItems(items, layout, limitHeight, isMiddle) {
54961
+ function layoutLeftRightEndItems(items, layout, limitWidth, position) {
54673
54962
  if (items.length) {
54674
54963
  let maxWidth = 0;
54675
- let preLeft = layout.leftCurrent;
54676
- let preTop = layout.topCurrent;
54964
+ const isRight = position === 'right';
54965
+ const xSign = isRight ? -1 : 1;
54966
+ let preX = isRight ? layout.rightCurrent : layout.leftCurrent;
54967
+ let preBottom = layout.bottomCurrent;
54677
54968
  const allItems = [];
54678
54969
  let singleLineItems = [];
54970
+ const maxWidths = [];
54679
54971
  items.forEach(item => {
54680
54972
  const layoutRect = layout.getItemComputeLayoutRect(item);
54681
54973
  const rect = item.computeBoundsInRect(layoutRect);
54682
54974
  item.setLayoutRect(rect);
54683
54975
  const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54684
54976
  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;
54977
+ const itemOffsetX = isRight ? -rect.width - item.layoutPaddingRight : item.layoutPaddingLeft;
54978
+ if (preBottom < itemTotalHeight && singleLineItems.length) {
54979
+ maxWidths.push(maxWidth);
54980
+ preX += xSign * maxWidth;
54693
54981
  maxWidth = itemTotalWidth;
54694
- preTop = layout.topCurrent + itemTotalHeight;
54982
+ preBottom = layout.bottomCurrent;
54695
54983
  item.setLayoutStartPosition({
54696
- x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
54697
- y: layout.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
54984
+ x: preX + item.layoutOffsetX + itemOffsetX,
54985
+ y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54698
54986
  });
54699
54987
  allItems.push(singleLineItems);
54700
54988
  singleLineItems = [item];
54701
54989
  }
54702
54990
  else {
54991
+ item.setLayoutStartPosition({
54992
+ x: preX + item.layoutOffsetX + itemOffsetX,
54993
+ y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54994
+ });
54995
+ maxWidth = Math.max(maxWidth, itemTotalWidth);
54996
+ preBottom -= itemTotalHeight;
54703
54997
  singleLineItems.push(item);
54704
54998
  }
54705
54999
  });
55000
+ maxWidths.push(maxWidth);
54706
55001
  allItems.push(singleLineItems);
54707
- if (isMiddle) {
54708
- adjustItemsToCenter(allItems, true, limitHeight);
55002
+ alignSelfOfItems(allItems, true, maxWidths, xSign);
55003
+ if (isRight) {
55004
+ layout.rightCurrent = preX + xSign * maxWidth;
55005
+ }
55006
+ else {
55007
+ layout.leftCurrent = preX + xSign * maxWidth;
54709
55008
  }
54710
- layout.leftCurrent = preLeft + maxWidth;
54711
55009
  }
54712
55010
  }
54713
- function layoutTopStartOrMiddleItems(items, layout, limitWidth, isMiddle) {
55011
+ function layoutTopBottomStartOrMiddleItems(items, layout, limitWidth, isMiddle, position) {
54714
55012
  if (items.length) {
55013
+ const isTop = position === 'top';
55014
+ const ySign = isTop ? 1 : -1;
54715
55015
  let maxHeight = 0;
54716
55016
  let preLeft = layout.leftCurrent;
54717
- let preTop = layout.topCurrent;
55017
+ let preY = isTop ? layout.topCurrent : layout.bottomCurrent;
54718
55018
  const allItems = [];
54719
55019
  let singleLineItems = [];
55020
+ const maxHeights = [];
54720
55021
  items.forEach(item => {
54721
55022
  const layoutRect = layout.getItemComputeLayoutRect(item);
54722
55023
  const rect = item.computeBoundsInRect(layoutRect);
54723
55024
  item.setLayoutRect(rect);
54724
55025
  const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54725
55026
  const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
55027
+ const itemOffsetY = isTop ? item.layoutPaddingTop : -rect.height - item.layoutPaddingBottom;
54726
55028
  item.setLayoutStartPosition({
54727
55029
  x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
54728
- y: preTop + item.layoutOffsetY + item.layoutPaddingTop
55030
+ y: preY + item.layoutOffsetY + itemOffsetY
54729
55031
  });
54730
- maxHeight = Math.max(maxHeight, itemTotalHeight);
54731
55032
  preLeft += itemTotalWidth;
54732
- if (preLeft > limitWidth) {
55033
+ if (preLeft > limitWidth && singleLineItems.length) {
55034
+ maxHeights.push(maxHeight);
54733
55035
  preLeft = layout.leftCurrent + itemTotalWidth;
54734
- preTop += maxHeight;
55036
+ preY += ySign * maxHeight;
54735
55037
  maxHeight = itemTotalHeight;
54736
55038
  item.setLayoutStartPosition({
54737
55039
  x: layout.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft,
54738
- y: preTop + item.layoutOffsetY + item.layoutPaddingTop
55040
+ y: preY + item.layoutOffsetY + itemOffsetY
54739
55041
  });
54740
55042
  allItems.push(singleLineItems);
54741
55043
  singleLineItems = [item];
54742
55044
  }
54743
55045
  else {
55046
+ maxHeight = Math.max(maxHeight, itemTotalHeight);
54744
55047
  singleLineItems.push(item);
54745
55048
  }
54746
55049
  });
55050
+ maxHeights.push(maxHeight);
54747
55051
  allItems.push(singleLineItems);
55052
+ alignSelfOfItems(allItems, false, maxHeights, ySign);
54748
55053
  if (isMiddle) {
54749
55054
  adjustItemsToCenter(allItems, false, limitWidth);
54750
55055
  }
54751
- layout.topCurrent = preTop + maxHeight;
55056
+ if (isTop) {
55057
+ layout.topCurrent = preY + ySign * maxHeight;
55058
+ }
55059
+ else {
55060
+ layout.bottomCurrent = preY + ySign * maxHeight;
55061
+ }
54752
55062
  }
54753
55063
  }
54754
- function layoutBottomStartOrMiddleItems(items, layout, limitWidth, isMiddle) {
55064
+ function layoutTopBottomEndItems(items, layout, limitWidth, position) {
54755
55065
  if (items.length) {
55066
+ const isTop = position === 'top';
55067
+ const ySign = isTop ? 1 : -1;
54756
55068
  let maxHeight = 0;
54757
- let preLeft = layout.leftCurrent;
54758
- let preBottom = layout.bottomCurrent;
55069
+ let preRight = layout.rightCurrent;
55070
+ let preY = isTop ? layout.topCurrent : layout.bottomCurrent;
54759
55071
  const allItems = [];
54760
55072
  let singleLineItems = [];
55073
+ const maxHeights = [];
54761
55074
  items.forEach(item => {
54762
55075
  const layoutRect = layout.getItemComputeLayoutRect(item);
54763
55076
  const rect = item.computeBoundsInRect(layoutRect);
54764
55077
  item.setLayoutRect(rect);
54765
55078
  const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54766
55079
  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;
55080
+ const itemOffsetY = isTop ? item.layoutPaddingTop : -rect.height - item.layoutPaddingBottom;
55081
+ if (preRight < itemTotalWidth && singleLineItems.length) {
55082
+ preRight = layout.rightCurrent;
55083
+ preY += ySign * maxHeight;
54777
55084
  maxHeight = itemTotalHeight;
54778
55085
  item.setLayoutStartPosition({
54779
- x: layout.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft,
54780
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
55086
+ x: layout.rightCurrent + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
55087
+ y: preY + item.layoutOffsetY + itemOffsetY
54781
55088
  });
55089
+ allItems.push(singleLineItems);
54782
55090
  singleLineItems = [item];
54783
55091
  }
54784
55092
  else {
54785
55093
  singleLineItems.push(item);
55094
+ item.setLayoutStartPosition({
55095
+ x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
55096
+ y: preY + item.layoutOffsetY + itemOffsetY
55097
+ });
55098
+ maxHeight = Math.max(maxHeight, itemTotalHeight);
55099
+ preRight -= itemTotalWidth;
54786
55100
  }
54787
55101
  });
55102
+ maxHeights.push(maxHeight);
54788
55103
  allItems.push(singleLineItems);
54789
- if (isMiddle) {
54790
- adjustItemsToCenter(allItems, false, limitWidth);
55104
+ alignSelfOfItems(allItems, false, maxHeights, ySign);
55105
+ if (isTop) {
55106
+ layout.topCurrent = preY + ySign * maxHeight;
55107
+ }
55108
+ else {
55109
+ layout.bottomCurrent = preY + ySign * maxHeight;
54791
55110
  }
54792
- layout.bottomCurrent = preBottom - maxHeight;
54793
55111
  }
54794
55112
  }
54795
55113
  function layoutLeftInlineItems(items, layout, limitHeight) {
54796
55114
  const { startItems, middleItems, endItems } = getPositionItems(items);
54797
55115
  if (startItems.length) {
54798
- layoutLeftStartOrMiddleItems(startItems, layout, limitHeight, false);
55116
+ layoutLeftRightStartOrMiddleItems(startItems, layout, limitHeight, false, 'left');
54799
55117
  }
54800
55118
  if (middleItems.length) {
54801
- layoutLeftStartOrMiddleItems(middleItems, layout, limitHeight, true);
55119
+ layoutLeftRightStartOrMiddleItems(middleItems, layout, limitHeight, true, 'left');
54802
55120
  }
54803
55121
  if (endItems.length) {
54804
- let maxWidth = 0;
54805
- let preLeft = layout.leftCurrent;
54806
- let preBottom = layout.bottomCurrent;
54807
- endItems.forEach(item => {
54808
- const layoutRect = layout.getItemComputeLayoutRect(item);
54809
- const rect = item.computeBoundsInRect(layoutRect);
54810
- item.setLayoutRect(rect);
54811
- const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54812
- const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
54813
- if (preBottom < itemTotalHeight) {
54814
- preLeft += maxWidth;
54815
- maxWidth = itemTotalWidth;
54816
- preBottom = layout.bottomCurrent;
54817
- item.setLayoutStartPosition({
54818
- x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
54819
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54820
- });
54821
- }
54822
- else {
54823
- item.setLayoutStartPosition({
54824
- x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
54825
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54826
- });
54827
- maxWidth = Math.max(maxWidth, itemTotalWidth);
54828
- preBottom -= itemTotalHeight;
54829
- }
54830
- });
54831
- layout.leftCurrent = preLeft + maxWidth;
55122
+ layoutLeftRightEndItems(endItems, layout, limitHeight, 'left');
54832
55123
  }
54833
55124
  }
54834
55125
  function layoutRightInlineItems(items, layout, limitHeight) {
54835
55126
  const { startItems, middleItems, endItems } = getPositionItems(items);
54836
55127
  if (startItems.length) {
54837
- layoutRightStartOrMiddleItems(startItems, layout, limitHeight, false);
55128
+ layoutLeftRightStartOrMiddleItems(startItems, layout, limitHeight, false, 'right');
54838
55129
  }
54839
55130
  if (middleItems.length) {
54840
- layoutRightStartOrMiddleItems(middleItems, layout, limitHeight, true);
55131
+ layoutLeftRightStartOrMiddleItems(middleItems, layout, limitHeight, true, 'right');
54841
55132
  }
54842
55133
  if (endItems.length) {
54843
- let maxWidth = 0;
54844
- let preRight = layout.rightCurrent;
54845
- let preBottom = layout.bottomCurrent;
54846
- endItems.forEach(item => {
54847
- const layoutRect = layout.getItemComputeLayoutRect(item);
54848
- const rect = item.computeBoundsInRect(layoutRect);
54849
- item.setLayoutRect(rect);
54850
- const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54851
- const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
54852
- if (preBottom < itemTotalHeight) {
54853
- preRight -= maxWidth;
54854
- maxWidth = itemTotalWidth;
54855
- preBottom = layout.bottomCurrent;
54856
- item.setLayoutStartPosition({
54857
- x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54858
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54859
- });
54860
- }
54861
- else {
54862
- item.setLayoutStartPosition({
54863
- x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54864
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54865
- });
54866
- maxWidth = Math.max(maxWidth, itemTotalWidth);
54867
- preBottom -= itemTotalHeight;
54868
- }
54869
- });
54870
- layout.rightCurrent = preRight - maxWidth;
55134
+ layoutLeftRightEndItems(endItems, layout, limitHeight, 'right');
54871
55135
  }
54872
55136
  }
54873
55137
  function layoutTopInlineItems(items, layout, limitWidth) {
54874
55138
  const { startItems, middleItems, endItems } = getPositionItems(items);
54875
55139
  if (startItems.length) {
54876
- layoutTopStartOrMiddleItems(startItems, layout, limitWidth, false);
55140
+ layoutTopBottomStartOrMiddleItems(startItems, layout, limitWidth, false, 'top');
54877
55141
  }
54878
55142
  if (middleItems.length) {
54879
- layoutTopStartOrMiddleItems(middleItems, layout, limitWidth, true);
55143
+ layoutTopBottomStartOrMiddleItems(middleItems, layout, limitWidth, true, 'top');
54880
55144
  }
54881
55145
  if (endItems.length) {
54882
- let maxHeight = 0;
54883
- let preTop = layout.topCurrent;
54884
- let preRight = layout.rightCurrent;
54885
- endItems.forEach(item => {
54886
- const layoutRect = layout.getItemComputeLayoutRect(item);
54887
- const rect = item.computeBoundsInRect(layoutRect);
54888
- item.setLayoutRect(rect);
54889
- const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54890
- const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
54891
- if (preRight < itemTotalWidth) {
54892
- preRight = layout.rightCurrent;
54893
- preTop += maxHeight;
54894
- maxHeight = itemTotalHeight;
54895
- item.setLayoutStartPosition({
54896
- x: layout.rightCurrent + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54897
- y: preTop + item.layoutOffsetY + item.layoutPaddingTop
54898
- });
54899
- }
54900
- else {
54901
- item.setLayoutStartPosition({
54902
- x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54903
- y: preTop + item.layoutOffsetY + item.layoutPaddingTop
54904
- });
54905
- maxHeight = Math.max(maxHeight, itemTotalHeight);
54906
- preRight -= itemTotalWidth;
54907
- }
54908
- });
54909
- layout.topCurrent = preTop + maxHeight;
55146
+ layoutTopBottomEndItems(endItems, layout, limitWidth, 'top');
54910
55147
  }
54911
55148
  }
54912
55149
  function layoutBottomInlineItems(items, layout, limitWidth) {
54913
55150
  const { startItems, middleItems, endItems } = getPositionItems(items);
54914
55151
  if (startItems.length) {
54915
- layoutBottomStartOrMiddleItems(startItems, layout, limitWidth, false);
55152
+ layoutTopBottomStartOrMiddleItems(startItems, layout, limitWidth, false, 'bottom');
54916
55153
  }
54917
55154
  if (middleItems.length) {
54918
- layoutBottomStartOrMiddleItems(middleItems, layout, limitWidth, true);
55155
+ layoutTopBottomStartOrMiddleItems(middleItems, layout, limitWidth, true, 'bottom');
54919
55156
  }
54920
55157
  if (endItems.length) {
54921
- let maxHeight = 0;
54922
- let preBottom = layout.bottomCurrent;
54923
- let preRight = layout.rightCurrent;
54924
- endItems.forEach(item => {
54925
- const layoutRect = layout.getItemComputeLayoutRect(item);
54926
- const rect = item.computeBoundsInRect(layoutRect);
54927
- item.setLayoutRect(rect);
54928
- const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
54929
- const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
54930
- if (preRight < itemTotalWidth) {
54931
- preRight = layout.rightCurrent;
54932
- preBottom -= maxHeight;
54933
- maxHeight = itemTotalHeight;
54934
- item.setLayoutStartPosition({
54935
- x: layout.rightCurrent + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54936
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54937
- });
54938
- }
54939
- else {
54940
- item.setLayoutStartPosition({
54941
- x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
54942
- y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
54943
- });
54944
- maxHeight = Math.max(maxHeight, itemTotalHeight);
54945
- preRight -= itemTotalWidth;
54946
- }
54947
- });
54948
- layout.bottomCurrent = preBottom - maxHeight;
55158
+ layoutTopBottomEndItems(endItems, layout, limitWidth, 'bottom');
54949
55159
  }
54950
55160
  }
54951
55161
 
@@ -54957,7 +55167,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54957
55167
  this.bottomCurrent = 0;
54958
55168
  this._onError = ctx === null || ctx === void 0 ? void 0 : ctx.onError;
54959
55169
  }
54960
- layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
55170
+ _layoutInit(_chart, items, chartLayoutRect, chartViewBox) {
54961
55171
  this._chartLayoutRect = chartLayoutRect;
54962
55172
  this._chartViewBox = chartViewBox;
54963
55173
  this.leftCurrent = chartLayoutRect.x;
@@ -54965,28 +55175,65 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
54965
55175
  this.rightCurrent = chartLayoutRect.x + chartLayoutRect.width;
54966
55176
  this.bottomCurrent = chartLayoutRect.height + chartLayoutRect.y;
54967
55177
  items.sort((a, b) => b.layoutLevel - a.layoutLevel);
55178
+ }
55179
+ _layoutNormalItems(items) {
54968
55180
  this.layoutNormalInlineItems(items.filter(x => x.layoutType === 'normal-inline'));
54969
55181
  this.layoutNormalItems(items.filter(x => x.layoutType === 'normal'));
55182
+ }
55183
+ _groupItems(items) {
55184
+ const regionItems = items.filter(x => x.layoutType === 'region');
55185
+ const relativeItems = items.filter(x => x.layoutType === 'region-relative');
55186
+ const relativeOverlapItems = items.filter(x => x.layoutType === 'region-relative-overlap');
55187
+ const allRelatives = relativeItems.concat(relativeOverlapItems);
55188
+ const overlapItems = {
55189
+ left: { items: [], rect: { width: 0, height: 0 } },
55190
+ right: { items: [], rect: { width: 0, height: 0 } },
55191
+ top: { items: [], rect: { width: 0, height: 0 } },
55192
+ bottom: { items: [], rect: { width: 0, height: 0 } },
55193
+ z: { items: [], rect: { width: 0, height: 0 } }
55194
+ };
55195
+ relativeOverlapItems.forEach(i => {
55196
+ overlapItems[i.layoutOrient].items.push(i);
55197
+ });
55198
+ return {
55199
+ regionItems,
55200
+ relativeItems,
55201
+ relativeOverlapItems,
55202
+ allRelatives,
55203
+ overlapItems
55204
+ };
55205
+ }
55206
+ layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
55207
+ this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
55208
+ this._layoutNormalItems(items);
54970
55209
  const layoutTemp = {
54971
55210
  left: this.leftCurrent,
54972
55211
  top: this.topCurrent,
54973
55212
  right: this.rightCurrent,
54974
55213
  bottom: this.bottomCurrent
54975
55214
  };
54976
- const regionItems = items.filter(x => x.layoutType === 'region');
54977
- const relativeItems = items.filter(x => x.layoutType === 'region-relative');
54978
- this.layoutRegionItems(regionItems, relativeItems);
54979
- if (relativeItems.some(i => i.autoIndent)) {
54980
- const { top, bottom, left, right } = this._checkAutoIndent(relativeItems, layoutTemp);
55215
+ const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
55216
+ this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
55217
+ this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp);
55218
+ this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
55219
+ }
55220
+ _processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems = {
55221
+ left: { items: [], rect: { width: 0, height: 0 } },
55222
+ right: { items: [], rect: { width: 0, height: 0 } },
55223
+ top: { items: [], rect: { width: 0, height: 0 } },
55224
+ bottom: { items: [], rect: { width: 0, height: 0 } },
55225
+ z: { items: [], rect: { width: 0, height: 0 } }
55226
+ }, allRelatives, layoutTemp) {
55227
+ if (allRelatives.some(i => i.autoIndent)) {
55228
+ const { top, bottom, left, right } = this._checkAutoIndent(allRelatives, layoutTemp);
54981
55229
  if (top || bottom || left || right) {
54982
55230
  this.topCurrent = layoutTemp.top + top;
54983
55231
  this.bottomCurrent = layoutTemp.bottom - bottom;
54984
55232
  this.leftCurrent = layoutTemp.left + left;
54985
55233
  this.rightCurrent = layoutTemp.right - right;
54986
- this.layoutRegionItems(regionItems, relativeItems);
55234
+ this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
54987
55235
  }
54988
55236
  }
54989
- this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
54990
55237
  }
54991
55238
  layoutNormalItems(normalItems) {
54992
55239
  normalItems.forEach(item => {
@@ -55030,54 +55277,88 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55030
55277
  const bottomItems = normalItems.filter(item => item.layoutOrient === 'bottom');
55031
55278
  const limitWidth = this._chartLayoutRect.width + this._chartLayoutRect.x;
55032
55279
  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);
55280
+ leftItems.length && layoutLeftInlineItems(leftItems, this, limitHeight);
55281
+ topItems.length && layoutTopInlineItems(topItems, this, limitWidth);
55282
+ rightItems.length && layoutRightInlineItems(rightItems, this, limitHeight);
55283
+ bottomItems.length && layoutBottomInlineItems(bottomItems, this, limitWidth);
55037
55284
  }
55038
- layoutRegionItems(regionItems, regionRelativeItems) {
55039
- let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
55040
- let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
55041
- regionRelativeItems
55042
- .filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
55043
- .forEach(item => {
55285
+ _layoutRelativeOverlap(orient, info) {
55286
+ info.items.forEach((item) => {
55044
55287
  const layoutRect = this.getItemComputeLayoutRect(item);
55045
55288
  const rect = item.computeBoundsInRect(layoutRect);
55046
- item.setLayoutRect({ width: rect.width });
55047
- if (item.layoutOrient === 'left') {
55289
+ info.rect.width = Math.max(rect.width, info.rect.width);
55290
+ info.rect.height = Math.max(rect.height, info.rect.height);
55291
+ });
55292
+ info.items.forEach((item) => {
55293
+ item.setLayoutRect(info.rect);
55294
+ if (orient === 'left') {
55048
55295
  item.setLayoutStartPosition({
55049
55296
  x: this.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft
55050
55297
  });
55051
- this.leftCurrent += rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
55052
55298
  }
55053
- else if (item.layoutOrient === 'right') {
55054
- this.rightCurrent -= rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
55299
+ else if (orient === 'right') {
55055
55300
  item.setLayoutStartPosition({
55056
55301
  x: this.rightCurrent + item.layoutOffsetX + item.layoutPaddingLeft
55057
55302
  });
55058
55303
  }
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') {
55304
+ else if (orient === 'top') {
55068
55305
  item.setLayoutStartPosition({
55069
- y: this.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
55306
+ x: this.topCurrent + item.layoutOffsetX + item.layoutPaddingLeft
55070
55307
  });
55071
- this.topCurrent += rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
55072
55308
  }
55073
- else if (item.layoutOrient === 'bottom') {
55074
- this.bottomCurrent -= rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
55309
+ else {
55075
55310
  item.setLayoutStartPosition({
55076
- y: this.bottomCurrent + item.layoutOffsetY + item.layoutPaddingTop
55311
+ x: this.bottomCurrent + item.layoutOffsetX + item.layoutPaddingLeft
55077
55312
  });
55078
55313
  }
55079
55314
  });
55080
- regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
55315
+ if (orient === 'left') {
55316
+ this.leftCurrent += info.rect.width;
55317
+ }
55318
+ else if (orient === 'right') {
55319
+ this.rightCurrent -= info.rect.width;
55320
+ }
55321
+ else if (orient === 'top') {
55322
+ this.topCurrent += info.rect.height;
55323
+ }
55324
+ else {
55325
+ this.bottomCurrent -= info.rect.height;
55326
+ }
55327
+ }
55328
+ _layoutRelativeItem(item, layoutRect) {
55329
+ const rect = item.computeBoundsInRect(layoutRect);
55330
+ if (item.layoutOrient === 'left' || item.layoutOrient === 'right') {
55331
+ item.setLayoutRect({ width: rect.width });
55332
+ }
55333
+ else {
55334
+ item.setLayoutRect({ height: rect.height });
55335
+ }
55336
+ if (item.layoutOrient === 'left') {
55337
+ item.setLayoutStartPosition({
55338
+ x: this.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft
55339
+ });
55340
+ this.leftCurrent += rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
55341
+ }
55342
+ else if (item.layoutOrient === 'right') {
55343
+ this.rightCurrent -= rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
55344
+ item.setLayoutStartPosition({
55345
+ x: this.rightCurrent + item.layoutOffsetX + item.layoutPaddingLeft
55346
+ });
55347
+ }
55348
+ else if (item.layoutOrient === 'top') {
55349
+ item.setLayoutStartPosition({
55350
+ y: this.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
55351
+ });
55352
+ this.topCurrent += rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
55353
+ }
55354
+ else if (item.layoutOrient === 'bottom') {
55355
+ this.bottomCurrent -= rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
55356
+ item.setLayoutStartPosition({
55357
+ y: this.bottomCurrent + item.layoutOffsetY + item.layoutPaddingTop
55358
+ });
55359
+ }
55360
+ }
55361
+ _layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight) {
55081
55362
  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
55363
  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
55364
  regionItems.forEach(region => {
@@ -55090,14 +55371,45 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55090
55371
  y: this.topCurrent + region.layoutOffsetY + region.layoutPaddingTop
55091
55372
  });
55092
55373
  });
55093
- regionRelativeItems.forEach(item => {
55374
+ return {
55375
+ regionHeight,
55376
+ regionWidth
55377
+ };
55378
+ }
55379
+ layoutRegionItems(regionItems, regionRelativeItems, regionRelativeOverlapItems, overlapItems = {
55380
+ left: { items: [], rect: { width: 0, height: 0 } },
55381
+ right: { items: [], rect: { width: 0, height: 0 } },
55382
+ top: { items: [], rect: { width: 0, height: 0 } },
55383
+ bottom: { items: [], rect: { width: 0, height: 0 } },
55384
+ z: { items: [], rect: { width: 0, height: 0 } }
55385
+ }) {
55386
+ let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
55387
+ let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
55388
+ regionRelativeItems
55389
+ .filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
55390
+ .forEach(item => {
55391
+ this._layoutRelativeItem(item, this.getItemComputeLayoutRect(item));
55392
+ });
55393
+ this._layoutRelativeOverlap('left', overlapItems.left);
55394
+ this._layoutRelativeOverlap('right', overlapItems.right);
55395
+ regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
55396
+ regionRelativeItems
55397
+ .filter(x => x.layoutOrient === 'top' || x.layoutOrient === 'bottom')
55398
+ .forEach(item => {
55399
+ this._layoutRelativeItem(item, this.getItemComputeLayoutRect(item));
55400
+ });
55401
+ this._layoutRelativeOverlap('top', overlapItems.top);
55402
+ this._layoutRelativeOverlap('bottom', overlapItems.bottom);
55403
+ regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
55404
+ const { regionWidth, regionHeight } = this._layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight);
55405
+ regionRelativeItems.concat(regionRelativeOverlapItems).forEach(item => {
55094
55406
  if (['left', 'right'].includes(item.layoutOrient)) {
55095
55407
  const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
55096
55408
  item.setLayoutRect({
55097
- height: relativeRegion.layoutExcludeIndent.height
55409
+ height: relativeRegion.getLayoutRect().height
55098
55410
  });
55099
55411
  item.setLayoutStartPosition({
55100
- y: relativeRegion.layoutExcludeIndent.y + item.layoutOffsetY + item.layoutPaddingTop
55412
+ y: relativeRegion.getLayoutStartPoint().y + item.layoutOffsetY + item.layoutPaddingTop
55101
55413
  });
55102
55414
  if (item.layoutOrient === 'right') {
55103
55415
  item.setLayoutStartPosition({
@@ -55108,10 +55420,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
55108
55420
  else if (['top', 'bottom'].includes(item.layoutOrient)) {
55109
55421
  const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
55110
55422
  item.setLayoutRect({
55111
- width: relativeRegion.layoutExcludeIndent.width
55423
+ width: relativeRegion.getLayoutRect().width
55112
55424
  });
55113
55425
  item.setLayoutStartPosition({
55114
- x: relativeRegion.layoutExcludeIndent.x + item.layoutOffsetX + item.layoutPaddingLeft
55426
+ x: relativeRegion.getLayoutStartPoint().x + item.layoutOffsetX + item.layoutPaddingLeft
55115
55427
  });
55116
55428
  if (item.layoutOrient === 'bottom') {
55117
55429
  item.setLayoutStartPosition({
@@ -56382,7 +56694,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
56382
56694
  update: [
56383
56695
  {
56384
56696
  type: 'update',
56385
- options: { excludeChannels: 'points' }
56697
+ options: { excludeChannels: ['points', 'defined'] }
56386
56698
  },
56387
56699
  {
56388
56700
  channel: ['points'],
@@ -57649,7 +57961,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
57649
57961
  const handledDatum = series
57650
57962
  .getViewData()
57651
57963
  .latestData.find((viewDatum) => keys.every(k => viewDatum[k] == datum[k]));
57652
- const seriesLayoutStartPoint = series.getRegion().getLayoutPositionExcludeIndent();
57964
+ const seriesLayoutStartPoint = series.getRegion().getLayoutStartPoint();
57653
57965
  let point;
57654
57966
  if (handledDatum) {
57655
57967
  point = series.dataToPosition(handledDatum);
@@ -58131,7 +58443,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58131
58443
  registerChartPlugin(MediaQuery);
58132
58444
  };
58133
58445
 
58134
- const version = "1.8.8-alpha.1";
58446
+ const version = "1.8.9";
58135
58447
 
58136
58448
  var ChartTypeEnum;
58137
58449
  (function (ChartTypeEnum) {
@@ -58984,8 +59296,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
58984
59296
  return mergeSpec({}, theme, themeWithDirection);
58985
59297
  }
58986
59298
  transformSpec(spec, chartSpec, chartSpecInfo) {
58987
- this._transformSpec(spec, chartSpec, chartSpecInfo);
58988
- const result = this._initTheme(spec, chartSpec);
59299
+ const result = super.transformSpec(spec, chartSpec, chartSpecInfo);
58989
59300
  this._transformLabelSpec(result.spec);
58990
59301
  return Object.assign(Object.assign({}, result), { markLabelSpec: this.markLabelSpec });
58991
59302
  }
@@ -59019,7 +59330,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59019
59330
  return this._region;
59020
59331
  }
59021
59332
  getLayoutStartPoint() {
59022
- return this._region.getLayoutPositionExcludeIndent();
59333
+ return this._region.getLayoutStartPoint();
59023
59334
  }
59024
59335
  getRootMark() {
59025
59336
  return this._rootMark;
@@ -59111,8 +59422,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59111
59422
  this.getLayoutRect = () => {
59112
59423
  var _a, _b;
59113
59424
  return {
59114
- width: (_a = this._layoutRect.width) !== null && _a !== void 0 ? _a : this._region.getLayoutRectExcludeIndent().width,
59115
- height: (_b = this._layoutRect.height) !== null && _b !== void 0 ? _b : this._region.getLayoutRectExcludeIndent().height
59425
+ width: (_a = this._layoutRect.width) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().width,
59426
+ height: (_b = this._layoutRect.height) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height
59116
59427
  };
59117
59428
  };
59118
59429
  this._rootMark = null;
@@ -59242,7 +59553,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59242
59553
  }
59243
59554
  }
59244
59555
  getRawDataStatisticsByField(field, isNumeric) {
59245
- var _a;
59556
+ var _a, _b;
59246
59557
  if (!this._rawStatisticsCache) {
59247
59558
  this._rawStatisticsCache = {};
59248
59559
  }
@@ -59254,9 +59565,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59254
59565
  this._rawStatisticsCache[field] = this._viewDataStatistics.latestData[field];
59255
59566
  }
59256
59567
  else if (this._rawData) {
59257
- this._rawStatisticsCache[field] = dimensionStatisticsOfSimpleData(this._rawData.latestData, [
59258
- { key: field, operations: isNumeric ? ['min', 'max'] : ['values'] }
59259
- ])[field];
59568
+ const fieldInfo = (_b = this._rawData.getFields()) === null || _b === void 0 ? void 0 : _b[field];
59569
+ if (fieldInfo && fieldInfo.lockStatisticsByDomain && fieldInfo.domain) {
59570
+ this._rawStatisticsCache[field] = {};
59571
+ if (isNumeric) {
59572
+ this._rawStatisticsCache[field].min = Math.min(fieldInfo.domain);
59573
+ this._rawStatisticsCache[field].max = Math.max(fieldInfo.domain);
59574
+ }
59575
+ else {
59576
+ this._rawStatisticsCache[field].values = fieldInfo.domain;
59577
+ }
59578
+ }
59579
+ else {
59580
+ this._rawStatisticsCache[field] = dimensionStatisticsOfSimpleData(this._rawData.latestData, [
59581
+ { key: field, operations: isNumeric ? ['min', 'max'] : ['values'] }
59582
+ ])[field];
59583
+ }
59260
59584
  }
59261
59585
  }
59262
59586
  return this._rawStatisticsCache[field];
@@ -59431,10 +59755,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
59431
59755
  parent: (_b = (_a = this._region).getGroupMark) === null || _b === void 0 ? void 0 : _b.call(_a),
59432
59756
  dataView: false
59433
59757
  });
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
59758
  this._rootMark.setZIndex(this.layoutZIndex);
59439
59759
  }
59440
59760
  _initExtensionMark(options) {
@@ -60346,9 +60666,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60346
60666
  }
60347
60667
  }
60348
60668
  _sortDataInAxisDomain() {
60349
- var _a, _b;
60669
+ var _a, _b, _c;
60350
60670
  if ((_b = (_a = this.getViewData()) === null || _a === void 0 ? void 0 : _a.latestData) === null || _b === void 0 ? void 0 : _b.length) {
60351
60671
  sortDataInAxisHelper(this._direction === Direction.horizontal ? this._yAxisHelper : this._xAxisHelper, this._direction === Direction.horizontal ? this._fieldY[0] : this._fieldX[0], this.getViewData().latestData);
60672
+ (_c = this._data) === null || _c === void 0 ? void 0 : _c.updateData(true);
60352
60673
  }
60353
60674
  }
60354
60675
  reInit(spec) {
@@ -60365,7 +60686,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
60365
60686
  class LineLikeSeriesMixin {
60366
60687
  addSamplingCompile() {
60367
60688
  if (this._spec.sampling) {
60368
- const { width, height } = this._region.getLayoutRectExcludeIndent();
60689
+ const { width, height } = this._region.getLayoutRect();
60369
60690
  const samplingTrans = [];
60370
60691
  const fieldsY = this._fieldY;
60371
60692
  const fieldsX = this._fieldX;
@@ -62540,58 +62861,56 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
62540
62861
  this._addMarkLabelSpec(spec, exports.SeriesMarkNameEnum.area);
62541
62862
  }
62542
62863
  }
62543
- }
62544
-
62545
- class AreaSeries extends CartesianSeries {
62546
- constructor() {
62547
- super(...arguments);
62548
- this.type = exports.SeriesTypeEnum.area;
62549
- this.transformerConstructor = AreaSeriesSpecTransformer;
62550
- this._supportStack = true;
62551
- this._sortDataByAxis = false;
62552
- }
62553
- setAttrFromSpec() {
62554
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
62555
- super.setAttrFromSpec();
62556
- const isAreaVisible = ((_a = this._spec.area) === null || _a === void 0 ? void 0 : _a.visible) !== false && ((_c = (_b = this._spec.area) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.visible) !== false;
62557
- const isLineVisible = ((_d = this._spec.line) === null || _d === void 0 ? void 0 : _d.visible) !== false && ((_f = (_e = this._spec.line) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.visible) !== false;
62558
- const areaSpec = (_g = this._spec.area) !== null && _g !== void 0 ? _g : {};
62559
- const lineSpec = (_h = this._spec.line) !== null && _h !== void 0 ? _h : {};
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;
62864
+ _transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
62865
+ var _a, _b, _c, _d, _e;
62866
+ super._transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo);
62867
+ const { area = {}, line = {}, seriesMark = 'area' } = spec;
62868
+ const isAreaVisible = area.visible !== false && ((_a = area.style) === null || _a === void 0 ? void 0 : _a.visible) !== false;
62869
+ const isLineVisible = line.visible !== false && ((_b = line.style) === null || _b === void 0 ? void 0 : _b.visible) !== false;
62870
+ area.interactive = !!(area.interactive || ((_c = line.interactive) !== null && _c !== void 0 ? _c : true));
62871
+ area.support3d = !!(area.support3d || line.support3d);
62872
+ area.zIndex =
62873
+ 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;
62874
+ if (area.style) {
62875
+ delete area.style.stroke;
62876
+ }
62877
+ if (area.state) {
62878
+ Object.keys(area.state).forEach(state => {
62879
+ if ('style' in area.state[state]) {
62880
+ delete area.state[state].style.stroke;
62573
62881
  }
62574
62882
  else {
62575
- delete areaSpec.state[state].stroke;
62883
+ delete area.state[state].stroke;
62576
62884
  }
62577
62885
  });
62578
62886
  }
62579
- let mainSpec = areaSpec;
62580
- let subSpec = lineSpec;
62581
- const seriesMark = (_l = this._spec.seriesMark) !== null && _l !== void 0 ? _l : 'area';
62887
+ let mainSpec = area;
62888
+ let subSpec = line;
62582
62889
  if (seriesMark === 'line' || (isLineVisible && !isAreaVisible)) {
62583
- mainSpec = lineSpec;
62584
- subSpec = areaSpec;
62890
+ mainSpec = line;
62891
+ subSpec = area;
62585
62892
  }
62586
- areaSpec.style = mergeSpec({}, subSpec.style, mainSpec.style);
62587
- areaSpec.state = mergeSpec({}, subSpec.state, mainSpec.state);
62893
+ area.style = mergeSpec({}, subSpec.style, mainSpec.style);
62894
+ area.state = mergeSpec({}, subSpec.state, mainSpec.state);
62588
62895
  if (!isAreaVisible) {
62589
- areaSpec.style.fill = false;
62896
+ area.style.fill = false;
62590
62897
  }
62591
62898
  if (!isLineVisible) {
62592
- areaSpec.style.stroke = false;
62899
+ area.style.stroke = false;
62593
62900
  }
62594
- areaSpec.visible = !(!isAreaVisible && !isLineVisible);
62901
+ area.visible = !(!isAreaVisible && !isLineVisible);
62902
+ spec.area = area;
62903
+ spec.line = line;
62904
+ }
62905
+ }
62906
+
62907
+ class AreaSeries extends CartesianSeries {
62908
+ constructor() {
62909
+ super(...arguments);
62910
+ this.type = exports.SeriesTypeEnum.area;
62911
+ this.transformerConstructor = AreaSeriesSpecTransformer;
62912
+ this._supportStack = true;
62913
+ this._sortDataByAxis = false;
62595
62914
  }
62596
62915
  initMark() {
62597
62916
  var _a, _b, _c, _d, _e;
@@ -63347,7 +63666,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
63347
63666
  compile() {
63348
63667
  super.compile();
63349
63668
  if (this._spec.sampling) {
63350
- const { width, height } = this._region.getLayoutRectExcludeIndent();
63669
+ const { width, height } = this._region.getLayoutRect();
63351
63670
  const samplingTrans = [];
63352
63671
  const fieldsY = this._fieldY;
63353
63672
  const fieldsX = this._fieldX;
@@ -64862,30 +65181,32 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64862
65181
  }
64863
65182
  }
64864
65183
  _scrollEventDispatch(params, regionOrSeries, callback) {
65184
+ let stopBubble = false;
64865
65185
  if (!this._isGestureListener && (!params.event || this._option.disableTriggerEvent)) {
64866
- return;
65186
+ return stopBubble;
64867
65187
  }
64868
65188
  const event = this._isGestureListener ? params : params.event;
64869
65189
  this._zoomableTrigger.parserScrollEvent(event);
64870
65190
  const { scrollX, scrollY, canvasX, canvasY } = event;
64871
65191
  if (isNil$1(scrollX) && isNil$1(scrollY)) {
64872
- return;
65192
+ return stopBubble;
64873
65193
  }
64874
65194
  if (!pointInRect({
64875
65195
  x: canvasX,
64876
65196
  y: canvasY
64877
65197
  }, this._getRegionOrSeriesLayout(regionOrSeries), false)) {
64878
- return;
65198
+ return stopBubble;
64879
65199
  }
64880
65200
  this._clickEnable = false;
64881
65201
  if (callback) {
64882
- callback({ scrollX, scrollY }, event);
65202
+ stopBubble = callback({ scrollX, scrollY }, event);
64883
65203
  }
64884
65204
  this._eventObj.emit('scroll', {
64885
65205
  scrollX,
64886
65206
  scrollY,
64887
65207
  model: this
64888
65208
  });
65209
+ return stopBubble;
64889
65210
  }
64890
65211
  _bindScrollEventAsRegion(eventObj, regionOrSeries, callback, option) {
64891
65212
  var _a, _b;
@@ -64902,7 +65223,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64902
65223
  this._zoomableTrigger.clearScroll();
64903
65224
  }, delayTime));
64904
65225
  event.on(...scrollParams, delayMap[delayType]((params) => {
64905
- this._scrollEventDispatch(params, regionOrSeries, callback);
65226
+ return this._scrollEventDispatch(params, regionOrSeries, callback);
64906
65227
  }, delayTime));
64907
65228
  }
64908
65229
  initScrollEventOfSeries(s, callback, option) {
@@ -65058,6 +65379,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65058
65379
  type: 'mercator'
65059
65380
  };
65060
65381
  this._actualScale = 1;
65382
+ this._initialScale = 1;
65061
65383
  this.effect = {
65062
65384
  scaleUpdate: () => {
65063
65385
  this.coordinateHelper();
@@ -65139,6 +65461,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65139
65461
  this._projectionSpec.zoom = this._spec.zoomLimit.min;
65140
65462
  }
65141
65463
  this._actualScale = (_c = this._projectionSpec.zoom) !== null && _c !== void 0 ? _c : 1;
65464
+ this._initialScale = this._actualScale;
65142
65465
  this._longitudeField = this._spec.longitudeField;
65143
65466
  this._latitudeField = this._spec.latitudeField;
65144
65467
  }
@@ -65244,8 +65567,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65244
65567
  });
65245
65568
  }
65246
65569
  onLayoutEnd(ctx) {
65247
- this.setLayoutRect(this._regions[0].getLayoutRectExcludeIndent());
65248
- this.setLayoutStartPosition(this._regions[0].getLayoutPositionExcludeIndent());
65570
+ this.setLayoutRect(this._regions[0].getLayoutRect());
65571
+ this.setLayoutStartPosition(this._regions[0].getLayoutStartPoint());
65249
65572
  const { width, height } = this.getLayoutRect();
65250
65573
  const { translate, scale, center } = this.evaluateProjection([0, 0], [width, height]);
65251
65574
  translate && this._projection.translate(translate);
@@ -65265,7 +65588,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65265
65588
  }
65266
65589
  }
65267
65590
  });
65268
- this._actualScale = 1;
65591
+ this._actualScale = this._initialScale;
65269
65592
  super.onLayoutEnd(ctx);
65270
65593
  }
65271
65594
  onRender(ctx) {
@@ -65324,11 +65647,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
65324
65647
  return this._projection.invert(point);
65325
65648
  }
65326
65649
  evaluateProjection(start, size) {
65327
- var _a, _b;
65650
+ var _a;
65328
65651
  const evaluated = this._projection.evaluate(start, size, this.collectFeatures());
65329
65652
  let translate = evaluated.translate();
65330
- const scale = evaluated.scale() * ((_a = this._projectionSpec.zoom) !== null && _a !== void 0 ? _a : 1);
65331
- const center = (_b = this._projectionSpec.center) !== null && _b !== void 0 ? _b : evaluated.invert([size[0] / 2, size[1] / 2]);
65653
+ const scale = evaluated.scale() * this._initialScale;
65654
+ const center = (_a = this._projectionSpec.center) !== null && _a !== void 0 ? _a : evaluated.invert([size[0] / 2, size[1] / 2]);
65332
65655
  center && (translate = [size[0] / 2, size[1] / 2]);
65333
65656
  return { translate, scale, center };
65334
65657
  }
@@ -67335,7 +67658,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67335
67658
  this._trigger.setStateKeys([...this._angleField, ...this._radiusField]);
67336
67659
  }
67337
67660
  _computeLayoutRadius() {
67338
- const { width, height } = this._region.getLayoutRectExcludeIndent();
67661
+ const { width, height } = this._region.getLayoutRect();
67339
67662
  return Math.min(width / 2, height / 2);
67340
67663
  }
67341
67664
  fillData() {
@@ -67665,16 +67988,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67665
67988
  get center() {
67666
67989
  var _a, _b, _c, _d;
67667
67990
  return {
67668
- x: (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX) !== null && _b !== void 0 ? _b : this._region.getLayoutRectExcludeIndent().width / 2,
67669
- y: (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.centerY) !== null && _d !== void 0 ? _d : this._region.getLayoutRectExcludeIndent().height / 2
67991
+ x: (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2,
67992
+ y: (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.centerY) !== null && _d !== void 0 ? _d : this._region.getLayoutRect().height / 2
67670
67993
  };
67671
67994
  }
67672
67995
  _buildMarkAttributeContext() {
67673
67996
  super._buildMarkAttributeContext();
67674
67997
  this._markAttributeContext.getCenter = () => {
67675
67998
  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.getLayoutRectExcludeIndent().width / 2; },
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.getLayoutRectExcludeIndent().height / 2; }
67999
+ 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; },
68000
+ 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
68001
  };
67679
68002
  };
67680
68003
  this._markAttributeContext.startAngleScale = (datum) => this.startAngleScale(datum);
@@ -67748,8 +68071,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67748
68071
  const pieMark = this._pieMark;
67749
68072
  if (pieMark) {
67750
68073
  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.getLayoutRectExcludeIndent().width / 2; },
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.getLayoutRectExcludeIndent().height / 2; },
68074
+ 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; },
68075
+ 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
68076
  fill: this.getColorAttribute(),
67754
68077
  outerRadius: isSpecValueWithScale(this._outerRadius)
67755
68078
  ? this._outerRadius
@@ -67835,7 +68158,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
67835
68158
  return style;
67836
68159
  }
67837
68160
  computeLayoutRadius() {
67838
- const { width, height } = this._region.getLayoutRectExcludeIndent();
68161
+ const { width, height } = this._region.getLayoutRect();
67839
68162
  return Math.min(width / 2, height / 2);
67840
68163
  }
67841
68164
  computeCenter(datum) {
@@ -68030,8 +68353,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
68030
68353
  params3d.anchor3d = (datum) => {
68031
68354
  var _a, _b, _c, _d;
68032
68355
  const anchor = [
68033
- (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRectExcludeIndent().width / 2,
68034
- (_d = (_c = this._center) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : this._region.getLayoutRectExcludeIndent().height / 2
68356
+ (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2,
68357
+ (_d = (_c = this._center) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : this._region.getLayoutRect().height / 2
68035
68358
  ];
68036
68359
  return anchor;
68037
68360
  };
@@ -68434,7 +68757,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
68434
68757
  disappear: preset === 'clipIn' ? undefined : radarPresetAnimation(params, preset, 'out'),
68435
68758
  update: [
68436
68759
  {
68437
- options: { excludeChannels: 'points' }
68760
+ options: { excludeChannels: ['points', 'defined'] }
68438
68761
  },
68439
68762
  {
68440
68763
  channel: ['points'],
@@ -70294,7 +70617,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
70294
70617
  compile() {
70295
70618
  var _a, _b;
70296
70619
  super.compile();
70297
- const { width, height } = this._region.getLayoutRectExcludeIndent();
70620
+ const { width, height } = this._region.getLayoutRect();
70298
70621
  if (!isValidNumber$1(width) || !isValidNumber$1(height) || !(height > 0 && width > 0)) {
70299
70622
  return;
70300
70623
  }
@@ -70351,7 +70674,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
70351
70674
  }
70352
70675
  _wordCloudTransformOption() {
70353
70676
  var _a, _b, _c, _d, _e;
70354
- const { width, height } = this._region.getLayoutRectExcludeIndent();
70677
+ const { width, height } = this._region.getLayoutRect();
70355
70678
  const wordStyleSpec = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
70356
70679
  return {
70357
70680
  layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,
@@ -70381,7 +70704,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
70381
70704
  }
70382
70705
  _wordCloudShapeTransformOption() {
70383
70706
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
70384
- const { width, height } = this._region.getLayoutRectExcludeIndent();
70707
+ const { width, height } = this._region.getLayoutRect();
70385
70708
  const wordStyleSpec = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
70386
70709
  const wordCloudShapeConfig = (_c = this._wordCloudShapeConfig) !== null && _c !== void 0 ? _c : {};
70387
70710
  const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
@@ -74652,11 +74975,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
74652
74975
  _computeRadius(radius) {
74653
74976
  if (isArray$1(radius)) {
74654
74977
  return radius.map(r => {
74655
- const { width, height } = this.getRegion().getLayoutRectExcludeIndent();
74978
+ const { width, height } = this.getRegion().getLayoutRect();
74656
74979
  return Math.min(width / 2, height / 2) * r;
74657
74980
  });
74658
74981
  }
74659
- const { width, height } = this.getRegion().getLayoutRectExcludeIndent();
74982
+ const { width, height } = this.getRegion().getLayoutRect();
74660
74983
  return Math.min(width / 2, height / 2) * radius;
74661
74984
  }
74662
74985
  _computeLevel() {
@@ -76830,7 +77153,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
76830
77153
  }
76831
77154
  onLayoutEnd(ctx) {
76832
77155
  super.onLayoutEnd(ctx);
76833
- this._viewBox.set(0, 0, this._region.getLayoutRectExcludeIndent().width, this._region.getLayoutRectExcludeIndent().height);
77156
+ this._viewBox.set(0, 0, this._region.getLayoutRect().width, this._region.getLayoutRect().height);
76834
77157
  this.getViewData().reRunAllTransform();
76835
77158
  this._nodesSeriesData.updateData();
76836
77159
  this._linksSeriesData.updateData();
@@ -78283,7 +78606,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
78283
78606
  }
78284
78607
  onLayoutEnd(ctx) {
78285
78608
  super.onLayoutEnd(ctx);
78286
- this._viewBox.set(0, 0, this._region.getLayoutRectExcludeIndent().width, this._region.getLayoutRectExcludeIndent().height);
78609
+ this._viewBox.set(0, 0, this._region.getLayoutRect().width, this._region.getLayoutRect().height);
78287
78610
  this._rawData.reRunAllTransform();
78288
78611
  this.getViewData().reRunAllTransform();
78289
78612
  }
@@ -80396,9 +80719,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80396
80719
  this.updateScaleDomain();
80397
80720
  });
80398
80721
  }
80722
+ eachSeries(this._regions, s => {
80723
+ s.event.on(exports.ChartEvent.rawDataUpdate, { filter: ({ model }) => (model === null || model === void 0 ? void 0 : model.id) === s.id }, () => {
80724
+ this._clearRawDomain();
80725
+ });
80726
+ }, {
80727
+ userId: this._seriesUserId,
80728
+ specIndex: this._seriesIndex
80729
+ });
80399
80730
  }
80400
80731
  updateScaleDomain() {
80401
80732
  }
80733
+ _clearRawDomain() {
80734
+ }
80402
80735
  computeData(updateType) {
80403
80736
  if (this._tickData && (updateType === 'force' || !isEqual$1(this._scale.range(), [0, 1]))) {
80404
80737
  this._tickData.getDataView().reRunAllTransform();
@@ -80724,11 +81057,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80724
81057
  const isX = isXAxis(this.getOrient());
80725
81058
  const isValidAxis = (item) => {
80726
81059
  var _a;
80727
- return ((isX ? !isXAxis(item.orient) : isXAxis(item.orient)) &&
81060
+ return (isX ? !isXAxis(item.getOrient()) : isXAxis(item.getOrient())) &&
80728
81061
  isContinuous(item.getScale().type) &&
80729
- ((_a = item
81062
+ item.getTickData()
81063
+ ? (_a = item
80730
81064
  .getTickData()
80731
- .getLatestData()) === null || _a === void 0 ? void 0 : _a.find((d) => d.value === 0)));
81065
+ .getLatestData()) === null || _a === void 0 ? void 0 : _a.find((d) => d.value === 0)
81066
+ : item.getScale().ticks().includes(0);
80732
81067
  };
80733
81068
  const relativeAxes = axesComponents.filter(item => isValidAxis(item));
80734
81069
  if (relativeAxes.length) {
@@ -80996,7 +81331,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
80996
81331
  });
80997
81332
  return scales;
80998
81333
  }
80999
- collectData(depth) {
81334
+ collectData(depth, rawData) {
81000
81335
  const data = [];
81001
81336
  eachSeries(this._regions, s => {
81002
81337
  var _a, _b, _c;
@@ -81025,8 +81360,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81025
81360
  if (field) {
81026
81361
  field.forEach(f => {
81027
81362
  var _a;
81028
- if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
81029
- data.push(seriesData.latestData[f]);
81363
+ if (rawData) {
81364
+ data.push(s.getRawDataStatisticsByField(f, false));
81365
+ }
81366
+ else {
81367
+ if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
81368
+ data.push(seriesData.latestData[f]);
81369
+ }
81030
81370
  }
81031
81371
  });
81032
81372
  }
@@ -81133,12 +81473,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81133
81473
  if (!ignoreGrid) {
81134
81474
  const regions = this.getRegions();
81135
81475
  let { x: minX, y: minY } = regions[0].getLayoutStartPoint();
81136
- let maxX = minX + regions[0].getLayoutRectExcludeIndent().width;
81137
- let maxY = minY + regions[0].getLayoutRectExcludeIndent().height;
81476
+ let maxX = minX + regions[0].getLayoutRect().width;
81477
+ let maxY = minY + regions[0].getLayoutRect().height;
81138
81478
  for (let index = 1; index < regions.length; index++) {
81139
81479
  const region = regions[index];
81140
- const { x, y } = region.getLayoutPositionExcludeIndent();
81141
- const { width, height } = region.getLayoutRectExcludeIndent();
81480
+ const { x, y } = region.getLayoutStartPoint();
81481
+ const { width, height } = region.getLayoutRect();
81142
81482
  minX = Math.min(minX, x);
81143
81483
  maxX = Math.max(maxX, width + x);
81144
81484
  minY = Math.min(minY, y);
@@ -81352,15 +81692,34 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81352
81692
  this.setScaleNice();
81353
81693
  }
81354
81694
  setLinearScaleNice() {
81355
- var _a, _b, _c, _d, _e;
81356
- let tickCount = (_d = (_b = (_a = this._spec.tick) === null || _a === void 0 ? void 0 : _a.forceTickCount) !== null && _b !== void 0 ? _b : (_c = this._spec.tick) === null || _c === void 0 ? void 0 : _c.tickCount) !== null && _d !== void 0 ? _d : DEFAULT_TICK_COUNT;
81357
- if (!isValidNumber$1(tickCount)) {
81695
+ var _a;
81696
+ let tickCount = DEFAULT_TICK_COUNT;
81697
+ const tick = this._spec.tick || {};
81698
+ if (isValidNumber$1(tick.forceTickCount)) {
81699
+ tickCount = tick.forceTickCount;
81700
+ }
81701
+ else if (isFunction$1(tick.tickCount)) {
81702
+ const range = this._scale.range();
81703
+ let rangeSize = Math.abs(range[range.length - 1] - range[0]);
81704
+ if (rangeSize === 1 && this._option) {
81705
+ const isX = isXAxis(this._orient);
81706
+ rangeSize = isX ? this._option.getChartViewRect().width : this._option.getChartViewRect().height;
81707
+ }
81708
+ tickCount = tick.tickCount({
81709
+ rangeSize,
81710
+ labelStyle: this._spec.label && this._spec.label.style
81711
+ });
81712
+ }
81713
+ else if (isValidNumber$1(tick.tickCount)) {
81714
+ tickCount = tick.tickCount;
81715
+ }
81716
+ else {
81358
81717
  tickCount = DEFAULT_TICK_COUNT;
81359
81718
  }
81360
81719
  if (this._spec.niceType === 'accurateFirst') {
81361
81720
  tickCount = Math.max(DEFAULT_TICK_COUNT, tickCount);
81362
81721
  }
81363
- const { min, max } = (_e = this._domain) !== null && _e !== void 0 ? _e : {};
81722
+ const { min, max } = (_a = this._domain) !== null && _a !== void 0 ? _a : {};
81364
81723
  if (isNil$1(min) && isNil$1(max)) {
81365
81724
  this._nice && this._scale.nice(tickCount);
81366
81725
  }
@@ -81581,6 +81940,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81581
81940
  };
81582
81941
 
81583
81942
  class BandAxisMixin {
81943
+ constructor() {
81944
+ this._rawDomainIndex = [];
81945
+ }
81584
81946
  dataToPosition(values, cfg = {}) {
81585
81947
  var _a, _b;
81586
81948
  if (values.length === 0 || this._scales.length === 0) {
@@ -81645,9 +82007,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81645
82007
  return Array.from(tempSet);
81646
82008
  }
81647
82009
  updateScaleDomain() {
82010
+ var _a;
81648
82011
  if (!this.isSeriesDataEnable()) {
81649
82012
  return;
81650
82013
  }
82014
+ if (!((_a = this._rawDomainIndex) === null || _a === void 0 ? void 0 : _a.length) && this._scales.length) {
82015
+ this._updateRawDomain();
82016
+ }
81651
82017
  const userDomain = this._spec.domain;
81652
82018
  for (let i = 0; i < this._scales.length; i++) {
81653
82019
  if (userDomain && userDomain.length && i === 0) {
@@ -81656,13 +82022,31 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81656
82022
  else {
81657
82023
  const data = this.collectData(i);
81658
82024
  const domain = this.computeDomain(data);
81659
- this._scales[i].domain(domain);
82025
+ this._scales[i].domain(domain.sort((a, b) => this._rawDomainIndex[i][a] - this._rawDomainIndex[i][b]));
81660
82026
  }
81661
82027
  }
81662
82028
  this.transformScaleDomain();
81663
82029
  this.event.emit(exports.ChartEvent.scaleDomainUpdate, { model: this });
81664
82030
  this.event.emit(exports.ChartEvent.scaleUpdate, { model: this, value: 'domain' });
81665
82031
  }
82032
+ _updateRawDomain() {
82033
+ this._rawDomainIndex = [];
82034
+ const userDomain = this._spec.domain;
82035
+ for (let i = 0; i < this._scales.length; i++) {
82036
+ if (userDomain && userDomain.length && i === 0) {
82037
+ this._scales[i].domain(userDomain);
82038
+ }
82039
+ else {
82040
+ const data = this.collectData(i, true);
82041
+ const domain = this.computeDomain(data);
82042
+ this._rawDomainIndex[i] = {};
82043
+ domain.forEach((d, _i) => (this._rawDomainIndex[i][d] = _i));
82044
+ }
82045
+ }
82046
+ }
82047
+ _clearRawDomain() {
82048
+ this._rawDomainIndex = [];
82049
+ }
81666
82050
  }
81667
82051
 
81668
82052
  class CartesianBandAxis extends CartesianAxis {
@@ -81930,7 +82314,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
81930
82314
  this._transformLayoutPosition = (pos) => {
81931
82315
  var _a;
81932
82316
  const region = (_a = this.getRegions()) === null || _a === void 0 ? void 0 : _a[0];
81933
- return region ? region.getLayoutPositionExcludeIndent() : pos;
82317
+ return region ? region.getLayoutStartPoint() : pos;
81934
82318
  };
81935
82319
  }
81936
82320
  get center() {
@@ -82079,7 +82463,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82079
82463
  this._scale.range(newRange);
82080
82464
  return true;
82081
82465
  }
82082
- collectData(depth) {
82466
+ collectData(depth, rawData) {
82083
82467
  const data = [];
82084
82468
  eachSeries(this._regions, s => {
82085
82469
  var _a, _b, _c;
@@ -82099,8 +82483,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82099
82483
  if (field) {
82100
82484
  field.forEach(f => {
82101
82485
  var _a;
82102
- if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
82103
- data.push(seriesData.latestData[f]);
82486
+ if (rawData) {
82487
+ data.push(s.getRawDataStatisticsByField(f, false));
82488
+ }
82489
+ else {
82490
+ if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
82491
+ data.push(seriesData.latestData[f]);
82492
+ }
82104
82493
  }
82105
82494
  });
82106
82495
  }
@@ -82300,7 +82689,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
82300
82689
  return (Math.min(width, height) / 2) * innerRadius;
82301
82690
  }
82302
82691
  getRefLayoutRect() {
82303
- return this.getRegions()[0].getLayoutRectExcludeIndent();
82692
+ return this.getRegions()[0].getLayoutRect();
82304
82693
  }
82305
82694
  getRefSeriesRadius() {
82306
82695
  let outerRadius = POLAR_DEFAULT_RADIUS;
@@ -85575,8 +85964,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
85575
85964
  }
85576
85965
  });
85577
85966
  const activeType = (_a = opt.activeType) !== null && _a !== void 0 ? _a : (markInfoList.length > 1 ? 'dimension' : 'mark');
85578
- const regionPos = region.getLayoutPositionExcludeIndent();
85579
- const regionRect = region.getLayoutRectExcludeIndent();
85967
+ const regionPos = region.getLayoutStartPoint();
85968
+ const regionRect = region.getLayoutRect();
85580
85969
  const container = componentOptions.globalInstance.getContainer();
85581
85970
  const containerPos = Object.assign({ x: 0, y: 0 }, (container ? getElementAbsolutePosition(container) : {}));
85582
85971
  const bound = (pos) => ({
@@ -86281,6 +86670,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86281
86670
  this.trigger = 'hover';
86282
86671
  this.triggerOff = 'hover';
86283
86672
  this._handleEvent = throttle((params) => {
86673
+ if (!this._option) {
86674
+ return;
86675
+ }
86284
86676
  const { event } = params;
86285
86677
  const layer = this._option.getCompiler().getStage().getLayer(undefined);
86286
86678
  const point = { x: event.viewX, y: event.viewY };
@@ -86414,11 +86806,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86414
86806
  }
86415
86807
  const regions = axis.getRegions();
86416
86808
  regions.forEach(r => {
86417
- const { x: regionStartX, y: regionStartY } = r.getLayoutPositionExcludeIndent();
86809
+ const { x: regionStartX, y: regionStartY } = r.getLayoutStartPoint();
86418
86810
  x1 = Math.min(x1, regionStartX - sx);
86419
86811
  y1 = Math.min(y1, regionStartY - sy);
86420
- x2 = Math.max(x2, regionStartX + r.getLayoutRectExcludeIndent().width - sx);
86421
- y2 = Math.max(y2, regionStartY + r.getLayoutRectExcludeIndent().height - sy);
86812
+ x2 = Math.max(x2, regionStartX + r.getLayoutRect().width - sx);
86813
+ y2 = Math.max(y2, regionStartY + r.getLayoutRect().height - sy);
86422
86814
  });
86423
86815
  map.set(idx, { x1, y1, x2, y2, axis: axis });
86424
86816
  });
@@ -86428,8 +86820,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86428
86820
  }
86429
86821
  onLayoutEnd(ctx) {
86430
86822
  const region = this._regions[0];
86431
- this.setLayoutRect(region.getLayoutRectExcludeIndent());
86432
- this.setLayoutStartPosition(region.getLayoutPositionExcludeIndent());
86823
+ this.setLayoutRect(region.getLayoutRect());
86824
+ this.setLayoutStartPosition(region.getLayoutStartPoint());
86433
86825
  super.onLayoutEnd(ctx);
86434
86826
  }
86435
86827
  onRender(ctx) {
@@ -86720,6 +87112,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86720
87112
  let xCrossHairInfo = {
86721
87113
  height: 0,
86722
87114
  leftPos: 0,
87115
+ rightPos: 0,
86723
87116
  topPos: 0,
86724
87117
  x: 0,
86725
87118
  bottom: { visible: false, text: '', dx: 0, dy: 0 },
@@ -86731,6 +87124,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86731
87124
  width: 0,
86732
87125
  leftPos: 0,
86733
87126
  topPos: 0,
87127
+ bottomPos: 0,
86734
87128
  y: 0,
86735
87129
  left: { visible: false, text: '', dx: 0, dy: 0 },
86736
87130
  right: { visible: false, text: '', dx: 0, dy: 0 },
@@ -86767,7 +87161,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86767
87161
  getRegionArea(xRegion, this._currValueX);
86768
87162
  getRegionArea(yRegion, this._currValueY);
86769
87163
  let indexWidth;
87164
+ let offsetWidth = 0;
86770
87165
  let valueHeight;
87166
+ let offsetHeight = 0;
86771
87167
  if (this._xHair) {
86772
87168
  this._currValueX.forEach(({ axis, v }) => {
86773
87169
  var _a;
@@ -86775,6 +87171,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86775
87171
  const xScale = axis.getScale();
86776
87172
  if (isDiscrete(xScale.type)) {
86777
87173
  indexWidth = xScale.bandwidth();
87174
+ if (indexWidth === 0 && xScale.step) {
87175
+ offsetWidth = xScale.step();
87176
+ }
86778
87177
  }
86779
87178
  else if (isContinuous(xScale.type)) {
86780
87179
  const fieldX = series.fieldX[0];
@@ -86816,6 +87215,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86816
87215
  const yScale = axis.getScale();
86817
87216
  if (isDiscrete(yScale.type)) {
86818
87217
  valueHeight = yScale.bandwidth();
87218
+ if (valueHeight === 0 && yScale.step) {
87219
+ offsetHeight = yScale.step();
87220
+ }
86819
87221
  }
86820
87222
  else if (isContinuous(yScale.type)) {
86821
87223
  const fieldY = series.fieldY[0];
@@ -86855,6 +87257,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86855
87257
  }
86856
87258
  else {
86857
87259
  xCrossHairInfo.leftPos = xRegion.x1;
87260
+ xCrossHairInfo.rightPos = xRegion.x2;
86858
87261
  xCrossHairInfo.topPos = xRegion.y1;
86859
87262
  xCrossHairInfo.height = xRegion.y2 - xRegion.y1;
86860
87263
  xCrossHairInfo.x = x + this.getLayoutStartPoint().x;
@@ -86870,6 +87273,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86870
87273
  else {
86871
87274
  yCrossHairInfo.leftPos = yRegion.x1;
86872
87275
  yCrossHairInfo.topPos = yRegion.y1;
87276
+ yCrossHairInfo.bottomPos = yRegion.y2;
86873
87277
  yCrossHairInfo.width = yRegion.x2 - yRegion.x1;
86874
87278
  yCrossHairInfo.y = y + this.getLayoutStartPoint().y;
86875
87279
  if ((_d = (_c = this._yHair) === null || _c === void 0 ? void 0 : _c.label) === null || _d === void 0 ? void 0 : _d.formatMethod) {
@@ -86879,15 +87283,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86879
87283
  }
86880
87284
  }
86881
87285
  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);
87286
+ LayoutType.HORIZONTAL && this._layoutHorizontal(yCrossHairInfo, valueHeight !== null && valueHeight !== void 0 ? valueHeight : 0, offsetHeight);
87287
+ LayoutType.VERTICAL && this._layoutVertical(xCrossHairInfo, indexWidth !== null && indexWidth !== void 0 ? indexWidth : 0, offsetWidth);
86884
87288
  }
86885
87289
  if (this.enableRemain) {
86886
87290
  this._cacheXCrossHairInfo = Object.assign(Object.assign({}, xCrossHairInfo), { _isCache: true });
86887
87291
  this._cacheYCrossHairInfo = Object.assign(Object.assign({}, yCrossHairInfo), { _isCache: true });
86888
87292
  }
86889
87293
  }
86890
- _layoutVertical(crosshairInfo, bandWidth) {
87294
+ _layoutVertical(crosshairInfo, bandWidth, offsetWidth) {
86891
87295
  var _a, _b;
86892
87296
  if ((crosshairInfo._isCache && this.enableRemain) || !this._xHair) {
86893
87297
  return;
@@ -86904,9 +87308,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86904
87308
  }
86905
87309
  else if (type === 'rect') {
86906
87310
  const extend = this._getRectSize(this._xHair, bandWidth, crosshairInfo.axis);
87311
+ const { leftPos, rightPos } = crosshairInfo;
86907
87312
  positionAttribute = {
86908
- start: { x: x - extend / 2, y: topPos },
86909
- end: { x: x + bandWidth + extend / 2, y: topPos + height }
87313
+ start: { x: Math.max(x - extend / 2 - offsetWidth / 2, leftPos), y: topPos },
87314
+ end: { x: Math.min(x + bandWidth + extend / 2 + offsetWidth / 2, rightPos), y: topPos + height }
86910
87315
  };
86911
87316
  }
86912
87317
  this._updateCrosshair('x', type, positionAttribute);
@@ -86932,7 +87337,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86932
87337
  }
86933
87338
  }
86934
87339
  }
86935
- _layoutHorizontal(crosshairInfo, bandHeight) {
87340
+ _layoutHorizontal(crosshairInfo, bandHeight, offsetHeight) {
86936
87341
  var _a, _b;
86937
87342
  if ((crosshairInfo._isCache && this.enableRemain) || !this._yHair) {
86938
87343
  return;
@@ -86949,9 +87354,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
86949
87354
  }
86950
87355
  else if (type === 'rect') {
86951
87356
  const extend = this._getRectSize(this._yHair, bandHeight, crosshairInfo.axis);
87357
+ const { topPos, bottomPos } = crosshairInfo;
86952
87358
  positionAttribute = {
86953
- start: { x: leftPos, y: y - extend / 2 },
86954
- end: { x: leftPos + width, y: y + bandHeight + extend / 2 }
87359
+ start: { x: leftPos, y: Math.max(y - extend / 2 - offsetHeight / 2, topPos) },
87360
+ end: { x: leftPos + width, y: Math.min(y + bandHeight + extend / 2 + offsetHeight / 2, bottomPos) }
86955
87361
  };
86956
87362
  }
86957
87363
  this._updateCrosshair('y', type, positionAttribute);
@@ -87616,7 +88022,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87616
88022
  }
87617
88023
  const { zoomDelta, zoomX, zoomY } = params;
87618
88024
  const { x, y } = this._regions[0].getLayoutStartPoint();
87619
- const { width, height } = this._regions[0].getLayoutRectExcludeIndent();
88025
+ const { width, height } = this._regions[0].getLayoutRect();
87620
88026
  const delta = Math.abs(this._start - this._end);
87621
88027
  const zoomRate = (_b = (_a = this._spec.roamZoom) === null || _a === void 0 ? void 0 : _a.rate) !== null && _b !== void 0 ? _b : 1;
87622
88028
  if (delta >= 1 && zoomDelta < 1) {
@@ -87642,14 +88048,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
87642
88048
  this._handleChartScroll = (params, e) => {
87643
88049
  var _a;
87644
88050
  if (!this._activeRoam) {
87645
- return;
88051
+ return false;
87646
88052
  }
87647
88053
  const { scrollX, scrollY } = params;
87648
88054
  let value = this._isHorizontal ? scrollX : scrollY;
88055
+ const active = this._isHorizontal ? abs$1(scrollX / scrollY) >= 0.5 : abs$1(scrollY / scrollX) >= 0.5;
87649
88056
  if (!this._scrollAttr.reverse) {
87650
88057
  value = -value;
87651
88058
  }
87652
- this._handleChartMove(value, (_a = this._scrollAttr.rate) !== null && _a !== void 0 ? _a : 1);
88059
+ if (active) {
88060
+ this._handleChartMove(value, (_a = this._scrollAttr.rate) !== null && _a !== void 0 ? _a : 1);
88061
+ }
88062
+ return active;
87653
88063
  };
87654
88064
  this._handleChartDrag = (delta, e) => {
87655
88065
  var _a;
@@ -88819,8 +89229,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88819
89229
  }
88820
89230
  _getIndicatorAttrs() {
88821
89231
  const region = this._regions[0];
88822
- const { width, height } = region.getLayoutRectExcludeIndent();
88823
- const { x, y } = region.getLayoutPositionExcludeIndent();
89232
+ const { width, height } = region.getLayoutRect();
89233
+ const { x, y } = region.getLayoutStartPoint();
88824
89234
  const contentComponentSpec = [];
88825
89235
  array(this._spec.content).forEach((eachItem) => {
88826
89236
  const contentSpec = mergeSpec({}, this._theme.content, eachItem);
@@ -88885,7 +89295,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
88885
89295
  }
88886
89296
  _computeLayoutRadius() {
88887
89297
  const region = this._regions[0];
88888
- const { width, height } = region.getLayoutRectExcludeIndent();
89298
+ const { width, height } = region.getLayoutRect();
88889
89299
  return Math.min(width / 2, height / 2);
88890
89300
  }
88891
89301
  isRelativeModel(model) {
@@ -89040,13 +89450,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89040
89450
  }
89041
89451
  function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
89042
89452
  const regionStart = startRelativeSeries.getRegion();
89043
- const regionStartLayoutStartPoint = regionStart.getLayoutPositionExcludeIndent();
89453
+ const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
89044
89454
  const regionEnd = endRelativeSeries.getRegion();
89045
- const regionEndLayoutStartPoint = regionEnd.getLayoutPositionExcludeIndent();
89455
+ const regionEndLayoutStartPoint = regionEnd.getLayoutStartPoint();
89046
89456
  const regionWidth = Math.abs(Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x) -
89047
- Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRectExcludeIndent().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRectExcludeIndent().width));
89457
+ Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width));
89048
89458
  const regionHeight = Math.abs(Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y) -
89049
- Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRectExcludeIndent().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRectExcludeIndent().height));
89459
+ Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height));
89050
89460
  const refSeries = {
89051
89461
  relativeSeries,
89052
89462
  startRelativeSeries,
@@ -89066,7 +89476,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89066
89476
  }
89067
89477
  else if (isValid$1(datum.x)) {
89068
89478
  const x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
89069
- const y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRectExcludeIndent().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRectExcludeIndent().height);
89479
+ const y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
89070
89480
  const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
89071
89481
  lines.push([
89072
89482
  {
@@ -89082,7 +89492,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89082
89492
  else if (isValid$1(datum.y)) {
89083
89493
  const x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
89084
89494
  const y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
89085
- const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRectExcludeIndent().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRectExcludeIndent().width);
89495
+ const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
89086
89496
  lines.push([
89087
89497
  {
89088
89498
  x: x,
@@ -89105,8 +89515,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89105
89515
  var _a, _b, _c, _d;
89106
89516
  const refRelativeSeries = (datum === null || datum === void 0 ? void 0 : datum.getRefRelativeSeries) ? datum.getRefRelativeSeries() : relativeSeries;
89107
89517
  const regionStart = refRelativeSeries.getRegion();
89108
- const regionStartLayoutStartPoint = regionStart.getLayoutPositionExcludeIndent();
89109
- const { width: regionWidth, height: regionHeight } = regionStart.getLayoutRectExcludeIndent();
89518
+ const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
89519
+ const { width: regionWidth, height: regionHeight } = regionStart.getLayoutRect();
89110
89520
  let offsetX = 0;
89111
89521
  let offsetY = 0;
89112
89522
  if (coordinatesOffset) {
@@ -89142,8 +89552,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89142
89552
  function positionLayout(positions, series, regionRelative) {
89143
89553
  if (regionRelative) {
89144
89554
  const region = series.getRegion();
89145
- const { x: regionStartX, y: regionStartY } = region.getLayoutPositionExcludeIndent();
89146
- const { width: regionWidth, height: regionHeight } = region.getLayoutRectExcludeIndent();
89555
+ const { x: regionStartX, y: regionStartY } = region.getLayoutStartPoint();
89556
+ const { width: regionWidth, height: regionHeight } = region.getLayoutRect();
89147
89557
  return positions.map(position => {
89148
89558
  let { x, y } = position;
89149
89559
  if (isPercent(x)) {
@@ -89181,8 +89591,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89181
89591
  let minY = Infinity;
89182
89592
  let maxY = -Infinity;
89183
89593
  regions.forEach((region) => {
89184
- const regionPos = region.getLayoutPositionExcludeIndent();
89185
- const regionRect = region.getLayoutRectExcludeIndent();
89594
+ const regionPos = region.getLayoutStartPoint();
89595
+ const regionRect = region.getLayoutRect();
89186
89596
  if (regionPos.x < minX) {
89187
89597
  minX = regionPos.x;
89188
89598
  }
@@ -89589,17 +89999,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
89589
89999
  let expandDistanceValue;
89590
90000
  if (isPercent(expandDistance)) {
89591
90001
  const regionStart = startRelativeSeries.getRegion();
89592
- const regionStartLayoutStartPoint = regionStart.getLayoutPositionExcludeIndent();
90002
+ const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
89593
90003
  const regionEnd = endRelativeSeries.getRegion();
89594
- const regionEndLayoutStartPoint = regionEnd.getLayoutPositionExcludeIndent();
90004
+ const regionEndLayoutStartPoint = regionEnd.getLayoutStartPoint();
89595
90005
  if (connectDirection === 'bottom' || connectDirection === 'top') {
89596
90006
  const regionHeight = Math.abs(Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y) -
89597
- Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRectExcludeIndent().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRectExcludeIndent().height));
90007
+ Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height));
89598
90008
  expandDistanceValue = (Number(expandDistance.substring(0, expandDistance.length - 1)) * regionHeight) / 100;
89599
90009
  }
89600
90010
  else {
89601
90011
  const regionWidth = Math.abs(Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x) -
89602
- Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRectExcludeIndent().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRectExcludeIndent().width));
90012
+ Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width));
89603
90013
  expandDistanceValue = (Number(expandDistance.substring(0, expandDistance.length - 1)) * regionWidth) / 100;
89604
90014
  }
89605
90015
  }
@@ -90111,6 +90521,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
90111
90521
  if (!isEqual$1(attrs, this._cacheAttrs)) {
90112
90522
  this._cacheAttrs = attrs;
90113
90523
  this._playerComponent.setAttributes(attrs);
90524
+ this._playerComponent._initAttributes();
90525
+ this._playerComponent.render();
90114
90526
  }
90115
90527
  }
90116
90528
  else {
@@ -90933,8 +91345,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
90933
91345
  .filter(cmp => cmp.type === 'totalLabel')
90934
91346
  .map(cmp => cmp.getMarks()[0].getProductId())
90935
91347
  },
90936
- x: labelInfos[0].series.getRegion().layout.indent.left,
90937
- y: labelInfos[0].series.getRegion().layout.indent.top
91348
+ x: 0,
91349
+ y: 0
90938
91350
  }, defaultLabelConfig(rule, labelInfo), Object.assign(Object.assign(Object.assign({}, pickWithout(labelSpec, ['position', 'style', 'state', 'type'])), interactive), { centerOffset }));
90939
91351
  if (rule === 'line' || rule === 'area') {
90940
91352
  spec.type = rule;
@@ -90951,7 +91363,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
90951
91363
  : textAttribute(labelInfos[params.labelIndex], datum, labelSpec.formatMethod, labelSpec.formatter);
90952
91364
  }
90953
91365
  })
90954
- .size(() => labelInfos[0].series.getRegion().getLayoutRectExcludeIndent());
91366
+ .size(() => labelInfos[0].series.getRegion().getLayoutRect());
90955
91367
  }
90956
91368
  compileMarks() {
90957
91369
  this.getMarks().forEach(m => {
@@ -91072,8 +91484,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91072
91484
  return mergeSpec({
91073
91485
  textStyle: { pickable: this._spec.interactive === true },
91074
91486
  position: totalLabelPosition(series, this._baseMark.type),
91075
- x: series.getRegion().layout.indent.left,
91076
- y: series.getRegion().layout.indent.top
91487
+ x: 0,
91488
+ y: 0
91077
91489
  }, Object.assign({ offset,
91078
91490
  animation,
91079
91491
  overlap, dataFilter: (data) => {
@@ -91089,7 +91501,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91089
91501
  labelSpec: series.getSpec().totalLabel
91090
91502
  }, datum, this._spec.formatMethod);
91091
91503
  })
91092
- .size(() => this._regions[0].getLayoutRectExcludeIndent());
91504
+ .size(() => this._regions[0].getLayoutRect());
91093
91505
  });
91094
91506
  }
91095
91507
  compileMarks() {
@@ -91352,8 +91764,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91352
91764
  return data;
91353
91765
  }
91354
91766
  _getBrushInteractiveAttr(region) {
91355
- const regionLayoutPosition = region.getLayoutPositionExcludeIndent();
91356
- const regionLayoutRect = region.getLayoutRectExcludeIndent();
91767
+ const regionLayoutPosition = region.getLayoutStartPoint();
91768
+ const regionLayoutRect = region.getLayoutRect();
91357
91769
  const seriesRegionStartX = regionLayoutPosition.x;
91358
91770
  const seriesRegionEndX = seriesRegionStartX + regionLayoutRect.width;
91359
91771
  const seriesRegionStartY = regionLayoutPosition.y;
@@ -91489,11 +91901,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
91489
91901
  });
91490
91902
  }
91491
91903
  _reconfigLinkedItem(operateMask, region) {
91492
- const regionLayoutPos = region.getLayoutPositionExcludeIndent();
91904
+ const regionLayoutPos = region.getLayoutStartPoint();
91493
91905
  const seriesId = region.getSeries().map(s => s.id);
91494
91906
  this._linkedSeries.forEach((s) => {
91495
91907
  if (!seriesId.includes(s.id)) {
91496
- const sRegionLayoutPos = s.getRegion().getLayoutPositionExcludeIndent();
91908
+ const sRegionLayoutPos = s.getRegion().getLayoutStartPoint();
91497
91909
  const regionOffsetX = sRegionLayoutPos.x - regionLayoutPos.x;
91498
91910
  const regionOffsetY = sRegionLayoutPos.y - regionLayoutPos.y;
91499
91911
  this._linkedItemMap[s.id].forEach((mark) => {
@@ -92306,7 +92718,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92306
92718
  });
92307
92719
  const datum = this._data.getLatestData()[i];
92308
92720
  const anchor = this.dataToPosition(datum);
92309
- const regionPos = this.getRegions()[0].getLayoutPositionExcludeIndent();
92721
+ const regionPos = this.getRegions()[0].getLayoutStartPoint();
92310
92722
  const showLeader = !!(((_b = this._spec.leader) === null || _b === void 0 ? void 0 : _b.visible) && (icon || nameLabel || valueLabel));
92311
92723
  this._markerComponents[i].setAttributes({
92312
92724
  x: regionPos.x,
@@ -92649,22 +93061,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92649
93061
 
92650
93062
  class Layout3d extends Layout {
92651
93063
  layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
92652
- this._chartLayoutRect = chartLayoutRect;
92653
- this._chartViewBox = chartViewBox;
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'));
93064
+ this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
93065
+ this._layoutNormalItems(items);
92660
93066
  const layoutTemp = {
92661
- leftCurrent: this.leftCurrent,
92662
- _topCurrent: this.topCurrent,
92663
- _rightCurrent: this.rightCurrent,
92664
- _bottomCurrent: this.bottomCurrent
93067
+ left: this.leftCurrent,
93068
+ top: this.topCurrent,
93069
+ right: this.rightCurrent,
93070
+ bottom: this.bottomCurrent
92665
93071
  };
92666
- const regionItems = items.filter(x => x.layoutType === 'region');
92667
- const relativeItems = items.filter(x => x.layoutType === 'region-relative');
92668
93072
  const absoluteItem = items.filter(x => x.layoutType === 'absolute');
92669
93073
  const zItems = absoluteItem.filter(i => {
92670
93074
  return i.layoutOrient === 'z';
@@ -92678,23 +93082,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92678
93082
  this.rightCurrent -= extraWH.width / 8;
92679
93083
  this.topCurrent += extraWH.height / 8;
92680
93084
  this.bottomCurrent -= extraWH.height / 8;
92681
- const offsetWH = {
92682
- offsetBottom: 0,
92683
- offsetTop: 0,
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
- }
93085
+ const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
93086
+ this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
93087
+ this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp);
92698
93088
  const absoluteItemExceptZAxis = absoluteItem.filter(i => i.layoutOrient !== 'z');
92699
93089
  this.layoutAbsoluteItems(absoluteItemExceptZAxis);
92700
93090
  const xAxis = relativeItems.filter(item => {
@@ -92731,84 +93121,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
92731
93121
  item.absoluteLayoutInRect(zRect);
92732
93122
  });
92733
93123
  }
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
93124
  getItemComputeLayoutRect(item, extraOffset) {
92813
93125
  if (!extraOffset) {
92814
93126
  extraOffset = { offsetLeft: 0, offsetRight: 0, offsetTop: 0, offsetBottom: 0 };