@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
package/cjs/util/data.js CHANGED
@@ -19,15 +19,8 @@ function getFieldAlias(dataView, field) {
19
19
  return fields && fields[field] ? null !== (_a = fields[field].alias) && void 0 !== _a ? _a : field : null != field ? field : null;
20
20
  }
21
21
 
22
- function getFieldFormat(dataView, key) {
23
- if (!dataView) return null;
24
- const fields = dataView.getFields();
25
- return fields && fields[key] ? fields[key].format : null;
26
- }
27
-
28
22
  Object.defineProperty(exports, "__esModule", {
29
23
  value: !0
30
- }), exports.getFieldFormat = exports.getFieldAlias = exports.findFields = exports.mergeFields = void 0,
31
- exports.mergeFields = mergeFields, exports.findFields = findFields, exports.getFieldAlias = getFieldAlias,
32
- exports.getFieldFormat = getFieldFormat;
24
+ }), exports.getFieldAlias = exports.mergeFields = void 0, exports.mergeFields = mergeFields,
25
+ exports.getFieldAlias = getFieldAlias;
33
26
  //# sourceMappingURL=data.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../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K,CAAC;AACtC,CAAC;AAZD,sCAYC;AAED,SAAgB,cAAc,CAAC,QAAkB,EAAE,GAAW;IAC5D,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,IAAI,CAAC;KACb;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAiC,CAAC;IACnE,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;AAC5B,CAAC;AAbD,wCAaC","file":"data.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { StatisticOperations } from '../data/transforms/dimension-statistics';\nimport type { IFieldsMeta } from '../typings/spec/common';\n\nexport function mergeFields(\n targetFields: {\n key: string;\n operations: StatisticOperations;\n }[],\n mergeFields: {\n key: string;\n operations: StatisticOperations;\n }[]\n): {\n key: string;\n operations: StatisticOperations;\n}[] {\n for (let i = 0; i < mergeFields.length; i++) {\n const element = mergeFields[i];\n const _target = findFields(targetFields, element.key);\n if (!_target) {\n targetFields.push(element);\n } else {\n _target.operations = [...new Set(_target.operations.concat(element.operations))];\n }\n }\n return targetFields;\n}\n\nexport function findFields(\n list: {\n key: string;\n operations: StatisticOperations;\n }[],\n fieldKey: string\n) {\n return list.find(i => i.key === fieldKey);\n}\n\n// 如果不存在别名就返回 field\nexport function getFieldAlias(dataView: DataView, field: string) {\n if (!dataView) {\n return field ?? null;\n }\n const fields = dataView.getFields();\n if (!fields) {\n return field ?? null;\n }\n if (!fields[field]) {\n return field ?? null;\n }\n return fields[field].alias ?? field;\n}\n\nexport function getFieldFormat(dataView: DataView, key: string) {\n if (!dataView) {\n return null;\n }\n const fields = dataView.getFields() as Record<string, IFieldsMeta>;\n if (!fields) {\n return null;\n }\n if (!fields[key]) {\n return null;\n }\n // @ts-ignore\n return fields[key].format;\n}\n"]}
1
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KAAK,CAAC;AACtC,CAAC;AAZD,sCAYC","file":"data.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { StatisticOperations } from '../data/transforms/dimension-statistics';\nimport type { IFieldsMeta } from '../typings/spec/common';\n\nexport function mergeFields(\n targetFields: {\n key: string;\n operations: StatisticOperations;\n }[],\n mergeFields: {\n key: string;\n operations: StatisticOperations;\n }[]\n): {\n key: string;\n operations: StatisticOperations;\n}[] {\n for (let i = 0; i < mergeFields.length; i++) {\n const element = mergeFields[i];\n const _target = findFields(targetFields, element.key);\n if (!_target) {\n targetFields.push(element);\n } else {\n _target.operations = [...new Set(_target.operations.concat(element.operations))];\n }\n }\n return targetFields;\n}\n\nfunction findFields(\n list: {\n key: string;\n operations: StatisticOperations;\n }[],\n fieldKey: string\n) {\n return list.find(i => i.key === fieldKey);\n}\n\n// 如果不存在别名就返回 field\nexport function getFieldAlias(dataView: DataView, field: string) {\n if (!dataView) {\n return field ?? null;\n }\n const fields = dataView.getFields();\n if (!fields) {\n return field ?? null;\n }\n if (!fields[field]) {\n return field ?? null;\n }\n return fields[field].alias ?? field;\n}\n"]}
@@ -1,5 +1,3 @@
1
- import { get, pick, merge, cloneDeep } from '@visactor/vutils';
2
- export { get, pick, merge, cloneDeep };
3
- export declare function removeEmpty<T extends object>(obj: T): Partial<T>;
4
- export declare function sortByKey<T extends object>(object: T, includeKeys?: string[], excludeKeys?: string[]): Partial<T>;
1
+ import { get, pick, cloneDeep } from '@visactor/vutils';
2
+ export { get, pick, cloneDeep };
5
3
  export declare function field(f: string | string[]): (datum: any) => any;
@@ -2,21 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.field = exports.sortByKey = exports.removeEmpty = exports.cloneDeep = exports.merge = exports.pick = exports.get = void 0;
5
+ }), exports.field = exports.cloneDeep = exports.pick = exports.get = void 0;
6
6
 
7
7
  const vutils_1 = require("@visactor/vutils");
8
8
 
9
- function removeEmpty(obj) {
10
- return Object.keys(obj).forEach((key => {
11
- obj[key] && "object" == typeof obj[key] ? removeEmpty(obj[key]) : void 0 === obj[key] && delete obj[key];
12
- })), obj;
13
- }
14
-
15
- function sortByKey(object, includeKeys, excludeKeys) {
16
- return Object.keys(object).sort().reduce(((obj, key) => (includeKeys ? includeKeys.includes(key) && (obj[key] = object[key]) : excludeKeys && !excludeKeys.includes(key) && (obj[key] = object[key]),
17
- obj)), {});
18
- }
19
-
20
9
  function field(f) {
21
10
  return function(datum) {
22
11
  let value;
@@ -35,15 +24,10 @@ Object.defineProperty(exports, "get", {
35
24
  get: function() {
36
25
  return vutils_1.pick;
37
26
  }
38
- }), Object.defineProperty(exports, "merge", {
39
- enumerable: !0,
40
- get: function() {
41
- return vutils_1.merge;
42
- }
43
27
  }), Object.defineProperty(exports, "cloneDeep", {
44
28
  enumerable: !0,
45
29
  get: function() {
46
30
  return vutils_1.cloneDeep;
47
31
  }
48
- }), exports.removeEmpty = removeEmpty, exports.sortByKey = sortByKey, exports.field = field;
32
+ }), exports.field = field;
49
33
  //# sourceMappingURL=object.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/object.ts"],"names":[],"mappings":";;;AAAA,6CAAwE;AAE/D,oFAFA,YAAG,OAEA;AAAE,qFAFA,aAAI,OAEA;AAAE,sFAFA,cAAK,OAEA;AAAE,0FAFA,kBAAS,OAEA;AAEpC,SAAgB,WAAW,CAAmB,GAAM;IAClD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC7B,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YAC5C,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SACvB;aAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YACjC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACjB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AATD,kCASC;AAED,SAAgB,SAAS,CAAmB,MAAS,EAAE,WAAsB,EAAE,WAAsB;IACnG,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACvB,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACnB,IAAI,WAAW,EAAE;YACf,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SACvD;aAAM,IAAI,WAAW,EAAE;YACtB,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SACxD;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAO,CAAC,CAAC;AAChB,CAAC;AAXD,8BAWC;AAED,SAAgB,KAAK,CAAC,CAAoB;IACxC,OAAO,UAAU,KAAU;QACzB,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,IAAA,gBAAO,EAAC,CAAC,CAAC,EAAE;YACf,KAAK,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAC;SACpB;aAAM;YACL,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAC/C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAVD,sBAUC","file":"object.js","sourcesContent":["import { get, pick, merge, cloneDeep, isArray } from '@visactor/vutils';\n\nexport { get, pick, merge, cloneDeep };\n\nexport function removeEmpty<T extends object>(obj: T): Partial<T> {\n Object.keys(obj).forEach(key => {\n if (obj[key] && typeof obj[key] === 'object') {\n removeEmpty(obj[key]);\n } else if (obj[key] === undefined) {\n delete obj[key];\n }\n });\n return obj;\n}\n\nexport function sortByKey<T extends object>(object: T, includeKeys?: string[], excludeKeys?: string[]): Partial<T> {\n return Object.keys(object)\n .sort()\n .reduce((obj, key) => {\n if (includeKeys) {\n includeKeys.includes(key) && (obj[key] = object[key]);\n } else if (excludeKeys) {\n !excludeKeys.includes(key) && (obj[key] = object[key]);\n }\n return obj;\n }, {} as T);\n}\n\nexport function field(f: string | string[]) {\n return function (datum: any) {\n let value: any;\n if (!isArray(f)) {\n value = datum?.[f];\n } else {\n value = f.reduce((cur, g) => cur?.[g], datum);\n }\n return value;\n };\n}\n"]}
1
+ {"version":3,"sources":["../src/util/object.ts"],"names":[],"mappings":";;;AAAA,6CAAiE;AAExD,oFAFA,YAAG,OAEA;AAAE,qFAFA,aAAI,OAEA;AAAE,0FAFA,kBAAS,OAEA;AAE7B,SAAgB,KAAK,CAAC,CAAoB;IACxC,OAAO,UAAU,KAAU;QACzB,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,IAAA,gBAAO,EAAC,CAAC,CAAC,EAAE;YACf,KAAK,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAC;SACpB;aAAM;YACL,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAC/C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAVD,sBAUC","file":"object.js","sourcesContent":["import { get, pick, cloneDeep, isArray } from '@visactor/vutils';\n\nexport { get, pick, cloneDeep };\n\nexport function field(f: string | string[]) {\n return function (datum: any) {\n let value: any;\n if (!isArray(f)) {\n value = datum?.[f];\n } else {\n value = f.reduce((cur, g) => cur?.[g], datum);\n }\n return value;\n };\n}\n"]}
@@ -1,9 +1,7 @@
1
1
  import type { DataView } from '@visactor/vdataset';
2
2
  import type { IGlobalScale } from '../scale/interface';
3
- import { BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';
4
- import type { IBaseScale } from '@visactor/vscale';
5
- import type { ScaleType } from '../typings/scale';
6
- import type { IVisual, IVisualSpecBase } from '../typings/visual';
3
+ import { type IBaseScale, BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';
4
+ import type { IVisual } from '../typings/visual';
7
5
  import { ColorOrdinalScale } from '../scale/color-ordinal-scale';
8
6
  declare const defaultScaleMap: {
9
7
  linear: typeof LinearScale;
@@ -18,8 +16,6 @@ export declare function createScaleWithSpec(spec: IVisual<any>, context: {
18
16
  globalScale: IGlobalScale;
19
17
  dataStatistics: DataView;
20
18
  }): IBaseScale | null;
21
- export declare function initScaleWithSpec(scale: IBaseScale, spec: IVisualSpecBase<any, any>): void;
22
- export declare function isValidScaleType(type: ScaleType): boolean;
23
19
  export declare function valueInScaleRange(v: number, s?: IBaseScale): number;
24
20
  export declare function isSpecValueWithScale(specValue: any): boolean;
25
21
  export {};
package/cjs/util/scale.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.isSpecValueWithScale = exports.valueInScaleRange = exports.isValidScaleType = exports.initScaleWithSpec = exports.createScaleWithSpec = exports.createScale = void 0;
5
+ }), exports.isSpecValueWithScale = exports.valueInScaleRange = exports.createScaleWithSpec = exports.createScale = void 0;
6
6
 
7
7
  const vutils_1 = require("@visactor/vutils"), vscale_1 = require("@visactor/vscale"), color_ordinal_scale_1 = require("../scale/color-ordinal-scale"), defaultScaleMap = {
8
8
  linear: vscale_1.LinearScale,
@@ -29,10 +29,6 @@ function initScaleWithSpec(scale, spec) {
29
29
  spec.specified && scale.specified && scale.specified(spec.specified));
30
30
  }
31
31
 
32
- function isValidScaleType(type) {
33
- return Object.keys(defaultScaleMap).includes(type);
34
- }
35
-
36
32
  function valueInScaleRange(v, s) {
37
33
  if (!s) return v;
38
34
  const range = s.range(), min = Math.min(range[0], range[range.length - 1]), max = Math.max(range[0], range[range.length - 1]);
@@ -45,6 +41,5 @@ function isSpecValueWithScale(specValue) {
45
41
  }
46
42
 
47
43
  exports.createScale = createScale, exports.createScaleWithSpec = createScaleWithSpec,
48
- exports.initScaleWithSpec = initScaleWithSpec, exports.isValidScaleType = isValidScaleType,
49
44
  exports.valueInScaleRange = valueInScaleRange, exports.isSpecValueWithScale = isSpecValueWithScale;
50
45
  //# sourceMappingURL=scale.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/scale.ts"],"names":[],"mappings":";;;AAGA,6CAAqD;AAGrD,6CAAoG;AAKpG,sEAAiE;AAEjE,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,oBAAW;IACnB,IAAI,EAAE,kBAAS;IACf,KAAK,EAAE,mBAAU;IACjB,OAAO,EAAE,qBAAY;IACrB,SAAS,EAAE,uBAAc;IACzB,YAAY,EAAE,uCAAiB;CAChC,CAAC;AAEF,SAAgB,WAAW,CAAC,IAAkC;IAC5D,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,gBAAgB,EAAE;QACpB,OAAO,IAAI,gBAAgB,EAAE,CAAC;KAC/B;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,kCAOC;AAED,SAAgB,mBAAmB,CACjC,IAAkB,EAClB,OAGC;IAED,IAAI,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;QACjC,IAAI,IAAA,iBAAQ,EAAC,IAAI,CAAC,KAAK,CAAC,KAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAA,EAAE;YAChD,OAAO,OAAO,CAAC,WAAW,CAAC,0BAA0B,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;SACrF;QACD,OAAO,IAAI,CAAC,KA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G,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AARD,8CAQC;AAED,SAAgB,oBAAoB,CAAC,SAAc;IACjD,OAAO,IAAA,gBAAO,EAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,IAAI,IAAA,gBAAO,EAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,CAAC;AAChE,CAAC;AAFD,oDAEC","file":"scale.js","sourcesContent":["/**\n * @description Scale 相关的工具函数\n */\nimport { isString, isValid } from '@visactor/vutils';\nimport type { DataView } from '@visactor/vdataset';\nimport type { IGlobalScale } from '../scale/interface';\nimport { BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';\n// eslint-disable-next-line no-duplicate-imports\nimport type { IBaseScale } from '@visactor/vscale';\nimport type { ScaleType } from '../typings/scale';\nimport type { IVisual, IVisualSpecBase } from '../typings/visual';\nimport { ColorOrdinalScale } from '../scale/color-ordinal-scale';\n\nconst defaultScaleMap = {\n linear: LinearScale,\n band: BandScale,\n point: PointScale,\n ordinal: OrdinalScale,\n threshold: ThresholdScale,\n colorOrdinal: ColorOrdinalScale\n};\n\nexport function createScale(type: keyof typeof defaultScaleMap): IBaseScale | null {\n const scaleConstructor = defaultScaleMap[type];\n if (scaleConstructor) {\n return new scaleConstructor();\n }\n\n return null;\n}\n\nexport function createScaleWithSpec(\n spec: IVisual<any>,\n context: {\n globalScale: IGlobalScale;\n dataStatistics: DataView;\n }\n): IBaseScale | null {\n if ('scale' in spec && spec.scale) {\n if (isString(spec.scale) && context?.globalScale) {\n return context.globalScale.registerMarkAttributeScale(spec, context.dataStatistics);\n }\n return spec.scale as unknown as IBaseScale;\n }\n const scale = createScale((spec as IVisualSpecBase<any, any>).type);\n if (scale) {\n initScaleWithSpec(scale, spec as IVisualSpecBase<any, any>);\n }\n return scale;\n}\n\n// 需要一个通用的从spec初始化scale的方法,避免在scale属性更新后需要维护多组逻辑\nexport function initScaleWithSpec(scale: IBaseScale, spec: IVisualSpecBase<any, any>) {\n if (!scale || !spec) {\n return;\n }\n\n if (spec.domain) {\n scale.domain(spec.domain);\n }\n\n if (spec.range) {\n scale.range(spec.range);\n }\n\n if (spec.specified && (<OrdinalScale>scale).specified) {\n (<OrdinalScale>scale).specified(spec.specified);\n }\n}\n\nexport function isValidScaleType(type: ScaleType): boolean {\n return Object.keys(defaultScaleMap).includes(type);\n}\n\nexport function valueInScaleRange(v: number, s?: IBaseScale) {\n if (!s) {\n return v;\n }\n const range = s.range();\n const min = Math.min(range[0], range[range.length - 1]);\n const max = Math.max(range[0], range[range.length - 1]);\n return Math.min(Math.max(min, v), max);\n}\n\nexport function isSpecValueWithScale(specValue: any) {\n return isValid(specValue?.field) && isValid(specValue?.scale);\n}\n"]}
1
+ {"version":3,"sources":["../src/util/scale.ts"],"names":[],"mappings":";;;AAGA,6CAAqD;AAGrD,6CAAqH;AAErH,sEAAiE;AAEjE,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,oBAAW;IACnB,IAAI,EAAE,kBAAS;IACf,KAAK,EAAE,mBAAU;IACjB,OAAO,EAAE,qBAAY;IACrB,SAAS,EAAE,uBAAc;IACzB,YAAY,EAAE,uCAAiB;CAChC,CAAC;AAEF,SAAgB,WAAW,CAAC,IAAkC;IAC5D,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,gBAAgB,EAAE;QACpB,OAAO,IAAI,gBAAgB,EAAE,CAAC;KAC/B;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,kCAOC;AAED,SAAgB,mBAAmB,CACjC,IAAkB,EAClB,OAGC;IAED,IAAI,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;QACjC,IAAI,IAAA,iBAAQ,EAAC,IAAI,CA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,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AARD,8CAQC;AAED,SAAgB,oBAAoB,CAAC,SAAc;IACjD,OAAO,IAAA,gBAAO,EAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,IAAI,IAAA,gBAAO,EAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,CAAC;AAChE,CAAC;AAFD,oDAEC","file":"scale.js","sourcesContent":["/**\n * @description Scale 相关的工具函数\n */\nimport { isString, isValid } from '@visactor/vutils';\nimport type { DataView } from '@visactor/vdataset';\nimport type { IGlobalScale } from '../scale/interface';\nimport { type IBaseScale, BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';\nimport type { IVisual, IVisualSpecBase } from '../typings/visual';\nimport { ColorOrdinalScale } from '../scale/color-ordinal-scale';\n\nconst defaultScaleMap = {\n linear: LinearScale,\n band: BandScale,\n point: PointScale,\n ordinal: OrdinalScale,\n threshold: ThresholdScale,\n colorOrdinal: ColorOrdinalScale\n};\n\nexport function createScale(type: keyof typeof defaultScaleMap): IBaseScale | null {\n const scaleConstructor = defaultScaleMap[type];\n if (scaleConstructor) {\n return new scaleConstructor();\n }\n\n return null;\n}\n\nexport function createScaleWithSpec(\n spec: IVisual<any>,\n context: {\n globalScale: IGlobalScale;\n dataStatistics: DataView;\n }\n): IBaseScale | null {\n if ('scale' in spec && spec.scale) {\n if (isString(spec.scale) && context?.globalScale) {\n return context.globalScale.registerMarkAttributeScale(spec, context.dataStatistics);\n }\n return spec.scale as unknown as IBaseScale;\n }\n const scale = createScale((spec as IVisualSpecBase<any, any>).type);\n if (scale) {\n initScaleWithSpec(scale, spec as IVisualSpecBase<any, any>);\n }\n return scale;\n}\n\n// 需要一个通用的从spec初始化scale的方法,避免在scale属性更新后需要维护多组逻辑\nfunction initScaleWithSpec(scale: IBaseScale, spec: IVisualSpecBase<any, any>) {\n if (!scale || !spec) {\n return;\n }\n\n if (spec.domain) {\n scale.domain(spec.domain);\n }\n\n if (spec.range) {\n scale.range(spec.range);\n }\n\n if (spec.specified && (<OrdinalScale>scale).specified) {\n (<OrdinalScale>scale).specified(spec.specified);\n }\n}\n\nexport function valueInScaleRange(v: number, s?: IBaseScale) {\n if (!s) {\n return v;\n }\n const range = s.range();\n const min = Math.min(range[0], range[range.length - 1]);\n const max = Math.max(range[0], range[range.length - 1]);\n return Math.min(Math.max(min, v), max);\n}\n\nexport function isSpecValueWithScale(specValue: any) {\n return isValid(specValue?.field) && isValid(specValue?.scale);\n}\n"]}
@@ -1,19 +1,14 @@
1
- import type { ILayoutPaddingSpec } from '../model/interface';
2
- import type { IBoundsLike } from '@visactor/vutils';
3
- import type { ILayoutNumber, IPercent, ILayoutOrientPadding, ILayoutRect } from '../model/interface';
1
+ import { type IBoundsLike } from '@visactor/vutils';
2
+ import type { ILayoutPaddingSpec, IPercentOffset, ILayoutNumber, IPercent, ILayoutOrientPadding, ILayoutRect } from '../model/interface';
4
3
  import type { IPadding, IRect } from '../typings/space';
5
- import { Direction } from '../typings/space';
6
4
  import type { IPoint } from '../typings/coordinate';
7
5
  export declare function isValidOrient(orient: string): boolean;
8
- export declare function getSpecPadding(padding: IPadding | number | undefined | null, defaultPadding: IPadding): IPadding;
9
6
  export declare function isPointInRect(point: IPoint, rect: IRect): boolean;
10
7
  export declare function isPercent(v: any): v is IPercent;
8
+ export declare function isPercentOffset(v: any): v is IPercentOffset;
11
9
  export declare function calcLayoutNumber(v: ILayoutNumber | undefined, size: number, callOp?: ILayoutRect): number;
12
10
  export declare function calcPadding(paddingSpec: ILayoutOrientPadding, rect: ILayoutRect, callOp: ILayoutRect): IPadding;
13
11
  export declare function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect;
14
- export declare function boundsOutViewBox(bounds: IBoundsLike, box: IBoundsLike, direction: Direction): {
15
- start: number;
16
- end: number;
17
- };
18
12
  export declare function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding;
19
13
  export declare function convertPoint(point: IPoint, relativePoint: IPoint, convert: boolean): IPoint;
14
+ export declare const getActualNumValue: (originValue: number | string, total: number) => number;
package/cjs/util/space.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.convertPoint = exports.normalizeLayoutPaddingSpec = exports.boundsOutViewBox = exports.boundsInRect = exports.calcPadding = exports.calcLayoutNumber = exports.isPercent = exports.isPointInRect = exports.getSpecPadding = exports.isValidOrient = void 0;
5
+ }), exports.getActualNumValue = exports.convertPoint = exports.normalizeLayoutPaddingSpec = exports.boundsInRect = exports.calcPadding = exports.calcLayoutNumber = exports.isPercentOffset = exports.isPercent = exports.isPointInRect = exports.isValidOrient = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), type_1 = require("./type"), space_1 = require("../typings/space");
7
+ const vutils_1 = require("@visactor/vutils"), type_1 = require("./type");
8
8
 
9
9
  function isValidOrient(orient) {
10
10
  switch (orient) {
@@ -19,15 +19,6 @@ function isValidOrient(orient) {
19
19
  }
20
20
  }
21
21
 
22
- function getSpecPadding(padding, defaultPadding) {
23
- return (0, type_1.isNil)(padding) ? Object.assign({}, defaultPadding) : "number" == typeof padding ? {
24
- top: padding,
25
- bottom: padding,
26
- left: padding,
27
- right: padding
28
- } : Object.assign(Object.assign({}, defaultPadding), padding);
29
- }
30
-
31
22
  function isPointInRect(point, rect) {
32
23
  const {x: x, y: y, width: width, height: height} = rect, {x: x0, y: y0} = point;
33
24
  return x0 < x + width && y0 < y + height && y0 > y && x0 > x;
@@ -37,9 +28,14 @@ function isPercent(v) {
37
28
  return !!(0, type_1.isString)(v) && (!!v.endsWith("%") && (0, type_1.couldBeValidNumber)(v.substring(0, v.length - 1)));
38
29
  }
39
30
 
31
+ function isPercentOffset(v) {
32
+ return !!(0, type_1.isObject)(v) && ("percent" in v || "offset" in v);
33
+ }
34
+
40
35
  function calcLayoutNumber(v, size, callOp) {
36
+ var _a, _b;
41
37
  return (0, type_1.isNumber)(v) ? v : isPercent(v) ? Number(v.substring(0, v.length - 1)) * size / 100 : (0,
42
- type_1.isFunction)(v) ? v(callOp) : 0;
38
+ type_1.isFunction)(v) ? v(callOp) : (0, type_1.isObject)(v) ? size * (null !== (_a = v.percent) && void 0 !== _a ? _a : 0) + (null !== (_b = v.offset) && void 0 !== _b ? _b : 0) : 0;
43
39
  }
44
40
 
45
41
  function calcPadding(paddingSpec, rect, callOp) {
@@ -76,25 +72,13 @@ function boundsInRect(bounds, rect) {
76
72
  };
77
73
  }
78
74
 
79
- function boundsOutViewBox(bounds, box, direction) {
80
- if (!bounds || !box) return {
81
- start: 0,
82
- end: 0
83
- };
84
- const start = -(direction === space_1.Direction.horizontal ? bounds.x1 : bounds.y1), end = direction === space_1.Direction.horizontal ? bounds.x2 - (box.x2 - box.x1) : bounds.y2 - (box.y2 - box.y1);
85
- return {
86
- start: start > 0 ? start : 0,
87
- end: end > 0 ? end : 0
88
- };
89
- }
90
-
91
75
  function normalizeLayoutPaddingSpec(spec) {
92
76
  let result = {};
93
77
  return (0, vutils_1.isArray)(spec) ? ((0, type_1.isNil)(spec[0]) || (result.top = result.left = result.bottom = result.right = spec[0]),
94
78
  (0, type_1.isNil)(spec[1]) || (result.left = result.right = spec[1]), (0, type_1.isNil)(spec[2]) || (result.bottom = spec[2]),
95
79
  (0, type_1.isNil)(spec[3]) || (result.left = spec[3]), result) : (0, type_1.isNumber)(spec) || isPercent(spec) || (0,
96
- type_1.isFunction)(spec) ? (result.top = result.left = result.bottom = result.right = spec,
97
- result) : ((0, type_1.isObject)(spec) && (result = Object.assign({}, spec)), result);
80
+ type_1.isFunction)(spec) || isPercentOffset(spec) ? (result.top = result.left = result.bottom = result.right = spec,
81
+ result) : (0, type_1.isObject)(spec) ? (result = Object.assign({}, spec), result) : result;
98
82
  }
99
83
 
100
84
  function convertPoint(point, relativePoint, convert) {
@@ -104,8 +88,15 @@ function convertPoint(point, relativePoint, convert) {
104
88
  } : point;
105
89
  }
106
90
 
107
- exports.isValidOrient = isValidOrient, exports.getSpecPadding = getSpecPadding,
108
- exports.isPointInRect = isPointInRect, exports.isPercent = isPercent, exports.calcLayoutNumber = calcLayoutNumber,
109
- exports.calcPadding = calcPadding, exports.boundsInRect = boundsInRect, exports.boundsOutViewBox = boundsOutViewBox,
110
- exports.normalizeLayoutPaddingSpec = normalizeLayoutPaddingSpec, exports.convertPoint = convertPoint;
91
+ exports.isValidOrient = isValidOrient, exports.isPointInRect = isPointInRect, exports.isPercent = isPercent,
92
+ exports.isPercentOffset = isPercentOffset, exports.calcLayoutNumber = calcLayoutNumber,
93
+ exports.calcPadding = calcPadding, exports.boundsInRect = boundsInRect, exports.normalizeLayoutPaddingSpec = normalizeLayoutPaddingSpec,
94
+ exports.convertPoint = convertPoint;
95
+
96
+ const getActualNumValue = (originValue, total) => {
97
+ const originNumValue = Number(originValue), originStrValue = originValue.toString();
98
+ return isNaN(originNumValue) && "%" === originStrValue[originStrValue.length - 1] ? total * (Number(originStrValue.slice(0, originStrValue.length - 1)) / 100) : originNumValue;
99
+ };
100
+
101
+ exports.getActualNumValue = getActualNumValue;
111
102
  //# sourceMappingURL=space.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/space.ts"],"names":[],"mappings":";;;AAEA,6CAA2C;AAC3C,iCAA6F;AAI7F,4CAA6C;AAG7C,SAAgB,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,EAAE;QACd,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,KAAK,CAAC;QACX,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAVD,sCA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AU,EAAC,IAAI,CAAC,EAAE;QACzD,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;QAC/D,OAAO,MAAM,CAAC;KACf;IACD,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE;QAClB,MAAM,qBAAQ,IAAI,CAAE,CAAC;KACtB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAzBD,gEAyBC;AAED,SAAgB,YAAY,CAAC,KAAa,EAAE,aAAqB,EAAE,OAAgB;IACjF,IAAI,OAAO,EAAE;QACX,OAAO;YACL,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;YAC5B,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;SAC7B,CAAC;KACH;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AARD,oCAQC","file":"space.js","sourcesContent":["import type { ILayoutPaddingSpec } from '../model/interface';\nimport type { IBoundsLike } from '@visactor/vutils';\nimport { isArray } from '@visactor/vutils';\nimport { isNumber, isNil, isString, isFunction, couldBeValidNumber, isObject } from './type';\nimport type { ILayoutNumber, IPercent, ILayoutOrientPadding, ILayoutRect } from '../model/interface';\nimport type { IPadding, IRect } from '../typings/space';\n// eslint-disable-next-line no-duplicate-imports\nimport { Direction } from '../typings/space';\nimport type { IPoint } from '../typings/coordinate';\n\nexport function isValidOrient(orient: string): boolean {\n switch (orient) {\n case 'left':\n case 'right':\n case 'top':\n case 'bottom':\n return true;\n default:\n return false;\n }\n}\n\nexport function getSpecPadding(padding: IPadding | number | undefined | null, defaultPadding: IPadding): IPadding {\n if (isNil(padding)) {\n return { ...defaultPadding };\n }\n if (typeof padding === 'number') {\n return {\n top: padding,\n bottom: padding,\n left: padding,\n right: padding\n };\n }\n return {\n ...defaultPadding,\n ...padding\n };\n}\n\nexport function isPointInRect(point: IPoint, rect: IRect) {\n const { x, y, width, height } = rect;\n const { x: x0, y: y0 } = point;\n return x0 < x + width && y0 < y + height && y0 > y && x0 > x;\n}\n\nexport function isPercent(v: any): v is IPercent {\n if (!isString(v)) {\n return false;\n }\n if (!v.endsWith('%')) {\n return false;\n }\n return couldBeValidNumber(v.substring(0, v.length - 1));\n}\n\nexport function calcLayoutNumber(\n v: ILayoutNumber | undefined,\n size: number,\n callOp?: ILayoutRect //如果是函数类型的话,函数的参数\n) {\n if (isNumber(v)) {\n return v;\n }\n if (isPercent(v)) {\n return (Number(v.substring(0, v.length - 1)) * size) / 100;\n }\n if (isFunction(v)) {\n return v(callOp);\n }\n return 0;\n}\n\nexport function calcPadding(\n paddingSpec: ILayoutOrientPadding,\n rect: ILayoutRect,\n callOp: ILayoutRect //如果是函数类型的话,函数的参数\n): IPadding {\n const result: IPadding = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n if (Object.values(paddingSpec).every(value => isNumber(value))) {\n result.top = (<IPadding>paddingSpec).top ?? 0;\n result.right = (<IPadding>paddingSpec).right ?? 0;\n result.bottom = (<IPadding>paddingSpec).bottom ?? 0;\n result.left = (<IPadding>paddingSpec).left ?? 0;\n return result;\n }\n const paddings = [\n {\n orients: ['left', 'right'],\n size: rect.width\n },\n {\n orients: ['top', 'bottom'],\n size: rect.height\n }\n ];\n paddings.forEach(p => {\n p.orients.forEach(o => {\n result[o] = calcLayoutNumber(paddingSpec[o], p.size, callOp);\n });\n });\n return result;\n}\n\nexport function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect {\n if (!bounds) {\n return { width: 0, height: 0 };\n }\n return {\n width: Math.ceil(Math.min(bounds.x2 - bounds.x1, rect.width)),\n height: Math.ceil(Math.min(bounds.y2 - bounds.y1, rect.height))\n };\n}\n\nexport function boundsOutViewBox(\n bounds: IBoundsLike,\n box: IBoundsLike,\n direction: Direction\n): {\n start: number;\n end: number;\n} {\n if (!bounds || !box) {\n return { start: 0, end: 0 };\n }\n const start = -(direction === Direction.horizontal ? bounds.x1 : bounds.y1);\n const end = direction === Direction.horizontal ? bounds.x2 - (box.x2 - box.x1) : bounds.y2 - (box.y2 - box.y1);\n return { start: start > 0 ? start : 0, end: end > 0 ? end : 0 };\n}\n\nexport function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding {\n let result: ILayoutOrientPadding = {};\n if (isArray(spec)) {\n if (!isNil(spec[0])) {\n result.top = result.left = result.bottom = result.right = spec[0];\n }\n if (!isNil(spec[1])) {\n result.left = result.right = spec[1];\n }\n if (!isNil(spec[2])) {\n result.bottom = spec[2];\n }\n if (!isNil(spec[3])) {\n result.left = spec[3];\n }\n return result;\n }\n if (isNumber(spec) || isPercent(spec) || isFunction(spec)) {\n result.top = result.left = result.bottom = result.right = spec;\n return result;\n }\n if (isObject(spec)) {\n result = { ...spec };\n }\n return result;\n}\n\nexport function convertPoint(point: IPoint, relativePoint: IPoint, convert: boolean) {\n if (convert) {\n return {\n x: point.x + relativePoint.x,\n y: point.y + relativePoint.y\n };\n }\n return point;\n}\n"]}
1
+ {"version":3,"sources":["../src/util/space.ts"],"names":[],"mappings":";;;AAAA,6CAA6D;AAC7D,iCAA6F;AAY7F,SAAgB,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,EAAE;QACd,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,KAAK,CAAC;QACX,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAVD,sCAUC;AAED,SAAgB,aAAa,CAAC,KAAa,EAAE,IAAW;IACtD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAC/B,OAAO,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,EAAE,GAAG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AC,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;KACnF;IACD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAPW,QAAA,iBAAiB,qBAO5B","file":"space.js","sourcesContent":["import { isArray, type IBoundsLike } from '@visactor/vutils';\nimport { isNumber, isNil, isString, isFunction, couldBeValidNumber, isObject } from './type';\nimport type {\n ILayoutPaddingSpec,\n IPercentOffset,\n ILayoutNumber,\n IPercent,\n ILayoutOrientPadding,\n ILayoutRect\n} from '../model/interface';\nimport type { IPadding, IRect } from '../typings/space';\nimport type { IPoint } from '../typings/coordinate';\n\nexport function isValidOrient(orient: string): boolean {\n switch (orient) {\n case 'left':\n case 'right':\n case 'top':\n case 'bottom':\n return true;\n default:\n return false;\n }\n}\n\nexport function isPointInRect(point: IPoint, rect: IRect) {\n const { x, y, width, height } = rect;\n const { x: x0, y: y0 } = point;\n return x0 < x + width && y0 < y + height && y0 > y && x0 > x;\n}\n\nexport function isPercent(v: any): v is IPercent {\n if (!isString(v)) {\n return false;\n }\n if (!v.endsWith('%')) {\n return false;\n }\n return couldBeValidNumber(v.substring(0, v.length - 1));\n}\n\nexport function isPercentOffset(v: any): v is IPercentOffset {\n if (!isObject(v)) {\n return false;\n }\n if ('percent' in v || 'offset' in v) {\n return true;\n }\n return false;\n}\n\nexport function calcLayoutNumber(\n v: ILayoutNumber | undefined,\n size: number,\n callOp?: ILayoutRect //如果是函数类型的话,函数的参数\n) {\n if (isNumber(v)) {\n return v;\n }\n if (isPercent(v)) {\n return (Number(v.substring(0, v.length - 1)) * size) / 100;\n }\n if (isFunction(v)) {\n return v(callOp);\n }\n if (isObject(v)) {\n return size * (v.percent ?? 0) + (v.offset ?? 0);\n }\n return 0;\n}\n\nexport function calcPadding(\n paddingSpec: ILayoutOrientPadding,\n rect: ILayoutRect,\n callOp: ILayoutRect //如果是函数类型的话,函数的参数\n): IPadding {\n const result: IPadding = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n if (Object.values(paddingSpec).every(value => isNumber(value))) {\n result.top = (<IPadding>paddingSpec).top ?? 0;\n result.right = (<IPadding>paddingSpec).right ?? 0;\n result.bottom = (<IPadding>paddingSpec).bottom ?? 0;\n result.left = (<IPadding>paddingSpec).left ?? 0;\n return result;\n }\n const paddings = [\n {\n orients: ['left', 'right'],\n size: rect.width\n },\n {\n orients: ['top', 'bottom'],\n size: rect.height\n }\n ];\n paddings.forEach(p => {\n p.orients.forEach(o => {\n result[o] = calcLayoutNumber(paddingSpec[o], p.size, callOp);\n });\n });\n return result;\n}\n\nexport function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect {\n if (!bounds) {\n return { width: 0, height: 0 };\n }\n return {\n width: Math.ceil(Math.min(bounds.x2 - bounds.x1, rect.width)),\n height: Math.ceil(Math.min(bounds.y2 - bounds.y1, rect.height))\n };\n}\n\nexport function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding {\n let result: ILayoutOrientPadding = {};\n if (isArray(spec)) {\n if (!isNil(spec[0])) {\n result.top = result.left = result.bottom = result.right = spec[0];\n }\n if (!isNil(spec[1])) {\n result.left = result.right = spec[1];\n }\n if (!isNil(spec[2])) {\n result.bottom = spec[2];\n }\n if (!isNil(spec[3])) {\n result.left = spec[3];\n }\n return result;\n }\n if (isNumber(spec) || isPercent(spec) || isFunction(spec) || isPercentOffset(spec)) {\n result.top = result.left = result.bottom = result.right = spec;\n return result;\n }\n if (isObject(spec)) {\n result = { ...spec };\n return result;\n }\n return result;\n}\n\nexport function convertPoint(point: IPoint, relativePoint: IPoint, convert: boolean) {\n if (convert) {\n return {\n x: point.x + relativePoint.x,\n y: point.y + relativePoint.y\n };\n }\n return point;\n}\n\n/**\n * 将相对数值转换为绝对数值\n * @param originValue 原始值(相对值或绝对值)\n * @param total 总体值\n * @returns 实际绝对数值\n */\nexport const getActualNumValue = (originValue: number | string, total: number): number => {\n const originNumValue = Number(originValue);\n const originStrValue = originValue.toString();\n if (isNaN(originNumValue) && originStrValue[originStrValue.length - 1] === '%') {\n return total * (Number(originStrValue.slice(0, originStrValue.length - 1)) / 100);\n }\n return originNumValue;\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import type { IBackgroundSpec, IBackgroundStyleSpec } from '../../typings';
2
+ export declare function convertBackgroundSpec(bg: IBackgroundSpec): Omit<IBackgroundStyleSpec, 'image'> & {
3
+ background?: IBackgroundStyleSpec['image'];
4
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var __rest = this && this.__rest || function(s, e) {
4
+ var t = {};
5
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
6
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
7
+ var i = 0;
8
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
9
+ }
10
+ return t;
11
+ };
12
+
13
+ function convertBackgroundSpec(bg) {
14
+ if (!bg) return null;
15
+ if ("string" == typeof bg) return {
16
+ fill: bg,
17
+ fillOpacity: 1
18
+ };
19
+ if ("object" != typeof bg) return null;
20
+ const {x: x, y: y, width: width, height: height, x1: x1, y1: y1, image: image} = bg, rest = __rest(bg, [ "x", "y", "width", "height", "x1", "y1", "image" ]);
21
+ return rest.background = image, rest;
22
+ }
23
+
24
+ Object.defineProperty(exports, "__esModule", {
25
+ value: !0
26
+ }), exports.convertBackgroundSpec = void 0, exports.convertBackgroundSpec = convertBackgroundSpec;
27
+ //# sourceMappingURL=background.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/spec/background.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,SAAgB,qBAAqB,CACnC,EAAmB;IAEnB,IAAI,CAAC,EAAE,EAAE;QACP,OAAO,IAAI,CAAC;KACb;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO;YACL,IAAI,EAAE,EAAE;YACR,WAAW,EAAE,CAAC;SACf,CAAC;KACH;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,KAAc,EAAE,EAAX,IAAI,UAAK,EAAE,EAApD,kDAA+C,CAAK,CAAC;IAC3D,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC;AAlBD,sDAkBC","file":"background.js","sourcesContent":["import type { IBackgroundSpec, IBackgroundStyleSpec } from '../../typings';\n\nexport function convertBackgroundSpec(\n bg: IBackgroundSpec\n): Omit<IBackgroundStyleSpec, 'image'> & { background?: IBackgroundStyleSpec['image'] } {\n if (!bg) {\n return null;\n }\n if (typeof bg === 'string') {\n return {\n fill: bg,\n fillOpacity: 1\n };\n }\n if (typeof bg !== 'object') {\n return null;\n }\n const { x, y, width, height, x1, y1, image, ...rest } = bg;\n rest.background = image;\n return rest;\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare function cloneDeepSpec(spec: any): any;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.cloneDeepSpec = void 0;
6
+
7
+ const vutils_1 = require("@visactor/vutils"), common_1 = require("./common");
8
+
9
+ function cloneDeepSpec(spec) {
10
+ const value = spec;
11
+ let result;
12
+ if (!(0, vutils_1.isValid)(value) || "object" != typeof value) return value;
13
+ if ((0, common_1.isDataView)(value) || (0, common_1.isHTMLElement)(value)) return value;
14
+ const isArr = (0, vutils_1.isArray)(value), length = value.length;
15
+ result = isArr ? new Array(length) : "object" == typeof value ? {} : (0, vutils_1.isBoolean)(value) || (0,
16
+ vutils_1.isNumber)(value) || (0, vutils_1.isString)(value) ? value : (0, vutils_1.isDate)(value) ? new Date(+value) : void 0;
17
+ const props = isArr ? void 0 : Object.keys(Object(value));
18
+ let index = -1;
19
+ if (result) for (;++index < (props || value).length; ) {
20
+ const key = props ? props[index] : index, subValue = value[key];
21
+ result[key] = cloneDeepSpec(subValue);
22
+ }
23
+ return result;
24
+ }
25
+
26
+ exports.cloneDeepSpec = cloneDeepSpec;
27
+ //# sourceMappingURL=clone-deep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/spec/clone-deep.ts"],"names":[],"mappings":";;;AAAA,6CAA2F;AAC3F,qCAAqD;AAMrD,SAAgB,aAAa,CAAC,IAAS;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC;IAEnB,IAAI,MAAM,CAAC;IACX,IAAI,CAAC,IAAA,gBAAO,EAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAChD,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,IAAA,mBAAU,EAAC,KAAK,CAAC,IAAI,IAAA,sBAAa,EAAC,KAAK,CAAC,EAAE;QAC7C,OAAO,KAAK,CAAC;KACd;IAED,MAAM,KAAK,GAAG,IAAA,gBAAO,EAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,IAAI,KAAK,EAAE;QACT,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;KAC5B;SAEI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAClC,MAAM,GAAG,EAAE,CAAC;KACb;SAEI,IAAI,IAAA,kBAAS,EAAC,KAAK,CAAC,IAAI,IAAA,iBAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,iBAAQ,EAAC,KAAK,CAAC,EAAE;QAC/D,MAAM,GAAG,KAAK,CAAC;KAChB;SAAM,IAAI,IAAA,eAAM,EAAC,KAAK,CAAC,EAAE;QACxB,MAAM,GAAG,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;KAC3B;SAEI;QACH,MAAM,GAAG,SAAS,CAAC;KACpB;IAKD,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAE7D,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IACf,IAAI,MAAM,EAAE;QACV,OAAO,EAAE,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE;YACxC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACzC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;SACvC;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAhDD,sCAgDC","file":"clone-deep.js","sourcesContent":["import { isArray, isBoolean, isDate, isNumber, isString, isValid } from '@visactor/vutils';\nimport { isDataView, isHTMLElement } from './common';\n\n/**\n * 深拷贝 spec,为避免循环引用,DataView 维持原有引用\n * @param spec 原spec\n */\nexport function cloneDeepSpec(spec: any) {\n const value = spec;\n\n let result;\n if (!isValid(value) || typeof value !== 'object') {\n return value;\n }\n\n // 判断是不是不能深拷贝的对象\n if (isDataView(value) || isHTMLElement(value)) {\n return value;\n }\n\n const isArr = isArray(value);\n const length = value.length;\n // 不考虑特殊数组的额外处理\n if (isArr) {\n result = new Array(length);\n }\n // 不考虑 buffer / arguments 类型的处理以及 prototype 的额外处理\n else if (typeof value === 'object') {\n result = {};\n }\n // 不建议使用作为 Boolean / Number / String 作为构造器\n else if (isBoolean(value) || isNumber(value) || isString(value)) {\n result = value;\n } else if (isDate(value)) {\n result = new Date(+value);\n }\n // 不考虑 ArrayBuffer / DataView / TypedArray / map / set / regexp / symbol 类型\n else {\n result = undefined;\n }\n\n // 不考虑 map / set / TypedArray 类型的赋值\n\n // 不考虑对象的 symbol 属性\n const props = isArr ? undefined : Object.keys(Object(value));\n\n let index = -1;\n if (result) {\n while (++index < (props || value).length) {\n const key = props ? props[index] : index;\n const subValue = value[key];\n result[key] = cloneDeepSpec(subValue);\n }\n }\n return result;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { DataView } from '@visactor/vdataset';
2
+ export declare function isDataView(obj: any): obj is DataView;
3
+ export declare function isHTMLElement(obj: any): obj is Element;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.isHTMLElement = exports.isDataView = void 0;
6
+
7
+ const vdataset_1 = require("@visactor/vdataset");
8
+
9
+ function isDataView(obj) {
10
+ return obj instanceof vdataset_1.DataView;
11
+ }
12
+
13
+ function isHTMLElement(obj) {
14
+ try {
15
+ return obj instanceof Element;
16
+ } catch (_a) {
17
+ const htmlElementKeys = [ "children", "innerHTML", "classList", "setAttribute", "tagName", "getBoundingClientRect" ], keys = Object.keys(obj);
18
+ return htmlElementKeys.every((key => keys.includes(key)));
19
+ }
20
+ }
21
+
22
+ exports.isDataView = isDataView, exports.isHTMLElement = isHTMLElement;
23
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/spec/common.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C,SAAgB,UAAU,CAAC,GAAQ;IACjC,OAAO,GAAG,YAAY,mBAAQ,CAAC;AACjC,CAAC;AAFD,gCAEC;AAED,SAAgB,aAAa,CAAC,GAAQ;IACpC,IAAI;QACF,OAAO,GAAG,YAAY,OAAO,CAAC;KAC/B;IAAC,WAAM;QAEN,MAAM,eAAe,GAAsB;YACzC,UAAU;YACV,WAAW;YACX,WAAW;YACX,cAAc;YACd,SAAS;YACT,uBAAuB;SACxB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;KACzD;AACH,CAAC;AAhBD,sCAgBC","file":"common.js","sourcesContent":["import { DataView } from '@visactor/vdataset';\n\nexport function isDataView(obj: any): obj is DataView {\n return obj instanceof DataView;\n}\n\nexport function isHTMLElement(obj: any): obj is Element {\n try {\n return obj instanceof Element;\n } catch {\n // 跨端 plan B\n const htmlElementKeys: (keyof Element)[] = [\n 'children',\n 'innerHTML',\n 'classList',\n 'setAttribute',\n 'tagName',\n 'getBoundingClientRect'\n ];\n const keys = Object.keys(obj);\n return htmlElementKeys.every(key => keys.includes(key));\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ export * from './background';
2
+ export * from './clone-deep';
3
+ export * from './common';
4
+ export * from './merge-spec';
5
+ export * from './merge-theme';
6
+ export * from './preprocess';
7
+ export * from './transform';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
4
+ void 0 === k2 && (k2 = k);
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
7
+ enumerable: !0,
8
+ get: function() {
9
+ return m[k];
10
+ }
11
+ }), Object.defineProperty(o, k2, desc);
12
+ } : function(o, m, k, k2) {
13
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
14
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
15
+ for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
16
+ };
17
+
18
+ Object.defineProperty(exports, "__esModule", {
19
+ value: !0
20
+ }), __exportStar(require("./background"), exports), __exportStar(require("./clone-deep"), exports),
21
+ __exportStar(require("./common"), exports), __exportStar(require("./merge-spec"), exports),
22
+ __exportStar(require("./merge-theme"), exports), __exportStar(require("./preprocess"), exports),
23
+ __exportStar(require("./transform"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B","file":"index.js","sourcesContent":["export * from './background';\nexport * from './clone-deep';\nexport * from './common';\nexport * from './merge-spec';\nexport * from './merge-theme';\nexport * from './preprocess';\nexport * from './transform';\n"]}
@@ -0,0 +1 @@
1
+ export declare function mergeSpec(target: any, ...sources: any[]): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.mergeSpec = void 0;
6
+
7
+ const vutils_1 = require("@visactor/vutils");
8
+
9
+ function baseMerge(target, source, shallowArray = !1) {
10
+ if (source) {
11
+ if (target === source) return;
12
+ if ((0, vutils_1.isValid)(source) && "object" == typeof source) {
13
+ const iterable = Object(source), props = [];
14
+ for (const key in iterable) props.push(key);
15
+ let {length: length} = props, propIndex = -1;
16
+ for (;length--; ) {
17
+ const key = props[++propIndex];
18
+ (0, vutils_1.isValid)(iterable[key]) && "object" == typeof iterable[key] && !(0,
19
+ vutils_1.isArray)(target[key]) ? baseMergeDeep(target, source, key, shallowArray) : assignMergeValue(target, key, iterable[key]);
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ function baseMergeDeep(target, source, key, shallowArray = !1) {
26
+ const objValue = target[key], srcValue = source[key];
27
+ let newValue = source[key], isCommon = !0;
28
+ if ((0, vutils_1.isArray)(srcValue)) {
29
+ if (shallowArray) newValue = []; else if ((0, vutils_1.isArray)(objValue)) newValue = objValue; else if ((0,
30
+ vutils_1.isArrayLike)(objValue)) {
31
+ newValue = new Array(objValue.length);
32
+ let index = -1;
33
+ const length = objValue.length;
34
+ for (;++index < length; ) newValue[index] = objValue[index];
35
+ }
36
+ } else (0, vutils_1.isPlainObject)(srcValue) ? (newValue = objValue, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
37
+ isCommon && baseMerge(newValue, srcValue, shallowArray), assignMergeValue(target, key, newValue);
38
+ }
39
+
40
+ function assignMergeValue(target, key, value) {
41
+ (void 0 !== value && !eq(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
42
+ }
43
+
44
+ function eq(value, other) {
45
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
46
+ }
47
+
48
+ function mergeSpec(target, ...sources) {
49
+ let sourceIndex = -1;
50
+ const length = sources.length;
51
+ for (;++sourceIndex < length; ) {
52
+ baseMerge(target, sources[sourceIndex], !0);
53
+ }
54
+ return target;
55
+ }
56
+
57
+ exports.mergeSpec = mergeSpec;
58
+ //# sourceMappingURL=merge-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/util/spec/merge-spec.ts"],"names":[],"mappings":";;;AAAA,6CAAgF;AAEhF,SAAS,SAAS,CAAC,MAAW,EAAE,MAAW,EAAE,eAAwB,KAAK;IACxE,IAAI,MAAM,EAAE;QACV,IAAI,MAAM,KAAK,MAAM,EAAE;YACrB,OAAO;SACR;QACD,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAEjD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAChC,MAAM,KAAK,GAAG,EAAE,CAAC;YAEjB,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;gBAC1B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACjB;YACD,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;YACvB,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC;YACnB,OAAO,MAAM,EAAE,EAAE;gBACf,MAAM,GAAG,GAAG,KAAK,CAAC,EAAE,SAAS,CA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B,CAAC;AARD,8BAQC","file":"merge-spec.js","sourcesContent":["import { isArray, isArrayLike, isPlainObject, isValid } from '@visactor/vutils';\n\nfunction baseMerge(target: any, source: any, shallowArray: boolean = false) {\n if (source) {\n if (target === source) {\n return;\n }\n if (isValid(source) && typeof source === 'object') {\n // baseFor\n const iterable = Object(source);\n const props = [];\n // keysIn\n for (const key in iterable) {\n props.push(key);\n }\n let { length } = props;\n let propIndex = -1;\n while (length--) {\n const key = props[++propIndex];\n if (\n isValid(iterable[key]) &&\n typeof iterable[key] === 'object' &&\n !isArray(target[key]) // VChart 特有逻辑\n ) {\n baseMergeDeep(target, source, key, shallowArray);\n } else {\n assignMergeValue(target, key, iterable[key]);\n }\n }\n }\n }\n}\n\n// 由于目前 VChart 内部对 spec 会先执行一次深拷贝,merge 暂时不考虑 source 中有环的问题\nfunction baseMergeDeep(target: object, source: object, key: string, shallowArray: boolean = false) {\n const objValue = target[key];\n const srcValue = source[key];\n let newValue = source[key];\n let isCommon = true;\n // 不考虑 buffer / typedArray 类型\n if (isArray(srcValue)) {\n if (shallowArray) {\n // 依据参数对数组做浅拷贝\n newValue = [];\n } else if (isArray(objValue)) {\n newValue = objValue;\n } else if (isArrayLike(objValue)) {\n // 如果 source 为数组,则 target 的 arrayLike 对象也视作为数组处理\n newValue = new Array(objValue.length);\n let index = -1;\n const length = objValue.length;\n while (++index < length) {\n newValue[index] = objValue[index];\n }\n }\n }\n // else if (isArray(srcValue) && shallowArray) {\n // newValue = [];\n // }\n // 不考虑 argument 类型\n else if (isPlainObject(srcValue)) {\n newValue = objValue;\n // 不考虑 prototype 的额外处理\n if (typeof objValue === 'function' || typeof objValue !== 'object') {\n newValue = {};\n }\n } else {\n isCommon = false;\n }\n // 对 class 等复杂对象或者浅拷贝的 array 不做拷贝处理\n if (isCommon) {\n baseMerge(newValue, srcValue, shallowArray);\n }\n assignMergeValue(target, key, newValue);\n}\n\nfunction assignMergeValue(target: object, key: string, value: any) {\n if ((value !== undefined && !eq(target[key], value)) || (value === undefined && !(key in target))) {\n // 不考虑 __proto__ 的赋值处理\n target[key] = value;\n }\n}\n\nfunction eq(value: any, other: any) {\n return value === other || (Number.isNaN(value) && Number.isNaN(other));\n}\n\n/* 与原生的 lodash merge 差异在于对数组是否应用最后一个 source 的结果\n * 以及对一些特殊情况的处理,比如对数组类型 padding 和对象类型的 padding 的 merge\n */\nexport function mergeSpec(target: any, ...sources: any[]): any {\n let sourceIndex = -1;\n const length = sources.length;\n while (++sourceIndex < length) {\n const source = sources[sourceIndex];\n baseMerge(target, source, true);\n }\n return target;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { type Maybe } from '@visactor/vutils';
2
+ import type { ITheme } from '../../theme';
3
+ export declare function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.mergeTheme = void 0;
6
+
7
+ const vutils_1 = require("@visactor/vutils"), util_1 = require("../../theme/color-scheme/util"), interface_1 = require("../../series/interface"), merge_spec_1 = require("./merge-spec");
8
+
9
+ function mergeTheme(target, ...sources) {
10
+ return (0, merge_spec_1.mergeSpec)(transformThemeToMerge(target), ...sources.map(transformThemeToMerge));
11
+ }
12
+
13
+ function transformThemeToMerge(theme) {
14
+ if (!theme) return theme;
15
+ let {colorScheme: colorScheme} = theme;
16
+ colorScheme && (colorScheme = Object.keys(colorScheme).reduce(((scheme, key) => {
17
+ const value = colorScheme[key];
18
+ return scheme[key] = (0, util_1.transformColorSchemeToStandardStruct)(value), scheme;
19
+ }), {}));
20
+ let {series: series} = theme;
21
+ const {mark: markByType, markByName: markByName} = theme;
22
+ return (markByType || markByName) && (series = Object.keys(interface_1.seriesMarkInfoMap).reduce(((newSeriesTheme, key) => {
23
+ var _a;
24
+ const value = null !== (_a = null == series ? void 0 : series[key]) && void 0 !== _a ? _a : {}, newValue = {};
25
+ return Object.values(interface_1.seriesMarkInfoMap[key]).forEach((({type: type, name: name}) => {
26
+ var _a, _b;
27
+ newValue[name] = (0, merge_spec_1.mergeSpec)({}, null !== (_a = null == markByType ? void 0 : markByType[(0,
28
+ vutils_1.array)(type)[0]]) && void 0 !== _a ? _a : {}, null !== (_b = null == markByName ? void 0 : markByName[name]) && void 0 !== _b ? _b : {}, value[name]);
29
+ })), newSeriesTheme[key] = Object.assign(Object.assign({}, value), newValue), newSeriesTheme;
30
+ }), {})), Object.assign(Object.assign({}, theme), {
31
+ colorScheme: colorScheme,
32
+ series: series
33
+ });
34
+ }
35
+
36
+ exports.mergeTheme = mergeTheme;
37
+ //# sourceMappingURL=merge-theme.js.map