@visactor/vchart 1.3.0-beta.7 → 1.3.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1212) hide show
  1. package/build/es5/index.js +3 -3
  2. package/build/index.js +30922 -30376
  3. package/build/index.min.js +2 -2
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/index.d.ts +2 -2
  6. package/cjs/chart/index.js +3 -3
  7. package/cjs/chart/index.js.map +1 -1
  8. package/cjs/chart/stack.js.map +1 -1
  9. package/cjs/chart/treemap/treemap.d.ts +1 -1
  10. package/cjs/chart/treemap/treemap.js +5 -5
  11. package/cjs/chart/treemap/treemap.js.map +1 -1
  12. package/cjs/compile/mark/compilable-mark.js +9 -10
  13. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  14. package/cjs/compile/mark/interface.d.ts +0 -1
  15. package/cjs/compile/mark/interface.js.map +1 -1
  16. package/cjs/compile/mark/util.d.ts +2 -1
  17. package/cjs/compile/mark/util.js +21 -5
  18. package/cjs/compile/mark/util.js.map +1 -1
  19. package/cjs/component/axis/base-axis.d.ts +15 -14
  20. package/cjs/component/axis/base-axis.js.map +1 -1
  21. package/cjs/component/axis/cartesian/axis.d.ts +2 -2
  22. package/cjs/component/axis/cartesian/axis.js +1 -0
  23. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  24. package/cjs/component/axis/cartesian/band-axis.d.ts +3 -3
  25. package/cjs/component/axis/cartesian/band-axis.js +1 -0
  26. package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
  27. package/cjs/component/axis/cartesian/interface/common.d.ts +2 -0
  28. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  29. package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -3
  30. package/cjs/component/axis/cartesian/linear-axis.js +2 -1
  31. package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
  32. package/cjs/component/axis/cartesian/log-axis.d.ts +3 -2
  33. package/cjs/component/axis/cartesian/log-axis.js.map +1 -1
  34. package/cjs/component/axis/cartesian/time-axis.d.ts +3 -2
  35. package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
  36. package/cjs/component/axis/interface.d.ts +6 -1
  37. package/cjs/component/axis/interface.js.map +1 -1
  38. package/cjs/component/axis/polar/axis.d.ts +3 -2
  39. package/cjs/component/axis/polar/axis.js +1 -0
  40. package/cjs/component/axis/polar/axis.js.map +1 -1
  41. package/cjs/component/axis/polar/band-axis.d.ts +4 -2
  42. package/cjs/component/axis/polar/band-axis.js.map +1 -1
  43. package/cjs/component/axis/polar/interface/spec.d.ts +7 -2
  44. package/cjs/component/axis/polar/interface/spec.js.map +1 -1
  45. package/cjs/component/axis/polar/linear-axis.d.ts +2 -3
  46. package/cjs/component/axis/polar/linear-axis.js.map +1 -1
  47. package/cjs/component/base/base-component.d.ts +4 -2
  48. package/cjs/component/base/base-component.js +11 -4
  49. package/cjs/component/base/base-component.js.map +1 -1
  50. package/cjs/component/brush/brush.d.ts +2 -2
  51. package/cjs/component/brush/brush.js +1 -1
  52. package/cjs/component/brush/brush.js.map +1 -1
  53. package/cjs/component/brush/interface.d.ts +1 -0
  54. package/cjs/component/brush/interface.js.map +1 -1
  55. package/cjs/component/crosshair/base.d.ts +2 -2
  56. package/cjs/component/crosshair/base.js +1 -1
  57. package/cjs/component/crosshair/base.js.map +1 -1
  58. package/cjs/component/crosshair/cartesian.d.ts +3 -3
  59. package/cjs/component/crosshair/cartesian.js.map +1 -1
  60. package/cjs/component/crosshair/polar.d.ts +3 -3
  61. package/cjs/component/crosshair/polar.js.map +1 -1
  62. package/cjs/component/custom-mark/custom-mark.d.ts +1 -1
  63. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  64. package/cjs/component/data-zoom/data-filter-base-component.d.ts +4 -5
  65. package/cjs/component/data-zoom/data-filter-base-component.js +0 -6
  66. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  67. package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
  68. package/cjs/component/data-zoom/data-zoom/data-zoom.js +1 -1
  69. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  70. package/cjs/component/data-zoom/data-zoom/interface.d.ts +3 -1
  71. package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
  72. package/cjs/component/data-zoom/interface.d.ts +4 -1
  73. package/cjs/component/data-zoom/interface.js.map +1 -1
  74. package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
  75. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  76. package/cjs/component/geo/geo-coordinate.d.ts +1 -2
  77. package/cjs/component/geo/geo-coordinate.js +16 -0
  78. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  79. package/cjs/component/indicator/indicator.d.ts +2 -2
  80. package/cjs/component/indicator/indicator.js +1 -1
  81. package/cjs/component/indicator/indicator.js.map +1 -1
  82. package/cjs/component/indicator/interface.d.ts +2 -0
  83. package/cjs/component/indicator/interface.js.map +1 -1
  84. package/cjs/component/label/base-label.d.ts +2 -2
  85. package/cjs/component/label/base-label.js.map +1 -1
  86. package/cjs/component/label/interface.d.ts +3 -0
  87. package/cjs/component/label/interface.js.map +1 -1
  88. package/cjs/component/label/label.d.ts +4 -3
  89. package/cjs/component/label/label.js.map +1 -1
  90. package/cjs/component/legend/base-legend.d.ts +2 -2
  91. package/cjs/component/legend/base-legend.js.map +1 -1
  92. package/cjs/component/legend/continuous/legend.d.ts +3 -4
  93. package/cjs/component/legend/continuous/legend.js.map +1 -1
  94. package/cjs/component/legend/discrete/legend.d.ts +1 -2
  95. package/cjs/component/legend/discrete/legend.js.map +1 -1
  96. package/cjs/component/map-label/component.d.ts +1 -2
  97. package/cjs/component/map-label/component.js.map +1 -1
  98. package/cjs/component/marker/base-marker.d.ts +2 -2
  99. package/cjs/component/marker/base-marker.js.map +1 -1
  100. package/cjs/component/marker/mark-area/mark-area.d.ts +1 -2
  101. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  102. package/cjs/component/marker/mark-line/mark-line.d.ts +1 -2
  103. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  104. package/cjs/component/marker/mark-point/mark-point.d.ts +1 -2
  105. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  106. package/cjs/component/player/player.d.ts +1 -2
  107. package/cjs/component/player/player.js.map +1 -1
  108. package/cjs/component/title/title.d.ts +1 -2
  109. package/cjs/component/title/title.js.map +1 -1
  110. package/cjs/component/tooltip/handler/base.js +3 -3
  111. package/cjs/component/tooltip/handler/base.js.map +1 -1
  112. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
  113. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  114. package/cjs/component/tooltip/handler/utils/attribute.js +1 -1
  115. package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
  116. package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
  117. package/cjs/component/tooltip/interface/theme.d.ts +6 -5
  118. package/cjs/component/tooltip/interface/theme.js.map +1 -1
  119. package/cjs/component/tooltip/tooltip.d.ts +3 -2
  120. package/cjs/component/tooltip/tooltip.js +6 -2
  121. package/cjs/component/tooltip/tooltip.js.map +1 -1
  122. package/cjs/core/index.d.ts +1 -1
  123. package/cjs/core/index.js +1 -1
  124. package/cjs/core/index.js.map +1 -1
  125. package/cjs/core/vchart.js +8 -3
  126. package/cjs/core/vchart.js.map +1 -1
  127. package/cjs/data/transforms/data-key.d.ts +2 -2
  128. package/cjs/data/transforms/data-key.js.map +1 -1
  129. package/cjs/data/transforms/dimension-statistics.d.ts +11 -5
  130. package/cjs/data/transforms/dimension-statistics.js +34 -22
  131. package/cjs/data/transforms/dimension-statistics.js.map +1 -1
  132. package/cjs/mark/base/base-mark.js +2 -2
  133. package/cjs/mark/base/base-mark.js.map +1 -1
  134. package/cjs/mark/symbol.js +1 -1
  135. package/cjs/mark/symbol.js.map +1 -1
  136. package/cjs/model/base-model.d.ts +4 -4
  137. package/cjs/model/base-model.js +13 -15
  138. package/cjs/model/base-model.js.map +1 -1
  139. package/cjs/model/interface.d.ts +1 -0
  140. package/cjs/model/interface.js.map +1 -1
  141. package/cjs/model/layout-item.d.ts +3 -3
  142. package/cjs/model/layout-item.js.map +1 -1
  143. package/cjs/model/tooltip-helper.d.ts +0 -2
  144. package/cjs/model/tooltip-helper.js +0 -3
  145. package/cjs/model/tooltip-helper.js.map +1 -1
  146. package/cjs/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
  147. package/cjs/region/region.d.ts +2 -3
  148. package/cjs/region/region.js.map +1 -1
  149. package/cjs/series/area/area.d.ts +5 -2
  150. package/cjs/series/area/area.js +15 -14
  151. package/cjs/series/area/area.js.map +1 -1
  152. package/cjs/series/area/constant.d.ts +2 -0
  153. package/cjs/series/area/constant.js +15 -0
  154. package/cjs/series/area/constant.js.map +1 -0
  155. package/cjs/series/area/interface.d.ts +2 -0
  156. package/cjs/series/area/interface.js.map +1 -1
  157. package/cjs/series/bar/bar-3d.d.ts +3 -1
  158. package/cjs/series/bar/bar-3d.js +2 -7
  159. package/cjs/series/bar/bar-3d.js.map +1 -1
  160. package/cjs/series/bar/bar.js +3 -8
  161. package/cjs/series/bar/bar.js.map +1 -1
  162. package/cjs/series/bar/constant.d.ts +3 -0
  163. package/cjs/series/bar/constant.js +20 -0
  164. package/cjs/series/bar/constant.js.map +1 -0
  165. package/cjs/series/bar/interface.d.ts +3 -2
  166. package/cjs/series/bar/interface.js.map +1 -1
  167. package/cjs/series/base/base-series.d.ts +4 -6
  168. package/cjs/series/base/base-series.js +49 -26
  169. package/cjs/series/base/base-series.js.map +1 -1
  170. package/cjs/series/base/constant.d.ts +2 -0
  171. package/cjs/series/base/constant.js +15 -0
  172. package/cjs/series/base/constant.js.map +1 -0
  173. package/cjs/series/base/tooltip-helper.d.ts +0 -1
  174. package/cjs/series/base/tooltip-helper.js +4 -5
  175. package/cjs/series/base/tooltip-helper.js.map +1 -1
  176. package/cjs/series/box-plot/box-plot.d.ts +1 -2
  177. package/cjs/series/box-plot/box-plot.js +6 -15
  178. package/cjs/series/box-plot/box-plot.js.map +1 -1
  179. package/cjs/series/box-plot/constant.d.ts +2 -0
  180. package/cjs/series/box-plot/constant.js +19 -0
  181. package/cjs/series/box-plot/constant.js.map +1 -0
  182. package/cjs/series/cartesian/cartesian.d.ts +6 -3
  183. package/cjs/series/cartesian/cartesian.js +25 -25
  184. package/cjs/series/cartesian/cartesian.js.map +1 -1
  185. package/cjs/series/cartesian/interface.d.ts +2 -2
  186. package/cjs/series/cartesian/interface.js.map +1 -1
  187. package/cjs/series/circle-packing/circle-packing.d.ts +1 -2
  188. package/cjs/series/circle-packing/circle-packing.js +6 -11
  189. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  190. package/cjs/series/circle-packing/constant.d.ts +2 -0
  191. package/cjs/series/circle-packing/constant.js +15 -0
  192. package/cjs/series/circle-packing/constant.js.map +1 -0
  193. package/cjs/series/dot/constant.d.ts +2 -0
  194. package/cjs/series/dot/constant.js +39 -0
  195. package/cjs/series/dot/constant.js.map +1 -0
  196. package/cjs/series/dot/dot.d.ts +1 -1
  197. package/cjs/series/dot/dot.js +2 -31
  198. package/cjs/series/dot/dot.js.map +1 -1
  199. package/cjs/series/funnel/constant.d.ts +3 -0
  200. package/cjs/series/funnel/constant.js +52 -0
  201. package/cjs/series/funnel/constant.js.map +1 -0
  202. package/cjs/series/funnel/funnel-3d.d.ts +3 -2
  203. package/cjs/series/funnel/funnel-3d.js +2 -23
  204. package/cjs/series/funnel/funnel-3d.js.map +1 -1
  205. package/cjs/series/funnel/funnel.d.ts +1 -1
  206. package/cjs/series/funnel/funnel.js +2 -23
  207. package/cjs/series/funnel/funnel.js.map +1 -1
  208. package/cjs/series/gauge/constant.d.ts +3 -0
  209. package/cjs/series/gauge/constant.js +32 -0
  210. package/cjs/series/gauge/constant.js.map +1 -0
  211. package/cjs/series/gauge/gauge-pointer.d.ts +2 -2
  212. package/cjs/series/gauge/gauge-pointer.js +5 -15
  213. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  214. package/cjs/series/gauge/gauge.d.ts +2 -1
  215. package/cjs/series/gauge/gauge.js +8 -14
  216. package/cjs/series/gauge/gauge.js.map +1 -1
  217. package/cjs/series/heatmap/constant.d.ts +2 -0
  218. package/cjs/series/heatmap/constant.js +19 -0
  219. package/cjs/series/heatmap/constant.js.map +1 -0
  220. package/cjs/series/heatmap/heatmap.d.ts +1 -1
  221. package/cjs/series/heatmap/heatmap.js +5 -14
  222. package/cjs/series/heatmap/heatmap.js.map +1 -1
  223. package/cjs/series/index.d.ts +2 -2
  224. package/cjs/series/index.js +3 -3
  225. package/cjs/series/index.js.map +1 -1
  226. package/cjs/series/interface/theme.d.ts +3 -2
  227. package/cjs/series/interface/theme.js +34 -1
  228. package/cjs/series/interface/theme.js.map +1 -1
  229. package/cjs/series/line/constant.d.ts +2 -0
  230. package/cjs/series/line/constant.js +10 -0
  231. package/cjs/series/line/constant.js.map +1 -0
  232. package/cjs/series/line/interface.d.ts +4 -0
  233. package/cjs/series/line/interface.js.map +1 -1
  234. package/cjs/series/line/line.d.ts +3 -2
  235. package/cjs/series/line/line.js +5 -3
  236. package/cjs/series/line/line.js.map +1 -1
  237. package/cjs/series/link/constant.d.ts +2 -0
  238. package/cjs/series/link/constant.js +23 -0
  239. package/cjs/series/link/constant.js.map +1 -0
  240. package/cjs/series/link/link.d.ts +1 -1
  241. package/cjs/series/link/link.js +3 -16
  242. package/cjs/series/link/link.js.map +1 -1
  243. package/cjs/series/map/constant.d.ts +2 -0
  244. package/cjs/series/map/constant.js +15 -0
  245. package/cjs/series/map/constant.js.map +1 -0
  246. package/cjs/series/map/map.d.ts +1 -1
  247. package/cjs/series/map/map.js +2 -7
  248. package/cjs/series/map/map.js.map +1 -1
  249. package/cjs/series/mixin/line-mixin.d.ts +3 -2
  250. package/cjs/series/mixin/line-mixin.js +33 -16
  251. package/cjs/series/mixin/line-mixin.js.map +1 -1
  252. package/cjs/series/pie/constant.d.ts +3 -0
  253. package/cjs/series/pie/constant.js +28 -0
  254. package/cjs/series/pie/constant.js.map +1 -0
  255. package/cjs/series/pie/pie-3d.d.ts +1 -1
  256. package/cjs/series/pie/pie-3d.js +2 -11
  257. package/cjs/series/pie/pie-3d.js.map +1 -1
  258. package/cjs/series/pie/pie.d.ts +1 -1
  259. package/cjs/series/pie/pie.js +3 -12
  260. package/cjs/series/pie/pie.js.map +1 -1
  261. package/cjs/series/progress/circular/circular.d.ts +1 -1
  262. package/cjs/series/progress/circular/circular.js +6 -15
  263. package/cjs/series/progress/circular/circular.js.map +1 -1
  264. package/cjs/series/progress/circular/constant.d.ts +2 -0
  265. package/cjs/series/progress/circular/constant.js +19 -0
  266. package/cjs/series/progress/circular/constant.js.map +1 -0
  267. package/cjs/series/progress/linear/constant.d.ts +2 -0
  268. package/cjs/series/progress/linear/constant.js +23 -0
  269. package/cjs/series/progress/linear/constant.js.map +1 -0
  270. package/cjs/series/progress/linear/linear.d.ts +1 -1
  271. package/cjs/series/progress/linear/linear.js +2 -15
  272. package/cjs/series/progress/linear/linear.js.map +1 -1
  273. package/cjs/series/radar/constant.d.ts +2 -0
  274. package/cjs/series/radar/constant.js +15 -0
  275. package/cjs/series/radar/constant.js.map +1 -0
  276. package/cjs/series/radar/radar.d.ts +3 -2
  277. package/cjs/series/radar/radar.js +8 -10
  278. package/cjs/series/radar/radar.js.map +1 -1
  279. package/cjs/series/range-area/constant.d.ts +2 -0
  280. package/cjs/series/range-area/constant.js +10 -0
  281. package/cjs/series/range-area/constant.js.map +1 -0
  282. package/cjs/series/range-area/range-area.d.ts +4 -1
  283. package/cjs/series/range-area/range-area.js +5 -2
  284. package/cjs/series/range-area/range-area.js.map +1 -1
  285. package/cjs/series/range-column/constant.d.ts +3 -0
  286. package/cjs/series/range-column/constant.js +28 -0
  287. package/cjs/series/range-column/constant.js.map +1 -0
  288. package/cjs/series/range-column/range-column-3d.d.ts +5 -1
  289. package/cjs/series/range-column/range-column-3d.js +3 -2
  290. package/cjs/series/range-column/range-column-3d.js.map +1 -1
  291. package/cjs/series/range-column/range-column.d.ts +2 -2
  292. package/cjs/series/range-column/range-column.js +3 -12
  293. package/cjs/series/range-column/range-column.js.map +1 -1
  294. package/cjs/series/rose/constant.d.ts +2 -0
  295. package/cjs/series/rose/constant.js +15 -0
  296. package/cjs/series/rose/constant.js.map +1 -0
  297. package/cjs/series/rose/rose.d.ts +2 -1
  298. package/cjs/series/rose/rose.js +8 -10
  299. package/cjs/series/rose/rose.js.map +1 -1
  300. package/cjs/series/sankey/constant.d.ts +2 -0
  301. package/cjs/series/sankey/constant.js +19 -0
  302. package/cjs/series/sankey/constant.js.map +1 -0
  303. package/cjs/series/sankey/sankey.d.ts +1 -2
  304. package/cjs/series/sankey/sankey.js +2 -11
  305. package/cjs/series/sankey/sankey.js.map +1 -1
  306. package/cjs/series/scatter/constant.d.ts +2 -0
  307. package/cjs/series/scatter/constant.js +15 -0
  308. package/cjs/series/scatter/constant.js.map +1 -0
  309. package/cjs/series/scatter/interface.d.ts +2 -0
  310. package/cjs/series/scatter/interface.js.map +1 -1
  311. package/cjs/series/scatter/scatter.d.ts +3 -2
  312. package/cjs/series/scatter/scatter.js +20 -17
  313. package/cjs/series/scatter/scatter.js.map +1 -1
  314. package/cjs/series/sunburst/constant.d.ts +2 -0
  315. package/cjs/series/sunburst/constant.js +15 -0
  316. package/cjs/series/sunburst/constant.js.map +1 -0
  317. package/cjs/series/sunburst/sunburst.js +2 -7
  318. package/cjs/series/sunburst/sunburst.js.map +1 -1
  319. package/cjs/series/treemap/constant.d.ts +2 -0
  320. package/cjs/series/treemap/constant.js +23 -0
  321. package/cjs/series/treemap/constant.js.map +1 -0
  322. package/cjs/series/treemap/treemap.d.ts +1 -1
  323. package/cjs/series/treemap/treemap.js +10 -22
  324. package/cjs/series/treemap/treemap.js.map +1 -1
  325. package/cjs/series/waterfall/constant.d.ts +2 -0
  326. package/cjs/series/waterfall/constant.js +19 -0
  327. package/cjs/series/waterfall/constant.js.map +1 -0
  328. package/cjs/series/waterfall/waterfall.d.ts +2 -2
  329. package/cjs/series/waterfall/waterfall.js +2 -11
  330. package/cjs/series/waterfall/waterfall.js.map +1 -1
  331. package/cjs/series/word-cloud/base.js +3 -12
  332. package/cjs/series/word-cloud/base.js.map +1 -1
  333. package/cjs/series/word-cloud/constant.d.ts +2 -0
  334. package/cjs/series/word-cloud/constant.js +19 -0
  335. package/cjs/series/word-cloud/constant.js.map +1 -0
  336. package/cjs/series/word-cloud/word-cloud-3d.d.ts +1 -1
  337. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  338. package/cjs/series/word-cloud/word-cloud.d.ts +1 -1
  339. package/cjs/series/word-cloud/word-cloud.js.map +1 -1
  340. package/cjs/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
  341. package/cjs/theme/builtin/common/component/axis/band-axis.js.map +1 -0
  342. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
  343. package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -0
  344. package/cjs/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
  345. package/cjs/theme/builtin/common/component/axis/log-axis.js.map +1 -0
  346. package/cjs/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
  347. package/cjs/theme/builtin/common/component/brush.js.map +1 -0
  348. package/cjs/theme/{buildin-theme/light → builtin/common}/component/crosshair.js +16 -4
  349. package/cjs/theme/builtin/common/component/crosshair.js.map +1 -0
  350. package/cjs/theme/builtin/common/component/data-zoom.js +160 -0
  351. package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -0
  352. package/cjs/theme/builtin/common/component/index.js.map +1 -0
  353. package/cjs/theme/builtin/common/component/indicator.js.map +1 -0
  354. package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -0
  355. package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.js +1 -1
  356. package/cjs/theme/builtin/common/component/legend/continuous.js.map +1 -0
  357. package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.js +8 -5
  358. package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
  359. package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -0
  360. package/cjs/theme/builtin/common/component/map-label.js.map +1 -0
  361. package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-area.js +8 -2
  362. package/cjs/theme/builtin/common/component/mark-area.js.map +1 -0
  363. package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-line.js +8 -2
  364. package/cjs/theme/builtin/common/component/mark-line.js.map +1 -0
  365. package/cjs/theme/builtin/common/component/mark-point.js.map +1 -0
  366. package/cjs/theme/{buildin-theme/light → builtin/common}/component/player.js +4 -1
  367. package/cjs/theme/builtin/common/component/player.js.map +1 -0
  368. package/cjs/theme/{buildin-theme/light → builtin/common}/component/poptip.js +16 -4
  369. package/cjs/theme/builtin/common/component/poptip.js.map +1 -0
  370. package/cjs/theme/{buildin-theme/light → builtin/common}/component/title.js +2 -2
  371. package/cjs/theme/builtin/common/component/title.js.map +1 -0
  372. package/cjs/theme/{buildin-theme/light → builtin/common}/component/tooltip.js +25 -6
  373. package/cjs/theme/builtin/common/component/tooltip.js.map +1 -0
  374. package/cjs/theme/{buildin-theme/light → builtin/common}/component/total-label.js +4 -1
  375. package/cjs/theme/builtin/common/component/total-label.js.map +1 -0
  376. package/cjs/theme/{buildin-theme/light → builtin/common}/constants.js +3 -3
  377. package/cjs/theme/builtin/common/constants.js.map +1 -0
  378. package/cjs/theme/{buildin-theme/light → builtin/common}/mark.js +12 -3
  379. package/cjs/theme/builtin/common/mark.js.map +1 -0
  380. package/cjs/theme/builtin/common/series/area.js.map +1 -0
  381. package/cjs/theme/builtin/common/series/bar.js.map +1 -0
  382. package/cjs/theme/builtin/common/series/bar3d.js.map +1 -0
  383. package/cjs/theme/builtin/common/series/box-plot.js.map +1 -0
  384. package/cjs/theme/{buildin-theme/light → builtin/common}/series/circle-packing.js +8 -2
  385. package/cjs/theme/builtin/common/series/circle-packing.js.map +1 -0
  386. package/cjs/theme/builtin/common/series/circular-progress.js.map +1 -0
  387. package/cjs/theme/builtin/common/series/dot.js.map +1 -0
  388. package/cjs/theme/builtin/common/series/funnel.js.map +1 -0
  389. package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -0
  390. package/cjs/theme/builtin/common/series/gauge-pointer.js.map +1 -0
  391. package/cjs/theme/builtin/common/series/gauge.js.map +1 -0
  392. package/cjs/theme/builtin/common/series/heatmap.js.map +1 -0
  393. package/cjs/theme/builtin/common/series/index.js.map +1 -0
  394. package/cjs/theme/builtin/common/series/line.js.map +1 -0
  395. package/cjs/theme/builtin/common/series/linear-progress.js.map +1 -0
  396. package/cjs/theme/builtin/common/series/link.js.map +1 -0
  397. package/cjs/theme/builtin/common/series/map.js.map +1 -0
  398. package/cjs/theme/builtin/common/series/pie.js.map +1 -0
  399. package/cjs/theme/builtin/common/series/pie3d.js.map +1 -0
  400. package/cjs/theme/builtin/common/series/radar.js.map +1 -0
  401. package/cjs/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.js +4 -1
  402. package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -0
  403. package/cjs/theme/builtin/common/series/rose.js.map +1 -0
  404. package/cjs/theme/builtin/common/series/sankey.js.map +1 -0
  405. package/cjs/theme/builtin/common/series/scatter.js.map +1 -0
  406. package/cjs/theme/{buildin-theme/light → builtin/common}/series/sunburst.js +8 -2
  407. package/cjs/theme/builtin/common/series/sunburst.js.map +1 -0
  408. package/cjs/theme/builtin/common/series/treemap.js.map +1 -0
  409. package/cjs/theme/builtin/common/series/waterfall.js.map +1 -0
  410. package/cjs/theme/builtin/common/series/word-cloud.js.map +1 -0
  411. package/cjs/theme/builtin/common/series/word-cloud3d.js.map +1 -0
  412. package/cjs/theme/{buildin-theme/config.js → builtin/constant.js} +1 -1
  413. package/cjs/theme/builtin/constant.js.map +1 -0
  414. package/cjs/theme/builtin/dark/color-scheme.js +33 -0
  415. package/cjs/theme/builtin/dark/color-scheme.js.map +1 -0
  416. package/cjs/theme/builtin/dark/index.d.ts +2 -0
  417. package/cjs/theme/builtin/dark/index.js +13 -0
  418. package/cjs/theme/builtin/dark/index.js.map +1 -0
  419. package/{esm/theme/buildin-theme → cjs/theme/builtin}/index.d.ts +2 -2
  420. package/cjs/theme/{buildin-theme → builtin}/index.js +3 -3
  421. package/cjs/theme/builtin/index.js.map +1 -0
  422. package/cjs/theme/builtin/light/color-scheme.js +33 -0
  423. package/cjs/theme/builtin/light/color-scheme.js.map +1 -0
  424. package/cjs/theme/{buildin-theme → builtin}/light/index.js +5 -1
  425. package/cjs/theme/builtin/light/index.js.map +1 -0
  426. package/cjs/theme/color-scheme/builtin/default.d.ts +2 -0
  427. package/cjs/theme/color-scheme/builtin/default.js +11 -0
  428. package/cjs/theme/color-scheme/builtin/default.js.map +1 -0
  429. package/cjs/theme/color-scheme/util.d.ts +2 -1
  430. package/cjs/theme/color-scheme/util.js +9 -2
  431. package/cjs/theme/color-scheme/util.js.map +1 -1
  432. package/cjs/theme/index.d.ts +1 -1
  433. package/cjs/theme/index.js +1 -1
  434. package/cjs/theme/index.js.map +1 -1
  435. package/cjs/theme/interface.d.ts +2 -2
  436. package/cjs/theme/interface.js.map +1 -1
  437. package/cjs/theme/theme-manager.js +7 -7
  438. package/cjs/theme/theme-manager.js.map +1 -1
  439. package/cjs/typings/spec/common.d.ts +5 -0
  440. package/cjs/typings/spec/common.js.map +1 -1
  441. package/cjs/util/spec.d.ts +7 -0
  442. package/cjs/util/spec.js +55 -6
  443. package/cjs/util/spec.js.map +1 -1
  444. package/cjs/util/text.d.ts +0 -4
  445. package/cjs/util/text.js +6 -14
  446. package/cjs/util/text.js.map +1 -1
  447. package/cjs/vchart-all.js +1 -1
  448. package/cjs/vchart-all.js.map +1 -1
  449. package/esm/chart/index.d.ts +2 -2
  450. package/esm/chart/index.js +2 -2
  451. package/esm/chart/index.js.map +1 -1
  452. package/esm/chart/stack.js.map +1 -1
  453. package/esm/chart/treemap/treemap.d.ts +1 -1
  454. package/esm/chart/treemap/treemap.js +4 -4
  455. package/esm/chart/treemap/treemap.js.map +1 -1
  456. package/esm/compile/mark/compilable-mark.js +9 -11
  457. package/esm/compile/mark/compilable-mark.js.map +1 -1
  458. package/esm/compile/mark/interface.d.ts +0 -1
  459. package/esm/compile/mark/interface.js.map +1 -1
  460. package/esm/compile/mark/util.d.ts +2 -1
  461. package/esm/compile/mark/util.js +19 -3
  462. package/esm/compile/mark/util.js.map +1 -1
  463. package/esm/component/axis/base-axis.d.ts +15 -14
  464. package/esm/component/axis/base-axis.js.map +1 -1
  465. package/esm/component/axis/cartesian/axis.d.ts +2 -2
  466. package/esm/component/axis/cartesian/axis.js +1 -0
  467. package/esm/component/axis/cartesian/axis.js.map +1 -1
  468. package/esm/component/axis/cartesian/band-axis.d.ts +3 -3
  469. package/esm/component/axis/cartesian/band-axis.js +1 -0
  470. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  471. package/esm/component/axis/cartesian/interface/common.d.ts +2 -0
  472. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  473. package/esm/component/axis/cartesian/linear-axis.d.ts +3 -3
  474. package/esm/component/axis/cartesian/linear-axis.js +2 -1
  475. package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
  476. package/esm/component/axis/cartesian/log-axis.d.ts +3 -2
  477. package/esm/component/axis/cartesian/log-axis.js.map +1 -1
  478. package/esm/component/axis/cartesian/time-axis.d.ts +3 -2
  479. package/esm/component/axis/cartesian/time-axis.js.map +1 -1
  480. package/esm/component/axis/interface.d.ts +6 -1
  481. package/esm/component/axis/interface.js.map +1 -1
  482. package/esm/component/axis/polar/axis.d.ts +3 -2
  483. package/esm/component/axis/polar/axis.js +1 -0
  484. package/esm/component/axis/polar/axis.js.map +1 -1
  485. package/esm/component/axis/polar/band-axis.d.ts +4 -2
  486. package/esm/component/axis/polar/band-axis.js.map +1 -1
  487. package/esm/component/axis/polar/interface/spec.d.ts +7 -2
  488. package/esm/component/axis/polar/interface/spec.js.map +1 -1
  489. package/esm/component/axis/polar/linear-axis.d.ts +2 -3
  490. package/esm/component/axis/polar/linear-axis.js.map +1 -1
  491. package/esm/component/base/base-component.d.ts +4 -2
  492. package/esm/component/base/base-component.js +11 -1
  493. package/esm/component/base/base-component.js.map +1 -1
  494. package/esm/component/brush/brush.d.ts +2 -2
  495. package/esm/component/brush/brush.js +1 -1
  496. package/esm/component/brush/brush.js.map +1 -1
  497. package/esm/component/brush/interface.d.ts +1 -0
  498. package/esm/component/brush/interface.js.map +1 -1
  499. package/esm/component/crosshair/base.d.ts +2 -2
  500. package/esm/component/crosshair/base.js +1 -1
  501. package/esm/component/crosshair/base.js.map +1 -1
  502. package/esm/component/crosshair/cartesian.d.ts +3 -3
  503. package/esm/component/crosshair/cartesian.js.map +1 -1
  504. package/esm/component/crosshair/polar.d.ts +3 -3
  505. package/esm/component/crosshair/polar.js.map +1 -1
  506. package/esm/component/custom-mark/custom-mark.d.ts +1 -1
  507. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  508. package/esm/component/data-zoom/data-filter-base-component.d.ts +4 -5
  509. package/esm/component/data-zoom/data-filter-base-component.js +0 -6
  510. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  511. package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
  512. package/esm/component/data-zoom/data-zoom/data-zoom.js +1 -1
  513. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  514. package/esm/component/data-zoom/data-zoom/interface.d.ts +3 -1
  515. package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
  516. package/esm/component/data-zoom/interface.d.ts +4 -1
  517. package/esm/component/data-zoom/interface.js.map +1 -1
  518. package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
  519. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  520. package/esm/component/geo/geo-coordinate.d.ts +1 -2
  521. package/esm/component/geo/geo-coordinate.js +16 -0
  522. package/esm/component/geo/geo-coordinate.js.map +1 -1
  523. package/esm/component/indicator/indicator.d.ts +2 -2
  524. package/esm/component/indicator/indicator.js +1 -1
  525. package/esm/component/indicator/indicator.js.map +1 -1
  526. package/esm/component/indicator/interface.d.ts +2 -0
  527. package/esm/component/indicator/interface.js.map +1 -1
  528. package/esm/component/label/base-label.d.ts +2 -2
  529. package/esm/component/label/base-label.js.map +1 -1
  530. package/esm/component/label/interface.d.ts +3 -0
  531. package/esm/component/label/interface.js.map +1 -1
  532. package/esm/component/label/label.d.ts +4 -3
  533. package/esm/component/label/label.js.map +1 -1
  534. package/esm/component/legend/base-legend.d.ts +2 -2
  535. package/esm/component/legend/base-legend.js.map +1 -1
  536. package/esm/component/legend/continuous/legend.d.ts +3 -4
  537. package/esm/component/legend/continuous/legend.js.map +1 -1
  538. package/esm/component/legend/discrete/legend.d.ts +1 -2
  539. package/esm/component/legend/discrete/legend.js.map +1 -1
  540. package/esm/component/map-label/component.d.ts +1 -2
  541. package/esm/component/map-label/component.js.map +1 -1
  542. package/esm/component/marker/base-marker.d.ts +2 -2
  543. package/esm/component/marker/base-marker.js.map +1 -1
  544. package/esm/component/marker/mark-area/mark-area.d.ts +1 -2
  545. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  546. package/esm/component/marker/mark-line/mark-line.d.ts +1 -2
  547. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  548. package/esm/component/marker/mark-point/mark-point.d.ts +1 -2
  549. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  550. package/esm/component/player/player.d.ts +1 -2
  551. package/esm/component/player/player.js.map +1 -1
  552. package/esm/component/title/title.d.ts +1 -2
  553. package/esm/component/title/title.js.map +1 -1
  554. package/esm/component/tooltip/handler/base.js +3 -3
  555. package/esm/component/tooltip/handler/base.js.map +1 -1
  556. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
  557. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  558. package/esm/component/tooltip/handler/utils/attribute.js +2 -2
  559. package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
  560. package/esm/component/tooltip/handler/utils/style.js.map +1 -1
  561. package/esm/component/tooltip/interface/theme.d.ts +6 -5
  562. package/esm/component/tooltip/interface/theme.js.map +1 -1
  563. package/esm/component/tooltip/tooltip.d.ts +3 -2
  564. package/esm/component/tooltip/tooltip.js +6 -2
  565. package/esm/component/tooltip/tooltip.js.map +1 -1
  566. package/esm/core/index.d.ts +1 -1
  567. package/esm/core/index.js +1 -1
  568. package/esm/core/index.js.map +1 -1
  569. package/esm/core/vchart.js +8 -3
  570. package/esm/core/vchart.js.map +1 -1
  571. package/esm/data/transforms/data-key.d.ts +2 -2
  572. package/esm/data/transforms/data-key.js.map +1 -1
  573. package/esm/data/transforms/dimension-statistics.d.ts +11 -5
  574. package/esm/data/transforms/dimension-statistics.js +33 -22
  575. package/esm/data/transforms/dimension-statistics.js.map +1 -1
  576. package/esm/mark/base/base-mark.js +2 -2
  577. package/esm/mark/base/base-mark.js.map +1 -1
  578. package/esm/mark/symbol.js +1 -1
  579. package/esm/mark/symbol.js.map +1 -1
  580. package/esm/model/base-model.d.ts +4 -4
  581. package/esm/model/base-model.js +14 -16
  582. package/esm/model/base-model.js.map +1 -1
  583. package/esm/model/interface.d.ts +1 -0
  584. package/esm/model/interface.js.map +1 -1
  585. package/esm/model/layout-item.d.ts +3 -3
  586. package/esm/model/layout-item.js.map +1 -1
  587. package/esm/model/tooltip-helper.d.ts +0 -2
  588. package/esm/model/tooltip-helper.js +0 -3
  589. package/esm/model/tooltip-helper.js.map +1 -1
  590. package/esm/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
  591. package/esm/region/region.d.ts +2 -3
  592. package/esm/region/region.js.map +1 -1
  593. package/esm/series/area/area.d.ts +5 -2
  594. package/esm/series/area/area.js +12 -13
  595. package/esm/series/area/area.js.map +1 -1
  596. package/esm/series/area/constant.d.ts +2 -0
  597. package/esm/series/area/constant.js +15 -0
  598. package/esm/series/area/constant.js.map +1 -0
  599. package/esm/series/area/interface.d.ts +2 -0
  600. package/esm/series/area/interface.js.map +1 -1
  601. package/esm/series/bar/bar-3d.d.ts +3 -1
  602. package/esm/series/bar/bar-3d.js +3 -8
  603. package/esm/series/bar/bar-3d.js.map +1 -1
  604. package/esm/series/bar/bar.js +4 -9
  605. package/esm/series/bar/bar.js.map +1 -1
  606. package/esm/series/bar/constant.d.ts +3 -0
  607. package/esm/series/bar/constant.js +20 -0
  608. package/esm/series/bar/constant.js.map +1 -0
  609. package/esm/series/bar/interface.d.ts +3 -2
  610. package/esm/series/bar/interface.js.map +1 -1
  611. package/esm/series/base/base-series.d.ts +4 -6
  612. package/esm/series/base/base-series.js +50 -27
  613. package/esm/series/base/base-series.js.map +1 -1
  614. package/esm/series/base/constant.d.ts +2 -0
  615. package/esm/series/base/constant.js +11 -0
  616. package/esm/series/base/constant.js.map +1 -0
  617. package/esm/series/base/tooltip-helper.d.ts +0 -1
  618. package/esm/series/base/tooltip-helper.js +4 -5
  619. package/esm/series/base/tooltip-helper.js.map +1 -1
  620. package/esm/series/box-plot/box-plot.d.ts +1 -2
  621. package/esm/series/box-plot/box-plot.js +4 -15
  622. package/esm/series/box-plot/box-plot.js.map +1 -1
  623. package/esm/series/box-plot/constant.d.ts +2 -0
  624. package/esm/series/box-plot/constant.js +17 -0
  625. package/esm/series/box-plot/constant.js.map +1 -0
  626. package/esm/series/cartesian/cartesian.d.ts +6 -3
  627. package/esm/series/cartesian/cartesian.js +24 -25
  628. package/esm/series/cartesian/cartesian.js.map +1 -1
  629. package/esm/series/cartesian/interface.d.ts +2 -2
  630. package/esm/series/cartesian/interface.js.map +1 -1
  631. package/esm/series/circle-packing/circle-packing.d.ts +1 -2
  632. package/esm/series/circle-packing/circle-packing.js +4 -10
  633. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  634. package/esm/series/circle-packing/constant.d.ts +2 -0
  635. package/esm/series/circle-packing/constant.js +13 -0
  636. package/esm/series/circle-packing/constant.js.map +1 -0
  637. package/esm/series/dot/constant.d.ts +2 -0
  638. package/esm/series/dot/constant.js +37 -0
  639. package/esm/series/dot/constant.js.map +1 -0
  640. package/esm/series/dot/dot.d.ts +1 -1
  641. package/esm/series/dot/dot.js +3 -34
  642. package/esm/series/dot/dot.js.map +1 -1
  643. package/esm/series/funnel/constant.d.ts +3 -0
  644. package/esm/series/funnel/constant.js +52 -0
  645. package/esm/series/funnel/constant.js.map +1 -0
  646. package/esm/series/funnel/funnel-3d.d.ts +3 -2
  647. package/esm/series/funnel/funnel-3d.js +3 -24
  648. package/esm/series/funnel/funnel-3d.js.map +1 -1
  649. package/esm/series/funnel/funnel.d.ts +1 -1
  650. package/esm/series/funnel/funnel.js +3 -22
  651. package/esm/series/funnel/funnel.js.map +1 -1
  652. package/esm/series/gauge/constant.d.ts +3 -0
  653. package/esm/series/gauge/constant.js +32 -0
  654. package/esm/series/gauge/constant.js.map +1 -0
  655. package/esm/series/gauge/gauge-pointer.d.ts +2 -2
  656. package/esm/series/gauge/gauge-pointer.js +6 -16
  657. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  658. package/esm/series/gauge/gauge.d.ts +2 -1
  659. package/esm/series/gauge/gauge.js +6 -14
  660. package/esm/series/gauge/gauge.js.map +1 -1
  661. package/esm/series/heatmap/constant.d.ts +2 -0
  662. package/esm/series/heatmap/constant.js +17 -0
  663. package/esm/series/heatmap/constant.js.map +1 -0
  664. package/esm/series/heatmap/heatmap.d.ts +1 -1
  665. package/esm/series/heatmap/heatmap.js +3 -14
  666. package/esm/series/heatmap/heatmap.js.map +1 -1
  667. package/esm/series/index.d.ts +2 -2
  668. package/esm/series/index.js +2 -2
  669. package/esm/series/index.js.map +1 -1
  670. package/esm/series/interface/theme.d.ts +3 -2
  671. package/esm/series/interface/theme.js +78 -1
  672. package/esm/series/interface/theme.js.map +1 -1
  673. package/esm/series/line/constant.d.ts +2 -0
  674. package/esm/series/line/constant.js +6 -0
  675. package/esm/series/line/constant.js.map +1 -0
  676. package/esm/series/line/interface.d.ts +4 -0
  677. package/esm/series/line/interface.js.map +1 -1
  678. package/esm/series/line/line.d.ts +3 -2
  679. package/esm/series/line/line.js +7 -5
  680. package/esm/series/line/line.js.map +1 -1
  681. package/esm/series/link/constant.d.ts +2 -0
  682. package/esm/series/link/constant.js +21 -0
  683. package/esm/series/link/constant.js.map +1 -0
  684. package/esm/series/link/link.d.ts +1 -1
  685. package/esm/series/link/link.js +4 -21
  686. package/esm/series/link/link.js.map +1 -1
  687. package/esm/series/map/constant.d.ts +2 -0
  688. package/esm/series/map/constant.js +13 -0
  689. package/esm/series/map/constant.js.map +1 -0
  690. package/esm/series/map/map.d.ts +1 -1
  691. package/esm/series/map/map.js +3 -8
  692. package/esm/series/map/map.js.map +1 -1
  693. package/esm/series/mixin/line-mixin.d.ts +3 -2
  694. package/esm/series/mixin/line-mixin.js +34 -15
  695. package/esm/series/mixin/line-mixin.js.map +1 -1
  696. package/esm/series/pie/constant.d.ts +3 -0
  697. package/esm/series/pie/constant.js +28 -0
  698. package/esm/series/pie/constant.js.map +1 -0
  699. package/esm/series/pie/pie-3d.d.ts +1 -1
  700. package/esm/series/pie/pie-3d.js +3 -12
  701. package/esm/series/pie/pie-3d.js.map +1 -1
  702. package/esm/series/pie/pie.d.ts +1 -1
  703. package/esm/series/pie/pie.js +4 -13
  704. package/esm/series/pie/pie.js.map +1 -1
  705. package/esm/series/progress/circular/circular.d.ts +1 -1
  706. package/esm/series/progress/circular/circular.js +3 -14
  707. package/esm/series/progress/circular/circular.js.map +1 -1
  708. package/esm/series/progress/circular/constant.d.ts +2 -0
  709. package/esm/series/progress/circular/constant.js +17 -0
  710. package/esm/series/progress/circular/constant.js.map +1 -0
  711. package/esm/series/progress/linear/constant.d.ts +2 -0
  712. package/esm/series/progress/linear/constant.js +21 -0
  713. package/esm/series/progress/linear/constant.js.map +1 -0
  714. package/esm/series/progress/linear/linear.d.ts +1 -1
  715. package/esm/series/progress/linear/linear.js +3 -18
  716. package/esm/series/progress/linear/linear.js.map +1 -1
  717. package/esm/series/radar/constant.d.ts +2 -0
  718. package/esm/series/radar/constant.js +15 -0
  719. package/esm/series/radar/constant.js.map +1 -0
  720. package/esm/series/radar/radar.d.ts +3 -2
  721. package/esm/series/radar/radar.js +7 -11
  722. package/esm/series/radar/radar.js.map +1 -1
  723. package/esm/series/range-area/constant.d.ts +2 -0
  724. package/esm/series/range-area/constant.js +4 -0
  725. package/esm/series/range-area/constant.js.map +1 -0
  726. package/esm/series/range-area/range-area.d.ts +4 -1
  727. package/esm/series/range-area/range-area.js +6 -1
  728. package/esm/series/range-area/range-area.js.map +1 -1
  729. package/esm/series/range-column/constant.d.ts +3 -0
  730. package/esm/series/range-column/constant.js +28 -0
  731. package/esm/series/range-column/constant.js.map +1 -0
  732. package/esm/series/range-column/range-column-3d.d.ts +5 -1
  733. package/esm/series/range-column/range-column-3d.js +3 -1
  734. package/esm/series/range-column/range-column-3d.js.map +1 -1
  735. package/esm/series/range-column/range-column.d.ts +2 -2
  736. package/esm/series/range-column/range-column.js +4 -11
  737. package/esm/series/range-column/range-column.js.map +1 -1
  738. package/esm/series/rose/constant.d.ts +2 -0
  739. package/esm/series/rose/constant.js +13 -0
  740. package/esm/series/rose/constant.js.map +1 -0
  741. package/esm/series/rose/rose.d.ts +2 -1
  742. package/esm/series/rose/rose.js +6 -10
  743. package/esm/series/rose/rose.js.map +1 -1
  744. package/esm/series/sankey/constant.d.ts +2 -0
  745. package/esm/series/sankey/constant.js +17 -0
  746. package/esm/series/sankey/constant.js.map +1 -0
  747. package/esm/series/sankey/sankey.d.ts +1 -2
  748. package/esm/series/sankey/sankey.js +3 -14
  749. package/esm/series/sankey/sankey.js.map +1 -1
  750. package/esm/series/scatter/constant.d.ts +2 -0
  751. package/esm/series/scatter/constant.js +13 -0
  752. package/esm/series/scatter/constant.js.map +1 -0
  753. package/esm/series/scatter/interface.d.ts +2 -0
  754. package/esm/series/scatter/interface.js.map +1 -1
  755. package/esm/series/scatter/scatter.d.ts +3 -2
  756. package/esm/series/scatter/scatter.js +18 -17
  757. package/esm/series/scatter/scatter.js.map +1 -1
  758. package/esm/series/sunburst/constant.d.ts +2 -0
  759. package/esm/series/sunburst/constant.js +13 -0
  760. package/esm/series/sunburst/constant.js.map +1 -0
  761. package/esm/series/sunburst/sunburst.js +5 -9
  762. package/esm/series/sunburst/sunburst.js.map +1 -1
  763. package/esm/series/treemap/constant.d.ts +2 -0
  764. package/esm/series/treemap/constant.js +21 -0
  765. package/esm/series/treemap/constant.js.map +1 -0
  766. package/esm/series/treemap/treemap.d.ts +1 -1
  767. package/esm/series/treemap/treemap.js +10 -22
  768. package/esm/series/treemap/treemap.js.map +1 -1
  769. package/esm/series/waterfall/constant.d.ts +2 -0
  770. package/esm/series/waterfall/constant.js +17 -0
  771. package/esm/series/waterfall/constant.js.map +1 -0
  772. package/esm/series/waterfall/waterfall.d.ts +2 -2
  773. package/esm/series/waterfall/waterfall.js +3 -12
  774. package/esm/series/waterfall/waterfall.js.map +1 -1
  775. package/esm/series/word-cloud/base.js +3 -12
  776. package/esm/series/word-cloud/base.js.map +1 -1
  777. package/esm/series/word-cloud/constant.d.ts +2 -0
  778. package/esm/series/word-cloud/constant.js +17 -0
  779. package/esm/series/word-cloud/constant.js.map +1 -0
  780. package/esm/series/word-cloud/word-cloud-3d.d.ts +1 -1
  781. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  782. package/esm/series/word-cloud/word-cloud.d.ts +1 -1
  783. package/esm/series/word-cloud/word-cloud.js.map +1 -1
  784. package/esm/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
  785. package/esm/theme/builtin/common/component/axis/band-axis.js.map +1 -0
  786. package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
  787. package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -0
  788. package/esm/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
  789. package/esm/theme/builtin/common/component/axis/log-axis.js.map +1 -0
  790. package/esm/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
  791. package/esm/theme/builtin/common/component/brush.js.map +1 -0
  792. package/esm/theme/{buildin-theme/light → builtin/common}/component/crosshair.js +16 -4
  793. package/esm/theme/builtin/common/component/crosshair.js.map +1 -0
  794. package/esm/theme/builtin/common/component/data-zoom.js +156 -0
  795. package/esm/theme/builtin/common/component/data-zoom.js.map +1 -0
  796. package/esm/theme/builtin/common/component/index.js.map +1 -0
  797. package/esm/theme/builtin/common/component/indicator.js.map +1 -0
  798. package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -0
  799. package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.js +1 -1
  800. package/esm/theme/builtin/common/component/legend/continuous.js.map +1 -0
  801. package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.js +8 -5
  802. package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
  803. package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -0
  804. package/esm/theme/builtin/common/component/map-label.js.map +1 -0
  805. package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-area.js +8 -2
  806. package/esm/theme/builtin/common/component/mark-area.js.map +1 -0
  807. package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-line.js +8 -2
  808. package/esm/theme/builtin/common/component/mark-line.js.map +1 -0
  809. package/esm/theme/builtin/common/component/mark-point.js.map +1 -0
  810. package/esm/theme/{buildin-theme/light → builtin/common}/component/player.js +4 -1
  811. package/esm/theme/builtin/common/component/player.js.map +1 -0
  812. package/esm/theme/{buildin-theme/light → builtin/common}/component/poptip.js +16 -4
  813. package/esm/theme/builtin/common/component/poptip.js.map +1 -0
  814. package/esm/theme/{buildin-theme/light → builtin/common}/component/title.js +2 -2
  815. package/esm/theme/builtin/common/component/title.js.map +1 -0
  816. package/esm/theme/{buildin-theme/light → builtin/common}/component/tooltip.js +25 -6
  817. package/esm/theme/builtin/common/component/tooltip.js.map +1 -0
  818. package/esm/theme/{buildin-theme/light → builtin/common}/component/total-label.js +4 -1
  819. package/esm/theme/builtin/common/component/total-label.js.map +1 -0
  820. package/esm/theme/{buildin-theme/light → builtin/common}/constants.js +1 -1
  821. package/esm/theme/builtin/common/constants.js.map +1 -0
  822. package/esm/theme/{buildin-theme/light → builtin/common}/mark.js +12 -3
  823. package/esm/theme/builtin/common/mark.js.map +1 -0
  824. package/esm/theme/builtin/common/series/area.js.map +1 -0
  825. package/esm/theme/builtin/common/series/bar.js.map +1 -0
  826. package/esm/theme/builtin/common/series/bar3d.js.map +1 -0
  827. package/esm/theme/builtin/common/series/box-plot.js.map +1 -0
  828. package/esm/theme/{buildin-theme/light → builtin/common}/series/circle-packing.js +8 -2
  829. package/esm/theme/builtin/common/series/circle-packing.js.map +1 -0
  830. package/esm/theme/builtin/common/series/circular-progress.js.map +1 -0
  831. package/esm/theme/builtin/common/series/dot.js.map +1 -0
  832. package/esm/theme/builtin/common/series/funnel.js.map +1 -0
  833. package/esm/theme/builtin/common/series/funnel3d.js.map +1 -0
  834. package/esm/theme/builtin/common/series/gauge-pointer.js.map +1 -0
  835. package/esm/theme/builtin/common/series/gauge.js.map +1 -0
  836. package/esm/theme/builtin/common/series/heatmap.js.map +1 -0
  837. package/esm/theme/builtin/common/series/index.js.map +1 -0
  838. package/esm/theme/builtin/common/series/line.js.map +1 -0
  839. package/esm/theme/builtin/common/series/linear-progress.js.map +1 -0
  840. package/esm/theme/builtin/common/series/link.js.map +1 -0
  841. package/esm/theme/builtin/common/series/map.js.map +1 -0
  842. package/esm/theme/builtin/common/series/pie.js.map +1 -0
  843. package/esm/theme/builtin/common/series/pie3d.js.map +1 -0
  844. package/esm/theme/builtin/common/series/radar.js.map +1 -0
  845. package/esm/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.js +4 -1
  846. package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -0
  847. package/esm/theme/builtin/common/series/rose.js.map +1 -0
  848. package/esm/theme/builtin/common/series/sankey.js.map +1 -0
  849. package/esm/theme/builtin/common/series/scatter.js.map +1 -0
  850. package/esm/theme/{buildin-theme/light → builtin/common}/series/sunburst.js +8 -2
  851. package/esm/theme/builtin/common/series/sunburst.js.map +1 -0
  852. package/esm/theme/builtin/common/series/treemap.js.map +1 -0
  853. package/esm/theme/builtin/common/series/waterfall.js.map +1 -0
  854. package/esm/theme/builtin/common/series/word-cloud.js.map +1 -0
  855. package/esm/theme/builtin/common/series/word-cloud3d.js.map +1 -0
  856. package/esm/theme/{buildin-theme/config.js → builtin/constant.js} +1 -1
  857. package/esm/theme/builtin/constant.js.map +1 -0
  858. package/esm/theme/builtin/dark/color-scheme.d.ts +2 -0
  859. package/esm/theme/builtin/dark/color-scheme.js +27 -0
  860. package/esm/theme/builtin/dark/color-scheme.js.map +1 -0
  861. package/esm/theme/builtin/dark/index.d.ts +2 -0
  862. package/esm/theme/builtin/dark/index.js +7 -0
  863. package/esm/theme/builtin/dark/index.js.map +1 -0
  864. package/{cjs/theme/buildin-theme → esm/theme/builtin}/index.d.ts +2 -2
  865. package/esm/theme/builtin/index.js +12 -0
  866. package/esm/theme/builtin/index.js.map +1 -0
  867. package/esm/theme/builtin/light/color-scheme.d.ts +2 -0
  868. package/esm/theme/builtin/light/color-scheme.js +27 -0
  869. package/esm/theme/builtin/light/color-scheme.js.map +1 -0
  870. package/esm/theme/{buildin-theme → builtin}/light/index.js +8 -4
  871. package/esm/theme/builtin/light/index.js.map +1 -0
  872. package/esm/theme/color-scheme/builtin/default.d.ts +2 -0
  873. package/esm/theme/color-scheme/builtin/default.js +7 -0
  874. package/esm/theme/color-scheme/builtin/default.js.map +1 -0
  875. package/esm/theme/color-scheme/util.d.ts +2 -1
  876. package/esm/theme/color-scheme/util.js +6 -0
  877. package/esm/theme/color-scheme/util.js.map +1 -1
  878. package/esm/theme/index.d.ts +1 -1
  879. package/esm/theme/index.js +1 -1
  880. package/esm/theme/index.js.map +1 -1
  881. package/esm/theme/interface.d.ts +2 -2
  882. package/esm/theme/interface.js.map +1 -1
  883. package/esm/theme/theme-manager.js +6 -6
  884. package/esm/theme/theme-manager.js.map +1 -1
  885. package/esm/typings/spec/common.d.ts +5 -0
  886. package/esm/typings/spec/common.js.map +1 -1
  887. package/esm/util/spec.d.ts +7 -0
  888. package/esm/util/spec.js +52 -4
  889. package/esm/util/spec.js.map +1 -1
  890. package/esm/util/text.d.ts +0 -4
  891. package/esm/util/text.js +2 -8
  892. package/esm/util/text.js.map +1 -1
  893. package/esm/vchart-all.js +2 -2
  894. package/esm/vchart-all.js.map +1 -1
  895. package/package.json +8 -8
  896. package/cjs/theme/buildin-theme/config.js.map +0 -1
  897. package/cjs/theme/buildin-theme/index.js.map +0 -1
  898. package/cjs/theme/buildin-theme/light/color-scheme.js +0 -21
  899. package/cjs/theme/buildin-theme/light/color-scheme.js.map +0 -1
  900. package/cjs/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
  901. package/cjs/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
  902. package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
  903. package/cjs/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
  904. package/cjs/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
  905. package/cjs/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
  906. package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
  907. package/cjs/theme/buildin-theme/light/component/brush.js.map +0 -1
  908. package/cjs/theme/buildin-theme/light/component/crosshair.js.map +0 -1
  909. package/cjs/theme/buildin-theme/light/component/data-zoom.js +0 -105
  910. package/cjs/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
  911. package/cjs/theme/buildin-theme/light/component/index.js.map +0 -1
  912. package/cjs/theme/buildin-theme/light/component/indicator.js.map +0 -1
  913. package/cjs/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
  914. package/cjs/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
  915. package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
  916. package/cjs/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
  917. package/cjs/theme/buildin-theme/light/component/map-label.js.map +0 -1
  918. package/cjs/theme/buildin-theme/light/component/mark-area.js.map +0 -1
  919. package/cjs/theme/buildin-theme/light/component/mark-line.js.map +0 -1
  920. package/cjs/theme/buildin-theme/light/component/mark-point.js.map +0 -1
  921. package/cjs/theme/buildin-theme/light/component/player.js.map +0 -1
  922. package/cjs/theme/buildin-theme/light/component/poptip.js.map +0 -1
  923. package/cjs/theme/buildin-theme/light/component/title.js.map +0 -1
  924. package/cjs/theme/buildin-theme/light/component/tooltip.js.map +0 -1
  925. package/cjs/theme/buildin-theme/light/component/total-label.js.map +0 -1
  926. package/cjs/theme/buildin-theme/light/constants.js.map +0 -1
  927. package/cjs/theme/buildin-theme/light/index.js.map +0 -1
  928. package/cjs/theme/buildin-theme/light/mark.js.map +0 -1
  929. package/cjs/theme/buildin-theme/light/series/area.js.map +0 -1
  930. package/cjs/theme/buildin-theme/light/series/bar.js.map +0 -1
  931. package/cjs/theme/buildin-theme/light/series/bar3d.js.map +0 -1
  932. package/cjs/theme/buildin-theme/light/series/box-plot.js.map +0 -1
  933. package/cjs/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
  934. package/cjs/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
  935. package/cjs/theme/buildin-theme/light/series/dot.js.map +0 -1
  936. package/cjs/theme/buildin-theme/light/series/funnel.js.map +0 -1
  937. package/cjs/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
  938. package/cjs/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
  939. package/cjs/theme/buildin-theme/light/series/gauge.js.map +0 -1
  940. package/cjs/theme/buildin-theme/light/series/heatmap.js.map +0 -1
  941. package/cjs/theme/buildin-theme/light/series/index.js.map +0 -1
  942. package/cjs/theme/buildin-theme/light/series/line.js.map +0 -1
  943. package/cjs/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
  944. package/cjs/theme/buildin-theme/light/series/link.js.map +0 -1
  945. package/cjs/theme/buildin-theme/light/series/map.js.map +0 -1
  946. package/cjs/theme/buildin-theme/light/series/pie.js.map +0 -1
  947. package/cjs/theme/buildin-theme/light/series/pie3d.js.map +0 -1
  948. package/cjs/theme/buildin-theme/light/series/radar.js.map +0 -1
  949. package/cjs/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
  950. package/cjs/theme/buildin-theme/light/series/rose.js.map +0 -1
  951. package/cjs/theme/buildin-theme/light/series/sankey.js.map +0 -1
  952. package/cjs/theme/buildin-theme/light/series/scatter.js.map +0 -1
  953. package/cjs/theme/buildin-theme/light/series/sunburst.js.map +0 -1
  954. package/cjs/theme/buildin-theme/light/series/treemap.js.map +0 -1
  955. package/cjs/theme/buildin-theme/light/series/waterfall.js.map +0 -1
  956. package/cjs/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
  957. package/cjs/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
  958. package/esm/theme/buildin-theme/config.js.map +0 -1
  959. package/esm/theme/buildin-theme/index.js +0 -10
  960. package/esm/theme/buildin-theme/index.js.map +0 -1
  961. package/esm/theme/buildin-theme/light/color-scheme.js +0 -17
  962. package/esm/theme/buildin-theme/light/color-scheme.js.map +0 -1
  963. package/esm/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
  964. package/esm/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
  965. package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
  966. package/esm/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
  967. package/esm/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
  968. package/esm/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
  969. package/esm/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
  970. package/esm/theme/buildin-theme/light/component/brush.js.map +0 -1
  971. package/esm/theme/buildin-theme/light/component/crosshair.js.map +0 -1
  972. package/esm/theme/buildin-theme/light/component/data-zoom.js +0 -101
  973. package/esm/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
  974. package/esm/theme/buildin-theme/light/component/index.js.map +0 -1
  975. package/esm/theme/buildin-theme/light/component/indicator.js.map +0 -1
  976. package/esm/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
  977. package/esm/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
  978. package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
  979. package/esm/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
  980. package/esm/theme/buildin-theme/light/component/map-label.js.map +0 -1
  981. package/esm/theme/buildin-theme/light/component/mark-area.js.map +0 -1
  982. package/esm/theme/buildin-theme/light/component/mark-line.js.map +0 -1
  983. package/esm/theme/buildin-theme/light/component/mark-point.js.map +0 -1
  984. package/esm/theme/buildin-theme/light/component/player.js.map +0 -1
  985. package/esm/theme/buildin-theme/light/component/poptip.js.map +0 -1
  986. package/esm/theme/buildin-theme/light/component/title.js.map +0 -1
  987. package/esm/theme/buildin-theme/light/component/tooltip.js.map +0 -1
  988. package/esm/theme/buildin-theme/light/component/total-label.js.map +0 -1
  989. package/esm/theme/buildin-theme/light/constants.js.map +0 -1
  990. package/esm/theme/buildin-theme/light/index.js.map +0 -1
  991. package/esm/theme/buildin-theme/light/mark.js.map +0 -1
  992. package/esm/theme/buildin-theme/light/series/area.js.map +0 -1
  993. package/esm/theme/buildin-theme/light/series/bar.js.map +0 -1
  994. package/esm/theme/buildin-theme/light/series/bar3d.js.map +0 -1
  995. package/esm/theme/buildin-theme/light/series/box-plot.js.map +0 -1
  996. package/esm/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
  997. package/esm/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
  998. package/esm/theme/buildin-theme/light/series/dot.js.map +0 -1
  999. package/esm/theme/buildin-theme/light/series/funnel.js.map +0 -1
  1000. package/esm/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
  1001. package/esm/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
  1002. package/esm/theme/buildin-theme/light/series/gauge.js.map +0 -1
  1003. package/esm/theme/buildin-theme/light/series/heatmap.js.map +0 -1
  1004. package/esm/theme/buildin-theme/light/series/index.js.map +0 -1
  1005. package/esm/theme/buildin-theme/light/series/line.js.map +0 -1
  1006. package/esm/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
  1007. package/esm/theme/buildin-theme/light/series/link.js.map +0 -1
  1008. package/esm/theme/buildin-theme/light/series/map.js.map +0 -1
  1009. package/esm/theme/buildin-theme/light/series/pie.js.map +0 -1
  1010. package/esm/theme/buildin-theme/light/series/pie3d.js.map +0 -1
  1011. package/esm/theme/buildin-theme/light/series/radar.js.map +0 -1
  1012. package/esm/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
  1013. package/esm/theme/buildin-theme/light/series/rose.js.map +0 -1
  1014. package/esm/theme/buildin-theme/light/series/sankey.js.map +0 -1
  1015. package/esm/theme/buildin-theme/light/series/scatter.js.map +0 -1
  1016. package/esm/theme/buildin-theme/light/series/sunburst.js.map +0 -1
  1017. package/esm/theme/buildin-theme/light/series/treemap.js.map +0 -1
  1018. package/esm/theme/buildin-theme/light/series/waterfall.js.map +0 -1
  1019. package/esm/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
  1020. package/esm/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
  1021. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
  1022. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
  1023. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.js +0 -0
  1024. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
  1025. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.js +0 -0
  1026. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
  1027. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
  1028. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.d.ts +0 -0
  1029. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.js +0 -0
  1030. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
  1031. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.js +0 -0
  1032. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
  1033. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
  1034. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
  1035. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
  1036. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
  1037. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/index.js +0 -0
  1038. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
  1039. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/indicator.js +0 -0
  1040. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
  1041. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.js +0 -0
  1042. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
  1043. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
  1044. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
  1045. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.js +0 -0
  1046. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
  1047. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/map-label.js +0 -0
  1048. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
  1049. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
  1050. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
  1051. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
  1052. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
  1053. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/poptip.d.ts +0 -0
  1054. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
  1055. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
  1056. /package/cjs/theme/{buildin-theme/light → builtin/common}/component/total-label.d.ts +0 -0
  1057. /package/cjs/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
  1058. /package/cjs/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
  1059. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
  1060. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/area.js +0 -0
  1061. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
  1062. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar.js +0 -0
  1063. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
  1064. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar3d.js +0 -0
  1065. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
  1066. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
  1067. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
  1068. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
  1069. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
  1070. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
  1071. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/dot.js +0 -0
  1072. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
  1073. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel.js +0 -0
  1074. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
  1075. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel3d.js +0 -0
  1076. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
  1077. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
  1078. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
  1079. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
  1080. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
  1081. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
  1082. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
  1083. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
  1084. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
  1085. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/line.js +0 -0
  1086. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
  1087. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
  1088. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
  1089. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
  1090. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
  1091. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/map.js +0 -0
  1092. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
  1093. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie.js +0 -0
  1094. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
  1095. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie3d.js +0 -0
  1096. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
  1097. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/radar.js +0 -0
  1098. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
  1099. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
  1100. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rose.js +0 -0
  1101. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
  1102. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sankey.js +0 -0
  1103. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
  1104. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/scatter.js +0 -0
  1105. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
  1106. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
  1107. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/treemap.js +0 -0
  1108. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
  1109. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/waterfall.js +0 -0
  1110. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
  1111. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
  1112. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
  1113. /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
  1114. /package/cjs/theme/{buildin-theme/config.d.ts → builtin/constant.d.ts} +0 -0
  1115. /package/cjs/theme/{buildin-theme/light → builtin/dark}/color-scheme.d.ts +0 -0
  1116. /package/{esm/theme/buildin-theme → cjs/theme/builtin}/light/color-scheme.d.ts +0 -0
  1117. /package/cjs/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
  1118. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
  1119. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
  1120. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.js +0 -0
  1121. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
  1122. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.js +0 -0
  1123. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
  1124. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
  1125. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.d.ts +0 -0
  1126. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.js +0 -0
  1127. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
  1128. /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.js +0 -0
  1129. /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
  1130. /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
  1131. /package/esm/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
  1132. /package/esm/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
  1133. /package/esm/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
  1134. /package/esm/theme/{buildin-theme/light → builtin/common}/component/index.js +0 -0
  1135. /package/esm/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
  1136. /package/esm/theme/{buildin-theme/light → builtin/common}/component/indicator.js +0 -0
  1137. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
  1138. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.js +0 -0
  1139. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
  1140. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
  1141. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
  1142. /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.js +0 -0
  1143. /package/esm/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
  1144. /package/esm/theme/{buildin-theme/light → builtin/common}/component/map-label.js +0 -0
  1145. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
  1146. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
  1147. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
  1148. /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
  1149. /package/esm/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
  1150. /package/esm/theme/{buildin-theme/light → builtin/common}/component/poptip.d.ts +0 -0
  1151. /package/esm/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
  1152. /package/esm/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
  1153. /package/esm/theme/{buildin-theme/light → builtin/common}/component/total-label.d.ts +0 -0
  1154. /package/esm/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
  1155. /package/esm/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
  1156. /package/esm/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
  1157. /package/esm/theme/{buildin-theme/light → builtin/common}/series/area.js +0 -0
  1158. /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
  1159. /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar.js +0 -0
  1160. /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
  1161. /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar3d.js +0 -0
  1162. /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
  1163. /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
  1164. /package/esm/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
  1165. /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
  1166. /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
  1167. /package/esm/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
  1168. /package/esm/theme/{buildin-theme/light → builtin/common}/series/dot.js +0 -0
  1169. /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
  1170. /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel.js +0 -0
  1171. /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
  1172. /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel3d.js +0 -0
  1173. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
  1174. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
  1175. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
  1176. /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
  1177. /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
  1178. /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
  1179. /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
  1180. /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
  1181. /package/esm/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
  1182. /package/esm/theme/{buildin-theme/light → builtin/common}/series/line.js +0 -0
  1183. /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
  1184. /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
  1185. /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
  1186. /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
  1187. /package/esm/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
  1188. /package/esm/theme/{buildin-theme/light → builtin/common}/series/map.js +0 -0
  1189. /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
  1190. /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie.js +0 -0
  1191. /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
  1192. /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie3d.js +0 -0
  1193. /package/esm/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
  1194. /package/esm/theme/{buildin-theme/light → builtin/common}/series/radar.js +0 -0
  1195. /package/esm/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
  1196. /package/esm/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
  1197. /package/esm/theme/{buildin-theme/light → builtin/common}/series/rose.js +0 -0
  1198. /package/esm/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
  1199. /package/esm/theme/{buildin-theme/light → builtin/common}/series/sankey.js +0 -0
  1200. /package/esm/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
  1201. /package/esm/theme/{buildin-theme/light → builtin/common}/series/scatter.js +0 -0
  1202. /package/esm/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
  1203. /package/esm/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
  1204. /package/esm/theme/{buildin-theme/light → builtin/common}/series/treemap.js +0 -0
  1205. /package/esm/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
  1206. /package/esm/theme/{buildin-theme/light → builtin/common}/series/waterfall.js +0 -0
  1207. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
  1208. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
  1209. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
  1210. /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
  1211. /package/esm/theme/{buildin-theme/config.d.ts → builtin/constant.d.ts} +0 -0
  1212. /package/esm/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
@@ -153,6 +153,11 @@ export interface ISeriesSpec extends ITriggerSpec {
153
153
  extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | IExtensionGroupMarkSpec)[];
154
154
  }
155
155
  export type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph'>;
156
+ export type AdaptiveSpec<T, K extends keyof any> = {
157
+ [key in Exclude<keyof T, K>]: T[key];
158
+ } & {
159
+ [key in K]: any;
160
+ };
156
161
  export type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {
157
162
  id?: StringOrNumber;
158
163
  interactive?: boolean;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typings/spec/common.ts"],"names":[],"mappings":";;;AAyGA,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qDAAqC,CAAA;IACrC,mDAAmC,CAAA;IACnC,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;IACrC,+BAAe,CAAA;AACjB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB","file":"common.js","sourcesContent":["import type { IFillMarkSpec, IImageMarkSpec } from './../visual';\nimport type { ILayoutPaddingSpec } from '../../model/interface';\nimport type { LayoutCallBack } from '../../layout/interface';\nimport type { IElement, srIOption3DType } from '@visactor/vgrammar';\nimport type {\n DataSet,\n DataView,\n ISimplifyOptions,\n IFieldsOptions,\n IFilterOptions,\n IFoldOptions,\n IDsvParserOptions\n} from '@visactor/vdataset';\nimport type { IRegionSpec } from '../../region/interface';\nimport type { IDiscreteLegendSpec } from '../../component/legend/discrete/interface';\nimport type { IHoverSpec, ISelectSpec, ITriggerSpec } from '../../interaction/interface';\nimport type { IRenderOption } from '../../compile/interface';\nimport type { ITooltipSpec } from '../../component/tooltip/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport type { ILayoutSpec } from '../../layout/interface';\nimport type {\n ConvertToMarkStyleSpec,\n IArc3dMarkSpec,\n IArcMarkSpec,\n IAreaMarkSpec,\n IBoxPlotMarkSpec,\n ICommonSpec,\n IGroupMarkSpec,\n ILineMarkSpec,\n ILinkPathMarkSpec,\n IPathMarkSpec,\n IPolygonMarkSpec,\n IProgressArcMarkSpec,\n IPyramid3dMarkSpec,\n IRect3dMarkSpec,\n IRectMarkSpec,\n IRuleMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n IVisualSpecScale\n} from '../visual';\nimport type { StateValue } from '../../compile/mark';\nimport type { ISeriesStyle, SeriesType } from '../../series/interface';\nimport type { ILayoutOrientPadding } from '../../model/interface';\nimport type { Datum, StringOrNumber } from '../common';\nimport type { IInvalidType } from '../data';\nimport type { IMorphSeriesSpec } from '../../animation/spec';\nimport type { IPlayer } from '../../component/player';\nimport type { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';\nimport type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';\nimport type { ICrosshairSpec } from '../../component/crosshair/interface';\nimport type { ITheme } from '../../theme';\nimport type { ITitleSpec } from '../../component/title/interface';\nimport type { IBrushSpec } from '../../component/brush';\nimport type { ITotalLabelSpec } from '../../component/label';\n\nexport type IChartPadding = ILayoutOrientPadding | number;\n\n/** chart option */\nexport interface IInitOption extends Omit<IRenderOption, 'pluginList'> {\n /**\n * **仅生效于浏览器环境。**\n * 图表挂载的父容器,可以直接指定容器 id,也可以传入 dom 对象\n */\n dom?: string | HTMLElement;\n /**\n * 除去选择 dom 属性进行挂载父容器,也可以使用 renderCanvas 属性直接传入 canvas 实例/ canvasId\n * 小程序/小组件环境请直接传入 id\n */\n renderCanvas?: string | HTMLCanvasElement;\n /** 数据集 */\n dataSet?: DataSet;\n /** 是否自适应容器大小 */\n autoFit?: boolean;\n /**\n * 性能测试钩子\n */\n performanceHook?: IPerformanceHook;\n /**\n * 是否开启动画\n */\n animation?: boolean;\n /**\n * 3d配置\n */\n options3d?: srIOption3DType;\n\n /**\n * 自定义布局函数\n */\n layout?: LayoutCallBack;\n\n /**\n * 当文本省略时,鼠标 hover 到文本上时是否显示 poptip\n * @default true\n */\n poptip?: boolean;\n\n /**\n * 报错的回调函数\n * @since 1.2.0\n */\n onError?: (...args: any[]) => void;\n}\n\nexport enum RenderModeEnum {\n 'desktop-browser' = 'desktop-browser',\n 'mobile-browser' = 'mobile-browser',\n 'node' = 'node',\n 'worker' = 'worker',\n 'miniApp' = 'miniApp',\n 'desktop-miniApp' = 'desktop-miniApp',\n 'lynx' = 'lynx'\n}\nexport type RenderMode = keyof typeof RenderModeEnum;\n\n/** chart spec */\nexport interface IChartSpec {\n /** 图表类型 */\n type: string;\n /** 数据 */\n data?: IData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /**\n * 图表宽高是否自适应容器,浏览器环境下默认为 true。\n * 该配置的优先级高于构造函数中的 autoFit 配置。\n * 如果用户配置了 width,则以用户配置的 width 为准,height 同理。\n */\n autoFit?: boolean;\n /**\n * 图表整体 padding 设置\n */\n padding?: ILayoutPaddingSpec;\n /**\n * 图表色系配置\n */\n color?: string[] | Omit<IVisualSpecScale<unknown, string>, 'id'>;\n /**\n * 系列\n * @description 仅在组合图中使用, 文档中除组合图外均未透出该配置\n */\n series?: ISeriesSpec[];\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /** hover 交互 */\n hover?: boolean | IHoverSpec;\n /** select 交互 */\n select?: boolean | ISelectSpec;\n\n /** region配置 */\n region?: IRegionSpec[];\n /** 图表标题配置 */\n title?: ITitleSpec;\n /** 布局配置 */\n layout?: ILayoutSpec;\n /** 图例配置 */\n legends?: IDiscreteLegendSpec | IDiscreteLegendSpec[];\n /** 十字辅助线配置 */\n crosshair?: ICrosshairSpec | ICrosshairSpec[];\n /** tooltip配置 */\n tooltip?: ITooltipSpec;\n /** 播放器配置 */\n player?: IPlayer;\n /** 缩略轴配置 */\n dataZoom?: IDataZoomSpec[];\n /** 滚动条配置 */\n scrollBar?: IScrollBarSpec[];\n /** 框选配置 */\n brush?: IBrushSpec;\n /** 全局 scale 配置 */\n scales?: IVisualSpecScale<unknown, unknown>[];\n /** 自定义mark */\n customMark?: ICustomMarkSpec<EnableMarkType>[];\n /**\n * 图表上的主题定义。\n * 可以直接配置主题名,前提是该主题名已经注册\n */\n theme?: Omit<ITheme, 'name'> | string;\n /**\n * 图表背景色配置,优先级高于构造函数中的 background 配置\n */\n background?: IBackgroundSpec;\n\n // TODO:后续开放,现在仍有问题\n // poptip?: PopTipAttributes;\n // TODO: 补充动画配置\n}\n\nexport type IBackgroundStyleSpec = ConvertToMarkStyleSpec<Omit<IFillMarkSpec, 'width' | 'height' | 'background'>> & {\n image?: IRectMarkSpec['background'];\n cornerRadius?: IRectMarkSpec['cornerRadius'];\n};\n\nexport type IBackgroundSpec = string | IBackgroundStyleSpec;\n\n/** data */\nexport type IDataType = IDataValues | DataView;\nexport type IData = IDataType | IDataType[];\nexport type DataKeyType = string | string[] | ((data: Datum, index: number) => string);\nexport type BuildInTransformOptions =\n | {\n /** 地理数据简化 */\n type: 'simplify';\n options: ISimplifyOptions;\n }\n | {\n /** 数据维度处理,包括排序,逆序,数据筛选能力 */\n type: 'fields';\n options: IFieldsOptions;\n }\n | {\n /** 使用回调的自定义筛选 */\n type: 'filter';\n options: IFilterOptions;\n }\n | {\n /** 数据展开 */\n type: 'fold';\n options: IFoldOptions;\n };\n\nexport interface IFieldsMeta {\n /** TODO: 字段通用format, 暂时先不支持 */\n // format?: (datum: Datum, index: number) => unknown;\n /** 字段别名 */\n alias?: string;\n /** 字段取值范围 */\n domain?: StringOrNumber[];\n /** 是否使用 domain 锁定统计信息。默认为 false */\n lockStatisticsByDomain?: boolean;\n /** 连续型 还是 离散型 */\n type?: 'ordinal' | 'linear';\n /** 排序顺序 不设置的话当前维度不进行排序 */\n sortIndex?: number;\n /** 排序时是否反转 默认为 false */\n sortReverse?: boolean;\n}\n\nexport interface SheetParseOptions {\n type: 'csv' | 'dsv' | 'tsv';\n options?: IDsvParserOptions;\n}\n\nexport interface CommonParseOptions {\n /**\n * 是否需要对数据进行 clone,默认为 true。\n * 如果考虑性能,你可以将其关闭,但是这会带了一些副作用,即我们会对传入的数据进行修改(不会对原有字段及值修改,只会在原有数据基础上添加一些字段)。\n * @default true\n * @since 1.3.0\n */\n clone?: boolean;\n}\n\nexport interface IDataValues {\n /**\n * 数据唯一标识\n */\n id?: StringOrNumber;\n /**\n * 数据\n */\n values: Datum[] | string;\n /**\n * 引用的数据索引\n */\n fromDataIndex?: number;\n /**\n * 引用的数据 id\n */\n fromDataId?: StringOrNumber;\n /**\n * 数据 transform 配置\n */\n transforms?: BuildInTransformOptions[];\n /**\n * 数据字段相关配置\n */\n fields?: Record<\n /** 字段key */\n string,\n IFieldsMeta\n >;\n\n parser?: SheetParseOptions | CommonParseOptions;\n}\n\nexport type IHierarchyNodeData = {\n value?: number;\n children?: IHierarchyNodeData[];\n} & Datum;\n\nexport interface IHierarchyDataValues extends Omit<IDataValues, 'values'> {\n values: IHierarchyNodeData;\n}\n\nexport type IHierarchyData = DataView | IHierarchyDataValues;\n\n/** series */\nexport interface ISeriesSpec extends ITriggerSpec {\n /** 系列类型 */\n type: SeriesType;\n\n /** 系列名称 */\n name?: string;\n\n /** 用户自定义的 series id */\n id?: StringOrNumber;\n /**\n * 系列数据\n * @description 系列可以配置自身的数据,也可以从chart.data中获取数据\n */\n data?: IDataType;\n /**\n * 系列关联的数据索引\n * @default 0\n */\n dataIndex?: number;\n /**\n * 系列关联的数据id\n */\n dataId?: StringOrNumber;\n /**\n * dataKey用于绑定数据与Mark的关系, 该配置在动画中非常重要.\n */\n dataKey?: DataKeyType;\n\n /**\n * 系列关联的region索引\n * @default 0\n */\n regionIndex?: number;\n /** 系列关联的region id */\n regionId?: StringOrNumber;\n /**\n * 分组字段\n */\n seriesField?: string;\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /** 是否对数据进行堆叠处理 */\n stack?: boolean;\n\n /** 堆叠汇总标签\n * @since 1.3.0\n */\n totalLabel?: ITotalLabelSpec;\n\n /** 是否对数据进行百分比处理 */\n percent?: boolean;\n\n /** 是否围绕中心轴偏移轮廓 */\n stackOffsetSilhouette?: boolean;\n\n /**\n * 非合规数据点连接方式\n * @description null,undefined等非法数据点连接方式。\n * @default 'break'\n * 'break'指在该数据点处断开\n * 'link' 指忽略该点保持连续\n * 'zero' 指该点默认数值为0\n * 'ignore' 指不处理\n */\n invalidType?: IInvalidType;\n\n /** 提示信息 */\n tooltip?: ITooltipSpec;\n\n /**\n * 是否开启系列动画\n */\n animation?: boolean;\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /**\n * 是否支持3d视角\n */\n support3d?: boolean;\n /**\n * morph 动画配置\n */\n morph?: IMorphSeriesSpec;\n\n /**\n * 扩展mark\n */\n extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | IExtensionGroupMarkSpec)[];\n\n /**\n * series background\n * 作用是支持系列的图形对系列背景进行 mask,或者切分等效果。不是作为背景图\n * 暂时不开放api,避免出现break change\n */\n // background?: IBackgroundSpec;\n}\n\nexport type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph'>;\n\n/** markSpec */\nexport type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {\n /**\n * 用户id\n */\n id?: StringOrNumber;\n /**\n * 是否响应交互\n */\n interactive?: boolean;\n // /**\n // * 是否会被region区域裁减\n // * @todo 暂未支持\n // */\n // clip?: boolean;\n /**\n * 与其他mark元素的层级\n */\n zIndex?: number;\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: ConvertToMarkStyleSpec<T>;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, IMarkStateSpec<T> | IMarkStateStyleSpec<T>>;\n\n /* 是否是3d视角的mark */\n support3d?: boolean;\n} & IMarkProgressiveConfig;\n\nexport type IMarkStateFilter =\n | {\n /** 维度筛选 */\n fields: { [key in string]: { type: 'ordinal' | 'linear'; domain: StringOrNumber[] } };\n }\n | {\n /** 筛选数据 */\n datums: Datum[];\n /** 筛选数据 */\n datumKeys: string[];\n }\n | {\n /** 筛选 item */\n items: IElement[];\n }\n /** 筛选函数 */\n | ((datum: Datum, options: Record<string, any>) => boolean);\n\nexport interface IMarkStateSpec<T> {\n /** 筛选器 */\n filter?: IMarkStateFilter;\n /** 状态优先级 */\n level?: number | undefined;\n style: ConvertToMarkStyleSpec<T>;\n}\n\nexport type IMarkStateStyleSpec<T> = ConvertToMarkStyleSpec<T>;\n\nexport type IMarkTheme<T> = {\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: T;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, T>;\n /**\n * 可交互的开关\n */\n interactive?: boolean;\n};\n\nexport interface IPerformanceHook {\n // InitRender\n // ├── InitializeChart\n // ├── CompileToVGrammar\n // ├── ParseView\n // | └── ParseExpression\n // ├── (new View)\n // | ├── CreateRuntime\n // | └── (view.initialize)\n // | └── CreateVRenderStage\n // └── SrViewEvaluateAsync / SrViewRunAsync\n // ├── MarkTransform\n // ├── FacetTransform\n // ├── CreateVRenderMark\n // └── VRenderDraw\n\n // 初始化图表配置\n beforeInitializeChart?: () => void;\n afterInitializeChart?: () => void;\n\n // 编译\n beforeCompileToVGrammar?: () => void;\n afterCompileToVGrammar?: () => void;\n // 各个图表模块编译\n beforeRegionCompile?: () => void;\n afterRegionCompile?: () => void;\n beforeSeriesCompile?: () => void;\n afterSeriesCompile?: () => void;\n beforeComponentCompile?: () => void;\n afterComponentCompile?: () => void;\n\n // resize的时候的钩子\n beforeResizeWithUpdate?: () => void;\n afterResizeWithUpdate?: () => void;\n\n // LayoutWithSceneGraph 二次布局\n beforeLayoutWithSceneGraph?: () => void;\n afterLayoutWithSceneGraph?: () => void;\n\n // VGrammar 解析spec\n beforeParseView?: () => void;\n afterParseView?: () => void;\n\n // 初始化runtime\n beforeCreateRuntime?: () => void;\n afterCreateRuntime?: () => void;\n\n // VGrammar EvaluateAsync 时间\n beforeSrViewEvaluateAsync?: () => void;\n afterSrViewEvaluateAsync?: () => void;\n\n // VGrammar RunAsync 时间\n beforeSrViewRunAsync?: () => void;\n afterSrViewRunAsync?: () => void;\n\n // transform测量\n beforeTransform?: (name: string) => void;\n afterTransform?: (name: string) => void;\n\n // Create VRender Stage 时间\n beforeCreateVRenderStage?: () => void;\n afterCreateVRenderStage?: () => void;\n\n // Create VRender Mark 时间\n beforeCreateVRenderMark?: () => void;\n afterCreateVRenderMark?: () => void;\n\n // VRender Draw 时间\n beforeVRenderDraw?: () => void;\n afterVRenderDraw?: () => void;\n}\n\nexport type IBuildinMarkSpec = {\n [MarkTypeEnum.group]: IGroupMarkSpec;\n\n [MarkTypeEnum.symbol]: ISymbolMarkSpec;\n [MarkTypeEnum.rule]: IRuleMarkSpec;\n [MarkTypeEnum.line]: ILineMarkSpec;\n [MarkTypeEnum.text]: ITextMarkSpec;\n [MarkTypeEnum.rect]: IRectMarkSpec;\n [MarkTypeEnum.rect3d]: IRect3dMarkSpec;\n [MarkTypeEnum.image]: IImageMarkSpec;\n [MarkTypeEnum.path]: IPathMarkSpec;\n [MarkTypeEnum.area]: IAreaMarkSpec;\n [MarkTypeEnum.arc]: IArcMarkSpec;\n [MarkTypeEnum.arc3d]: IArc3dMarkSpec;\n [MarkTypeEnum.polygon]: IPolygonMarkSpec;\n [MarkTypeEnum.pyramid3d]: IPyramid3dMarkSpec;\n [MarkTypeEnum.boxPlot]: IBoxPlotMarkSpec;\n [MarkTypeEnum.linkPath]: ILinkPathMarkSpec;\n [MarkTypeEnum.progressArc]: IProgressArcMarkSpec;\n};\nexport type EnableMarkType = keyof IBuildinMarkSpec;\nexport interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {\n type: T;\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\nexport interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n\nexport interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, MarkTypeEnum.group>> extends ICustomMarkSpec<T> {\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\n\nexport interface IExtensionGroupMarkSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n /**\n * 支持子节点\n */\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n"]}
1
+ {"version":3,"sources":["../src/typings/spec/common.ts"],"names":[],"mappings":";;;AAyGA,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qDAAqC,CAAA;IACrC,mDAAmC,CAAA;IACnC,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;IACrC,+BAAe,CAAA;AACjB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB","file":"common.js","sourcesContent":["import type { IFillMarkSpec, IImageMarkSpec } from './../visual';\nimport type { ILayoutPaddingSpec } from '../../model/interface';\nimport type { LayoutCallBack } from '../../layout/interface';\nimport type { IElement, srIOption3DType } from '@visactor/vgrammar';\nimport type {\n DataSet,\n DataView,\n ISimplifyOptions,\n IFieldsOptions,\n IFilterOptions,\n IFoldOptions,\n IDsvParserOptions\n} from '@visactor/vdataset';\nimport type { IRegionSpec } from '../../region/interface';\nimport type { IDiscreteLegendSpec } from '../../component/legend/discrete/interface';\nimport type { IHoverSpec, ISelectSpec, ITriggerSpec } from '../../interaction/interface';\nimport type { IRenderOption } from '../../compile/interface';\nimport type { ITooltipSpec } from '../../component/tooltip/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport type { ILayoutSpec } from '../../layout/interface';\nimport type {\n ConvertToMarkStyleSpec,\n IArc3dMarkSpec,\n IArcMarkSpec,\n IAreaMarkSpec,\n IBoxPlotMarkSpec,\n ICommonSpec,\n IGroupMarkSpec,\n ILineMarkSpec,\n ILinkPathMarkSpec,\n IPathMarkSpec,\n IPolygonMarkSpec,\n IProgressArcMarkSpec,\n IPyramid3dMarkSpec,\n IRect3dMarkSpec,\n IRectMarkSpec,\n IRuleMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n IVisualSpecScale\n} from '../visual';\nimport type { StateValue } from '../../compile/mark';\nimport type { ISeriesStyle, SeriesType } from '../../series/interface';\nimport type { ILayoutOrientPadding } from '../../model/interface';\nimport type { Datum, StringOrNumber } from '../common';\nimport type { IInvalidType } from '../data';\nimport type { IMorphSeriesSpec } from '../../animation/spec';\nimport type { IPlayer } from '../../component/player';\nimport type { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';\nimport type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';\nimport type { ICrosshairSpec } from '../../component/crosshair/interface';\nimport type { ITheme } from '../../theme';\nimport type { ITitleSpec } from '../../component/title/interface';\nimport type { IBrushSpec } from '../../component/brush';\nimport type { ITotalLabelSpec } from '../../component/label';\n\nexport type IChartPadding = ILayoutOrientPadding | number;\n\n/** chart option */\nexport interface IInitOption extends Omit<IRenderOption, 'pluginList'> {\n /**\n * **仅生效于浏览器环境。**\n * 图表挂载的父容器,可以直接指定容器 id,也可以传入 dom 对象\n */\n dom?: string | HTMLElement;\n /**\n * 除去选择 dom 属性进行挂载父容器,也可以使用 renderCanvas 属性直接传入 canvas 实例/ canvasId\n * 小程序/小组件环境请直接传入 id\n */\n renderCanvas?: string | HTMLCanvasElement;\n /** 数据集 */\n dataSet?: DataSet;\n /** 是否自适应容器大小 */\n autoFit?: boolean;\n /**\n * 性能测试钩子\n */\n performanceHook?: IPerformanceHook;\n /**\n * 是否开启动画\n */\n animation?: boolean;\n /**\n * 3d配置\n */\n options3d?: srIOption3DType;\n\n /**\n * 自定义布局函数\n */\n layout?: LayoutCallBack;\n\n /**\n * 当文本省略时,鼠标 hover 到文本上时是否显示 poptip\n * @default true\n */\n poptip?: boolean;\n\n /**\n * 报错的回调函数\n * @since 1.2.0\n */\n onError?: (...args: any[]) => void;\n}\n\nexport enum RenderModeEnum {\n 'desktop-browser' = 'desktop-browser',\n 'mobile-browser' = 'mobile-browser',\n 'node' = 'node',\n 'worker' = 'worker',\n 'miniApp' = 'miniApp',\n 'desktop-miniApp' = 'desktop-miniApp',\n 'lynx' = 'lynx'\n}\nexport type RenderMode = keyof typeof RenderModeEnum;\n\n/** chart spec */\nexport interface IChartSpec {\n /** 图表类型 */\n type: string;\n /** 数据 */\n data?: IData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /**\n * 图表宽高是否自适应容器,浏览器环境下默认为 true。\n * 该配置的优先级高于构造函数中的 autoFit 配置。\n * 如果用户配置了 width,则以用户配置的 width 为准,height 同理。\n */\n autoFit?: boolean;\n /**\n * 图表整体 padding 设置\n */\n padding?: ILayoutPaddingSpec;\n /**\n * 图表色系配置\n */\n color?: string[] | Omit<IVisualSpecScale<unknown, string>, 'id'>;\n /**\n * 系列\n * @description 仅在组合图中使用, 文档中除组合图外均未透出该配置\n */\n series?: ISeriesSpec[];\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /** hover 交互 */\n hover?: boolean | IHoverSpec;\n /** select 交互 */\n select?: boolean | ISelectSpec;\n\n /** region配置 */\n region?: IRegionSpec[];\n /** 图表标题配置 */\n title?: ITitleSpec;\n /** 布局配置 */\n layout?: ILayoutSpec;\n /** 图例配置 */\n legends?: IDiscreteLegendSpec | IDiscreteLegendSpec[];\n /** 十字辅助线配置 */\n crosshair?: ICrosshairSpec | ICrosshairSpec[];\n /** tooltip配置 */\n tooltip?: ITooltipSpec;\n /** 播放器配置 */\n player?: IPlayer;\n /** 缩略轴配置 */\n dataZoom?: IDataZoomSpec[];\n /** 滚动条配置 */\n scrollBar?: IScrollBarSpec[];\n /** 框选配置 */\n brush?: IBrushSpec;\n /** 全局 scale 配置 */\n scales?: IVisualSpecScale<unknown, unknown>[];\n /** 自定义mark */\n customMark?: ICustomMarkSpec<EnableMarkType>[];\n /**\n * 图表上的主题定义。\n * 可以直接配置主题名,前提是该主题名已经注册\n */\n theme?: Omit<ITheme, 'name'> | string;\n /**\n * 图表背景色配置,优先级高于构造函数中的 background 配置\n */\n background?: IBackgroundSpec;\n\n // TODO:后续开放,现在仍有问题\n // poptip?: PopTipAttributes;\n // TODO: 补充动画配置\n}\n\nexport type IBackgroundStyleSpec = ConvertToMarkStyleSpec<Omit<IFillMarkSpec, 'width' | 'height' | 'background'>> & {\n image?: IRectMarkSpec['background'];\n cornerRadius?: IRectMarkSpec['cornerRadius'];\n};\n\nexport type IBackgroundSpec = string | IBackgroundStyleSpec;\n\n/** data */\nexport type IDataType = IDataValues | DataView;\nexport type IData = IDataType | IDataType[];\nexport type DataKeyType = string | string[] | ((data: Datum, index: number) => string);\nexport type BuildInTransformOptions =\n | {\n /** 地理数据简化 */\n type: 'simplify';\n options: ISimplifyOptions;\n }\n | {\n /** 数据维度处理,包括排序,逆序,数据筛选能力 */\n type: 'fields';\n options: IFieldsOptions;\n }\n | {\n /** 使用回调的自定义筛选 */\n type: 'filter';\n options: IFilterOptions;\n }\n | {\n /** 数据展开 */\n type: 'fold';\n options: IFoldOptions;\n };\n\nexport interface IFieldsMeta {\n /** TODO: 字段通用format, 暂时先不支持 */\n // format?: (datum: Datum, index: number) => unknown;\n /** 字段别名 */\n alias?: string;\n /** 字段取值范围 */\n domain?: StringOrNumber[];\n /** 是否使用 domain 锁定统计信息。默认为 false */\n lockStatisticsByDomain?: boolean;\n /** 连续型 还是 离散型 */\n type?: 'ordinal' | 'linear';\n /** 排序顺序 不设置的话当前维度不进行排序 */\n sortIndex?: number;\n /** 排序时是否反转 默认为 false */\n sortReverse?: boolean;\n}\n\nexport interface SheetParseOptions {\n type: 'csv' | 'dsv' | 'tsv';\n options?: IDsvParserOptions;\n}\n\nexport interface CommonParseOptions {\n /**\n * 是否需要对数据进行 clone,默认为 true。\n * 如果考虑性能,你可以将其关闭,但是这会带了一些副作用,即我们会对传入的数据进行修改(不会对原有字段及值修改,只会在原有数据基础上添加一些字段)。\n * @default true\n * @since 1.3.0\n */\n clone?: boolean;\n}\n\nexport interface IDataValues {\n /**\n * 数据唯一标识\n */\n id?: StringOrNumber;\n /**\n * 数据\n */\n values: Datum[] | string;\n /**\n * 引用的数据索引\n */\n fromDataIndex?: number;\n /**\n * 引用的数据 id\n */\n fromDataId?: StringOrNumber;\n /**\n * 数据 transform 配置\n */\n transforms?: BuildInTransformOptions[];\n /**\n * 数据字段相关配置\n */\n fields?: Record<\n /** 字段key */\n string,\n IFieldsMeta\n >;\n\n parser?: SheetParseOptions | CommonParseOptions;\n}\n\nexport type IHierarchyNodeData = {\n value?: number;\n children?: IHierarchyNodeData[];\n} & Datum;\n\nexport interface IHierarchyDataValues extends Omit<IDataValues, 'values'> {\n values: IHierarchyNodeData;\n}\n\nexport type IHierarchyData = DataView | IHierarchyDataValues;\n\n/** series */\nexport interface ISeriesSpec extends ITriggerSpec {\n /** 系列类型 */\n type: SeriesType;\n\n /** 系列名称 */\n name?: string;\n\n /** 用户自定义的 series id */\n id?: StringOrNumber;\n /**\n * 系列数据\n * @description 系列可以配置自身的数据,也可以从chart.data中获取数据\n */\n data?: IDataType;\n /**\n * 系列关联的数据索引\n * @default 0\n */\n dataIndex?: number;\n /**\n * 系列关联的数据id\n */\n dataId?: StringOrNumber;\n /**\n * dataKey用于绑定数据与Mark的关系, 该配置在动画中非常重要.\n */\n dataKey?: DataKeyType;\n\n /**\n * 系列关联的region索引\n * @default 0\n */\n regionIndex?: number;\n /** 系列关联的region id */\n regionId?: StringOrNumber;\n /**\n * 分组字段\n */\n seriesField?: string;\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /** 是否对数据进行堆叠处理 */\n stack?: boolean;\n\n /** 堆叠汇总标签\n * @since 1.3.0\n */\n totalLabel?: ITotalLabelSpec;\n\n /** 是否对数据进行百分比处理 */\n percent?: boolean;\n\n /** 是否围绕中心轴偏移轮廓 */\n stackOffsetSilhouette?: boolean;\n\n /**\n * 非合规数据点连接方式\n * @description null,undefined等非法数据点连接方式。\n * @default 'break'\n * 'break'指在该数据点处断开\n * 'link' 指忽略该点保持连续\n * 'zero' 指该点默认数值为0\n * 'ignore' 指不处理\n */\n invalidType?: IInvalidType;\n\n /** 提示信息 */\n tooltip?: ITooltipSpec;\n\n /**\n * 是否开启系列动画\n */\n animation?: boolean;\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /**\n * 是否支持3d视角\n */\n support3d?: boolean;\n /**\n * morph 动画配置\n */\n morph?: IMorphSeriesSpec;\n\n /**\n * 扩展mark\n */\n extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | IExtensionGroupMarkSpec)[];\n\n /**\n * series background\n * 作用是支持系列的图形对系列背景进行 mask,或者切分等效果。不是作为背景图\n * 暂时不开放api,避免出现break change\n */\n // background?: IBackgroundSpec;\n}\n\nexport type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph'>;\n\nexport type AdaptiveSpec<T, K extends keyof any> = {\n [key in Exclude<keyof T, K>]: T[key];\n} & { [key in K]: any };\n\n/** markSpec */\nexport type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {\n /**\n * 用户id\n */\n id?: StringOrNumber;\n /**\n * 是否响应交互\n */\n interactive?: boolean;\n // /**\n // * 是否会被region区域裁减\n // * @todo 暂未支持\n // */\n // clip?: boolean;\n /**\n * 与其他mark元素的层级\n */\n zIndex?: number;\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: ConvertToMarkStyleSpec<T>;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, IMarkStateSpec<T> | IMarkStateStyleSpec<T>>;\n\n /* 是否是3d视角的mark */\n support3d?: boolean;\n} & IMarkProgressiveConfig;\n\nexport type IMarkStateFilter =\n | {\n /** 维度筛选 */\n fields: { [key in string]: { type: 'ordinal' | 'linear'; domain: StringOrNumber[] } };\n }\n | {\n /** 筛选数据 */\n datums: Datum[];\n /** 筛选数据 */\n datumKeys: string[];\n }\n | {\n /** 筛选 item */\n items: IElement[];\n }\n /** 筛选函数 */\n | ((datum: Datum, options: Record<string, any>) => boolean);\n\nexport interface IMarkStateSpec<T> {\n /** 筛选器 */\n filter?: IMarkStateFilter;\n /** 状态优先级 */\n level?: number | undefined;\n style: ConvertToMarkStyleSpec<T>;\n}\n\nexport type IMarkStateStyleSpec<T> = ConvertToMarkStyleSpec<T>;\n\nexport type IMarkTheme<T> = {\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: T;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, T>;\n /**\n * 可交互的开关\n */\n interactive?: boolean;\n};\n\nexport interface IPerformanceHook {\n // InitRender\n // ├── InitializeChart\n // ├── CompileToVGrammar\n // ├── ParseView\n // | └── ParseExpression\n // ├── (new View)\n // | ├── CreateRuntime\n // | └── (view.initialize)\n // | └── CreateVRenderStage\n // └── SrViewEvaluateAsync / SrViewRunAsync\n // ├── MarkTransform\n // ├── FacetTransform\n // ├── CreateVRenderMark\n // └── VRenderDraw\n\n // 初始化图表配置\n beforeInitializeChart?: () => void;\n afterInitializeChart?: () => void;\n\n // 编译\n beforeCompileToVGrammar?: () => void;\n afterCompileToVGrammar?: () => void;\n // 各个图表模块编译\n beforeRegionCompile?: () => void;\n afterRegionCompile?: () => void;\n beforeSeriesCompile?: () => void;\n afterSeriesCompile?: () => void;\n beforeComponentCompile?: () => void;\n afterComponentCompile?: () => void;\n\n // resize的时候的钩子\n beforeResizeWithUpdate?: () => void;\n afterResizeWithUpdate?: () => void;\n\n // LayoutWithSceneGraph 二次布局\n beforeLayoutWithSceneGraph?: () => void;\n afterLayoutWithSceneGraph?: () => void;\n\n // VGrammar 解析spec\n beforeParseView?: () => void;\n afterParseView?: () => void;\n\n // 初始化runtime\n beforeCreateRuntime?: () => void;\n afterCreateRuntime?: () => void;\n\n // VGrammar EvaluateAsync 时间\n beforeSrViewEvaluateAsync?: () => void;\n afterSrViewEvaluateAsync?: () => void;\n\n // VGrammar RunAsync 时间\n beforeSrViewRunAsync?: () => void;\n afterSrViewRunAsync?: () => void;\n\n // transform测量\n beforeTransform?: (name: string) => void;\n afterTransform?: (name: string) => void;\n\n // Create VRender Stage 时间\n beforeCreateVRenderStage?: () => void;\n afterCreateVRenderStage?: () => void;\n\n // Create VRender Mark 时间\n beforeCreateVRenderMark?: () => void;\n afterCreateVRenderMark?: () => void;\n\n // VRender Draw 时间\n beforeVRenderDraw?: () => void;\n afterVRenderDraw?: () => void;\n}\n\nexport type IBuildinMarkSpec = {\n [MarkTypeEnum.group]: IGroupMarkSpec;\n\n [MarkTypeEnum.symbol]: ISymbolMarkSpec;\n [MarkTypeEnum.rule]: IRuleMarkSpec;\n [MarkTypeEnum.line]: ILineMarkSpec;\n [MarkTypeEnum.text]: ITextMarkSpec;\n [MarkTypeEnum.rect]: IRectMarkSpec;\n [MarkTypeEnum.rect3d]: IRect3dMarkSpec;\n [MarkTypeEnum.image]: IImageMarkSpec;\n [MarkTypeEnum.path]: IPathMarkSpec;\n [MarkTypeEnum.area]: IAreaMarkSpec;\n [MarkTypeEnum.arc]: IArcMarkSpec;\n [MarkTypeEnum.arc3d]: IArc3dMarkSpec;\n [MarkTypeEnum.polygon]: IPolygonMarkSpec;\n [MarkTypeEnum.pyramid3d]: IPyramid3dMarkSpec;\n [MarkTypeEnum.boxPlot]: IBoxPlotMarkSpec;\n [MarkTypeEnum.linkPath]: ILinkPathMarkSpec;\n [MarkTypeEnum.progressArc]: IProgressArcMarkSpec;\n};\nexport type EnableMarkType = keyof IBuildinMarkSpec;\nexport interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {\n type: T;\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\nexport interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n\nexport interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, MarkTypeEnum.group>> extends ICustomMarkSpec<T> {\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\n\nexport interface IExtensionGroupMarkSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n /**\n * 支持子节点\n */\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n"]}
@@ -1,10 +1,17 @@
1
1
  import type { IBackgroundSpec, IBackgroundStyleSpec } from './../typings/spec/common';
2
+ import type { Maybe } from '@visactor/vutils';
2
3
  import { DataView } from '@visactor/vdataset';
4
+ import type { IThemeColorScheme } from '../theme/color-scheme/interface';
5
+ import type { SeriesTypeEnum } from '../series/interface';
6
+ import type { ITheme } from '../theme';
3
7
  export declare function specTransform(spec: unknown, special?: {
4
8
  [key: string]: (v: unknown) => unknown;
5
9
  }): unknown;
6
10
  export declare function cloneDeepSpec(spec: any): any;
7
11
  export declare function isDataView(obj: any): obj is DataView;
12
+ export declare function isHTMLElement(obj: any): obj is Element;
8
13
  export declare function convertBackgroundSpec(bg: IBackgroundSpec): Omit<IBackgroundStyleSpec, 'image'> & {
9
14
  background?: IBackgroundStyleSpec['image'];
10
15
  };
16
+ export declare function preprocessSpecOrTheme(obj: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum): any;
17
+ export declare function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme>;
package/cjs/util/spec.js CHANGED
@@ -12,9 +12,9 @@ var __rest = this && this.__rest || function(s, e) {
12
12
 
13
13
  Object.defineProperty(exports, "__esModule", {
14
14
  value: !0
15
- }), exports.convertBackgroundSpec = exports.isDataView = exports.cloneDeepSpec = exports.specTransform = void 0;
15
+ }), exports.mergeTheme = exports.preprocessSpecOrTheme = exports.convertBackgroundSpec = exports.isHTMLElement = exports.isDataView = exports.cloneDeepSpec = exports.specTransform = void 0;
16
16
 
17
- const vutils_1 = require("@visactor/vutils"), vdataset_1 = require("@visactor/vdataset");
17
+ const vutils_1 = require("@visactor/vutils"), vdataset_1 = require("@visactor/vdataset"), util_1 = require("../theme/color-scheme/util"), interface_1 = require("../series/interface");
18
18
 
19
19
  function specTransform(spec, special = {
20
20
  data: v => v
@@ -38,7 +38,7 @@ function cloneDeepSpec(spec) {
38
38
  const value = spec;
39
39
  let result;
40
40
  if (!(0, vutils_1.isValid)(value) || "object" != typeof value) return value;
41
- if (isDataView(value)) return value;
41
+ if (isDataView(value) || isHTMLElement(value)) return value;
42
42
  const isArr = (0, vutils_1.isArray)(value), length = value.length;
43
43
  result = isArr ? new Array(length) : "object" == typeof value ? {} : (0, vutils_1.isBoolean)(value) || (0,
44
44
  vutils_1.isNumber)(value) || (0, vutils_1.isString)(value) ? value : (0, vutils_1.isDate)(value) ? new Date(+value) : void 0;
@@ -52,8 +52,16 @@ function cloneDeepSpec(spec) {
52
52
  }
53
53
 
54
54
  function isDataView(obj) {
55
- const keys = Object.keys(obj);
56
- return obj instanceof vdataset_1.DataView || [ "dataSet", "latestData", "rawData", "parserData", "isDataView", "history" ].every((key => keys.includes(key)));
55
+ return obj instanceof vdataset_1.DataView;
56
+ }
57
+
58
+ function isHTMLElement(obj) {
59
+ try {
60
+ return obj instanceof Element;
61
+ } catch (_a) {
62
+ const htmlElementKeys = [ "children", "innerHTML", "classList", "setAttribute", "tagName", "getBoundingClientRect" ], keys = Object.keys(obj);
63
+ return htmlElementKeys.every((key => keys.includes(key)));
64
+ }
57
65
  }
58
66
 
59
67
  function convertBackgroundSpec(bg) {
@@ -67,6 +75,47 @@ function convertBackgroundSpec(bg) {
67
75
  return rest.background = image, rest;
68
76
  }
69
77
 
78
+ function preprocessSpecOrTheme(obj, colorScheme, seriesType) {
79
+ if ((0, vutils_1.isArray)(obj)) return obj.map((element => (0, vutils_1.isObject)(element) && !(0,
80
+ vutils_1.isFunction)(element) ? preprocessSpecOrTheme(element, colorScheme, seriesType) : element));
81
+ const newObj = Object.assign({}, obj);
82
+ return Object.keys(newObj).forEach((key => {
83
+ if (key.includes("data")) return;
84
+ const value = obj[key];
85
+ (0, vutils_1.isObject)(value) && (isDataView(value) || isHTMLElement(value)) || (0,
86
+ vutils_1.isObject)(value) && !(0, vutils_1.isFunction)(value) && ((0, util_1.isColorKey)(value) ? newObj[key] = (0,
87
+ util_1.getActualColor)(value, colorScheme, seriesType) : newObj[key] = preprocessSpecOrTheme(value, colorScheme, seriesType));
88
+ })), newObj;
89
+ }
90
+
91
+ function mergeTheme(target, ...sources) {
92
+ return (0, vutils_1.merge)(preprocessThemeToMerge(target), ...sources.map(preprocessThemeToMerge));
93
+ }
94
+
95
+ function preprocessThemeToMerge(theme) {
96
+ if (!theme) return theme;
97
+ let {colorScheme: colorScheme} = theme;
98
+ colorScheme && (colorScheme = Object.keys(colorScheme).reduce(((scheme, key) => {
99
+ const value = colorScheme[key];
100
+ return scheme[key] = (0, util_1.transformColorSchemeToStandardStruct)(value), scheme;
101
+ }), {}));
102
+ let {series: series} = theme;
103
+ const {mark: markByType, markByName: markByName} = theme;
104
+ return (markByType || markByName) && (series = Object.keys(interface_1.seriesMarkInfoMap).reduce(((newSeriesTheme, key) => {
105
+ var _a;
106
+ const value = null !== (_a = null == series ? void 0 : series[key]) && void 0 !== _a ? _a : {}, newValue = {};
107
+ return Object.values(interface_1.seriesMarkInfoMap[key]).forEach((({type: type, name: name}) => {
108
+ var _a, _b;
109
+ newValue[name] = (0, vutils_1.merge)({}, null !== (_a = null == markByType ? void 0 : markByType[(0,
110
+ vutils_1.array)(type)[0]]) && void 0 !== _a ? _a : {}, null !== (_b = null == markByName ? void 0 : markByName[name]) && void 0 !== _b ? _b : {}, value[name]);
111
+ })), newSeriesTheme[key] = Object.assign(Object.assign({}, value), newValue), newSeriesTheme;
112
+ }), {})), Object.assign(Object.assign({}, theme), {
113
+ colorScheme: colorScheme,
114
+ series: series
115
+ });
116
+ }
117
+
70
118
  exports.specTransform = specTransform, exports.cloneDeepSpec = cloneDeepSpec, exports.isDataView = isDataView,
71
- exports.convertBackgroundSpec = convertBackgroundSpec;
119
+ exports.isHTMLElement = isHTMLElement, exports.convertBackgroundSpec = convertBackgroundSpec,
120
+ exports.preprocessSpecOrTheme = preprocessSpecOrTheme, exports.mergeTheme = mergeTheme;
72
121
  //# sourceMappingURL=spec.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,6CAA2F;AAC3F,iDAA8C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rH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,GAAG,YAAY,mBAAQ,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAClF,CAAC;AAJD,gCAIC;AAED,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":"spec.js","sourcesContent":["import type { IBackgroundSpec, IBackgroundStyleSpec } from './../typings/spec/common';\nimport { isArray, isBoolean, isDate, isNumber, isString, isValid } from '@visactor/vutils';\nimport { DataView } from '@visactor/vdataset';\n\n// todo 以目前的场景来看,并没有递归的需要。\n// 考虑到不确定性,还是递归处理spec对象,时间消耗很少\nexport function specTransform(\n spec: unknown,\n special: {\n [key: string]: (v: unknown) => unknown;\n } = {\n data: v => v\n }\n): unknown {\n if (!spec) {\n return spec;\n }\n // 如果是普通对象\n if (spec.constructor === Object) {\n const result: any = {};\n for (const key in spec as any) {\n if (Object.prototype.hasOwnProperty.call(spec, key)) {\n // todo 特殊处理怎样更合理?\n if (special[key]) {\n result[key] = special[key](spec[key]);\n continue;\n }\n result[key] = specTransform(spec[key], special);\n }\n }\n return result;\n }\n // 如果是数组\n if (isArray(spec)) {\n return spec.map(s => specTransform(s, special));\n }\n return spec;\n}\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 // 判断是不是 DataView 对象\n if (isDataView(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\nexport function isDataView(obj: any): obj is DataView {\n const dataViewKeys: (keyof DataView)[] = ['dataSet', 'latestData', 'rawData', 'parserData', 'isDataView', 'history'];\n const keys = Object.keys(obj);\n return obj instanceof DataView || dataViewKeys.every(key => keys.includes(key));\n}\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"]}
1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,IAAI,CAAC,mCAAI,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YACxG,CAAC,CAAC,CAAC;YACH,cAAc,CAAC,GAAG,CAAC,mCACd,KAAK,GACL,QAAQ,CACZ,CAAC;YACF,OAAO,cAAc,CAAC;QACxB,CAAC,EAAE,EAAkB,CAAC,CAAC;KACxB;IAED,uCACK,KAAK,KACR,WAAW;QACX,MAAM,IACN;AACJ,CAAC","file":"spec.js","sourcesContent":["import type { IBackgroundSpec, IBackgroundStyleSpec } from './../typings/spec/common';\nimport type { Maybe } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport {\n array,\n isArray,\n isBoolean,\n isDate,\n isFunction,\n isNumber,\n isObject,\n isString,\n isValid,\n merge\n} from '@visactor/vutils';\nimport { DataView } from '@visactor/vdataset';\nimport { getActualColor, isColorKey, transformColorSchemeToStandardStruct } from '../theme/color-scheme/util';\nimport type { IThemeColorScheme } from '../theme/color-scheme/interface';\nimport type { ISeriesMarkInfo, ISeriesTheme, SeriesTypeEnum } from '../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { seriesMarkInfoMap } from '../series/interface';\nimport type { ITheme } from '../theme';\n\n// todo 以目前的场景来看,并没有递归的需要。\n// 考虑到不确定性,还是递归处理spec对象,时间消耗很少\nexport function specTransform(\n spec: unknown,\n special: {\n [key: string]: (v: unknown) => unknown;\n } = {\n data: v => v\n }\n): unknown {\n if (!spec) {\n return spec;\n }\n // 如果是普通对象\n if (spec.constructor === Object) {\n const result: any = {};\n for (const key in spec as any) {\n if (Object.prototype.hasOwnProperty.call(spec, key)) {\n // todo 特殊处理怎样更合理?\n if (special[key]) {\n result[key] = special[key](spec[key]);\n continue;\n }\n result[key] = specTransform(spec[key], special);\n }\n }\n return result;\n }\n // 如果是数组\n if (isArray(spec)) {\n return spec.map(s => specTransform(s, special));\n }\n return spec;\n}\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\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\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\n/** 对 spec 或者类 spec 配置(如 theme)进行预处理,如进行语义化颜色的转换 */\nexport function preprocessSpecOrTheme(obj: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum): any {\n if (isArray(obj)) {\n return obj.map(element => {\n if (isObject(element) && !isFunction(element)) {\n return preprocessSpecOrTheme(element, colorScheme, seriesType);\n }\n return element;\n });\n }\n\n const newObj = { ...obj };\n Object.keys(newObj).forEach(key => {\n // 绕过数据\n if (key.includes('data')) {\n return;\n }\n const value = obj[key];\n // 绕过不可深拷贝的对象\n if (isObject(value) && (isDataView(value) || isHTMLElement(value))) {\n return;\n }\n if (isObject(value) && !isFunction(value)) {\n // 查询、替换语义化颜色\n if (isColorKey(value)) {\n newObj[key] = getActualColor(value, colorScheme, seriesType);\n } else {\n newObj[key] = preprocessSpecOrTheme(value, colorScheme, seriesType);\n }\n }\n });\n\n return newObj;\n}\n\nexport function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme> {\n return merge(preprocessThemeToMerge(target), ...sources.map(preprocessThemeToMerge));\n}\n\nfunction preprocessThemeToMerge(theme?: Maybe<ITheme>): Maybe<ITheme> {\n if (!theme) {\n return theme;\n }\n\n // 将色板转化为标准形式\n let { colorScheme } = theme;\n if (colorScheme) {\n colorScheme = Object.keys(colorScheme).reduce<IThemeColorScheme>((scheme, key) => {\n const value = colorScheme[key];\n scheme[key] = transformColorSchemeToStandardStruct(value);\n return scheme;\n }, {} as IThemeColorScheme);\n }\n\n // 将全局 mark 主题 merge 进系列主题\n let { series } = theme;\n const { mark: markByType, markByName } = theme;\n if (markByType || markByName) {\n series = Object.keys(seriesMarkInfoMap).reduce((newSeriesTheme, key) => {\n const value = series?.[key] ?? {};\n const newValue = {};\n Object.values<ISeriesMarkInfo>(seriesMarkInfoMap[key]).forEach(({ type, name }) => {\n newValue[name] = merge({}, markByType?.[array(type)[0]] ?? {}, markByName?.[name] ?? {}, value[name]);\n });\n newSeriesTheme[key] = {\n ...value,\n ...newValue\n };\n return newSeriesTheme;\n }, {} as ISeriesTheme);\n }\n\n return {\n ...theme,\n colorScheme,\n series\n };\n}\n"]}
@@ -1,9 +1,5 @@
1
1
  import type { ITextMeasureOption } from '@visactor/vutils';
2
2
  import { TextMeasure, TestTextMeasure } from '@visactor/vutils';
3
- import type { IRichTextAttribute } from '@visactor/vrender';
4
3
  import type { ITextMarkSpec } from '../typings';
5
4
  export declare const initTextMeasure: (textSpec?: Partial<ITextMarkSpec>, option?: Partial<ITextMeasureOption>, useNaiveCanvas?: boolean) => TextMeasure<ITextMarkSpec>;
6
5
  export declare const testTextMeasure: (textSpec?: Partial<ITextMarkSpec>, useVRender?: boolean) => TestTextMeasure<any>;
7
- type IRichTextBoundsParams = Partial<IRichTextAttribute>;
8
- export declare function getRichTextBounds(params: IRichTextBoundsParams): import("@visactor/vutils").IBounds;
9
- export {};
package/cjs/util/text.js CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.getRichTextBounds = exports.testTextMeasure = exports.initTextMeasure = void 0;
5
+ }), exports.testTextMeasure = exports.initTextMeasure = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), vrender_1 = require("@visactor/vrender"), theme_1 = require("../theme"), initTextMeasure = (textSpec, option, useNaiveCanvas) => new vutils_1.TextMeasure(Object.assign({
7
+ const vutils_1 = require("@visactor/vutils"), vrender_1 = require("@visactor/vrender"), constant_1 = require("../theme/builtin/constant"), initTextMeasure = (textSpec, option, useNaiveCanvas) => new vutils_1.TextMeasure(Object.assign({
8
8
  defaultFontParams: {
9
- fontFamily: theme_1.DEFAULT_TEXT_FONT_FAMILY,
10
- fontSize: theme_1.DEFAULT_TEXT_FONT_SIZE
9
+ fontFamily: constant_1.DEFAULT_TEXT_FONT_FAMILY,
10
+ fontSize: constant_1.DEFAULT_TEXT_FONT_SIZE
11
11
  },
12
12
  getTextBounds: useNaiveCanvas ? void 0 : vrender_1.getTextBounds,
13
13
  specialCharSet: "-/: .,@%'\"~" + vutils_1.TextMeasure.ALPHABET_CHAR_SET + vutils_1.TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
@@ -17,19 +17,11 @@ exports.initTextMeasure = initTextMeasure;
17
17
 
18
18
  const testTextMeasure = (textSpec, useVRender) => new vutils_1.TestTextMeasure({
19
19
  defaultFontParams: {
20
- fontFamily: theme_1.DEFAULT_TEXT_FONT_FAMILY,
21
- fontSize: theme_1.DEFAULT_TEXT_FONT_SIZE
20
+ fontFamily: constant_1.DEFAULT_TEXT_FONT_FAMILY,
21
+ fontSize: constant_1.DEFAULT_TEXT_FONT_SIZE
22
22
  },
23
23
  getTextBounds: useVRender ? vrender_1.getTextBounds : void 0
24
24
  }, textSpec);
25
25
 
26
26
  exports.testTextMeasure = testTextMeasure;
27
-
28
- const richText = (0, vrender_1.createRichText)({});
29
-
30
- function getRichTextBounds(params) {
31
- return richText.setAttributes(params), richText.AABBBounds;
32
- }
33
-
34
- exports.getRichTextBounds = getRichTextBounds;
35
27
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":";;;AAEA,6CAAgE;AAGhE,+CAAkE;AAElE,oCAA4E;AAErE,MAAM,eAAe,GAAG,CAC7B,QAAiC,EACjC,MAAoC,EACpC,cAAwB,EACI,EAAE;IAC9B,OAAO,IAAI,oBAAW,iBAElB,iBAAiB,EAAE;YACjB,UAAU,EAAE,gCAAwB;YACpC,QAAQ,EAAE,8BAAsB;SACjC,EACD,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAa,EACzD,cAAc,EAAE,cAAc,GAAG,oBAAW,CAAC,iBAAiB,GAAG,oBAAW,CAAC,iBAAiB,CAAC,WAAW,EAAE,IACzG,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,GAEnB,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,eAAe,mBAiB1B;AAGK,MAAM,eAAe,GAAG,CAAC,QAAiC,EAAE,UAAoB,EAAwB,EAAE;IAC/G,OAAO,IAAI,wBAAe,CACxB;QACE,iBAAiB,EAAE;YACjB,UAAU,EAAE,gCAAwB;YACpC,QAAQ,EAAE,8BAAsB;SACjC;QACD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,uBAAa,CAAC,CAAC,CAAC,SAAS;KACtD,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,eAAe,mBAW1B;AAKF,MAAM,QAAQ,GAAG,IAAA,wBAAc,EAAC,EAAE,CAAC,CAAC;AACpC,SAAgB,iBAAiB,CAAC,MAA6B;IAC7D,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,QAAQ,CAAC,UAAU,CAAC;AAC7B,CAAC;AAHD,8CAGC","file":"text.js","sourcesContent":["import type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure, TestTextMeasure } from '@visactor/vutils';\nimport type { IRichTextAttribute } from '@visactor/vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport { createRichText, getTextBounds } from '@visactor/vrender';\nimport type { ITextMarkSpec } from '../typings';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../theme';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextMarkSpec>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<ITextMarkSpec> => {\n return new TextMeasure<ITextMarkSpec>(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n textSpec\n );\n};\n\n/** 测试方法 */\nexport const testTextMeasure = (textSpec?: Partial<ITextMarkSpec>, useVRender?: boolean): TestTextMeasure<any> => {\n return new TestTextMeasure(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useVRender ? getTextBounds : undefined\n },\n textSpec\n );\n};\n\n/** 测量富文本 */\n// FIXME: 等 vrender 支持后删掉\ntype IRichTextBoundsParams = Partial<IRichTextAttribute>;\nconst richText = createRichText({});\nexport function getRichTextBounds(params: IRichTextBoundsParams) {\n richText.setAttributes(params);\n return richText.AABBBounds;\n}\n"]}
1
+ {"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":";;;AAEA,6CAAgE;AAChE,+CAAkD;AAElD,wDAA6F;AAEtF,MAAM,eAAe,GAAG,CAC7B,QAAiC,EACjC,MAAoC,EACpC,cAAwB,EACI,EAAE;IAC9B,OAAO,IAAI,oBAAW,iBAElB,iBAAiB,EAAE;YACjB,UAAU,EAAE,mCAAwB;YACpC,QAAQ,EAAE,iCAAsB;SACjC,EACD,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAa,EACzD,cAAc,EAAE,cAAc,GAAG,oBAAW,CAAC,iBAAiB,GAAG,oBAAW,CAAC,iBAAiB,CAAC,WAAW,EAAE,IACzG,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,GAEnB,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,eAAe,mBAiB1B;AAGK,MAAM,eAAe,GAAG,CAAC,QAAiC,EAAE,UAAoB,EAAwB,EAAE;IAC/G,OAAO,IAAI,wBAAe,CACxB;QACE,iBAAiB,EAAE;YACjB,UAAU,EAAE,mCAAwB;YACpC,QAAQ,EAAE,iCAAsB;SACjC;QACD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,uBAAa,CAAC,CAAC,CAAC,SAAS;KACtD,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,eAAe,mBAW1B","file":"text.js","sourcesContent":["import type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure, TestTextMeasure } from '@visactor/vutils';\nimport { getTextBounds } from '@visactor/vrender';\nimport type { ITextMarkSpec } from '../typings';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../theme/builtin/constant';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextMarkSpec>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<ITextMarkSpec> => {\n return new TextMeasure<ITextMarkSpec>(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n textSpec\n );\n};\n\n/** 测试方法 */\nexport const testTextMeasure = (textSpec?: Partial<ITextMarkSpec>, useVRender?: boolean): TestTextMeasure<any> => {\n return new TestTextMeasure(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useVRender ? getTextBounds : undefined\n },\n textSpec\n );\n};\n"]}
package/cjs/vchart-all.js CHANGED
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "VChart", {
15
15
 
16
16
  const chart_1 = require("./chart"), component_1 = require("./component"), layout_1 = require("./layout"), vrender_components_1 = require("@visactor/vrender-components");
17
17
 
18
- (0, vrender_components_1.loadPoptip)({}), core_1.VChart.useChart([ chart_1.AreaChart, chart_1.LineChart, chart_1.BarChart, chart_1.Bar3dChart, chart_1.ScatterChart, chart_1.MapChart, chart_1.PieChart, chart_1.Pie3dChart, chart_1.RoseChart, chart_1.RadarChart, chart_1.CommonChart, chart_1.SequenceChart, chart_1.HistogramChart, chart_1.Histogram3dChart, chart_1.CircularProgressChart, chart_1.WordCloudChart, chart_1.WordCloud3dChart, chart_1.FunnelChart, chart_1.Funnel3dChart, chart_1.LinearProgressChart, chart_1.RangeColumnChart, chart_1.RangeColumn3dChart, chart_1.SunburstChart, chart_1.CirclePackingChart, chart_1.TreeMapChart, chart_1.WaterfallChart, chart_1.BoxPlotChart, chart_1.SankeyChart, chart_1.GaugeChart, chart_1.RangeAreaChart, chart_1.HeatmapChart ]),
18
+ (0, vrender_components_1.loadPoptip)({}), core_1.VChart.useChart([ chart_1.AreaChart, chart_1.LineChart, chart_1.BarChart, chart_1.Bar3dChart, chart_1.ScatterChart, chart_1.MapChart, chart_1.PieChart, chart_1.Pie3dChart, chart_1.RoseChart, chart_1.RadarChart, chart_1.CommonChart, chart_1.SequenceChart, chart_1.HistogramChart, chart_1.Histogram3dChart, chart_1.CircularProgressChart, chart_1.WordCloudChart, chart_1.WordCloud3dChart, chart_1.FunnelChart, chart_1.Funnel3dChart, chart_1.LinearProgressChart, chart_1.RangeColumnChart, chart_1.RangeColumn3dChart, chart_1.SunburstChart, chart_1.CirclePackingChart, chart_1.TreemapChart, chart_1.WaterfallChart, chart_1.BoxPlotChart, chart_1.SankeyChart, chart_1.GaugeChart, chart_1.RangeAreaChart, chart_1.HeatmapChart ]),
19
19
  core_1.VChart.useComponent([ component_1.CartesianLinearAxis, component_1.CartesianBandAxis, component_1.CartesianTimeAxis, component_1.CartesianLogAxis, component_1.PolarBandAxis, component_1.PolarLinearAxis, component_1.DiscreteLegend, component_1.ContinuousLegend, component_1.Tooltip, component_1.CartesianCrossHair, component_1.PolarCrossHair, component_1.DataZoom, component_1.ScrollBar, component_1.Indicator, component_1.GeoCoordinate, component_1.MarkLine, component_1.Title, component_1.MarkArea, component_1.Player, component_1.TotalLabel, component_1.Label, component_1.MarkPoint, component_1.Brush, component_1.CustomMark, component_1.MapLabelComponent ]),
20
20
  core_1.Factory.registerLayout("grid", layout_1.GridLayout), core_1.Factory.registerLayout("layout3d", layout_1.Layout3d);
21
21
  //# sourceMappingURL=vchart-all.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAwIhC,uFAxIA,aAAM,OAwIA;AAvIf,mCAgCiB;AAEjB,2CA0BqB;AACrB,qCAAgD;AAChD,qEAA0D;AAG1D,IAAA,+BAAU,EAAC,EAAE,CAAC,CAAC;AAGf,aAAM,CAAC,QAAQ,CAAC;IACd,iBAAS;IACT,iBAAS;IACT,gBAAQ;IACR,kBAAU;IACV,oBAAY;IACZ,gBAAQ;IACR,gBAAQ;IACR,kBAAU;IACV,iBAAS;IACT,kBAAU;IACV,mBAAW;IACX,qBAAa;IACb,sBAAc;IACd,wBAAgB;IAChB,6BAAqB;IACrB,sBAAc;IACd,wBAAgB;IAChB,mBAAW;IACX,qBAAa;IACb,2BAAmB;IACnB,wBAAgB;IAChB,0BAAkB;IAClB,qBAAa;IACb,0BAAkB;IAClB,oBAAY;IACZ,sBAAc;IACd,oBAAY;IACZ,mBAAW;IACX,kBAAU;IACV,sBAAc;IACd,oBAAY;CACb,CAAC,CAAC;AAGH,aAAM,CAAC,YAAY,CAAC;IAClB,+BAAmB;IACnB,6BAAiB;IACjB,6BAAiB;IACjB,4BAAgB;IAChB,yBAAa;IACb,2BAAe;IACf,0BAAc;IACd,4BAAgB;IAChB,mBAAO;IACP,8BAAkB;IAClB,0BAAc;IACd,oBAAQ;IACR,qBAAS;IACT,qBAAS;IACT,yBAAa;IACb,oBAAQ;IACR,iBAAK;IACL,oBAAQ;IACR,kBAAM;IACN,sBAAU;IACV,iBAAK;IACL,qBAAS;IACT,iBAAK;IACL,sBAAU;IACV,6BAAiB;CAClB,CAAC,CAAC;AAGH,cAAO,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAiB,CAAC,CAAC;AAClD,cAAO,CAAC,cAAc,CAAC,UAAU,EAAE,iBAAe,CAAC,CAAC","file":"vchart-all.js","sourcesContent":["import { VChart, Factory } from './core';\nimport {\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreeMapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n} from './chart';\n\nimport {\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n PolarBandAxis,\n CartesianLogAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent,\n TotalLabel\n} from './component';\nimport { GridLayout, Layout3d } from './layout';\nimport { loadPoptip } from '@visactor/vrender-components';\n\n// 装载 poptip\nloadPoptip({});\n\n// charts\nVChart.useChart([\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreeMapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n]);\n\n// components\nVChart.useComponent([\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n CartesianLogAxis,\n PolarBandAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n TotalLabel,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n]);\n\n// layout\nFactory.registerLayout('grid', GridLayout as any);\nFactory.registerLayout('layout3d', Layout3d as any);\n\nexport { VChart };\n"]}
1
+ {"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAwIhC,uFAxIA,aAAM,OAwIA;AAvIf,mCAgCiB;AAEjB,2CA0BqB;AACrB,qCAAgD;AAChD,qEAA0D;AAG1D,IAAA,+BAAU,EAAC,EAAE,CAAC,CAAC;AAGf,aAAM,CAAC,QAAQ,CAAC;IACd,iBAAS;IACT,iBAAS;IACT,gBAAQ;IACR,kBAAU;IACV,oBAAY;IACZ,gBAAQ;IACR,gBAAQ;IACR,kBAAU;IACV,iBAAS;IACT,kBAAU;IACV,mBAAW;IACX,qBAAa;IACb,sBAAc;IACd,wBAAgB;IAChB,6BAAqB;IACrB,sBAAc;IACd,wBAAgB;IAChB,mBAAW;IACX,qBAAa;IACb,2BAAmB;IACnB,wBAAgB;IAChB,0BAAkB;IAClB,qBAAa;IACb,0BAAkB;IAClB,oBAAY;IACZ,sBAAc;IACd,oBAAY;IACZ,mBAAW;IACX,kBAAU;IACV,sBAAc;IACd,oBAAY;CACb,CAAC,CAAC;AAGH,aAAM,CAAC,YAAY,CAAC;IAClB,+BAAmB;IACnB,6BAAiB;IACjB,6BAAiB;IACjB,4BAAgB;IAChB,yBAAa;IACb,2BAAe;IACf,0BAAc;IACd,4BAAgB;IAChB,mBAAO;IACP,8BAAkB;IAClB,0BAAc;IACd,oBAAQ;IACR,qBAAS;IACT,qBAAS;IACT,yBAAa;IACb,oBAAQ;IACR,iBAAK;IACL,oBAAQ;IACR,kBAAM;IACN,sBAAU;IACV,iBAAK;IACL,qBAAS;IACT,iBAAK;IACL,sBAAU;IACV,6BAAiB;CAClB,CAAC,CAAC;AAGH,cAAO,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAiB,CAAC,CAAC;AAClD,cAAO,CAAC,cAAc,CAAC,UAAU,EAAE,iBAAe,CAAC,CAAC","file":"vchart-all.js","sourcesContent":["import { VChart, Factory } from './core';\nimport {\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreemapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n} from './chart';\n\nimport {\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n PolarBandAxis,\n CartesianLogAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent,\n TotalLabel\n} from './component';\nimport { GridLayout, Layout3d } from './layout';\nimport { loadPoptip } from '@visactor/vrender-components';\n\n// 装载 poptip\nloadPoptip({});\n\n// charts\nVChart.useChart([\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreemapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n]);\n\n// components\nVChart.useComponent([\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n CartesianLogAxis,\n PolarBandAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n TotalLabel,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n]);\n\n// layout\nFactory.registerLayout('grid', GridLayout as any);\nFactory.registerLayout('layout3d', Layout3d as any);\n\nexport { VChart };\n"]}
@@ -43,7 +43,7 @@ import { SequenceChart } from './sequence';
43
43
  import type { ISunburstChartSpec } from './sunburst';
44
44
  import { SunburstChart } from './sunburst';
45
45
  import type { ITreemapChartSpec } from './treemap';
46
- import { TreeMapChart } from './treemap';
46
+ import { TreemapChart } from './treemap';
47
47
  import type { IWaterfallChartSpec } from './waterfall';
48
48
  import { WaterfallChart } from './waterfall';
49
49
  import type { IWordCloudChartSpec, IWordCloud3dChartSpec } from './word-cloud';
@@ -53,5 +53,5 @@ import type { ICartesianChartSpec } from './cartesian';
53
53
  import { CartesianChart } from './cartesian';
54
54
  import type { IPolarChartSpec } from './polar';
55
55
  import { PolarChart, RoseLikeChart, ProgressLikeChart } from './polar';
56
- export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart, TreeMapChart, BaseChart, PolarChart, ProgressLikeChart, RoseLikeChart, CartesianChart };
56
+ export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart, TreemapChart as TreemapChart, BaseChart, PolarChart, ProgressLikeChart, RoseLikeChart, CartesianChart };
57
57
  export type { IAreaChartSpec, IBarChartSpec, IBar3dChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IFunnel3dChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, IHistogram3dChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, IPie3dChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeColumn3dChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, IWordCloud3dChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec };
@@ -42,7 +42,7 @@ import { SequenceChart } from "./sequence";
42
42
 
43
43
  import { SunburstChart } from "./sunburst";
44
44
 
45
- import { TreeMapChart } from "./treemap";
45
+ import { TreemapChart } from "./treemap";
46
46
 
47
47
  import { WaterfallChart } from "./waterfall";
48
48
 
@@ -54,5 +54,5 @@ import { CartesianChart } from "./cartesian";
54
54
 
55
55
  import { PolarChart, RoseLikeChart, ProgressLikeChart } from "./polar";
56
56
 
57
- export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart, TreeMapChart, BaseChart, PolarChart, ProgressLikeChart, RoseLikeChart, CartesianChart };
57
+ export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart, TreemapChart, BaseChart, PolarChart, ProgressLikeChart, RoseLikeChart, CartesianChart };
58
58
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chart/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAA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AAQ,EACR,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,cAAc,EACf,CAAC","file":"index.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\n/**\n * @description export all chart modules\n */\nimport type { IAreaChartSpec } from './area';\nimport { AreaChart } from './area';\nimport type { IBarChartSpec, IBar3dChartSpec } from './bar';\nimport { BarChart, Bar3dChart } from './bar';\nimport type { IBoxPlotChartSpec } from './box-plot';\nimport { BoxPlotChart } from './box-plot';\nimport type { ICirclePackingChartSpec } from './circle-packing';\nimport { CirclePackingChart } from './circle-packing';\nimport type { ICommonChartSpec } from './common';\nimport { CommonChart } from './common';\nimport type { IFunnelChartSpec, IFunnel3dChartSpec } from './funnel';\nimport { FunnelChart, Funnel3dChart } from './funnel';\nimport type { IGaugeChartSpec } from './gauge';\nimport { GaugeChart } from './gauge';\nimport type { IHeatmapChartSpec } from './heatmap';\nimport { HeatmapChart } from './heatmap';\nimport type { IHistogramChartSpec, IHistogram3dChartSpec } from './histogram';\nimport { HistogramChart, Histogram3dChart } from './histogram';\nimport type { ILineChartSpec } from './line';\nimport { LineChart } from './line';\nimport type { IMapChartSpec } from './map';\nimport { MapChart } from './map';\nimport type { IPieChartSpec, IPie3dChartSpec } from './pie';\nimport { PieChart, Pie3dChart } from './pie';\nimport type { ICircularProgressChartSpec } from './progress/circular';\nimport { CircularProgressChart } from './progress/circular';\nimport type { ILinearProgressChartSpec } from './progress/linear';\nimport { LinearProgressChart } from './progress/linear';\nimport type { IRadarChartSpec } from './radar';\nimport { RadarChart } from './radar';\nimport type { IRangeAreaChartSpec } from './range-area';\nimport { RangeAreaChart } from './range-area';\nimport type { IRangeColumnChartSpec, IRangeColumn3dChartSpec } from './range-column';\nimport { RangeColumnChart, RangeColumn3dChart } from './range-column';\nimport type { IRoseChartSpec } from './rose';\nimport { RoseChart } from './rose';\nimport type { ISankeyChartSpec } from './sankey';\nimport { SankeyChart } from './sankey';\nimport type { IScatterChartSpec } from './scatter';\nimport { ScatterChart } from './scatter';\nimport type { ISequenceChartSpec } from './sequence';\nimport { SequenceChart } from './sequence';\nimport type { ISunburstChartSpec } from './sunburst';\nimport { SunburstChart } from './sunburst';\nimport type { ITreemapChartSpec } from './treemap';\nimport { TreeMapChart } from './treemap';\nimport type { IWaterfallChartSpec } from './waterfall';\nimport { WaterfallChart } from './waterfall';\nimport type { IWordCloudChartSpec, IWordCloud3dChartSpec } from './word-cloud';\nimport { WordCloudChart, WordCloud3dChart } from './word-cloud';\nimport { BaseChart } from './base-chart';\nimport type { ICartesianChartSpec } from './cartesian';\nimport { CartesianChart } from './cartesian';\nimport type { IPolarChartSpec } from './polar';\nimport { PolarChart, RoseLikeChart, ProgressLikeChart } from './polar';\n\nexport {\n AreaChart,\n BarChart,\n Bar3dChart,\n BoxPlotChart,\n CirclePackingChart,\n CommonChart,\n FunnelChart,\n Funnel3dChart,\n GaugeChart,\n HeatmapChart,\n HistogramChart,\n Histogram3dChart,\n LineChart,\n MapChart,\n PieChart,\n Pie3dChart,\n CircularProgressChart,\n LinearProgressChart,\n RadarChart,\n RangeColumnChart,\n RangeColumn3dChart,\n RangeAreaChart,\n RoseChart,\n SankeyChart,\n ScatterChart,\n SunburstChart,\n SequenceChart,\n WaterfallChart,\n WordCloudChart,\n WordCloud3dChart,\n TreeMapChart,\n BaseChart,\n PolarChart,\n ProgressLikeChart,\n RoseLikeChart,\n CartesianChart\n};\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBar3dChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IFunnel3dChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n IHistogram3dChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n IPie3dChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeColumn3dChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n IWordCloud3dChartSpec,\n IWordCloudChartSpec,\n IPolarChartSpec,\n ICartesianChartSpec\n};\n"]}
1
+ {"version":3,"sources":["../src/chart/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM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art modules\n */\nimport type { IAreaChartSpec } from './area';\nimport { AreaChart } from './area';\nimport type { IBarChartSpec, IBar3dChartSpec } from './bar';\nimport { BarChart, Bar3dChart } from './bar';\nimport type { IBoxPlotChartSpec } from './box-plot';\nimport { BoxPlotChart } from './box-plot';\nimport type { ICirclePackingChartSpec } from './circle-packing';\nimport { CirclePackingChart } from './circle-packing';\nimport type { ICommonChartSpec } from './common';\nimport { CommonChart } from './common';\nimport type { IFunnelChartSpec, IFunnel3dChartSpec } from './funnel';\nimport { FunnelChart, Funnel3dChart } from './funnel';\nimport type { IGaugeChartSpec } from './gauge';\nimport { GaugeChart } from './gauge';\nimport type { IHeatmapChartSpec } from './heatmap';\nimport { HeatmapChart } from './heatmap';\nimport type { IHistogramChartSpec, IHistogram3dChartSpec } from './histogram';\nimport { HistogramChart, Histogram3dChart } from './histogram';\nimport type { ILineChartSpec } from './line';\nimport { LineChart } from './line';\nimport type { IMapChartSpec } from './map';\nimport { MapChart } from './map';\nimport type { IPieChartSpec, IPie3dChartSpec } from './pie';\nimport { PieChart, Pie3dChart } from './pie';\nimport type { ICircularProgressChartSpec } from './progress/circular';\nimport { CircularProgressChart } from './progress/circular';\nimport type { ILinearProgressChartSpec } from './progress/linear';\nimport { LinearProgressChart } from './progress/linear';\nimport type { IRadarChartSpec } from './radar';\nimport { RadarChart } from './radar';\nimport type { IRangeAreaChartSpec } from './range-area';\nimport { RangeAreaChart } from './range-area';\nimport type { IRangeColumnChartSpec, IRangeColumn3dChartSpec } from './range-column';\nimport { RangeColumnChart, RangeColumn3dChart } from './range-column';\nimport type { IRoseChartSpec } from './rose';\nimport { RoseChart } from './rose';\nimport type { ISankeyChartSpec } from './sankey';\nimport { SankeyChart } from './sankey';\nimport type { IScatterChartSpec } from './scatter';\nimport { ScatterChart } from './scatter';\nimport type { ISequenceChartSpec } from './sequence';\nimport { SequenceChart } from './sequence';\nimport type { ISunburstChartSpec } from './sunburst';\nimport { SunburstChart } from './sunburst';\nimport type { ITreemapChartSpec } from './treemap';\nimport { TreemapChart } from './treemap';\nimport type { IWaterfallChartSpec } from './waterfall';\nimport { WaterfallChart } from './waterfall';\nimport type { IWordCloudChartSpec, IWordCloud3dChartSpec } from './word-cloud';\nimport { WordCloudChart, WordCloud3dChart } from './word-cloud';\nimport { BaseChart } from './base-chart';\nimport type { ICartesianChartSpec } from './cartesian';\nimport { CartesianChart } from './cartesian';\nimport type { IPolarChartSpec } from './polar';\nimport { PolarChart, RoseLikeChart, ProgressLikeChart } from './polar';\n\nexport {\n AreaChart,\n BarChart,\n Bar3dChart,\n BoxPlotChart,\n CirclePackingChart,\n CommonChart,\n FunnelChart,\n Funnel3dChart,\n GaugeChart,\n HeatmapChart,\n HistogramChart,\n Histogram3dChart,\n LineChart,\n MapChart,\n PieChart,\n Pie3dChart,\n CircularProgressChart,\n LinearProgressChart,\n RadarChart,\n RangeColumnChart,\n RangeColumn3dChart,\n RangeAreaChart,\n RoseChart,\n SankeyChart,\n ScatterChart,\n SunburstChart,\n SequenceChart,\n WaterfallChart,\n WordCloudChart,\n WordCloud3dChart,\n TreemapChart as TreemapChart,\n BaseChart,\n PolarChart,\n ProgressLikeChart,\n RoseLikeChart,\n CartesianChart\n};\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBar3dChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IFunnel3dChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n IHistogram3dChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n IPie3dChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeColumn3dChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n IWordCloud3d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T,\n ChartEvent,\n STACK_FIELD_END_OffsetSilhouette,\n STACK_FIELD_START_OffsetSilhouette,\n STACK_FIELD_TOTAL,\n STACK_FIELD_TOTAL_PERCENT,\n STACK_FIELD_TOTAL_TOP\n} from '../constant/index';\nimport type { ISeriesStackDataMeta } from '../series/interface';\nimport type { IRegion } from '../region/interface';\nimport type { IChart } from './interface';\nimport { STACK_FIELD_START } from '../constant';\nimport { max, maxInArr, sum, toValidNumber } from '../util';\nimport type { EventCallback } from '../event/interface';\n\n// stack\n// 1. 不可以多个region之间的series进行堆积,目前看这种需求没有场景。将堆积改为针对 region\n// 2. 堆积是一个数据层面的逻辑,但是会影响系列当前使用的yField到底是什么。\n// 3. ECharts 线系列参与堆积后,线系列的y不变,但是与它一起堆积的柱图,数据变化了了,是堆积后的值\n// 4. x 方向分组的功能,是属于轴的,与堆积和怎么堆积无关。\n// 现有功能,有支持堆积时的方向可以调整。也就是sort\nexport class Stack {\n protected _chart: IChart;\n\n constructor(chart: IChart) {\n this._chart = chart;\n }\n\n init() {\n this._chart.getAllRegions().forEach(r => {\n r.event.on(\n ChartEvent.regionSeriesDataFilterOver,\n { filter: ({ model }) => model?.id === r.id },\n this.stackRegion as EventCallback<unknown>\n );\n });\n }\n\n stackAll() {\n this._chart.getAllRegions().forEach(r => {\n this.stackRegion({ model: r });\n });\n }\n\n stackRegion = ({ model }: { model: IRegion }) => {\n const stackCache: IStackCacheRoot = {\n nodes: {}\n };\n // 分组\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackGroup(stackData, stackCache as unknown as IStackCacheNode, stackValueField);\n }\n });\n\n // 计算堆积\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n\n // 围绕中心轴偏移轮廓\n for (const key in stackCache.nodes) {\n this.stackOffsetSilhouette(stackCache.nodes[key]);\n }\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackTotal(stackCache as IStackCacheNode, stackValueField);\n }\n });\n };\n\n private stackTotal(stackData: IStackCacheNode, valueField: string) {\n if ('values' in stackData && stackData.values.length) {\n const total = sum(stackData.values, valueField);\n const percent = max(stackData.values, STACK_FIELD_END_PERCENT);\n stackData.values.forEach(v => {\n v[STACK_FIELD_TOTAL] = total;\n v[STACK_FIELD_TOTAL_PERCENT] = percent;\n delete v[STACK_FIELD_TOTAL_TOP];\n });\n const maxNode = stackData.values.reduce((max, current) => {\n return current[STACK_FIELD_END] > max[STACK_FIELD_END] ? current : max;\n });\n maxNode[STACK_FIELD_TOTAL_TOP] = true;\n return;\n }\n for (const key in stackData.nodes) {\n this.stackTotal(stackData.nodes[key], valueField);\n }\n }\n\n private stackOffsetSilhouette(stackCache: IStackCacheNode) {\n if (!stackCache.values.length) {\n return;\n }\n const centerValue = stackCache.values[stackCache.values.length - 1][STACK_FIELD_END] / 2;\n for (let j = 0; j < stackCache.values.length; j++) {\n stackCache.values[j][STACK_FIELD_START_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_START] - centerValue;\n stackCache.values[j][STACK_FIELD_END_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_END] - centerValue;\n }\n }\n\n private stack(stackCache: IStackCacheNode) {\n if (stackCache.values.length > 0) {\n // 设置一个小数以保证 log 计算不会报错\n let positiveStart = 0;\n let negativeStart = 0;\n // temp\n let sign = 1;\n let value = 0;\n\n // stack\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n if (value >= 0) {\n v[STACK_FIELD_START] = positiveStart;\n positiveStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = positiveStart;\n } else {\n v[STACK_FIELD_START] = negativeStart;\n negativeStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = negativeStart;\n }\n });\n // normalize\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n const denominator = value >= 0 ? positiveStart : negativeStart;\n sign = value >= 0 ? 1 : -1;\n v[STACK_FIELD_START_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_START] / denominator) * sign;\n v[STACK_FIELD_END_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_END] / denominator) * sign;\n });\n }\n\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n }\n\n private stackGroup(stackData: ISeriesStackDataMeta, stackCache: IStackCacheNode, valueField: string) {\n if ('values' in stackData) {\n // 初值\n stackData.values.forEach(v => (v[STACK_FIELD_END] = toValidNumber(v[valueField])));\n stackCache.values.push(...stackData.values);\n return;\n }\n for (const key in stackData.nodes) {\n !stackCache.nodes[key] &&\n (stackCache.nodes[key] = {\n values: [],\n nodes: {}\n });\n this.stackGroup(stackData.nodes[key], stackCache.nodes[key], valueField);\n }\n }\n}\n\ninterface IStackCacheNode {\n values: any[];\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\ninterface IStackCacheRoot {\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\n"]}
1
+ {"version":3,"sources":["../src/chart/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AASlD,MAAM,OAAO,KAAK;IAGhB,YAAY,KAAa;QAoBzB,gBAAW,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE;YAC9C,MAAM,UAAU,GAAoB;gBAClC,KAAK,EAAE,EAAE;aACV,CAAC;YAEF,KAAK,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAC5B,MAAM,SAAS,GAA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,CAAC,CAAC;YACnF,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;YAC5C,OAAO;SACR;QACD,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE;YACjC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;gBACpB,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG;oBACvB,MAAM,EAAE,EAAE;oBACV,KAAK,EAAE,EAAE;iBACV,CAAC,CAAC;YACL,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;SAC1E;IACH,CAAC;CACF","file":"stack.js","sourcesContent":["import {\n STACK_FIELD_END,\n STACK_FIELD_START_PERCENT,\n STACK_FIELD_END_PERCENT,\n ChartEvent,\n STACK_FIELD_END_OffsetSilhouette,\n STACK_FIELD_START_OffsetSilhouette,\n STACK_FIELD_TOTAL,\n STACK_FIELD_TOTAL_PERCENT,\n STACK_FIELD_TOTAL_TOP\n} from '../constant/index';\nimport type { ISeriesStackDataMeta } from '../series/interface';\nimport type { IRegion } from '../region/interface';\nimport type { IChart } from './interface';\nimport { STACK_FIELD_START } from '../constant';\nimport { max, sum, toValidNumber } from '../util';\nimport type { EventCallback } from '../event/interface';\n\n// stack\n// 1. 不可以多个region之间的series进行堆积,目前看这种需求没有场景。将堆积改为针对 region\n// 2. 堆积是一个数据层面的逻辑,但是会影响系列当前使用的yField到底是什么。\n// 3. ECharts 线系列参与堆积后,线系列的y不变,但是与它一起堆积的柱图,数据变化了了,是堆积后的值\n// 4. x 方向分组的功能,是属于轴的,与堆积和怎么堆积无关。\n// 现有功能,有支持堆积时的方向可以调整。也就是sort\nexport class Stack {\n protected _chart: IChart;\n\n constructor(chart: IChart) {\n this._chart = chart;\n }\n\n init() {\n this._chart.getAllRegions().forEach(r => {\n r.event.on(\n ChartEvent.regionSeriesDataFilterOver,\n { filter: ({ model }) => model?.id === r.id },\n this.stackRegion as EventCallback<unknown>\n );\n });\n }\n\n stackAll() {\n this._chart.getAllRegions().forEach(r => {\n this.stackRegion({ model: r });\n });\n }\n\n stackRegion = ({ model }: { model: IRegion }) => {\n const stackCache: IStackCacheRoot = {\n nodes: {}\n };\n // 分组\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackGroup(stackData, stackCache as unknown as IStackCacheNode, stackValueField);\n }\n });\n\n // 计算堆积\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n\n // 围绕中心轴偏移轮廓\n for (const key in stackCache.nodes) {\n this.stackOffsetSilhouette(stackCache.nodes[key]);\n }\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackTotal(stackCache as IStackCacheNode, stackValueField);\n }\n });\n };\n\n private stackTotal(stackData: IStackCacheNode, valueField: string) {\n if ('values' in stackData && stackData.values.length) {\n const total = sum(stackData.values, valueField);\n const percent = max(stackData.values, STACK_FIELD_END_PERCENT);\n stackData.values.forEach(v => {\n v[STACK_FIELD_TOTAL] = total;\n v[STACK_FIELD_TOTAL_PERCENT] = percent;\n delete v[STACK_FIELD_TOTAL_TOP];\n });\n const maxNode = stackData.values.reduce((max, current) => {\n return current[STACK_FIELD_END] > max[STACK_FIELD_END] ? current : max;\n });\n maxNode[STACK_FIELD_TOTAL_TOP] = true;\n return;\n }\n for (const key in stackData.nodes) {\n this.stackTotal(stackData.nodes[key], valueField);\n }\n }\n\n private stackOffsetSilhouette(stackCache: IStackCacheNode) {\n if (!stackCache.values.length) {\n return;\n }\n const centerValue = stackCache.values[stackCache.values.length - 1][STACK_FIELD_END] / 2;\n for (let j = 0; j < stackCache.values.length; j++) {\n stackCache.values[j][STACK_FIELD_START_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_START] - centerValue;\n stackCache.values[j][STACK_FIELD_END_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_END] - centerValue;\n }\n }\n\n private stack(stackCache: IStackCacheNode) {\n if (stackCache.values.length > 0) {\n // 设置一个小数以保证 log 计算不会报错\n let positiveStart = 0;\n let negativeStart = 0;\n // temp\n let sign = 1;\n let value = 0;\n\n // stack\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n if (value >= 0) {\n v[STACK_FIELD_START] = positiveStart;\n positiveStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = positiveStart;\n } else {\n v[STACK_FIELD_START] = negativeStart;\n negativeStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = negativeStart;\n }\n });\n // normalize\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n const denominator = value >= 0 ? positiveStart : negativeStart;\n sign = value >= 0 ? 1 : -1;\n v[STACK_FIELD_START_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_START] / denominator) * sign;\n v[STACK_FIELD_END_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_END] / denominator) * sign;\n });\n }\n\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n }\n\n private stackGroup(stackData: ISeriesStackDataMeta, stackCache: IStackCacheNode, valueField: string) {\n if ('values' in stackData) {\n // 初值\n stackData.values.forEach(v => (v[STACK_FIELD_END] = toValidNumber(v[valueField])));\n stackCache.values.push(...stackData.values);\n return;\n }\n for (const key in stackData.nodes) {\n !stackCache.nodes[key] &&\n (stackCache.nodes[key] = {\n values: [],\n nodes: {}\n });\n this.stackGroup(stackData.nodes[key], stackCache.nodes[key], valueField);\n }\n }\n}\n\ninterface IStackCacheNode {\n values: any[];\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\ninterface IStackCacheRoot {\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { BaseChart } from '../base-chart';
2
2
  import type { ITreemapChartSpec } from './interface';
3
- export declare class TreeMapChart extends BaseChart {
3
+ export declare class TreemapChart extends BaseChart {
4
4
  static readonly type: string;
5
5
  static readonly view: string;
6
6
  readonly type: string;
@@ -6,11 +6,11 @@ import { ChartTypeEnum } from "../interface";
6
6
 
7
7
  import { VChart } from "../../core/vchart";
8
8
 
9
- import { TreeMapSeries } from "../../series";
9
+ import { TreemapSeries } from "../../series";
10
10
 
11
- VChart.useSeries([ TreeMapSeries ]);
11
+ VChart.useSeries([ TreemapSeries ]);
12
12
 
13
- export class TreeMapChart extends BaseChart {
13
+ export class TreemapChart extends BaseChart {
14
14
  constructor() {
15
15
  super(...arguments), this.type = ChartTypeEnum.treemap, this.seriesType = SeriesTypeEnum.treemap;
16
16
  }
@@ -48,5 +48,5 @@ export class TreeMapChart extends BaseChart {
48
48
  }
49
49
  }
50
50
 
51
- TreeMapChart.type = ChartTypeEnum.treemap, TreeMapChart.view = "singleDefault";
51
+ TreemapChart.type = ChartTypeEnum.treemap, TreemapChart.view = "singleDefault";
52
52
  //# sourceMappingURL=treemap.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chart/treemap/treemap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,MAAM,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAElC,MAAM,OAAO,YAAa,SAAQ,SAAS;IAA3C;;QAGW,SAAI,GAAW,aAAa,CAAC,OAAO,CAAC;QACrC,eAAU,GAAW,cAAc,CAAC,OAAO,CAAC;IAwDvD,CAAC;IAtDW,oBA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AAC;SACnC;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAU,EAAE,EAAE;gBACjC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;oBAC/B,OAAO;iBACR;gBACD,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;oBACzC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;wBACb,CAAC,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;qBAC7B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;;AA1De,iBAAI,GAAW,aAAa,CAAC,OAAO,CAAC;AACrC,iBAAI,GAAW,eAAe,CAAC","file":"treemap.js","sourcesContent":["import type { ISeries } from '../../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { BaseChart } from '../base-chart';\nimport { ChartTypeEnum } from '../interface';\nimport type { ITreemapChartSpec } from './interface';\nimport { VChart } from '../../core/vchart';\nimport { TreeMapSeries } from '../../series';\nVChart.useSeries([TreeMapSeries]);\n\nexport class TreeMapChart extends BaseChart {\n static readonly type: string = ChartTypeEnum.treemap;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.treemap;\n readonly seriesType: string = SeriesTypeEnum.treemap;\n\n protected getDefaultSeriesSpec(spec: ITreemapChartSpec): any {\n const series: any = {\n ...super._getDefaultSeriesSpec(spec),\n categoryField: spec.categoryField,\n valueField: spec.valueField,\n\n seriesField: spec.seriesField,\n\n aspectRatio: spec.aspectRatio,\n splitType: spec.splitType,\n maxDepth: spec.maxDepth,\n gapWidth: spec.gapWidth,\n nodePadding: spec.nodePadding,\n minVisibleArea: spec.minVisibleArea,\n minChildrenVisibleArea: spec.minChildrenVisibleArea,\n minChildrenVisibleSize: spec.minChildrenVisibleSize,\n\n roam: spec.roam,\n drill: spec.drill,\n drillField: spec.drillField,\n\n leaf: spec.leaf,\n nonLeaf: spec.nonLeaf,\n nonLeafLabel: spec.nonLeafLabel\n };\n const seriesType = this.seriesType;\n if (seriesType) {\n series.type = seriesType;\n series[seriesType] = spec[seriesType];\n }\n\n return series;\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n\n /* 处理 series 配置 */\n const defaultSeriesSpec = this.getDefaultSeriesSpec(spec);\n if (!spec.series || spec.series.length === 0) {\n spec.series = [defaultSeriesSpec];\n } else {\n spec.series.forEach((s: ISeries) => {\n if (!this.isValidSeries(s.type)) {\n return;\n }\n Object.keys(defaultSeriesSpec).forEach(k => {\n if (!(k in s)) {\n s[k] = defaultSeriesSpec[k];\n }\n });\n });\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/chart/treemap/treemap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,MAAM,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAElC,MAAM,OAAO,YAAa,SAAQ,SAAS;IAA3C;;QAGW,SAAI,GAAW,aAAa,CAAC,OAAO,CAAC;QACrC,eAAU,GAAW,cAAc,CAAC,OAAO,CAAC;IAwDvD,CAAC;IAtDW,oBAAoB,CAAC,IAAuB;QACpD,MAAM,MAAM,mCACP,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAE3B,WAAW,EAAE,IAAI,CAAC,WAAW,EAE7B,WAAW,EAA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BAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;oBACzC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;wBACb,CAAC,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;qBAC7B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;;AA1De,iBAAI,GAAW,aAAa,CAAC,OAAO,CAAC;AACrC,iBAAI,GAAW,eAAe,CAAC","file":"treemap.js","sourcesContent":["import type { ISeries } from '../../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { BaseChart } from '../base-chart';\nimport { ChartTypeEnum } from '../interface';\nimport type { ITreemapChartSpec } from './interface';\nimport { VChart } from '../../core/vchart';\nimport { TreemapSeries } from '../../series';\nVChart.useSeries([TreemapSeries]);\n\nexport class TreemapChart extends BaseChart {\n static readonly type: string = ChartTypeEnum.treemap;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.treemap;\n readonly seriesType: string = SeriesTypeEnum.treemap;\n\n protected getDefaultSeriesSpec(spec: ITreemapChartSpec): any {\n const series: any = {\n ...super._getDefaultSeriesSpec(spec),\n categoryField: spec.categoryField,\n valueField: spec.valueField,\n\n seriesField: spec.seriesField,\n\n aspectRatio: spec.aspectRatio,\n splitType: spec.splitType,\n maxDepth: spec.maxDepth,\n gapWidth: spec.gapWidth,\n nodePadding: spec.nodePadding,\n minVisibleArea: spec.minVisibleArea,\n minChildrenVisibleArea: spec.minChildrenVisibleArea,\n minChildrenVisibleSize: spec.minChildrenVisibleSize,\n\n roam: spec.roam,\n drill: spec.drill,\n drillField: spec.drillField,\n\n leaf: spec.leaf,\n nonLeaf: spec.nonLeaf,\n nonLeafLabel: spec.nonLeafLabel\n };\n const seriesType = this.seriesType;\n if (seriesType) {\n series.type = seriesType;\n series[seriesType] = spec[seriesType];\n }\n\n return series;\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n\n /* 处理 series 配置 */\n const defaultSeriesSpec = this.getDefaultSeriesSpec(spec);\n if (!spec.series || spec.series.length === 0) {\n spec.series = [defaultSeriesSpec];\n } else {\n spec.series.forEach((s: ISeries) => {\n if (!this.isValidSeries(s.type)) {\n return;\n }\n Object.keys(defaultSeriesSpec).forEach(k => {\n if (!(k in s)) {\n s[k] = defaultSeriesSpec[k];\n }\n });\n });\n }\n }\n}\n"]}
@@ -14,7 +14,7 @@ import { isNil, isValid } from "../../util";
14
14
 
15
15
  import { LayoutZIndex, PREFIX, VGRAMMAR_HOOK_EVENT } from "../../constant";
16
16
 
17
- import { attrTransform, isStateAttrChangeable } from "./util";
17
+ import { attrTransform, isStateAttrChangeable, needAttrTransform } from "./util";
18
18
 
19
19
  import { MarkStateManager } from "./mark-state-manager";
20
20
 
@@ -178,11 +178,11 @@ export class CompilableMark extends GrammarItem {
178
178
  compileEncode() {
179
179
  const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b], temp = __rest(_a, [ "symbol" == typeof _b ? _b : _b + "" ]), enterStyles = {}, updateStyles = {};
180
180
  Object.keys(normalStyle).forEach((key => {
181
- this._unCompileChannel[key] || (isStateAttrChangeable(key, normalStyle) ? updateStyles[key] = {
181
+ this._unCompileChannel[key] || (isStateAttrChangeable(key, normalStyle, this.getFacet()) ? updateStyles[key] = {
182
182
  callback: this.compileCommonAttributeCallback(key, "normal"),
183
183
  dependency: [ this.stateKeyToSignalName("markUpdateRank") ]
184
184
  } : enterStyles[key] = this.compileCommonAttributeCallback(key, "normal"));
185
- })), this._product.encode(updateStyles), this._product.encodeState("enter", enterStyles),
185
+ })), this._product.encode(updateStyles), this._product.encodeState(this._facet ? "group" : "enter", enterStyles),
186
186
  Object.keys(temp).forEach((state => {
187
187
  const styles = {};
188
188
  Object.keys(temp[state]).forEach((key => {
@@ -239,15 +239,13 @@ export class CompilableMark extends GrammarItem {
239
239
  this.state.compile();
240
240
  }
241
241
  compileCommonAttributeCallback(key, state) {
242
- return (datum, element) => {
243
- const mark = element.mark, opt = {
244
- mark: mark,
245
- parent: mark.group,
246
- states: element.getStates(),
247
- element: element
248
- };
249
- return attrTransform(this.type, key, this.getAttribute(key, datum, state, opt));
242
+ const noAttrTransform = !needAttrTransform(this.type, key), opt = {
243
+ mark: null,
244
+ parent: null,
245
+ element: null
250
246
  };
247
+ return (datum, element) => (opt.mark = element.mark, opt.parent = element.mark.group,
248
+ opt.element = element, noAttrTransform ? this.getAttribute(key, datum, state, opt) : attrTransform(this.type, key, this.getAttribute(key, datum, state, opt)));
251
249
  }
252
250
  compileTransform() {
253
251
  var _a;