@visactor/vchart 1.8.10-alpha.0 → 1.9.0-alpha.1

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 (965) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +11042 -10188
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/base/base-chart-transformer.d.ts +1 -0
  6. package/cjs/chart/base/base-chart-transformer.js +45 -20
  7. package/cjs/chart/base/base-chart-transformer.js.map +1 -1
  8. package/cjs/chart/base/base-chart.d.ts +1 -0
  9. package/cjs/chart/base/base-chart.js +10 -8
  10. package/cjs/chart/base/base-chart.js.map +1 -1
  11. package/cjs/chart/base/util.d.ts +7 -0
  12. package/cjs/chart/base/util.js +26 -0
  13. package/cjs/chart/base/util.js.map +1 -0
  14. package/cjs/chart/circle-packing/circle-packing-transformer.js +1 -7
  15. package/cjs/chart/circle-packing/circle-packing-transformer.js.map +1 -1
  16. package/cjs/chart/correlation/correlation-transformer.js +1 -7
  17. package/cjs/chart/correlation/correlation-transformer.js.map +1 -1
  18. package/cjs/chart/histogram/base/histogram-base-transformer.js +2 -1
  19. package/cjs/chart/histogram/base/histogram-base-transformer.js.map +1 -1
  20. package/cjs/chart/index.d.ts +5 -3
  21. package/cjs/chart/index.js +16 -2
  22. package/cjs/chart/index.js.map +1 -1
  23. package/cjs/chart/interface/chart.d.ts +1 -0
  24. package/cjs/chart/interface/chart.js.map +1 -1
  25. package/cjs/chart/interface/common.d.ts +1 -4
  26. package/cjs/chart/interface/common.js.map +1 -1
  27. package/cjs/chart/interface/type.d.ts +2 -1
  28. package/cjs/chart/interface/type.js +1 -1
  29. package/cjs/chart/interface/type.js.map +1 -1
  30. package/cjs/chart/liquid/index.d.ts +2 -0
  31. package/cjs/chart/liquid/index.js +21 -0
  32. package/cjs/chart/liquid/index.js.map +1 -0
  33. package/cjs/chart/liquid/interface.d.ts +7 -0
  34. package/cjs/chart/liquid/interface.js.map +1 -0
  35. package/cjs/chart/liquid/liquid-transformer.d.ts +6 -0
  36. package/cjs/chart/liquid/liquid-transformer.js +29 -0
  37. package/cjs/chart/liquid/liquid-transformer.js.map +1 -0
  38. package/cjs/chart/liquid/liquid.d.ts +13 -0
  39. package/cjs/chart/liquid/liquid.js +25 -0
  40. package/cjs/chart/liquid/liquid.js.map +1 -0
  41. package/cjs/chart/polar/polar-transformer.js +1 -7
  42. package/cjs/chart/polar/polar-transformer.js.map +1 -1
  43. package/cjs/chart/sankey/sankey-transformer.js +1 -7
  44. package/cjs/chart/sankey/sankey-transformer.js.map +1 -1
  45. package/cjs/chart/sunburst/sunburst-transformer.js +1 -7
  46. package/cjs/chart/sunburst/sunburst-transformer.js.map +1 -1
  47. package/cjs/chart/treemap/treemap-transformer.js +1 -7
  48. package/cjs/chart/treemap/treemap-transformer.js.map +1 -1
  49. package/cjs/chart/word-cloud/base/word-cloud-base-transformer.js +1 -7
  50. package/cjs/chart/word-cloud/base/word-cloud-base-transformer.js.map +1 -1
  51. package/cjs/compile/compiler.d.ts +16 -5
  52. package/cjs/compile/compiler.js +38 -42
  53. package/cjs/compile/compiler.js.map +1 -1
  54. package/cjs/compile/data/compilable-data.d.ts +1 -1
  55. package/cjs/compile/data/compilable-data.js +1 -1
  56. package/cjs/compile/data/compilable-data.js.map +1 -1
  57. package/cjs/compile/data/interface.d.ts +1 -1
  58. package/cjs/compile/data/interface.js.map +1 -1
  59. package/cjs/compile/grammar-item.js +2 -1
  60. package/cjs/compile/mark/compilable-mark.d.ts +4 -2
  61. package/cjs/compile/mark/compilable-mark.js +4 -1
  62. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  63. package/cjs/compile/mark/interface.d.ts +3 -2
  64. package/cjs/compile/mark/interface.js.map +1 -1
  65. package/cjs/compile/mark/mark-state-manager.d.ts +2 -2
  66. package/cjs/compile/mark/mark-state-manager.js +2 -2
  67. package/cjs/compile/mark/mark-state-manager.js.map +1 -1
  68. package/cjs/compile/signal/state-manager.d.ts +1 -1
  69. package/cjs/compile/signal/state-manager.js +2 -2
  70. package/cjs/compile/signal/state-manager.js.map +1 -1
  71. package/cjs/component/axis/base-axis.d.ts +8 -9
  72. package/cjs/component/axis/base-axis.js +22 -22
  73. package/cjs/component/axis/base-axis.js.map +1 -1
  74. package/cjs/component/axis/cartesian/axis.d.ts +5 -11
  75. package/cjs/component/axis/cartesian/axis.js +23 -30
  76. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  77. package/cjs/component/axis/cartesian/band-axis.d.ts +1 -0
  78. package/cjs/component/axis/cartesian/band-axis.js +2 -1
  79. package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
  80. package/cjs/component/axis/cartesian/interface/common.d.ts +3 -5
  81. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  82. package/cjs/component/axis/cartesian/interface/spec.d.ts +4 -19
  83. package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
  84. package/cjs/component/axis/cartesian/time-axis.js +10 -17
  85. package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
  86. package/cjs/component/axis/interface/common.d.ts +10 -0
  87. package/cjs/component/axis/interface/common.js.map +1 -1
  88. package/cjs/component/axis/interface/spec.d.ts +4 -7
  89. package/cjs/component/axis/interface/spec.js.map +1 -1
  90. package/cjs/component/axis/mixin/band-axis-mixin.d.ts +13 -1
  91. package/cjs/component/axis/mixin/band-axis-mixin.js +33 -1
  92. package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
  93. package/cjs/component/axis/polar/axis.d.ts +7 -3
  94. package/cjs/component/axis/polar/axis.js +50 -58
  95. package/cjs/component/axis/polar/axis.js.map +1 -1
  96. package/cjs/component/axis/polar/band-axis.d.ts +1 -0
  97. package/cjs/component/axis/util.d.ts +6 -0
  98. package/cjs/component/axis/util.js +11 -2
  99. package/cjs/component/axis/util.js.map +1 -1
  100. package/cjs/component/base/base-component.d.ts +0 -5
  101. package/cjs/component/base/base-component.js +0 -6
  102. package/cjs/component/base/base-component.js.map +1 -1
  103. package/cjs/component/brush/brush.js +1 -0
  104. package/cjs/component/brush/brush.js.map +1 -1
  105. package/cjs/component/crosshair/base.d.ts +10 -2
  106. package/cjs/component/crosshair/base.js +108 -83
  107. package/cjs/component/crosshair/base.js.map +1 -1
  108. package/cjs/component/crosshair/cartesian.d.ts +5 -0
  109. package/cjs/component/crosshair/cartesian.js +81 -71
  110. package/cjs/component/crosshair/cartesian.js.map +1 -1
  111. package/cjs/component/crosshair/config.d.ts +1 -2
  112. package/cjs/component/crosshair/config.js +1 -1
  113. package/cjs/component/crosshair/config.js.map +1 -1
  114. package/cjs/component/crosshair/interface/spec.d.ts +2 -1
  115. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  116. package/cjs/component/crosshair/polar.js +2 -1
  117. package/cjs/component/crosshair/polar.js.map +1 -1
  118. package/cjs/component/custom-mark/custom-mark.js +1 -1
  119. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  120. package/cjs/component/data-zoom/data-zoom/data-zoom.js +2 -1
  121. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  122. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +2 -1
  123. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  124. package/cjs/component/geo/geo-coordinate.js +1 -1
  125. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  126. package/cjs/component/indicator/indicator.d.ts +2 -0
  127. package/cjs/component/indicator/indicator.js +21 -12
  128. package/cjs/component/indicator/indicator.js.map +1 -1
  129. package/cjs/component/indicator/interface.d.ts +1 -0
  130. package/cjs/component/indicator/interface.js.map +1 -1
  131. package/cjs/component/interface/common.d.ts +1 -0
  132. package/cjs/component/interface/common.js.map +1 -1
  133. package/cjs/component/label/base-label.d.ts +0 -3
  134. package/cjs/component/label/base-label.js +5 -8
  135. package/cjs/component/label/base-label.js.map +1 -1
  136. package/cjs/component/label/interface.d.ts +1 -0
  137. package/cjs/component/label/interface.js.map +1 -1
  138. package/cjs/component/label/label.js +5 -7
  139. package/cjs/component/label/label.js.map +1 -1
  140. package/cjs/component/label/total-label.js +4 -2
  141. package/cjs/component/label/total-label.js.map +1 -1
  142. package/cjs/component/legend/base-legend.d.ts +1 -1
  143. package/cjs/component/legend/continuous/legend.js +2 -2
  144. package/cjs/component/legend/continuous/legend.js.map +1 -1
  145. package/cjs/component/legend/discrete/legend.js +2 -2
  146. package/cjs/component/legend/discrete/legend.js.map +1 -1
  147. package/cjs/component/legend/util.d.ts +1 -1
  148. package/cjs/component/map-label/component.js +12 -12
  149. package/cjs/component/map-label/component.js.map +1 -1
  150. package/cjs/component/marker/mark-area/mark-area.js +2 -1
  151. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  152. package/cjs/component/marker/mark-line/mark-line.js +2 -1
  153. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  154. package/cjs/component/marker/mark-point/mark-point.js +2 -1
  155. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  156. package/cjs/component/player/player.js +1 -0
  157. package/cjs/component/player/player.js.map +1 -1
  158. package/cjs/component/title/title.js +2 -1
  159. package/cjs/component/title/title.js.map +1 -1
  160. package/cjs/component/tooltip/processor/base.js +2 -1
  161. package/cjs/component/tooltip/processor/base.js.map +1 -1
  162. package/cjs/component/tooltip/tooltip.js +10 -6
  163. package/cjs/component/tooltip/tooltip.js.map +1 -1
  164. package/cjs/constant/base.js +1 -2
  165. package/cjs/constant/scroll-bar.js +2 -1
  166. package/cjs/core/expression-function.js +1 -2
  167. package/cjs/core/factory.d.ts +5 -0
  168. package/cjs/core/factory.js +10 -1
  169. package/cjs/core/factory.js.map +1 -1
  170. package/cjs/core/index.d.ts +1 -1
  171. package/cjs/core/index.js +1 -1
  172. package/cjs/core/index.js.map +1 -1
  173. package/cjs/core/vchart.d.ts +7 -3
  174. package/cjs/core/vchart.js +51 -71
  175. package/cjs/core/vchart.js.map +1 -1
  176. package/cjs/event/event-dispatcher.js +2 -1
  177. package/cjs/event/events/dimension/util/cartesian.d.ts +1 -1
  178. package/cjs/event/events/dimension/util/cartesian.js +28 -12
  179. package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
  180. package/cjs/event/index.js +1 -2
  181. package/cjs/index-lark.js +2 -2
  182. package/cjs/index-lark.js.map +1 -1
  183. package/cjs/index-wx-simple.js +2 -2
  184. package/cjs/index-wx-simple.js.map +1 -1
  185. package/cjs/index-wx.js +2 -2
  186. package/cjs/index-wx.js.map +1 -1
  187. package/cjs/interaction/config.js +4 -4
  188. package/cjs/interaction/config.js.map +1 -1
  189. package/cjs/interaction/drill/drillable.js +1 -1
  190. package/cjs/interaction/drill/drillable.js.map +1 -1
  191. package/cjs/interaction/interface.d.ts +24 -2
  192. package/cjs/interaction/interface.js.map +1 -1
  193. package/cjs/layout/interface.d.ts +3 -0
  194. package/cjs/layout/interface.js.map +1 -1
  195. package/cjs/layout/layout-item.d.ts +2 -1
  196. package/cjs/layout/layout-item.js +2 -1
  197. package/cjs/layout/layout-item.js.map +1 -1
  198. package/cjs/layout/util.js +91 -77
  199. package/cjs/layout/util.js.map +1 -1
  200. package/cjs/mark/interface/type.d.ts +1 -0
  201. package/cjs/mark/interface/type.js +2 -1
  202. package/cjs/mark/interface/type.js.map +1 -1
  203. package/cjs/mark/liquid.d.ts +13 -0
  204. package/cjs/mark/liquid.js +32 -0
  205. package/cjs/mark/liquid.js.map +1 -0
  206. package/cjs/model/base-model.d.ts +1 -2
  207. package/cjs/model/base-model.js +11 -10
  208. package/cjs/model/base-model.js.map +1 -1
  209. package/cjs/model/interface.d.ts +3 -2
  210. package/cjs/model/interface.js.map +1 -1
  211. package/cjs/plugin/chart/media-query/util/filter.js +5 -8
  212. package/cjs/plugin/chart/media-query/util/filter.js.map +1 -1
  213. package/cjs/plugin/components/axis-sync/axis-sync.js.map +1 -0
  214. package/cjs/plugin/components/axis-sync/index.js.map +1 -0
  215. package/cjs/plugin/components/axis-sync/tick-align-transform.js.map +1 -0
  216. package/cjs/plugin/components/axis-sync/zero-align-transform.js.map +1 -0
  217. package/cjs/plugin/components/index.d.ts +1 -1
  218. package/cjs/plugin/components/index.js +2 -2
  219. package/cjs/plugin/components/index.js.map +1 -1
  220. package/cjs/plugin/components/register.d.ts +2 -0
  221. package/cjs/plugin/components/register.js +12 -0
  222. package/cjs/plugin/components/register.js.map +1 -0
  223. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/base.d.ts +10 -9
  224. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/base.js +29 -27
  225. package/cjs/plugin/components/tooltip-handler/base.js.map +1 -0
  226. package/{esm/component/tooltip/handler → cjs/plugin/components/tooltip-handler}/canvas/canvas-tooltip-handler.d.ts +7 -4
  227. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/canvas/canvas-tooltip-handler.js +14 -6
  228. package/cjs/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.js.map +1 -0
  229. package/cjs/plugin/components/tooltip-handler/canvas/index.js.map +1 -0
  230. package/cjs/plugin/components/tooltip-handler/constants.js.map +1 -0
  231. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/dom-tooltip-handler.d.ts +7 -4
  232. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/dom-tooltip-handler.js +15 -7
  233. package/cjs/plugin/components/tooltip-handler/dom/dom-tooltip-handler.js.map +1 -0
  234. package/cjs/plugin/components/tooltip-handler/dom/index.js.map +1 -0
  235. package/cjs/plugin/components/tooltip-handler/dom/interface.js.map +1 -0
  236. package/cjs/plugin/components/tooltip-handler/dom/model/base-tooltip-model.js.map +1 -0
  237. package/cjs/plugin/components/tooltip-handler/dom/model/content-column-model.js.map +1 -0
  238. package/cjs/plugin/components/tooltip-handler/dom/model/content-model.js.map +1 -0
  239. package/cjs/plugin/components/tooltip-handler/dom/model/interface.js +6 -0
  240. package/cjs/plugin/components/tooltip-handler/dom/model/interface.js.map +1 -0
  241. package/cjs/plugin/components/tooltip-handler/dom/model/shape-model.js.map +1 -0
  242. package/cjs/plugin/components/tooltip-handler/dom/model/style-constants.js.map +1 -0
  243. package/cjs/plugin/components/tooltip-handler/dom/model/text-model.js.map +1 -0
  244. package/cjs/plugin/components/tooltip-handler/dom/model/title-model.js.map +1 -0
  245. package/cjs/plugin/components/tooltip-handler/dom/model/tooltip-model.js.map +1 -0
  246. package/cjs/plugin/components/tooltip-handler/dom/util.js.map +1 -0
  247. package/cjs/plugin/components/tooltip-handler/index.js.map +1 -0
  248. package/cjs/plugin/components/tooltip-handler/interface/common.d.ts +4 -0
  249. package/cjs/plugin/components/tooltip-handler/interface/common.js +6 -0
  250. package/cjs/plugin/components/tooltip-handler/interface/common.js.map +1 -0
  251. package/cjs/plugin/components/tooltip-handler/interface/index.d.ts +2 -0
  252. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/interface/index.js +1 -1
  253. package/cjs/plugin/components/tooltip-handler/interface/index.js.map +1 -0
  254. package/cjs/plugin/components/tooltip-handler/interface/style.js.map +1 -0
  255. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/attribute.d.ts +1 -2
  256. package/cjs/plugin/components/tooltip-handler/utils/attribute.js.map +1 -0
  257. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/common.d.ts +1 -1
  258. package/cjs/plugin/components/tooltip-handler/utils/common.js.map +1 -0
  259. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/compose.d.ts +1 -2
  260. package/cjs/plugin/components/tooltip-handler/utils/compose.js +106 -0
  261. package/cjs/plugin/components/tooltip-handler/utils/compose.js.map +1 -0
  262. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/get-spec.d.ts +1 -1
  263. package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/get-spec.js +6 -6
  264. package/cjs/plugin/components/tooltip-handler/utils/get-spec.js.map +1 -0
  265. package/cjs/plugin/components/tooltip-handler/utils/index.js.map +1 -0
  266. package/cjs/plugin/components/tooltip-handler/utils/pattern.js.map +1 -0
  267. package/cjs/plugin/components/tooltip-handler/utils/position.js.map +1 -0
  268. package/cjs/region/interface.d.ts +0 -3
  269. package/cjs/region/interface.js.map +1 -1
  270. package/cjs/region/region.js +1 -1
  271. package/cjs/region/region.js.map +1 -1
  272. package/cjs/series/area/area-transformer.js +4 -4
  273. package/cjs/series/area/area-transformer.js.map +1 -1
  274. package/cjs/series/area/area.js +5 -5
  275. package/cjs/series/area/area.js.map +1 -1
  276. package/cjs/series/bar/bar.d.ts +12 -3
  277. package/cjs/series/bar/bar.js +138 -59
  278. package/cjs/series/bar/bar.js.map +1 -1
  279. package/cjs/series/bar/interface.d.ts +5 -2
  280. package/cjs/series/bar/interface.js.map +1 -1
  281. package/cjs/series/base/base-series.d.ts +30 -5
  282. package/cjs/series/base/base-series.js +72 -21
  283. package/cjs/series/base/base-series.js.map +1 -1
  284. package/cjs/series/box-plot/box-plot.js +3 -5
  285. package/cjs/series/box-plot/box-plot.js.map +1 -1
  286. package/cjs/series/cartesian/cartesian.d.ts +6 -0
  287. package/cjs/series/cartesian/cartesian.js +27 -16
  288. package/cjs/series/cartesian/cartesian.js.map +1 -1
  289. package/cjs/series/circle-packing/circle-packing.js +2 -2
  290. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  291. package/cjs/series/correlation/correlation.js +8 -8
  292. package/cjs/series/correlation/correlation.js.map +1 -1
  293. package/cjs/series/dot/dot.js +12 -12
  294. package/cjs/series/dot/dot.js.map +1 -1
  295. package/cjs/series/funnel/funnel.js +13 -11
  296. package/cjs/series/funnel/funnel.js.map +1 -1
  297. package/cjs/series/gauge/gauge-pointer.d.ts +1 -0
  298. package/cjs/series/gauge/gauge-pointer.js +4 -1
  299. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  300. package/cjs/series/gauge/gauge.js +4 -4
  301. package/cjs/series/gauge/gauge.js.map +1 -1
  302. package/cjs/series/heatmap/heatmap.d.ts +1 -0
  303. package/cjs/series/heatmap/heatmap.js +9 -4
  304. package/cjs/series/heatmap/heatmap.js.map +1 -1
  305. package/cjs/series/interface/common.d.ts +1 -1
  306. package/cjs/series/interface/common.js.map +1 -1
  307. package/cjs/series/interface/series.d.ts +0 -2
  308. package/cjs/series/interface/series.js.map +1 -1
  309. package/cjs/series/interface/theme.d.ts +2 -0
  310. package/cjs/series/interface/theme.js +3 -2
  311. package/cjs/series/interface/theme.js.map +1 -1
  312. package/cjs/series/interface/type.d.ts +6 -2
  313. package/cjs/series/interface/type.js +4 -2
  314. package/cjs/series/interface/type.js.map +1 -1
  315. package/cjs/series/link/link.d.ts +1 -0
  316. package/cjs/series/link/link.js +9 -4
  317. package/cjs/series/link/link.js.map +1 -1
  318. package/cjs/series/liquid/animation.d.ts +14 -0
  319. package/cjs/series/liquid/animation.js +63 -0
  320. package/cjs/series/liquid/animation.js.map +1 -0
  321. package/cjs/series/liquid/constant.d.ts +2 -0
  322. package/cjs/series/liquid/constant.js +23 -0
  323. package/cjs/series/liquid/constant.js.map +1 -0
  324. package/cjs/series/liquid/interface.d.ts +35 -0
  325. package/cjs/series/liquid/interface.js +6 -0
  326. package/cjs/series/liquid/interface.js.map +1 -0
  327. package/cjs/series/liquid/liquid.d.ts +50 -0
  328. package/cjs/series/liquid/liquid.js +200 -0
  329. package/cjs/series/liquid/liquid.js.map +1 -0
  330. package/cjs/series/liquid/tooltip-helper.d.ts +9 -0
  331. package/cjs/series/liquid/tooltip-helper.js +37 -0
  332. package/cjs/series/liquid/tooltip-helper.js.map +1 -0
  333. package/cjs/series/liquid/util.d.ts +2 -0
  334. package/cjs/series/liquid/util.js +15 -0
  335. package/cjs/series/liquid/util.js.map +1 -0
  336. package/cjs/series/map/map.js +4 -4
  337. package/cjs/series/map/map.js.map +1 -1
  338. package/cjs/series/mixin/line-mixin.d.ts +0 -2
  339. package/cjs/series/mixin/line-mixin.js +11 -8
  340. package/cjs/series/mixin/line-mixin.js.map +1 -1
  341. package/cjs/series/pie/pie.d.ts +1 -0
  342. package/cjs/series/pie/pie.js +9 -5
  343. package/cjs/series/pie/pie.js.map +1 -1
  344. package/cjs/series/polar/polar.js +1 -1
  345. package/cjs/series/polar/polar.js.map +1 -1
  346. package/cjs/series/progress/circular/circular.d.ts +1 -0
  347. package/cjs/series/progress/circular/circular.js +15 -8
  348. package/cjs/series/progress/circular/circular.js.map +1 -1
  349. package/cjs/series/progress/linear/linear.d.ts +1 -0
  350. package/cjs/series/progress/linear/linear.js +56 -52
  351. package/cjs/series/progress/linear/linear.js.map +1 -1
  352. package/cjs/series/radar/radar.js +4 -3
  353. package/cjs/series/radar/radar.js.map +1 -1
  354. package/cjs/series/range-area/range-area.js +4 -3
  355. package/cjs/series/range-area/range-area.js.map +1 -1
  356. package/cjs/series/range-column/range-column.js +7 -6
  357. package/cjs/series/range-column/range-column.js.map +1 -1
  358. package/cjs/series/rose/rose.js +5 -4
  359. package/cjs/series/rose/rose.js.map +1 -1
  360. package/cjs/series/sankey/sankey.js +11 -10
  361. package/cjs/series/sankey/sankey.js.map +1 -1
  362. package/cjs/series/scatter/scatter.js +6 -6
  363. package/cjs/series/scatter/scatter.js.map +1 -1
  364. package/cjs/series/sunburst/sunburst.js +5 -4
  365. package/cjs/series/sunburst/sunburst.js.map +1 -1
  366. package/cjs/series/treemap/treemap.js +7 -5
  367. package/cjs/series/treemap/treemap.js.map +1 -1
  368. package/cjs/series/waterfall/waterfall.js +3 -2
  369. package/cjs/series/waterfall/waterfall.js.map +1 -1
  370. package/cjs/series/word-cloud/base.d.ts +5 -5
  371. package/cjs/series/word-cloud/base.js +40 -47
  372. package/cjs/series/word-cloud/base.js.map +1 -1
  373. package/cjs/series/word-cloud/word-cloud-3d.js +4 -25
  374. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  375. package/cjs/theme/builtin/common/mark.js +2 -2
  376. package/cjs/theme/builtin/common/mark.js.map +1 -1
  377. package/cjs/theme/builtin/common/series/funnel.js +0 -2
  378. package/cjs/theme/builtin/common/series/funnel.js.map +1 -1
  379. package/cjs/theme/builtin/common/series/funnel3d.js +0 -2
  380. package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -1
  381. package/cjs/theme/builtin/common/series/index.js +3 -2
  382. package/cjs/theme/builtin/common/series/index.js.map +1 -1
  383. package/cjs/theme/builtin/common/series/liquid.d.ts +2 -0
  384. package/cjs/theme/builtin/common/series/liquid.js +19 -0
  385. package/cjs/theme/builtin/common/series/liquid.js.map +1 -0
  386. package/cjs/theme/builtin/common/series/waterfall.js +1 -2
  387. package/cjs/theme/builtin/common/series/waterfall.js.map +1 -1
  388. package/cjs/typings/layout.d.ts +1 -0
  389. package/cjs/typings/layout.js.map +1 -1
  390. package/cjs/typings/spec/common.d.ts +3 -2
  391. package/cjs/typings/spec/common.js.map +1 -1
  392. package/cjs/typings/tooltip/line.d.ts +4 -0
  393. package/cjs/typings/tooltip/line.js.map +1 -1
  394. package/cjs/typings/visual.d.ts +6 -0
  395. package/cjs/typings/visual.js.map +1 -1
  396. package/cjs/util/model.js.map +1 -1
  397. package/cjs/vchart-all.js +2 -2
  398. package/cjs/vchart-all.js.map +1 -1
  399. package/cjs/vchart-simple.js +2 -2
  400. package/cjs/vchart-simple.js.map +1 -1
  401. package/esm/chart/base/base-chart-transformer.d.ts +1 -0
  402. package/esm/chart/base/base-chart-transformer.js +46 -18
  403. package/esm/chart/base/base-chart-transformer.js.map +1 -1
  404. package/esm/chart/base/base-chart.d.ts +1 -0
  405. package/esm/chart/base/base-chart.js +10 -8
  406. package/esm/chart/base/base-chart.js.map +1 -1
  407. package/esm/chart/base/util.d.ts +7 -0
  408. package/esm/chart/base/util.js +16 -0
  409. package/esm/chart/base/util.js.map +1 -0
  410. package/esm/chart/circle-packing/circle-packing-transformer.js +1 -7
  411. package/esm/chart/circle-packing/circle-packing-transformer.js.map +1 -1
  412. package/esm/chart/correlation/correlation-transformer.js +1 -7
  413. package/esm/chart/correlation/correlation-transformer.js.map +1 -1
  414. package/esm/chart/histogram/base/histogram-base-transformer.js +2 -1
  415. package/esm/chart/histogram/base/histogram-base-transformer.js.map +1 -1
  416. package/esm/chart/index.d.ts +5 -3
  417. package/esm/chart/index.js +4 -2
  418. package/esm/chart/index.js.map +1 -1
  419. package/esm/chart/interface/chart.d.ts +1 -0
  420. package/esm/chart/interface/chart.js.map +1 -1
  421. package/esm/chart/interface/common.d.ts +1 -4
  422. package/esm/chart/interface/common.js.map +1 -1
  423. package/esm/chart/interface/type.d.ts +2 -1
  424. package/esm/chart/interface/type.js +1 -1
  425. package/esm/chart/interface/type.js.map +1 -1
  426. package/esm/chart/liquid/index.d.ts +2 -0
  427. package/esm/chart/liquid/index.js +4 -0
  428. package/esm/chart/liquid/index.js.map +1 -0
  429. package/esm/chart/liquid/interface.d.ts +7 -0
  430. package/esm/chart/liquid/interface.js.map +1 -0
  431. package/esm/chart/liquid/liquid-transformer.d.ts +6 -0
  432. package/esm/chart/liquid/liquid-transformer.js +23 -0
  433. package/esm/chart/liquid/liquid-transformer.js.map +1 -0
  434. package/esm/chart/liquid/liquid.d.ts +13 -0
  435. package/esm/chart/liquid/liquid.js +26 -0
  436. package/esm/chart/liquid/liquid.js.map +1 -0
  437. package/esm/chart/polar/polar-transformer.js +1 -7
  438. package/esm/chart/polar/polar-transformer.js.map +1 -1
  439. package/esm/chart/sankey/sankey-transformer.js +1 -7
  440. package/esm/chart/sankey/sankey-transformer.js.map +1 -1
  441. package/esm/chart/sunburst/sunburst-transformer.js +1 -7
  442. package/esm/chart/sunburst/sunburst-transformer.js.map +1 -1
  443. package/esm/chart/treemap/treemap-transformer.js +1 -7
  444. package/esm/chart/treemap/treemap-transformer.js.map +1 -1
  445. package/esm/chart/word-cloud/base/word-cloud-base-transformer.js +1 -7
  446. package/esm/chart/word-cloud/base/word-cloud-base-transformer.js.map +1 -1
  447. package/esm/compile/compiler.d.ts +16 -5
  448. package/esm/compile/compiler.js +39 -41
  449. package/esm/compile/compiler.js.map +1 -1
  450. package/esm/compile/data/compilable-data.d.ts +1 -1
  451. package/esm/compile/data/compilable-data.js +1 -1
  452. package/esm/compile/data/compilable-data.js.map +1 -1
  453. package/esm/compile/data/interface.d.ts +1 -1
  454. package/esm/compile/data/interface.js.map +1 -1
  455. package/esm/compile/grammar-item.js +2 -1
  456. package/esm/compile/mark/compilable-mark.d.ts +4 -2
  457. package/esm/compile/mark/compilable-mark.js +4 -1
  458. package/esm/compile/mark/compilable-mark.js.map +1 -1
  459. package/esm/compile/mark/interface.d.ts +3 -2
  460. package/esm/compile/mark/interface.js.map +1 -1
  461. package/esm/compile/mark/mark-state-manager.d.ts +2 -2
  462. package/esm/compile/mark/mark-state-manager.js +2 -2
  463. package/esm/compile/mark/mark-state-manager.js.map +1 -1
  464. package/esm/compile/signal/state-manager.d.ts +1 -1
  465. package/esm/compile/signal/state-manager.js +1 -1
  466. package/esm/compile/signal/state-manager.js.map +1 -1
  467. package/esm/component/axis/base-axis.d.ts +8 -9
  468. package/esm/component/axis/base-axis.js +23 -21
  469. package/esm/component/axis/base-axis.js.map +1 -1
  470. package/esm/component/axis/cartesian/axis.d.ts +5 -11
  471. package/esm/component/axis/cartesian/axis.js +23 -32
  472. package/esm/component/axis/cartesian/axis.js.map +1 -1
  473. package/esm/component/axis/cartesian/band-axis.d.ts +1 -0
  474. package/esm/component/axis/cartesian/band-axis.js +2 -1
  475. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  476. package/esm/component/axis/cartesian/interface/common.d.ts +3 -5
  477. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  478. package/esm/component/axis/cartesian/interface/spec.d.ts +4 -19
  479. package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
  480. package/esm/component/axis/cartesian/time-axis.js +9 -18
  481. package/esm/component/axis/cartesian/time-axis.js.map +1 -1
  482. package/esm/component/axis/interface/common.d.ts +10 -0
  483. package/esm/component/axis/interface/common.js.map +1 -1
  484. package/esm/component/axis/interface/spec.d.ts +4 -7
  485. package/esm/component/axis/interface/spec.js.map +1 -1
  486. package/esm/component/axis/mixin/band-axis-mixin.d.ts +13 -1
  487. package/esm/component/axis/mixin/band-axis-mixin.js +37 -1
  488. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  489. package/esm/component/axis/polar/axis.d.ts +7 -3
  490. package/esm/component/axis/polar/axis.js +48 -56
  491. package/esm/component/axis/polar/axis.js.map +1 -1
  492. package/esm/component/axis/polar/band-axis.d.ts +1 -0
  493. package/esm/component/axis/util.d.ts +6 -0
  494. package/esm/component/axis/util.js +9 -0
  495. package/esm/component/axis/util.js.map +1 -1
  496. package/esm/component/base/base-component.d.ts +0 -5
  497. package/esm/component/base/base-component.js +0 -6
  498. package/esm/component/base/base-component.js.map +1 -1
  499. package/esm/component/brush/brush.js +1 -0
  500. package/esm/component/brush/brush.js.map +1 -1
  501. package/esm/component/crosshair/base.d.ts +10 -2
  502. package/esm/component/crosshair/base.js +108 -82
  503. package/esm/component/crosshair/base.js.map +1 -1
  504. package/esm/component/crosshair/cartesian.d.ts +5 -0
  505. package/esm/component/crosshair/cartesian.js +79 -71
  506. package/esm/component/crosshair/cartesian.js.map +1 -1
  507. package/esm/component/crosshair/config.d.ts +1 -2
  508. package/esm/component/crosshair/config.js +1 -1
  509. package/esm/component/crosshair/config.js.map +1 -1
  510. package/esm/component/crosshair/interface/spec.d.ts +2 -1
  511. package/esm/component/crosshair/interface/spec.js.map +1 -1
  512. package/esm/component/crosshair/polar.js +2 -1
  513. package/esm/component/crosshair/polar.js.map +1 -1
  514. package/esm/component/custom-mark/custom-mark.js +1 -1
  515. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  516. package/esm/component/data-zoom/data-zoom/data-zoom.js +2 -1
  517. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  518. package/esm/component/data-zoom/scroll-bar/scroll-bar.js +2 -1
  519. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  520. package/esm/component/geo/geo-coordinate.js +1 -1
  521. package/esm/component/geo/geo-coordinate.js.map +1 -1
  522. package/esm/component/indicator/indicator.d.ts +2 -0
  523. package/esm/component/indicator/indicator.js +20 -13
  524. package/esm/component/indicator/indicator.js.map +1 -1
  525. package/esm/component/indicator/interface.d.ts +1 -0
  526. package/esm/component/indicator/interface.js.map +1 -1
  527. package/esm/component/interface/common.d.ts +1 -0
  528. package/esm/component/interface/common.js.map +1 -1
  529. package/esm/component/label/base-label.d.ts +0 -3
  530. package/esm/component/label/base-label.js +5 -8
  531. package/esm/component/label/base-label.js.map +1 -1
  532. package/esm/component/label/interface.d.ts +1 -0
  533. package/esm/component/label/interface.js.map +1 -1
  534. package/esm/component/label/label.js +5 -7
  535. package/esm/component/label/label.js.map +1 -1
  536. package/esm/component/label/total-label.js +4 -2
  537. package/esm/component/label/total-label.js.map +1 -1
  538. package/esm/component/legend/base-legend.d.ts +1 -1
  539. package/esm/component/legend/continuous/legend.js +2 -2
  540. package/esm/component/legend/continuous/legend.js.map +1 -1
  541. package/esm/component/legend/discrete/legend.js +2 -2
  542. package/esm/component/legend/discrete/legend.js.map +1 -1
  543. package/esm/component/legend/util.d.ts +1 -1
  544. package/esm/component/map-label/component.js +12 -12
  545. package/esm/component/map-label/component.js.map +1 -1
  546. package/esm/component/marker/mark-area/mark-area.js +2 -1
  547. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  548. package/esm/component/marker/mark-line/mark-line.js +2 -1
  549. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  550. package/esm/component/marker/mark-point/mark-point.js +2 -1
  551. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  552. package/esm/component/player/player.js +1 -0
  553. package/esm/component/player/player.js.map +1 -1
  554. package/esm/component/title/title.js +2 -1
  555. package/esm/component/title/title.js.map +1 -1
  556. package/esm/component/tooltip/processor/base.js +2 -1
  557. package/esm/component/tooltip/processor/base.js.map +1 -1
  558. package/esm/component/tooltip/tooltip.js +12 -10
  559. package/esm/component/tooltip/tooltip.js.map +1 -1
  560. package/esm/constant/base.js +1 -2
  561. package/esm/constant/scroll-bar.js +2 -1
  562. package/esm/core/expression-function.js +1 -2
  563. package/esm/core/factory.d.ts +5 -0
  564. package/esm/core/factory.js +10 -1
  565. package/esm/core/factory.js.map +1 -1
  566. package/esm/core/index.d.ts +1 -1
  567. package/esm/core/index.js +1 -1
  568. package/esm/core/index.js.map +1 -1
  569. package/esm/core/vchart.d.ts +7 -3
  570. package/esm/core/vchart.js +51 -70
  571. package/esm/core/vchart.js.map +1 -1
  572. package/esm/event/event-dispatcher.js +2 -1
  573. package/esm/event/events/dimension/util/cartesian.d.ts +1 -1
  574. package/esm/event/events/dimension/util/cartesian.js +28 -13
  575. package/esm/event/events/dimension/util/cartesian.js.map +1 -1
  576. package/esm/event/index.js +1 -2
  577. package/esm/index-lark.js +7 -1
  578. package/esm/index-lark.js.map +1 -1
  579. package/esm/index-wx-simple.js +5 -1
  580. package/esm/index-wx-simple.js.map +1 -1
  581. package/esm/index-wx.js +7 -1
  582. package/esm/index-wx.js.map +1 -1
  583. package/esm/interaction/config.js +4 -4
  584. package/esm/interaction/config.js.map +1 -1
  585. package/esm/interaction/drill/drillable.js +1 -1
  586. package/esm/interaction/drill/drillable.js.map +1 -1
  587. package/esm/interaction/interface.d.ts +24 -2
  588. package/esm/interaction/interface.js.map +1 -1
  589. package/esm/layout/interface.d.ts +3 -0
  590. package/esm/layout/interface.js.map +1 -1
  591. package/esm/layout/layout-item.d.ts +2 -1
  592. package/esm/layout/layout-item.js +2 -1
  593. package/esm/layout/layout-item.js.map +1 -1
  594. package/esm/layout/util.js +91 -77
  595. package/esm/layout/util.js.map +1 -1
  596. package/esm/mark/interface/type.d.ts +1 -0
  597. package/esm/mark/interface/type.js +2 -1
  598. package/esm/mark/interface/type.js.map +1 -1
  599. package/esm/mark/liquid.d.ts +13 -0
  600. package/esm/mark/liquid.js +32 -0
  601. package/esm/mark/liquid.js.map +1 -0
  602. package/esm/model/base-model.d.ts +1 -2
  603. package/esm/model/base-model.js +11 -8
  604. package/esm/model/base-model.js.map +1 -1
  605. package/esm/model/interface.d.ts +3 -2
  606. package/esm/model/interface.js.map +1 -1
  607. package/esm/plugin/chart/media-query/util/filter.js +5 -8
  608. package/esm/plugin/chart/media-query/util/filter.js.map +1 -1
  609. package/esm/plugin/components/axis-sync/axis-sync.js.map +1 -0
  610. package/esm/plugin/components/axis-sync/index.js.map +1 -0
  611. package/esm/plugin/components/axis-sync/tick-align-transform.js.map +1 -0
  612. package/esm/plugin/components/axis-sync/zero-align-transform.js.map +1 -0
  613. package/esm/plugin/components/index.d.ts +1 -1
  614. package/esm/plugin/components/index.js +1 -1
  615. package/esm/plugin/components/index.js.map +1 -1
  616. package/esm/plugin/components/register.d.ts +2 -0
  617. package/esm/plugin/components/register.js +6 -0
  618. package/esm/plugin/components/register.js.map +1 -0
  619. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/base.d.ts +10 -9
  620. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/base.js +19 -13
  621. package/esm/plugin/components/tooltip-handler/base.js.map +1 -0
  622. package/{cjs/component/tooltip/handler → esm/plugin/components/tooltip-handler}/canvas/canvas-tooltip-handler.d.ts +7 -4
  623. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/canvas/canvas-tooltip-handler.js +13 -2
  624. package/esm/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.js.map +1 -0
  625. package/esm/plugin/components/tooltip-handler/canvas/index.js.map +1 -0
  626. package/esm/plugin/components/tooltip-handler/constants.js.map +1 -0
  627. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/dom-tooltip-handler.d.ts +7 -4
  628. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/dom-tooltip-handler.js +14 -4
  629. package/esm/plugin/components/tooltip-handler/dom/dom-tooltip-handler.js.map +1 -0
  630. package/esm/plugin/components/tooltip-handler/dom/index.js.map +1 -0
  631. package/esm/plugin/components/tooltip-handler/dom/interface.js.map +1 -0
  632. package/esm/plugin/components/tooltip-handler/dom/model/base-tooltip-model.js.map +1 -0
  633. package/esm/plugin/components/tooltip-handler/dom/model/content-column-model.js.map +1 -0
  634. package/esm/plugin/components/tooltip-handler/dom/model/content-model.js.map +1 -0
  635. package/esm/plugin/components/tooltip-handler/dom/model/interface.js +2 -0
  636. package/esm/plugin/components/tooltip-handler/dom/model/interface.js.map +1 -0
  637. package/esm/plugin/components/tooltip-handler/dom/model/shape-model.js.map +1 -0
  638. package/esm/plugin/components/tooltip-handler/dom/model/style-constants.js.map +1 -0
  639. package/esm/plugin/components/tooltip-handler/dom/model/text-model.js.map +1 -0
  640. package/esm/plugin/components/tooltip-handler/dom/model/title-model.js.map +1 -0
  641. package/esm/plugin/components/tooltip-handler/dom/model/tooltip-model.js.map +1 -0
  642. package/esm/plugin/components/tooltip-handler/dom/util.js.map +1 -0
  643. package/esm/plugin/components/tooltip-handler/index.js.map +1 -0
  644. package/esm/plugin/components/tooltip-handler/interface/common.d.ts +4 -0
  645. package/esm/plugin/components/tooltip-handler/interface/common.js +2 -0
  646. package/esm/plugin/components/tooltip-handler/interface/common.js.map +1 -0
  647. package/esm/plugin/components/tooltip-handler/interface/index.d.ts +2 -0
  648. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/interface/index.js +2 -0
  649. package/esm/plugin/components/tooltip-handler/interface/index.js.map +1 -0
  650. package/esm/plugin/components/tooltip-handler/interface/style.js.map +1 -0
  651. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/attribute.d.ts +1 -2
  652. package/esm/plugin/components/tooltip-handler/utils/attribute.js.map +1 -0
  653. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/common.d.ts +1 -1
  654. package/esm/plugin/components/tooltip-handler/utils/common.js.map +1 -0
  655. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/compose.d.ts +1 -2
  656. package/esm/plugin/components/tooltip-handler/utils/compose.js +94 -0
  657. package/esm/plugin/components/tooltip-handler/utils/compose.js.map +1 -0
  658. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/get-spec.d.ts +1 -1
  659. package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/get-spec.js +2 -2
  660. package/esm/plugin/components/tooltip-handler/utils/get-spec.js.map +1 -0
  661. package/esm/plugin/components/tooltip-handler/utils/index.js.map +1 -0
  662. package/esm/plugin/components/tooltip-handler/utils/pattern.js.map +1 -0
  663. package/esm/plugin/components/tooltip-handler/utils/position.js.map +1 -0
  664. package/esm/region/interface.d.ts +0 -3
  665. package/esm/region/interface.js.map +1 -1
  666. package/esm/region/region.js +1 -1
  667. package/esm/region/region.js.map +1 -1
  668. package/esm/series/area/area-transformer.js +3 -2
  669. package/esm/series/area/area-transformer.js.map +1 -1
  670. package/esm/series/area/area.js +5 -4
  671. package/esm/series/area/area.js.map +1 -1
  672. package/esm/series/bar/bar.d.ts +12 -3
  673. package/esm/series/bar/bar.js +136 -57
  674. package/esm/series/bar/bar.js.map +1 -1
  675. package/esm/series/bar/interface.d.ts +5 -2
  676. package/esm/series/bar/interface.js.map +1 -1
  677. package/esm/series/base/base-series.d.ts +30 -5
  678. package/esm/series/base/base-series.js +75 -22
  679. package/esm/series/base/base-series.js.map +1 -1
  680. package/esm/series/box-plot/box-plot.js +3 -4
  681. package/esm/series/box-plot/box-plot.js.map +1 -1
  682. package/esm/series/cartesian/cartesian.d.ts +6 -0
  683. package/esm/series/cartesian/cartesian.js +27 -16
  684. package/esm/series/cartesian/cartesian.js.map +1 -1
  685. package/esm/series/circle-packing/circle-packing.js +2 -2
  686. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  687. package/esm/series/correlation/correlation.js +8 -6
  688. package/esm/series/correlation/correlation.js.map +1 -1
  689. package/esm/series/dot/dot.js +12 -12
  690. package/esm/series/dot/dot.js.map +1 -1
  691. package/esm/series/funnel/funnel.js +13 -11
  692. package/esm/series/funnel/funnel.js.map +1 -1
  693. package/esm/series/gauge/gauge-pointer.d.ts +1 -0
  694. package/esm/series/gauge/gauge-pointer.js +4 -1
  695. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  696. package/esm/series/gauge/gauge.js +4 -4
  697. package/esm/series/gauge/gauge.js.map +1 -1
  698. package/esm/series/heatmap/heatmap.d.ts +1 -0
  699. package/esm/series/heatmap/heatmap.js +9 -4
  700. package/esm/series/heatmap/heatmap.js.map +1 -1
  701. package/esm/series/interface/common.d.ts +1 -1
  702. package/esm/series/interface/common.js.map +1 -1
  703. package/esm/series/interface/series.d.ts +0 -2
  704. package/esm/series/interface/series.js.map +1 -1
  705. package/esm/series/interface/theme.d.ts +2 -0
  706. package/esm/series/interface/theme.js +4 -1
  707. package/esm/series/interface/theme.js.map +1 -1
  708. package/esm/series/interface/type.d.ts +6 -2
  709. package/esm/series/interface/type.js +4 -2
  710. package/esm/series/interface/type.js.map +1 -1
  711. package/esm/series/link/link.d.ts +1 -0
  712. package/esm/series/link/link.js +9 -4
  713. package/esm/series/link/link.js.map +1 -1
  714. package/esm/series/liquid/animation.d.ts +14 -0
  715. package/esm/series/liquid/animation.js +55 -0
  716. package/esm/series/liquid/animation.js.map +1 -0
  717. package/esm/series/liquid/constant.d.ts +2 -0
  718. package/esm/series/liquid/constant.js +21 -0
  719. package/esm/series/liquid/constant.js.map +1 -0
  720. package/esm/series/liquid/interface.d.ts +35 -0
  721. package/esm/series/liquid/interface.js +2 -0
  722. package/esm/series/liquid/interface.js.map +1 -0
  723. package/esm/series/liquid/liquid.d.ts +50 -0
  724. package/esm/series/liquid/liquid.js +218 -0
  725. package/esm/series/liquid/liquid.js.map +1 -0
  726. package/esm/series/liquid/tooltip-helper.d.ts +9 -0
  727. package/esm/series/liquid/tooltip-helper.js +29 -0
  728. package/esm/series/liquid/tooltip-helper.js.map +1 -0
  729. package/esm/series/liquid/util.d.ts +2 -0
  730. package/esm/series/liquid/util.js +7 -0
  731. package/esm/series/liquid/util.js.map +1 -0
  732. package/esm/series/map/map.js +4 -4
  733. package/esm/series/map/map.js.map +1 -1
  734. package/esm/series/mixin/line-mixin.d.ts +0 -2
  735. package/esm/series/mixin/line-mixin.js +11 -8
  736. package/esm/series/mixin/line-mixin.js.map +1 -1
  737. package/esm/series/pie/pie.d.ts +1 -0
  738. package/esm/series/pie/pie.js +9 -5
  739. package/esm/series/pie/pie.js.map +1 -1
  740. package/esm/series/polar/polar.js +1 -1
  741. package/esm/series/polar/polar.js.map +1 -1
  742. package/esm/series/progress/circular/circular.d.ts +1 -0
  743. package/esm/series/progress/circular/circular.js +15 -8
  744. package/esm/series/progress/circular/circular.js.map +1 -1
  745. package/esm/series/progress/linear/linear.d.ts +1 -0
  746. package/esm/series/progress/linear/linear.js +56 -52
  747. package/esm/series/progress/linear/linear.js.map +1 -1
  748. package/esm/series/radar/radar.js +4 -3
  749. package/esm/series/radar/radar.js.map +1 -1
  750. package/esm/series/range-area/range-area.js +4 -3
  751. package/esm/series/range-area/range-area.js.map +1 -1
  752. package/esm/series/range-column/range-column.js +7 -6
  753. package/esm/series/range-column/range-column.js.map +1 -1
  754. package/esm/series/rose/rose.js +5 -4
  755. package/esm/series/rose/rose.js.map +1 -1
  756. package/esm/series/sankey/sankey.js +11 -10
  757. package/esm/series/sankey/sankey.js.map +1 -1
  758. package/esm/series/scatter/scatter.js +6 -5
  759. package/esm/series/scatter/scatter.js.map +1 -1
  760. package/esm/series/sunburst/sunburst.js +5 -4
  761. package/esm/series/sunburst/sunburst.js.map +1 -1
  762. package/esm/series/treemap/treemap.js +7 -5
  763. package/esm/series/treemap/treemap.js.map +1 -1
  764. package/esm/series/waterfall/waterfall.js +3 -2
  765. package/esm/series/waterfall/waterfall.js.map +1 -1
  766. package/esm/series/word-cloud/base.d.ts +5 -5
  767. package/esm/series/word-cloud/base.js +39 -45
  768. package/esm/series/word-cloud/base.js.map +1 -1
  769. package/esm/series/word-cloud/word-cloud-3d.js +4 -25
  770. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  771. package/esm/theme/builtin/common/mark.js +2 -2
  772. package/esm/theme/builtin/common/mark.js.map +1 -1
  773. package/esm/theme/builtin/common/series/funnel.js +0 -2
  774. package/esm/theme/builtin/common/series/funnel.js.map +1 -1
  775. package/esm/theme/builtin/common/series/funnel3d.js +0 -2
  776. package/esm/theme/builtin/common/series/funnel3d.js.map +1 -1
  777. package/esm/theme/builtin/common/series/index.js +4 -1
  778. package/esm/theme/builtin/common/series/index.js.map +1 -1
  779. package/esm/theme/builtin/common/series/liquid.d.ts +2 -0
  780. package/esm/theme/builtin/common/series/liquid.js +15 -0
  781. package/esm/theme/builtin/common/series/liquid.js.map +1 -0
  782. package/esm/theme/builtin/common/series/waterfall.js +1 -2
  783. package/esm/theme/builtin/common/series/waterfall.js.map +1 -1
  784. package/esm/typings/layout.d.ts +1 -0
  785. package/esm/typings/layout.js.map +1 -1
  786. package/esm/typings/spec/common.d.ts +3 -2
  787. package/esm/typings/spec/common.js.map +1 -1
  788. package/esm/typings/tooltip/line.d.ts +4 -0
  789. package/esm/typings/tooltip/line.js.map +1 -1
  790. package/esm/typings/visual.d.ts +6 -0
  791. package/esm/typings/visual.js.map +1 -1
  792. package/esm/util/model.js.map +1 -1
  793. package/esm/vchart-all.js +7 -1
  794. package/esm/vchart-all.js.map +1 -1
  795. package/esm/vchart-simple.js +5 -1
  796. package/esm/vchart-simple.js.map +1 -1
  797. package/package.json +10 -10
  798. package/cjs/component/tooltip/handler/base.js.map +0 -1
  799. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +0 -1
  800. package/cjs/component/tooltip/handler/canvas/index.js.map +0 -1
  801. package/cjs/component/tooltip/handler/constants.js.map +0 -1
  802. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +0 -1
  803. package/cjs/component/tooltip/handler/dom/index.js.map +0 -1
  804. package/cjs/component/tooltip/handler/dom/interface.js.map +0 -1
  805. package/cjs/component/tooltip/handler/dom/model/base-tooltip-model.js.map +0 -1
  806. package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +0 -1
  807. package/cjs/component/tooltip/handler/dom/model/content-model.js.map +0 -1
  808. package/cjs/component/tooltip/handler/dom/model/interface.js.map +0 -1
  809. package/cjs/component/tooltip/handler/dom/model/shape-model.js.map +0 -1
  810. package/cjs/component/tooltip/handler/dom/model/style-constants.js.map +0 -1
  811. package/cjs/component/tooltip/handler/dom/model/text-model.js.map +0 -1
  812. package/cjs/component/tooltip/handler/dom/model/title-model.js.map +0 -1
  813. package/cjs/component/tooltip/handler/dom/model/tooltip-model.js.map +0 -1
  814. package/cjs/component/tooltip/handler/dom/util.js.map +0 -1
  815. package/cjs/component/tooltip/handler/index.js.map +0 -1
  816. package/cjs/component/tooltip/handler/interface/index.d.ts +0 -1
  817. package/cjs/component/tooltip/handler/interface/index.js.map +0 -1
  818. package/cjs/component/tooltip/handler/interface/style.js.map +0 -1
  819. package/cjs/component/tooltip/handler/utils/attribute.js.map +0 -1
  820. package/cjs/component/tooltip/handler/utils/common.js.map +0 -1
  821. package/cjs/component/tooltip/handler/utils/compose.js +0 -106
  822. package/cjs/component/tooltip/handler/utils/compose.js.map +0 -1
  823. package/cjs/component/tooltip/handler/utils/get-spec.js.map +0 -1
  824. package/cjs/component/tooltip/handler/utils/index.js.map +0 -1
  825. package/cjs/component/tooltip/handler/utils/pattern.js.map +0 -1
  826. package/cjs/component/tooltip/handler/utils/position.js.map +0 -1
  827. package/cjs/interaction/trigger.d.ts +0 -39
  828. package/cjs/interaction/trigger.js +0 -141
  829. package/cjs/interaction/trigger.js.map +0 -1
  830. package/cjs/plugin/components/axis-sync-plugin/axis-sync.js.map +0 -1
  831. package/cjs/plugin/components/axis-sync-plugin/index.js.map +0 -1
  832. package/cjs/plugin/components/axis-sync-plugin/tick-align-transform.js.map +0 -1
  833. package/cjs/plugin/components/axis-sync-plugin/zero-align-transform.js.map +0 -1
  834. package/esm/component/tooltip/handler/base.js.map +0 -1
  835. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +0 -1
  836. package/esm/component/tooltip/handler/canvas/index.js.map +0 -1
  837. package/esm/component/tooltip/handler/constants.js.map +0 -1
  838. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +0 -1
  839. package/esm/component/tooltip/handler/dom/index.js.map +0 -1
  840. package/esm/component/tooltip/handler/dom/interface.js.map +0 -1
  841. package/esm/component/tooltip/handler/dom/model/base-tooltip-model.js.map +0 -1
  842. package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +0 -1
  843. package/esm/component/tooltip/handler/dom/model/content-model.js.map +0 -1
  844. package/esm/component/tooltip/handler/dom/model/interface.js.map +0 -1
  845. package/esm/component/tooltip/handler/dom/model/shape-model.js.map +0 -1
  846. package/esm/component/tooltip/handler/dom/model/style-constants.js.map +0 -1
  847. package/esm/component/tooltip/handler/dom/model/text-model.js.map +0 -1
  848. package/esm/component/tooltip/handler/dom/model/title-model.js.map +0 -1
  849. package/esm/component/tooltip/handler/dom/model/tooltip-model.js.map +0 -1
  850. package/esm/component/tooltip/handler/dom/util.js.map +0 -1
  851. package/esm/component/tooltip/handler/index.js.map +0 -1
  852. package/esm/component/tooltip/handler/interface/index.d.ts +0 -1
  853. package/esm/component/tooltip/handler/interface/index.js.map +0 -1
  854. package/esm/component/tooltip/handler/interface/style.js.map +0 -1
  855. package/esm/component/tooltip/handler/utils/attribute.js.map +0 -1
  856. package/esm/component/tooltip/handler/utils/common.js.map +0 -1
  857. package/esm/component/tooltip/handler/utils/compose.js +0 -89
  858. package/esm/component/tooltip/handler/utils/compose.js.map +0 -1
  859. package/esm/component/tooltip/handler/utils/get-spec.js.map +0 -1
  860. package/esm/component/tooltip/handler/utils/index.js.map +0 -1
  861. package/esm/component/tooltip/handler/utils/pattern.js.map +0 -1
  862. package/esm/component/tooltip/handler/utils/position.js.map +0 -1
  863. package/esm/interaction/trigger.d.ts +0 -39
  864. package/esm/interaction/trigger.js +0 -142
  865. package/esm/interaction/trigger.js.map +0 -1
  866. package/esm/plugin/components/axis-sync-plugin/axis-sync.js.map +0 -1
  867. package/esm/plugin/components/axis-sync-plugin/index.js.map +0 -1
  868. package/esm/plugin/components/axis-sync-plugin/tick-align-transform.js.map +0 -1
  869. package/esm/plugin/components/axis-sync-plugin/zero-align-transform.js.map +0 -1
  870. /package/cjs/{component/tooltip/handler/dom → chart/liquid}/interface.js +0 -0
  871. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/axis-sync.d.ts +0 -0
  872. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/axis-sync.js +0 -0
  873. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/index.d.ts +0 -0
  874. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/index.js +0 -0
  875. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/tick-align-transform.d.ts +0 -0
  876. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/tick-align-transform.js +0 -0
  877. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/zero-align-transform.d.ts +0 -0
  878. /package/cjs/plugin/components/{axis-sync-plugin → axis-sync}/zero-align-transform.js +0 -0
  879. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/canvas/index.d.ts +0 -0
  880. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/canvas/index.js +0 -0
  881. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/constants.d.ts +0 -0
  882. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/constants.js +0 -0
  883. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/index.d.ts +0 -0
  884. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/index.js +0 -0
  885. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/interface.d.ts +0 -0
  886. /package/cjs/{component/tooltip/handler/dom/model → plugin/components/tooltip-handler/dom}/interface.js +0 -0
  887. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/base-tooltip-model.d.ts +0 -0
  888. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/base-tooltip-model.js +0 -0
  889. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-column-model.d.ts +0 -0
  890. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-column-model.js +0 -0
  891. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-model.d.ts +0 -0
  892. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-model.js +0 -0
  893. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/interface.d.ts +0 -0
  894. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/shape-model.d.ts +0 -0
  895. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/shape-model.js +0 -0
  896. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/style-constants.d.ts +0 -0
  897. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/style-constants.js +0 -0
  898. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/text-model.d.ts +0 -0
  899. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/text-model.js +0 -0
  900. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/title-model.d.ts +0 -0
  901. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/title-model.js +0 -0
  902. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/tooltip-model.d.ts +0 -0
  903. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/tooltip-model.js +0 -0
  904. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/util.d.ts +0 -0
  905. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/util.js +0 -0
  906. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/index.d.ts +0 -0
  907. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/index.js +0 -0
  908. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/interface/style.d.ts +0 -0
  909. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/interface/style.js +0 -0
  910. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/attribute.js +0 -0
  911. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/common.js +0 -0
  912. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/index.d.ts +0 -0
  913. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/index.js +0 -0
  914. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/pattern.d.ts +0 -0
  915. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/pattern.js +0 -0
  916. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/position.d.ts +0 -0
  917. /package/cjs/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/position.js +0 -0
  918. /package/esm/{component/tooltip/handler/dom → chart/liquid}/interface.js +0 -0
  919. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/axis-sync.d.ts +0 -0
  920. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/axis-sync.js +0 -0
  921. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/index.d.ts +0 -0
  922. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/index.js +0 -0
  923. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/tick-align-transform.d.ts +0 -0
  924. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/tick-align-transform.js +0 -0
  925. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/zero-align-transform.d.ts +0 -0
  926. /package/esm/plugin/components/{axis-sync-plugin → axis-sync}/zero-align-transform.js +0 -0
  927. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/canvas/index.d.ts +0 -0
  928. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/canvas/index.js +0 -0
  929. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/constants.d.ts +0 -0
  930. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/constants.js +0 -0
  931. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/index.d.ts +0 -0
  932. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/index.js +0 -0
  933. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/interface.d.ts +0 -0
  934. /package/esm/{component/tooltip/handler/dom/model → plugin/components/tooltip-handler/dom}/interface.js +0 -0
  935. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/base-tooltip-model.d.ts +0 -0
  936. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/base-tooltip-model.js +0 -0
  937. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-column-model.d.ts +0 -0
  938. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-column-model.js +0 -0
  939. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-model.d.ts +0 -0
  940. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/content-model.js +0 -0
  941. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/interface.d.ts +0 -0
  942. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/shape-model.d.ts +0 -0
  943. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/shape-model.js +0 -0
  944. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/style-constants.d.ts +0 -0
  945. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/style-constants.js +0 -0
  946. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/text-model.d.ts +0 -0
  947. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/text-model.js +0 -0
  948. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/title-model.d.ts +0 -0
  949. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/title-model.js +0 -0
  950. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/tooltip-model.d.ts +0 -0
  951. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/model/tooltip-model.js +0 -0
  952. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/util.d.ts +0 -0
  953. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/dom/util.js +0 -0
  954. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/index.d.ts +0 -0
  955. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/index.js +0 -0
  956. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/interface/style.d.ts +0 -0
  957. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/interface/style.js +0 -0
  958. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/attribute.js +0 -0
  959. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/common.js +0 -0
  960. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/index.d.ts +0 -0
  961. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/index.js +0 -0
  962. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/pattern.d.ts +0 -0
  963. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/pattern.js +0 -0
  964. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/position.d.ts +0 -0
  965. /package/esm/{component/tooltip/handler → plugin/components/tooltip-handler}/utils/position.js +0 -0
@@ -18,4 +18,5 @@ export declare class BaseChartSpecTransformer<T extends IChartSpec> implements I
18
18
  forEachRegionInSpec<K>(chartSpec: T, callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
19
19
  forEachSeriesInSpec<K>(chartSpec: T, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
20
20
  forEachComponentInSpec<K>(chartSpec: T, callbackfn: (constructor: IComponentConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
21
+ transformSeriesSpec(spec: T): void;
21
22
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.BaseChartSpecTransformer = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), core_1 = require("../../core"), interface_1 = require("../../component/interface"), vutils_extension_1 = require("@visactor/vutils-extension");
7
+ const vutils_1 = require("@visactor/vutils"), core_1 = require("../../core"), interface_1 = require("../../component/interface"), vutils_extension_1 = require("@visactor/vutils-extension"), util_1 = require("./util");
8
8
 
9
9
  class BaseChartSpecTransformer {
10
10
  constructor(option) {
@@ -29,7 +29,7 @@ class BaseChartSpecTransformer {
29
29
  }));
30
30
  }
31
31
  createSpecInfo(chartSpec, transform) {
32
- var _a;
32
+ var _a, _b;
33
33
  transform || (transform = (constructor, specInfo, chartSpecInfo) => {
34
34
  const {spec: spec, specPath: specPath, specInfoPath: specInfoPath, type: type} = specInfo, transformer = new constructor.transformerConstructor({
35
35
  type: type,
@@ -40,15 +40,32 @@ class BaseChartSpecTransformer {
40
40
  }));
41
41
  });
42
42
  const currentChartSpecInfo = {};
43
- let region;
44
43
  return this.forEachRegionInSpec(chartSpec, transform, currentChartSpecInfo), this.forEachSeriesInSpec(chartSpec, transform, currentChartSpecInfo),
45
- null === (_a = currentChartSpecInfo.series) || void 0 === _a || _a.forEach((({spec: {regionId: regionId, regionIndex: regionIndex}}, i) => {
44
+ null === (_a = currentChartSpecInfo.series) || void 0 === _a || _a.forEach(((seriesSpecInfo, i) => {
45
+ var _a, _b;
46
+ const region = null !== (_a = (0, util_1.getRelatedRegionInfo)(seriesSpecInfo, currentChartSpecInfo)) && void 0 !== _a ? _a : null === (_b = currentChartSpecInfo.region) || void 0 === _b ? void 0 : _b[0];
47
+ region && (region.seriesIndexes || (region.seriesIndexes = []), region.seriesIndexes.push(i),
48
+ seriesSpecInfo.regionIndexes = region.regionIndexes.slice());
49
+ })), this.forEachComponentInSpec(chartSpec, transform, currentChartSpecInfo), Object.values(null !== (_b = currentChartSpecInfo.component) && void 0 !== _b ? _b : {}).forEach((specInfoList => specInfoList.forEach(((componentSpecInfo, i) => {
46
50
  var _a, _b, _c;
47
- (0, vutils_1.isValid)(regionId) ? region = null === (_a = currentChartSpecInfo.region) || void 0 === _a ? void 0 : _a.find((({spec: spec}) => spec.id === regionId)) : (0,
48
- vutils_1.isValid)(regionIndex) && (region = null === (_b = currentChartSpecInfo.region) || void 0 === _b ? void 0 : _b[regionIndex]),
49
- (region || (region = null === (_c = currentChartSpecInfo.region) || void 0 === _c ? void 0 : _c[0])) && (region.seriesIndexes || (region.seriesIndexes = []),
50
- region.seriesIndexes.push(i));
51
- })), this.forEachComponentInSpec(chartSpec, transform, currentChartSpecInfo), currentChartSpecInfo;
51
+ if (componentSpecInfo) {
52
+ if (!componentSpecInfo.regionIndexes) {
53
+ const region = null !== (_a = (0, util_1.getRelatedRegionInfo)(componentSpecInfo, currentChartSpecInfo)) && void 0 !== _a ? _a : null === (_b = currentChartSpecInfo.region) || void 0 === _b ? void 0 : _b[0];
54
+ componentSpecInfo.regionIndexes = null == region ? void 0 : region.regionIndexes.slice();
55
+ }
56
+ if (!componentSpecInfo.seriesIndexes) {
57
+ const seriesInfo = (0, util_1.getRelatedSeriesInfo)(componentSpecInfo, currentChartSpecInfo);
58
+ if (seriesInfo) componentSpecInfo.seriesIndexes = seriesInfo.map((({seriesIndexes: seriesIndexes}) => seriesIndexes[0])); else {
59
+ const seriesIndexSet = new Set;
60
+ (null !== (_c = componentSpecInfo.regionIndexes) && void 0 !== _c ? _c : []).forEach((regionIndex => {
61
+ var _a, _b;
62
+ const region = null === (_a = currentChartSpecInfo.region) || void 0 === _a ? void 0 : _a[regionIndex];
63
+ null === (_b = null == region ? void 0 : region.seriesIndexes) || void 0 === _b || _b.forEach((seriesIndex => seriesIndexSet.add(seriesIndex)));
64
+ })), componentSpecInfo.seriesIndexes = Array.from(seriesIndexSet);
65
+ }
66
+ }
67
+ }
68
+ })))), currentChartSpecInfo;
52
69
  }
53
70
  _isValidSeries(seriesType) {
54
71
  return !0;
@@ -77,25 +94,26 @@ class BaseChartSpecTransformer {
77
94
  background: chartSpec.seriesBackground,
78
95
  invalidType: chartSpec.invalidType,
79
96
  seriesField: chartSpec.seriesField,
80
- morph: chartSpec.morph
97
+ morph: chartSpec.morph,
98
+ interactions: chartSpec.interactions
81
99
  };
82
100
  }
83
101
  forEachRegionInSpec(chartSpec, callbackfn, chartSpecInfo) {
84
102
  var _a;
85
103
  return (null !== (_a = chartSpec.region) && void 0 !== _a ? _a : []).map(((spec, index) => callbackfn(core_1.Factory.getRegionInType("region"), {
86
104
  spec: spec,
87
- specIndex: index,
88
105
  specPath: [ "region", index ],
89
- type: "region"
106
+ type: "region",
107
+ regionIndexes: [ index ]
90
108
  }, chartSpecInfo)));
91
109
  }
92
110
  forEachSeriesInSpec(chartSpec, callbackfn, chartSpecInfo) {
93
111
  var _a;
94
112
  return (null !== (_a = chartSpec.series) && void 0 !== _a ? _a : []).map(((spec, index) => callbackfn(core_1.Factory.getSeriesInType(spec.type), {
95
113
  spec: spec,
96
- specIndex: index,
97
114
  specPath: [ "series", index ],
98
- type: spec.type
115
+ type: spec.type,
116
+ seriesIndexes: [ index ]
99
117
  }, chartSpecInfo)));
100
118
  }
101
119
  forEachComponentInSpec(chartSpec, callbackfn, chartSpecInfo) {
@@ -105,25 +123,24 @@ class BaseChartSpecTransformer {
105
123
  const noAxisComponents = [];
106
124
  for (let index = 0; index < components.length; index++) {
107
125
  const {cmp: cmp, alwaysCheck: alwaysCheck} = components[index];
108
- cmp.type.startsWith(interface_1.ComponentTypeEnum.cartesianAxis) ? cartesianAxis = cmp : cmp.type.startsWith(interface_1.ComponentTypeEnum.polarAxis) ? polarAxis = cmp : cmp.type === interface_1.ComponentTypeEnum.geoCoordinate ? geoCoordinate = cmp : (alwaysCheck || chartSpec[null !== (_a = cmp.specKey) && void 0 !== _a ? _a : cmp.type]) && (cmp.type === interface_1.ComponentTypeEnum.label ? label = cmp : cmp.type === interface_1.ComponentTypeEnum.totalLabel && (totalLabel = cmp),
109
- noAxisComponents.push(cmp));
126
+ cmp.type.startsWith(interface_1.ComponentTypeEnum.cartesianAxis) ? cartesianAxis = cmp : cmp.type.startsWith(interface_1.ComponentTypeEnum.polarAxis) ? polarAxis = cmp : cmp.type === interface_1.ComponentTypeEnum.geoCoordinate ? geoCoordinate = cmp : (alwaysCheck || chartSpec[null !== (_a = cmp.specKey) && void 0 !== _a ? _a : cmp.type]) && (cmp.type === interface_1.ComponentTypeEnum.label ? label = cmp : cmp.type === interface_1.ComponentTypeEnum.totalLabel ? totalLabel = cmp : noAxisComponents.push(cmp));
110
127
  }
111
128
  let hasInitAxis = !1;
112
129
  if (cartesianAxis) {
113
- const infoList = cartesianAxis.getSpecInfo(chartSpec);
130
+ const infoList = cartesianAxis.getSpecInfo(chartSpec, chartSpecInfo);
114
131
  (null == infoList ? void 0 : infoList.length) > 0 && (hasInitAxis = !0, infoList.forEach((info => {
115
132
  const cmp = core_1.Factory.getComponentInKey(info.type);
116
133
  results.push(callbackfn(cmp, info, chartSpecInfo));
117
134
  })));
118
135
  }
119
136
  if (polarAxis && !hasInitAxis) {
120
- const infoList = polarAxis.getSpecInfo(chartSpec);
137
+ const infoList = polarAxis.getSpecInfo(chartSpec, chartSpecInfo);
121
138
  (null == infoList ? void 0 : infoList.length) > 0 && (hasInitAxis = !0, infoList.forEach((info => {
122
139
  const cmp = core_1.Factory.getComponentInKey(info.type);
123
140
  results.push(callbackfn(cmp, info, chartSpecInfo));
124
141
  })));
125
142
  }
126
- return geoCoordinate && !hasInitAxis && (null === (_b = geoCoordinate.getSpecInfo(chartSpec)) || void 0 === _b || _b.forEach((info => {
143
+ return geoCoordinate && !hasInitAxis && (null === (_b = geoCoordinate.getSpecInfo(chartSpec, chartSpecInfo)) || void 0 === _b || _b.forEach((info => {
127
144
  results.push(callbackfn(geoCoordinate, info, chartSpecInfo));
128
145
  }))), label && chartSpecInfo && (null === (_c = label.getSpecInfo(chartSpec, chartSpecInfo)) || void 0 === _c || _c.forEach((info => {
129
146
  results.push(callbackfn(label, info, chartSpecInfo));
@@ -131,11 +148,19 @@ class BaseChartSpecTransformer {
131
148
  results.push(callbackfn(totalLabel, info, chartSpecInfo));
132
149
  }))), noAxisComponents.forEach((C => {
133
150
  var _a;
134
- null === (_a = C.getSpecInfo(chartSpec)) || void 0 === _a || _a.forEach((info => {
151
+ null === (_a = C.getSpecInfo(chartSpec, chartSpecInfo)) || void 0 === _a || _a.forEach((info => {
135
152
  results.push(callbackfn(C, info, chartSpecInfo));
136
153
  }));
137
154
  })), results;
138
155
  }
156
+ transformSeriesSpec(spec) {
157
+ const defaultSeriesSpec = this._getDefaultSeriesSpec(spec);
158
+ spec.series && 0 !== spec.series.length ? spec.series.forEach((s => {
159
+ this._isValidSeries(s.type) && Object.keys(defaultSeriesSpec).forEach((k => {
160
+ k in s || (s[k] = defaultSeriesSpec[k]);
161
+ }));
162
+ })) : spec.series = [ defaultSeriesSpec ];
163
+ }
139
164
  }
140
165
 
141
166
  exports.BaseChartSpecTransformer = BaseChartSpecTransformer;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chart/base/base-chart-transformer.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAKhD,qCAAqC;AAGrC,yDAA8D;AAC9D,iEAAyD;AAEzD,MAAa,wBAAwB;IAMnC,YAAY,MAAmC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG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I,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;YAC/D,CAAC,CAAC,CAAC;SACJ;QAED,IAAI,KAAK,IAAI,aAAa,EAAE;YAC1B,MAAA,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,0CAAE,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC1D,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;YACvD,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,UAAU,IAAI,aAAa,EAAE;YAC/B,MAAA,UAAU,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,0CAAE,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC/D,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;YAC5D,CAAC,CAAC,CAAC;SACJ;QAED,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;;YAC3B,MAAA,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,0CAAE,OAAO,CAAC,IAAI,CAAC,EAAE;gBACvC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;YACnD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAtRD,4DAsRC","file":"base-chart-transformer.js","sourcesContent":["import { has, isValid } from '@visactor/vutils';\nimport type { IChartSpec, IRegionSpec, ISeriesSpec } from '../../typings';\nimport type { IChartSpecInfo, IChartSpecTransformer, IChartSpecTransformerOption } from '../interface';\nimport type { IModelConstructor, IModelSpecInfo } from '../../model/interface';\nimport type { IRegionConstructor, IRegionSpecInfo } from '../../region/interface';\nimport { Factory } from '../../core';\nimport type { ISeriesConstructor } from '../../series';\nimport type { IComponentConstructor } from '../../component/interface/common';\nimport { ComponentTypeEnum } from '../../component/interface';\nimport { setProperty } from '@visactor/vutils-extension';\n\nexport class BaseChartSpecTransformer<T extends IChartSpec> implements IChartSpecTransformer {\n readonly type: string;\n readonly seriesType: string;\n\n protected _option: IChartSpecTransformerOption;\n\n constructor(option: IChartSpecTransformerOption) {\n this._option = option;\n this.type = option.type;\n this.seriesType = option.seriesType;\n }\n\n /** 此方法不建议重写 */\n initChartSpec(chartSpec: T): IChartSpecInfo {\n this.transformSpec(chartSpec);\n return this.transformModelSpec(chartSpec);\n }\n\n /**\n * 转换 chart spec。包含以下步骤:\n * - 将图表 spec 统一转换为 common 图表 spec\n * - 图表层级的在初始化阶段的 spec 修改\n */\n transformSpec(chartSpec: T): void {\n if (!chartSpec.region || chartSpec.region.length === 0) {\n chartSpec.region = [{}];\n }\n if (!has(chartSpec, 'tooltip')) {\n chartSpec.tooltip = {};\n }\n if (isValid(chartSpec.stackInverse)) {\n chartSpec.region.forEach(\n (r: IRegionSpec) => !isValid(r.stackInverse) && (r.stackInverse = chartSpec.stackInverse)\n );\n }\n }\n\n /**\n * 转换 model spec。包含以下步骤:\n * - model 层级的主题合并\n * - model 层级的在初始化阶段的 spec 修改,如添加 label spec\n */\n transformModelSpec(chartSpec: T): IChartSpecInfo {\n const transform = (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => {\n const { spec, specPath, specInfoPath, type } = specInfo;\n const transformer = new constructor.transformerConstructor({\n type,\n getTheme: this._option.getTheme\n });\n // 调用 model 自己的 transformer 进行转换\n const transformResult = transformer.transformSpec(spec, chartSpec, chartSpecInfo);\n setProperty(chartSpec, specPath, transformResult.spec);\n setProperty(chartSpecInfo, specInfoPath ?? specPath, {\n ...specInfo,\n ...transformResult\n });\n };\n return this.createSpecInfo(chartSpec, transform);\n }\n\n /** 遍历图表 spec 中包含的所有的 model,进行 spec 转换并生成图表 spec info */\n createSpecInfo(\n chartSpec: T,\n transform?: (\n /** 当前 model 的类 */\n constructor: IModelConstructor,\n /** 当前 model 的 spec info */\n specInfo: IModelSpecInfo,\n /** 图表 spec info */\n chartSpecInfo?: IChartSpecInfo\n ) => void\n ): IChartSpecInfo {\n if (!transform) {\n transform = (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => {\n const { spec, specPath, specInfoPath, type } = specInfo;\n const transformer = new constructor.transformerConstructor({\n type,\n getTheme: this._option.getTheme\n });\n setProperty(chartSpecInfo, specInfoPath ?? specPath, {\n ...specInfo,\n theme: transformer.getTheme(spec, chartSpec)\n });\n };\n }\n\n const currentChartSpecInfo: IChartSpecInfo = {};\n\n // 预处理 region\n this.forEachRegionInSpec(chartSpec, transform, currentChartSpecInfo);\n // 预处理 series\n this.forEachSeriesInSpec(chartSpec, transform, currentChartSpecInfo);\n // 记录每个 region 包含哪些 series\n let region: IRegionSpecInfo;\n currentChartSpecInfo.series?.forEach(({ spec: { regionId, regionIndex } }, i) => {\n if (isValid(regionId)) {\n region = currentChartSpecInfo.region?.find(({ spec }) => spec.id === regionId);\n } else if (isValid(regionIndex)) {\n region = currentChartSpecInfo.region?.[regionIndex];\n }\n if (region || (region = currentChartSpecInfo.region?.[0])) {\n if (!region.seriesIndexes) {\n region.seriesIndexes = [];\n }\n region.seriesIndexes.push(i);\n }\n });\n // 预处理 component\n this.forEachComponentInSpec(chartSpec, transform, currentChartSpecInfo);\n return currentChartSpecInfo;\n }\n\n protected _isValidSeries(seriesType: string): boolean {\n return true;\n }\n\n protected _getDefaultSeriesSpec(chartSpec: any) {\n const series: any = {\n dataKey: chartSpec.dataKey,\n\n hover: chartSpec.hover,\n select: chartSpec.select,\n\n label: chartSpec.label,\n\n seriesStyle: chartSpec.seriesStyle,\n\n animation: chartSpec.animation ?? this._option.animation,\n animationThreshold: chartSpec.animationThreshold ?? this._option.getTheme?.().animationThreshold,\n animationAppear: chartSpec.animationAppear,\n animationDisappear: chartSpec.animationDisappear,\n animationEnter: chartSpec.animationEnter,\n animationUpdate: chartSpec.animationUpdate,\n animationExit: chartSpec.animationExit,\n animationNormal: chartSpec.animationNormal,\n\n extensionMark: chartSpec.extensionMark,\n\n large: chartSpec.large,\n largeThreshold: chartSpec.largeThreshold,\n progressiveStep: chartSpec.progressiveStep,\n progressiveThreshold: chartSpec.progressiveThreshold,\n background: chartSpec.seriesBackground,\n\n invalidType: chartSpec.invalidType,\n\n seriesField: chartSpec.seriesField,\n\n morph: chartSpec.morph\n };\n return series;\n }\n\n /** 遍历 spec 中每个有效的 region */\n forEachRegionInSpec<K>(\n chartSpec: T,\n callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K,\n chartSpecInfo?: IChartSpecInfo\n ): K[] {\n const regionSpec = (chartSpec.region as IRegionSpec[]) ?? [];\n return regionSpec.map((spec, index) =>\n callbackfn(\n Factory.getRegionInType('region'),\n {\n spec,\n specIndex: index,\n specPath: ['region', index],\n type: 'region'\n },\n chartSpecInfo\n )\n );\n }\n\n /** 遍历 spec 中每个有效的 series */\n forEachSeriesInSpec<K>(\n chartSpec: T,\n callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K,\n chartSpecInfo?: IChartSpecInfo\n ): K[] {\n const seriesSpec = (chartSpec.series as ISeriesSpec[]) ?? [];\n return seriesSpec.map((spec, index) =>\n callbackfn(\n Factory.getSeriesInType(spec.type),\n {\n spec,\n specIndex: index,\n specPath: ['series', index],\n type: spec.type\n },\n chartSpecInfo\n )\n );\n }\n\n /** 遍历 spec 中每个有效的 component */\n forEachComponentInSpec<K>(\n chartSpec: T,\n callbackfn: (constructor: IComponentConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K,\n chartSpecInfo?: IChartSpecInfo\n ): K[] {\n const results: K[] = [];\n const components = Factory.getComponents();\n\n // 坐标轴组件只需要调用一次\n let cartesianAxis: IComponentConstructor;\n let polarAxis: IComponentConstructor;\n let geoCoordinate: IComponentConstructor;\n let label: IComponentConstructor;\n let totalLabel: IComponentConstructor;\n const noAxisComponents = [];\n for (let index = 0; index < components.length; index++) {\n const { cmp, alwaysCheck } = components[index];\n if (cmp.type.startsWith(ComponentTypeEnum.cartesianAxis)) {\n cartesianAxis = cmp;\n } else if (cmp.type.startsWith(ComponentTypeEnum.polarAxis)) {\n polarAxis = cmp;\n } else if (cmp.type === ComponentTypeEnum.geoCoordinate) {\n geoCoordinate = cmp;\n } else if (alwaysCheck || chartSpec[cmp.specKey ?? cmp.type]) {\n if (cmp.type === ComponentTypeEnum.label) {\n label = cmp;\n } else if (cmp.type === ComponentTypeEnum.totalLabel) {\n totalLabel = cmp;\n }\n noAxisComponents.push(cmp);\n }\n }\n\n let hasInitAxis = false;\n // NOTE: 坐标轴组件需要在其他组件之前创建\n if (cartesianAxis) {\n const infoList = cartesianAxis.getSpecInfo(chartSpec);\n if (infoList?.length > 0) {\n hasInitAxis = true;\n infoList.forEach(info => {\n const cmp = Factory.getComponentInKey(info.type);\n results.push(callbackfn(cmp, info, chartSpecInfo));\n });\n }\n }\n\n if (polarAxis && !hasInitAxis) {\n const infoList = polarAxis.getSpecInfo(chartSpec);\n if (infoList?.length > 0) {\n hasInitAxis = true;\n infoList.forEach(info => {\n const cmp = Factory.getComponentInKey(info.type);\n results.push(callbackfn(cmp, info, chartSpecInfo));\n });\n }\n }\n\n if (geoCoordinate && !hasInitAxis) {\n geoCoordinate.getSpecInfo(chartSpec)?.forEach(info => {\n results.push(callbackfn(geoCoordinate, info, chartSpecInfo));\n });\n }\n\n if (label && chartSpecInfo) {\n label.getSpecInfo(chartSpec, chartSpecInfo)?.forEach(info => {\n results.push(callbackfn(label, info, chartSpecInfo));\n });\n }\n if (totalLabel && chartSpecInfo) {\n totalLabel.getSpecInfo(chartSpec, chartSpecInfo)?.forEach(info => {\n results.push(callbackfn(totalLabel, info, chartSpecInfo));\n });\n }\n\n noAxisComponents.forEach(C => {\n C.getSpecInfo(chartSpec)?.forEach(info => {\n results.push(callbackfn(C, info, chartSpecInfo));\n });\n });\n\n return results;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/chart/base/base-chart-transformer.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAKhD,qCAAqC;AAGrC,yDAA8D;AAC9D,iEAAyD;AACzD,iCAAoE;AAEpE,MAAa,wBAAwB;IAMnC,YAAY,MAAmC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACtC,CAAC;IAGD,aAAa,CAAC,SAAY;QACxB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAOD,aAAa,CAAC,SAAY;QACxB,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACtD,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,IAAA,YAAG,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE;YAC9B,SAAS,CAAC,OAAO,GAAG,EAAE,CAAC;SACxB;QACD,IAAI,IAAA,gBAAO,EAAC,SAAS,CAAC,YAAY,CAAC,EAAE;YACnC,SAAS,CAAC,MAAM,CAAC,OAAO,CACtB,CAAC,CAAc,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAO,EAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC,CAC1F,CAAC;SACH;IACH,CAAC;IAOD,kBAAkB,CAAC,SAAY;QAC7B,MAAM,SAAS,GAAG,CAAC,WAA8B,EAAE,QAAwB,EAAE,aAA8B,EAAE,EAA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QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAGD,mBAAmB,CAAC,IAAO;QACzB,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5C,IAAI,CAAC,MAAM,GAAG,CAAC,iBAAiB,CAAC,CAAC;SACnC;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACtB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;oBAChC,OAAO;iBACR;gBACD,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;oBACzC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;wBACb,CAAC,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;qBAC7B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;CACF;AAlUD,4DAkUC","file":"base-chart-transformer.js","sourcesContent":["import { has, isValid } from '@visactor/vutils';\nimport type { IChartSpec, IRegionSpec, ISeriesSpec } from '../../typings';\nimport type { IChartSpecInfo, IChartSpecTransformer, IChartSpecTransformerOption } from '../interface';\nimport type { IModelConstructor, IModelSpecInfo } from '../../model/interface';\nimport type { IRegionConstructor, IRegionSpecInfo } from '../../region/interface';\nimport { Factory } from '../../core';\nimport type { ISeriesConstructor } from '../../series';\nimport type { IComponentConstructor } from '../../component/interface/common';\nimport { ComponentTypeEnum } from '../../component/interface';\nimport { setProperty } from '@visactor/vutils-extension';\nimport { getRelatedRegionInfo, getRelatedSeriesInfo } from './util';\n\nexport class BaseChartSpecTransformer<T extends IChartSpec> implements IChartSpecTransformer {\n readonly type: string;\n readonly seriesType: string;\n\n protected _option: IChartSpecTransformerOption;\n\n constructor(option: IChartSpecTransformerOption) {\n this._option = option;\n this.type = option.type;\n this.seriesType = option.seriesType;\n }\n\n /** 此方法不建议重写 */\n initChartSpec(chartSpec: T): IChartSpecInfo {\n this.transformSpec(chartSpec);\n return this.transformModelSpec(chartSpec);\n }\n\n /**\n * 转换 chart spec。包含以下步骤:\n * - 将图表 spec 统一转换为 common 图表 spec\n * - 图表层级的在初始化阶段的 spec 修改\n */\n transformSpec(chartSpec: T): void {\n if (!chartSpec.region || chartSpec.region.length === 0) {\n chartSpec.region = [{}];\n }\n if (!has(chartSpec, 'tooltip')) {\n chartSpec.tooltip = {};\n }\n if (isValid(chartSpec.stackInverse)) {\n chartSpec.region.forEach(\n (r: IRegionSpec) => !isValid(r.stackInverse) && (r.stackInverse = chartSpec.stackInverse)\n );\n }\n }\n\n /**\n * 转换 model spec。包含以下步骤:\n * - model 层级的主题合并\n * - model 层级的在初始化阶段的 spec 修改,如添加 label spec\n */\n transformModelSpec(chartSpec: T): IChartSpecInfo {\n const transform = (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => {\n const { spec, specPath, specInfoPath, type } = specInfo;\n const transformer = new constructor.transformerConstructor({\n type,\n getTheme: this._option.getTheme\n });\n // 调用 model 自己的 transformer 进行转换\n const transformResult = transformer.transformSpec(spec, chartSpec, chartSpecInfo);\n setProperty(chartSpec, specPath, transformResult.spec);\n setProperty(chartSpecInfo, specInfoPath ?? specPath, {\n ...specInfo,\n ...transformResult\n });\n };\n return this.createSpecInfo(chartSpec, transform);\n }\n\n /** 遍历图表 spec 中包含的所有的 model,进行 spec 转换并生成图表 spec info */\n createSpecInfo(\n chartSpec: T,\n transform?: (\n /** 当前 model 的类 */\n constructor: IModelConstructor,\n /** 当前 model 的 spec info */\n specInfo: IModelSpecInfo,\n /** 图表 spec info */\n chartSpecInfo?: IChartSpecInfo\n ) => void\n ): IChartSpecInfo {\n if (!transform) {\n transform = (constructor: IModelConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => {\n const { spec, specPath, specInfoPath, type } = specInfo;\n const transformer = new constructor.transformerConstructor({\n type,\n getTheme: this._option.getTheme\n });\n setProperty(chartSpecInfo, specInfoPath ?? specPath, {\n ...specInfo,\n theme: transformer.getTheme(spec, chartSpec)\n });\n };\n }\n\n const currentChartSpecInfo: IChartSpecInfo = {};\n\n // 预处理 region\n this.forEachRegionInSpec(chartSpec, transform, currentChartSpecInfo);\n // 预处理 series\n this.forEachSeriesInSpec(chartSpec, transform, currentChartSpecInfo);\n // 记录每个 series 关联的 region\n currentChartSpecInfo.series?.forEach((seriesSpecInfo, i) => {\n const region = getRelatedRegionInfo(seriesSpecInfo, currentChartSpecInfo) ?? currentChartSpecInfo.region?.[0];\n if (region) {\n if (!region.seriesIndexes) {\n region.seriesIndexes = [];\n }\n region.seriesIndexes.push(i);\n seriesSpecInfo.regionIndexes = region.regionIndexes.slice();\n }\n });\n // 预处理 component\n this.forEachComponentInSpec(chartSpec, transform, currentChartSpecInfo);\n // 记录每个 component 关联的 region、series\n Object.values(currentChartSpecInfo.component ?? {}).forEach(specInfoList =>\n specInfoList.forEach((componentSpecInfo, i) => {\n if (!componentSpecInfo) {\n return;\n }\n if (!componentSpecInfo.regionIndexes) {\n const region =\n getRelatedRegionInfo(componentSpecInfo, currentChartSpecInfo) ?? currentChartSpecInfo.region?.[0];\n componentSpecInfo.regionIndexes = region?.regionIndexes.slice();\n }\n if (!componentSpecInfo.seriesIndexes) {\n const seriesInfo = getRelatedSeriesInfo(componentSpecInfo, currentChartSpecInfo);\n if (!seriesInfo) {\n const seriesIndexSet = new Set<number>();\n (componentSpecInfo.regionIndexes ?? []).forEach(regionIndex => {\n const region = currentChartSpecInfo.region?.[regionIndex];\n region?.seriesIndexes?.forEach(seriesIndex => seriesIndexSet.add(seriesIndex));\n });\n componentSpecInfo.seriesIndexes = Array.from(seriesIndexSet);\n } else {\n componentSpecInfo.seriesIndexes = seriesInfo.map(({ seriesIndexes }) => seriesIndexes[0]);\n }\n }\n })\n );\n return currentChartSpecInfo;\n }\n\n protected _isValidSeries(seriesType: string): boolean {\n return true;\n }\n\n protected _getDefaultSeriesSpec(chartSpec: any) {\n const series: any = {\n dataKey: chartSpec.dataKey,\n\n hover: chartSpec.hover,\n select: chartSpec.select,\n\n label: chartSpec.label,\n\n seriesStyle: chartSpec.seriesStyle,\n\n animation: chartSpec.animation ?? this._option.animation,\n animationThreshold: chartSpec.animationThreshold ?? this._option.getTheme?.().animationThreshold,\n animationAppear: chartSpec.animationAppear,\n animationDisappear: chartSpec.animationDisappear,\n animationEnter: chartSpec.animationEnter,\n animationUpdate: chartSpec.animationUpdate,\n animationExit: chartSpec.animationExit,\n animationNormal: chartSpec.animationNormal,\n\n extensionMark: chartSpec.extensionMark,\n\n large: chartSpec.large,\n largeThreshold: chartSpec.largeThreshold,\n progressiveStep: chartSpec.progressiveStep,\n progressiveThreshold: chartSpec.progressiveThreshold,\n background: chartSpec.seriesBackground,\n\n invalidType: chartSpec.invalidType,\n\n seriesField: chartSpec.seriesField,\n\n morph: chartSpec.morph,\n\n interactions: chartSpec.interactions\n };\n return series;\n }\n\n /** 遍历 spec 中每个有效的 region */\n forEachRegionInSpec<K>(\n chartSpec: T,\n callbackfn: (constructor: IRegionConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K,\n chartSpecInfo?: IChartSpecInfo\n ): K[] {\n const regionSpec = (chartSpec.region as IRegionSpec[]) ?? [];\n return regionSpec.map((spec, index) =>\n callbackfn(\n Factory.getRegionInType('region'),\n {\n spec,\n specPath: ['region', index],\n type: 'region',\n regionIndexes: [index]\n },\n chartSpecInfo\n )\n );\n }\n\n /** 遍历 spec 中每个有效的 series */\n forEachSeriesInSpec<K>(\n chartSpec: T,\n callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K,\n chartSpecInfo?: IChartSpecInfo\n ): K[] {\n const seriesSpec = (chartSpec.series as ISeriesSpec[]) ?? [];\n return seriesSpec.map((spec, index) =>\n callbackfn(\n Factory.getSeriesInType(spec.type),\n {\n spec,\n specPath: ['series', index],\n type: spec.type,\n seriesIndexes: [index]\n },\n chartSpecInfo\n )\n );\n }\n\n /** 遍历 spec 中每个有效的 component */\n forEachComponentInSpec<K>(\n chartSpec: T,\n callbackfn: (constructor: IComponentConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K,\n chartSpecInfo?: IChartSpecInfo\n ): K[] {\n const results: K[] = [];\n const components = Factory.getComponents();\n\n // 坐标轴组件只需要调用一次\n let cartesianAxis: IComponentConstructor;\n let polarAxis: IComponentConstructor;\n let geoCoordinate: IComponentConstructor;\n let label: IComponentConstructor;\n let totalLabel: IComponentConstructor;\n const noAxisComponents = [];\n for (let index = 0; index < components.length; index++) {\n const { cmp, alwaysCheck } = components[index];\n if (cmp.type.startsWith(ComponentTypeEnum.cartesianAxis)) {\n cartesianAxis = cmp;\n } else if (cmp.type.startsWith(ComponentTypeEnum.polarAxis)) {\n polarAxis = cmp;\n } else if (cmp.type === ComponentTypeEnum.geoCoordinate) {\n geoCoordinate = cmp;\n } else if (alwaysCheck || chartSpec[cmp.specKey ?? cmp.type]) {\n if (cmp.type === ComponentTypeEnum.label) {\n label = cmp;\n } else if (cmp.type === ComponentTypeEnum.totalLabel) {\n totalLabel = cmp;\n } else {\n noAxisComponents.push(cmp);\n }\n }\n }\n\n let hasInitAxis = false;\n // NOTE: 坐标轴组件需要在其他组件之前创建\n if (cartesianAxis) {\n const infoList = cartesianAxis.getSpecInfo(chartSpec, chartSpecInfo);\n if (infoList?.length > 0) {\n hasInitAxis = true;\n infoList.forEach(info => {\n const cmp = Factory.getComponentInKey(info.type);\n results.push(callbackfn(cmp, info, chartSpecInfo));\n });\n }\n }\n\n if (polarAxis && !hasInitAxis) {\n const infoList = polarAxis.getSpecInfo(chartSpec, chartSpecInfo);\n if (infoList?.length > 0) {\n hasInitAxis = true;\n infoList.forEach(info => {\n const cmp = Factory.getComponentInKey(info.type);\n results.push(callbackfn(cmp, info, chartSpecInfo));\n });\n }\n }\n\n if (geoCoordinate && !hasInitAxis) {\n geoCoordinate.getSpecInfo(chartSpec, chartSpecInfo)?.forEach(info => {\n results.push(callbackfn(geoCoordinate, info, chartSpecInfo));\n });\n }\n\n if (label && chartSpecInfo) {\n label.getSpecInfo(chartSpec, chartSpecInfo)?.forEach(info => {\n results.push(callbackfn(label, info, chartSpecInfo));\n });\n }\n if (totalLabel && chartSpecInfo) {\n totalLabel.getSpecInfo(chartSpec, chartSpecInfo)?.forEach(info => {\n results.push(callbackfn(totalLabel, info, chartSpecInfo));\n });\n }\n\n noAxisComponents.forEach(C => {\n C.getSpecInfo(chartSpec, chartSpecInfo)?.forEach(info => {\n results.push(callbackfn(C, info, chartSpecInfo));\n });\n });\n\n return results;\n }\n\n /** 处理series配置 */\n transformSeriesSpec(spec: T): void {\n const defaultSeriesSpec = this._getDefaultSeriesSpec(spec);\n if (!spec.series || spec.series.length === 0) {\n spec.series = [defaultSeriesSpec];\n } else {\n spec.series.forEach(s => {\n if (!this._isValidSeries(s.type)) {\n return;\n }\n Object.keys(defaultSeriesSpec).forEach(k => {\n if (!(k in s)) {\n s[k] = defaultSeriesSpec[k];\n }\n });\n });\n }\n }\n}\n"]}
@@ -96,6 +96,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
96
96
  getComponentByIndex: (key: string, index: number) => IComponent;
97
97
  getComponentsByKey: (key: string) => IComponent[];
98
98
  getComponentByUserId: (userId: StringOrNumber) => IComponent;
99
+ getComponentsByType: (type: string) => IComponent[];
99
100
  getModelById(id: number): IModel | undefined;
100
101
  getModelByUserId(userId: StringOrNumber): IModel | undefined;
101
102
  getAllMarks(): IMark[];
@@ -38,7 +38,7 @@ class BaseChart extends compilable_base_1.CompilableBase {
38
38
  setLayoutTag(tag, morphConfig, reLayout = !0) {
39
39
  var _a;
40
40
  return this._layoutTag = tag, (null === (_a = this.getCompiler()) || void 0 === _a ? void 0 : _a.getVGrammarView()) && (this.getCompiler().getVGrammarView().updateLayoutTag(),
41
- tag && reLayout && this.getCompiler().renderAsync(morphConfig)), this._layoutTag;
41
+ tag && reLayout && this.getCompiler().renderNextTick(morphConfig)), this._layoutTag;
42
42
  }
43
43
  getEvent() {
44
44
  return this._event;
@@ -91,7 +91,8 @@ class BaseChart extends compilable_base_1.CompilableBase {
91
91
  this.getComponentByUserId = userId => {
92
92
  const component = this._components.find((s => s.userId === userId));
93
93
  if (component) return component;
94
- }, this._paddingSpec = (0, util_1.normalizeLayoutPaddingSpec)(null !== (_a = spec.padding) && void 0 !== _a ? _a : option.getTheme().padding),
94
+ }, this.getComponentsByType = type => this._components.filter((c => c.type === type)),
95
+ this._paddingSpec = (0, util_1.normalizeLayoutPaddingSpec)(null !== (_a = spec.padding) && void 0 !== _a ? _a : option.getTheme().padding),
95
96
  this._event = new event_1.Event(option.eventDispatcher, option.mode), this._dataSet = option.dataSet,
96
97
  this._chartData = new data_1.ChartData(this._dataSet, null === (_b = this._option) || void 0 === _b ? void 0 : _b.onError),
97
98
  this._modelOption = Object.assign(Object.assign({}, option), {
@@ -191,7 +192,8 @@ class BaseChart extends compilable_base_1.CompilableBase {
191
192
  getAllComponents: this.getComponents,
192
193
  getComponentByIndex: this.getComponentByIndex,
193
194
  getComponentByUserId: this.getComponentByUserId,
194
- getComponentsByKey: this.getComponentsByKey
195
+ getComponentsByKey: this.getComponentsByKey,
196
+ getComponentsByType: this.getComponentsByType
195
197
  }));
196
198
  component && (component.created(), this._components.push(component));
197
199
  }
@@ -267,11 +269,11 @@ class BaseChart extends compilable_base_1.CompilableBase {
267
269
  if (model && model instanceof base_model_1.BaseModel) return model;
268
270
  }
269
271
  getModelByUserId(userId) {
270
- const series = this._series.find((s => s.userId === userId));
272
+ const series = this.getSeriesInUserId(userId);
271
273
  if (series) return series;
272
- const region = this._regions.find((s => s.userId === userId));
274
+ const region = this.getRegionsInUserId(userId);
273
275
  if (region) return region;
274
- const component = this._components.find((s => s.userId === userId));
276
+ const component = this.getComponentByUserId(userId);
275
277
  return component || void 0;
276
278
  }
277
279
  getAllMarks() {
@@ -604,7 +606,7 @@ class BaseChart extends compilable_base_1.CompilableBase {
604
606
  const isUnableValue = (0, vutils_1.isNil)(value) || !dimensionInfo || dimensionInfo.every((d => (0,
605
607
  vscale_1.isDiscrete)(d.axis.getScale().type) && (0, vutils_1.isNil)(d.index)));
606
608
  if (!1 !== opt.tooltip) {
607
- const tooltip = this._components.find((c => c.type === interface_1.ComponentTypeEnum.tooltip));
609
+ const tooltip = this.getComponentsByType(interface_1.ComponentTypeEnum.tooltip)[0];
608
610
  if (null == tooltip ? void 0 : tooltip.getVisible()) if (isUnableValue) null === (_b = (_a = tooltip).hideTooltip) || void 0 === _b || _b.call(_a); else {
609
611
  const dataFilter = {};
610
612
  dimensionInfo.forEach((d => {
@@ -616,7 +618,7 @@ class BaseChart extends compilable_base_1.CompilableBase {
616
618
  }
617
619
  }
618
620
  if (!1 !== opt.crosshair) {
619
- const crosshair = this._components.find((c => c.type === interface_1.ComponentTypeEnum.cartesianCrosshair));
621
+ const crosshair = this.getComponentsByType(interface_1.ComponentTypeEnum.cartesianCrosshair)[0];
620
622
  crosshair && crosshair.clearAxisValue && crosshair.setAxisValue && (isUnableValue ? (null === (_c = crosshair.clearAxisValue) || void 0 === _c || _c.call(crosshair),
621
623
  null === (_d = crosshair.hide) || void 0 === _d || _d.call(crosshair)) : dimensionInfo.forEach((d => {
622
624
  const {axis: axis, value: value} = d;