@visactor/vchart 1.2.3 → 1.3.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1921) hide show
  1. package/build/es5/index.js +3 -3
  2. package/build/index.js +67887 -64461
  3. package/build/index.min.js +15 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/animation/spec.d.ts +1 -1
  6. package/cjs/animation/spec.js.map +1 -1
  7. package/cjs/animation/utils.js +2 -2
  8. package/cjs/animation/utils.js.map +1 -1
  9. package/cjs/chart/area/area.js +2 -3
  10. package/cjs/chart/area/area.js.map +1 -1
  11. package/cjs/chart/bar/bar-3d.js +2 -2
  12. package/cjs/chart/bar/bar-3d.js.map +1 -1
  13. package/cjs/chart/bar/bar.js +2 -2
  14. package/cjs/chart/bar/bar.js.map +1 -1
  15. package/cjs/chart/base-chart.d.ts +5 -2
  16. package/cjs/chart/base-chart.js +48 -42
  17. package/cjs/chart/base-chart.js.map +1 -1
  18. package/cjs/chart/box-plot/box-plot.js +2 -2
  19. package/cjs/chart/box-plot/box-plot.js.map +1 -1
  20. package/cjs/chart/cartesian/cartesian.js +3 -2
  21. package/cjs/chart/cartesian/cartesian.js.map +1 -1
  22. package/cjs/chart/circle-packing/circle-packing.js +2 -2
  23. package/cjs/chart/circle-packing/circle-packing.js.map +1 -1
  24. package/cjs/chart/funnel/funnel-3d.js +2 -2
  25. package/cjs/chart/funnel/funnel-3d.js.map +1 -1
  26. package/cjs/chart/funnel/funnel.js +2 -2
  27. package/cjs/chart/funnel/funnel.js.map +1 -1
  28. package/cjs/chart/gauge/gauge.js +2 -2
  29. package/cjs/chart/gauge/gauge.js.map +1 -1
  30. package/cjs/chart/heatmap/heatmap.js +2 -2
  31. package/cjs/chart/heatmap/heatmap.js.map +1 -1
  32. package/cjs/chart/histogram/histogram-3d.js +2 -2
  33. package/cjs/chart/histogram/histogram-3d.js.map +1 -1
  34. package/cjs/chart/histogram/histogram.js +2 -2
  35. package/cjs/chart/histogram/histogram.js.map +1 -1
  36. package/cjs/chart/index.d.ts +2 -2
  37. package/cjs/chart/index.js +3 -3
  38. package/cjs/chart/index.js.map +1 -1
  39. package/cjs/chart/interface/chart.d.ts +4 -2
  40. package/cjs/chart/interface/chart.js.map +1 -1
  41. package/cjs/chart/line/line.js +2 -3
  42. package/cjs/chart/line/line.js.map +1 -1
  43. package/cjs/chart/map/map.js +2 -2
  44. package/cjs/chart/map/map.js.map +1 -1
  45. package/cjs/chart/pie/pie-3d.js +2 -2
  46. package/cjs/chart/pie/pie-3d.js.map +1 -1
  47. package/cjs/chart/pie/pie.js +2 -2
  48. package/cjs/chart/pie/pie.js.map +1 -1
  49. package/cjs/chart/polar/progress-like.js +2 -2
  50. package/cjs/chart/polar/progress-like.js.map +1 -1
  51. package/cjs/chart/polar/rose-like.js +1 -1
  52. package/cjs/chart/polar/rose-like.js.map +1 -1
  53. package/cjs/chart/progress/circular/circular.js +2 -2
  54. package/cjs/chart/progress/circular/circular.js.map +1 -1
  55. package/cjs/chart/progress/linear/linear.js +4 -4
  56. package/cjs/chart/progress/linear/linear.js.map +1 -1
  57. package/cjs/chart/radar/radar.js +4 -5
  58. package/cjs/chart/radar/radar.js.map +1 -1
  59. package/cjs/chart/range-area/range-area.js +2 -2
  60. package/cjs/chart/range-area/range-area.js.map +1 -1
  61. package/cjs/chart/range-column/range-column-3d.js +2 -2
  62. package/cjs/chart/range-column/range-column-3d.js.map +1 -1
  63. package/cjs/chart/range-column/range-column.js +2 -2
  64. package/cjs/chart/range-column/range-column.js.map +1 -1
  65. package/cjs/chart/rose/rose.js +3 -3
  66. package/cjs/chart/rose/rose.js.map +1 -1
  67. package/cjs/chart/sankey/sankey.js +2 -2
  68. package/cjs/chart/sankey/sankey.js.map +1 -1
  69. package/cjs/chart/scatter/scatter.js +2 -2
  70. package/cjs/chart/scatter/scatter.js.map +1 -1
  71. package/cjs/chart/sequence/sequence.js +2 -2
  72. package/cjs/chart/sequence/sequence.js.map +1 -1
  73. package/cjs/chart/stack.d.ts +1 -0
  74. package/cjs/chart/stack.js +14 -0
  75. package/cjs/chart/stack.js.map +1 -1
  76. package/cjs/chart/sunburst/sunburst.js +2 -2
  77. package/cjs/chart/sunburst/sunburst.js.map +1 -1
  78. package/cjs/chart/treemap/treemap.d.ts +1 -1
  79. package/cjs/chart/treemap/treemap.js +6 -6
  80. package/cjs/chart/treemap/treemap.js.map +1 -1
  81. package/cjs/chart/util.d.ts +8 -0
  82. package/cjs/chart/util.js +33 -4
  83. package/cjs/chart/util.js.map +1 -1
  84. package/cjs/chart/waterfall/waterfall.js +2 -2
  85. package/cjs/chart/waterfall/waterfall.js.map +1 -1
  86. package/cjs/chart/word-cloud/word-cloud-3d.js +2 -2
  87. package/cjs/chart/word-cloud/word-cloud-3d.js.map +1 -1
  88. package/cjs/chart/word-cloud/word-cloud.js +2 -2
  89. package/cjs/chart/word-cloud/word-cloud.js.map +1 -1
  90. package/cjs/compile/compiler.d.ts +5 -1
  91. package/cjs/compile/compiler.js +8 -3
  92. package/cjs/compile/compiler.js.map +1 -1
  93. package/cjs/compile/interface/compilable-item.d.ts +1 -0
  94. package/cjs/compile/interface/compilable-item.js.map +1 -1
  95. package/cjs/compile/mark/compilable-mark.js +9 -10
  96. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  97. package/cjs/compile/mark/interface.d.ts +2 -1
  98. package/cjs/compile/mark/interface.js.map +1 -1
  99. package/cjs/compile/mark/util.d.ts +2 -1
  100. package/cjs/compile/mark/util.js +21 -5
  101. package/cjs/compile/mark/util.js.map +1 -1
  102. package/cjs/component/axis/base-axis.d.ts +17 -27
  103. package/cjs/component/axis/base-axis.js +18 -28
  104. package/cjs/component/axis/base-axis.js.map +1 -1
  105. package/cjs/component/axis/cartesian/axis.d.ts +3 -3
  106. package/cjs/component/axis/cartesian/axis.js +35 -26
  107. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  108. package/cjs/component/axis/cartesian/band-axis.d.ts +3 -3
  109. package/cjs/component/axis/cartesian/band-axis.js +1 -0
  110. package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
  111. package/cjs/component/axis/cartesian/index.d.ts +1 -0
  112. package/cjs/component/axis/cartesian/index.js +2 -1
  113. package/cjs/component/axis/cartesian/index.js.map +1 -1
  114. package/cjs/component/axis/cartesian/interface/common.d.ts +6 -1
  115. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  116. package/cjs/component/axis/cartesian/interface/spec.d.ts +4 -1
  117. package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
  118. package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -3
  119. package/cjs/component/axis/cartesian/linear-axis.js +4 -3
  120. package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
  121. package/cjs/component/axis/cartesian/log-axis.d.ts +3 -2
  122. package/cjs/component/axis/cartesian/log-axis.js.map +1 -1
  123. package/cjs/component/axis/cartesian/symlog-axis.d.ts +16 -0
  124. package/cjs/component/axis/cartesian/symlog-axis.js +23 -0
  125. package/cjs/component/axis/cartesian/symlog-axis.js.map +1 -0
  126. package/cjs/component/axis/cartesian/time-axis.d.ts +3 -2
  127. package/cjs/component/axis/cartesian/time-axis.js +2 -2
  128. package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
  129. package/cjs/component/axis/interface.d.ts +11 -8
  130. package/cjs/component/axis/interface.js.map +1 -1
  131. package/cjs/component/axis/mixin/linear-axis-mixin.js +3 -3
  132. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  133. package/cjs/component/axis/polar/axis.d.ts +4 -3
  134. package/cjs/component/axis/polar/axis.js +17 -14
  135. package/cjs/component/axis/polar/axis.js.map +1 -1
  136. package/cjs/component/axis/polar/band-axis.d.ts +4 -2
  137. package/cjs/component/axis/polar/band-axis.js.map +1 -1
  138. package/cjs/component/axis/polar/interface/common.d.ts +1 -1
  139. package/cjs/component/axis/polar/interface/common.js.map +1 -1
  140. package/cjs/component/axis/polar/interface/spec.d.ts +7 -2
  141. package/cjs/component/axis/polar/interface/spec.js.map +1 -1
  142. package/cjs/component/axis/polar/linear-axis.d.ts +2 -3
  143. package/cjs/component/axis/polar/linear-axis.js.map +1 -1
  144. package/cjs/component/axis/util.d.ts +28 -0
  145. package/cjs/component/axis/util.js +71 -0
  146. package/cjs/component/axis/util.js.map +1 -0
  147. package/cjs/component/base/base-component.d.ts +15 -4
  148. package/cjs/component/base/base-component.js +20 -8
  149. package/cjs/component/base/base-component.js.map +1 -1
  150. package/cjs/component/base/interface.d.ts +8 -0
  151. package/cjs/component/base/interface.js +6 -0
  152. package/cjs/component/base/interface.js.map +1 -0
  153. package/cjs/component/base/util.d.ts +2 -1
  154. package/cjs/component/base/util.js +21 -16
  155. package/cjs/component/base/util.js.map +1 -1
  156. package/cjs/component/brush/brush.d.ts +14 -4
  157. package/cjs/component/brush/brush.js +75 -64
  158. package/cjs/component/brush/brush.js.map +1 -1
  159. package/cjs/component/brush/interface.d.ts +1 -0
  160. package/cjs/component/brush/interface.js.map +1 -1
  161. package/cjs/component/crosshair/base.d.ts +5 -4
  162. package/cjs/component/crosshair/base.js +2 -2
  163. package/cjs/component/crosshair/base.js.map +1 -1
  164. package/cjs/component/crosshair/cartesian.d.ts +3 -3
  165. package/cjs/component/crosshair/cartesian.js +10 -10
  166. package/cjs/component/crosshair/cartesian.js.map +1 -1
  167. package/cjs/component/crosshair/interface/spec.d.ts +8 -8
  168. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  169. package/cjs/component/crosshair/interface/theme.d.ts +3 -1
  170. package/cjs/component/crosshair/interface/theme.js.map +1 -1
  171. package/cjs/component/crosshair/polar.d.ts +3 -3
  172. package/cjs/component/crosshair/polar.js +9 -9
  173. package/cjs/component/crosshair/polar.js.map +1 -1
  174. package/cjs/component/crosshair/util.d.ts +5 -0
  175. package/cjs/component/crosshair/util.js +41 -4
  176. package/cjs/component/crosshair/util.js.map +1 -1
  177. package/cjs/component/custom-mark/custom-mark.d.ts +3 -2
  178. package/cjs/component/custom-mark/custom-mark.js +3 -3
  179. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  180. package/cjs/component/data-zoom/data-filter-base-component.d.ts +5 -5
  181. package/cjs/component/data-zoom/data-filter-base-component.js +2 -9
  182. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  183. package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
  184. package/cjs/component/data-zoom/data-zoom/data-zoom.js +7 -7
  185. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  186. package/cjs/component/data-zoom/data-zoom/interface.d.ts +3 -1
  187. package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
  188. package/cjs/component/data-zoom/interface.d.ts +3 -3
  189. package/cjs/component/data-zoom/interface.js.map +1 -1
  190. package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
  191. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  192. package/cjs/component/geo/geo-coordinate.d.ts +10 -4
  193. package/cjs/component/geo/geo-coordinate.js +65 -15
  194. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  195. package/cjs/component/geo/projection.d.ts +1 -0
  196. package/cjs/component/geo/projection.js +4 -0
  197. package/cjs/component/geo/projection.js.map +1 -1
  198. package/cjs/component/index.d.ts +3 -2
  199. package/cjs/component/index.js +15 -1
  200. package/cjs/component/index.js.map +1 -1
  201. package/cjs/component/indicator/indicator.d.ts +3 -2
  202. package/cjs/component/indicator/indicator.js +11 -8
  203. package/cjs/component/indicator/indicator.js.map +1 -1
  204. package/cjs/component/indicator/interface.d.ts +5 -4
  205. package/cjs/component/indicator/interface.js.map +1 -1
  206. package/cjs/component/interface/theme.d.ts +4 -2
  207. package/cjs/component/interface/theme.js.map +1 -1
  208. package/cjs/component/interface/type.d.ts +2 -0
  209. package/cjs/component/interface/type.js +13 -12
  210. package/cjs/component/interface/type.js.map +1 -1
  211. package/cjs/component/label/base-label.d.ts +39 -0
  212. package/cjs/component/label/base-label.js +39 -0
  213. package/cjs/component/label/base-label.js.map +1 -0
  214. package/cjs/component/label/interface.d.ts +12 -1
  215. package/cjs/component/label/interface.js.map +1 -1
  216. package/cjs/component/label/label.d.ts +7 -29
  217. package/cjs/component/label/label.js +32 -44
  218. package/cjs/component/label/label.js.map +1 -1
  219. package/cjs/component/label/pie.d.ts +5 -0
  220. package/cjs/component/label/pie.js +21 -0
  221. package/cjs/component/label/pie.js.map +1 -0
  222. package/cjs/component/label/totalLabel.d.ts +27 -0
  223. package/cjs/component/label/totalLabel.js +107 -0
  224. package/cjs/component/label/totalLabel.js.map +1 -0
  225. package/cjs/component/label/util.d.ts +3 -1
  226. package/cjs/component/label/util.js +5 -5
  227. package/cjs/component/label/util.js.map +1 -1
  228. package/cjs/component/legend/base-legend.d.ts +3 -2
  229. package/cjs/component/legend/base-legend.js +4 -4
  230. package/cjs/component/legend/base-legend.js.map +1 -1
  231. package/cjs/component/legend/continuous/legend.d.ts +3 -4
  232. package/cjs/component/legend/continuous/legend.js.map +1 -1
  233. package/cjs/component/legend/continuous/util.js +4 -4
  234. package/cjs/component/legend/continuous/util.js.map +1 -1
  235. package/cjs/component/legend/discrete/interface.d.ts +3 -1
  236. package/cjs/component/legend/discrete/interface.js.map +1 -1
  237. package/cjs/component/legend/discrete/legend.d.ts +1 -2
  238. package/cjs/component/legend/discrete/legend.js +2 -2
  239. package/cjs/component/legend/discrete/legend.js.map +1 -1
  240. package/cjs/component/legend/discrete/util.js +2 -2
  241. package/cjs/component/legend/discrete/util.js.map +1 -1
  242. package/cjs/component/legend/interface.d.ts +2 -6
  243. package/cjs/component/legend/interface.js.map +1 -1
  244. package/cjs/component/legend/util.js +2 -2
  245. package/cjs/component/legend/util.js.map +1 -1
  246. package/cjs/component/map-label/component.d.ts +1 -2
  247. package/cjs/component/map-label/component.js.map +1 -1
  248. package/cjs/component/marker/base-marker.d.ts +8 -2
  249. package/cjs/component/marker/base-marker.js +14 -0
  250. package/cjs/component/marker/base-marker.js.map +1 -1
  251. package/cjs/component/marker/interface.d.ts +3 -2
  252. package/cjs/component/marker/interface.js.map +1 -1
  253. package/cjs/component/marker/mark-area/mark-area.d.ts +1 -2
  254. package/cjs/component/marker/mark-area/mark-area.js +17 -6
  255. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  256. package/cjs/component/marker/mark-line/mark-line.d.ts +1 -2
  257. package/cjs/component/marker/mark-line/mark-line.js +17 -6
  258. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  259. package/cjs/component/marker/mark-point/mark-point.d.ts +1 -2
  260. package/cjs/component/marker/mark-point/mark-point.js +18 -7
  261. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  262. package/cjs/component/player/player.d.ts +1 -2
  263. package/cjs/component/player/player.js.map +1 -1
  264. package/cjs/component/poptip/interface.d.ts +15 -0
  265. package/cjs/component/poptip/interface.js +6 -0
  266. package/cjs/component/poptip/interface.js.map +1 -0
  267. package/cjs/component/title/interface/spec.d.ts +2 -2
  268. package/cjs/component/title/interface/spec.js.map +1 -1
  269. package/cjs/component/title/title.d.ts +2 -2
  270. package/cjs/component/title/title.js +2 -1
  271. package/cjs/component/title/title.js.map +1 -1
  272. package/cjs/component/tooltip/handler/base.js +3 -3
  273. package/cjs/component/tooltip/handler/base.js.map +1 -1
  274. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -1
  275. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
  276. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  277. package/cjs/component/tooltip/handler/dom/interface.d.ts +9 -12
  278. package/cjs/component/tooltip/handler/dom/interface.js.map +1 -1
  279. package/cjs/component/tooltip/handler/dom/model/content-column-model.d.ts +4 -6
  280. package/cjs/component/tooltip/handler/dom/model/content-column-model.js +19 -17
  281. package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
  282. package/cjs/component/tooltip/handler/dom/model/content-model.js +2 -2
  283. package/cjs/component/tooltip/handler/dom/model/content-model.js.map +1 -1
  284. package/cjs/component/tooltip/handler/dom/model/title-model.js +5 -5
  285. package/cjs/component/tooltip/handler/dom/model/title-model.js.map +1 -1
  286. package/cjs/component/tooltip/handler/dom/model/tooltip-model.js +2 -2
  287. package/cjs/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
  288. package/cjs/component/tooltip/handler/dom/util.js +20 -13
  289. package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
  290. package/cjs/component/tooltip/handler/utils/attribute.js +26 -25
  291. package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
  292. package/cjs/component/tooltip/handler/utils/compose.d.ts +2 -2
  293. package/cjs/component/tooltip/handler/utils/compose.js +13 -10
  294. package/cjs/component/tooltip/handler/utils/compose.js.map +1 -1
  295. package/cjs/component/tooltip/handler/utils/get-spec.js +3 -3
  296. package/cjs/component/tooltip/handler/utils/get-spec.js.map +1 -1
  297. package/cjs/component/tooltip/handler/utils/style.d.ts +1 -1
  298. package/cjs/component/tooltip/handler/utils/style.js +15 -10
  299. package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
  300. package/cjs/component/tooltip/interface/theme.d.ts +6 -4
  301. package/cjs/component/tooltip/interface/theme.js.map +1 -1
  302. package/cjs/component/tooltip/processor/base.js +1 -1
  303. package/cjs/component/tooltip/processor/base.js.map +1 -1
  304. package/cjs/component/tooltip/tooltip.d.ts +4 -3
  305. package/cjs/component/tooltip/tooltip.js +14 -7
  306. package/cjs/component/tooltip/tooltip.js.map +1 -1
  307. package/cjs/constant/index.d.ts +3 -0
  308. package/cjs/constant/index.js +4 -3
  309. package/cjs/constant/index.js.map +1 -1
  310. package/cjs/core/index.d.ts +1 -1
  311. package/cjs/core/index.js +1 -1
  312. package/cjs/core/index.js.map +1 -1
  313. package/cjs/core/interface.d.ts +3 -0
  314. package/cjs/core/interface.js.map +1 -1
  315. package/cjs/core/vchart.d.ts +6 -1
  316. package/cjs/core/vchart.js +75 -27
  317. package/cjs/core/vchart.js.map +1 -1
  318. package/cjs/data/initialize.js +9 -7
  319. package/cjs/data/initialize.js.map +1 -1
  320. package/cjs/data/transforms/data-key.d.ts +2 -2
  321. package/cjs/data/transforms/data-key.js.map +1 -1
  322. package/cjs/data/transforms/dimension-statistics.d.ts +11 -5
  323. package/cjs/data/transforms/dimension-statistics.js +34 -22
  324. package/cjs/data/transforms/dimension-statistics.js.map +1 -1
  325. package/cjs/data/transforms/invalid-travel.js +1 -2
  326. package/cjs/data/transforms/invalid-travel.js.map +1 -1
  327. package/cjs/data/transforms/legend-data/discrete/discrete.js +4 -2
  328. package/cjs/data/transforms/legend-data/discrete/discrete.js.map +1 -1
  329. package/cjs/data/transforms/tick-data/continuous.js +6 -3
  330. package/cjs/data/transforms/tick-data/continuous.js.map +1 -1
  331. package/cjs/data/transforms/tick-data/discrete/polar-angle.js +2 -2
  332. package/cjs/data/transforms/tick-data/discrete/polar-angle.js.map +1 -1
  333. package/cjs/data/transforms/tick-data/interface.d.ts +3 -0
  334. package/cjs/data/transforms/tick-data/interface.js.map +1 -1
  335. package/cjs/data/transforms/tick-data/util.js +5 -5
  336. package/cjs/data/transforms/tick-data/util.js.map +1 -1
  337. package/cjs/event/event-dispatcher.js +4 -2
  338. package/cjs/event/event-dispatcher.js.map +1 -1
  339. package/cjs/event/events/dimension/dimension-click.d.ts +1 -3
  340. package/cjs/event/events/dimension/dimension-click.js +9 -10
  341. package/cjs/event/events/dimension/dimension-click.js.map +1 -1
  342. package/cjs/event/events/dimension/dimension-hover.d.ts +2 -3
  343. package/cjs/event/events/dimension/dimension-hover.js +26 -17
  344. package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
  345. package/cjs/event/events/dimension/util/cartesian.js +2 -2
  346. package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
  347. package/cjs/event/events/dimension/util/polar.js +1 -1
  348. package/cjs/event/events/dimension/util/polar.js.map +1 -1
  349. package/cjs/event/interface.d.ts +3 -3
  350. package/cjs/event/interface.js.map +1 -1
  351. package/cjs/interaction/trigger.js +6 -2
  352. package/cjs/interaction/trigger.js.map +1 -1
  353. package/cjs/layout/label/arc-label.js.map +1 -1
  354. package/cjs/mark/base/base-mark.d.ts +1 -0
  355. package/cjs/mark/base/base-mark.js +21 -4
  356. package/cjs/mark/base/base-mark.js.map +1 -1
  357. package/cjs/mark/mark-set/index.d.ts +1 -0
  358. package/cjs/mark/mark-set/index.js.map +1 -1
  359. package/cjs/mark/symbol.js +1 -1
  360. package/cjs/mark/symbol.js.map +1 -1
  361. package/cjs/model/base-model.d.ts +6 -4
  362. package/cjs/model/base-model.js +16 -17
  363. package/cjs/model/base-model.js.map +1 -1
  364. package/cjs/model/interface.d.ts +8 -2
  365. package/cjs/model/interface.js.map +1 -1
  366. package/cjs/model/layout-item.d.ts +7 -7
  367. package/cjs/model/layout-item.js.map +1 -1
  368. package/cjs/model/tooltip-helper.d.ts +0 -2
  369. package/cjs/model/tooltip-helper.js +0 -3
  370. package/cjs/model/tooltip-helper.js.map +1 -1
  371. package/cjs/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
  372. package/cjs/plugin/components/index.d.ts +0 -2
  373. package/cjs/plugin/components/index.js +1 -2
  374. package/cjs/plugin/components/index.js.map +1 -1
  375. package/cjs/region/region.d.ts +3 -3
  376. package/cjs/region/region.js.map +1 -1
  377. package/cjs/series/area/area.d.ts +9 -4
  378. package/cjs/series/area/area.js +44 -21
  379. package/cjs/series/area/area.js.map +1 -1
  380. package/cjs/series/area/constant.d.ts +2 -0
  381. package/cjs/series/area/constant.js +15 -0
  382. package/cjs/series/area/constant.js.map +1 -0
  383. package/cjs/series/area/interface.d.ts +2 -0
  384. package/cjs/series/area/interface.js.map +1 -1
  385. package/cjs/series/area/tooltip-helpter.d.ts +5 -0
  386. package/cjs/series/area/tooltip-helpter.js +24 -0
  387. package/cjs/series/area/tooltip-helpter.js.map +1 -0
  388. package/cjs/series/bar/bar-3d.d.ts +3 -1
  389. package/cjs/series/bar/bar-3d.js +2 -7
  390. package/cjs/series/bar/bar-3d.js.map +1 -1
  391. package/cjs/series/bar/bar.d.ts +1 -0
  392. package/cjs/series/bar/bar.js +11 -16
  393. package/cjs/series/bar/bar.js.map +1 -1
  394. package/cjs/series/bar/constant.d.ts +3 -0
  395. package/cjs/series/bar/constant.js +20 -0
  396. package/cjs/series/bar/constant.js.map +1 -0
  397. package/cjs/series/bar/interface.d.ts +3 -2
  398. package/cjs/series/bar/interface.js.map +1 -1
  399. package/cjs/series/base/base-series.d.ts +8 -6
  400. package/cjs/series/base/base-series.js +87 -40
  401. package/cjs/series/base/base-series.js.map +1 -1
  402. package/cjs/series/base/constant.d.ts +2 -0
  403. package/cjs/series/base/constant.js +15 -0
  404. package/cjs/series/base/constant.js.map +1 -0
  405. package/cjs/series/base/tooltip-helper.d.ts +0 -1
  406. package/cjs/series/base/tooltip-helper.js +4 -5
  407. package/cjs/series/base/tooltip-helper.js.map +1 -1
  408. package/cjs/series/box-plot/box-plot.d.ts +1 -2
  409. package/cjs/series/box-plot/box-plot.js +6 -15
  410. package/cjs/series/box-plot/box-plot.js.map +1 -1
  411. package/cjs/series/box-plot/constant.d.ts +2 -0
  412. package/cjs/series/box-plot/constant.js +19 -0
  413. package/cjs/series/box-plot/constant.js.map +1 -0
  414. package/cjs/series/cartesian/cartesian.d.ts +12 -3
  415. package/cjs/series/cartesian/cartesian.js +41 -19
  416. package/cjs/series/cartesian/cartesian.js.map +1 -1
  417. package/cjs/series/cartesian/interface.d.ts +3 -2
  418. package/cjs/series/cartesian/interface.js.map +1 -1
  419. package/cjs/series/circle-packing/circle-packing.d.ts +1 -2
  420. package/cjs/series/circle-packing/circle-packing.js +6 -11
  421. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  422. package/cjs/series/circle-packing/constant.d.ts +2 -0
  423. package/cjs/series/circle-packing/constant.js +15 -0
  424. package/cjs/series/circle-packing/constant.js.map +1 -0
  425. package/cjs/series/dot/constant.d.ts +2 -0
  426. package/cjs/series/dot/constant.js +39 -0
  427. package/cjs/series/dot/constant.js.map +1 -0
  428. package/cjs/series/dot/dot.d.ts +2 -1
  429. package/cjs/series/dot/dot.js +6 -32
  430. package/cjs/series/dot/dot.js.map +1 -1
  431. package/cjs/series/funnel/constant.d.ts +3 -0
  432. package/cjs/series/funnel/constant.js +52 -0
  433. package/cjs/series/funnel/constant.js.map +1 -0
  434. package/cjs/series/funnel/funnel-3d.d.ts +3 -2
  435. package/cjs/series/funnel/funnel-3d.js +2 -23
  436. package/cjs/series/funnel/funnel-3d.js.map +1 -1
  437. package/cjs/series/funnel/funnel.d.ts +2 -1
  438. package/cjs/series/funnel/funnel.js +15 -26
  439. package/cjs/series/funnel/funnel.js.map +1 -1
  440. package/cjs/series/gauge/constant.d.ts +3 -0
  441. package/cjs/series/gauge/constant.js +32 -0
  442. package/cjs/series/gauge/constant.js.map +1 -0
  443. package/cjs/series/gauge/gauge-pointer.d.ts +2 -2
  444. package/cjs/series/gauge/gauge-pointer.js +5 -15
  445. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  446. package/cjs/series/gauge/gauge.d.ts +2 -1
  447. package/cjs/series/gauge/gauge.js +8 -14
  448. package/cjs/series/gauge/gauge.js.map +1 -1
  449. package/cjs/series/geo/geo.d.ts +2 -0
  450. package/cjs/series/geo/geo.js +5 -1
  451. package/cjs/series/geo/geo.js.map +1 -1
  452. package/cjs/series/heatmap/constant.d.ts +2 -0
  453. package/cjs/series/heatmap/constant.js +19 -0
  454. package/cjs/series/heatmap/constant.js.map +1 -0
  455. package/cjs/series/heatmap/heatmap.d.ts +2 -1
  456. package/cjs/series/heatmap/heatmap.js +6 -15
  457. package/cjs/series/heatmap/heatmap.js.map +1 -1
  458. package/cjs/series/index.d.ts +2 -2
  459. package/cjs/series/index.js +3 -3
  460. package/cjs/series/index.js.map +1 -1
  461. package/cjs/series/interface/common.d.ts +1 -0
  462. package/cjs/series/interface/common.js.map +1 -1
  463. package/cjs/series/interface/series.d.ts +3 -2
  464. package/cjs/series/interface/series.js.map +1 -1
  465. package/cjs/series/interface/theme.d.ts +3 -2
  466. package/cjs/series/interface/theme.js +34 -1
  467. package/cjs/series/interface/theme.js.map +1 -1
  468. package/cjs/series/line/constant.d.ts +2 -0
  469. package/cjs/series/line/constant.js +10 -0
  470. package/cjs/series/line/constant.js.map +1 -0
  471. package/cjs/series/line/interface.d.ts +2 -2
  472. package/cjs/series/line/interface.js.map +1 -1
  473. package/cjs/series/line/line.d.ts +5 -4
  474. package/cjs/series/line/line.js +6 -4
  475. package/cjs/series/line/line.js.map +1 -1
  476. package/cjs/series/link/constant.d.ts +2 -0
  477. package/cjs/series/link/constant.js +23 -0
  478. package/cjs/series/link/constant.js.map +1 -0
  479. package/cjs/series/link/link.d.ts +1 -1
  480. package/cjs/series/link/link.js +3 -16
  481. package/cjs/series/link/link.js.map +1 -1
  482. package/cjs/series/map/constant.d.ts +2 -0
  483. package/cjs/series/map/constant.js +15 -0
  484. package/cjs/series/map/constant.js.map +1 -0
  485. package/cjs/series/map/geo-source.js +2 -2
  486. package/cjs/series/map/geo-source.js.map +1 -1
  487. package/cjs/series/map/interface.d.ts +1 -0
  488. package/cjs/series/map/interface.js.map +1 -1
  489. package/cjs/series/map/map.d.ts +2 -3
  490. package/cjs/series/map/map.js +10 -15
  491. package/cjs/series/map/map.js.map +1 -1
  492. package/cjs/series/mixin/line-mixin.d.ts +6 -3
  493. package/cjs/series/mixin/line-mixin.js +42 -26
  494. package/cjs/series/mixin/line-mixin.js.map +1 -1
  495. package/cjs/series/pie/constant.d.ts +3 -0
  496. package/cjs/series/pie/constant.js +28 -0
  497. package/cjs/series/pie/constant.js.map +1 -0
  498. package/cjs/series/pie/interface.d.ts +4 -7
  499. package/cjs/series/pie/interface.js.map +1 -1
  500. package/cjs/series/pie/pie-3d.d.ts +1 -1
  501. package/cjs/series/pie/pie-3d.js +2 -11
  502. package/cjs/series/pie/pie-3d.js.map +1 -1
  503. package/cjs/series/pie/pie.d.ts +3 -1
  504. package/cjs/series/pie/pie.js +21 -67
  505. package/cjs/series/pie/pie.js.map +1 -1
  506. package/cjs/series/polar/interface.d.ts +1 -0
  507. package/cjs/series/polar/interface.js.map +1 -1
  508. package/cjs/series/polar/polar.d.ts +5 -0
  509. package/cjs/series/polar/polar.js +17 -4
  510. package/cjs/series/polar/polar.js.map +1 -1
  511. package/cjs/series/progress/circular/circular.d.ts +1 -1
  512. package/cjs/series/progress/circular/circular.js +6 -15
  513. package/cjs/series/progress/circular/circular.js.map +1 -1
  514. package/cjs/series/progress/circular/constant.d.ts +2 -0
  515. package/cjs/series/progress/circular/constant.js +19 -0
  516. package/cjs/series/progress/circular/constant.js.map +1 -0
  517. package/cjs/series/progress/linear/constant.d.ts +2 -0
  518. package/cjs/series/progress/linear/constant.js +23 -0
  519. package/cjs/series/progress/linear/constant.js.map +1 -0
  520. package/cjs/series/progress/linear/linear.d.ts +1 -1
  521. package/cjs/series/progress/linear/linear.js +2 -15
  522. package/cjs/series/progress/linear/linear.js.map +1 -1
  523. package/cjs/series/radar/constant.d.ts +2 -0
  524. package/cjs/series/radar/constant.js +15 -0
  525. package/cjs/series/radar/constant.js.map +1 -0
  526. package/cjs/series/radar/radar.d.ts +4 -2
  527. package/cjs/series/radar/radar.js +8 -10
  528. package/cjs/series/radar/radar.js.map +1 -1
  529. package/cjs/series/range-area/constant.d.ts +2 -0
  530. package/cjs/series/range-area/constant.js +10 -0
  531. package/cjs/series/range-area/constant.js.map +1 -0
  532. package/cjs/series/range-area/range-area.d.ts +4 -1
  533. package/cjs/series/range-area/range-area.js +9 -3
  534. package/cjs/series/range-area/range-area.js.map +1 -1
  535. package/cjs/series/range-column/constant.d.ts +3 -0
  536. package/cjs/series/range-column/constant.js +28 -0
  537. package/cjs/series/range-column/constant.js.map +1 -0
  538. package/cjs/series/range-column/range-column-3d.d.ts +5 -1
  539. package/cjs/series/range-column/range-column-3d.js +3 -2
  540. package/cjs/series/range-column/range-column-3d.js.map +1 -1
  541. package/cjs/series/range-column/range-column.d.ts +2 -2
  542. package/cjs/series/range-column/range-column.js +4 -13
  543. package/cjs/series/range-column/range-column.js.map +1 -1
  544. package/cjs/series/rose/constant.d.ts +2 -0
  545. package/cjs/series/rose/constant.js +15 -0
  546. package/cjs/series/rose/constant.js.map +1 -0
  547. package/cjs/series/rose/interface.d.ts +3 -0
  548. package/cjs/series/rose/interface.js.map +1 -1
  549. package/cjs/series/rose/rose.d.ts +3 -3
  550. package/cjs/series/rose/rose.js +24 -45
  551. package/cjs/series/rose/rose.js.map +1 -1
  552. package/cjs/series/sankey/constant.d.ts +2 -0
  553. package/cjs/series/sankey/constant.js +19 -0
  554. package/cjs/series/sankey/constant.js.map +1 -0
  555. package/cjs/series/sankey/interface.d.ts +3 -2
  556. package/cjs/series/sankey/interface.js.map +1 -1
  557. package/cjs/series/sankey/sankey.d.ts +6 -2
  558. package/cjs/series/sankey/sankey.js +247 -102
  559. package/cjs/series/sankey/sankey.js.map +1 -1
  560. package/cjs/series/scatter/constant.d.ts +2 -0
  561. package/cjs/series/scatter/constant.js +15 -0
  562. package/cjs/series/scatter/constant.js.map +1 -0
  563. package/cjs/series/scatter/interface.d.ts +3 -2
  564. package/cjs/series/scatter/interface.js.map +1 -1
  565. package/cjs/series/scatter/scatter.d.ts +4 -4
  566. package/cjs/series/scatter/scatter.js +27 -23
  567. package/cjs/series/scatter/scatter.js.map +1 -1
  568. package/cjs/series/sunburst/constant.d.ts +2 -0
  569. package/cjs/series/sunburst/constant.js +15 -0
  570. package/cjs/series/sunburst/constant.js.map +1 -0
  571. package/cjs/series/sunburst/sunburst.js +2 -7
  572. package/cjs/series/sunburst/sunburst.js.map +1 -1
  573. package/cjs/series/treemap/constant.d.ts +2 -0
  574. package/cjs/series/treemap/constant.js +23 -0
  575. package/cjs/series/treemap/constant.js.map +1 -0
  576. package/cjs/series/treemap/treemap.d.ts +1 -1
  577. package/cjs/series/treemap/treemap.js +10 -22
  578. package/cjs/series/treemap/treemap.js.map +1 -1
  579. package/cjs/series/util/utils.d.ts +4 -1
  580. package/cjs/series/util/utils.js +8 -6
  581. package/cjs/series/util/utils.js.map +1 -1
  582. package/cjs/series/waterfall/constant.d.ts +2 -0
  583. package/cjs/series/waterfall/constant.js +19 -0
  584. package/cjs/series/waterfall/constant.js.map +1 -0
  585. package/cjs/series/waterfall/waterfall.d.ts +2 -2
  586. package/cjs/series/waterfall/waterfall.js +2 -11
  587. package/cjs/series/waterfall/waterfall.js.map +1 -1
  588. package/cjs/series/word-cloud/base.d.ts +1 -0
  589. package/cjs/series/word-cloud/base.js +3 -12
  590. package/cjs/series/word-cloud/base.js.map +1 -1
  591. package/cjs/series/word-cloud/constant.d.ts +2 -0
  592. package/cjs/series/word-cloud/constant.js +19 -0
  593. package/cjs/series/word-cloud/constant.js.map +1 -0
  594. package/cjs/series/word-cloud/word-cloud-3d.d.ts +1 -1
  595. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  596. package/cjs/series/word-cloud/word-cloud.d.ts +1 -1
  597. package/cjs/series/word-cloud/word-cloud.js.map +1 -1
  598. package/cjs/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
  599. package/cjs/theme/builtin/common/component/axis/band-axis.js.map +1 -0
  600. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js +24 -0
  601. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
  602. package/cjs/theme/builtin/common/component/axis/common-axis.js +98 -0
  603. package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -0
  604. package/cjs/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
  605. package/cjs/theme/builtin/common/component/axis/polar-axis.js +25 -0
  606. package/cjs/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
  607. package/cjs/theme/builtin/common/component/brush.js.map +1 -0
  608. package/cjs/theme/builtin/common/component/crosshair.js +108 -0
  609. package/cjs/theme/builtin/common/component/crosshair.js.map +1 -0
  610. package/cjs/theme/builtin/common/component/data-zoom.js +172 -0
  611. package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -0
  612. package/cjs/theme/builtin/common/component/index.js +34 -0
  613. package/cjs/theme/builtin/common/component/index.js.map +1 -0
  614. package/cjs/theme/builtin/common/component/indicator.js +43 -0
  615. package/cjs/theme/builtin/common/component/indicator.js.map +1 -0
  616. package/cjs/theme/builtin/common/component/legend/color-legend.js +55 -0
  617. package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -0
  618. package/cjs/theme/builtin/common/component/legend/continuous.js +74 -0
  619. package/cjs/theme/builtin/common/component/legend/continuous.js.map +1 -0
  620. package/cjs/theme/builtin/common/component/legend/discrete-legend.js +85 -0
  621. package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
  622. package/cjs/theme/builtin/common/component/legend/size-legend.js +84 -0
  623. package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -0
  624. package/cjs/theme/builtin/common/component/map-label.js +57 -0
  625. package/cjs/theme/builtin/common/component/map-label.js.map +1 -0
  626. package/cjs/theme/builtin/common/component/mark-area.js +45 -0
  627. package/cjs/theme/builtin/common/component/mark-area.js.map +1 -0
  628. package/cjs/theme/builtin/common/component/mark-line.js +67 -0
  629. package/cjs/theme/builtin/common/component/mark-line.js.map +1 -0
  630. package/cjs/theme/builtin/common/component/mark-point.js.map +1 -0
  631. package/cjs/theme/builtin/common/component/player.js +93 -0
  632. package/cjs/theme/builtin/common/component/player.js.map +1 -0
  633. package/cjs/theme/builtin/common/component/poptip.d.ts +2 -0
  634. package/cjs/theme/builtin/common/component/poptip.js +52 -0
  635. package/cjs/theme/builtin/common/component/poptip.js.map +1 -0
  636. package/cjs/theme/builtin/common/component/title.js +33 -0
  637. package/cjs/theme/builtin/common/component/title.js.map +1 -0
  638. package/cjs/theme/builtin/common/component/tooltip.js +87 -0
  639. package/cjs/theme/builtin/common/component/tooltip.js.map +1 -0
  640. package/cjs/theme/builtin/common/component/total-label.d.ts +2 -0
  641. package/cjs/theme/builtin/common/component/total-label.js +27 -0
  642. package/cjs/theme/builtin/common/component/total-label.js.map +1 -0
  643. package/cjs/theme/builtin/common/constants.js +23 -0
  644. package/cjs/theme/builtin/common/constants.js.map +1 -0
  645. package/cjs/theme/builtin/common/mark.js +85 -0
  646. package/cjs/theme/builtin/common/mark.js.map +1 -0
  647. package/cjs/theme/builtin/common/series/area.js +21 -0
  648. package/cjs/theme/builtin/common/series/area.js.map +1 -0
  649. package/cjs/theme/builtin/common/series/bar.js +16 -0
  650. package/cjs/theme/builtin/common/series/bar.js.map +1 -0
  651. package/cjs/theme/builtin/common/series/bar3d.js +19 -0
  652. package/cjs/theme/builtin/common/series/bar3d.js.map +1 -0
  653. package/cjs/theme/builtin/common/series/box-plot.js.map +1 -0
  654. package/cjs/theme/builtin/common/series/circle-packing.js +34 -0
  655. package/cjs/theme/builtin/common/series/circle-packing.js.map +1 -0
  656. package/cjs/theme/builtin/common/series/circular-progress.js.map +1 -0
  657. package/cjs/theme/builtin/common/series/dot.js +40 -0
  658. package/cjs/theme/builtin/common/series/dot.js.map +1 -0
  659. package/cjs/theme/builtin/common/series/funnel.js +48 -0
  660. package/cjs/theme/builtin/common/series/funnel.js.map +1 -0
  661. package/cjs/theme/builtin/common/series/funnel3d.js +48 -0
  662. package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -0
  663. package/cjs/theme/builtin/common/series/gauge-pointer.js.map +1 -0
  664. package/cjs/theme/builtin/common/series/gauge.js.map +1 -0
  665. package/cjs/theme/builtin/common/series/heatmap.js.map +1 -0
  666. package/cjs/theme/builtin/common/series/index.js.map +1 -0
  667. package/cjs/theme/builtin/common/series/line.js +21 -0
  668. package/cjs/theme/builtin/common/series/line.js.map +1 -0
  669. package/cjs/theme/builtin/common/series/linear-progress.js.map +1 -0
  670. package/cjs/theme/builtin/common/series/link.js.map +1 -0
  671. package/cjs/theme/builtin/common/series/map.js +34 -0
  672. package/cjs/theme/builtin/common/series/map.js.map +1 -0
  673. package/cjs/theme/builtin/common/series/pie.js +21 -0
  674. package/cjs/theme/builtin/common/series/pie.js.map +1 -0
  675. package/cjs/theme/builtin/common/series/pie3d.js +18 -0
  676. package/cjs/theme/builtin/common/series/pie3d.js.map +1 -0
  677. package/cjs/theme/builtin/common/series/radar.js +20 -0
  678. package/cjs/theme/builtin/common/series/radar.js.map +1 -0
  679. package/cjs/theme/builtin/common/series/rangeColumn.js +28 -0
  680. package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -0
  681. package/cjs/theme/builtin/common/series/rose.js +18 -0
  682. package/cjs/theme/builtin/common/series/rose.js.map +1 -0
  683. package/cjs/theme/builtin/common/series/sankey.js +13 -0
  684. package/cjs/theme/builtin/common/series/sankey.js.map +1 -0
  685. package/cjs/theme/builtin/common/series/scatter.js +24 -0
  686. package/cjs/theme/builtin/common/series/scatter.js.map +1 -0
  687. package/cjs/theme/builtin/common/series/sunburst.js +44 -0
  688. package/cjs/theme/builtin/common/series/sunburst.js.map +1 -0
  689. package/cjs/theme/builtin/common/series/treemap.js +42 -0
  690. package/cjs/theme/builtin/common/series/treemap.js.map +1 -0
  691. package/cjs/theme/builtin/common/series/waterfall.js +38 -0
  692. package/cjs/theme/builtin/common/series/waterfall.js.map +1 -0
  693. package/cjs/theme/builtin/common/series/word-cloud.js.map +1 -0
  694. package/cjs/theme/builtin/common/series/word-cloud3d.js.map +1 -0
  695. package/cjs/theme/builtin/dark/color-scheme.js +35 -0
  696. package/cjs/theme/builtin/dark/color-scheme.js.map +1 -0
  697. package/cjs/theme/builtin/dark/index.d.ts +2 -0
  698. package/cjs/theme/builtin/dark/index.js +13 -0
  699. package/cjs/theme/builtin/dark/index.js.map +1 -0
  700. package/cjs/theme/builtin/index.d.ts +4 -0
  701. package/cjs/theme/builtin/index.js +26 -0
  702. package/cjs/theme/builtin/index.js.map +1 -0
  703. package/cjs/theme/builtin/light/color-scheme.js +35 -0
  704. package/cjs/theme/builtin/light/color-scheme.js.map +1 -0
  705. package/cjs/theme/builtin/light/index.js +24 -0
  706. package/cjs/theme/builtin/light/index.js.map +1 -0
  707. package/cjs/theme/color-scheme/builtin/default.d.ts +2 -0
  708. package/cjs/theme/color-scheme/builtin/default.js +11 -0
  709. package/cjs/theme/color-scheme/builtin/default.js.map +1 -0
  710. package/cjs/theme/color-scheme/builtin/interface.d.ts +22 -0
  711. package/cjs/theme/color-scheme/builtin/interface.js +6 -0
  712. package/cjs/theme/color-scheme/builtin/interface.js.map +1 -0
  713. package/cjs/theme/color-scheme/interface.d.ts +3 -2
  714. package/cjs/theme/color-scheme/interface.js.map +1 -1
  715. package/cjs/theme/color-scheme/util.d.ts +2 -1
  716. package/cjs/theme/color-scheme/util.js +17 -4
  717. package/cjs/theme/color-scheme/util.js.map +1 -1
  718. package/cjs/theme/index.d.ts +1 -1
  719. package/cjs/theme/index.js +1 -1
  720. package/cjs/theme/index.js.map +1 -1
  721. package/cjs/theme/interface.d.ts +18 -7
  722. package/cjs/theme/interface.js.map +1 -1
  723. package/cjs/theme/theme-manager.js +7 -7
  724. package/cjs/theme/theme-manager.js.map +1 -1
  725. package/cjs/typings/spec/common.d.ts +16 -4
  726. package/cjs/typings/spec/common.js.map +1 -1
  727. package/cjs/typings/tooltip/label.d.ts +10 -0
  728. package/cjs/typings/tooltip/label.js +6 -0
  729. package/cjs/typings/tooltip/label.js.map +1 -0
  730. package/cjs/typings/tooltip/line.d.ts +3 -2
  731. package/cjs/typings/tooltip/line.js.map +1 -1
  732. package/cjs/typings/tooltip/shape.d.ts +2 -0
  733. package/cjs/typings/tooltip/shape.js.map +1 -1
  734. package/cjs/typings/visual.d.ts +11 -21
  735. package/cjs/typings/visual.js.map +1 -1
  736. package/cjs/util/data.d.ts +0 -8
  737. package/cjs/util/data.js +2 -9
  738. package/cjs/util/data.js.map +1 -1
  739. package/cjs/util/object.d.ts +2 -4
  740. package/cjs/util/object.js +2 -18
  741. package/cjs/util/object.js.map +1 -1
  742. package/cjs/util/scale.d.ts +2 -6
  743. package/cjs/util/scale.js +1 -6
  744. package/cjs/util/scale.js.map +1 -1
  745. package/cjs/util/space.d.ts +4 -9
  746. package/cjs/util/space.js +21 -30
  747. package/cjs/util/space.js.map +1 -1
  748. package/cjs/util/spec/background.d.ts +4 -0
  749. package/cjs/util/spec/background.js +27 -0
  750. package/cjs/util/spec/background.js.map +1 -0
  751. package/cjs/util/spec/clone-deep.d.ts +1 -0
  752. package/cjs/util/spec/clone-deep.js +27 -0
  753. package/cjs/util/spec/clone-deep.js.map +1 -0
  754. package/cjs/util/spec/common.d.ts +3 -0
  755. package/cjs/util/spec/common.js +23 -0
  756. package/cjs/util/spec/common.js.map +1 -0
  757. package/cjs/util/spec/index.d.ts +7 -0
  758. package/cjs/util/spec/index.js +24 -0
  759. package/cjs/util/spec/index.js.map +1 -0
  760. package/cjs/util/spec/merge-spec.d.ts +1 -0
  761. package/cjs/util/spec/merge-spec.js +58 -0
  762. package/cjs/util/spec/merge-spec.js.map +1 -0
  763. package/cjs/util/spec/merge-theme.d.ts +3 -0
  764. package/cjs/util/spec/merge-theme.js +37 -0
  765. package/cjs/util/spec/merge-theme.js.map +1 -0
  766. package/cjs/util/spec/preprocess.d.ts +3 -0
  767. package/cjs/util/spec/preprocess.js +24 -0
  768. package/cjs/util/spec/preprocess.js.map +1 -0
  769. package/cjs/util/spec/transform.d.ts +3 -0
  770. package/cjs/util/spec/transform.js +28 -0
  771. package/cjs/util/spec/transform.js.map +1 -0
  772. package/cjs/util/text.d.ts +1 -6
  773. package/cjs/util/text.js +4 -22
  774. package/cjs/util/text.js.map +1 -1
  775. package/cjs/vchart-all.js +2 -2
  776. package/cjs/vchart-all.js.map +1 -1
  777. package/cjs/vchart-simple.js +3 -4
  778. package/cjs/vchart-simple.js.map +1 -1
  779. package/esm/animation/spec.d.ts +1 -1
  780. package/esm/animation/spec.js.map +1 -1
  781. package/esm/animation/utils.js +3 -3
  782. package/esm/animation/utils.js.map +1 -1
  783. package/esm/chart/area/area.js +3 -4
  784. package/esm/chart/area/area.js.map +1 -1
  785. package/esm/chart/bar/bar-3d.js +2 -2
  786. package/esm/chart/bar/bar-3d.js.map +1 -1
  787. package/esm/chart/bar/bar.js +2 -2
  788. package/esm/chart/bar/bar.js.map +1 -1
  789. package/esm/chart/base-chart.d.ts +5 -2
  790. package/esm/chart/base-chart.js +51 -43
  791. package/esm/chart/base-chart.js.map +1 -1
  792. package/esm/chart/box-plot/box-plot.js +1 -1
  793. package/esm/chart/box-plot/box-plot.js.map +1 -1
  794. package/esm/chart/cartesian/cartesian.js +3 -2
  795. package/esm/chart/cartesian/cartesian.js.map +1 -1
  796. package/esm/chart/circle-packing/circle-packing.js +1 -1
  797. package/esm/chart/circle-packing/circle-packing.js.map +1 -1
  798. package/esm/chart/funnel/funnel-3d.js +1 -1
  799. package/esm/chart/funnel/funnel-3d.js.map +1 -1
  800. package/esm/chart/funnel/funnel.js +1 -1
  801. package/esm/chart/funnel/funnel.js.map +1 -1
  802. package/esm/chart/gauge/gauge.js +2 -2
  803. package/esm/chart/gauge/gauge.js.map +1 -1
  804. package/esm/chart/heatmap/heatmap.js +1 -1
  805. package/esm/chart/heatmap/heatmap.js.map +1 -1
  806. package/esm/chart/histogram/histogram-3d.js +2 -2
  807. package/esm/chart/histogram/histogram-3d.js.map +1 -1
  808. package/esm/chart/histogram/histogram.js +2 -2
  809. package/esm/chart/histogram/histogram.js.map +1 -1
  810. package/esm/chart/index.d.ts +2 -2
  811. package/esm/chart/index.js +2 -2
  812. package/esm/chart/index.js.map +1 -1
  813. package/esm/chart/interface/chart.d.ts +4 -2
  814. package/esm/chart/interface/chart.js.map +1 -1
  815. package/esm/chart/line/line.js +1 -2
  816. package/esm/chart/line/line.js.map +1 -1
  817. package/esm/chart/map/map.js +2 -2
  818. package/esm/chart/map/map.js.map +1 -1
  819. package/esm/chart/pie/pie-3d.js +2 -2
  820. package/esm/chart/pie/pie-3d.js.map +1 -1
  821. package/esm/chart/pie/pie.js +2 -2
  822. package/esm/chart/pie/pie.js.map +1 -1
  823. package/esm/chart/polar/progress-like.js +1 -1
  824. package/esm/chart/polar/progress-like.js.map +1 -1
  825. package/esm/chart/polar/rose-like.js +1 -1
  826. package/esm/chart/polar/rose-like.js.map +1 -1
  827. package/esm/chart/progress/circular/circular.js +1 -1
  828. package/esm/chart/progress/circular/circular.js.map +1 -1
  829. package/esm/chart/progress/linear/linear.js +2 -2
  830. package/esm/chart/progress/linear/linear.js.map +1 -1
  831. package/esm/chart/radar/radar.js +5 -6
  832. package/esm/chart/radar/radar.js.map +1 -1
  833. package/esm/chart/range-area/range-area.js +1 -1
  834. package/esm/chart/range-area/range-area.js.map +1 -1
  835. package/esm/chart/range-column/range-column-3d.js +1 -1
  836. package/esm/chart/range-column/range-column-3d.js.map +1 -1
  837. package/esm/chart/range-column/range-column.js +1 -1
  838. package/esm/chart/range-column/range-column.js.map +1 -1
  839. package/esm/chart/rose/rose.js +4 -4
  840. package/esm/chart/rose/rose.js.map +1 -1
  841. package/esm/chart/sankey/sankey.js +1 -1
  842. package/esm/chart/sankey/sankey.js.map +1 -1
  843. package/esm/chart/scatter/scatter.js +2 -2
  844. package/esm/chart/scatter/scatter.js.map +1 -1
  845. package/esm/chart/sequence/sequence.js +4 -2
  846. package/esm/chart/sequence/sequence.js.map +1 -1
  847. package/esm/chart/stack.d.ts +1 -0
  848. package/esm/chart/stack.js +16 -2
  849. package/esm/chart/stack.js.map +1 -1
  850. package/esm/chart/sunburst/sunburst.js +1 -1
  851. package/esm/chart/sunburst/sunburst.js.map +1 -1
  852. package/esm/chart/treemap/treemap.d.ts +1 -1
  853. package/esm/chart/treemap/treemap.js +4 -4
  854. package/esm/chart/treemap/treemap.js.map +1 -1
  855. package/esm/chart/util.d.ts +8 -0
  856. package/esm/chart/util.js +34 -2
  857. package/esm/chart/util.js.map +1 -1
  858. package/esm/chart/waterfall/waterfall.js +1 -1
  859. package/esm/chart/waterfall/waterfall.js.map +1 -1
  860. package/esm/chart/word-cloud/word-cloud-3d.js +1 -1
  861. package/esm/chart/word-cloud/word-cloud-3d.js.map +1 -1
  862. package/esm/chart/word-cloud/word-cloud.js +1 -1
  863. package/esm/chart/word-cloud/word-cloud.js.map +1 -1
  864. package/esm/compile/compiler.d.ts +5 -1
  865. package/esm/compile/compiler.js +9 -4
  866. package/esm/compile/compiler.js.map +1 -1
  867. package/esm/compile/interface/compilable-item.d.ts +1 -0
  868. package/esm/compile/interface/compilable-item.js.map +1 -1
  869. package/esm/compile/mark/compilable-mark.js +9 -11
  870. package/esm/compile/mark/compilable-mark.js.map +1 -1
  871. package/esm/compile/mark/interface.d.ts +2 -1
  872. package/esm/compile/mark/interface.js.map +1 -1
  873. package/esm/compile/mark/util.d.ts +2 -1
  874. package/esm/compile/mark/util.js +19 -3
  875. package/esm/compile/mark/util.js.map +1 -1
  876. package/esm/component/axis/base-axis.d.ts +17 -27
  877. package/esm/component/axis/base-axis.js +19 -29
  878. package/esm/component/axis/base-axis.js.map +1 -1
  879. package/esm/component/axis/cartesian/axis.d.ts +3 -3
  880. package/esm/component/axis/cartesian/axis.js +31 -22
  881. package/esm/component/axis/cartesian/axis.js.map +1 -1
  882. package/esm/component/axis/cartesian/band-axis.d.ts +3 -3
  883. package/esm/component/axis/cartesian/band-axis.js +1 -0
  884. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  885. package/esm/component/axis/cartesian/index.d.ts +1 -0
  886. package/esm/component/axis/cartesian/index.js +2 -0
  887. package/esm/component/axis/cartesian/index.js.map +1 -1
  888. package/esm/component/axis/cartesian/interface/common.d.ts +6 -1
  889. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  890. package/esm/component/axis/cartesian/interface/spec.d.ts +4 -1
  891. package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
  892. package/esm/component/axis/cartesian/linear-axis.d.ts +3 -3
  893. package/esm/component/axis/cartesian/linear-axis.js +3 -4
  894. package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
  895. package/esm/component/axis/cartesian/log-axis.d.ts +3 -2
  896. package/esm/component/axis/cartesian/log-axis.js.map +1 -1
  897. package/esm/component/axis/cartesian/symlog-axis.d.ts +16 -0
  898. package/esm/component/axis/cartesian/symlog-axis.js +24 -0
  899. package/esm/component/axis/cartesian/symlog-axis.js.map +1 -0
  900. package/esm/component/axis/cartesian/time-axis.d.ts +3 -2
  901. package/esm/component/axis/cartesian/time-axis.js +3 -3
  902. package/esm/component/axis/cartesian/time-axis.js.map +1 -1
  903. package/esm/component/axis/interface.d.ts +11 -8
  904. package/esm/component/axis/interface.js.map +1 -1
  905. package/esm/component/axis/mixin/linear-axis-mixin.js +1 -1
  906. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  907. package/esm/component/axis/polar/axis.d.ts +4 -3
  908. package/esm/component/axis/polar/axis.js +16 -13
  909. package/esm/component/axis/polar/axis.js.map +1 -1
  910. package/esm/component/axis/polar/band-axis.d.ts +4 -2
  911. package/esm/component/axis/polar/band-axis.js.map +1 -1
  912. package/esm/component/axis/polar/interface/common.d.ts +1 -1
  913. package/esm/component/axis/polar/interface/common.js.map +1 -1
  914. package/esm/component/axis/polar/interface/spec.d.ts +7 -2
  915. package/esm/component/axis/polar/interface/spec.js.map +1 -1
  916. package/esm/component/axis/polar/linear-axis.d.ts +2 -3
  917. package/esm/component/axis/polar/linear-axis.js.map +1 -1
  918. package/esm/component/axis/util.d.ts +28 -0
  919. package/esm/component/axis/util.js +63 -0
  920. package/esm/component/axis/util.js.map +1 -0
  921. package/esm/component/base/base-component.d.ts +15 -4
  922. package/esm/component/base/base-component.js +19 -5
  923. package/esm/component/base/base-component.js.map +1 -1
  924. package/esm/component/base/interface.d.ts +8 -0
  925. package/esm/component/base/interface.js +2 -0
  926. package/esm/component/base/interface.js.map +1 -0
  927. package/esm/component/base/util.d.ts +2 -1
  928. package/esm/component/base/util.js +14 -7
  929. package/esm/component/base/util.js.map +1 -1
  930. package/esm/component/brush/brush.d.ts +14 -4
  931. package/esm/component/brush/brush.js +75 -63
  932. package/esm/component/brush/brush.js.map +1 -1
  933. package/esm/component/brush/interface.d.ts +1 -0
  934. package/esm/component/brush/interface.js.map +1 -1
  935. package/esm/component/crosshair/base.d.ts +5 -4
  936. package/esm/component/crosshair/base.js +2 -2
  937. package/esm/component/crosshair/base.js.map +1 -1
  938. package/esm/component/crosshair/cartesian.d.ts +3 -3
  939. package/esm/component/crosshair/cartesian.js +8 -8
  940. package/esm/component/crosshair/cartesian.js.map +1 -1
  941. package/esm/component/crosshair/interface/spec.d.ts +8 -8
  942. package/esm/component/crosshair/interface/spec.js.map +1 -1
  943. package/esm/component/crosshair/interface/theme.d.ts +3 -1
  944. package/esm/component/crosshair/interface/theme.js.map +1 -1
  945. package/esm/component/crosshair/polar.d.ts +3 -3
  946. package/esm/component/crosshair/polar.js +8 -8
  947. package/esm/component/crosshair/polar.js.map +1 -1
  948. package/esm/component/crosshair/util.d.ts +5 -0
  949. package/esm/component/crosshair/util.js +34 -0
  950. package/esm/component/crosshair/util.js.map +1 -1
  951. package/esm/component/custom-mark/custom-mark.d.ts +3 -2
  952. package/esm/component/custom-mark/custom-mark.js +4 -4
  953. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  954. package/esm/component/data-zoom/data-filter-base-component.d.ts +5 -5
  955. package/esm/component/data-zoom/data-filter-base-component.js +2 -9
  956. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  957. package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
  958. package/esm/component/data-zoom/data-zoom/data-zoom.js +9 -7
  959. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  960. package/esm/component/data-zoom/data-zoom/interface.d.ts +3 -1
  961. package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
  962. package/esm/component/data-zoom/interface.d.ts +3 -3
  963. package/esm/component/data-zoom/interface.js.map +1 -1
  964. package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
  965. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  966. package/esm/component/geo/geo-coordinate.d.ts +10 -4
  967. package/esm/component/geo/geo-coordinate.js +68 -16
  968. package/esm/component/geo/geo-coordinate.js.map +1 -1
  969. package/esm/component/geo/projection.d.ts +1 -0
  970. package/esm/component/geo/projection.js +4 -0
  971. package/esm/component/geo/projection.js.map +1 -1
  972. package/esm/component/index.d.ts +3 -2
  973. package/esm/component/index.js +4 -2
  974. package/esm/component/index.js.map +1 -1
  975. package/esm/component/indicator/indicator.d.ts +3 -2
  976. package/esm/component/indicator/indicator.js +9 -8
  977. package/esm/component/indicator/indicator.js.map +1 -1
  978. package/esm/component/indicator/interface.d.ts +5 -4
  979. package/esm/component/indicator/interface.js.map +1 -1
  980. package/esm/component/interface/theme.d.ts +4 -2
  981. package/esm/component/interface/theme.js.map +1 -1
  982. package/esm/component/interface/type.d.ts +2 -0
  983. package/esm/component/interface/type.js +13 -12
  984. package/esm/component/interface/type.js.map +1 -1
  985. package/esm/component/label/base-label.d.ts +39 -0
  986. package/esm/component/label/base-label.js +37 -0
  987. package/esm/component/label/base-label.js.map +1 -0
  988. package/esm/component/label/interface.d.ts +12 -1
  989. package/esm/component/label/interface.js.map +1 -1
  990. package/esm/component/label/label.d.ts +7 -29
  991. package/esm/component/label/label.js +36 -47
  992. package/esm/component/label/label.js.map +1 -1
  993. package/esm/component/label/pie.d.ts +5 -0
  994. package/esm/component/label/pie.js +13 -0
  995. package/esm/component/label/pie.js.map +1 -0
  996. package/esm/component/label/totalLabel.d.ts +27 -0
  997. package/esm/component/label/totalLabel.js +110 -0
  998. package/esm/component/label/totalLabel.js.map +1 -0
  999. package/esm/component/label/util.d.ts +3 -1
  1000. package/esm/component/label/util.js +6 -4
  1001. package/esm/component/label/util.js.map +1 -1
  1002. package/esm/component/legend/base-legend.d.ts +3 -2
  1003. package/esm/component/legend/base-legend.js +5 -5
  1004. package/esm/component/legend/base-legend.js.map +1 -1
  1005. package/esm/component/legend/continuous/legend.d.ts +3 -4
  1006. package/esm/component/legend/continuous/legend.js.map +1 -1
  1007. package/esm/component/legend/continuous/util.js +5 -3
  1008. package/esm/component/legend/continuous/util.js.map +1 -1
  1009. package/esm/component/legend/discrete/interface.d.ts +3 -1
  1010. package/esm/component/legend/discrete/interface.js.map +1 -1
  1011. package/esm/component/legend/discrete/legend.d.ts +1 -2
  1012. package/esm/component/legend/discrete/legend.js +2 -2
  1013. package/esm/component/legend/discrete/legend.js.map +1 -1
  1014. package/esm/component/legend/discrete/util.js +4 -4
  1015. package/esm/component/legend/discrete/util.js.map +1 -1
  1016. package/esm/component/legend/interface.d.ts +2 -6
  1017. package/esm/component/legend/interface.js.map +1 -1
  1018. package/esm/component/legend/util.js +4 -2
  1019. package/esm/component/legend/util.js.map +1 -1
  1020. package/esm/component/map-label/component.d.ts +1 -2
  1021. package/esm/component/map-label/component.js.map +1 -1
  1022. package/esm/component/marker/base-marker.d.ts +8 -2
  1023. package/esm/component/marker/base-marker.js +14 -0
  1024. package/esm/component/marker/base-marker.js.map +1 -1
  1025. package/esm/component/marker/interface.d.ts +3 -2
  1026. package/esm/component/marker/interface.js.map +1 -1
  1027. package/esm/component/marker/mark-area/mark-area.d.ts +1 -2
  1028. package/esm/component/marker/mark-area/mark-area.js +17 -6
  1029. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  1030. package/esm/component/marker/mark-line/mark-line.d.ts +1 -2
  1031. package/esm/component/marker/mark-line/mark-line.js +17 -6
  1032. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  1033. package/esm/component/marker/mark-point/mark-point.d.ts +1 -2
  1034. package/esm/component/marker/mark-point/mark-point.js +18 -7
  1035. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  1036. package/esm/component/player/player.d.ts +1 -2
  1037. package/esm/component/player/player.js.map +1 -1
  1038. package/esm/component/poptip/interface.d.ts +15 -0
  1039. package/esm/component/poptip/interface.js +2 -0
  1040. package/esm/component/poptip/interface.js.map +1 -0
  1041. package/esm/component/title/interface/spec.d.ts +2 -2
  1042. package/esm/component/title/interface/spec.js.map +1 -1
  1043. package/esm/component/title/title.d.ts +2 -2
  1044. package/esm/component/title/title.js +2 -1
  1045. package/esm/component/title/title.js.map +1 -1
  1046. package/esm/component/tooltip/handler/base.js +3 -3
  1047. package/esm/component/tooltip/handler/base.js.map +1 -1
  1048. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -1
  1049. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
  1050. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  1051. package/esm/component/tooltip/handler/dom/interface.d.ts +9 -12
  1052. package/esm/component/tooltip/handler/dom/interface.js.map +1 -1
  1053. package/esm/component/tooltip/handler/dom/model/content-column-model.d.ts +4 -6
  1054. package/esm/component/tooltip/handler/dom/model/content-column-model.js +20 -16
  1055. package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
  1056. package/esm/component/tooltip/handler/dom/model/content-model.js +2 -2
  1057. package/esm/component/tooltip/handler/dom/model/content-model.js.map +1 -1
  1058. package/esm/component/tooltip/handler/dom/model/title-model.js +6 -6
  1059. package/esm/component/tooltip/handler/dom/model/title-model.js.map +1 -1
  1060. package/esm/component/tooltip/handler/dom/model/tooltip-model.js +4 -2
  1061. package/esm/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
  1062. package/esm/component/tooltip/handler/dom/util.js +21 -14
  1063. package/esm/component/tooltip/handler/dom/util.js.map +1 -1
  1064. package/esm/component/tooltip/handler/utils/attribute.js +25 -25
  1065. package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
  1066. package/esm/component/tooltip/handler/utils/compose.d.ts +2 -2
  1067. package/esm/component/tooltip/handler/utils/compose.js +11 -10
  1068. package/esm/component/tooltip/handler/utils/compose.js.map +1 -1
  1069. package/esm/component/tooltip/handler/utils/get-spec.js +5 -3
  1070. package/esm/component/tooltip/handler/utils/get-spec.js.map +1 -1
  1071. package/esm/component/tooltip/handler/utils/style.d.ts +1 -1
  1072. package/esm/component/tooltip/handler/utils/style.js +17 -10
  1073. package/esm/component/tooltip/handler/utils/style.js.map +1 -1
  1074. package/esm/component/tooltip/interface/theme.d.ts +6 -4
  1075. package/esm/component/tooltip/interface/theme.js.map +1 -1
  1076. package/esm/component/tooltip/processor/base.js +1 -1
  1077. package/esm/component/tooltip/processor/base.js.map +1 -1
  1078. package/esm/component/tooltip/tooltip.d.ts +4 -3
  1079. package/esm/component/tooltip/tooltip.js +15 -8
  1080. package/esm/component/tooltip/tooltip.js.map +1 -1
  1081. package/esm/constant/index.d.ts +3 -0
  1082. package/esm/constant/index.js +6 -0
  1083. package/esm/constant/index.js.map +1 -1
  1084. package/esm/core/index.d.ts +1 -1
  1085. package/esm/core/index.js +1 -1
  1086. package/esm/core/index.js.map +1 -1
  1087. package/esm/core/interface.d.ts +3 -0
  1088. package/esm/core/interface.js.map +1 -1
  1089. package/esm/core/vchart.d.ts +6 -1
  1090. package/esm/core/vchart.js +79 -28
  1091. package/esm/core/vchart.js.map +1 -1
  1092. package/esm/data/initialize.js +10 -7
  1093. package/esm/data/initialize.js.map +1 -1
  1094. package/esm/data/transforms/data-key.d.ts +2 -2
  1095. package/esm/data/transforms/data-key.js.map +1 -1
  1096. package/esm/data/transforms/dimension-statistics.d.ts +11 -5
  1097. package/esm/data/transforms/dimension-statistics.js +33 -22
  1098. package/esm/data/transforms/dimension-statistics.js.map +1 -1
  1099. package/esm/data/transforms/invalid-travel.js +1 -2
  1100. package/esm/data/transforms/invalid-travel.js.map +1 -1
  1101. package/esm/data/transforms/legend-data/discrete/discrete.js +4 -3
  1102. package/esm/data/transforms/legend-data/discrete/discrete.js.map +1 -1
  1103. package/esm/data/transforms/tick-data/continuous.js +6 -3
  1104. package/esm/data/transforms/tick-data/continuous.js.map +1 -1
  1105. package/esm/data/transforms/tick-data/discrete/polar-angle.js +1 -1
  1106. package/esm/data/transforms/tick-data/discrete/polar-angle.js.map +1 -1
  1107. package/esm/data/transforms/tick-data/interface.d.ts +3 -0
  1108. package/esm/data/transforms/tick-data/interface.js.map +1 -1
  1109. package/esm/data/transforms/tick-data/util.js +1 -1
  1110. package/esm/data/transforms/tick-data/util.js.map +1 -1
  1111. package/esm/event/event-dispatcher.js +3 -2
  1112. package/esm/event/event-dispatcher.js.map +1 -1
  1113. package/esm/event/events/dimension/dimension-click.d.ts +1 -3
  1114. package/esm/event/events/dimension/dimension-click.js +9 -10
  1115. package/esm/event/events/dimension/dimension-click.js.map +1 -1
  1116. package/esm/event/events/dimension/dimension-hover.d.ts +2 -3
  1117. package/esm/event/events/dimension/dimension-hover.js +25 -16
  1118. package/esm/event/events/dimension/dimension-hover.js.map +1 -1
  1119. package/esm/event/events/dimension/util/cartesian.js +2 -2
  1120. package/esm/event/events/dimension/util/cartesian.js.map +1 -1
  1121. package/esm/event/events/dimension/util/polar.js +1 -1
  1122. package/esm/event/events/dimension/util/polar.js.map +1 -1
  1123. package/esm/event/interface.d.ts +3 -3
  1124. package/esm/event/interface.js.map +1 -1
  1125. package/esm/interaction/trigger.js +7 -3
  1126. package/esm/interaction/trigger.js.map +1 -1
  1127. package/esm/layout/label/arc-label.js.map +1 -1
  1128. package/esm/mark/base/base-mark.d.ts +1 -0
  1129. package/esm/mark/base/base-mark.js +22 -5
  1130. package/esm/mark/base/base-mark.js.map +1 -1
  1131. package/esm/mark/mark-set/index.d.ts +1 -0
  1132. package/esm/mark/mark-set/index.js.map +1 -1
  1133. package/esm/mark/symbol.js +1 -1
  1134. package/esm/mark/symbol.js.map +1 -1
  1135. package/esm/model/base-model.d.ts +6 -4
  1136. package/esm/model/base-model.js +17 -17
  1137. package/esm/model/base-model.js.map +1 -1
  1138. package/esm/model/interface.d.ts +8 -2
  1139. package/esm/model/interface.js.map +1 -1
  1140. package/esm/model/layout-item.d.ts +7 -7
  1141. package/esm/model/layout-item.js.map +1 -1
  1142. package/esm/model/tooltip-helper.d.ts +0 -2
  1143. package/esm/model/tooltip-helper.js +0 -3
  1144. package/esm/model/tooltip-helper.js.map +1 -1
  1145. package/esm/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
  1146. package/esm/plugin/components/index.d.ts +0 -2
  1147. package/esm/plugin/components/index.js +0 -3
  1148. package/esm/plugin/components/index.js.map +1 -1
  1149. package/esm/region/region.d.ts +3 -3
  1150. package/esm/region/region.js.map +1 -1
  1151. package/esm/series/area/area.d.ts +9 -4
  1152. package/esm/series/area/area.js +46 -21
  1153. package/esm/series/area/area.js.map +1 -1
  1154. package/esm/series/area/constant.d.ts +2 -0
  1155. package/esm/series/area/constant.js +15 -0
  1156. package/esm/series/area/constant.js.map +1 -0
  1157. package/esm/series/area/interface.d.ts +2 -0
  1158. package/esm/series/area/interface.js.map +1 -1
  1159. package/esm/series/area/tooltip-helpter.d.ts +5 -0
  1160. package/esm/series/area/tooltip-helpter.js +18 -0
  1161. package/esm/series/area/tooltip-helpter.js.map +1 -0
  1162. package/esm/series/bar/bar-3d.d.ts +3 -1
  1163. package/esm/series/bar/bar-3d.js +3 -8
  1164. package/esm/series/bar/bar-3d.js.map +1 -1
  1165. package/esm/series/bar/bar.d.ts +1 -0
  1166. package/esm/series/bar/bar.js +6 -13
  1167. package/esm/series/bar/bar.js.map +1 -1
  1168. package/esm/series/bar/constant.d.ts +3 -0
  1169. package/esm/series/bar/constant.js +20 -0
  1170. package/esm/series/bar/constant.js.map +1 -0
  1171. package/esm/series/bar/interface.d.ts +3 -2
  1172. package/esm/series/bar/interface.js.map +1 -1
  1173. package/esm/series/base/base-series.d.ts +8 -6
  1174. package/esm/series/base/base-series.js +87 -42
  1175. package/esm/series/base/base-series.js.map +1 -1
  1176. package/esm/series/base/constant.d.ts +2 -0
  1177. package/esm/series/base/constant.js +11 -0
  1178. package/esm/series/base/constant.js.map +1 -0
  1179. package/esm/series/base/tooltip-helper.d.ts +0 -1
  1180. package/esm/series/base/tooltip-helper.js +4 -5
  1181. package/esm/series/base/tooltip-helper.js.map +1 -1
  1182. package/esm/series/box-plot/box-plot.d.ts +1 -2
  1183. package/esm/series/box-plot/box-plot.js +4 -15
  1184. package/esm/series/box-plot/box-plot.js.map +1 -1
  1185. package/esm/series/box-plot/constant.d.ts +2 -0
  1186. package/esm/series/box-plot/constant.js +17 -0
  1187. package/esm/series/box-plot/constant.js.map +1 -0
  1188. package/esm/series/cartesian/cartesian.d.ts +12 -3
  1189. package/esm/series/cartesian/cartesian.js +39 -18
  1190. package/esm/series/cartesian/cartesian.js.map +1 -1
  1191. package/esm/series/cartesian/interface.d.ts +3 -2
  1192. package/esm/series/cartesian/interface.js.map +1 -1
  1193. package/esm/series/circle-packing/circle-packing.d.ts +1 -2
  1194. package/esm/series/circle-packing/circle-packing.js +4 -10
  1195. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  1196. package/esm/series/circle-packing/constant.d.ts +2 -0
  1197. package/esm/series/circle-packing/constant.js +13 -0
  1198. package/esm/series/circle-packing/constant.js.map +1 -0
  1199. package/esm/series/dot/constant.d.ts +2 -0
  1200. package/esm/series/dot/constant.js +37 -0
  1201. package/esm/series/dot/constant.js.map +1 -0
  1202. package/esm/series/dot/dot.d.ts +2 -1
  1203. package/esm/series/dot/dot.js +8 -36
  1204. package/esm/series/dot/dot.js.map +1 -1
  1205. package/esm/series/funnel/constant.d.ts +3 -0
  1206. package/esm/series/funnel/constant.js +52 -0
  1207. package/esm/series/funnel/constant.js.map +1 -0
  1208. package/esm/series/funnel/funnel-3d.d.ts +3 -2
  1209. package/esm/series/funnel/funnel-3d.js +3 -24
  1210. package/esm/series/funnel/funnel-3d.js.map +1 -1
  1211. package/esm/series/funnel/funnel.d.ts +2 -1
  1212. package/esm/series/funnel/funnel.js +15 -24
  1213. package/esm/series/funnel/funnel.js.map +1 -1
  1214. package/esm/series/gauge/constant.d.ts +3 -0
  1215. package/esm/series/gauge/constant.js +32 -0
  1216. package/esm/series/gauge/constant.js.map +1 -0
  1217. package/esm/series/gauge/gauge-pointer.d.ts +2 -2
  1218. package/esm/series/gauge/gauge-pointer.js +6 -16
  1219. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  1220. package/esm/series/gauge/gauge.d.ts +2 -1
  1221. package/esm/series/gauge/gauge.js +6 -14
  1222. package/esm/series/gauge/gauge.js.map +1 -1
  1223. package/esm/series/geo/geo.d.ts +2 -0
  1224. package/esm/series/geo/geo.js +4 -1
  1225. package/esm/series/geo/geo.js.map +1 -1
  1226. package/esm/series/heatmap/constant.d.ts +2 -0
  1227. package/esm/series/heatmap/constant.js +17 -0
  1228. package/esm/series/heatmap/constant.js.map +1 -0
  1229. package/esm/series/heatmap/heatmap.d.ts +2 -1
  1230. package/esm/series/heatmap/heatmap.js +5 -16
  1231. package/esm/series/heatmap/heatmap.js.map +1 -1
  1232. package/esm/series/index.d.ts +2 -2
  1233. package/esm/series/index.js +2 -2
  1234. package/esm/series/index.js.map +1 -1
  1235. package/esm/series/interface/common.d.ts +1 -0
  1236. package/esm/series/interface/common.js.map +1 -1
  1237. package/esm/series/interface/series.d.ts +3 -2
  1238. package/esm/series/interface/series.js.map +1 -1
  1239. package/esm/series/interface/theme.d.ts +3 -2
  1240. package/esm/series/interface/theme.js +78 -1
  1241. package/esm/series/interface/theme.js.map +1 -1
  1242. package/esm/series/line/constant.d.ts +2 -0
  1243. package/esm/series/line/constant.js +6 -0
  1244. package/esm/series/line/constant.js.map +1 -0
  1245. package/esm/series/line/interface.d.ts +2 -2
  1246. package/esm/series/line/interface.js.map +1 -1
  1247. package/esm/series/line/line.d.ts +5 -4
  1248. package/esm/series/line/line.js +8 -6
  1249. package/esm/series/line/line.js.map +1 -1
  1250. package/esm/series/link/constant.d.ts +2 -0
  1251. package/esm/series/link/constant.js +21 -0
  1252. package/esm/series/link/constant.js.map +1 -0
  1253. package/esm/series/link/link.d.ts +1 -1
  1254. package/esm/series/link/link.js +4 -21
  1255. package/esm/series/link/link.js.map +1 -1
  1256. package/esm/series/map/constant.d.ts +2 -0
  1257. package/esm/series/map/constant.js +13 -0
  1258. package/esm/series/map/constant.js.map +1 -0
  1259. package/esm/series/map/geo-source.js +3 -1
  1260. package/esm/series/map/geo-source.js.map +1 -1
  1261. package/esm/series/map/interface.d.ts +1 -0
  1262. package/esm/series/map/interface.js.map +1 -1
  1263. package/esm/series/map/map.d.ts +2 -3
  1264. package/esm/series/map/map.js +13 -16
  1265. package/esm/series/map/map.js.map +1 -1
  1266. package/esm/series/mixin/line-mixin.d.ts +6 -3
  1267. package/esm/series/mixin/line-mixin.js +43 -23
  1268. package/esm/series/mixin/line-mixin.js.map +1 -1
  1269. package/esm/series/pie/constant.d.ts +3 -0
  1270. package/esm/series/pie/constant.js +28 -0
  1271. package/esm/series/pie/constant.js.map +1 -0
  1272. package/esm/series/pie/interface.d.ts +4 -7
  1273. package/esm/series/pie/interface.js.map +1 -1
  1274. package/esm/series/pie/pie-3d.d.ts +1 -1
  1275. package/esm/series/pie/pie-3d.js +3 -12
  1276. package/esm/series/pie/pie-3d.js.map +1 -1
  1277. package/esm/series/pie/pie.d.ts +3 -1
  1278. package/esm/series/pie/pie.js +26 -67
  1279. package/esm/series/pie/pie.js.map +1 -1
  1280. package/esm/series/polar/interface.d.ts +1 -0
  1281. package/esm/series/polar/interface.js.map +1 -1
  1282. package/esm/series/polar/polar.d.ts +5 -0
  1283. package/esm/series/polar/polar.js +17 -3
  1284. package/esm/series/polar/polar.js.map +1 -1
  1285. package/esm/series/progress/circular/circular.d.ts +1 -1
  1286. package/esm/series/progress/circular/circular.js +3 -14
  1287. package/esm/series/progress/circular/circular.js.map +1 -1
  1288. package/esm/series/progress/circular/constant.d.ts +2 -0
  1289. package/esm/series/progress/circular/constant.js +17 -0
  1290. package/esm/series/progress/circular/constant.js.map +1 -0
  1291. package/esm/series/progress/linear/constant.d.ts +2 -0
  1292. package/esm/series/progress/linear/constant.js +21 -0
  1293. package/esm/series/progress/linear/constant.js.map +1 -0
  1294. package/esm/series/progress/linear/linear.d.ts +1 -1
  1295. package/esm/series/progress/linear/linear.js +3 -18
  1296. package/esm/series/progress/linear/linear.js.map +1 -1
  1297. package/esm/series/radar/constant.d.ts +2 -0
  1298. package/esm/series/radar/constant.js +15 -0
  1299. package/esm/series/radar/constant.js.map +1 -0
  1300. package/esm/series/radar/radar.d.ts +4 -2
  1301. package/esm/series/radar/radar.js +8 -12
  1302. package/esm/series/radar/radar.js.map +1 -1
  1303. package/esm/series/range-area/constant.d.ts +2 -0
  1304. package/esm/series/range-area/constant.js +4 -0
  1305. package/esm/series/range-area/constant.js.map +1 -0
  1306. package/esm/series/range-area/range-area.d.ts +4 -1
  1307. package/esm/series/range-area/range-area.js +10 -4
  1308. package/esm/series/range-area/range-area.js.map +1 -1
  1309. package/esm/series/range-column/constant.d.ts +3 -0
  1310. package/esm/series/range-column/constant.js +28 -0
  1311. package/esm/series/range-column/constant.js.map +1 -0
  1312. package/esm/series/range-column/range-column-3d.d.ts +5 -1
  1313. package/esm/series/range-column/range-column-3d.js +3 -1
  1314. package/esm/series/range-column/range-column-3d.js.map +1 -1
  1315. package/esm/series/range-column/range-column.d.ts +2 -2
  1316. package/esm/series/range-column/range-column.js +6 -13
  1317. package/esm/series/range-column/range-column.js.map +1 -1
  1318. package/esm/series/rose/constant.d.ts +2 -0
  1319. package/esm/series/rose/constant.js +13 -0
  1320. package/esm/series/rose/constant.js.map +1 -0
  1321. package/esm/series/rose/interface.d.ts +3 -0
  1322. package/esm/series/rose/interface.js.map +1 -1
  1323. package/esm/series/rose/rose.d.ts +3 -3
  1324. package/esm/series/rose/rose.js +23 -47
  1325. package/esm/series/rose/rose.js.map +1 -1
  1326. package/esm/series/sankey/constant.d.ts +2 -0
  1327. package/esm/series/sankey/constant.js +17 -0
  1328. package/esm/series/sankey/constant.js.map +1 -0
  1329. package/esm/series/sankey/interface.d.ts +3 -2
  1330. package/esm/series/sankey/interface.js.map +1 -1
  1331. package/esm/series/sankey/sankey.d.ts +6 -2
  1332. package/esm/series/sankey/sankey.js +251 -107
  1333. package/esm/series/sankey/sankey.js.map +1 -1
  1334. package/esm/series/scatter/constant.d.ts +2 -0
  1335. package/esm/series/scatter/constant.js +13 -0
  1336. package/esm/series/scatter/constant.js.map +1 -0
  1337. package/esm/series/scatter/interface.d.ts +3 -2
  1338. package/esm/series/scatter/interface.js.map +1 -1
  1339. package/esm/series/scatter/scatter.d.ts +4 -4
  1340. package/esm/series/scatter/scatter.js +27 -25
  1341. package/esm/series/scatter/scatter.js.map +1 -1
  1342. package/esm/series/sunburst/constant.d.ts +2 -0
  1343. package/esm/series/sunburst/constant.js +13 -0
  1344. package/esm/series/sunburst/constant.js.map +1 -0
  1345. package/esm/series/sunburst/sunburst.js +5 -9
  1346. package/esm/series/sunburst/sunburst.js.map +1 -1
  1347. package/esm/series/treemap/constant.d.ts +2 -0
  1348. package/esm/series/treemap/constant.js +21 -0
  1349. package/esm/series/treemap/constant.js.map +1 -0
  1350. package/esm/series/treemap/treemap.d.ts +1 -1
  1351. package/esm/series/treemap/treemap.js +10 -22
  1352. package/esm/series/treemap/treemap.js.map +1 -1
  1353. package/esm/series/util/utils.d.ts +4 -1
  1354. package/esm/series/util/utils.js +6 -4
  1355. package/esm/series/util/utils.js.map +1 -1
  1356. package/esm/series/waterfall/constant.d.ts +2 -0
  1357. package/esm/series/waterfall/constant.js +17 -0
  1358. package/esm/series/waterfall/constant.js.map +1 -0
  1359. package/esm/series/waterfall/waterfall.d.ts +2 -2
  1360. package/esm/series/waterfall/waterfall.js +3 -12
  1361. package/esm/series/waterfall/waterfall.js.map +1 -1
  1362. package/esm/series/word-cloud/base.d.ts +1 -0
  1363. package/esm/series/word-cloud/base.js +3 -12
  1364. package/esm/series/word-cloud/base.js.map +1 -1
  1365. package/esm/series/word-cloud/constant.d.ts +2 -0
  1366. package/esm/series/word-cloud/constant.js +17 -0
  1367. package/esm/series/word-cloud/constant.js.map +1 -0
  1368. package/esm/series/word-cloud/word-cloud-3d.d.ts +1 -1
  1369. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  1370. package/esm/series/word-cloud/word-cloud.d.ts +1 -1
  1371. package/esm/series/word-cloud/word-cloud.js.map +1 -1
  1372. package/esm/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
  1373. package/esm/theme/builtin/common/component/axis/band-axis.js.map +1 -0
  1374. package/esm/theme/builtin/common/component/axis/cartesian-axis.js +22 -0
  1375. package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
  1376. package/esm/theme/builtin/common/component/axis/common-axis.js +92 -0
  1377. package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -0
  1378. package/esm/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
  1379. package/esm/theme/builtin/common/component/axis/polar-axis.js +23 -0
  1380. package/esm/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
  1381. package/esm/theme/builtin/common/component/brush.js.map +1 -0
  1382. package/esm/theme/builtin/common/component/crosshair.js +104 -0
  1383. package/esm/theme/builtin/common/component/crosshair.js.map +1 -0
  1384. package/esm/theme/builtin/common/component/data-zoom.js +166 -0
  1385. package/esm/theme/builtin/common/component/data-zoom.js.map +1 -0
  1386. package/esm/theme/builtin/common/component/index.js +68 -0
  1387. package/esm/theme/builtin/common/component/index.js.map +1 -0
  1388. package/esm/theme/builtin/common/component/indicator.js +37 -0
  1389. package/esm/theme/builtin/common/component/indicator.js.map +1 -0
  1390. package/esm/theme/builtin/common/component/legend/color-legend.js +51 -0
  1391. package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -0
  1392. package/esm/theme/builtin/common/component/legend/continuous.js +68 -0
  1393. package/esm/theme/builtin/common/component/legend/continuous.js.map +1 -0
  1394. package/esm/theme/builtin/common/component/legend/discrete-legend.js +79 -0
  1395. package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
  1396. package/esm/theme/builtin/common/component/legend/size-legend.js +80 -0
  1397. package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -0
  1398. package/esm/theme/builtin/common/component/map-label.js +51 -0
  1399. package/esm/theme/builtin/common/component/map-label.js.map +1 -0
  1400. package/esm/theme/builtin/common/component/mark-area.js +39 -0
  1401. package/esm/theme/builtin/common/component/mark-area.js.map +1 -0
  1402. package/esm/theme/builtin/common/component/mark-line.js +61 -0
  1403. package/esm/theme/builtin/common/component/mark-line.js.map +1 -0
  1404. package/esm/theme/builtin/common/component/mark-point.js.map +1 -0
  1405. package/esm/theme/builtin/common/component/player.js +89 -0
  1406. package/esm/theme/builtin/common/component/player.js.map +1 -0
  1407. package/esm/theme/builtin/common/component/poptip.d.ts +2 -0
  1408. package/esm/theme/builtin/common/component/poptip.js +46 -0
  1409. package/esm/theme/builtin/common/component/poptip.js.map +1 -0
  1410. package/esm/theme/builtin/common/component/title.js +27 -0
  1411. package/esm/theme/builtin/common/component/title.js.map +1 -0
  1412. package/esm/theme/builtin/common/component/tooltip.js +81 -0
  1413. package/esm/theme/builtin/common/component/tooltip.js.map +1 -0
  1414. package/esm/theme/builtin/common/component/total-label.d.ts +2 -0
  1415. package/esm/theme/builtin/common/component/total-label.js +21 -0
  1416. package/esm/theme/builtin/common/component/total-label.js.map +1 -0
  1417. package/esm/theme/builtin/common/constants.js +19 -0
  1418. package/esm/theme/builtin/common/constants.js.map +1 -0
  1419. package/esm/theme/builtin/common/mark.js +81 -0
  1420. package/esm/theme/builtin/common/mark.js.map +1 -0
  1421. package/esm/theme/builtin/common/series/area.js +17 -0
  1422. package/esm/theme/builtin/common/series/area.js.map +1 -0
  1423. package/esm/theme/builtin/common/series/bar.js +12 -0
  1424. package/esm/theme/builtin/common/series/bar.js.map +1 -0
  1425. package/esm/theme/builtin/common/series/bar3d.js +15 -0
  1426. package/esm/theme/builtin/common/series/bar3d.js.map +1 -0
  1427. package/esm/theme/builtin/common/series/box-plot.js.map +1 -0
  1428. package/esm/theme/builtin/common/series/circle-packing.js +28 -0
  1429. package/esm/theme/builtin/common/series/circle-packing.js.map +1 -0
  1430. package/esm/theme/builtin/common/series/circular-progress.js.map +1 -0
  1431. package/esm/theme/builtin/common/series/dot.js +34 -0
  1432. package/esm/theme/builtin/common/series/dot.js.map +1 -0
  1433. package/esm/theme/builtin/common/series/funnel.js +42 -0
  1434. package/esm/theme/builtin/common/series/funnel.js.map +1 -0
  1435. package/esm/theme/builtin/common/series/funnel3d.js +42 -0
  1436. package/esm/theme/builtin/common/series/funnel3d.js.map +1 -0
  1437. package/esm/theme/builtin/common/series/gauge-pointer.js.map +1 -0
  1438. package/esm/theme/builtin/common/series/gauge.js.map +1 -0
  1439. package/esm/theme/builtin/common/series/heatmap.js.map +1 -0
  1440. package/esm/theme/builtin/common/series/index.js.map +1 -0
  1441. package/esm/theme/builtin/common/series/line.js +17 -0
  1442. package/esm/theme/builtin/common/series/line.js.map +1 -0
  1443. package/esm/theme/builtin/common/series/linear-progress.js.map +1 -0
  1444. package/esm/theme/builtin/common/series/link.js.map +1 -0
  1445. package/esm/theme/builtin/common/series/map.js +28 -0
  1446. package/esm/theme/builtin/common/series/map.js.map +1 -0
  1447. package/esm/theme/builtin/common/series/pie.js +17 -0
  1448. package/esm/theme/builtin/common/series/pie.js.map +1 -0
  1449. package/esm/theme/builtin/common/series/pie3d.js +14 -0
  1450. package/esm/theme/builtin/common/series/pie3d.js.map +1 -0
  1451. package/esm/theme/builtin/common/series/radar.js +16 -0
  1452. package/esm/theme/builtin/common/series/radar.js.map +1 -0
  1453. package/esm/theme/builtin/common/series/rangeColumn.js +22 -0
  1454. package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -0
  1455. package/esm/theme/builtin/common/series/rose.js +14 -0
  1456. package/esm/theme/builtin/common/series/rose.js.map +1 -0
  1457. package/esm/theme/builtin/common/series/sankey.js +9 -0
  1458. package/esm/theme/builtin/common/series/sankey.js.map +1 -0
  1459. package/esm/theme/builtin/common/series/scatter.js +20 -0
  1460. package/esm/theme/builtin/common/series/scatter.js.map +1 -0
  1461. package/esm/theme/builtin/common/series/sunburst.js +40 -0
  1462. package/esm/theme/builtin/common/series/sunburst.js.map +1 -0
  1463. package/esm/theme/builtin/common/series/treemap.js +36 -0
  1464. package/esm/theme/builtin/common/series/treemap.js.map +1 -0
  1465. package/esm/theme/builtin/common/series/waterfall.js +32 -0
  1466. package/esm/theme/builtin/common/series/waterfall.js.map +1 -0
  1467. package/esm/theme/builtin/common/series/word-cloud.js.map +1 -0
  1468. package/esm/theme/builtin/common/series/word-cloud3d.js.map +1 -0
  1469. package/esm/theme/builtin/dark/color-scheme.d.ts +2 -0
  1470. package/esm/theme/builtin/dark/color-scheme.js +29 -0
  1471. package/esm/theme/builtin/dark/color-scheme.js.map +1 -0
  1472. package/esm/theme/builtin/dark/index.d.ts +2 -0
  1473. package/esm/theme/builtin/dark/index.js +7 -0
  1474. package/esm/theme/builtin/dark/index.js.map +1 -0
  1475. package/esm/theme/builtin/index.d.ts +4 -0
  1476. package/esm/theme/builtin/index.js +10 -0
  1477. package/esm/theme/builtin/index.js.map +1 -0
  1478. package/esm/theme/builtin/light/color-scheme.d.ts +2 -0
  1479. package/esm/theme/builtin/light/color-scheme.js +29 -0
  1480. package/esm/theme/builtin/light/color-scheme.js.map +1 -0
  1481. package/esm/theme/builtin/light/index.js +26 -0
  1482. package/esm/theme/builtin/light/index.js.map +1 -0
  1483. package/esm/theme/color-scheme/builtin/default.d.ts +2 -0
  1484. package/esm/theme/color-scheme/builtin/default.js +7 -0
  1485. package/esm/theme/color-scheme/builtin/default.js.map +1 -0
  1486. package/esm/theme/color-scheme/builtin/interface.d.ts +22 -0
  1487. package/esm/theme/color-scheme/builtin/interface.js +2 -0
  1488. package/esm/theme/color-scheme/builtin/interface.js.map +1 -0
  1489. package/esm/theme/color-scheme/interface.d.ts +3 -2
  1490. package/esm/theme/color-scheme/interface.js.map +1 -1
  1491. package/esm/theme/color-scheme/util.d.ts +2 -1
  1492. package/esm/theme/color-scheme/util.js +14 -3
  1493. package/esm/theme/color-scheme/util.js.map +1 -1
  1494. package/esm/theme/index.d.ts +1 -1
  1495. package/esm/theme/index.js +1 -1
  1496. package/esm/theme/index.js.map +1 -1
  1497. package/esm/theme/interface.d.ts +18 -7
  1498. package/esm/theme/interface.js.map +1 -1
  1499. package/esm/theme/theme-manager.js +6 -6
  1500. package/esm/theme/theme-manager.js.map +1 -1
  1501. package/esm/typings/spec/common.d.ts +16 -4
  1502. package/esm/typings/spec/common.js.map +1 -1
  1503. package/esm/typings/tooltip/label.d.ts +10 -0
  1504. package/esm/typings/tooltip/label.js +2 -0
  1505. package/esm/typings/tooltip/label.js.map +1 -0
  1506. package/esm/typings/tooltip/line.d.ts +3 -2
  1507. package/esm/typings/tooltip/line.js.map +1 -1
  1508. package/esm/typings/tooltip/shape.d.ts +2 -0
  1509. package/esm/typings/tooltip/shape.js.map +1 -1
  1510. package/esm/typings/visual.d.ts +11 -21
  1511. package/esm/typings/visual.js.map +1 -1
  1512. package/esm/util/data.d.ts +0 -8
  1513. package/esm/util/data.js +1 -7
  1514. package/esm/util/data.js.map +1 -1
  1515. package/esm/util/object.d.ts +2 -4
  1516. package/esm/util/object.js +2 -13
  1517. package/esm/util/object.js.map +1 -1
  1518. package/esm/util/scale.d.ts +2 -6
  1519. package/esm/util/scale.js +1 -5
  1520. package/esm/util/scale.js.map +1 -1
  1521. package/esm/util/space.d.ts +4 -9
  1522. package/esm/util/space.js +13 -26
  1523. package/esm/util/space.js.map +1 -1
  1524. package/esm/util/spec/background.d.ts +4 -0
  1525. package/esm/util/spec/background.js +21 -0
  1526. package/esm/util/spec/background.js.map +1 -0
  1527. package/esm/util/spec/clone-deep.d.ts +1 -0
  1528. package/esm/util/spec/clone-deep.js +20 -0
  1529. package/esm/util/spec/clone-deep.js.map +1 -0
  1530. package/esm/util/spec/common.d.ts +3 -0
  1531. package/esm/util/spec/common.js +15 -0
  1532. package/esm/util/spec/common.js.map +1 -0
  1533. package/esm/util/spec/index.d.ts +7 -0
  1534. package/esm/util/spec/index.js +14 -0
  1535. package/esm/util/spec/index.js.map +1 -0
  1536. package/esm/util/spec/merge-spec.d.ts +1 -0
  1537. package/esm/util/spec/merge-spec.js +48 -0
  1538. package/esm/util/spec/merge-spec.js.map +1 -0
  1539. package/esm/util/spec/merge-theme.d.ts +3 -0
  1540. package/esm/util/spec/merge-theme.js +34 -0
  1541. package/esm/util/spec/merge-theme.js.map +1 -0
  1542. package/esm/util/spec/preprocess.d.ts +3 -0
  1543. package/esm/util/spec/preprocess.js +20 -0
  1544. package/esm/util/spec/preprocess.js.map +1 -0
  1545. package/esm/util/spec/transform.d.ts +3 -0
  1546. package/esm/util/spec/transform.js +20 -0
  1547. package/esm/util/spec/transform.js.map +1 -0
  1548. package/esm/util/text.d.ts +1 -6
  1549. package/esm/util/text.js +5 -19
  1550. package/esm/util/text.js.map +1 -1
  1551. package/esm/vchart-all.js +4 -4
  1552. package/esm/vchart-all.js.map +1 -1
  1553. package/esm/vchart-simple.js +18 -2
  1554. package/esm/vchart-simple.js.map +1 -1
  1555. package/package.json +21 -14
  1556. package/cjs/component/axis/utils.d.ts +0 -28
  1557. package/cjs/component/axis/utils.js +0 -71
  1558. package/cjs/component/axis/utils.js.map +0 -1
  1559. package/cjs/plugin/components/axis-label-overlap-plugin.d.ts +0 -10
  1560. package/cjs/plugin/components/axis-label-overlap-plugin.js +0 -75
  1561. package/cjs/plugin/components/axis-label-overlap-plugin.js.map +0 -1
  1562. package/cjs/theme/buildin-theme/config.d.ts +0 -2
  1563. package/cjs/theme/buildin-theme/config.js +0 -8
  1564. package/cjs/theme/buildin-theme/config.js.map +0 -1
  1565. package/cjs/theme/buildin-theme/index.d.ts +0 -5
  1566. package/cjs/theme/buildin-theme/index.js +0 -27
  1567. package/cjs/theme/buildin-theme/index.js.map +0 -1
  1568. package/cjs/theme/buildin-theme/light/color-scheme.js +0 -21
  1569. package/cjs/theme/buildin-theme/light/color-scheme.js.map +0 -1
  1570. package/cjs/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
  1571. package/cjs/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
  1572. package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js +0 -24
  1573. package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
  1574. package/cjs/theme/buildin-theme/light/component/axis/common-axis.js +0 -92
  1575. package/cjs/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
  1576. package/cjs/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
  1577. package/cjs/theme/buildin-theme/light/component/axis/log-axis.d.ts +0 -2
  1578. package/cjs/theme/buildin-theme/light/component/axis/log-axis.js +0 -22
  1579. package/cjs/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
  1580. package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js +0 -25
  1581. package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
  1582. package/cjs/theme/buildin-theme/light/component/brush.js.map +0 -1
  1583. package/cjs/theme/buildin-theme/light/component/crosshair.js +0 -140
  1584. package/cjs/theme/buildin-theme/light/component/crosshair.js.map +0 -1
  1585. package/cjs/theme/buildin-theme/light/component/data-zoom.js +0 -105
  1586. package/cjs/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
  1587. package/cjs/theme/buildin-theme/light/component/index.js +0 -33
  1588. package/cjs/theme/buildin-theme/light/component/index.js.map +0 -1
  1589. package/cjs/theme/buildin-theme/light/component/indicator.js +0 -31
  1590. package/cjs/theme/buildin-theme/light/component/indicator.js.map +0 -1
  1591. package/cjs/theme/buildin-theme/light/component/legend/color-legend.js +0 -29
  1592. package/cjs/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
  1593. package/cjs/theme/buildin-theme/light/component/legend/continuous.js +0 -60
  1594. package/cjs/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
  1595. package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js +0 -69
  1596. package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
  1597. package/cjs/theme/buildin-theme/light/component/legend/size-legend.js +0 -45
  1598. package/cjs/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
  1599. package/cjs/theme/buildin-theme/light/component/map-label.js +0 -57
  1600. package/cjs/theme/buildin-theme/light/component/map-label.js.map +0 -1
  1601. package/cjs/theme/buildin-theme/light/component/mark-area.js +0 -34
  1602. package/cjs/theme/buildin-theme/light/component/mark-area.js.map +0 -1
  1603. package/cjs/theme/buildin-theme/light/component/mark-line.js +0 -56
  1604. package/cjs/theme/buildin-theme/light/component/mark-line.js.map +0 -1
  1605. package/cjs/theme/buildin-theme/light/component/mark-point.js.map +0 -1
  1606. package/cjs/theme/buildin-theme/light/component/player.js +0 -64
  1607. package/cjs/theme/buildin-theme/light/component/player.js.map +0 -1
  1608. package/cjs/theme/buildin-theme/light/component/poptip.d.ts +0 -2
  1609. package/cjs/theme/buildin-theme/light/component/poptip.js +0 -32
  1610. package/cjs/theme/buildin-theme/light/component/poptip.js.map +0 -1
  1611. package/cjs/theme/buildin-theme/light/component/title.js +0 -29
  1612. package/cjs/theme/buildin-theme/light/component/title.js.map +0 -1
  1613. package/cjs/theme/buildin-theme/light/component/tooltip.js +0 -65
  1614. package/cjs/theme/buildin-theme/light/component/tooltip.js.map +0 -1
  1615. package/cjs/theme/buildin-theme/light/constants.js +0 -16
  1616. package/cjs/theme/buildin-theme/light/constants.js.map +0 -1
  1617. package/cjs/theme/buildin-theme/light/index.js +0 -20
  1618. package/cjs/theme/buildin-theme/light/index.js.map +0 -1
  1619. package/cjs/theme/buildin-theme/light/mark.js +0 -72
  1620. package/cjs/theme/buildin-theme/light/mark.js.map +0 -1
  1621. package/cjs/theme/buildin-theme/light/series/area.js +0 -26
  1622. package/cjs/theme/buildin-theme/light/series/area.js.map +0 -1
  1623. package/cjs/theme/buildin-theme/light/series/bar.js +0 -21
  1624. package/cjs/theme/buildin-theme/light/series/bar.js.map +0 -1
  1625. package/cjs/theme/buildin-theme/light/series/bar3d.js +0 -24
  1626. package/cjs/theme/buildin-theme/light/series/bar3d.js.map +0 -1
  1627. package/cjs/theme/buildin-theme/light/series/box-plot.js.map +0 -1
  1628. package/cjs/theme/buildin-theme/light/series/circle-packing.js +0 -22
  1629. package/cjs/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
  1630. package/cjs/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
  1631. package/cjs/theme/buildin-theme/light/series/dot.js +0 -32
  1632. package/cjs/theme/buildin-theme/light/series/dot.js.map +0 -1
  1633. package/cjs/theme/buildin-theme/light/series/funnel.js +0 -45
  1634. package/cjs/theme/buildin-theme/light/series/funnel.js.map +0 -1
  1635. package/cjs/theme/buildin-theme/light/series/funnel3d.js +0 -45
  1636. package/cjs/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
  1637. package/cjs/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
  1638. package/cjs/theme/buildin-theme/light/series/gauge.js.map +0 -1
  1639. package/cjs/theme/buildin-theme/light/series/heatmap.js.map +0 -1
  1640. package/cjs/theme/buildin-theme/light/series/index.js.map +0 -1
  1641. package/cjs/theme/buildin-theme/light/series/line.js +0 -26
  1642. package/cjs/theme/buildin-theme/light/series/line.js.map +0 -1
  1643. package/cjs/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
  1644. package/cjs/theme/buildin-theme/light/series/link.js.map +0 -1
  1645. package/cjs/theme/buildin-theme/light/series/map.js +0 -32
  1646. package/cjs/theme/buildin-theme/light/series/map.js.map +0 -1
  1647. package/cjs/theme/buildin-theme/light/series/pie.js +0 -26
  1648. package/cjs/theme/buildin-theme/light/series/pie.js.map +0 -1
  1649. package/cjs/theme/buildin-theme/light/series/pie3d.js +0 -25
  1650. package/cjs/theme/buildin-theme/light/series/pie3d.js.map +0 -1
  1651. package/cjs/theme/buildin-theme/light/series/radar.js +0 -25
  1652. package/cjs/theme/buildin-theme/light/series/radar.js.map +0 -1
  1653. package/cjs/theme/buildin-theme/light/series/rangeColumn.js +0 -26
  1654. package/cjs/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
  1655. package/cjs/theme/buildin-theme/light/series/rose.js +0 -20
  1656. package/cjs/theme/buildin-theme/light/series/rose.js.map +0 -1
  1657. package/cjs/theme/buildin-theme/light/series/sankey.js +0 -14
  1658. package/cjs/theme/buildin-theme/light/series/sankey.js.map +0 -1
  1659. package/cjs/theme/buildin-theme/light/series/scatter.js +0 -29
  1660. package/cjs/theme/buildin-theme/light/series/scatter.js.map +0 -1
  1661. package/cjs/theme/buildin-theme/light/series/sunburst.js +0 -35
  1662. package/cjs/theme/buildin-theme/light/series/sunburst.js.map +0 -1
  1663. package/cjs/theme/buildin-theme/light/series/treemap.js +0 -38
  1664. package/cjs/theme/buildin-theme/light/series/treemap.js.map +0 -1
  1665. package/cjs/theme/buildin-theme/light/series/waterfall.js +0 -39
  1666. package/cjs/theme/buildin-theme/light/series/waterfall.js.map +0 -1
  1667. package/cjs/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
  1668. package/cjs/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
  1669. package/cjs/util/spec.d.ts +0 -11
  1670. package/cjs/util/spec.js +0 -80
  1671. package/cjs/util/spec.js.map +0 -1
  1672. package/esm/component/axis/utils.d.ts +0 -28
  1673. package/esm/component/axis/utils.js +0 -61
  1674. package/esm/component/axis/utils.js.map +0 -1
  1675. package/esm/plugin/components/axis-label-overlap-plugin.d.ts +0 -10
  1676. package/esm/plugin/components/axis-label-overlap-plugin.js +0 -72
  1677. package/esm/plugin/components/axis-label-overlap-plugin.js.map +0 -1
  1678. package/esm/theme/buildin-theme/config.d.ts +0 -2
  1679. package/esm/theme/buildin-theme/config.js +0 -4
  1680. package/esm/theme/buildin-theme/config.js.map +0 -1
  1681. package/esm/theme/buildin-theme/index.d.ts +0 -5
  1682. package/esm/theme/buildin-theme/index.js +0 -10
  1683. package/esm/theme/buildin-theme/index.js.map +0 -1
  1684. package/esm/theme/buildin-theme/light/color-scheme.js +0 -17
  1685. package/esm/theme/buildin-theme/light/color-scheme.js.map +0 -1
  1686. package/esm/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
  1687. package/esm/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
  1688. package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js +0 -22
  1689. package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
  1690. package/esm/theme/buildin-theme/light/component/axis/common-axis.js +0 -86
  1691. package/esm/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
  1692. package/esm/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
  1693. package/esm/theme/buildin-theme/light/component/axis/log-axis.d.ts +0 -2
  1694. package/esm/theme/buildin-theme/light/component/axis/log-axis.js +0 -18
  1695. package/esm/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
  1696. package/esm/theme/buildin-theme/light/component/axis/polar-axis.js +0 -23
  1697. package/esm/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
  1698. package/esm/theme/buildin-theme/light/component/brush.js.map +0 -1
  1699. package/esm/theme/buildin-theme/light/component/crosshair.js +0 -136
  1700. package/esm/theme/buildin-theme/light/component/crosshair.js.map +0 -1
  1701. package/esm/theme/buildin-theme/light/component/data-zoom.js +0 -101
  1702. package/esm/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
  1703. package/esm/theme/buildin-theme/light/component/index.js +0 -65
  1704. package/esm/theme/buildin-theme/light/component/index.js.map +0 -1
  1705. package/esm/theme/buildin-theme/light/component/indicator.js +0 -27
  1706. package/esm/theme/buildin-theme/light/component/indicator.js.map +0 -1
  1707. package/esm/theme/buildin-theme/light/component/legend/color-legend.js +0 -23
  1708. package/esm/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
  1709. package/esm/theme/buildin-theme/light/component/legend/continuous.js +0 -54
  1710. package/esm/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
  1711. package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js +0 -63
  1712. package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
  1713. package/esm/theme/buildin-theme/light/component/legend/size-legend.js +0 -39
  1714. package/esm/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
  1715. package/esm/theme/buildin-theme/light/component/map-label.js +0 -53
  1716. package/esm/theme/buildin-theme/light/component/map-label.js.map +0 -1
  1717. package/esm/theme/buildin-theme/light/component/mark-area.js +0 -30
  1718. package/esm/theme/buildin-theme/light/component/mark-area.js.map +0 -1
  1719. package/esm/theme/buildin-theme/light/component/mark-line.js +0 -52
  1720. package/esm/theme/buildin-theme/light/component/mark-line.js.map +0 -1
  1721. package/esm/theme/buildin-theme/light/component/mark-point.js.map +0 -1
  1722. package/esm/theme/buildin-theme/light/component/player.js +0 -60
  1723. package/esm/theme/buildin-theme/light/component/player.js.map +0 -1
  1724. package/esm/theme/buildin-theme/light/component/poptip.d.ts +0 -2
  1725. package/esm/theme/buildin-theme/light/component/poptip.js +0 -28
  1726. package/esm/theme/buildin-theme/light/component/poptip.js.map +0 -1
  1727. package/esm/theme/buildin-theme/light/component/title.js +0 -23
  1728. package/esm/theme/buildin-theme/light/component/title.js.map +0 -1
  1729. package/esm/theme/buildin-theme/light/component/tooltip.js +0 -61
  1730. package/esm/theme/buildin-theme/light/component/tooltip.js.map +0 -1
  1731. package/esm/theme/buildin-theme/light/constants.js +0 -10
  1732. package/esm/theme/buildin-theme/light/constants.js.map +0 -1
  1733. package/esm/theme/buildin-theme/light/index.js +0 -22
  1734. package/esm/theme/buildin-theme/light/index.js.map +0 -1
  1735. package/esm/theme/buildin-theme/light/mark.js +0 -68
  1736. package/esm/theme/buildin-theme/light/mark.js.map +0 -1
  1737. package/esm/theme/buildin-theme/light/series/area.js +0 -20
  1738. package/esm/theme/buildin-theme/light/series/area.js.map +0 -1
  1739. package/esm/theme/buildin-theme/light/series/bar.js +0 -15
  1740. package/esm/theme/buildin-theme/light/series/bar.js.map +0 -1
  1741. package/esm/theme/buildin-theme/light/series/bar3d.js +0 -18
  1742. package/esm/theme/buildin-theme/light/series/bar3d.js.map +0 -1
  1743. package/esm/theme/buildin-theme/light/series/box-plot.js.map +0 -1
  1744. package/esm/theme/buildin-theme/light/series/circle-packing.js +0 -18
  1745. package/esm/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
  1746. package/esm/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
  1747. package/esm/theme/buildin-theme/light/series/dot.js +0 -28
  1748. package/esm/theme/buildin-theme/light/series/dot.js.map +0 -1
  1749. package/esm/theme/buildin-theme/light/series/funnel.js +0 -41
  1750. package/esm/theme/buildin-theme/light/series/funnel.js.map +0 -1
  1751. package/esm/theme/buildin-theme/light/series/funnel3d.js +0 -41
  1752. package/esm/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
  1753. package/esm/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
  1754. package/esm/theme/buildin-theme/light/series/gauge.js.map +0 -1
  1755. package/esm/theme/buildin-theme/light/series/heatmap.js.map +0 -1
  1756. package/esm/theme/buildin-theme/light/series/index.js.map +0 -1
  1757. package/esm/theme/buildin-theme/light/series/line.js +0 -20
  1758. package/esm/theme/buildin-theme/light/series/line.js.map +0 -1
  1759. package/esm/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
  1760. package/esm/theme/buildin-theme/light/series/link.js.map +0 -1
  1761. package/esm/theme/buildin-theme/light/series/map.js +0 -26
  1762. package/esm/theme/buildin-theme/light/series/map.js.map +0 -1
  1763. package/esm/theme/buildin-theme/light/series/pie.js +0 -20
  1764. package/esm/theme/buildin-theme/light/series/pie.js.map +0 -1
  1765. package/esm/theme/buildin-theme/light/series/pie3d.js +0 -19
  1766. package/esm/theme/buildin-theme/light/series/pie3d.js.map +0 -1
  1767. package/esm/theme/buildin-theme/light/series/radar.js +0 -19
  1768. package/esm/theme/buildin-theme/light/series/radar.js.map +0 -1
  1769. package/esm/theme/buildin-theme/light/series/rangeColumn.js +0 -22
  1770. package/esm/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
  1771. package/esm/theme/buildin-theme/light/series/rose.js +0 -16
  1772. package/esm/theme/buildin-theme/light/series/rose.js.map +0 -1
  1773. package/esm/theme/buildin-theme/light/series/sankey.js +0 -10
  1774. package/esm/theme/buildin-theme/light/series/sankey.js.map +0 -1
  1775. package/esm/theme/buildin-theme/light/series/scatter.js +0 -23
  1776. package/esm/theme/buildin-theme/light/series/scatter.js.map +0 -1
  1777. package/esm/theme/buildin-theme/light/series/sunburst.js +0 -29
  1778. package/esm/theme/buildin-theme/light/series/sunburst.js.map +0 -1
  1779. package/esm/theme/buildin-theme/light/series/treemap.js +0 -34
  1780. package/esm/theme/buildin-theme/light/series/treemap.js.map +0 -1
  1781. package/esm/theme/buildin-theme/light/series/waterfall.js +0 -35
  1782. package/esm/theme/buildin-theme/light/series/waterfall.js.map +0 -1
  1783. package/esm/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
  1784. package/esm/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
  1785. package/esm/util/spec.d.ts +0 -11
  1786. package/esm/util/spec.js +0 -72
  1787. package/esm/util/spec.js.map +0 -1
  1788. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
  1789. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
  1790. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
  1791. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
  1792. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
  1793. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
  1794. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
  1795. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
  1796. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
  1797. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
  1798. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
  1799. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
  1800. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
  1801. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
  1802. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
  1803. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
  1804. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
  1805. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
  1806. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
  1807. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
  1808. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
  1809. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
  1810. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
  1811. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
  1812. /package/cjs/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
  1813. /package/cjs/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
  1814. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
  1815. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
  1816. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
  1817. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
  1818. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
  1819. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
  1820. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
  1821. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
  1822. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
  1823. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
  1824. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
  1825. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
  1826. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
  1827. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
  1828. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
  1829. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
  1830. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
  1831. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
  1832. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
  1833. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
  1834. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
  1835. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
  1836. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
  1837. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
  1838. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
  1839. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
  1840. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
  1841. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
  1842. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
  1843. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
  1844. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
  1845. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
  1846. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
  1847. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
  1848. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
  1849. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
  1850. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
  1851. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
  1852. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
  1853. /package/cjs/theme/{buildin-theme/light → builtin/dark}/color-scheme.d.ts +0 -0
  1854. /package/{esm/theme/buildin-theme → cjs/theme/builtin}/light/color-scheme.d.ts +0 -0
  1855. /package/cjs/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
  1856. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
  1857. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
  1858. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
  1859. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
  1860. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
  1861. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
  1862. /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
  1863. /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
  1864. /package/esm/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
  1865. /package/esm/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
  1866. /package/esm/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
  1867. /package/esm/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
  1868. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
  1869. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
  1870. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
  1871. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
  1872. /package/esm/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
  1873. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
  1874. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
  1875. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
  1876. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
  1877. /package/esm/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
  1878. /package/esm/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
  1879. /package/esm/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
  1880. /package/esm/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
  1881. /package/esm/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
  1882. /package/esm/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
  1883. /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
  1884. /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
  1885. /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
  1886. /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
  1887. /package/esm/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
  1888. /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
  1889. /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
  1890. /package/esm/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
  1891. /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
  1892. /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
  1893. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
  1894. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
  1895. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
  1896. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
  1897. /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
  1898. /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
  1899. /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
  1900. /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
  1901. /package/esm/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
  1902. /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
  1903. /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
  1904. /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
  1905. /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
  1906. /package/esm/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
  1907. /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
  1908. /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
  1909. /package/esm/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
  1910. /package/esm/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
  1911. /package/esm/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
  1912. /package/esm/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
  1913. /package/esm/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
  1914. /package/esm/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
  1915. /package/esm/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
  1916. /package/esm/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
  1917. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
  1918. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
  1919. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
  1920. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
  1921. /package/esm/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.measureTooltipText = exports.getTooltipAttributes = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), util_1 = require("../../../../util"), vrender_1 = require("@visactor/vrender"), getTooltipAttributes = (actualTooltip, style) => {
7
+ const vutils_1 = require("@visactor/vutils"), util_1 = require("../../../../util"), vrender_1 = require("@visactor/vrender"), style_1 = require("./style"), getTooltipAttributes = (actualTooltip, style) => {
8
8
  const {spaceRow: spaceRow, padding: padding, title: titleStyle, shape: shapeStyle, key: keyStyle, value: valueStyle} = style, attribute = Object.assign(Object.assign({}, style), {
9
9
  title: {},
10
10
  content: [],
@@ -27,16 +27,16 @@ const vutils_1 = require("@visactor/vutils"), util_1 = require("../../../../util
27
27
  }));
28
28
  const {title: title = {}, content: content = []} = actualTooltip;
29
29
  let maxWidth = 0, containerHeight = padding.top + padding.bottom, titleMaxHeight = 0;
30
- const {visible: titleVisible = !0, value: titleValue = "", hasShape: titleHasShape, shapeType: titleShapeType = "", shapeHollow: titleShapeHollow, shapeColor: titleShapeColor} = title;
30
+ const {visible: titleVisible = !0, value: titleValue = "", valueStyle: titleValueStyle, hasShape: titleHasShape, shapeType: titleShapeType = "", shapeHollow: titleShapeHollow, shapeColor: titleShapeColor} = title;
31
31
  if (attribute.title.visible = titleVisible, titleVisible) {
32
- const {text: text, width: width, height: height} = (0, exports.measureTooltipText)(titleValue, titleStyle);
33
- if (attribute.title.value = {
32
+ const lineTitleStyle = (0, util_1.mergeSpec)({}, titleStyle, (0, style_1.getTextAttributes)(titleValueStyle, void 0, {})), {text: text, width: width, height: height} = (0,
33
+ exports.measureTooltipText)(titleValue, lineTitleStyle);
34
+ if (attribute.title.value = Object.assign(Object.assign({
34
35
  width: width,
35
- height: height,
36
- text: text,
37
- multiLine: titleStyle.multiLine,
38
- wordBreak: titleStyle.wordBreak
39
- }, maxWidth = width, titleMaxHeight = height, titleHasShape && vrender_1.builtinSymbolsMap[titleShapeType]) {
36
+ height: height
37
+ }, lineTitleStyle), {
38
+ text: text
39
+ }), maxWidth = width, titleMaxHeight = height, titleHasShape && vrender_1.builtinSymbolsMap[titleShapeType]) {
40
40
  const titleShapeAttrs = {
41
41
  symbolType: titleShapeType
42
42
  };
@@ -60,24 +60,24 @@ const vutils_1 = require("@visactor/vutils"), util_1 = require("../../../../util
60
60
  let itemHeight = 0;
61
61
  const {hasShape: hasShape, key: key, shapeColor: shapeColor, shapeHollow: shapeHollow, shapeType: shapeType = "", value: value, isKeyAdaptive: isKeyAdaptive} = item;
62
62
  if ((0, vutils_1.isValid)(key)) {
63
- const {width: width, height: height, text: text} = (0, exports.measureTooltipText)(key, keyStyle);
64
- itemAttrs.key = {
63
+ const lineKeyStyle = (0, util_1.mergeSpec)({}, keyStyle, (0, style_1.getTextAttributes)(item.keyStyle, void 0, {})), {width: width, height: height, text: text} = (0,
64
+ exports.measureTooltipText)(key, lineKeyStyle);
65
+ itemAttrs.key = Object.assign(Object.assign({
65
66
  width: width,
66
- height: height,
67
- text: text,
68
- multiLine: keyStyle.multiLine,
69
- wordBreak: titleStyle.wordBreak
70
- }, isKeyAdaptive ? adaptiveKeyWidths.push(width) : keyWidths.push(width), itemHeight = Math.max(itemHeight, height);
67
+ height: height
68
+ }, lineKeyStyle), {
69
+ text: text
70
+ }), isKeyAdaptive ? adaptiveKeyWidths.push(width) : keyWidths.push(width), itemHeight = Math.max(itemHeight, height);
71
71
  }
72
72
  if ((0, vutils_1.isValid)(value)) {
73
- const {width: width, height: height, text: text} = (0, exports.measureTooltipText)(value, valueStyle);
74
- itemAttrs.value = {
73
+ const lineValueStyle = (0, util_1.mergeSpec)({}, valueStyle, (0, style_1.getTextAttributes)(item.valueStyle, void 0, {})), {width: width, height: height, text: text} = (0,
74
+ exports.measureTooltipText)(value, lineValueStyle);
75
+ itemAttrs.value = Object.assign(Object.assign({
75
76
  width: width,
76
- height: height,
77
- text: text,
78
- multiLine: valueStyle.multiLine,
79
- wordBreak: titleStyle.wordBreak
80
- }, valueWidths.push(width), itemHeight = Math.max(itemHeight, height);
77
+ height: height
78
+ }, lineValueStyle), {
79
+ text: text
80
+ }), valueWidths.push(width), itemHeight = Math.max(itemHeight, height);
81
81
  }
82
82
  if (hasShape && vrender_1.builtinSymbolsMap[shapeType]) {
83
83
  hasContentShape = !0;
@@ -109,6 +109,7 @@ const vutils_1 = require("@visactor/vutils"), util_1 = require("../../../../util
109
109
  exports.getTooltipAttributes = getTooltipAttributes;
110
110
 
111
111
  const measureTooltipText = (text, style) => {
112
+ var _a;
112
113
  const measure = (0, util_1.initTextMeasure)(style);
113
114
  if (!style.multiLine) {
114
115
  const {width: width, height: height} = measure.fullMeasure(text);
@@ -122,8 +123,8 @@ const measureTooltipText = (text, style) => {
122
123
  textLines = textLines.map(((line, i) => i < textLines.length - 1 ? line + "\n" : line));
123
124
  const {width: width, height: height} = measure.fullMeasure(textLines);
124
125
  if (style.maxWidth && style.maxWidth <= width) {
125
- const bound = (0, util_1.getRichTextBounds)({
126
- wordBreak: style.wordBreak,
126
+ const bound = (0, vrender_1.getRichTextBounds)({
127
+ wordBreak: null !== (_a = style.wordBreak) && void 0 !== _a ? _a : "break-word",
127
128
  maxWidth: style.maxWidth,
128
129
  width: 0,
129
130
  height: 0,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/handler/utils/attribute.ts"],"names":[],"mappings":";;;AAQA,6CAA2C;AAC3C,2CAAsE;AAGtE,+CAAsD;AAE/C,MAAM,oBAAoB,GAAG,CAAC,aAA6B,EAAE,KAAoB,EAAqB,EAAE;IAC7G,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE5G,MAAM,SAAS,mCACV,KAAK,KAER,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,EAAE,EAEX,UAAU,EAAE;YACV,KAAK,EAAE,UAAU;YACjB,QAAQ;SACT,EACD,YAAY,EAAE;YACZ,KAAK,EAAE,UAAU;YACjB,GAAG,EAAE,QAAQ;YACb,KAAK,EAAE,UAAU;YACjB,QAAQ;SACT,EAED,eAAe,EAAE,KAAK,EACtB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,CAAC,GACd,CAAC;IACD,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAA6B,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACnE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,aAAa,CAAC;IAEnD,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,eAAe,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CA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AO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,SAAS;SAChB,CAAC;KACH;IAED,OAAO;QACL,KAAK;QACL,MAAM;QACN,IAAI,EAAE,SAAS;KAChB,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,kBAAkB,sBA2C7B","file":"attribute.js","sourcesContent":["import type {\n IContainerSize,\n TooltipAttributes,\n TooltipRowAttrs,\n TooltipSymbolAttrs\n} from '@visactor/vrender-components';\nimport type { IToolTipActual, MaybeArray } from '../../../../typings';\nimport type { ITooltipStyle, ITooltipTextStyle } from '../interface';\nimport { isValid } from '@visactor/vutils';\nimport { getRichTextBounds, initTextMeasure } from '../../../../util';\nimport type { IRichTextParagraphCharacter } from '@visactor/vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport { builtinSymbolsMap } from '@visactor/vrender';\n\nexport const getTooltipAttributes = (actualTooltip: IToolTipActual, style: ITooltipStyle): TooltipAttributes => {\n const { spaceRow, padding, title: titleStyle, shape: shapeStyle, key: keyStyle, value: valueStyle } = style;\n\n const attribute: TooltipAttributes = {\n ...style,\n\n title: {},\n content: [],\n\n titleStyle: {\n value: titleStyle,\n spaceRow\n },\n contentStyle: {\n shape: shapeStyle,\n key: keyStyle,\n value: valueStyle,\n spaceRow\n },\n\n hasContentShape: false,\n keyWidth: 0,\n valueWidth: 0\n };\n (['key', 'value', 'shape'] as (keyof ITooltipStyle)[]).forEach(key => {\n delete attribute[key];\n });\n\n const { title = {}, content = [] } = actualTooltip;\n\n let maxWidth = 0;\n let containerHeight = padding.top + padding.bottom;\n\n // calculate title\n let titleMaxHeight = 0;\n const {\n visible: titleVisible = true,\n value: titleValue = '',\n hasShape: titleHasShape,\n shapeType: titleShapeType = '',\n shapeHollow: titleShapeHollow,\n shapeColor: titleShapeColor\n } = title;\n attribute.title.visible = titleVisible;\n if (titleVisible) {\n const { text, width, height } = measureTooltipText(titleValue, titleStyle);\n attribute.title.value = {\n width,\n height,\n text,\n multiLine: titleStyle.multiLine,\n wordBreak: titleStyle.wordBreak\n };\n maxWidth = width;\n titleMaxHeight = height;\n\n if (titleHasShape && builtinSymbolsMap[titleShapeType]) {\n const titleShapeAttrs: TooltipSymbolAttrs = {\n symbolType: titleShapeType\n };\n if (titleShapeHollow) {\n titleShapeAttrs.stroke = titleShapeColor;\n } else {\n titleShapeAttrs.fill = titleShapeColor;\n }\n attribute.title.shape = titleShapeAttrs;\n maxWidth += shapeStyle.size + shapeStyle.spacing;\n titleMaxHeight = Math.max(shapeStyle.size, titleMaxHeight);\n }\n\n attribute.title.width = maxWidth;\n attribute.title.height = titleMaxHeight;\n\n containerHeight += titleMaxHeight;\n }\n\n // calculate content\n if (content.length) {\n // filter content\n const filteredContent = content.filter(item => {\n return (item.key || item.value) && item.visible !== false;\n });\n if (filteredContent.length) {\n if (titleVisible) {\n containerHeight += spaceRow; // title 与 content 之前的间隔\n }\n\n let hasContentShape = false;\n const keyWidths: number[] = [];\n const adaptiveKeyWidths: number[] = [];\n const valueWidths: number[] = [];\n\n attribute.content = filteredContent.map((item, i) => {\n const itemAttrs: TooltipRowAttrs = { height: 0, spaceRow };\n let itemHeight = 0;\n const { hasShape, key, shapeColor, shapeHollow, shapeType = '', value, isKeyAdaptive } = item;\n if (isValid(key)) {\n const { width, height, text } = measureTooltipText(key, keyStyle);\n itemAttrs.key = {\n width,\n height,\n text,\n multiLine: keyStyle.multiLine,\n wordBreak: titleStyle.wordBreak\n };\n if (!isKeyAdaptive) {\n keyWidths.push(width);\n } else {\n adaptiveKeyWidths.push(width);\n }\n itemHeight = Math.max(itemHeight, height);\n }\n if (isValid(value)) {\n const { width, height, text } = measureTooltipText(value, valueStyle);\n itemAttrs.value = {\n width,\n height,\n text,\n multiLine: valueStyle.multiLine,\n wordBreak: titleStyle.wordBreak\n };\n valueWidths.push(width);\n itemHeight = Math.max(itemHeight, height);\n }\n if (hasShape && builtinSymbolsMap[shapeType]) {\n hasContentShape = true;\n const shape: TooltipSymbolAttrs = {\n visible: true,\n symbolType: shapeType\n };\n if (shapeHollow) {\n shape.stroke = shapeColor;\n } else {\n shape.fill = shapeColor;\n }\n itemHeight = Math.max(shapeStyle.size, itemHeight);\n itemAttrs.shape = shape;\n } else {\n itemAttrs.shape = { visible: false };\n }\n\n itemAttrs.height = itemHeight;\n containerHeight += itemHeight;\n if (i < filteredContent.length - 1) {\n containerHeight += spaceRow;\n }\n\n return itemAttrs;\n });\n\n const maxKeyWidth = keyWidths.length ? Math.max(...keyWidths) : 0; // name 需要对齐\n const maxAdaptiveKeyWidth = adaptiveKeyWidths.length ? Math.max(...adaptiveKeyWidths) : 0;\n const maxValueWidth = valueWidths.length ? Math.max(...valueWidths) : 0; // value 需要对齐\n const shapeWidth = hasContentShape ? shapeStyle.size + shapeStyle.spacing : 0; // shape 列宽度\n maxWidth = Math.max(\n maxKeyWidth + maxValueWidth + keyStyle.spacing + valueStyle.spacing + shapeWidth,\n maxAdaptiveKeyWidth + shapeWidth,\n maxWidth\n );\n attribute.hasContentShape = hasContentShape;\n attribute.keyWidth = maxKeyWidth;\n attribute.valueWidth = maxValueWidth;\n }\n }\n\n const containerSize: IContainerSize = {\n width: maxWidth + padding.left + padding.right,\n height: containerHeight\n };\n\n attribute.panel.width = containerSize.width;\n attribute.panel.height = containerSize.height;\n return attribute;\n};\n\ninterface ITooltipTextInfo {\n width: number;\n height: number;\n text: MaybeArray<number> | MaybeArray<string>;\n}\n\nexport const measureTooltipText = (text: string, style: ITooltipTextStyle): ITooltipTextInfo => {\n const measure = initTextMeasure(style as any);\n if (!style.multiLine) {\n // 单行文本\n const { width, height } = measure.fullMeasure(text);\n return {\n width,\n height,\n text\n };\n }\n // 多行文本\n let textLines = text.split('\\n');\n textLines = textLines.map((line, i) => (i < textLines.length - 1 ? line + '\\n' : line));\n const { width, height } = measure.fullMeasure(textLines);\n\n if (style.maxWidth && style.maxWidth <= width) {\n // 允许自动换行的情况,改用 richText 测量\n const bound = getRichTextBounds({\n wordBreak: style.wordBreak,\n maxWidth: style.maxWidth,\n width: 0,\n height: 0,\n textConfig: textLines.map(\n (line, i) =>\n ({\n ...style,\n text: line\n } as unknown as IRichTextParagraphCharacter)\n )\n });\n return {\n width: bound.width(),\n height: bound.height(),\n text: textLines\n };\n }\n\n return {\n width,\n height,\n text: textLines\n };\n};\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/handler/utils/attribute.ts"],"names":[],"mappings":";;;AAQA,6CAA2C;AAC3C,2CAA8D;AAG9D,+CAAyE;AACzE,mCAA4C;AAErC,MAAM,oBAAoB,GAAG,CAAC,aAA6B,EAAE,KAAoB,EAAqB,EAAE;IAC7G,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE5G,MAAM,SAAS,mCACV,KAAK,KAER,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,EAAE,EAEX,UAAU,EAAE;YACV,KAAK,EAAE,UAAU;YACjB,QAAQ;SACT,EACD,YAAY,EAAE;YACZ,KAAK,EAAE,UAAU;YACjB,GAAG,EAAE,QAAQ;YACb,KAAK,EAAE,UAAU;YACjB,QAAQ;SACT,EAED,eAAe,EAAE,KAAK,EACtB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,CAAC,GACd,CAAC;IACD,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAA6B,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACnE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,aAAa,CAAC;IAEnD,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,eAAe,GAAG,OAAO,CAAC,GAAG,G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,CAAC,SAAS,mCAAI,YAAY;YAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,SAAS,CAAC,GAAG,CACvB,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CACV,CAAC,gCACI,KAAK,KACR,IAAI,EAAE,IAAI,GACgC,CAAA,CAC/C;SACF,CAAC,CAAC;QACH,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,SAAS;SAChB,CAAC;KACH;IAED,OAAO;QACL,KAAK;QACL,MAAM;QACN,IAAI,EAAE,SAAS;KAChB,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,kBAAkB,sBA2C7B","file":"attribute.js","sourcesContent":["import type {\n IContainerSize,\n TooltipAttributes,\n TooltipRowAttrs,\n TooltipSymbolAttrs\n} from '@visactor/vrender-components';\nimport type { IToolTipActual, MaybeArray } from '../../../../typings';\nimport type { ITooltipStyle, ITooltipTextStyle } from '../interface';\nimport { isValid } from '@visactor/vutils';\nimport { initTextMeasure, mergeSpec } from '../../../../util';\nimport type { IRichTextParagraphCharacter } from '@visactor/vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport { builtinSymbolsMap, getRichTextBounds } from '@visactor/vrender';\nimport { getTextAttributes } from './style';\n\nexport const getTooltipAttributes = (actualTooltip: IToolTipActual, style: ITooltipStyle): TooltipAttributes => {\n const { spaceRow, padding, title: titleStyle, shape: shapeStyle, key: keyStyle, value: valueStyle } = style;\n\n const attribute: TooltipAttributes = {\n ...style,\n\n title: {},\n content: [],\n\n titleStyle: {\n value: titleStyle,\n spaceRow\n },\n contentStyle: {\n shape: shapeStyle,\n key: keyStyle,\n value: valueStyle,\n spaceRow\n },\n\n hasContentShape: false,\n keyWidth: 0,\n valueWidth: 0\n };\n (['key', 'value', 'shape'] as (keyof ITooltipStyle)[]).forEach(key => {\n delete attribute[key];\n });\n\n const { title = {}, content = [] } = actualTooltip;\n\n let maxWidth = 0;\n let containerHeight = padding.top + padding.bottom;\n\n // calculate title\n let titleMaxHeight = 0;\n const {\n visible: titleVisible = true,\n value: titleValue = '',\n valueStyle: titleValueStyle,\n hasShape: titleHasShape,\n shapeType: titleShapeType = '',\n shapeHollow: titleShapeHollow,\n shapeColor: titleShapeColor\n } = title;\n attribute.title.visible = titleVisible;\n if (titleVisible) {\n const lineTitleStyle = mergeSpec({}, titleStyle, getTextAttributes(titleValueStyle, undefined, {}));\n const { text, width, height } = measureTooltipText(titleValue, lineTitleStyle);\n attribute.title.value = {\n width,\n height,\n ...lineTitleStyle,\n text\n };\n maxWidth = width;\n titleMaxHeight = height;\n\n if (titleHasShape && builtinSymbolsMap[titleShapeType]) {\n const titleShapeAttrs: TooltipSymbolAttrs = {\n symbolType: titleShapeType\n };\n if (titleShapeHollow) {\n titleShapeAttrs.stroke = titleShapeColor;\n } else {\n titleShapeAttrs.fill = titleShapeColor;\n }\n attribute.title.shape = titleShapeAttrs;\n maxWidth += shapeStyle.size + shapeStyle.spacing;\n titleMaxHeight = Math.max(shapeStyle.size, titleMaxHeight);\n }\n\n attribute.title.width = maxWidth;\n attribute.title.height = titleMaxHeight;\n\n containerHeight += titleMaxHeight;\n }\n\n // calculate content\n if (content.length) {\n // filter content\n const filteredContent = content.filter(item => {\n return (item.key || item.value) && item.visible !== false;\n });\n if (filteredContent.length) {\n if (titleVisible) {\n containerHeight += spaceRow; // title 与 content 之前的间隔\n }\n\n let hasContentShape = false;\n const keyWidths: number[] = [];\n const adaptiveKeyWidths: number[] = [];\n const valueWidths: number[] = [];\n\n attribute.content = filteredContent.map((item, i) => {\n const itemAttrs: TooltipRowAttrs = { height: 0, spaceRow };\n let itemHeight = 0;\n const { hasShape, key, shapeColor, shapeHollow, shapeType = '', value, isKeyAdaptive } = item;\n if (isValid(key)) {\n const lineKeyStyle = mergeSpec({}, keyStyle, getTextAttributes(item.keyStyle, undefined, {}));\n const { width, height, text } = measureTooltipText(key, lineKeyStyle);\n itemAttrs.key = {\n width,\n height,\n ...lineKeyStyle,\n text\n };\n if (!isKeyAdaptive) {\n keyWidths.push(width);\n } else {\n adaptiveKeyWidths.push(width);\n }\n itemHeight = Math.max(itemHeight, height);\n }\n if (isValid(value)) {\n const lineValueStyle = mergeSpec({}, valueStyle, getTextAttributes(item.valueStyle, undefined, {}));\n const { width, height, text } = measureTooltipText(value, lineValueStyle);\n itemAttrs.value = {\n width,\n height,\n ...lineValueStyle,\n text\n };\n valueWidths.push(width);\n itemHeight = Math.max(itemHeight, height);\n }\n if (hasShape && builtinSymbolsMap[shapeType]) {\n hasContentShape = true;\n const shape: TooltipSymbolAttrs = {\n visible: true,\n symbolType: shapeType\n };\n if (shapeHollow) {\n shape.stroke = shapeColor;\n } else {\n shape.fill = shapeColor;\n }\n itemHeight = Math.max(shapeStyle.size, itemHeight);\n itemAttrs.shape = shape;\n } else {\n itemAttrs.shape = { visible: false };\n }\n\n itemAttrs.height = itemHeight;\n containerHeight += itemHeight;\n if (i < filteredContent.length - 1) {\n containerHeight += spaceRow;\n }\n\n return itemAttrs;\n });\n\n const maxKeyWidth = keyWidths.length ? Math.max(...keyWidths) : 0; // name 需要对齐\n const maxAdaptiveKeyWidth = adaptiveKeyWidths.length ? Math.max(...adaptiveKeyWidths) : 0;\n const maxValueWidth = valueWidths.length ? Math.max(...valueWidths) : 0; // value 需要对齐\n const shapeWidth = hasContentShape ? shapeStyle.size + shapeStyle.spacing : 0; // shape 列宽度\n maxWidth = Math.max(\n maxKeyWidth + maxValueWidth + keyStyle.spacing + valueStyle.spacing + shapeWidth,\n maxAdaptiveKeyWidth + shapeWidth,\n maxWidth\n );\n attribute.hasContentShape = hasContentShape;\n attribute.keyWidth = maxKeyWidth;\n attribute.valueWidth = maxValueWidth;\n }\n }\n\n const containerSize: IContainerSize = {\n width: maxWidth + padding.left + padding.right,\n height: containerHeight\n };\n\n attribute.panel.width = containerSize.width;\n attribute.panel.height = containerSize.height;\n return attribute;\n};\n\ninterface ITooltipTextInfo {\n width: number;\n height: number;\n text: MaybeArray<number> | MaybeArray<string>;\n}\n\nexport const measureTooltipText = (text: string, style: ITooltipTextStyle): ITooltipTextInfo => {\n const measure = initTextMeasure(style as any);\n if (!style.multiLine) {\n // 单行文本\n const { width, height } = measure.fullMeasure(text);\n return {\n width,\n height,\n text\n };\n }\n // 多行文本\n let textLines = text.split('\\n');\n textLines = textLines.map((line, i) => (i < textLines.length - 1 ? line + '\\n' : line));\n const { width, height } = measure.fullMeasure(textLines);\n\n if (style.maxWidth && style.maxWidth <= width) {\n // 允许自动换行的情况,改用 richText 测量\n const bound = getRichTextBounds({\n wordBreak: style.wordBreak ?? 'break-word',\n maxWidth: style.maxWidth,\n width: 0,\n height: 0,\n textConfig: textLines.map(\n (line, i) =>\n ({\n ...style,\n text: line\n } as unknown as IRichTextParagraphCharacter)\n )\n });\n return {\n width: bound.width(),\n height: bound.height(),\n text: textLines\n };\n }\n\n return {\n width,\n height,\n text: textLines\n };\n};\n"]}
@@ -1,5 +1,5 @@
1
- import type { TooltipContent } from '../../tooltip';
1
+ import type { TooltipActualTitleContent } from '../../tooltip';
2
2
  import type { IToolTipLinePattern, ITooltipPattern, TooltipData, IToolTipLineActual } from '../../../../typings/tooltip';
3
3
  import type { TooltipHandlerParams } from '../../interface';
4
- export declare const getShowContent: (pattern: ITooltipPattern, data: TooltipData, params: TooltipHandlerParams) => TooltipContent | null;
4
+ export declare const getShowContent: (pattern: ITooltipPattern, data: TooltipData, params: TooltipHandlerParams) => TooltipActualTitleContent | null;
5
5
  export declare const getOneLineData: (datum: any, config: IToolTipLinePattern, params: TooltipHandlerParams) => IToolTipLineActual;
@@ -19,14 +19,13 @@ const util_1 = require("../../../../util"), common_1 = require("./common"), util
19
19
  }, {maxLineCount: maxLineCount = constants_1.TOOLTIP_MAX_LINE_COUNT} = pattern, patternTitleVisible = !1 !== (0,
20
20
  common_1.getTooltipContentValue)(null == patternTitle ? void 0 : patternTitle.visible, data, params);
21
21
  if (patternTitle && patternTitleVisible) {
22
- if (tooltipContent.title.hasShape = patternTitle.hasShape, (0, util_1.isValid)(patternTitle.value)) {
23
- tooltipContent.title = {
24
- hasShape: patternTitle.hasShape,
25
- shapeHollow: patternTitle.shapeHollow
26
- };
27
- const datum = (0, common_1.getFirstDatumFromTooltipData)(data);
28
- tooltipContent.title.value = (0, common_1.getTooltipContentValue)(null == patternTitle ? void 0 : patternTitle.value, datum, params);
29
- }
22
+ const datum = (0, common_1.getFirstDatumFromTooltipData)(data);
23
+ tooltipContent.title = {
24
+ value: (0, common_1.getTooltipContentValue)(null == patternTitle ? void 0 : patternTitle.value, datum, params),
25
+ valueStyle: (0, common_1.getTooltipContentValue)(null == patternTitle ? void 0 : patternTitle.valueStyle, datum, params),
26
+ hasShape: patternTitle.hasShape,
27
+ shapeHollow: patternTitle.shapeHollow
28
+ };
30
29
  } else tooltipContent.title = {
31
30
  hasShape: !1,
32
31
  visible: !1
@@ -78,7 +77,9 @@ const getOneLineData = (datum, config, params) => {
78
77
  common_1.getTooltipContentValue)(config.visible, datum, params) && ((0, util_1.isValid)(key) || (0,
79
78
  util_1.isValid)(value)), isKeyAdaptive = (0, common_1.getTooltipContentValue)(config.isKeyAdaptive, datum, params), shapeType = (0,
80
79
  common_1.getTooltipContentValue)(config.shapeType, datum, params), shapeColor = (0,
81
- common_1.getTooltipContentValue)(config.shapeColor, datum, params);
80
+ common_1.getTooltipContentValue)(config.shapeColor, datum, params), keyStyle = (0,
81
+ common_1.getTooltipContentValue)(config.keyStyle, datum, params), valueStyle = (0,
82
+ common_1.getTooltipContentValue)(config.valueStyle, datum, params);
82
83
  return {
83
84
  key: key,
84
85
  value: value,
@@ -87,7 +88,9 @@ const getOneLineData = (datum, config, params) => {
87
88
  hasShape: config.hasShape,
88
89
  shapeType: shapeType,
89
90
  shapeHollow: config.shapeHollow,
90
- shapeColor: shapeColor
91
+ shapeColor: shapeColor,
92
+ keyStyle: keyStyle,
93
+ valueStyle: valueStyle
91
94
  };
92
95
  };
93
96
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/handler/utils/compose.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AAQzD,qCAAwG;AACxG,uCAAyD;AAGzD,4CAA2E;AASpE,MAAM,cAAc,GAAG,CAC5B,OAAwB,EACxB,IAAiB,EACjB,MAA4B,EACL,EAAE;;IACzB,IACE,CAAC,IAAI;QAEL,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,IAAI,MAAK,UAAU,EAClC;QACA,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,IAAA,+BAAsB,EAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACzE,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC,IAAA,+BAAsB,EAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpF,MAAM,cAAc,GAA6B;QAC/C,KAAK,EAAE;YACL,KAAK,EAAE,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,0CAAE,QAAQ,EAAE;YACtC,QAAQ,EAAE,KAAK;YACf,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,SAAS;SACvB;QACD,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,MAAM,EAAE,YAAY,GAAG,kCAAsB,EAAE,GAAG,OAAO,CAAC;IAG1D,MAAM,mBAAmB,GAAG,IAAA,+BAAsB,EAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,KAAK,CAAC;IAClG,IAAI,CAAC,YAAY,IAAI,CAAC,mBAAmB,EAAE;QACzC,cAAc,CAAC,KAAK,GAAG;YACrB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAK;SACf,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AK,EAAE,MAAM,CAAC,CAAC;IAElF,MAAM,SAAS,GAAG,IAAA,+BAAsB,EAAC,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1E,MAAM,UAAU,GAAG,IAAA,+BAAsB,EAAC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAE5E,OAAO;QACL,GAAG;QACH,KAAK;QACL,OAAO;QACP,aAAa;QACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,SAAgB;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU;KACX,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,cAAc,kBAwBzB","file":"compose.js","sourcesContent":["import { isValid, isNil, array } from '../../../../util';\nimport type { TooltipContent } from '../../tooltip';\nimport type {\n IToolTipLinePattern,\n ITooltipPattern,\n TooltipData,\n IToolTipLineActual\n} from '../../../../typings/tooltip';\nimport { getFirstDatumFromTooltipData, getTooltipContentValue, getTooltipPatternValue } from './common';\nimport { getTooltipActualActiveType } from '../../utils';\nimport type { IDimensionData, IDimensionInfo } from '../../../../event/events/dimension/interface';\nimport type { TooltipHandlerParams } from '../../interface';\nimport { TOOLTIP_MAX_LINE_COUNT, TOOLTIP_OTHERS_LINE } from '../constants';\n\n/**\n * 获得tooltip的实际显示内容\n * @param pattern\n * @param data\n * @param event\n * @returns\n */\nexport const getShowContent = (\n pattern: ITooltipPattern,\n data: TooltipData,\n params: TooltipHandlerParams\n): TooltipContent | null => {\n if (\n !data ||\n // data.key === undefined ||\n params?.event?.type === 'mouseout'\n ) {\n return null;\n }\n\n const patternTitle = getTooltipPatternValue(pattern.title, data, params);\n const patternContent = array(getTooltipPatternValue(pattern.content, data, params));\n\n const tooltipContent: Required<TooltipContent> = {\n title: {\n value: patternTitle?.value?.toString(),\n hasShape: false,\n shapeType: undefined,\n shapeHollow: undefined\n },\n content: []\n };\n\n const { maxLineCount = TOOLTIP_MAX_LINE_COUNT } = pattern;\n\n /** title */\n const patternTitleVisible = getTooltipContentValue(patternTitle?.visible, data, params) !== false;\n if (!patternTitle || !patternTitleVisible) {\n tooltipContent.title = {\n hasShape: false,\n visible: false\n };\n } else {\n tooltipContent.title.hasShape = patternTitle.hasShape;\n if (isValid(patternTitle.value)) {\n tooltipContent.title = {\n hasShape: patternTitle.hasShape,\n shapeHollow: patternTitle.shapeHollow\n };\n // 找到第一个可用的datum\n const datum = getFirstDatumFromTooltipData(data);\n tooltipContent.title.value = getTooltipContentValue(patternTitle?.value, datum, params);\n }\n }\n\n /** content */\n if (pattern.activeType === 'mark') {\n for (const content of patternContent ?? []) {\n const oneLineData = getOneLineData((data as IDimensionData[])[0]?.datum[0], content, params);\n if (oneLineData.visible !== false) {\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n }\n } else if (pattern.activeType === 'dimension') {\n for (const { data: d } of data as IDimensionInfo[]) {\n for (const { datum, series } of d) {\n if (!getTooltipActualActiveType(series.tooltipHelper?.spec).includes('dimension')) {\n continue;\n }\n const contentPatterns =\n patternContent?.filter(\n c => isNil(c.seriesId) || c.seriesId === series.id // 匹配对应series\n ) ?? [];\n for (const datumItem of datum) {\n for (const linePattern of contentPatterns) {\n const oneLineData = getOneLineData(datumItem, linePattern, params);\n if (oneLineData.visible === false) {\n continue;\n }\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n }\n\n if (tooltipContent.title) {\n // TODO:对 title shape 的支持目前还不完整,尚没有相关需求\n if (tooltipContent.content.length > 0 && tooltipContent.content[0].shapeType) {\n if (isNil(tooltipContent.title.shapeType)) {\n tooltipContent.title.shapeType = tooltipContent.content[0].shapeType;\n }\n if (isNil(tooltipContent.title.shapeColor)) {\n tooltipContent.title.shapeColor = tooltipContent.content[0].shapeColor;\n }\n } else {\n tooltipContent.title.hasShape = false;\n }\n }\n\n return tooltipContent;\n};\n\n/**\n * 获得tooltip的单行实际显示内容\n * @param datum\n * @param config\n * @returns\n */\nexport const getOneLineData = (\n datum: any,\n config: IToolTipLinePattern,\n params: TooltipHandlerParams\n): IToolTipLineActual => {\n const key = getTooltipContentValue(config.key, datum, params);\n const value = getTooltipContentValue(config.value, datum, params);\n const visible: boolean =\n getTooltipContentValue(config.visible, datum, params) !== false && (isValid(key) || isValid(value));\n const isKeyAdaptive = getTooltipContentValue(config.isKeyAdaptive, datum, params);\n\n const shapeType = getTooltipContentValue(config.shapeType, datum, params);\n const shapeColor = getTooltipContentValue(config.shapeColor, datum, params);\n\n return {\n key,\n value,\n visible,\n isKeyAdaptive,\n hasShape: config.hasShape,\n shapeType: shapeType as any,\n shapeHollow: config.shapeHollow,\n shapeColor\n };\n};\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/handler/utils/compose.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AAQzD,qCAAwG;AACxG,uCAAyD;AAGzD,4CAA2E;AASpE,MAAM,cAAc,GAAG,CAC5B,OAAwB,EACxB,IAAiB,EACjB,MAA4B,EACM,EAAE;;IACpC,IACE,CAAC,IAAI;QAEL,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,IAAI,MAAK,UAAU,EAClC;QACA,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,IAAA,+BAAsB,EAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,MA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EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU;QACV,QAAQ;QACR,UAAU;KACX,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,cAAc,kBA4BzB","file":"compose.js","sourcesContent":["import { isValid, isNil, array } from '../../../../util';\nimport type { TooltipActualTitleContent } from '../../tooltip';\nimport type {\n IToolTipLinePattern,\n ITooltipPattern,\n TooltipData,\n IToolTipLineActual\n} from '../../../../typings/tooltip';\nimport { getFirstDatumFromTooltipData, getTooltipContentValue, getTooltipPatternValue } from './common';\nimport { getTooltipActualActiveType } from '../../utils';\nimport type { IDimensionData, IDimensionInfo } from '../../../../event/events/dimension/interface';\nimport type { TooltipHandlerParams } from '../../interface';\nimport { TOOLTIP_MAX_LINE_COUNT, TOOLTIP_OTHERS_LINE } from '../constants';\n\n/**\n * 获得tooltip的实际显示内容\n * @param pattern\n * @param data\n * @param event\n * @returns\n */\nexport const getShowContent = (\n pattern: ITooltipPattern,\n data: TooltipData,\n params: TooltipHandlerParams\n): TooltipActualTitleContent | null => {\n if (\n !data ||\n // data.key === undefined ||\n params?.event?.type === 'mouseout'\n ) {\n return null;\n }\n\n const patternTitle = getTooltipPatternValue(pattern.title, data, params);\n const patternContent = array(getTooltipPatternValue(pattern.content, data, params));\n\n const tooltipContent: Required<TooltipActualTitleContent> = {\n title: {\n value: patternTitle?.value?.toString(),\n hasShape: false,\n shapeType: undefined,\n shapeHollow: undefined\n },\n content: []\n };\n\n const { maxLineCount = TOOLTIP_MAX_LINE_COUNT } = pattern;\n\n /** title */\n const patternTitleVisible = getTooltipContentValue(patternTitle?.visible, data, params) !== false;\n if (!patternTitle || !patternTitleVisible) {\n tooltipContent.title = {\n hasShape: false,\n visible: false\n };\n } else {\n // 找到第一个可用的datum\n const datum = getFirstDatumFromTooltipData(data);\n tooltipContent.title = {\n value: getTooltipContentValue(patternTitle?.value, datum, params),\n valueStyle: getTooltipContentValue(patternTitle?.valueStyle, datum, params),\n hasShape: patternTitle.hasShape,\n shapeHollow: patternTitle.shapeHollow\n };\n }\n\n /** content */\n if (pattern.activeType === 'mark') {\n for (const content of patternContent ?? []) {\n const oneLineData = getOneLineData((data as IDimensionData[])[0]?.datum[0], content, params);\n if (oneLineData.visible !== false) {\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n }\n } else if (pattern.activeType === 'dimension') {\n for (const { data: d } of data as IDimensionInfo[]) {\n for (const { datum, series } of d) {\n if (!getTooltipActualActiveType(series.tooltipHelper?.spec).includes('dimension')) {\n continue;\n }\n const contentPatterns =\n patternContent?.filter(\n c => isNil(c.seriesId) || c.seriesId === series.id // 匹配对应series\n ) ?? [];\n for (const datumItem of datum) {\n for (const linePattern of contentPatterns) {\n const oneLineData = getOneLineData(datumItem, linePattern, params);\n if (oneLineData.visible === false) {\n continue;\n }\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n }\n\n if (tooltipContent.title) {\n // TODO:对 title shape 的支持目前还不完整,尚没有相关需求\n if (tooltipContent.content.length > 0 && tooltipContent.content[0].shapeType) {\n if (isNil(tooltipContent.title.shapeType)) {\n tooltipContent.title.shapeType = tooltipContent.content[0].shapeType;\n }\n if (isNil(tooltipContent.title.shapeColor)) {\n tooltipContent.title.shapeColor = tooltipContent.content[0].shapeColor;\n }\n } else {\n tooltipContent.title.hasShape = false;\n }\n }\n\n return tooltipContent;\n};\n\n/**\n * 获得tooltip的单行实际显示内容\n * @param datum\n * @param config\n * @returns\n */\nexport const getOneLineData = (\n datum: any,\n config: IToolTipLinePattern,\n params: TooltipHandlerParams\n): IToolTipLineActual => {\n const key = getTooltipContentValue(config.key, datum, params);\n const value = getTooltipContentValue(config.value, datum, params);\n const visible: boolean =\n getTooltipContentValue(config.visible, datum, params) !== false && (isValid(key) || isValid(value));\n const isKeyAdaptive = getTooltipContentValue(config.isKeyAdaptive, datum, params);\n\n const shapeType = getTooltipContentValue(config.shapeType, datum, params);\n const shapeColor = getTooltipContentValue(config.shapeColor, datum, params);\n const keyStyle = getTooltipContentValue(config.keyStyle, datum, params);\n const valueStyle = getTooltipContentValue(config.valueStyle, datum, params);\n\n return {\n key,\n value,\n visible,\n isKeyAdaptive,\n hasShape: config.hasShape,\n shapeType: shapeType as any,\n shapeHollow: config.shapeHollow,\n shapeColor,\n keyStyle,\n valueStyle\n };\n};\n"]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.getTooltipSpecForShow = void 0;
6
6
 
7
- const util_1 = require("../../../../util"), pattern_1 = require("./pattern"), utils_1 = require("../../utils"), getTooltipSpecForShow = (activeType, globalSpec, series, dimensionInfo) => {
7
+ const util_1 = require("../../../../util"), pattern_1 = require("./pattern"), utils_1 = require("../../utils"), vutils_1 = require("@visactor/vutils"), getTooltipSpecForShow = (activeType, globalSpec, series, dimensionInfo) => {
8
8
  var _a, _b, _c, _d, _e, _f, _g;
9
9
  const finalSpec = Object.assign(Object.assign({}, globalSpec), {
10
10
  activeType: activeType
@@ -26,7 +26,7 @@ const util_1 = require("../../../../util"), pattern_1 = require("./pattern"), ut
26
26
  null === (_g = finalSpec.handler) || void 0 === _g ? void 0 : _g.showTooltip) return finalSpec;
27
27
  }
28
28
  const defaultPattern = getDefaultTooltipPattern(activeType, series, dimensionInfo), seriesPattern = getSeriesTooltipPattern(activeType, series, dimensionInfo), userPattern = (0,
29
- util_1.merge)({}, (0, util_1.cloneDeep)(globalSpec[activeType]), seriesPattern), defaultPatternTitle = defaultPattern.title, titleShape = getShapePattern(void 0, userPattern, void 0, defaultPatternTitle);
29
+ util_1.mergeSpec)({}, (0, util_1.cloneDeep)(globalSpec[activeType]), seriesPattern), defaultPatternTitle = defaultPattern.title, titleShape = getShapePattern(void 0, userPattern, void 0, defaultPatternTitle);
30
30
  if ((0, util_1.isValid)(userPattern.title)) if ((0, util_1.isFunction)(userPattern.title)) {
31
31
  const userPatternTitle = userPattern.title;
32
32
  userPattern.title = (data, params) => {
@@ -104,7 +104,7 @@ const getDefaultTooltipPattern = (activeType, series, dimensionInfo) => {
104
104
  }
105
105
  }
106
106
  return seriesPattern;
107
- }, getSeriesListFromDimensionInfo = dimensionInfo => dimensionInfo.reduce(((list, cur) => list.concat(cur.data.map((data => data.series)).filter(util_1.isValid))), []), getShapePatternMapOfEachSeries = content => {
107
+ }, getSeriesListFromDimensionInfo = (0, vutils_1.memoize)((dimensionInfo => dimensionInfo.reduce(((list, cur) => list.concat(cur.data.map((data => data.series)).filter(util_1.isValid))), []))), getShapePatternMapOfEachSeries = content => {
108
108
  const shapePatternMap = {};
109
109
  return content.forEach((line => {
110
110
  var _a;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/handler/utils/get-spec.ts"],"names":[],"mappings":";;;AAWA,2CAAuF;AACvF,uCAA+C;AAE/C,uCAAyD;AAElD,MAAM,qBAAqB,GAAG,CACnC,UAA6B,EAC7B,UAAwB,EACxB,MAAgB,EAChB,aAAgC,EAClB,EAAE;;IAEhB,MAAM,SAAS,GAAG,gCACb,UAAU,KACb,UAAU,GACK,CAAC;IAClB,IAAI,UAAU,KAAK,MAAM,IAAI,MAAM,EAAE;QAEnC,MAAM,UAAU,GAAG,CAAC,MAAA,MAAA,MAAM,CAAC,aAAa,0CAAE,IAAI,mCAAI,EAAE,CAAiB,CAAC;QAGtE,IAAI,IAAA,cAAO,EAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAA,cAAO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G,MAAA,IAAI,CAAC,QAAQ,mCAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE;YACzB,eAAe,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;SAC7B;IACH,CAAC,CAAC,CAAC;IACH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAGF,MAAM,eAAe,GAAG,CACtB,eAAqC,EACrC,WAA6B,EAC7B,eAAsD,EACtD,mBAA0C,EACpB,EAAE;;IACxB,MAAM,mBAAmB,GAAG,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,QAAQ,mCAAI,CAAC,CAAC,mCAAI,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,CAAC,CAAC,CAAC;IACtG,MAAM,SAAS,GAAmC,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IAC1F,MAAM,YAAY,GAAyB,EAAE,CAAC;IAC9C,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;;QACtB,MAAM,KAAK,GACT,MAAA,MAAA,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,GAAG,CAAC,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,GAAG,CAAC,mCAAI,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,GAAG,CAAC,mCAAI,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,GAAG,CAAC,CAAC;QAC3G,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,YAAY,CAAC,GAAU,CAAC,GAAG,KAAK,CAAC;SAClC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","file":"get-spec.js","sourcesContent":["import type { ITooltipSpec, TooltipHandlerParams } from '../../interface';\nimport type {\n IToolTipLinePattern,\n ITooltipPattern,\n ITooltipShapePattern,\n MaybeArray,\n TooltipActiveType,\n TooltipData,\n TooltipPatternProperty\n} from '../../../../typings';\nimport type { ISeries } from '../../../../series/interface';\nimport { cloneDeep, isValid, merge, array, isFunction, isNil } from '../../../../util';\nimport { makeDefaultPattern } from './pattern';\nimport type { IDimensionInfo } from '../../../../event/events/dimension/interface';\nimport { getTooltipActualActiveType } from '../../utils';\n\nexport const getTooltipSpecForShow = (\n activeType: TooltipActiveType,\n globalSpec: ITooltipSpec,\n series?: ISeries,\n dimensionInfo?: IDimensionInfo[]\n): ITooltipSpec => {\n // 组装tooltip spec\n const finalSpec = {\n ...globalSpec,\n activeType\n } as ITooltipSpec;\n if (activeType === 'mark' && series) {\n // tooltip spec覆盖优先级: series spec > global spec > default pattern\n const seriesSpec = (series.tooltipHelper?.spec ?? {}) as ITooltipSpec;\n\n // visible\n if (isValid(seriesSpec.visible) || isValid(seriesSpec.activeType)) {\n finalSpec.visible = getTooltipActualActiveType(seriesSpec).includes('mark');\n } else if (isValid(globalSpec.visible) || isValid(globalSpec.activeType)) {\n finalSpec.visible = getTooltipActualActiveType(globalSpec).includes('mark');\n } else {\n finalSpec.visible = true;\n }\n\n // 优先使用自定义handler\n finalSpec.handler = seriesSpec.handler ?? globalSpec.handler ?? undefined;\n if (finalSpec.handler?.showTooltip) {\n return finalSpec;\n }\n } else if (activeType === 'dimension' && dimensionInfo?.length) {\n // tooltip spec覆盖优先级: series spec > global spec > default pattern\n const seriesList = getSeriesListFromDimensionInfo(dimensionInfo);\n\n // visible\n if (seriesList.every(series => !getTooltipActualActiveType(series.tooltipHelper?.spec).includes('dimension'))) {\n finalSpec.visible = false;\n } else if (isValid(globalSpec.visible) || isValid(globalSpec.activeType)) {\n finalSpec.visible = getTooltipActualActiveType(globalSpec).includes('dimension');\n } else {\n finalSpec.visible = true;\n }\n\n // 优先使用自定义handler\n finalSpec.handler = globalSpec.handler ?? undefined;\n if (finalSpec.handler?.showTooltip) {\n return finalSpec;\n }\n }\n\n // 默认的 pattern\n const defaultPattern = getDefaultTooltipPattern(activeType, series, dimensionInfo);\n // 来自系列的 pattern\n const seriesPattern = getSeriesTooltipPattern(activeType, series, dimensionInfo);\n // 来自用户配置的 pattern\n const userPattern: ITooltipPattern = merge({}, cloneDeep(globalSpec[activeType]), seriesPattern);\n\n // 对pattern进行组装\n // 组装 title\n const defaultPatternTitle = defaultPattern.title as IToolTipLinePattern | undefined;\n const titleShape: ITooltipShapePattern = getShapePattern(undefined, userPattern, undefined, defaultPatternTitle);\n if (isValid(userPattern.title)) {\n // 排除是回调的情况\n if (!isFunction(userPattern.title)) {\n userPattern.title = {\n ...defaultPattern.title,\n ...titleShape, // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userPattern.title\n };\n } else {\n const userPatternTitle = userPattern.title;\n userPattern.title = (data?: TooltipData, params?: TooltipHandlerParams) => {\n const userResult = userPatternTitle(data, params) ?? {};\n return {\n ...titleShape, // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userResult\n };\n };\n }\n } else {\n userPattern.title = {\n ...defaultPattern.title,\n ...titleShape\n };\n }\n\n // 组装 content\n const defaultPatternContent = array(defaultPattern.content) as IToolTipLinePattern[];\n if (isValid(userPattern.content)) {\n const shapePatternMap = getShapePatternMapOfEachSeries(defaultPatternContent);\n // 排除是回调的情况\n if (!isFunction(userPattern.content)) {\n const newPatternContent: IToolTipLinePattern[] = [];\n array(userPattern.content).forEach(userLine => {\n newPatternContent.push({\n ...getShapePattern(userLine as IToolTipLinePattern, userPattern, shapePatternMap), // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userLine\n });\n });\n userPattern.content = newPatternContent;\n } else {\n const userPatternContent = userPattern.content;\n userPattern.content = (data?: TooltipData, params?: TooltipHandlerParams) => {\n const newPatternContent: IToolTipLinePattern[] = [];\n array(userPatternContent(data, params) ?? []).forEach(userLine => {\n newPatternContent.push({\n ...getShapePattern(userLine as IToolTipLinePattern, userPattern, shapePatternMap), // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userLine\n });\n });\n return newPatternContent;\n };\n }\n } else {\n userPattern.content = defaultPatternContent.map(line => ({\n ...line,\n ...getShapePattern(undefined, userPattern, undefined, line)\n }));\n }\n\n finalSpec[activeType] = {\n ...defaultPattern,\n ...userPattern,\n activeType\n };\n\n return finalSpec;\n};\n\n/** 获取默认 tooltip pattern */\nconst getDefaultTooltipPattern = (\n activeType: TooltipActiveType,\n series?: ISeries,\n dimensionInfo?: IDimensionInfo[]\n): ITooltipPattern => {\n // 默认的pattern\n let defaultPattern = {} as ITooltipPattern;\n if (activeType === 'mark' && series) {\n // mark tooltip\n defaultPattern = makeDefaultPattern(series, 'mark') ?? {};\n } else if (activeType === 'dimension' && dimensionInfo?.length) {\n // dimension tooltip\n const patternList: ITooltipPattern[] = [];\n dimensionInfo[0].data.forEach(data => {\n const { series } = data;\n const mockDimensionInfo = [\n {\n ...dimensionInfo[0],\n data: [data]\n }\n ] as IDimensionInfo[];\n const pattern = makeDefaultPattern(series, 'dimension', mockDimensionInfo);\n if (pattern) {\n patternList.push(pattern);\n }\n });\n // 拼接默认 tooltip content\n const defaultPatternContent: Array<TooltipPatternProperty<MaybeArray<IToolTipLinePattern>>> = [];\n patternList.forEach(({ content }) => {\n if (isFunction(content)) {\n defaultPatternContent.push(content);\n } else {\n defaultPatternContent.push(...array(content));\n }\n });\n defaultPattern = {\n ...patternList[0],\n content: defaultPatternContent\n };\n }\n return defaultPattern;\n};\n\n/** 获取来自系列 spec 的 tooltip pattern */\nconst getSeriesTooltipPattern = (\n activeType: TooltipActiveType,\n series?: ISeries,\n dimensionInfo?: IDimensionInfo[]\n): ITooltipPattern => {\n // 默认的pattern\n let seriesPattern = {} as ITooltipPattern;\n if (activeType === 'mark' && series) {\n // mark tooltip\n const seriesSpec = (series.tooltipHelper?.spec ?? {}) as ITooltipSpec;\n seriesPattern = seriesSpec.mark ? cloneDeep(seriesSpec.mark) : {};\n } else if (activeType === 'dimension' && dimensionInfo?.length) {\n // dimension tooltip\n const seriesList = getSeriesListFromDimensionInfo(dimensionInfo);\n const seriesPatternList = seriesList\n .filter(series => {\n const spec = series.tooltipHelper?.spec;\n return isValid(spec?.dimension) && getTooltipActualActiveType(spec).includes('dimension');\n })\n .map(series => series.tooltipHelper.spec.dimension);\n if (seriesPatternList.length) {\n // 拼接系列 tooltip content\n let seriesPatternContent: Array<TooltipPatternProperty<MaybeArray<IToolTipLinePattern>>> | undefined = [];\n if (seriesPatternList.every(({ content }) => isNil(content))) {\n seriesPatternContent = undefined;\n } else {\n seriesPatternList.forEach(({ content }) => {\n if (isNil(content)) {\n return;\n }\n if (isFunction(content)) {\n seriesPatternContent?.push(content);\n } else {\n seriesPatternContent?.push(...array(content));\n }\n });\n }\n seriesPattern = {\n ...seriesPatternList[0],\n content: seriesPatternContent\n };\n }\n }\n return seriesPattern;\n};\n\nconst getSeriesListFromDimensionInfo = (dimensionInfo: IDimensionInfo[]): ISeries[] => {\n return dimensionInfo.reduce(\n (list, cur) => list.concat(cur.data.map(data => data.series).filter(isValid)),\n [] as ISeries[]\n );\n};\n\n/** 获取每个系列对应的 shape pattern */\nconst getShapePatternMapOfEachSeries = (content: IToolTipLinePattern[]): Record<number, ITooltipShapePattern> => {\n const shapePatternMap: Record<number, ITooltipShapePattern> = {};\n content.forEach(line => {\n const key = line.seriesId ?? 0;\n if (!shapePatternMap[key]) {\n shapePatternMap[key] = line;\n }\n });\n return shapePatternMap;\n};\n\n/** 根据优先级获取形状配置 */\nconst getShapePattern = (\n userLinePattern?: IToolTipLinePattern,\n userPattern?: ITooltipPattern,\n shapePatternMap?: Record<number, ITooltipShapePattern>,\n defaultShapePattern?: ITooltipShapePattern\n): ITooltipShapePattern => {\n const shapePatternFromMap = shapePatternMap?.[userLinePattern?.seriesId ?? 0] ?? shapePatternMap?.[0];\n const shapeKeys: (keyof ITooltipShapePattern)[] = ['hasShape', 'shapeType', 'shapeColor'];\n const shapePattern: ITooltipShapePattern = {};\n shapeKeys.forEach(key => {\n const value =\n userLinePattern?.[key] ?? userPattern?.[key] ?? shapePatternFromMap?.[key] ?? defaultShapePattern?.[key];\n if (value !== undefined) {\n shapePattern[key as any] = value;\n }\n });\n return shapePattern;\n};\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/handler/utils/get-spec.ts"],"names":[],"mappings":";;;AAWA,2CAA2F;AAC3F,uCAA+C;AAE/C,uCAAyD;AACzD,6CAA2C;AAEpC,MAAM,qBAAqB,GAAG,CACnC,UAA6B,EAC7B,UAAwB,EACxB,MAAgB,EAChB,aAAgC,EAClB,EAAE;;IAEhB,MAAM,SAAS,GAAG,gCACb,UAAU,KACb,UAAU,GACK,CAAC;IAClB,IAAI,UAAU,KAAK,MAAM,IAAI,MAAM,EAAE;QAEnC,MAAM,UAAU,GAAG,CAAC,MAAA,MAAA,MAAM,CAAC,aAAa,0CAAE,IAAI,mCAAI,EAAE,CAAiB,CAAC;QAGtE,IAAI,IAAA,cAAO,EAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAA,cAAO,EAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YACjE,SAAS,CAAC,OAAO,GAAG,IAAA,kCAA0B,EAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC7E;aAAM,IAAI,IAAA,cAAO,EAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAA,cAAO,EAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YACxE,SAAS,CAAC,OAAO,GAAG,IAAA,kCAA0B,EAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC7E;aAAM;YACL,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;SAC1B;QAGD,SAAS,CAAC,OAAO,GAAG,MAAA,MAAA,UAAU,CAAC,OAAO,mCAAI,UAAU,CAAC,OAAO,mCAAI,SAAS,CAAC;QAC1E,IAAI,MAAA,SAAS,CAAC,OAAO,0CAAE,WAAW,EAAE;YAClC,OAAO,SAAS,CAAC;SAClB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,CAAC;IAC1F,MAAM,YAAY,GAAyB,EAAE,CAAC;IAC9C,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;;QACtB,MAAM,KAAK,GACT,MAAA,MAAA,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,GAAG,CAAC,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,GAAG,CAAC,mCAAI,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,GAAG,CAAC,mCAAI,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,GAAG,CAAC,CAAC;QAC3G,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,YAAY,CAAC,GAAU,CAAC,GAAG,KAAK,CAAC;SAClC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","file":"get-spec.js","sourcesContent":["import type { ITooltipSpec, TooltipHandlerParams } from '../../interface';\nimport type {\n IToolTipLinePattern,\n ITooltipPattern,\n ITooltipShapePattern,\n MaybeArray,\n TooltipActiveType,\n TooltipData,\n TooltipPatternProperty\n} from '../../../../typings';\nimport type { ISeries } from '../../../../series/interface';\nimport { cloneDeep, isValid, mergeSpec, array, isFunction, isNil } from '../../../../util';\nimport { makeDefaultPattern } from './pattern';\nimport type { IDimensionInfo } from '../../../../event/events/dimension/interface';\nimport { getTooltipActualActiveType } from '../../utils';\nimport { memoize } from '@visactor/vutils';\n\nexport const getTooltipSpecForShow = (\n activeType: TooltipActiveType,\n globalSpec: ITooltipSpec,\n series?: ISeries,\n dimensionInfo?: IDimensionInfo[]\n): ITooltipSpec => {\n // 组装tooltip spec\n const finalSpec = {\n ...globalSpec,\n activeType\n } as ITooltipSpec;\n if (activeType === 'mark' && series) {\n // tooltip spec覆盖优先级: series spec > global spec > default pattern\n const seriesSpec = (series.tooltipHelper?.spec ?? {}) as ITooltipSpec;\n\n // visible\n if (isValid(seriesSpec.visible) || isValid(seriesSpec.activeType)) {\n finalSpec.visible = getTooltipActualActiveType(seriesSpec).includes('mark');\n } else if (isValid(globalSpec.visible) || isValid(globalSpec.activeType)) {\n finalSpec.visible = getTooltipActualActiveType(globalSpec).includes('mark');\n } else {\n finalSpec.visible = true;\n }\n\n // 优先使用自定义handler\n finalSpec.handler = seriesSpec.handler ?? globalSpec.handler ?? undefined;\n if (finalSpec.handler?.showTooltip) {\n return finalSpec;\n }\n } else if (activeType === 'dimension' && dimensionInfo?.length) {\n // tooltip spec覆盖优先级: series spec > global spec > default pattern\n const seriesList = getSeriesListFromDimensionInfo(dimensionInfo);\n\n // visible\n if (seriesList.every(series => !getTooltipActualActiveType(series.tooltipHelper?.spec).includes('dimension'))) {\n finalSpec.visible = false;\n } else if (isValid(globalSpec.visible) || isValid(globalSpec.activeType)) {\n finalSpec.visible = getTooltipActualActiveType(globalSpec).includes('dimension');\n } else {\n finalSpec.visible = true;\n }\n\n // 优先使用自定义handler\n finalSpec.handler = globalSpec.handler ?? undefined;\n if (finalSpec.handler?.showTooltip) {\n return finalSpec;\n }\n }\n\n // 默认的 pattern\n const defaultPattern = getDefaultTooltipPattern(activeType, series, dimensionInfo);\n // 来自系列的 pattern\n const seriesPattern = getSeriesTooltipPattern(activeType, series, dimensionInfo);\n // 来自用户配置的 pattern\n const userPattern: ITooltipPattern = mergeSpec({}, cloneDeep(globalSpec[activeType]), seriesPattern);\n\n // 对pattern进行组装\n // 组装 title\n const defaultPatternTitle = defaultPattern.title as IToolTipLinePattern | undefined;\n const titleShape: ITooltipShapePattern = getShapePattern(undefined, userPattern, undefined, defaultPatternTitle);\n if (isValid(userPattern.title)) {\n // 排除是回调的情况\n if (!isFunction(userPattern.title)) {\n userPattern.title = {\n ...defaultPattern.title,\n ...titleShape, // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userPattern.title\n };\n } else {\n const userPatternTitle = userPattern.title;\n userPattern.title = (data?: TooltipData, params?: TooltipHandlerParams) => {\n const userResult = userPatternTitle(data, params) ?? {};\n return {\n ...titleShape, // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userResult\n };\n };\n }\n } else {\n userPattern.title = {\n ...defaultPattern.title,\n ...titleShape\n };\n }\n\n // 组装 content\n const defaultPatternContent = array(defaultPattern.content) as IToolTipLinePattern[];\n if (isValid(userPattern.content)) {\n const shapePatternMap = getShapePatternMapOfEachSeries(defaultPatternContent);\n // 排除是回调的情况\n if (!isFunction(userPattern.content)) {\n const newPatternContent: IToolTipLinePattern[] = [];\n array(userPattern.content).forEach(userLine => {\n newPatternContent.push({\n ...getShapePattern(userLine as IToolTipLinePattern, userPattern, shapePatternMap), // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userLine\n });\n });\n userPattern.content = newPatternContent;\n } else {\n const userPatternContent = userPattern.content;\n userPattern.content = (data?: TooltipData, params?: TooltipHandlerParams) => {\n const newPatternContent: IToolTipLinePattern[] = [];\n array(userPatternContent(data, params) ?? []).forEach(userLine => {\n newPatternContent.push({\n ...getShapePattern(userLine as IToolTipLinePattern, userPattern, shapePatternMap), // shape默认回调实现较复杂,如果用户没有配置则填补默认逻辑\n ...userLine\n });\n });\n return newPatternContent;\n };\n }\n } else {\n userPattern.content = defaultPatternContent.map(line => ({\n ...line,\n ...getShapePattern(undefined, userPattern, undefined, line)\n }));\n }\n\n finalSpec[activeType] = {\n ...defaultPattern,\n ...userPattern,\n activeType\n };\n\n return finalSpec;\n};\n\n/** 获取默认 tooltip pattern */\nconst getDefaultTooltipPattern = (\n activeType: TooltipActiveType,\n series?: ISeries,\n dimensionInfo?: IDimensionInfo[]\n): ITooltipPattern => {\n // 默认的pattern\n let defaultPattern = {} as ITooltipPattern;\n if (activeType === 'mark' && series) {\n // mark tooltip\n defaultPattern = makeDefaultPattern(series, 'mark') ?? {};\n } else if (activeType === 'dimension' && dimensionInfo?.length) {\n // dimension tooltip\n const patternList: ITooltipPattern[] = [];\n dimensionInfo[0].data.forEach(data => {\n const { series } = data;\n const mockDimensionInfo = [\n {\n ...dimensionInfo[0],\n data: [data]\n }\n ] as IDimensionInfo[];\n const pattern = makeDefaultPattern(series, 'dimension', mockDimensionInfo);\n if (pattern) {\n patternList.push(pattern);\n }\n });\n // 拼接默认 tooltip content\n const defaultPatternContent: Array<TooltipPatternProperty<MaybeArray<IToolTipLinePattern>>> = [];\n patternList.forEach(({ content }) => {\n if (isFunction(content)) {\n defaultPatternContent.push(content);\n } else {\n defaultPatternContent.push(...array(content));\n }\n });\n defaultPattern = {\n ...patternList[0],\n content: defaultPatternContent\n };\n }\n return defaultPattern;\n};\n\n/** 获取来自系列 spec 的 tooltip pattern */\nconst getSeriesTooltipPattern = (\n activeType: TooltipActiveType,\n series?: ISeries,\n dimensionInfo?: IDimensionInfo[]\n): ITooltipPattern => {\n // 默认的pattern\n let seriesPattern = {} as ITooltipPattern;\n if (activeType === 'mark' && series) {\n // mark tooltip\n const seriesSpec = (series.tooltipHelper?.spec ?? {}) as ITooltipSpec;\n seriesPattern = seriesSpec.mark ? cloneDeep(seriesSpec.mark) : {};\n } else if (activeType === 'dimension' && dimensionInfo?.length) {\n // dimension tooltip\n const seriesList = getSeriesListFromDimensionInfo(dimensionInfo);\n const seriesPatternList = seriesList\n .filter(series => {\n const spec = series.tooltipHelper?.spec;\n return isValid(spec?.dimension) && getTooltipActualActiveType(spec).includes('dimension');\n })\n .map(series => series.tooltipHelper.spec.dimension);\n if (seriesPatternList.length) {\n // 拼接系列 tooltip content\n let seriesPatternContent: Array<TooltipPatternProperty<MaybeArray<IToolTipLinePattern>>> | undefined = [];\n if (seriesPatternList.every(({ content }) => isNil(content))) {\n seriesPatternContent = undefined;\n } else {\n seriesPatternList.forEach(({ content }) => {\n if (isNil(content)) {\n return;\n }\n if (isFunction(content)) {\n seriesPatternContent?.push(content);\n } else {\n seriesPatternContent?.push(...array(content));\n }\n });\n }\n seriesPattern = {\n ...seriesPatternList[0],\n content: seriesPatternContent\n };\n }\n }\n return seriesPattern;\n};\n\nconst getSeriesListFromDimensionInfo = memoize((dimensionInfo: IDimensionInfo[]): ISeries[] => {\n return dimensionInfo.reduce(\n (list, cur) => list.concat(cur.data.map(data => data.series).filter(isValid)),\n [] as ISeries[]\n );\n});\n\n/** 获取每个系列对应的 shape pattern */\nconst getShapePatternMapOfEachSeries = (content: IToolTipLinePattern[]): Record<number, ITooltipShapePattern> => {\n const shapePatternMap: Record<number, ITooltipShapePattern> = {};\n content.forEach(line => {\n const key = line.seriesId ?? 0;\n if (!shapePatternMap[key]) {\n shapePatternMap[key] = line;\n }\n });\n return shapePatternMap;\n};\n\n/** 根据优先级获取形状配置 */\nconst getShapePattern = (\n userLinePattern?: IToolTipLinePattern,\n userPattern?: ITooltipPattern,\n shapePatternMap?: Record<number, ITooltipShapePattern>,\n defaultShapePattern?: ITooltipShapePattern\n): ITooltipShapePattern => {\n const shapePatternFromMap = shapePatternMap?.[userLinePattern?.seriesId ?? 0] ?? shapePatternMap?.[0];\n const shapeKeys: (keyof ITooltipShapePattern)[] = ['hasShape', 'shapeType', 'shapeColor'];\n const shapePattern: ITooltipShapePattern = {};\n shapeKeys.forEach(key => {\n const value =\n userLinePattern?.[key] ?? userPattern?.[key] ?? shapePatternFromMap?.[key] ?? defaultShapePattern?.[key];\n if (value !== undefined) {\n shapePattern[key as any] = value;\n }\n });\n return shapePattern;\n};\n"]}
@@ -1,4 +1,4 @@
1
1
  import type { ITheme } from '../../../../theme';
2
2
  import type { ITooltipTextTheme } from '../../interface';
3
3
  import type { ITooltipTextStyle } from '../interface';
4
- export declare function getTextAttributes(style?: ITooltipTextTheme, globalTheme?: ITheme): ITooltipTextStyle;
4
+ export declare function getTextAttributes(style?: ITooltipTextTheme, globalTheme?: ITheme, defaultAttributes?: Partial<ITooltipTextStyle>): ITooltipTextStyle;
@@ -4,23 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.getTextAttributes = void 0;
6
6
 
7
- const theme_1 = require("../../../../theme");
7
+ const constants_1 = require("../../../../theme/builtin/common/constants"), defaultTextAttributes = {
8
+ fontFamily: constants_1.THEME_CONSTANTS.defaultFontFamily,
9
+ spacing: 10,
10
+ multiLine: !1,
11
+ wordBreak: "break-word"
12
+ };
8
13
 
9
- function getTextAttributes(style = {}, globalTheme) {
10
- var _a, _b, _c, _d, _e;
11
- return {
12
- fill: style.fontColor,
14
+ function getTextAttributes(style = {}, globalTheme, defaultAttributes) {
15
+ var _a, _b;
16
+ return Object.assign(Object.assign({}, null != defaultAttributes ? defaultAttributes : defaultTextAttributes), {
17
+ fill: null !== (_a = style.fill) && void 0 !== _a ? _a : style.fontColor,
13
18
  textAlign: style.textAlign,
14
19
  textBaseline: style.textBaseline,
15
- fontFamily: null !== (_b = null !== (_a = style.fontFamily) && void 0 !== _a ? _a : null == globalTheme ? void 0 : globalTheme.fontFamily) && void 0 !== _b ? _b : theme_1.DEFAULT_TEXT_FONT_FAMILY,
20
+ fontFamily: null !== (_b = style.fontFamily) && void 0 !== _b ? _b : null == globalTheme ? void 0 : globalTheme.fontFamily,
16
21
  fontSize: style.fontSize,
17
22
  fontWeight: style.fontWeight,
18
23
  lineHeight: style.lineHeight,
19
- spacing: null !== (_c = style.spacing) && void 0 !== _c ? _c : 10,
20
- multiLine: null !== (_d = style.multiLine) && void 0 !== _d && _d,
24
+ spacing: style.spacing,
25
+ multiLine: style.multiLine,
21
26
  maxWidth: style.maxWidth,
22
- wordBreak: null !== (_e = style.wordBreak) && void 0 !== _e ? _e : "break-word"
23
- };
27
+ wordBreak: style.wordBreak
28
+ });
24
29
  }
25
30
 
26
31
  exports.getTextAttributes = getTextAttributes;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/handler/utils/style.ts"],"names":[],"mappings":";;;AAEA,6CAA6D;AAI7D,SAAgB,iBAAiB,CAAC,QAA2B,EAAE,EAAE,WAAoB;;IACnF,MAAM,KAAK,GAAsB;QAC/B,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,UAAU,EAAE,MAAA,MAAA,KAAK,CAAC,UAAU,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,mCAAI,gCAAwB;QACnF,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,EAAE;QAC5B,SAAS,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK;QACnC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,SAAS,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,YAAY;KAC3C,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AAfD,8CAeC","file":"style.js","sourcesContent":["import type { ITheme } from '../../../../theme';\n// eslint-disable-next-line no-duplicate-imports\nimport { DEFAULT_TEXT_FONT_FAMILY } from '../../../../theme';\nimport type { ITooltipTextTheme } from '../../interface';\nimport type { ITooltipTextStyle } from '../interface';\n\nexport function getTextAttributes(style: ITooltipTextTheme = {}, globalTheme?: ITheme) {\n const attrs: ITooltipTextStyle = {\n fill: style.fontColor,\n textAlign: style.textAlign,\n textBaseline: style.textBaseline,\n fontFamily: style.fontFamily ?? globalTheme?.fontFamily ?? DEFAULT_TEXT_FONT_FAMILY,\n fontSize: style.fontSize,\n fontWeight: style.fontWeight,\n lineHeight: style.lineHeight,\n spacing: style.spacing ?? 10,\n multiLine: style.multiLine ?? false,\n maxWidth: style.maxWidth,\n wordBreak: style.wordBreak ?? 'break-word'\n };\n return attrs;\n}\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/handler/utils/style.ts"],"names":[],"mappings":";;;AACA,0EAA6E;AAI7E,MAAM,qBAAqB,GAA+B;IACxD,UAAU,EAAE,2BAAe,CAAC,iBAAiB;IAC7C,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,QAA2B,EAAE,EAC7B,WAAoB,EACpB,iBAA8C;;IAE9C,MAAM,KAAK,mCACN,CAAC,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,qBAAqB,CAAC,KAC/C,IAAI,EAAE,CAAC,MAAA,KAAK,CAAC,IAAI,mCAAI,KAAK,CAAC,SAAS,CAAW,EAC/C,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,UAAU,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,EACvD,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,GAC3B,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AApBD,8CAoBC","file":"style.js","sourcesContent":["import type { ITheme } from '../../../../theme';\nimport { THEME_CONSTANTS } from '../../../../theme/builtin/common/constants';\nimport type { ITooltipTextTheme } from '../../interface';\nimport type { ITooltipTextStyle } from '../interface';\n\nconst defaultTextAttributes: Partial<ITooltipTextStyle> = {\n fontFamily: THEME_CONSTANTS.defaultFontFamily,\n spacing: 10,\n multiLine: false,\n wordBreak: 'break-word'\n};\n\nexport function getTextAttributes(\n style: ITooltipTextTheme = {},\n globalTheme?: ITheme,\n defaultAttributes?: Partial<ITooltipTextStyle>\n): ITooltipTextStyle {\n const attrs: ITooltipTextStyle = {\n ...(defaultAttributes ?? defaultTextAttributes),\n fill: (style.fill ?? style.fontColor) as string,\n textAlign: style.textAlign,\n textBaseline: style.textBaseline,\n fontFamily: style.fontFamily ?? globalTheme?.fontFamily,\n fontSize: style.fontSize,\n fontWeight: style.fontWeight,\n lineHeight: style.lineHeight,\n spacing: style.spacing,\n multiLine: style.multiLine,\n maxWidth: style.maxWidth,\n wordBreak: style.wordBreak\n };\n return attrs;\n}\n"]}
@@ -1,9 +1,11 @@
1
1
  import type { RichTextWordBreak } from '@visactor/vrender';
2
2
  import type { IPadding, StringOrNumber, TextAlign, TextBaseLine } from '../../../typings';
3
+ import type { IColorKey } from '../../../theme/color-scheme/interface';
3
4
  export interface ITooltipTextTheme {
4
5
  fontFamily?: string;
5
6
  fontSize?: number;
6
- fontColor?: string;
7
+ fill?: string | IColorKey;
8
+ fontColor?: string | IColorKey;
7
9
  fontWeight?: StringOrNumber;
8
10
  textAlign?: TextAlign;
9
11
  textBaseline?: TextBaseLine;
@@ -16,9 +18,9 @@ export interface ITooltipTextTheme {
16
18
  export interface ITooltipTheme {
17
19
  panel?: {
18
20
  padding?: IPadding;
19
- backgroundColor?: string;
21
+ backgroundColor?: string | IColorKey;
20
22
  border?: {
21
- color?: string;
23
+ color?: string | IColorKey;
22
24
  width?: number;
23
25
  radius?: number;
24
26
  };
@@ -27,7 +29,7 @@ export interface ITooltipTheme {
27
29
  y: number;
28
30
  blur: number;
29
31
  spread: number;
30
- color: string;
32
+ color: string | IColorKey;
31
33
  };
32
34
  };
33
35
  shape?: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/interface/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["import type { RichTextWordBreak } from '@visactor/vrender';\nimport type { IPadding, StringOrNumber, TextAlign, TextBaseLine } from '../../../typings';\n\nexport interface ITooltipTextTheme {\n /** 字体 */\n fontFamily?: string;\n /** 字体大小 */\n fontSize?: number;\n /** 字体颜色 */\n fontColor?: string;\n /** 字重 */\n fontWeight?: StringOrNumber;\n /** 对齐方式 */\n textAlign?: TextAlign;\n /** 字体基线 */\n textBaseline?: TextBaseLine;\n /** 行高 */\n lineHeight?: number;\n /** 与相邻元素的水平间距 */\n spacing?: number;\n /** 是否支持换行 */\n multiLine?: boolean;\n /** 最大宽度 */\n maxWidth?: number;\n /** 换行模式,默认为'break-word' */\n wordBreak?: RichTextWordBreak;\n}\n\nexport interface ITooltipTheme {\n /** 容器样式配置 */\n panel?: {\n /** tooltip 容器内边距 */\n padding?: IPadding;\n /** 背景色 */\n backgroundColor?: string;\n /** tooltip边框 */\n border?: {\n color?: string;\n width?: number;\n /** 圆角 */\n radius?: number;\n };\n /** tooltip阴影 */\n shadow?: {\n x: number;\n y: number;\n blur: number;\n spread: number;\n color: string;\n };\n };\n shape?: {\n /** 标记大小 */\n size?: number;\n /** shape 与相邻元素的水平间距 */\n spacing?: number;\n };\n /** tooltip标题 */\n titleLabel?: ITooltipTextTheme;\n /** tooltip内容,key字段 */\n keyLabel?: ITooltipTextTheme;\n /** tooltip内容,value字段 */\n valueLabel?: ITooltipTextTheme;\n /** 内容项行间距 */\n spaceRow?: number;\n /** 偏移量 */\n offset?: {\n x?: number;\n y?: number;\n };\n}\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/interface/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["import type { RichTextWordBreak } from '@visactor/vrender';\nimport type { IPadding, StringOrNumber, TextAlign, TextBaseLine } from '../../../typings';\nimport type { IColorKey } from '../../../theme/color-scheme/interface';\n\nexport interface ITooltipTextTheme {\n /** 字体 */\n fontFamily?: string;\n /** 字体大小 */\n fontSize?: number;\n /** 字体颜色 */\n fill?: string | IColorKey;\n /** @deprecated 字体颜色(兼容旧版本) */\n fontColor?: string | IColorKey;\n /** 字重 */\n fontWeight?: StringOrNumber;\n /** 对齐方式 */\n textAlign?: TextAlign;\n /** 字体基线 */\n textBaseline?: TextBaseLine;\n /** 行高 */\n lineHeight?: number;\n /** 与相邻元素的水平间距 */\n spacing?: number;\n /** 是否支持换行 */\n multiLine?: boolean;\n /** 最大宽度 */\n maxWidth?: number;\n /** 换行模式,默认为'break-word' */\n wordBreak?: RichTextWordBreak;\n}\n\nexport interface ITooltipTheme {\n /** 容器样式配置 */\n panel?: {\n /** tooltip 容器内边距 */\n padding?: IPadding;\n /** 背景色 */\n backgroundColor?: string | IColorKey;\n /** tooltip边框 */\n border?: {\n color?: string | IColorKey;\n width?: number;\n /** 圆角 */\n radius?: number;\n };\n /** tooltip阴影 */\n shadow?: {\n x: number;\n y: number;\n blur: number;\n spread: number;\n color: string | IColorKey;\n };\n };\n shape?: {\n /** 标记大小 */\n size?: number;\n /** shape 与相邻元素的水平间距 */\n spacing?: number;\n };\n /** tooltip标题 */\n titleLabel?: ITooltipTextTheme;\n /** tooltip内容,key字段 */\n keyLabel?: ITooltipTextTheme;\n /** tooltip内容,value字段 */\n valueLabel?: ITooltipTextTheme;\n /** 内容项行间距 */\n spaceRow?: number;\n /** 偏移量 */\n offset?: {\n x?: number;\n y?: number;\n };\n}\n"]}
@@ -51,7 +51,7 @@ class BaseTooltipProcessor {
51
51
  }
52
52
  if ((0, vutils_1.isValid)(firstSeries)) break;
53
53
  }
54
- return (0, vutils_1.isValid)(firstSeries) && firstSeries.getDimensionField()[0] === firstSeries.fieldY[0] ? "left" === axis.orient || "right" === axis.orient : "bottom" === axis.orient || "top" === axis.orient;
54
+ return (0, vutils_1.isValid)(firstSeries) && firstSeries.getDimensionField()[0] === firstSeries.fieldY[0] ? "left" === axis.getOrient() || "right" === axis.getOrient() : "bottom" === axis.getOrient() || "top" === axis.getOrient();
55
55
  }))[0]) && void 0 !== _c ? _c : targetDimensionInfo[0];
56
56
  targetDimensionInfo = [ dimensionAxisInfo ];
57
57
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/processor/base.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAK3C,4CAA6C;AAG7C,gDAA+C;AAG/C,+DAAwG;AACxG,6CAA8C;AAG9C,MAAsB,oBAAoB;IAIxC,YAAY,SAAkB;QAapB,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;4BACzC,MAAM;yBACP;qBACF;oBACD,IAAI,IAAA,gBAAO,EAAC,WAAW,CAAC,EAAE;wBACxB,MAAM;qBACP;iBACF;gBACD,IAAI,IAAA,gBAAO,EAAC,WAAW,CAAC,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;oBACxF,OAAO,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC;iBAC1D;gBACD,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC;YAC3D,CAAC,CAAC,CAAC,CAAC,CAAC,mCAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC;YAClC,mBAAmB,GAAG,CAAC,iBAAiB,CAAC,CAAC;SAC3C;QAED,OAAO,mBAAmB,CAAC;IAC7B,CAAC;CACF;AA/FD,oDA+FC","file":"base.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type { BaseEventParams } from '../../../event/interface';\nimport type { TooltipActiveType, TooltipData } from '../../../typings';\nimport type { TooltipHandlerParams } from '../interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { TooltipResult } from '../interface';\nimport type { Tooltip } from '../tooltip';\nimport type { MouseEventData, TooltipInfo } from './interface';\nimport { ChartEvent } from '../../../constant';\nimport type { TooltipEventParams } from '../interface/event';\nimport type { IDimensionInfo } from '../../../event/events/dimension';\nimport { getCartesianDimensionInfo, getPolarDimensionInfo } from '../../../event/events/dimension/util';\nimport { isDiscrete } from '@visactor/vscale';\nimport type { ICartesianSeries } from '../../../series/interface';\n\nexport abstract class BaseTooltipProcessor {\n readonly component: Tooltip;\n activeType: TooltipActiveType;\n\n constructor(component: Tooltip) {\n this.component = component;\n }\n\n /** 触发对应类型的 tooltip */\n abstract showTooltip(info: TooltipInfo, params: BaseEventParams, changePositionOnly: boolean): TooltipResult;\n\n /** 判断是否应该触发 tooltip */\n abstract shouldHandleTooltip(params: BaseEventParams, mouseEventData: Partial<MouseEventData>): boolean;\n\n /** 获取触发 tooltip 需要的信息 */\n abstract getMouseEventData(params: BaseEventParams): MouseEventData;\n\n protected _showTooltipByHandler = (data: TooltipData | undefined, params: TooltipHandlerParams): TooltipResult => {\n this.component.event.emit(ChartEvent.tooltipShow, {\n ...params,\n tooltipData: data,\n activeType: this.activeType,\n tooltip: this.component\n } as TooltipEventParams);\n if (this.component.tooltipHandler?.showTooltip && isValid(data)) {\n return this.component.tooltipHandler.showTooltip(this.activeType, data, params) ?? TooltipResult.success;\n }\n return TooltipResult.failed;\n };\n\n protected _preprocessDimensionInfo(dimensionInfo?: IDimensionInfo[]): IDimensionInfo[] | undefined {\n const newDimensionInfo: IDimensionInfo[] = [];\n dimensionInfo?.forEach(info => {\n const di: IDimensionInfo = {\n ...info,\n data: info.data.filter(\n ({ series }: any) => series.getSpec()?.tooltip?.visible !== false // 过滤掉不需要显示的维度数据\n )\n };\n if (di.data.length > 0) {\n newDimensionInfo.push(di);\n }\n });\n if (newDimensionInfo.length > 0) {\n return newDimensionInfo;\n }\n return undefined;\n }\n\n protected _getDimensionInfo(params: BaseEventParams): IDimensionInfo[] {\n let targetDimensionInfo: IDimensionInfo[] | undefined;\n\n // 处理dimension info\n const x = (params.event as any).viewX;\n const y = (params.event as any).viewY;\n const chart = this.component.getChart();\n const pos = { x, y };\n targetDimensionInfo = [\n ...(getCartesianDimensionInfo(chart, pos) ?? []),\n ...(getPolarDimensionInfo(chart, pos) ?? [])\n ];\n if (targetDimensionInfo.length === 0) {\n targetDimensionInfo = undefined;\n } else if (targetDimensionInfo.length > 1) {\n // 只保留一个轴的dimension info\n const dimensionAxisInfo =\n targetDimensionInfo.filter(info => {\n const axis = info.axis;\n // 优先显示离散轴 tooltip\n if (!isDiscrete(axis.getScale().type)) {\n return false;\n }\n // 下面的逻辑用来判断当前的离散轴是不是维度轴\n let firstSeries: ICartesianSeries | undefined;\n for (const region of axis?.getRegions() ?? []) {\n for (const series of region.getSeries()) {\n if (series.coordinate === 'cartesian') {\n firstSeries = series as ICartesianSeries;\n break;\n }\n }\n if (isValid(firstSeries)) {\n break;\n }\n }\n if (isValid(firstSeries) && firstSeries.getDimensionField()[0] === firstSeries.fieldY[0]) {\n return axis.orient === 'left' || axis.orient === 'right'; // 维度轴为Y轴时,选择只显示Y轴tooltip\n }\n return axis.orient === 'bottom' || axis.orient === 'top'; // 维度轴为X轴时,选择只显示X轴tooltip\n })[0] ?? targetDimensionInfo[0];\n targetDimensionInfo = [dimensionAxisInfo];\n }\n\n return targetDimensionInfo;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/processor/base.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAK3C,4CAA6C;AAG7C,gDAA+C;AAG/C,+DAAwG;AACxG,6CAA8C;AAG9C,MAAsB,oBAAoB;IAIxC,YAAY,SAAkB;QAapB,0BAAqB,GAAG,CAAC,IAA6B,EAAE,MAA4B,EAAiB,EAAE;;YAC/G,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAU,CAAC,WAAW,EAAE,gCAC7C,MAAM,KACT,WAAW,EAAE,IAAI,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,SAAS,GACF,CAAC,CAAC;YACzB,IAAI,CAAA,MAAA,IAAI,CAAC,SAAS,CAAC,cAAc,0CAAE,WAAW,KAAI,IAAA,gBAAO,EAAC,IAAI,CAAC,EAAE;gBAC/D,OAAO,MAAA,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,mCAAI,yBAAa,CAAC,OAAO,CAAC;aAC1G;YACD,OAAO,yBAAa,CAAC,MAAM,CAAC;QAC9B,CAAC,CAAC;QAvBA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IA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cesContent":["import { isValid } from '@visactor/vutils';\nimport type { BaseEventParams } from '../../../event/interface';\nimport type { TooltipActiveType, TooltipData } from '../../../typings';\nimport type { TooltipHandlerParams } from '../interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { TooltipResult } from '../interface';\nimport type { Tooltip } from '../tooltip';\nimport type { MouseEventData, TooltipInfo } from './interface';\nimport { ChartEvent } from '../../../constant';\nimport type { TooltipEventParams } from '../interface/event';\nimport type { IDimensionInfo } from '../../../event/events/dimension';\nimport { getCartesianDimensionInfo, getPolarDimensionInfo } from '../../../event/events/dimension/util';\nimport { isDiscrete } from '@visactor/vscale';\nimport type { ICartesianSeries } from '../../../series/interface';\n\nexport abstract class BaseTooltipProcessor {\n readonly component: Tooltip;\n activeType: TooltipActiveType;\n\n constructor(component: Tooltip) {\n this.component = component;\n }\n\n /** 触发对应类型的 tooltip */\n abstract showTooltip(info: TooltipInfo, params: BaseEventParams, changePositionOnly: boolean): TooltipResult;\n\n /** 判断是否应该触发 tooltip */\n abstract shouldHandleTooltip(params: BaseEventParams, mouseEventData: Partial<MouseEventData>): boolean;\n\n /** 获取触发 tooltip 需要的信息 */\n abstract getMouseEventData(params: BaseEventParams): MouseEventData;\n\n protected _showTooltipByHandler = (data: TooltipData | undefined, params: TooltipHandlerParams): TooltipResult => {\n this.component.event.emit(ChartEvent.tooltipShow, {\n ...params,\n tooltipData: data,\n activeType: this.activeType,\n tooltip: this.component\n } as TooltipEventParams);\n if (this.component.tooltipHandler?.showTooltip && isValid(data)) {\n return this.component.tooltipHandler.showTooltip(this.activeType, data, params) ?? TooltipResult.success;\n }\n return TooltipResult.failed;\n };\n\n protected _preprocessDimensionInfo(dimensionInfo?: IDimensionInfo[]): IDimensionInfo[] | undefined {\n const newDimensionInfo: IDimensionInfo[] = [];\n dimensionInfo?.forEach(info => {\n const di: IDimensionInfo = {\n ...info,\n data: info.data.filter(\n ({ series }: any) => series.getSpec()?.tooltip?.visible !== false // 过滤掉不需要显示的维度数据\n )\n };\n if (di.data.length > 0) {\n newDimensionInfo.push(di);\n }\n });\n if (newDimensionInfo.length > 0) {\n return newDimensionInfo;\n }\n return undefined;\n }\n\n protected _getDimensionInfo(params: BaseEventParams): IDimensionInfo[] {\n let targetDimensionInfo: IDimensionInfo[] | undefined;\n\n // 处理dimension info\n const x = (params.event as any).viewX;\n const y = (params.event as any).viewY;\n const chart = this.component.getChart();\n const pos = { x, y };\n targetDimensionInfo = [\n ...(getCartesianDimensionInfo(chart, pos) ?? []),\n ...(getPolarDimensionInfo(chart, pos) ?? [])\n ];\n if (targetDimensionInfo.length === 0) {\n targetDimensionInfo = undefined;\n } else if (targetDimensionInfo.length > 1) {\n // 只保留一个轴的dimension info\n const dimensionAxisInfo =\n targetDimensionInfo.filter(info => {\n const axis = info.axis;\n // 优先显示离散轴 tooltip\n if (!isDiscrete(axis.getScale().type)) {\n return false;\n }\n // 下面的逻辑用来判断当前的离散轴是不是维度轴\n let firstSeries: ICartesianSeries | undefined;\n for (const region of axis?.getRegions() ?? []) {\n for (const series of region.getSeries()) {\n if (series.coordinate === 'cartesian') {\n firstSeries = series as ICartesianSeries;\n break;\n }\n }\n if (isValid(firstSeries)) {\n break;\n }\n }\n if (isValid(firstSeries) && firstSeries.getDimensionField()[0] === firstSeries.fieldY[0]) {\n return axis.getOrient() === 'left' || axis.getOrient() === 'right'; // 维度轴为Y轴时,选择只显示Y轴tooltip\n }\n return axis.getOrient() === 'bottom' || axis.getOrient() === 'top'; // 维度轴为X轴时,选择只显示X轴tooltip\n })[0] ?? targetDimensionInfo[0];\n targetDimensionInfo = [dimensionAxisInfo];\n }\n\n return targetDimensionInfo;\n }\n}\n"]}
@@ -8,21 +8,21 @@ import type { ITooltipHandler, IToolTipLineActual, TooltipActiveType } from '../
8
8
  import type { Datum, IShowTooltipOption } from '../../typings';
9
9
  import { TooltipResult, type ITooltip, type ITooltipActiveTypeAsKeys, type ITooltipSpec, type ITooltipTheme, type TooltipHandlerParams, type TotalMouseEventData } from './interface';
10
10
  import { MarkTooltipProcessor, DimensionTooltipProcessor } from './processor';
11
- export type TooltipContent = {
11
+ export type TooltipActualTitleContent = {
12
12
  title?: IToolTipLineActual;
13
13
  content?: IToolTipLineActual[];
14
14
  };
15
- export declare class Tooltip extends BaseComponent implements ITooltip {
15
+ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
16
16
  static type: ComponentTypeEnum;
17
17
  type: ComponentTypeEnum;
18
18
  name: string;
19
19
  layoutType: ILayoutItem['layoutType'];
20
+ protected _spec: ITooltipSpec;
20
21
  static createComponent(spec: any, options: IComponentOption): Tooltip | Tooltip[];
21
22
  tooltipHandler?: ITooltipHandler;
22
23
  private _alwaysShow;
23
24
  private _cacheInfo;
24
25
  private _eventList;
25
- protected _spec: ITooltipSpec;
26
26
  protected _theme: ITooltipTheme;
27
27
  protected _processor: ITooltipActiveTypeAsKeys<MarkTooltipProcessor, DimensionTooltipProcessor>;
28
28
  protected _isTooltipShown: boolean;
@@ -46,6 +46,7 @@ export declare class Tooltip extends BaseComponent implements ITooltip {
46
46
  protected _getMouseEventData: (params: BaseEventParams) => TotalMouseEventData;
47
47
  protected _hideTooltipByHandler: (params: TooltipHandlerParams) => TooltipResult;
48
48
  protected _initTheme(theme?: any): void;
49
+ protected _shouldMergeThemeToSpec(): boolean;
49
50
  reInit(theme?: any): void;
50
51
  setAttrFromSpec(): void;
51
52
  showTooltip(datum: Datum, options: IShowTooltipOption): false | "none" | TooltipActiveType;