@visactor/vchart 1.0.1-alpha.1 → 1.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (870) hide show
  1. package/build/index.js +65046 -64871
  2. package/build/index.min.js +2 -2
  3. package/chart.d.ts +1 -1
  4. package/chart.js +1 -1
  5. package/cjs/chart/area/area.d.ts +1 -0
  6. package/cjs/chart/area/area.js +6 -1
  7. package/cjs/chart/area/area.js.map +1 -1
  8. package/cjs/chart/bar/bar-3d.d.ts +7 -0
  9. package/cjs/chart/bar/bar-3d.js +19 -0
  10. package/cjs/chart/bar/bar-3d.js.map +1 -0
  11. package/cjs/chart/bar/bar.d.ts +1 -6
  12. package/cjs/chart/bar/bar.js +7 -11
  13. package/cjs/chart/bar/bar.js.map +1 -1
  14. package/cjs/chart/bar/index.d.ts +1 -0
  15. package/cjs/chart/bar/index.js +2 -1
  16. package/cjs/chart/bar/index.js.map +1 -1
  17. package/cjs/chart/base-chart.d.ts +1 -1
  18. package/cjs/chart/base-chart.js +2 -1
  19. package/cjs/chart/base-chart.js.map +1 -1
  20. package/cjs/chart/box-plot/box-plot.js +4 -2
  21. package/cjs/chart/box-plot/box-plot.js.map +1 -1
  22. package/cjs/chart/circle-packing/circle-packing.js +3 -1
  23. package/cjs/chart/circle-packing/circle-packing.js.map +1 -1
  24. package/cjs/chart/funnel/base.d.ts +9 -0
  25. package/cjs/chart/funnel/base.js +47 -0
  26. package/cjs/chart/funnel/base.js.map +1 -0
  27. package/cjs/chart/funnel/funnel-3d.d.ts +7 -0
  28. package/cjs/chart/funnel/funnel-3d.js +19 -0
  29. package/cjs/chart/funnel/funnel-3d.js.map +1 -0
  30. package/cjs/chart/funnel/funnel.d.ts +1 -16
  31. package/cjs/chart/funnel/funnel.js +4 -48
  32. package/cjs/chart/funnel/funnel.js.map +1 -1
  33. package/cjs/chart/funnel/index.d.ts +1 -0
  34. package/cjs/chart/funnel/index.js +2 -1
  35. package/cjs/chart/funnel/index.js.map +1 -1
  36. package/cjs/chart/gauge/gauge.js +3 -1
  37. package/cjs/chart/gauge/gauge.js.map +1 -1
  38. package/cjs/chart/heatmap/heatmap.js +3 -1
  39. package/cjs/chart/heatmap/heatmap.js.map +1 -1
  40. package/cjs/chart/histogram/base.d.ts +5 -0
  41. package/cjs/chart/histogram/base.js +22 -0
  42. package/cjs/chart/histogram/base.js.map +1 -0
  43. package/cjs/chart/histogram/histogram-3d.d.ts +7 -0
  44. package/cjs/chart/histogram/histogram-3d.js +19 -0
  45. package/cjs/chart/histogram/histogram-3d.js.map +1 -0
  46. package/cjs/chart/histogram/histogram.d.ts +2 -12
  47. package/cjs/chart/histogram/histogram.js +7 -23
  48. package/cjs/chart/histogram/histogram.js.map +1 -1
  49. package/cjs/chart/histogram/index.d.ts +1 -0
  50. package/cjs/chart/histogram/index.js +2 -1
  51. package/cjs/chart/histogram/index.js.map +1 -1
  52. package/cjs/chart/index.d.ts +57 -22
  53. package/cjs/chart/index.js +293 -26
  54. package/cjs/chart/index.js.map +1 -1
  55. package/cjs/chart/line/line.d.ts +1 -0
  56. package/cjs/chart/line/line.js +6 -1
  57. package/cjs/chart/line/line.js.map +1 -1
  58. package/cjs/chart/map/map.js +3 -1
  59. package/cjs/chart/map/map.js.map +1 -1
  60. package/cjs/chart/pie/base.d.ts +5 -0
  61. package/cjs/chart/pie/base.js +26 -0
  62. package/cjs/chart/pie/base.js.map +1 -0
  63. package/cjs/chart/pie/index.d.ts +1 -0
  64. package/cjs/chart/pie/index.js +2 -1
  65. package/cjs/chart/pie/index.js.map +1 -1
  66. package/cjs/chart/pie/pie-3d.d.ts +8 -0
  67. package/cjs/chart/pie/pie-3d.js +24 -0
  68. package/cjs/chart/pie/pie-3d.js.map +1 -0
  69. package/cjs/chart/pie/pie.d.ts +1 -13
  70. package/cjs/chart/pie/pie.js +4 -32
  71. package/cjs/chart/pie/pie.js.map +1 -1
  72. package/cjs/chart/progress/circular/circular.js +3 -1
  73. package/cjs/chart/progress/circular/circular.js.map +1 -1
  74. package/cjs/chart/progress/linear/linear.js +3 -1
  75. package/cjs/chart/progress/linear/linear.js.map +1 -1
  76. package/cjs/chart/radar/radar.js +3 -1
  77. package/cjs/chart/radar/radar.js.map +1 -1
  78. package/cjs/chart/range-area/range-area.d.ts +1 -0
  79. package/cjs/chart/range-area/range-area.js +6 -1
  80. package/cjs/chart/range-area/range-area.js.map +1 -1
  81. package/cjs/chart/range-column/index.d.ts +2 -1
  82. package/cjs/chart/range-column/index.js +2 -1
  83. package/cjs/chart/range-column/index.js.map +1 -1
  84. package/cjs/chart/range-column/{rangeColumn.d.ts → range-column-3d.d.ts} +0 -7
  85. package/cjs/chart/range-column/{rangeColumn.js → range-column-3d.js} +4 -17
  86. package/cjs/chart/range-column/range-column-3d.js.map +1 -0
  87. package/cjs/chart/range-column/range-column.d.ts +9 -0
  88. package/cjs/chart/range-column/range-column.js +28 -0
  89. package/cjs/chart/range-column/range-column.js.map +1 -0
  90. package/cjs/chart/rose/rose.js +3 -1
  91. package/cjs/chart/rose/rose.js.map +1 -1
  92. package/cjs/chart/sankey/sankey.js +3 -1
  93. package/cjs/chart/sankey/sankey.js.map +1 -1
  94. package/cjs/chart/scatter/scatter.js +3 -1
  95. package/cjs/chart/scatter/scatter.js.map +1 -1
  96. package/cjs/chart/sequence/sequence.js +3 -1
  97. package/cjs/chart/sequence/sequence.js.map +1 -1
  98. package/cjs/chart/sunburst/sunburst.js +3 -1
  99. package/cjs/chart/sunburst/sunburst.js.map +1 -1
  100. package/cjs/chart/treemap/treemap.js +3 -1
  101. package/cjs/chart/treemap/treemap.js.map +1 -1
  102. package/cjs/chart/util.d.ts +2 -0
  103. package/cjs/chart/util.js +23 -0
  104. package/cjs/chart/util.js.map +1 -0
  105. package/cjs/chart/waterfall/waterfall.js +4 -2
  106. package/cjs/chart/waterfall/waterfall.js.map +1 -1
  107. package/cjs/chart/word-cloud/base.d.ts +6 -0
  108. package/cjs/chart/word-cloud/base.js +25 -0
  109. package/cjs/chart/word-cloud/base.js.map +1 -0
  110. package/cjs/chart/word-cloud/index.d.ts +1 -0
  111. package/cjs/chart/word-cloud/index.js +2 -1
  112. package/cjs/chart/word-cloud/index.js.map +1 -1
  113. package/cjs/chart/word-cloud/word-cloud-3d.d.ts +9 -0
  114. package/cjs/chart/word-cloud/word-cloud-3d.js +46 -0
  115. package/cjs/chart/word-cloud/word-cloud-3d.js.map +1 -0
  116. package/cjs/chart/word-cloud/word-cloud.d.ts +2 -15
  117. package/cjs/chart/word-cloud/word-cloud.js +4 -53
  118. package/cjs/chart/word-cloud/word-cloud.js.map +1 -1
  119. package/cjs/component/axis/cartesian/axis.js +1 -1
  120. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  121. package/cjs/component/crosshair/base.js +1 -2
  122. package/cjs/component/crosshair/base.js.map +1 -1
  123. package/cjs/component/crosshair/interface/spec.d.ts +1 -1
  124. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  125. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  126. package/cjs/component/index.d.ts +39 -1
  127. package/cjs/component/index.js +202 -17
  128. package/cjs/component/index.js.map +1 -1
  129. package/cjs/component/legend/base-legend.d.ts +1 -1
  130. package/cjs/component/legend/base-legend.js +7 -3
  131. package/cjs/component/legend/base-legend.js.map +1 -1
  132. package/cjs/component/legend/util.d.ts +3 -3
  133. package/cjs/component/player/utils/transform.js +1 -3
  134. package/cjs/component/player/utils/transform.js.map +1 -1
  135. package/cjs/component/tooltip/handler/base.d.ts +5 -4
  136. package/cjs/component/tooltip/handler/base.js +44 -34
  137. package/cjs/component/tooltip/handler/base.js.map +1 -1
  138. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +2 -2
  139. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js +2 -2
  140. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
  141. package/cjs/component/tooltip/handler/constants.d.ts +4 -0
  142. package/cjs/component/tooltip/handler/constants.js +5 -2
  143. package/cjs/component/tooltip/handler/constants.js.map +1 -1
  144. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +6 -2
  145. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +20 -13
  146. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  147. package/cjs/component/tooltip/handler/dom/interface.d.ts +16 -5
  148. package/cjs/component/tooltip/handler/dom/interface.js.map +1 -1
  149. package/cjs/component/tooltip/handler/dom/model/base-tooltip-model.d.ts +7 -13
  150. package/cjs/component/tooltip/handler/dom/model/base-tooltip-model.js +12 -27
  151. package/cjs/component/tooltip/handler/dom/model/base-tooltip-model.js.map +1 -1
  152. package/cjs/component/tooltip/handler/dom/model/content-column-model.d.ts +13 -3
  153. package/cjs/component/tooltip/handler/dom/model/content-column-model.js +46 -26
  154. package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
  155. package/cjs/component/tooltip/handler/dom/model/content-model.d.ts +4 -3
  156. package/cjs/component/tooltip/handler/dom/model/content-model.js +4 -4
  157. package/cjs/component/tooltip/handler/dom/model/content-model.js.map +1 -1
  158. package/cjs/component/tooltip/handler/dom/model/interface.d.ts +4 -0
  159. package/cjs/component/tooltip/handler/dom/model/interface.js.map +1 -1
  160. package/cjs/component/tooltip/handler/dom/model/shape-model.d.ts +5 -5
  161. package/cjs/component/tooltip/handler/dom/model/shape-model.js +4 -4
  162. package/cjs/component/tooltip/handler/dom/model/shape-model.js.map +1 -1
  163. package/cjs/component/tooltip/handler/dom/model/style-constants.d.ts +4 -4
  164. package/cjs/component/tooltip/handler/dom/model/style-constants.js +16 -18
  165. package/cjs/component/tooltip/handler/dom/model/style-constants.js.map +1 -1
  166. package/cjs/component/tooltip/handler/dom/model/text-model.js +1 -0
  167. package/cjs/component/tooltip/handler/dom/model/text-model.js.map +1 -1
  168. package/cjs/component/tooltip/handler/dom/model/title-model.d.ts +3 -2
  169. package/cjs/component/tooltip/handler/dom/model/title-model.js +15 -19
  170. package/cjs/component/tooltip/handler/dom/model/title-model.js.map +1 -1
  171. package/cjs/component/tooltip/handler/dom/model/tooltip-model.d.ts +1 -2
  172. package/cjs/component/tooltip/handler/dom/model/tooltip-model.js +21 -16
  173. package/cjs/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
  174. package/cjs/component/tooltip/handler/dom/util.d.ts +5 -0
  175. package/cjs/component/tooltip/handler/dom/{utils/style.js → util.js} +32 -20
  176. package/cjs/component/tooltip/handler/dom/util.js.map +1 -0
  177. package/cjs/component/tooltip/handler/interface/index.d.ts +0 -1
  178. package/cjs/component/tooltip/handler/interface/index.js +1 -1
  179. package/cjs/component/tooltip/handler/interface/index.js.map +1 -1
  180. package/cjs/component/tooltip/handler/utils/attribute.js +12 -8
  181. package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
  182. package/cjs/component/tooltip/handler/utils/common.d.ts +6 -2
  183. package/cjs/component/tooltip/handler/utils/common.js +30 -5
  184. package/cjs/component/tooltip/handler/utils/common.js.map +1 -1
  185. package/cjs/component/tooltip/handler/utils/compose.d.ts +3 -2
  186. package/cjs/component/tooltip/handler/utils/compose.js +56 -45
  187. package/cjs/component/tooltip/handler/utils/compose.js.map +1 -1
  188. package/cjs/component/tooltip/handler/utils/get-spec.js +64 -28
  189. package/cjs/component/tooltip/handler/utils/get-spec.js.map +1 -1
  190. package/cjs/component/tooltip/handler/utils/style.d.ts +2 -1
  191. package/cjs/component/tooltip/handler/utils/style.js +4 -4
  192. package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
  193. package/cjs/component/tooltip/tooltip.d.ts +3 -1
  194. package/cjs/component/tooltip/tooltip.js +33 -18
  195. package/cjs/component/tooltip/tooltip.js.map +1 -1
  196. package/cjs/component/tooltip/utils/common.js +4 -2
  197. package/cjs/component/tooltip/utils/common.js.map +1 -1
  198. package/cjs/constant/word-cloud.js +2 -1
  199. package/cjs/core/factory.js +1 -2
  200. package/cjs/{export/core.d.ts → core/index.d.ts} +4 -4
  201. package/cjs/{export/core.js → core/index.js} +5 -5
  202. package/cjs/core/index.js.map +1 -0
  203. package/cjs/core/instance-manager.d.ts +1 -1
  204. package/cjs/core/instance-manager.js +1 -1
  205. package/cjs/core/instance-manager.js.map +1 -1
  206. package/cjs/core/interface.js +1 -1
  207. package/cjs/core/vchart.d.ts +1 -0
  208. package/cjs/core/vchart.js +11 -3
  209. package/cjs/core/vchart.js.map +1 -1
  210. package/cjs/data/initialize.js +2 -1
  211. package/cjs/index.d.ts +6 -6
  212. package/cjs/index.js +4 -4
  213. package/cjs/index.js.map +1 -1
  214. package/cjs/layout/base-layout.d.ts +24 -0
  215. package/cjs/layout/base-layout.js +123 -0
  216. package/cjs/layout/base-layout.js.map +1 -0
  217. package/cjs/layout/grid-layout/grid-layout.d.ts +5 -35
  218. package/cjs/layout/grid-layout/grid-layout.js +2 -1
  219. package/cjs/layout/grid-layout/grid-layout.js.map +1 -1
  220. package/cjs/layout/index.d.ts +6 -24
  221. package/cjs/layout/index.js +25 -115
  222. package/cjs/layout/index.js.map +1 -1
  223. package/cjs/layout/interface.d.ts +31 -3
  224. package/cjs/layout/interface.js.map +1 -1
  225. package/cjs/layout/layout3d/index.d.ts +1 -1
  226. package/cjs/layout/layout3d/index.js +2 -2
  227. package/cjs/layout/layout3d/index.js.map +1 -1
  228. package/cjs/mark/arc-3d.d.ts +9 -0
  229. package/cjs/mark/arc-3d.js +16 -0
  230. package/cjs/mark/arc-3d.js.map +1 -0
  231. package/cjs/mark/arc.d.ts +5 -9
  232. package/cjs/mark/arc.js +12 -22
  233. package/cjs/mark/arc.js.map +1 -1
  234. package/cjs/mark/area.js +1 -1
  235. package/cjs/mark/base/base-line.js +3 -3
  236. package/cjs/mark/base/base-line.js.map +1 -1
  237. package/cjs/mark/base/base-mark.d.ts +7 -0
  238. package/cjs/mark/base/base-mark.js +10 -6
  239. package/cjs/mark/base/base-mark.js.map +1 -1
  240. package/cjs/mark/box-plot.js +1 -1
  241. package/cjs/mark/cell.js +1 -1
  242. package/cjs/mark/index.d.ts +21 -0
  243. package/cjs/{export/mark.js → mark/index.js} +49 -37
  244. package/cjs/mark/index.js.map +1 -0
  245. package/cjs/mark/{linkPath.js → link-path.js} +1 -1
  246. package/cjs/mark/link-path.js.map +1 -0
  247. package/cjs/mark/polygon/base-polygon.d.ts +6 -0
  248. package/cjs/mark/polygon/base-polygon.js +18 -0
  249. package/cjs/mark/polygon/base-polygon.js.map +1 -0
  250. package/cjs/mark/polygon/polygon.d.ts +9 -0
  251. package/cjs/mark/polygon/polygon.js +16 -0
  252. package/cjs/mark/polygon/polygon.js.map +1 -0
  253. package/cjs/mark/polygon/pyramid-3d.d.ts +9 -0
  254. package/cjs/mark/polygon/pyramid-3d.js +16 -0
  255. package/cjs/mark/polygon/pyramid-3d.js.map +1 -0
  256. package/cjs/mark/rect-3d.d.ts +10 -0
  257. package/cjs/mark/rect-3d.js +23 -0
  258. package/cjs/mark/rect-3d.js.map +1 -0
  259. package/cjs/mark/rect.d.ts +1 -7
  260. package/cjs/mark/rect.js +1 -16
  261. package/cjs/mark/rect.js.map +1 -1
  262. package/cjs/mark/utils/common.d.ts +0 -12
  263. package/cjs/mark/utils/common.js +2 -13
  264. package/cjs/mark/utils/common.js.map +1 -1
  265. package/cjs/model/base-model.js +1 -1
  266. package/cjs/model/interface.js +1 -1
  267. package/cjs/model/layout-item.js +1 -1
  268. package/cjs/model/model-state-manager.js +1 -1
  269. package/cjs/model/tooltip-helper.d.ts +3 -4
  270. package/cjs/model/tooltip-helper.js +5 -10
  271. package/cjs/model/tooltip-helper.js.map +1 -1
  272. package/cjs/region/interface.js +1 -1
  273. package/cjs/region/region.js +5 -10
  274. package/cjs/region/region.js.map +1 -1
  275. package/cjs/series/area/area.js +3 -1
  276. package/cjs/series/area/area.js.map +1 -1
  277. package/cjs/series/bar/bar-3d.d.ts +11 -0
  278. package/cjs/series/bar/bar-3d.js +25 -0
  279. package/cjs/series/bar/bar-3d.js.map +1 -0
  280. package/cjs/series/bar/bar.d.ts +0 -7
  281. package/cjs/series/bar/bar.js +3 -18
  282. package/cjs/series/bar/bar.js.map +1 -1
  283. package/cjs/series/base/base-series.js +1 -1
  284. package/cjs/series/base/base-series.js.map +1 -1
  285. package/cjs/series/base/tooltip-helper.d.ts +9 -8
  286. package/cjs/series/base/tooltip-helper.js +23 -12
  287. package/cjs/series/base/tooltip-helper.js.map +1 -1
  288. package/cjs/series/box-plot/box-plot.js +5 -1
  289. package/cjs/series/box-plot/box-plot.js.map +1 -1
  290. package/cjs/series/circle-packing/circle-packing.js +3 -1
  291. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  292. package/cjs/series/dot/dot.js +3 -1
  293. package/cjs/series/dot/dot.js.map +1 -1
  294. package/cjs/series/dot/tooltip-helper.d.ts +1 -2
  295. package/cjs/series/dot/tooltip-helper.js +6 -5
  296. package/cjs/series/dot/tooltip-helper.js.map +1 -1
  297. package/cjs/series/funnel/funnel-3d.d.ts +18 -0
  298. package/cjs/series/funnel/funnel-3d.js +104 -0
  299. package/cjs/series/funnel/funnel-3d.js.map +1 -0
  300. package/cjs/series/funnel/funnel.d.ts +3 -15
  301. package/cjs/series/funnel/funnel.js +12 -104
  302. package/cjs/series/funnel/funnel.js.map +1 -1
  303. package/cjs/series/funnel/tooltip-helper.d.ts +5 -3
  304. package/cjs/series/funnel/tooltip-helper.js +10 -8
  305. package/cjs/series/funnel/tooltip-helper.js.map +1 -1
  306. package/cjs/series/gauge/gauge-pointer.js +3 -1
  307. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  308. package/cjs/series/gauge/gauge.js +3 -1
  309. package/cjs/series/gauge/gauge.js.map +1 -1
  310. package/cjs/series/heatmap/heatmap.js +2 -2
  311. package/cjs/series/heatmap/heatmap.js.map +1 -1
  312. package/cjs/series/index.d.ts +66 -0
  313. package/cjs/{export/series.js → series/index.js} +70 -50
  314. package/cjs/series/index.js.map +1 -0
  315. package/cjs/series/interface/series.d.ts +2 -1
  316. package/cjs/series/interface/series.js.map +1 -1
  317. package/cjs/series/interface/tooltip-helper.d.ts +6 -6
  318. package/cjs/series/interface/tooltip-helper.js.map +1 -1
  319. package/cjs/series/line/line.js +3 -1
  320. package/cjs/series/line/line.js.map +1 -1
  321. package/cjs/series/link/link.js +3 -1
  322. package/cjs/series/link/link.js.map +1 -1
  323. package/cjs/series/map/map.js +2 -2
  324. package/cjs/series/map/map.js.map +1 -1
  325. package/cjs/series/pie/pie-3d.d.ts +16 -0
  326. package/cjs/series/pie/pie-3d.js +97 -0
  327. package/cjs/series/pie/pie-3d.js.map +1 -0
  328. package/cjs/series/pie/pie.d.ts +1 -11
  329. package/cjs/series/pie/pie.js +4 -89
  330. package/cjs/series/pie/pie.js.map +1 -1
  331. package/cjs/series/polar/animation.d.ts +1 -1
  332. package/cjs/series/polar/animation.js.map +1 -1
  333. package/cjs/series/progress/circular/circular.js +3 -1
  334. package/cjs/series/progress/circular/circular.js.map +1 -1
  335. package/cjs/series/progress/linear/linear.js +3 -1
  336. package/cjs/series/progress/linear/linear.js.map +1 -1
  337. package/cjs/series/radar/animation.d.ts +1 -1
  338. package/cjs/series/radar/animation.js.map +1 -1
  339. package/cjs/series/radar/radar.js +3 -1
  340. package/cjs/series/radar/radar.js.map +1 -1
  341. package/cjs/series/range-column/rangeColumn-3d.d.ts +10 -0
  342. package/cjs/series/range-column/rangeColumn-3d.js +19 -0
  343. package/cjs/series/range-column/rangeColumn-3d.js.map +1 -0
  344. package/cjs/series/range-column/rangeColumn.d.ts +0 -6
  345. package/cjs/series/range-column/rangeColumn.js +1 -10
  346. package/cjs/series/range-column/rangeColumn.js.map +1 -1
  347. package/cjs/series/rose/rose.js +2 -2
  348. package/cjs/series/rose/rose.js.map +1 -1
  349. package/cjs/series/sankey/sankey.js +2 -1
  350. package/cjs/series/sankey/sankey.js.map +1 -1
  351. package/cjs/series/scatter/scatter.js +3 -1
  352. package/cjs/series/scatter/scatter.js.map +1 -1
  353. package/cjs/series/sunburst/sunburst.js +3 -1
  354. package/cjs/series/sunburst/sunburst.js.map +1 -1
  355. package/cjs/series/treemap/treemap.js +3 -1
  356. package/cjs/series/treemap/treemap.js.map +1 -1
  357. package/cjs/series/waterfall/waterfall.js +2 -2
  358. package/cjs/series/waterfall/waterfall.js.map +1 -1
  359. package/cjs/series/word-cloud/base.d.ts +60 -0
  360. package/cjs/series/word-cloud/base.js +254 -0
  361. package/cjs/series/word-cloud/base.js.map +1 -0
  362. package/cjs/series/word-cloud/word-cloud-3d.d.ts +11 -0
  363. package/cjs/series/word-cloud/word-cloud-3d.js +199 -0
  364. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -0
  365. package/cjs/series/word-cloud/word-cloud.d.ts +2 -69
  366. package/cjs/series/word-cloud/word-cloud.js +5 -441
  367. package/cjs/series/word-cloud/word-cloud.js.map +1 -1
  368. package/cjs/theme/buildin-theme/index.d.ts +0 -1
  369. package/cjs/theme/buildin-theme/index.js +3 -3
  370. package/cjs/theme/buildin-theme/index.js.map +1 -1
  371. package/cjs/theme/buildin-theme/light/component/crosshair.js +4 -4
  372. package/cjs/theme/buildin-theme/light/component/crosshair.js.map +1 -1
  373. package/cjs/theme/buildin-theme/light/component/tooltip.js +1 -0
  374. package/cjs/theme/buildin-theme/light/component/tooltip.js.map +1 -1
  375. package/cjs/typings/spec/common.d.ts +1 -1
  376. package/cjs/typings/spec/common.js.map +1 -1
  377. package/cjs/typings/tooltip/common.d.ts +7 -1
  378. package/cjs/typings/tooltip/common.js.map +1 -1
  379. package/cjs/typings/tooltip/handler.d.ts +1 -1
  380. package/cjs/typings/tooltip/handler.js.map +1 -1
  381. package/cjs/typings/tooltip/line.d.ts +6 -4
  382. package/cjs/typings/tooltip/line.js.map +1 -1
  383. package/cjs/typings/tooltip/shape.d.ts +3 -3
  384. package/cjs/typings/tooltip/shape.js.map +1 -1
  385. package/cjs/typings/tooltip/tooltip.d.ts +11 -8
  386. package/cjs/typings/tooltip/tooltip.js.map +1 -1
  387. package/cjs/typings/visual.d.ts +4 -11
  388. package/cjs/typings/visual.js.map +1 -1
  389. package/cjs/util/debug.d.ts +3 -3
  390. package/cjs/util/debug.js +11 -20
  391. package/cjs/util/debug.js.map +1 -1
  392. package/cjs/util/index.d.ts +1 -0
  393. package/cjs/util/index.js +2 -1
  394. package/cjs/util/index.js.map +1 -1
  395. package/cjs/util/style.js +3 -7
  396. package/cjs/util/style.js.map +1 -1
  397. package/cjs/vchart-all.d.ts +1 -1
  398. package/cjs/vchart-all.js +3 -5
  399. package/cjs/vchart-all.js.map +1 -1
  400. package/cjs/vchart-simple.d.ts +1 -1
  401. package/cjs/vchart-simple.js +2 -4
  402. package/cjs/vchart-simple.js.map +1 -1
  403. package/component.d.ts +1 -1
  404. package/component.js +1 -1
  405. package/core.d.ts +1 -1
  406. package/core.js +1 -1
  407. package/esm/chart/area/area.d.ts +1 -0
  408. package/esm/chart/area/area.js +11 -0
  409. package/esm/chart/area/area.js.map +1 -1
  410. package/esm/chart/bar/bar-3d.d.ts +7 -0
  411. package/esm/chart/bar/bar-3d.js +20 -0
  412. package/esm/chart/bar/bar-3d.js.map +1 -0
  413. package/esm/chart/bar/bar.d.ts +1 -6
  414. package/esm/chart/bar/bar.js +11 -8
  415. package/esm/chart/bar/bar.js.map +1 -1
  416. package/esm/chart/bar/index.d.ts +1 -0
  417. package/esm/chart/bar/index.js +2 -0
  418. package/esm/chart/bar/index.js.map +1 -1
  419. package/esm/chart/base-chart.d.ts +1 -1
  420. package/esm/chart/base-chart.js +2 -1
  421. package/esm/chart/base-chart.js.map +1 -1
  422. package/esm/chart/box-plot/box-plot.js +9 -1
  423. package/esm/chart/box-plot/box-plot.js.map +1 -1
  424. package/esm/chart/circle-packing/circle-packing.js +6 -0
  425. package/esm/chart/circle-packing/circle-packing.js.map +1 -1
  426. package/esm/chart/funnel/base.d.ts +9 -0
  427. package/esm/chart/funnel/base.js +39 -0
  428. package/esm/chart/funnel/base.js.map +1 -0
  429. package/esm/chart/funnel/funnel-3d.d.ts +7 -0
  430. package/esm/chart/funnel/funnel-3d.js +20 -0
  431. package/esm/chart/funnel/funnel-3d.js.map +1 -0
  432. package/esm/chart/funnel/funnel.d.ts +1 -16
  433. package/esm/chart/funnel/funnel.js +7 -46
  434. package/esm/chart/funnel/funnel.js.map +1 -1
  435. package/esm/chart/funnel/index.d.ts +1 -0
  436. package/esm/chart/funnel/index.js +2 -0
  437. package/esm/chart/funnel/index.js.map +1 -1
  438. package/esm/chart/gauge/gauge.js +6 -0
  439. package/esm/chart/gauge/gauge.js.map +1 -1
  440. package/esm/chart/heatmap/heatmap.js +6 -0
  441. package/esm/chart/heatmap/heatmap.js.map +1 -1
  442. package/esm/chart/histogram/base.d.ts +5 -0
  443. package/esm/chart/histogram/base.js +14 -0
  444. package/esm/chart/histogram/base.js.map +1 -0
  445. package/esm/chart/histogram/histogram-3d.d.ts +7 -0
  446. package/esm/chart/histogram/histogram-3d.js +20 -0
  447. package/esm/chart/histogram/histogram-3d.js.map +1 -0
  448. package/esm/chart/histogram/histogram.d.ts +2 -12
  449. package/esm/chart/histogram/histogram.js +12 -21
  450. package/esm/chart/histogram/histogram.js.map +1 -1
  451. package/esm/chart/histogram/index.d.ts +1 -0
  452. package/esm/chart/histogram/index.js +2 -0
  453. package/esm/chart/histogram/index.js.map +1 -1
  454. package/esm/chart/index.d.ts +57 -22
  455. package/esm/chart/index.js +36 -22
  456. package/esm/chart/index.js.map +1 -1
  457. package/esm/chart/line/line.d.ts +1 -0
  458. package/esm/chart/line/line.js +11 -0
  459. package/esm/chart/line/line.js.map +1 -1
  460. package/esm/chart/map/map.js +6 -0
  461. package/esm/chart/map/map.js.map +1 -1
  462. package/esm/chart/pie/base.d.ts +5 -0
  463. package/esm/chart/pie/base.js +18 -0
  464. package/esm/chart/pie/base.js.map +1 -0
  465. package/esm/chart/pie/index.d.ts +1 -0
  466. package/esm/chart/pie/index.js +2 -0
  467. package/esm/chart/pie/index.js.map +1 -1
  468. package/esm/chart/pie/pie-3d.d.ts +8 -0
  469. package/esm/chart/pie/pie-3d.js +25 -0
  470. package/esm/chart/pie/pie-3d.js.map +1 -0
  471. package/esm/chart/pie/pie.d.ts +1 -13
  472. package/esm/chart/pie/pie.js +6 -29
  473. package/esm/chart/pie/pie.js.map +1 -1
  474. package/esm/chart/progress/circular/circular.js +6 -0
  475. package/esm/chart/progress/circular/circular.js.map +1 -1
  476. package/esm/chart/progress/linear/linear.js +6 -0
  477. package/esm/chart/progress/linear/linear.js.map +1 -1
  478. package/esm/chart/radar/radar.js +6 -0
  479. package/esm/chart/radar/radar.js.map +1 -1
  480. package/esm/chart/range-area/range-area.d.ts +1 -0
  481. package/esm/chart/range-area/range-area.js +11 -0
  482. package/esm/chart/range-area/range-area.js.map +1 -1
  483. package/esm/chart/range-column/index.d.ts +2 -1
  484. package/esm/chart/range-column/index.js +3 -1
  485. package/esm/chart/range-column/index.js.map +1 -1
  486. package/esm/chart/range-column/{rangeColumn.d.ts → range-column-3d.d.ts} +0 -7
  487. package/esm/chart/range-column/{rangeColumn.js → range-column-3d.js} +5 -13
  488. package/esm/chart/range-column/range-column-3d.js.map +1 -0
  489. package/esm/chart/range-column/range-column.d.ts +9 -0
  490. package/esm/chart/range-column/range-column.js +33 -0
  491. package/esm/chart/range-column/range-column.js.map +1 -0
  492. package/esm/chart/rose/rose.js +6 -0
  493. package/esm/chart/rose/rose.js.map +1 -1
  494. package/esm/chart/sankey/sankey.js +6 -0
  495. package/esm/chart/sankey/sankey.js.map +1 -1
  496. package/esm/chart/scatter/scatter.js +6 -0
  497. package/esm/chart/scatter/scatter.js.map +1 -1
  498. package/esm/chart/sequence/sequence.js +6 -0
  499. package/esm/chart/sequence/sequence.js.map +1 -1
  500. package/esm/chart/sunburst/sunburst.js +6 -0
  501. package/esm/chart/sunburst/sunburst.js.map +1 -1
  502. package/esm/chart/treemap/treemap.js +6 -0
  503. package/esm/chart/treemap/treemap.js.map +1 -1
  504. package/esm/chart/util.d.ts +2 -0
  505. package/esm/chart/util.js +16 -0
  506. package/esm/chart/util.js.map +1 -0
  507. package/esm/chart/waterfall/waterfall.js +9 -1
  508. package/esm/chart/waterfall/waterfall.js.map +1 -1
  509. package/esm/chart/word-cloud/base.d.ts +6 -0
  510. package/esm/chart/word-cloud/base.js +21 -0
  511. package/esm/chart/word-cloud/base.js.map +1 -0
  512. package/esm/chart/word-cloud/index.d.ts +1 -0
  513. package/esm/chart/word-cloud/index.js +2 -0
  514. package/esm/chart/word-cloud/index.js.map +1 -1
  515. package/esm/chart/word-cloud/word-cloud-3d.d.ts +9 -0
  516. package/esm/chart/word-cloud/word-cloud-3d.js +47 -0
  517. package/esm/chart/word-cloud/word-cloud-3d.js.map +1 -0
  518. package/esm/chart/word-cloud/word-cloud.d.ts +2 -15
  519. package/esm/chart/word-cloud/word-cloud.js +6 -50
  520. package/esm/chart/word-cloud/word-cloud.js.map +1 -1
  521. package/esm/component/axis/cartesian/axis.js +2 -2
  522. package/esm/component/axis/cartesian/axis.js.map +1 -1
  523. package/esm/component/crosshair/base.js +1 -2
  524. package/esm/component/crosshair/base.js.map +1 -1
  525. package/esm/component/crosshair/interface/spec.d.ts +1 -1
  526. package/esm/component/crosshair/interface/spec.js.map +1 -1
  527. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  528. package/esm/component/index.d.ts +39 -1
  529. package/esm/component/index.js +39 -2
  530. package/esm/component/index.js.map +1 -1
  531. package/esm/component/legend/base-legend.d.ts +1 -1
  532. package/esm/component/legend/base-legend.js +7 -3
  533. package/esm/component/legend/base-legend.js.map +1 -1
  534. package/esm/component/legend/util.d.ts +3 -3
  535. package/esm/component/player/utils/transform.js +1 -3
  536. package/esm/component/player/utils/transform.js.map +1 -1
  537. package/esm/component/tooltip/handler/base.d.ts +5 -4
  538. package/esm/component/tooltip/handler/base.js +45 -35
  539. package/esm/component/tooltip/handler/base.js.map +1 -1
  540. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +2 -2
  541. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js +2 -3
  542. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
  543. package/esm/component/tooltip/handler/constants.d.ts +4 -0
  544. package/esm/component/tooltip/handler/constants.js +9 -0
  545. package/esm/component/tooltip/handler/constants.js.map +1 -1
  546. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +6 -2
  547. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +20 -12
  548. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  549. package/esm/component/tooltip/handler/dom/interface.d.ts +16 -5
  550. package/esm/component/tooltip/handler/dom/interface.js.map +1 -1
  551. package/esm/component/tooltip/handler/dom/model/base-tooltip-model.d.ts +7 -13
  552. package/esm/component/tooltip/handler/dom/model/base-tooltip-model.js +11 -29
  553. package/esm/component/tooltip/handler/dom/model/base-tooltip-model.js.map +1 -1
  554. package/esm/component/tooltip/handler/dom/model/content-column-model.d.ts +13 -3
  555. package/esm/component/tooltip/handler/dom/model/content-column-model.js +46 -24
  556. package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
  557. package/esm/component/tooltip/handler/dom/model/content-model.d.ts +4 -3
  558. package/esm/component/tooltip/handler/dom/model/content-model.js +5 -5
  559. package/esm/component/tooltip/handler/dom/model/content-model.js.map +1 -1
  560. package/esm/component/tooltip/handler/dom/model/interface.d.ts +4 -0
  561. package/esm/component/tooltip/handler/dom/model/interface.js.map +1 -1
  562. package/esm/component/tooltip/handler/dom/model/shape-model.d.ts +5 -5
  563. package/esm/component/tooltip/handler/dom/model/shape-model.js +4 -4
  564. package/esm/component/tooltip/handler/dom/model/shape-model.js.map +1 -1
  565. package/esm/component/tooltip/handler/dom/model/style-constants.d.ts +4 -4
  566. package/esm/component/tooltip/handler/dom/model/style-constants.js +18 -20
  567. package/esm/component/tooltip/handler/dom/model/style-constants.js.map +1 -1
  568. package/esm/component/tooltip/handler/dom/model/text-model.js +1 -0
  569. package/esm/component/tooltip/handler/dom/model/text-model.js.map +1 -1
  570. package/esm/component/tooltip/handler/dom/model/title-model.d.ts +3 -2
  571. package/esm/component/tooltip/handler/dom/model/title-model.js +15 -19
  572. package/esm/component/tooltip/handler/dom/model/title-model.js.map +1 -1
  573. package/esm/component/tooltip/handler/dom/model/tooltip-model.d.ts +1 -2
  574. package/esm/component/tooltip/handler/dom/model/tooltip-model.js +22 -16
  575. package/esm/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
  576. package/esm/component/tooltip/handler/dom/util.d.ts +5 -0
  577. package/esm/component/tooltip/handler/dom/util.js +71 -0
  578. package/esm/component/tooltip/handler/dom/util.js.map +1 -0
  579. package/esm/component/tooltip/handler/interface/index.d.ts +0 -1
  580. package/esm/component/tooltip/handler/interface/index.js +0 -2
  581. package/esm/component/tooltip/handler/interface/index.js.map +1 -1
  582. package/esm/component/tooltip/handler/utils/attribute.js +11 -7
  583. package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
  584. package/esm/component/tooltip/handler/utils/common.d.ts +6 -2
  585. package/esm/component/tooltip/handler/utils/common.js +25 -2
  586. package/esm/component/tooltip/handler/utils/common.js.map +1 -1
  587. package/esm/component/tooltip/handler/utils/compose.d.ts +3 -2
  588. package/esm/component/tooltip/handler/utils/compose.js +52 -43
  589. package/esm/component/tooltip/handler/utils/compose.js.map +1 -1
  590. package/esm/component/tooltip/handler/utils/get-spec.js +60 -23
  591. package/esm/component/tooltip/handler/utils/get-spec.js.map +1 -1
  592. package/esm/component/tooltip/handler/utils/style.d.ts +2 -1
  593. package/esm/component/tooltip/handler/utils/style.js +4 -4
  594. package/esm/component/tooltip/handler/utils/style.js.map +1 -1
  595. package/esm/component/tooltip/tooltip.d.ts +3 -1
  596. package/esm/component/tooltip/tooltip.js +33 -18
  597. package/esm/component/tooltip/tooltip.js.map +1 -1
  598. package/esm/component/tooltip/utils/common.js +4 -2
  599. package/esm/component/tooltip/utils/common.js.map +1 -1
  600. package/esm/constant/word-cloud.js +2 -1
  601. package/esm/core/factory.js +1 -2
  602. package/esm/{export/core.d.ts → core/index.d.ts} +4 -4
  603. package/esm/{export/core.js → core/index.js} +5 -5
  604. package/esm/core/index.js.map +1 -0
  605. package/esm/core/instance-manager.d.ts +1 -1
  606. package/esm/core/instance-manager.js +1 -1
  607. package/esm/core/instance-manager.js.map +1 -1
  608. package/esm/core/interface.js +1 -1
  609. package/esm/core/vchart.d.ts +1 -0
  610. package/esm/core/vchart.js +10 -3
  611. package/esm/core/vchart.js.map +1 -1
  612. package/esm/data/initialize.js +2 -1
  613. package/esm/index.d.ts +6 -6
  614. package/esm/index.js +6 -6
  615. package/esm/index.js.map +1 -1
  616. package/esm/layout/base-layout.d.ts +24 -0
  617. package/esm/layout/base-layout.js +115 -0
  618. package/esm/layout/base-layout.js.map +1 -0
  619. package/esm/layout/grid-layout/grid-layout.d.ts +5 -35
  620. package/esm/layout/grid-layout/grid-layout.js +2 -1
  621. package/esm/layout/grid-layout/grid-layout.js.map +1 -1
  622. package/esm/layout/index.d.ts +6 -24
  623. package/esm/layout/index.js +8 -115
  624. package/esm/layout/index.js.map +1 -1
  625. package/esm/layout/interface.d.ts +31 -3
  626. package/esm/layout/interface.js.map +1 -1
  627. package/esm/layout/layout3d/index.d.ts +1 -1
  628. package/esm/layout/layout3d/index.js +1 -1
  629. package/esm/layout/layout3d/index.js.map +1 -1
  630. package/esm/mark/arc-3d.d.ts +9 -0
  631. package/esm/mark/arc-3d.js +12 -0
  632. package/esm/mark/arc-3d.js.map +1 -0
  633. package/esm/mark/arc.d.ts +5 -9
  634. package/esm/mark/arc.js +11 -21
  635. package/esm/mark/arc.js.map +1 -1
  636. package/esm/mark/area.js +1 -1
  637. package/esm/mark/base/base-line.js +2 -4
  638. package/esm/mark/base/base-line.js.map +1 -1
  639. package/esm/mark/base/base-mark.d.ts +7 -0
  640. package/esm/mark/base/base-mark.js +9 -7
  641. package/esm/mark/base/base-mark.js.map +1 -1
  642. package/esm/mark/box-plot.js +1 -1
  643. package/esm/mark/cell.js +1 -1
  644. package/esm/mark/index.d.ts +21 -0
  645. package/esm/mark/index.js +40 -0
  646. package/esm/mark/index.js.map +1 -0
  647. package/esm/mark/{linkPath.js → link-path.js} +1 -1
  648. package/esm/mark/link-path.js.map +1 -0
  649. package/esm/mark/polygon/base-polygon.d.ts +6 -0
  650. package/esm/mark/polygon/base-polygon.js +10 -0
  651. package/esm/mark/polygon/base-polygon.js.map +1 -0
  652. package/esm/mark/polygon/polygon.d.ts +9 -0
  653. package/esm/mark/polygon/polygon.js +12 -0
  654. package/esm/mark/polygon/polygon.js.map +1 -0
  655. package/esm/mark/polygon/pyramid-3d.d.ts +9 -0
  656. package/esm/mark/polygon/pyramid-3d.js +12 -0
  657. package/esm/mark/polygon/pyramid-3d.js.map +1 -0
  658. package/esm/mark/rect-3d.d.ts +10 -0
  659. package/esm/mark/rect-3d.js +19 -0
  660. package/esm/mark/rect-3d.js.map +1 -0
  661. package/esm/mark/rect.d.ts +1 -7
  662. package/esm/mark/rect.js +0 -15
  663. package/esm/mark/rect.js.map +1 -1
  664. package/esm/mark/utils/common.d.ts +0 -12
  665. package/esm/mark/utils/common.js +0 -13
  666. package/esm/mark/utils/common.js.map +1 -1
  667. package/esm/model/base-model.js +1 -1
  668. package/esm/model/interface.js +1 -1
  669. package/esm/model/layout-item.js +1 -1
  670. package/esm/model/model-state-manager.js +1 -1
  671. package/esm/model/tooltip-helper.d.ts +3 -4
  672. package/esm/model/tooltip-helper.js +5 -10
  673. package/esm/model/tooltip-helper.js.map +1 -1
  674. package/esm/region/interface.js +1 -1
  675. package/esm/region/region.js +6 -10
  676. package/esm/region/region.js.map +1 -1
  677. package/esm/series/area/area.js +12 -0
  678. package/esm/series/area/area.js.map +1 -1
  679. package/esm/series/bar/bar-3d.d.ts +11 -0
  680. package/esm/series/bar/bar-3d.js +30 -0
  681. package/esm/series/bar/bar-3d.js.map +1 -0
  682. package/esm/series/bar/bar.d.ts +0 -7
  683. package/esm/series/bar/bar.js +8 -14
  684. package/esm/series/bar/bar.js.map +1 -1
  685. package/esm/series/base/base-series.js +1 -1
  686. package/esm/series/base/base-series.js.map +1 -1
  687. package/esm/series/base/tooltip-helper.d.ts +9 -8
  688. package/esm/series/base/tooltip-helper.js +23 -12
  689. package/esm/series/base/tooltip-helper.js.map +1 -1
  690. package/esm/series/box-plot/box-plot.js +8 -0
  691. package/esm/series/box-plot/box-plot.js.map +1 -1
  692. package/esm/series/circle-packing/circle-packing.js +8 -0
  693. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  694. package/esm/series/dot/dot.js +12 -0
  695. package/esm/series/dot/dot.js.map +1 -1
  696. package/esm/series/dot/tooltip-helper.d.ts +1 -2
  697. package/esm/series/dot/tooltip-helper.js +7 -4
  698. package/esm/series/dot/tooltip-helper.js.map +1 -1
  699. package/esm/series/funnel/funnel-3d.d.ts +18 -0
  700. package/esm/series/funnel/funnel-3d.js +113 -0
  701. package/esm/series/funnel/funnel-3d.js.map +1 -0
  702. package/esm/series/funnel/funnel.d.ts +3 -15
  703. package/esm/series/funnel/funnel.js +18 -101
  704. package/esm/series/funnel/funnel.js.map +1 -1
  705. package/esm/series/funnel/tooltip-helper.d.ts +5 -3
  706. package/esm/series/funnel/tooltip-helper.js +11 -7
  707. package/esm/series/funnel/tooltip-helper.js.map +1 -1
  708. package/esm/series/gauge/gauge-pointer.js +8 -0
  709. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  710. package/esm/series/gauge/gauge.js +6 -0
  711. package/esm/series/gauge/gauge.js.map +1 -1
  712. package/esm/series/heatmap/heatmap.js +8 -0
  713. package/esm/series/heatmap/heatmap.js.map +1 -1
  714. package/esm/series/index.d.ts +66 -0
  715. package/esm/series/index.js +70 -0
  716. package/esm/series/index.js.map +1 -0
  717. package/esm/series/interface/series.d.ts +2 -1
  718. package/esm/series/interface/series.js.map +1 -1
  719. package/esm/series/interface/tooltip-helper.d.ts +6 -6
  720. package/esm/series/interface/tooltip-helper.js.map +1 -1
  721. package/esm/series/line/line.js +10 -0
  722. package/esm/series/line/line.js.map +1 -1
  723. package/esm/series/link/link.js +8 -0
  724. package/esm/series/link/link.js.map +1 -1
  725. package/esm/series/map/map.js +7 -1
  726. package/esm/series/map/map.js.map +1 -1
  727. package/esm/series/pie/pie-3d.d.ts +16 -0
  728. package/esm/series/pie/pie-3d.js +107 -0
  729. package/esm/series/pie/pie-3d.js.map +1 -0
  730. package/esm/series/pie/pie.d.ts +1 -11
  731. package/esm/series/pie/pie.js +10 -83
  732. package/esm/series/pie/pie.js.map +1 -1
  733. package/esm/series/polar/animation.d.ts +1 -1
  734. package/esm/series/polar/animation.js.map +1 -1
  735. package/esm/series/progress/circular/circular.js +8 -0
  736. package/esm/series/progress/circular/circular.js.map +1 -1
  737. package/esm/series/progress/linear/linear.js +6 -0
  738. package/esm/series/progress/linear/linear.js.map +1 -1
  739. package/esm/series/radar/animation.d.ts +1 -1
  740. package/esm/series/radar/animation.js.map +1 -1
  741. package/esm/series/radar/radar.js +12 -0
  742. package/esm/series/radar/radar.js.map +1 -1
  743. package/esm/series/range-column/rangeColumn-3d.d.ts +10 -0
  744. package/esm/series/range-column/rangeColumn-3d.js +23 -0
  745. package/esm/series/range-column/rangeColumn-3d.js.map +1 -0
  746. package/esm/series/range-column/rangeColumn.d.ts +0 -6
  747. package/esm/series/range-column/rangeColumn.js +0 -9
  748. package/esm/series/range-column/rangeColumn.js.map +1 -1
  749. package/esm/series/rose/rose.js +8 -0
  750. package/esm/series/rose/rose.js.map +1 -1
  751. package/esm/series/sankey/sankey.js +9 -1
  752. package/esm/series/sankey/sankey.js.map +1 -1
  753. package/esm/series/scatter/scatter.js +8 -0
  754. package/esm/series/scatter/scatter.js.map +1 -1
  755. package/esm/series/sunburst/sunburst.js +8 -0
  756. package/esm/series/sunburst/sunburst.js.map +1 -1
  757. package/esm/series/treemap/treemap.js +8 -0
  758. package/esm/series/treemap/treemap.js.map +1 -1
  759. package/esm/series/waterfall/waterfall.js +6 -0
  760. package/esm/series/waterfall/waterfall.js.map +1 -1
  761. package/esm/series/word-cloud/base.d.ts +60 -0
  762. package/esm/series/word-cloud/base.js +278 -0
  763. package/esm/series/word-cloud/base.js.map +1 -0
  764. package/esm/series/word-cloud/word-cloud-3d.d.ts +11 -0
  765. package/esm/series/word-cloud/word-cloud-3d.js +205 -0
  766. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -0
  767. package/esm/series/word-cloud/word-cloud.d.ts +2 -69
  768. package/esm/series/word-cloud/word-cloud.js +2 -461
  769. package/esm/series/word-cloud/word-cloud.js.map +1 -1
  770. package/esm/theme/buildin-theme/index.d.ts +0 -1
  771. package/esm/theme/buildin-theme/index.js +1 -5
  772. package/esm/theme/buildin-theme/index.js.map +1 -1
  773. package/esm/theme/buildin-theme/light/component/crosshair.js +4 -4
  774. package/esm/theme/buildin-theme/light/component/crosshair.js.map +1 -1
  775. package/esm/theme/buildin-theme/light/component/tooltip.js +1 -0
  776. package/esm/theme/buildin-theme/light/component/tooltip.js.map +1 -1
  777. package/esm/typings/spec/common.d.ts +1 -1
  778. package/esm/typings/spec/common.js.map +1 -1
  779. package/esm/typings/tooltip/common.d.ts +7 -1
  780. package/esm/typings/tooltip/common.js.map +1 -1
  781. package/esm/typings/tooltip/handler.d.ts +1 -1
  782. package/esm/typings/tooltip/handler.js.map +1 -1
  783. package/esm/typings/tooltip/line.d.ts +6 -4
  784. package/esm/typings/tooltip/line.js.map +1 -1
  785. package/esm/typings/tooltip/shape.d.ts +3 -3
  786. package/esm/typings/tooltip/shape.js.map +1 -1
  787. package/esm/typings/tooltip/tooltip.d.ts +11 -8
  788. package/esm/typings/tooltip/tooltip.js.map +1 -1
  789. package/esm/typings/visual.d.ts +4 -11
  790. package/esm/typings/visual.js.map +1 -1
  791. package/esm/util/debug.d.ts +3 -3
  792. package/esm/util/debug.js +11 -14
  793. package/esm/util/debug.js.map +1 -1
  794. package/esm/util/index.d.ts +1 -0
  795. package/esm/util/index.js +2 -0
  796. package/esm/util/index.js.map +1 -1
  797. package/esm/util/style.js +3 -8
  798. package/esm/util/style.js.map +1 -1
  799. package/esm/vchart-all.d.ts +1 -1
  800. package/esm/vchart-all.js +4 -12
  801. package/esm/vchart-all.js.map +1 -1
  802. package/esm/vchart-simple.d.ts +1 -1
  803. package/esm/vchart-simple.js +4 -10
  804. package/esm/vchart-simple.js.map +1 -1
  805. package/layout.d.ts +1 -1
  806. package/layout.js +1 -1
  807. package/mark.d.ts +1 -1
  808. package/mark.js +1 -1
  809. package/package.json +35 -39
  810. package/series.d.ts +1 -1
  811. package/series.js +1 -1
  812. package/cjs/chart/range-column/rangeColumn.js.map +0 -1
  813. package/cjs/component/tooltip/handler/dom/utils/style.d.ts +0 -3
  814. package/cjs/component/tooltip/handler/dom/utils/style.js.map +0 -1
  815. package/cjs/component/tooltip/handler/interface/cache.d.ts +0 -28
  816. package/cjs/component/tooltip/handler/interface/cache.js +0 -6
  817. package/cjs/component/tooltip/handler/interface/cache.js.map +0 -1
  818. package/cjs/export/chart.d.ts +0 -57
  819. package/cjs/export/chart.js +0 -298
  820. package/cjs/export/chart.js.map +0 -1
  821. package/cjs/export/component.d.ts +0 -39
  822. package/cjs/export/component.js +0 -207
  823. package/cjs/export/component.js.map +0 -1
  824. package/cjs/export/core.js.map +0 -1
  825. package/cjs/export/layout.d.ts +0 -7
  826. package/cjs/export/layout.js +0 -33
  827. package/cjs/export/layout.js.map +0 -1
  828. package/cjs/export/mark.d.ts +0 -18
  829. package/cjs/export/mark.js.map +0 -1
  830. package/cjs/export/series.d.ts +0 -61
  831. package/cjs/export/series.js.map +0 -1
  832. package/cjs/mark/linkPath.js.map +0 -1
  833. package/cjs/mark/polygon.d.ts +0 -18
  834. package/cjs/mark/polygon.js +0 -32
  835. package/cjs/mark/polygon.js.map +0 -1
  836. package/cjs/theme/buildin-theme/dark.d.ts +0 -2
  837. package/cjs/theme/buildin-theme/dark.js +0 -16
  838. package/cjs/theme/buildin-theme/dark.js.map +0 -1
  839. package/esm/chart/range-column/rangeColumn.js.map +0 -1
  840. package/esm/component/tooltip/handler/dom/utils/style.d.ts +0 -3
  841. package/esm/component/tooltip/handler/dom/utils/style.js +0 -59
  842. package/esm/component/tooltip/handler/dom/utils/style.js.map +0 -1
  843. package/esm/component/tooltip/handler/interface/cache.d.ts +0 -28
  844. package/esm/component/tooltip/handler/interface/cache.js +0 -2
  845. package/esm/component/tooltip/handler/interface/cache.js.map +0 -1
  846. package/esm/export/chart.d.ts +0 -57
  847. package/esm/export/chart.js +0 -58
  848. package/esm/export/chart.js.map +0 -1
  849. package/esm/export/component.d.ts +0 -39
  850. package/esm/export/component.js +0 -40
  851. package/esm/export/component.js.map +0 -1
  852. package/esm/export/core.js.map +0 -1
  853. package/esm/export/layout.d.ts +0 -7
  854. package/esm/export/layout.js +0 -8
  855. package/esm/export/layout.js.map +0 -1
  856. package/esm/export/mark.d.ts +0 -18
  857. package/esm/export/mark.js +0 -34
  858. package/esm/export/mark.js.map +0 -1
  859. package/esm/export/series.d.ts +0 -61
  860. package/esm/export/series.js +0 -60
  861. package/esm/export/series.js.map +0 -1
  862. package/esm/mark/linkPath.js.map +0 -1
  863. package/esm/mark/polygon.d.ts +0 -18
  864. package/esm/mark/polygon.js +0 -28
  865. package/esm/mark/polygon.js.map +0 -1
  866. package/esm/theme/buildin-theme/dark.d.ts +0 -2
  867. package/esm/theme/buildin-theme/dark.js +0 -12
  868. package/esm/theme/buildin-theme/dark.js.map +0 -1
  869. /package/cjs/mark/{linkPath.d.ts → link-path.d.ts} +0 -0
  870. /package/esm/mark/{linkPath.d.ts → link-path.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/gauge/gauge-pointer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAIlE,OAAO,EAAE,eAAe,EAAE,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CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE;gBACzD,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,oBAAoB,EAAE;gBAC1D,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE;gBAC9B,MAAM,EAAE,GAAG;aACZ,CAAC,CAAC;SACJ;IACH,CAAC;IAED,aAAa;;QACX,MAAM,YAAY,GAAG,MAAC,MAAA,IAAI,CAAC,KAAK,0CAAE,eAA0C,0CAAE,MAAM,CAAC;QAErF,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAClC,eAAe,CACb,sBAAsB,CAAC,gBAAgB,CACrC;YACE,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,EACD,YAAY,CACb,EACD,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAC5D,CACF,CAAC;IACJ,CAAC;;AA3Ke,uBAAI,GAAW,cAAc,CAAC,YAAY,CAAC;AAG3C,uBAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACnF,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,aAAa,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACvG,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,IAChH","file":"gauge-pointer.js","sourcesContent":["import { MarkTypeEnum } from '../../mark/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { isValid } from '../../util';\nimport type { SeriesMarkMap } from '../interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IGaugePointerSeriesSpec, IGaugePointerSeriesTheme } from './interface';\nimport type { Datum, Maybe } from '../../typings';\nimport type { IPathMark } from '../../mark/path';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { ProgressLikeSeries } from '../polar/progress-like';\nimport type { IRectMark } from '../../mark/rect';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { BaseSeries } from '../base/base-series';\n\nexport class GaugePointerSeries extends ProgressLikeSeries<IGaugePointerSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.gaugePointer;\n type = SeriesTypeEnum.gaugePointer;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.pin]: { name: SeriesMarkNameEnum.pin, type: MarkTypeEnum.path },\n [SeriesMarkNameEnum.pinBackground]: { name: SeriesMarkNameEnum.pinBackground, type: MarkTypeEnum.path },\n [SeriesMarkNameEnum.pointer]: { name: SeriesMarkNameEnum.pointer, type: [MarkTypeEnum.path, MarkTypeEnum.rect] }\n };\n\n protected declare _theme: Maybe<IGaugePointerSeriesTheme>;\n protected declare _spec: IGaugePointerSeriesSpec;\n\n private _pinMark: IPathMark | null = null;\n private _pointerMark: IPathMark | IRectMark | null = null;\n private _pinBackgroundMark: IPathMark | null = null;\n\n protected _pointerType: MarkTypeEnum;\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n // 半径信息\n this.setRadiusField(this._spec.radiusField);\n\n this._pointerType = this._spec.pointer?.type === 'rect' ? MarkTypeEnum.rect : MarkTypeEnum.path;\n }\n\n initMark(): void {\n this._pinBackgroundMark = this._createMark(GaugePointerSeries.mark.pinBackground) as IPathMark;\n this._pointerMark = this._createMark(\n {\n ...GaugePointerSeries.mark.pointer,\n type: this._pointerType\n },\n {\n isSeriesMark: true\n }\n ) as IPathMark;\n this._pinMark = this._createMark(GaugePointerSeries.mark.pin) as IPathMark;\n }\n\n initMarkStyle(): void {\n this.initPinBackgroundMarkStyle();\n this.initPointerMarkStyle();\n this.initPinMarkStyle();\n }\n\n initGroups() {\n // do nothing\n }\n\n private initPointerMarkStyle() {\n const pointerMark = this._pointerMark;\n const pointerSpec = this._spec.pointer;\n if (pointerMark) {\n this.setMarkStyle(pointerMark, {\n x: () => {\n const { x } = this.angleAxisHelper.center();\n const dx = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n return x - dx;\n },\n y: (datum: Datum) => {\n const { y } = this.angleAxisHelper.center();\n const dy = this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n return y - dy;\n },\n anchor: () => {\n const { x, y } = this.angleAxisHelper.center();\n return [x, y];\n },\n fill: this.getColorAttribute(),\n zIndex: 200\n });\n if (this._pointerType === MarkTypeEnum.path) {\n this.setMarkStyle(pointerMark as IPathMark, {\n scaleX: this._getPointerWidth.bind(this),\n scaleY: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) + Math.PI / 2\n });\n } else {\n this.setMarkStyle(pointerMark as IRectMark, {\n width: this._getPointerWidth.bind(this),\n height: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) - Math.PI / 2\n });\n }\n this._trigger.registerMark(pointerMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(pointerMark);\n }\n }\n\n protected _getPointerWidth() {\n return this._spec.pointer.width * this._computeLayoutRadius();\n }\n\n protected _getPointerHeight(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const radiusField = this._radiusField[0];\n if (isValid(this.radiusAxisHelper) && isValid(radiusField)) {\n return (\n this.radiusAxisHelper.dataToPosition([datum[radiusField]]) -\n (pointerSpec?.innerPadding ?? 0) -\n (pointerSpec?.outerPadding ?? 10)\n );\n }\n return pointerSpec.height * this._computeLayoutRadius();\n }\n\n protected _getPointerAngle(datum: Datum) {\n return this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]]);\n }\n\n protected _getRotatedPointerCenterOffset(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const x = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n const y = -this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n const angle = this._getPointerAngle(datum) - Math.PI / 2;\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const x1 = x * cos + y * sin;\n const y1 = y * cos - x * sin;\n return {\n x: x1,\n y: -y1\n };\n }\n\n private initPinBackgroundMarkStyle() {\n const pinBackgroundMark = this._pinBackgroundMark;\n const pinBackgroundSpec = this._spec.pinBackground;\n if (pinBackgroundMark) {\n this.setMarkStyle(pinBackgroundMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n scaleX: () => pinBackgroundSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinBackgroundSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 100\n });\n }\n }\n\n private initPinMarkStyle() {\n const pinMark = this._pinMark;\n const pinSpec = this._spec.pin;\n if (pinMark) {\n this.setMarkStyle(pinMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n scaleX: () => pinSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 300\n });\n }\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n\n this._pointerMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.circularProgress(\n {\n startAngle: this._startAngle\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.pointer, this._spec)\n )\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/series/gauge/gauge-pointer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,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Aa,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACvG,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,IAChH","file":"gauge-pointer.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport { MarkTypeEnum } from '../../mark/interface';\nimport { isValid } from '../../util';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IGaugePointerSeriesSpec, IGaugePointerSeriesTheme } from './interface';\nimport type { Datum, Maybe } from '../../typings';\nimport type { IPathMark } from '../../mark/path';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { ProgressLikeSeries } from '../polar/progress-like';\nimport type { IRectMark } from '../../mark/rect';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { BaseSeries } from '../base/base-series';\nimport { VChart } from '../../core/vchart';\nimport { PathMark } from '../../mark/path';\nimport { RectMark } from '../../mark/rect';\n\nVChart.useMark([PathMark, RectMark]);\n\nexport class GaugePointerSeries extends ProgressLikeSeries<IGaugePointerSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.gaugePointer;\n type = SeriesTypeEnum.gaugePointer;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.pin]: { name: SeriesMarkNameEnum.pin, type: MarkTypeEnum.path },\n [SeriesMarkNameEnum.pinBackground]: { name: SeriesMarkNameEnum.pinBackground, type: MarkTypeEnum.path },\n [SeriesMarkNameEnum.pointer]: { name: SeriesMarkNameEnum.pointer, type: [MarkTypeEnum.path, MarkTypeEnum.rect] }\n };\n\n protected declare _theme: Maybe<IGaugePointerSeriesTheme>;\n protected declare _spec: IGaugePointerSeriesSpec;\n\n private _pinMark: IPathMark | null = null;\n private _pointerMark: IPathMark | IRectMark | null = null;\n private _pinBackgroundMark: IPathMark | null = null;\n\n protected _pointerType: MarkTypeEnum;\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n // 半径信息\n this.setRadiusField(this._spec.radiusField);\n\n this._pointerType = this._spec.pointer?.type === 'rect' ? MarkTypeEnum.rect : MarkTypeEnum.path;\n }\n\n initMark(): void {\n this._pinBackgroundMark = this._createMark(GaugePointerSeries.mark.pinBackground) as IPathMark;\n this._pointerMark = this._createMark(\n {\n ...GaugePointerSeries.mark.pointer,\n type: this._pointerType\n },\n {\n isSeriesMark: true\n }\n ) as IPathMark;\n this._pinMark = this._createMark(GaugePointerSeries.mark.pin) as IPathMark;\n }\n\n initMarkStyle(): void {\n this.initPinBackgroundMarkStyle();\n this.initPointerMarkStyle();\n this.initPinMarkStyle();\n }\n\n initGroups() {\n // do nothing\n }\n\n private initPointerMarkStyle() {\n const pointerMark = this._pointerMark;\n const pointerSpec = this._spec.pointer;\n if (pointerMark) {\n this.setMarkStyle(pointerMark, {\n x: () => {\n const { x } = this.angleAxisHelper.center();\n const dx = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n return x - dx;\n },\n y: (datum: Datum) => {\n const { y } = this.angleAxisHelper.center();\n const dy = this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n return y - dy;\n },\n anchor: () => {\n const { x, y } = this.angleAxisHelper.center();\n return [x, y];\n },\n fill: this.getColorAttribute(),\n zIndex: 200\n });\n if (this._pointerType === MarkTypeEnum.path) {\n this.setMarkStyle(pointerMark as IPathMark, {\n scaleX: this._getPointerWidth.bind(this),\n scaleY: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) + Math.PI / 2\n });\n } else {\n this.setMarkStyle(pointerMark as IRectMark, {\n width: this._getPointerWidth.bind(this),\n height: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) - Math.PI / 2\n });\n }\n this._trigger.registerMark(pointerMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(pointerMark);\n }\n }\n\n protected _getPointerWidth() {\n return this._spec.pointer.width * this._computeLayoutRadius();\n }\n\n protected _getPointerHeight(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const radiusField = this._radiusField[0];\n if (isValid(this.radiusAxisHelper) && isValid(radiusField)) {\n return (\n this.radiusAxisHelper.dataToPosition([datum[radiusField]]) -\n (pointerSpec?.innerPadding ?? 0) -\n (pointerSpec?.outerPadding ?? 10)\n );\n }\n return pointerSpec.height * this._computeLayoutRadius();\n }\n\n protected _getPointerAngle(datum: Datum) {\n return this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]]);\n }\n\n protected _getRotatedPointerCenterOffset(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const x = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n const y = -this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n const angle = this._getPointerAngle(datum) - Math.PI / 2;\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const x1 = x * cos + y * sin;\n const y1 = y * cos - x * sin;\n return {\n x: x1,\n y: -y1\n };\n }\n\n private initPinBackgroundMarkStyle() {\n const pinBackgroundMark = this._pinBackgroundMark;\n const pinBackgroundSpec = this._spec.pinBackground;\n if (pinBackgroundMark) {\n this.setMarkStyle(pinBackgroundMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n scaleX: () => pinBackgroundSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinBackgroundSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 100\n });\n }\n }\n\n private initPinMarkStyle() {\n const pinMark = this._pinMark;\n const pinSpec = this._spec.pin;\n if (pinMark) {\n this.setMarkStyle(pinMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n scaleX: () => pinSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 300\n });\n }\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n\n this._pointerMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.circularProgress(\n {\n startAngle: this._startAngle\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.pointer, this._spec)\n )\n );\n }\n}\n"]}
@@ -16,6 +16,12 @@ import { DEFAULT_MARK_ANIMATION } from "../../animation/config";
16
16
 
17
17
  import { BaseSeries } from "../base/base-series";
18
18
 
19
+ import { VChart } from "../../core/vchart";
20
+
21
+ import { ProgressArcMark } from "../../mark/progress-arc";
22
+
23
+ VChart.useMark([ ProgressArcMark ]);
24
+
19
25
  export class GaugeSeries extends ProgressLikeSeries {
20
26
  constructor() {
21
27
  super(...arguments), this.type = SeriesTypeEnum.gauge, this._segmentMark = null,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/gauge/gauge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIxE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,OAAO,WAAY,SAAQ,kBAAoC;IAArE;;QAEE,SA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,CAAC,WAAW,CAAC;QACrB,OAAO,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAES,iBAAiB,CAAC,KAAY;;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC9E,OAAO,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAED,aAAa;;QACX,MAAM,YAAY,GAAG,MAAC,MAAA,IAAI,CAAC,KAAK,0CAAE,eAA0C,0CAAE,MAAM,CAAC;QAErF,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAClC,eAAe,CACb,sBAAsB,CAAC,gBAAgB,CACrC;YACE,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,EACD,YAAY,CACb,EACD,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAC5D,CACF,CAAC;IACJ,CAAC;;AApIe,gBAAI,GAAW,cAAc,CAAC,KAAK,CAAC;AAGpC,gBAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC,WAAW,EAAE,EAClG,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,WAAW,EAAE,IAC9F","file":"gauge.js","sourcesContent":["import { MarkTypeEnum } from '../../mark/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { isValid, radians } from '../../util';\nimport type { SeriesMarkMap } from '../interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IGaugeSeriesSpec, IGaugeSeriesTheme } from './interface';\nimport { ProgressLikeSeries } from '../polar/progress-like/progress-like';\nimport type { IProgressArcMark } from '../../mark/progress-arc';\nimport { registerDataSetInstanceTransform } from '../../data/register';\nimport { SEGMENT_FIELD_END, SEGMENT_FIELD_START } from '../../constant';\nimport type { Datum } from '@visactor/vgrammar';\nimport type { Maybe } from '../../typings';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { BaseSeries } from '../base/base-series';\n\nexport class GaugeSeries extends ProgressLikeSeries<IGaugeSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.gauge;\n type = SeriesTypeEnum.gauge;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.segment]: { name: SeriesMarkNameEnum.segment, type: MarkTypeEnum.progressArc },\n [SeriesMarkNameEnum.track]: { name: SeriesMarkNameEnum.track, type: MarkTypeEnum.progressArc }\n };\n\n protected declare _theme: Maybe<IGaugeSeriesTheme>;\n\n private _segmentMark: IProgressArcMark | null = null;\n private _trackMark: IProgressArcMark | null = null;\n\n protected _stack: boolean = false;\n protected _padAngle: number = 0;\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n\n this._padAngle = radians(this._spec.padAngle ?? 0);\n }\n\n initData(): void {\n super.initData();\n\n /**\n * @description 将数据排序并调整图元的起始点为上一个数据的终点,但是终点维持不变\n */\n const spiltSegment = (data: Datum[], op: string) => {\n // 数据处理\n const dataCollect = [...data];\n dataCollect.sort((a, b) => a[this._angleField[0]] - b[this._angleField[0]]);\n dataCollect.forEach((datum: any, i) => {\n datum[SEGMENT_FIELD_END] = datum[this._angleField[0]];\n if (i > 0) {\n datum[SEGMENT_FIELD_START] = dataCollect[i - 1][SEGMENT_FIELD_END];\n } else {\n datum[SEGMENT_FIELD_START] = undefined;\n }\n });\n return dataCollect;\n };\n\n registerDataSetInstanceTransform(this._option.dataSet, 'spiltSegment', spiltSegment);\n this.getViewDataFilter()?.transform(\n {\n type: 'spiltSegment'\n },\n false\n );\n }\n\n initMark(): void {\n this._trackMark = this._createMark(GaugeSeries.mark.track) as IProgressArcMark;\n this._segmentMark = this._createMark(GaugeSeries.mark.segment, {\n isSeriesMark: true\n }) as IProgressArcMark;\n }\n\n initMarkStyle(): void {\n this.initTrackMarkStyle();\n this.initSegmentMarkStyle();\n }\n\n private initSegmentMarkStyle() {\n const segmentMark = this._segmentMark;\n if (segmentMark) {\n this.setMarkStyle(segmentMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n startAngle: this._getAngleValueStart.bind(this),\n endAngle: this._getAngleValueEnd.bind(this),\n innerRadius: () => this._computeLayoutRadius() * (this._spec.innerRadius ?? 0),\n // 需要优先兼容this._spec.radius\n outerRadius: () => this._computeLayoutRadius() * (this._spec.radius ?? this._spec.outerRadius ?? 1),\n cap: this._spec.roundCap ?? false,\n boundsMode: 'imprecise',\n cornerRadius: this._spec.cornerRadius,\n fill: this.getColorAttribute(),\n zIndex: 200,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // forceShowCap 是内部属性,不在接口中暴露\n forceShowCap: true\n });\n this._trigger.registerMark(segmentMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(segmentMark);\n }\n }\n\n private initTrackMarkStyle() {\n const trackMark = this._trackMark;\n if (trackMark) {\n this.setMarkStyle(trackMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n startAngle: this._startAngle,\n endAngle: this._endAngle,\n cornerRadius: this._spec.cornerRadius,\n zIndex: 100\n });\n this._trigger.registerMark(trackMark);\n }\n }\n\n protected _getAngleValueStart(datum: Datum) {\n const angle = isValid(datum[SEGMENT_FIELD_START])\n ? this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_START]])\n : this._startAngle;\n return angle + (this._spec.padAngle ?? 0) / 2;\n }\n\n protected _getAngleValueEnd(datum: Datum) {\n const angle = this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_END]]);\n return angle - (this._spec.padAngle ?? 0) / 2;\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n\n this._segmentMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.circularProgress(\n {\n startAngle: this._startAngle\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.segment, this._spec)\n )\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/series/gauge/gauge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIxE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAElC,MAAM,OAAO,WAAY,SAAQ,kBAAoC;IAArE;;QAEE,SAAI,GAAG,cAAc,CAAC,KAAK,CAAC;QAUpB,iBAAY,G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MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAES,iBAAiB,CAAC,KAAY;;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC9E,OAAO,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAED,aAAa;;QACX,MAAM,YAAY,GAAG,MAAC,MAAA,IAAI,CAAC,KAAK,0CAAE,eAA0C,0CAAE,MAAM,CAAC;QAErF,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAClC,eAAe,CACb,sBAAsB,CAAC,gBAAgB,CACrC;YACE,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,EACD,YAAY,CACb,EACD,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAC5D,CACF,CAAC;IACJ,CAAC;;AApIe,gBAAI,GAAW,cAAc,CAAC,KAAK,CAAC;AAGpC,gBAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC,WAAW,EAAE,EAClG,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,WAAW,EAAE,IAC9F","file":"gauge.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport { MarkTypeEnum } from '../../mark/interface';\nimport { isValid, radians } from '../../util';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IGaugeSeriesSpec, IGaugeSeriesTheme } from './interface';\nimport { ProgressLikeSeries } from '../polar/progress-like/progress-like';\nimport type { IProgressArcMark } from '../../mark/progress-arc';\nimport { registerDataSetInstanceTransform } from '../../data/register';\nimport { SEGMENT_FIELD_END, SEGMENT_FIELD_START } from '../../constant';\nimport type { Datum } from '@visactor/vgrammar';\nimport type { Maybe } from '../../typings';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { BaseSeries } from '../base/base-series';\nimport { VChart } from '../../core/vchart';\nimport { ProgressArcMark } from '../../mark/progress-arc';\n\nVChart.useMark([ProgressArcMark]);\n\nexport class GaugeSeries extends ProgressLikeSeries<IGaugeSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.gauge;\n type = SeriesTypeEnum.gauge;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.segment]: { name: SeriesMarkNameEnum.segment, type: MarkTypeEnum.progressArc },\n [SeriesMarkNameEnum.track]: { name: SeriesMarkNameEnum.track, type: MarkTypeEnum.progressArc }\n };\n\n protected declare _theme: Maybe<IGaugeSeriesTheme>;\n\n private _segmentMark: IProgressArcMark | null = null;\n private _trackMark: IProgressArcMark | null = null;\n\n protected _stack: boolean = false;\n protected _padAngle: number = 0;\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n\n this._padAngle = radians(this._spec.padAngle ?? 0);\n }\n\n initData(): void {\n super.initData();\n\n /**\n * @description 将数据排序并调整图元的起始点为上一个数据的终点,但是终点维持不变\n */\n const spiltSegment = (data: Datum[], op: string) => {\n // 数据处理\n const dataCollect = [...data];\n dataCollect.sort((a, b) => a[this._angleField[0]] - b[this._angleField[0]]);\n dataCollect.forEach((datum: any, i) => {\n datum[SEGMENT_FIELD_END] = datum[this._angleField[0]];\n if (i > 0) {\n datum[SEGMENT_FIELD_START] = dataCollect[i - 1][SEGMENT_FIELD_END];\n } else {\n datum[SEGMENT_FIELD_START] = undefined;\n }\n });\n return dataCollect;\n };\n\n registerDataSetInstanceTransform(this._option.dataSet, 'spiltSegment', spiltSegment);\n this.getViewDataFilter()?.transform(\n {\n type: 'spiltSegment'\n },\n false\n );\n }\n\n initMark(): void {\n this._trackMark = this._createMark(GaugeSeries.mark.track) as IProgressArcMark;\n this._segmentMark = this._createMark(GaugeSeries.mark.segment, {\n isSeriesMark: true\n }) as IProgressArcMark;\n }\n\n initMarkStyle(): void {\n this.initTrackMarkStyle();\n this.initSegmentMarkStyle();\n }\n\n private initSegmentMarkStyle() {\n const segmentMark = this._segmentMark;\n if (segmentMark) {\n this.setMarkStyle(segmentMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n startAngle: this._getAngleValueStart.bind(this),\n endAngle: this._getAngleValueEnd.bind(this),\n innerRadius: () => this._computeLayoutRadius() * (this._spec.innerRadius ?? 0),\n // 需要优先兼容this._spec.radius\n outerRadius: () => this._computeLayoutRadius() * (this._spec.radius ?? this._spec.outerRadius ?? 1),\n cap: this._spec.roundCap ?? false,\n boundsMode: 'imprecise',\n cornerRadius: this._spec.cornerRadius,\n fill: this.getColorAttribute(),\n zIndex: 200,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // forceShowCap 是内部属性,不在接口中暴露\n forceShowCap: true\n });\n this._trigger.registerMark(segmentMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(segmentMark);\n }\n }\n\n private initTrackMarkStyle() {\n const trackMark = this._trackMark;\n if (trackMark) {\n this.setMarkStyle(trackMark, {\n x: () => this.angleAxisHelper.center().x,\n y: () => this.angleAxisHelper.center().y,\n startAngle: this._startAngle,\n endAngle: this._endAngle,\n cornerRadius: this._spec.cornerRadius,\n zIndex: 100\n });\n this._trigger.registerMark(trackMark);\n }\n }\n\n protected _getAngleValueStart(datum: Datum) {\n const angle = isValid(datum[SEGMENT_FIELD_START])\n ? this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_START]])\n : this._startAngle;\n return angle + (this._spec.padAngle ?? 0) / 2;\n }\n\n protected _getAngleValueEnd(datum: Datum) {\n const angle = this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_END]]);\n return angle - (this._spec.padAngle ?? 0) / 2;\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n\n this._segmentMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.circularProgress(\n {\n startAngle: this._startAngle\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.segment, this._spec)\n )\n );\n }\n}\n"]}
@@ -18,6 +18,14 @@ import { HeatmapSeriesTooltipHelper } from "./tooltip-helper";
18
18
 
19
19
  import { BaseSeries } from "../base/base-series";
20
20
 
21
+ import { VChart } from "../../core/vchart";
22
+
23
+ import { CellMark } from "../../mark/cell";
24
+
25
+ import { TextMark } from "../../mark/text";
26
+
27
+ VChart.useMark([ CellMark, TextMark ]);
28
+
21
29
  export const DefaultBandWidth = 6;
22
30
 
23
31
  export class HeatmapSeries extends CartesianSeries {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/heatmap/heatmap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5F,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,E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,GAAG,IAAI,CAAC,KAAK,CAAC;QACjC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;YAChC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;YACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAES,WAAW;QACnB,IAAI,CAAC,cAAc,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,mBAAmB;QACjB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,OAAO,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;;AAtLe,kBAAI,GAAW,cAAc,CAAC,OAAO,CAAC;AAGtC,kBAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACrF,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,cAAc,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,IACzG","file":"heatmap.js","sourcesContent":["import { CartesianSeries } from '../cartesian/cartesian';\nimport { MarkTypeEnum } from '../../mark/interface';\nimport { AttributeLevel } from '../../constant';\nimport type { Maybe, Datum } from '../../typings';\nimport { array, merge } from '../../util';\nimport type { HeatmapAppearPreset } from './animation';\nimport { animationConfig, shouldDoMorph, userAnimationConfig } from '../../animation/utils';\nimport type { IHeatmapSeriesSpec, IHeatmapSeriesTheme } from './interface';\nimport type { IAxisHelper } from '../../component/axis/cartesian/interface';\nimport type { ITextMark } from '../../mark/text';\nimport type { SeriesMarkMap } from '../interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport type { ICellMark } from '../../mark/cell';\nimport { normalizePadding } from '@visactor/vutils';\nimport { HeatmapSeriesTooltipHelper } from './tooltip-helper';\nimport { BaseSeries } from '../base/base-series';\n\nexport const DefaultBandWidth = 6; // 默认的bandWidth,避免连续轴没有bandWidth\n\nexport class HeatmapSeries extends CartesianSeries<IHeatmapSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.heatmap;\n type = SeriesTypeEnum.heatmap;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.cell]: { name: SeriesMarkNameEnum.cell, type: MarkTypeEnum.cell },\n [SeriesMarkNameEnum.cellBackground]: { name: SeriesMarkNameEnum.cellBackground, type: MarkTypeEnum.cell }\n };\n\n protected declare _theme: Maybe<IHeatmapSeriesTheme>;\n\n protected _cellMark: ICellMark;\n protected _backgroundMark: ICellMark;\n\n protected _fieldValue!: string[];\n getFieldValue() {\n return this._fieldValue;\n }\n setFieldValue(f: string | string[]) {\n this._fieldValue = array(f);\n }\n\n setAttrFromSpec() {\n super.setAttrFromSpec();\n this.setFieldValue(this._spec.valueField);\n }\n\n initMark(): void {\n const progressive = {\n progressiveStep: this._spec.progressiveStep,\n progressiveThreshold: this._spec.progressiveThreshold,\n large: this._spec.large,\n largeThreshold: this._spec.largeThreshold\n };\n\n this._cellMark = this._createMark(HeatmapSeries.mark.cell, {\n morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('cell', this._spec)),\n defaultMorphElementKey: this.getDimensionField()[0],\n isSeriesMark: true,\n label: merge({ animation: this._spec.animation }, this._spec.label),\n progressive\n }) as ICellMark;\n\n this._backgroundMark = this._createMark(HeatmapSeries.mark.cellBackground, {\n progressive\n }) as ICellMark;\n }\n\n initMarkStyle(): void {\n this.initCellMarkStyle();\n this.initCellBackgroundMarkStyle();\n }\n\n initLabelMarkStyle(textMark: ITextMark) {\n if (!textMark) {\n return;\n }\n this.setMarkStyle(textMark, {\n fill: this.getColorAttribute(),\n text: (datum: Datum) => {\n return datum[this.getMeasureField()[0]];\n }\n });\n }\n\n initCellMarkStyle() {\n this.setMarkStyle(\n this._cellMark,\n {\n x: (datum: Datum) => {\n const pos = this.dataToPositionX(datum);\n return pos;\n },\n y: (datum: Datum) => {\n const pos = this.dataToPositionY(datum);\n return pos;\n },\n size: () => {\n return [this.getCellSize(this._xAxisHelper), this.getCellSize(this._yAxisHelper)];\n },\n fill: this.getColorAttribute()\n },\n 'normal',\n AttributeLevel.Series\n );\n\n this._trigger.registerMark(this._cellMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(this._cellMark);\n }\n\n initCellBackgroundMarkStyle() {\n const padding = normalizePadding(this._spec.cellBackground?.style?.padding ?? 0);\n this.setMarkStyle(\n this._backgroundMark,\n {\n x: (datum: Datum) => {\n const width = this.getCellSize(this._xAxisHelper);\n const pos = this.dataToPositionX(datum);\n return pos - width / 2 + padding[3];\n },\n y: (datum: Datum) => {\n const height = this.getCellSize(this._yAxisHelper);\n const pos = this.dataToPositionY(datum);\n return pos - height / 2 + padding[0];\n },\n width: () => {\n return this.getCellSize(this._xAxisHelper) - padding[1] - padding[3];\n },\n height: () => {\n return this.getCellSize(this._yAxisHelper) - padding[0] - padding[2];\n }\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n\n // 通用的默认颜色映射 用户设置优先级比这个高,会在setStyle中处理\n getColorAttribute() {\n return {\n // TODO: 为热力图实现默认线性颜色 scale\n scale: this._option.globalScale.getScale('color') ?? this.getDefaultColorScale(),\n field: this.getFieldValue[0]\n };\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<HeatmapAppearPreset>)?.preset;\n // 分组数据的dataIndex应该与x轴顺序一致,而非data[DEFAULT_DATA_INDEX]顺序\n const dataIndex = (datum: any) => {\n const xValue = datum?.[this._fieldX[0]];\n const xIndex = this.getViewDataStatistics()?.latestData?.[this._fieldX[0]]?.values.indexOf(xValue);\n // 不应该出现xIndex === -1 || undefined的情况\n return xIndex || 0;\n };\n\n this._cellMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.heatmap(appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.cell, this._spec),\n {\n dataIndex\n }\n )\n );\n }\n\n protected getCellSize(axisHelper: IAxisHelper) {\n return axisHelper.getBandwidth?.(0) ?? DefaultBandWidth;\n }\n\n /**\n * spec 更新\n * @param spec\n * @returns\n */\n updateSpec(spec: IHeatmapSeriesSpec) {\n // super updateSpec 会执行 setAttrFromSpec 所以先缓存比对值\n const { direction } = this._spec;\n const result = super.updateSpec(spec);\n if (spec.direction !== direction) {\n result.change = true;\n result.reRender = true;\n result.reMake = true;\n }\n return result;\n }\n\n protected initTooltip() {\n this._tooltipHelper = new HeatmapSeriesTooltipHelper(this);\n }\n\n getDefaultShapeType(): string {\n return 'square';\n }\n\n getDimensionField(): string[] {\n return [].concat(this.fieldX, this.fieldY);\n }\n\n getMeasureField(): string[] {\n return this.getFieldValue();\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/series/heatmap/heatmap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5F,OAAO,EAAE,kBAAk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AAE,EACrF,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,cAAc,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,IACzG","file":"heatmap.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport { CartesianSeries } from '../cartesian/cartesian';\nimport { MarkTypeEnum } from '../../mark/interface';\nimport { AttributeLevel } from '../../constant';\nimport type { Maybe, Datum } from '../../typings';\nimport { array, merge } from '../../util';\nimport type { HeatmapAppearPreset } from './animation';\nimport { animationConfig, shouldDoMorph, userAnimationConfig } from '../../animation/utils';\nimport type { IHeatmapSeriesSpec, IHeatmapSeriesTheme } from './interface';\nimport type { IAxisHelper } from '../../component/axis/cartesian/interface';\nimport type { ITextMark } from '../../mark/text';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport type { ICellMark } from '../../mark/cell';\nimport { normalizePadding } from '@visactor/vutils';\nimport { HeatmapSeriesTooltipHelper } from './tooltip-helper';\nimport { BaseSeries } from '../base/base-series';\nimport { VChart } from '../../core/vchart';\nimport { CellMark } from '../../mark/cell';\nimport { TextMark } from '../../mark/text';\n\nVChart.useMark([CellMark, TextMark]);\n\nexport const DefaultBandWidth = 6; // 默认的bandWidth,避免连续轴没有bandWidth\n\nexport class HeatmapSeries extends CartesianSeries<IHeatmapSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.heatmap;\n type = SeriesTypeEnum.heatmap;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.cell]: { name: SeriesMarkNameEnum.cell, type: MarkTypeEnum.cell },\n [SeriesMarkNameEnum.cellBackground]: { name: SeriesMarkNameEnum.cellBackground, type: MarkTypeEnum.cell }\n };\n\n protected declare _theme: Maybe<IHeatmapSeriesTheme>;\n\n protected _cellMark: ICellMark;\n protected _backgroundMark: ICellMark;\n\n protected _fieldValue!: string[];\n getFieldValue() {\n return this._fieldValue;\n }\n setFieldValue(f: string | string[]) {\n this._fieldValue = array(f);\n }\n\n setAttrFromSpec() {\n super.setAttrFromSpec();\n this.setFieldValue(this._spec.valueField);\n }\n\n initMark(): void {\n const progressive = {\n progressiveStep: this._spec.progressiveStep,\n progressiveThreshold: this._spec.progressiveThreshold,\n large: this._spec.large,\n largeThreshold: this._spec.largeThreshold\n };\n\n this._cellMark = this._createMark(HeatmapSeries.mark.cell, {\n morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('cell', this._spec)),\n defaultMorphElementKey: this.getDimensionField()[0],\n isSeriesMark: true,\n label: merge({ animation: this._spec.animation }, this._spec.label),\n progressive\n }) as ICellMark;\n\n this._backgroundMark = this._createMark(HeatmapSeries.mark.cellBackground, {\n progressive\n }) as ICellMark;\n }\n\n initMarkStyle(): void {\n this.initCellMarkStyle();\n this.initCellBackgroundMarkStyle();\n }\n\n initLabelMarkStyle(textMark: ITextMark) {\n if (!textMark) {\n return;\n }\n this.setMarkStyle(textMark, {\n fill: this.getColorAttribute(),\n text: (datum: Datum) => {\n return datum[this.getMeasureField()[0]];\n }\n });\n }\n\n initCellMarkStyle() {\n this.setMarkStyle(\n this._cellMark,\n {\n x: (datum: Datum) => {\n const pos = this.dataToPositionX(datum);\n return pos;\n },\n y: (datum: Datum) => {\n const pos = this.dataToPositionY(datum);\n return pos;\n },\n size: () => {\n return [this.getCellSize(this._xAxisHelper), this.getCellSize(this._yAxisHelper)];\n },\n fill: this.getColorAttribute()\n },\n 'normal',\n AttributeLevel.Series\n );\n\n this._trigger.registerMark(this._cellMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(this._cellMark);\n }\n\n initCellBackgroundMarkStyle() {\n const padding = normalizePadding(this._spec.cellBackground?.style?.padding ?? 0);\n this.setMarkStyle(\n this._backgroundMark,\n {\n x: (datum: Datum) => {\n const width = this.getCellSize(this._xAxisHelper);\n const pos = this.dataToPositionX(datum);\n return pos - width / 2 + padding[3];\n },\n y: (datum: Datum) => {\n const height = this.getCellSize(this._yAxisHelper);\n const pos = this.dataToPositionY(datum);\n return pos - height / 2 + padding[0];\n },\n width: () => {\n return this.getCellSize(this._xAxisHelper) - padding[1] - padding[3];\n },\n height: () => {\n return this.getCellSize(this._yAxisHelper) - padding[0] - padding[2];\n }\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n\n // 通用的默认颜色映射 用户设置优先级比这个高,会在setStyle中处理\n getColorAttribute() {\n return {\n // TODO: 为热力图实现默认线性颜色 scale\n scale: this._option.globalScale.getScale('color') ?? this.getDefaultColorScale(),\n field: this.getFieldValue[0]\n };\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<HeatmapAppearPreset>)?.preset;\n // 分组数据的dataIndex应该与x轴顺序一致,而非data[DEFAULT_DATA_INDEX]顺序\n const dataIndex = (datum: any) => {\n const xValue = datum?.[this._fieldX[0]];\n const xIndex = this.getViewDataStatistics()?.latestData?.[this._fieldX[0]]?.values.indexOf(xValue);\n // 不应该出现xIndex === -1 || undefined的情况\n return xIndex || 0;\n };\n\n this._cellMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.heatmap(appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.cell, this._spec),\n {\n dataIndex\n }\n )\n );\n }\n\n protected getCellSize(axisHelper: IAxisHelper) {\n return axisHelper.getBandwidth?.(0) ?? DefaultBandWidth;\n }\n\n /**\n * spec 更新\n * @param spec\n * @returns\n */\n updateSpec(spec: IHeatmapSeriesSpec) {\n // super updateSpec 会执行 setAttrFromSpec 所以先缓存比对值\n const { direction } = this._spec;\n const result = super.updateSpec(spec);\n if (spec.direction !== direction) {\n result.change = true;\n result.reRender = true;\n result.reMake = true;\n }\n return result;\n }\n\n protected initTooltip() {\n this._tooltipHelper = new HeatmapSeriesTooltipHelper(this);\n }\n\n getDefaultShapeType(): string {\n return 'square';\n }\n\n getDimensionField(): string[] {\n return [].concat(this.fieldX, this.fieldY);\n }\n\n getMeasureField(): string[] {\n return this.getFieldValue();\n }\n}\n"]}
@@ -0,0 +1,66 @@
1
+ import { WaterfallSeries } from './waterfall/waterfall';
2
+ import type { IWaterfallSeriesSpec } from './waterfall/interface';
3
+ import { BoxPlotSeries } from './box-plot/box-plot';
4
+ import type { IBoxPlotSeriesSpec } from './box-plot/interface';
5
+ import { LineSeries } from './line/line';
6
+ import type { ILineSeriesSpec } from './line/interface';
7
+ import { BarSeries } from './bar/bar';
8
+ import { Bar3dSeries } from './bar/bar-3d';
9
+ import type { IBar3dSeriesSpec, IBarSeriesSpec } from './bar/interface';
10
+ import { RangeColumnSeries } from './range-column/rangeColumn';
11
+ import { RangeColumn3dSeries } from './range-column/rangeColumn-3d';
12
+ import type { IRangeColumn3dSeriesSpec, IRangeColumnSeriesSpec } from './range-column/interface';
13
+ import { RangeAreaSeries } from './range-area/range-area';
14
+ import type { IRangeAreaSeriesSpec } from './range-area/interface';
15
+ import { MapSeries } from './map/map';
16
+ import type { IMapSeriesSpec } from './map/interface';
17
+ import { PieSeries } from './pie/pie';
18
+ import { Pie3dSeries } from './pie/pie-3d';
19
+ import type { IPie3dSeriesSpec } from './pie/interface';
20
+ import type { IPieSeriesSpec } from './pie/interface';
21
+ import { ScatterSeries } from './scatter/scatter';
22
+ import type { IScatterSeriesSpec } from './scatter/interface';
23
+ import { RoseSeries } from './rose/rose';
24
+ import type { IRoseSeriesSpec } from './rose/interface';
25
+ import { RadarSeries } from './radar/radar';
26
+ import type { IRadarSeriesSpec } from './radar/interface';
27
+ import { AreaSeries } from './area/area';
28
+ import type { IAreaSeriesSpec } from './area/interface';
29
+ import { DotSeries } from './dot/dot';
30
+ import type { IDotSeriesSpec } from './dot/interface';
31
+ import { LinkSeries } from './link/link';
32
+ import type { ILinkSeriesSpec } from './link/interface';
33
+ import { CircularProgressSeries } from './progress/circular/circular';
34
+ import type { ICircularProgressSeriesSpec } from './progress/circular/interface';
35
+ import { LinearProgressSeries } from './progress/linear/linear';
36
+ import type { ILinearProgressSeriesSpec } from './progress/linear/interface';
37
+ import { WordCloudSeries } from './word-cloud/word-cloud';
38
+ import { WordCloud3dSeries } from './word-cloud/word-cloud-3d';
39
+ import type { IWordCloud3dSeriesSpec, IWordCloudSeriesSpec } from './word-cloud/interface';
40
+ import { FunnelSeries } from './funnel/funnel';
41
+ import { Funnel3dSeries } from './funnel/funnel-3d';
42
+ import type { IFunnel3dSeriesSpec, IFunnelSeriesSpec } from './funnel/interface';
43
+ import { SunburstSeries } from './sunburst/sunburst';
44
+ import type { ISunburstSeriesSpec } from './sunburst/interface';
45
+ import { CirclePackingSeries } from './circle-packing/circle-packing';
46
+ import type { ICirclePackingSeriesSpec } from './circle-packing/interface';
47
+ import { SankeySeries } from './sankey/sankey';
48
+ import type { ISankeySeriesSpec } from './sankey/interface';
49
+ import { TreeMapSeries } from './treemap/treemap';
50
+ import type { ITreemapSeriesSpec } from './treemap/interface';
51
+ import type { IGaugePointerSeriesSpec, IGaugeSeriesSpec } from './gauge';
52
+ import { GaugePointerSeries, GaugeSeries } from './gauge';
53
+ import { HeatmapSeries } from './heatmap/heatmap';
54
+ import type { IHeatmapSeriesSpec } from './heatmap/interface';
55
+ import { BaseSeries } from './base/base-series';
56
+ import type { ICartesianSeriesSpec } from './cartesian';
57
+ import { CartesianSeries } from './cartesian';
58
+ import { PolarSeries } from './polar/polar';
59
+ import type { IPolarSeriesSpec } from './polar/interface';
60
+ import type { IProgressLikeSeriesSpec } from './polar/progress-like';
61
+ import { ProgressLikeSeries } from './polar/progress-like';
62
+ import type { IRoseLikeSeriesSpec } from './polar/rose-like';
63
+ import { RoseLikeSeries } from './polar/rose-like';
64
+ import type { ISeries } from './interface';
65
+ export { WaterfallSeries, Bar3dSeries, BarSeries, BoxPlotSeries, LineSeries, RadarSeries, RangeAreaSeries, RangeColumn3dSeries, RangeColumnSeries, MapSeries, Pie3dSeries, PieSeries, SankeySeries, ScatterSeries, SunburstSeries, RoseLikeSeries, RoseSeries, AreaSeries, DotSeries, LinearProgressSeries, LinkSeries, CirclePackingSeries, CircularProgressSeries, WordCloud3dSeries, WordCloudSeries, Funnel3dSeries, FunnelSeries, TreeMapSeries, GaugePointerSeries, GaugeSeries, HeatmapSeries, BaseSeries, CartesianSeries, PolarSeries, ProgressLikeSeries };
66
+ export type { ISeries, IRoseLikeSeriesSpec, IAreaSeriesSpec, IBar3dSeriesSpec, IBarSeriesSpec, IBoxPlotSeriesSpec, ICartesianSeriesSpec, ICirclePackingSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnel3dSeriesSpec, IFunnelSeriesSpec, IGaugePointerSeriesSpec, IGaugeSeriesSpec, IHeatmapSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPie3dSeriesSpec, IPieSeriesSpec, IPolarSeriesSpec, IProgressLikeSeriesSpec, IRadarSeriesSpec, IRangeAreaSeriesSpec, IRangeColumn3dSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, ISankeySeriesSpec, IScatterSeriesSpec, ISunburstSeriesSpec, ITreemapSeriesSpec, IWaterfallSeriesSpec, IWordCloud3dSeriesSpec, IWordCloudSeriesSpec };
@@ -0,0 +1,70 @@
1
+ import { WaterfallSeries } from "./waterfall/waterfall";
2
+
3
+ import { BoxPlotSeries } from "./box-plot/box-plot";
4
+
5
+ import { LineSeries } from "./line/line";
6
+
7
+ import { BarSeries } from "./bar/bar";
8
+
9
+ import { Bar3dSeries } from "./bar/bar-3d";
10
+
11
+ import { RangeColumnSeries } from "./range-column/rangeColumn";
12
+
13
+ import { RangeColumn3dSeries } from "./range-column/rangeColumn-3d";
14
+
15
+ import { RangeAreaSeries } from "./range-area/range-area";
16
+
17
+ import { MapSeries } from "./map/map";
18
+
19
+ import { PieSeries } from "./pie/pie";
20
+
21
+ import { Pie3dSeries } from "./pie/pie-3d";
22
+
23
+ import { ScatterSeries } from "./scatter/scatter";
24
+
25
+ import { RoseSeries } from "./rose/rose";
26
+
27
+ import { RadarSeries } from "./radar/radar";
28
+
29
+ import { AreaSeries } from "./area/area";
30
+
31
+ import { DotSeries } from "./dot/dot";
32
+
33
+ import { LinkSeries } from "./link/link";
34
+
35
+ import { CircularProgressSeries } from "./progress/circular/circular";
36
+
37
+ import { LinearProgressSeries } from "./progress/linear/linear";
38
+
39
+ import { WordCloudSeries } from "./word-cloud/word-cloud";
40
+
41
+ import { WordCloud3dSeries } from "./word-cloud/word-cloud-3d";
42
+
43
+ import { FunnelSeries } from "./funnel/funnel";
44
+
45
+ import { Funnel3dSeries } from "./funnel/funnel-3d";
46
+
47
+ import { SunburstSeries } from "./sunburst/sunburst";
48
+
49
+ import { CirclePackingSeries } from "./circle-packing/circle-packing";
50
+
51
+ import { SankeySeries } from "./sankey/sankey";
52
+
53
+ import { TreeMapSeries } from "./treemap/treemap";
54
+
55
+ import { GaugePointerSeries, GaugeSeries } from "./gauge";
56
+
57
+ import { HeatmapSeries } from "./heatmap/heatmap";
58
+
59
+ import { BaseSeries } from "./base/base-series";
60
+
61
+ import { CartesianSeries } from "./cartesian";
62
+
63
+ import { PolarSeries } from "./polar/polar";
64
+
65
+ import { ProgressLikeSeries } from "./polar/progress-like";
66
+
67
+ import { RoseLikeSeries } from "./polar/rose-like";
68
+
69
+ export { WaterfallSeries, Bar3dSeries, BarSeries, BoxPlotSeries, LineSeries, RadarSeries, RangeAreaSeries, RangeColumn3dSeries, RangeColumnSeries, MapSeries, Pie3dSeries, PieSeries, SankeySeries, ScatterSeries, SunburstSeries, RoseLikeSeries, RoseSeries, AreaSeries, DotSeries, LinearProgressSeries, LinkSeries, CirclePackingSeries, CircularProgressSeries, WordCloud3dSeries, WordCloudSeries, Funnel3dSeries, FunnelSeries, TreeMapSeries, GaugePointerSeries, GaugeSeries, HeatmapSeries, BaseSeries, CartesianSeries, PolarSeries, ProgressLikeSeries };
70
+ //# s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,oBAAoB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,OAAO,EACL,eAAe,EACf,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,kBAAkB,EACnB,CAAC","file":"index.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\n/**\n * @description export all mark modules\n */\nimport { WaterfallSeries } from './waterfall/waterfall';\nimport type { IWaterfallSeriesSpec } from './waterfall/interface';\nimport { BoxPlotSeries } from './box-plot/box-plot';\nimport type { IBoxPlotSeriesSpec } from './box-plot/interface';\nimport { LineSeries } from './line/line';\nimport type { ILineSeriesSpec } from './line/interface';\nimport { BarSeries } from './bar/bar';\nimport { Bar3dSeries } from './bar/bar-3d';\nimport type { IBar3dSeriesSpec, IBarSeriesSpec } from './bar/interface';\nimport { RangeColumnSeries } from './range-column/rangeColumn';\nimport { RangeColumn3dSeries } from './range-column/rangeColumn-3d';\nimport type { IRangeColumn3dSeriesSpec, IRangeColumnSeriesSpec } from './range-column/interface';\nimport { RangeAreaSeries } from './range-area/range-area';\nimport type { IRangeAreaSeriesSpec } from './range-area/interface';\nimport { MapSeries } from './map/map';\nimport type { IMapSeriesSpec } from './map/interface';\nimport { PieSeries } from './pie/pie';\nimport { Pie3dSeries } from './pie/pie-3d';\nimport type { IPie3dSeriesSpec } from './pie/interface';\nimport type { IPieSeriesSpec } from './pie/interface';\nimport { ScatterSeries } from './scatter/scatter';\nimport type { IScatterSeriesSpec } from './scatter/interface';\nimport { RoseSeries } from './rose/rose';\nimport type { IRoseSeriesSpec } from './rose/interface';\nimport { RadarSeries } from './radar/radar';\nimport type { IRadarSeriesSpec } from './radar/interface';\nimport { AreaSeries } from './area/area';\nimport type { IAreaSeriesSpec } from './area/interface';\nimport { DotSeries } from './dot/dot';\nimport type { IDotSeriesSpec } from './dot/interface';\nimport { LinkSeries } from './link/link';\nimport type { ILinkSeriesSpec } from './link/interface';\nimport { CircularProgressSeries } from './progress/circular/circular';\nimport type { ICircularProgressSeriesSpec } from './progress/circular/interface';\nimport { LinearProgressSeries } from './progress/linear/linear';\nimport type { ILinearProgressSeriesSpec } from './progress/linear/interface';\nimport { WordCloudSeries } from './word-cloud/word-cloud';\nimport { WordCloud3dSeries } from './word-cloud/word-cloud-3d';\nimport type { IWordCloud3dSeriesSpec, IWordCloudSeriesSpec } from './word-cloud/interface';\nimport { FunnelSeries } from './funnel/funnel';\nimport { Funnel3dSeries } from './funnel/funnel-3d';\nimport type { IFunnel3dSeriesSpec, IFunnelSeriesSpec } from './funnel/interface';\nimport { SunburstSeries } from './sunburst/sunburst';\nimport type { ISunburstSeriesSpec } from './sunburst/interface';\nimport { CirclePackingSeries } from './circle-packing/circle-packing';\nimport type { ICirclePackingSeriesSpec } from './circle-packing/interface';\nimport { SankeySeries } from './sankey/sankey';\nimport type { ISankeySeriesSpec } from './sankey/interface';\nimport { TreeMapSeries } from './treemap/treemap';\nimport type { ITreemapSeriesSpec } from './treemap/interface';\nimport type { IGaugePointerSeriesSpec, IGaugeSeriesSpec } from './gauge';\nimport { GaugePointerSeries, GaugeSeries } from './gauge';\nimport { HeatmapSeries } from './heatmap/heatmap';\nimport type { IHeatmapSeriesSpec } from './heatmap/interface';\nimport { BaseSeries } from './base/base-series';\nimport type { ICartesianSeriesSpec } from './cartesian';\nimport { CartesianSeries } from './cartesian';\nimport { PolarSeries } from './polar/polar';\nimport type { IPolarSeriesSpec } from './polar/interface';\nimport type { IProgressLikeSeriesSpec } from './polar/progress-like';\nimport { ProgressLikeSeries } from './polar/progress-like';\nimport type { IRoseLikeSeriesSpec } from './polar/rose-like';\nimport { RoseLikeSeries } from './polar/rose-like';\n\nimport type { ISeries } from './interface';\n\nexport {\n WaterfallSeries,\n Bar3dSeries,\n BarSeries,\n BoxPlotSeries,\n LineSeries,\n RadarSeries,\n RangeAreaSeries,\n RangeColumn3dSeries,\n RangeColumnSeries,\n MapSeries,\n Pie3dSeries,\n PieSeries,\n SankeySeries,\n ScatterSeries,\n SunburstSeries,\n RoseLikeSeries,\n RoseSeries,\n AreaSeries,\n DotSeries,\n LinearProgressSeries,\n LinkSeries,\n CirclePackingSeries,\n CircularProgressSeries,\n WordCloud3dSeries,\n WordCloudSeries,\n Funnel3dSeries,\n FunnelSeries,\n TreeMapSeries,\n GaugePointerSeries,\n GaugeSeries,\n HeatmapSeries,\n BaseSeries,\n CartesianSeries,\n PolarSeries,\n ProgressLikeSeries\n};\n\nexport type {\n ISeries,\n IRoseLikeSeriesSpec,\n IAreaSeriesSpec,\n IBar3dSeriesSpec,\n IBarSeriesSpec,\n IBoxPlotSeriesSpec,\n ICartesianSeriesSpec,\n ICirclePackingSeriesSpec,\n ICircularProgressSeriesSpec,\n IDotSeriesSpec,\n IFunnel3dSeriesSpec,\n IFunnelSeriesSpec,\n IGaugePointerSeriesSpec,\n IGaugeSeriesSpec,\n IHeatmapSeriesSpec,\n ILineSeriesSpec,\n ILinearProgressSeriesSpec,\n ILinkSeriesSpec,\n IMapSeriesSpec,\n IPie3dSeriesSpec,\n IPieSeriesSpec,\n IPolarSeriesSpec,\n IProgressLikeSeriesSpec,\n IRadarSeriesSpec,\n IRangeAreaSeriesSpec,\n IRangeColumn3dSeriesSpec,\n IRangeColumnSeriesSpec,\n IRoseSeriesSpec,\n ISankeySeriesSpec,\n IScatterSeriesSpec,\n ISunburstSeriesSpec,\n ITreemapSeriesSpec,\n IWaterfallSeriesSpec,\n IWordCloud3dSeriesSpec,\n IWordCloudSeriesSpec\n};\n"]}
@@ -150,6 +150,7 @@ export interface IArcSeries extends IPolarSeries {
150
150
  computeRadius: (r: number, k?: number) => number;
151
151
  computeDatumRadius: (datum: any, state?: StateValueType) => number;
152
152
  }
153
- export interface IFunnelSeries {
153
+ export interface IFunnelSeries extends ISeries {
154
154
  getPoints: (datum: any) => IPoint[];
155
+ getCategoryField: () => string;
155
156
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/interface/series.ts"],"names":[],"mappings":"","file":"series.js","sourcesContent":["import type { ITrigger } from '../../interaction/interface';\nimport type { PanEventParam, ZoomEventParam } from '../../event/interface';\nimport type { IModel, ILayoutItem } from '../../model/interface';\nimport type { DataSet, DataView, ITransformOptions } from '@visactor/vdataset';\nimport type { IMark } from '../../mark/interface';\nimport type { CoordinateType, IPoint, IPolarPoint } from '../../typings/coordinate';\nimport type { IRegion } from '../../region/interface';\nimport type { IBaseScale } from '@visactor/vscale';\nimport type { Group } from '../base/group';\nimport type { IAxisHelper } from '../../component/axis/cartesian/interface';\nimport type { IPolarAxisHelper } from '../../component/axis/polar/interface';\nimport type { ISeriesSeriesInfo, ISeriesStackData, ISeriesUpdateDataOption } from './common';\nimport type { ISeriesTooltipHelper } from './tooltip-helper';\nimport type { IInvalidType, Datum, DirectionType } from '../../typings';\nimport type { StateValueType } from '../../compile/mark';\nimport type { StatisticOperations } from '../../data/transforms/dimension-statistics';\nimport type { IGroupMark } from '../../mark/group';\nimport type { ITextMark } from '../../mark/text';\nimport type { IArcLabelSpec } from '../pie/interface';\nimport type { IGeoCoordinateHelper } from '../../component/geo/interface';\n\n// 使用类型约束系列支持的样式,但是感觉这样不合理 不使用这样的方式去做\n// export interface ISeries<A extends string> extends IModel\n\nexport interface ISeries extends IModel, ILayoutItem {\n readonly type: string;\n readonly name?: string;\n\n // 配置\n getSpec: () => any;\n\n // 坐标系信息\n readonly coordinate: CoordinateType;\n\n // 数据\n getRawData: () => DataView | undefined;\n getViewDataFilter: () => DataView | undefined;\n getViewData: () => DataView | undefined;\n getViewDataProductId: () => string | undefined;\n getRawDataStatistics?: () => DataView | undefined;\n getViewDataStatistics?: () => DataView | undefined;\n getDataSet?: () => DataSet;\n getFieldAlias: (field: string) => string;\n // 更新原始数据\n updateRawData: (d: any, opt: ISeriesUpdateDataOption) => void;\n setData?: (dv: DataView) => void;\n rawDataUpdate: (d: DataView) => void;\n viewDataUpdate: (d: DataView) => void;\n viewDataStatisticsUpdate: (d: DataView) => void;\n addViewDataFilter: (option: ITransformOptions) => void;\n reFilterViewData: () => void;\n reTransformViewData: () => void;\n fillData: () => void;\n\n /**\n * 常见数据使用问题\n *\n * 一、使用图表最终展示数据\n * 比如 markline,数值轴 这样的组件\n * 需要操作展示数据,做 筛选 | 变换 的\n * 比如图例,datazoom\n series.getViewData().transform({},false)\n * 需要获取展示数据,生成自身数据做自身展示的 使用消息机制。比如 轴\n series.event.on('viewDataStatisticsUpdate' | 'viewDataUpdate', { filter: ({ model }) => model?.id === series.id }, () => {\n this.updateData();\n });\n *\n * 二、使用图表原始数据\n * 比如图例,datazoom\n * 需要使用原始数据信息,生成自身数据\n * 比如图例,datazoom\n series.getRawData().parserData | latestData // parserData latestData 区别见下面说明\n series.getRawDataStatistics().latestData\n\n series.event.on('rawDataUpdate', { filter: ({ model }) => model?.id === series.id }, () => {\n this.updateData();\n });\n * 或者使用系列自身的特殊api 特殊情况外不建议这样用\n series.getSeriesInfoList()\n\n * 建议:使用数据时需要注意数据更新,使用系列数据更新组件数据的场景,只建议使用消息监听\n series.event.on(\n 'viewDataStatisticsUpdate' |\n 'viewDataUpdate' |\n 'rawDataUpdate',\n { filter: ({ model }) => model?.id === series.id })\n */\n\n // 区域\n getRegion: () => IRegion;\n\n // mark\n initMark: () => void;\n getMarks: () => IMark[];\n getMarksWithoutRoot: () => IMark[];\n getMarkNameMap: () => Record<string, IMark>;\n getMarksInType: (type: string | string[]) => IMark[];\n getMarkInName: (name: string) => IMark | undefined;\n getMarkInId: (id: number) => IMark | undefined;\n\n getRootMark: () => IGroupMark;\n\n // tooltip\n tooltipHelper: ISeriesTooltipHelper;\n\n // example\n /**\n * [\n * {\n * fields: {\n * x: '周一',\n * __VChart_STACK: 'stack'\n * },\n * valueField: 'y',\n * values: [{x: '周一', y: 20}];\n * },\n * {\n * fields: {\n * x: '周一',\n * stack: 'stackA'\n * },\n * valueField: 'y',\n * values: [{x: '周一', y: 20, stack: 'stackA'}];\n * },\n * {\n * fields: {\n * x: '周一',\n * stack: 'stackB'\n * },\n * valueField: 'y',\n * values: [{x: '周一', y: 20, stack: 'stackB'}];\n * },\n * ]\n */\n getStackData: () => ISeriesStackData;\n\n getStack: () => boolean;\n\n getStackValueField: () => string;\n setValueFieldToStack: () => void;\n setValueFieldToPercent: () => void;\n setValueFieldToStackOffsetSilhouette: () => void;\n\n getStackGroupFields: () => string[];\n getSeriesField: () => string | undefined;\n getSeriesKeys: () => string[];\n getSeriesStyle: (datum: Datum) => ISeriesSeriesInfo['style'];\n getSeriesInfoList: () => ISeriesSeriesInfo[];\n getGroups: () => Group | undefined;\n getDimensionField: () => string[];\n getMeasureField: () => string[];\n getStatisticFields: () => { key: string; operations: StatisticOperations }[];\n\n setSeriesField: (field: string) => void;\n handleZoom?: (e: ZoomEventParam) => void;\n handlePan?: (e: PanEventParam) => void;\n\n // 数据映射\n dataToPosition: (datum: any) => IPoint | null;\n dataToPositionX: (xValue: any) => number | null;\n dataToPositionY: (yValue: any) => number | null;\n dataToPositionZ?: (yValue: any) => number | null;\n\n getColorAttribute: () => { scale: IBaseScale; field: string };\n getDefaultColorDomain: () => any[];\n\n getInvalidType: () => IInvalidType;\n\n // 交互\n getTrigger: () => ITrigger;\n\n /**\n * 获取系列默认的缩略图形\n * @returns 默认的缩略图形\n */\n getDefaultShapeType: () => string;\n /** 获取系列标签配置 */\n initLabelMarkStyle?: (textMark: ITextMark) => void;\n}\n\nexport interface ICartesianSeries extends ISeries {\n readonly coordinate: 'cartesian';\n readonly direction: DirectionType;\n\n scaleX: IBaseScale;\n setScaleX: (s: IBaseScale) => void;\n scaleY: IBaseScale;\n setScaleY: (s: IBaseScale) => void;\n scaleZ?: IBaseScale;\n setScaleZ: (s: IBaseScale) => void;\n // 要考虑基于多个field的场景\n fieldX: string[];\n setFieldX: (field: string | string[], level?: number) => void;\n fieldY: string[];\n setFieldY: (field: string | string[], level?: number) => void;\n fieldZ?: string[];\n setFieldZ: (field: string | string[], level?: number) => void;\n\n positionToData: (p: IPoint) => any | null;\n positionToDataX: (xPos: number) => any | null;\n positionToDataY: (yPos: number) => any | null;\n\n // 轴API\n getXAxisHelper: () => IAxisHelper;\n setXAxisHelper: (h: IAxisHelper) => void;\n getYAxisHelper: () => IAxisHelper;\n setYAxisHelper: (h: IAxisHelper) => void;\n getZAxisHelper: () => IAxisHelper | undefined;\n setZAxisHelper: (h: IAxisHelper) => void;\n}\n\nexport interface IPolarSeries extends ISeries {\n readonly coordinate: 'polar';\n\n outerRadius: number;\n innerRadius: number;\n\n getRadiusField: () => string[];\n setRadiusField: (field: string | string[], level?: number) => void;\n getAngleField: () => string[];\n setAngleField: (field: string | string[], level?: number) => void;\n\n // 轴将是一个实现了 scale 的组件。这里接收的可以是一个轴\n radiusScale: IBaseScale;\n setRadiusScale: (s: IBaseScale) => void;\n angleScale: IBaseScale;\n setAngleScale: (s: IBaseScale) => void;\n\n // TODO:\n positionToData: (point: IPolarPoint) => any;\n radiusToData: (radius: number) => any;\n angleToData: (angle: number) => any;\n\n // 轴\n radiusAxisHelper: IPolarAxisHelper;\n angleAxisHelper: IPolarAxisHelper;\n}\n\nexport interface IGeoSeries extends ISeries {\n readonly coordinate: 'geo';\n\n nameField?: string;\n valueField?: string;\n\n getMapViewData: () => DataView;\n\n dataToPosition: (datum: any) => IPoint | null;\n dataToLatitude: (latValue: any) => number | null;\n dataToLongitude: (lonValue: any) => number | null;\n\n positionToData: (p: IPoint) => any;\n latitudeToData: (lat: number) => any;\n longitudeToData: (lon: number) => any;\n\n getCoordinateHelper: () => IGeoCoordinateHelper;\n setCoordinateHelper: (helper: IGeoCoordinateHelper) => void;\n}\n\n// 收拢扇区标签形式依赖的 api\nexport interface IArcSeries extends IPolarSeries {\n center: (() => IPoint) | IPoint;\n getRadius: (state?: StateValueType) => number;\n getInnerRadius: (state?: StateValueType) => number;\n getLabelConfig: () => IArcLabelSpec;\n\n computeRadius: (r: number, k?: number) => number;\n computeDatumRadius: (datum: any, state?: StateValueType) => number;\n}\n\nexport interface IFunnelSeries {\n getPoints: (datum: any) => IPoint[];\n}\n"]}
1
+ {"version":3,"sources":["../src/series/interface/series.ts"],"names":[],"mappings":"","file":"series.js","sourcesContent":["import type { ITrigger } from '../../interaction/interface';\nimport type { PanEventParam, ZoomEventParam } from '../../event/interface';\nimport type { IModel, ILayoutItem } from '../../model/interface';\nimport type { DataSet, DataView, ITransformOptions } from '@visactor/vdataset';\nimport type { IMark } from '../../mark/interface';\nimport type { CoordinateType, IPoint, IPolarPoint } from '../../typings/coordinate';\nimport type { IRegion } from '../../region/interface';\nimport type { IBaseScale } from '@visactor/vscale';\nimport type { Group } from '../base/group';\nimport type { IAxisHelper } from '../../component/axis/cartesian/interface';\nimport type { IPolarAxisHelper } from '../../component/axis/polar/interface';\nimport type { ISeriesSeriesInfo, ISeriesStackData, ISeriesUpdateDataOption } from './common';\nimport type { ISeriesTooltipHelper } from './tooltip-helper';\nimport type { IInvalidType, Datum, DirectionType } from '../../typings';\nimport type { StateValueType } from '../../compile/mark';\nimport type { StatisticOperations } from '../../data/transforms/dimension-statistics';\nimport type { IGroupMark } from '../../mark/group';\nimport type { ITextMark } from '../../mark/text';\nimport type { IArcLabelSpec } from '../pie/interface';\nimport type { IGeoCoordinateHelper } from '../../component/geo/interface';\n\n// 使用类型约束系列支持的样式,但是感觉这样不合理 不使用这样的方式去做\n// export interface ISeries<A extends string> extends IModel\n\nexport interface ISeries extends IModel, ILayoutItem {\n readonly type: string;\n readonly name?: string;\n\n // 配置\n getSpec: () => any;\n\n // 坐标系信息\n readonly coordinate: CoordinateType;\n\n // 数据\n getRawData: () => DataView | undefined;\n getViewDataFilter: () => DataView | undefined;\n getViewData: () => DataView | undefined;\n getViewDataProductId: () => string | undefined;\n getRawDataStatistics?: () => DataView | undefined;\n getViewDataStatistics?: () => DataView | undefined;\n getDataSet?: () => DataSet;\n getFieldAlias: (field: string) => string;\n // 更新原始数据\n updateRawData: (d: any, opt: ISeriesUpdateDataOption) => void;\n setData?: (dv: DataView) => void;\n rawDataUpdate: (d: DataView) => void;\n viewDataUpdate: (d: DataView) => void;\n viewDataStatisticsUpdate: (d: DataView) => void;\n addViewDataFilter: (option: ITransformOptions) => void;\n reFilterViewData: () => void;\n reTransformViewData: () => void;\n fillData: () => void;\n\n /**\n * 常见数据使用问题\n *\n * 一、使用图表最终展示数据\n * 比如 markline,数值轴 这样的组件\n * 需要操作展示数据,做 筛选 | 变换 的\n * 比如图例,datazoom\n series.getViewData().transform({},false)\n * 需要获取展示数据,生成自身数据做自身展示的 使用消息机制。比如 轴\n series.event.on('viewDataStatisticsUpdate' | 'viewDataUpdate', { filter: ({ model }) => model?.id === series.id }, () => {\n this.updateData();\n });\n *\n * 二、使用图表原始数据\n * 比如图例,datazoom\n * 需要使用原始数据信息,生成自身数据\n * 比如图例,datazoom\n series.getRawData().parserData | latestData // parserData latestData 区别见下面说明\n series.getRawDataStatistics().latestData\n\n series.event.on('rawDataUpdate', { filter: ({ model }) => model?.id === series.id }, () => {\n this.updateData();\n });\n * 或者使用系列自身的特殊api 特殊情况外不建议这样用\n series.getSeriesInfoList()\n\n * 建议:使用数据时需要注意数据更新,使用系列数据更新组件数据的场景,只建议使用消息监听\n series.event.on(\n 'viewDataStatisticsUpdate' |\n 'viewDataUpdate' |\n 'rawDataUpdate',\n { filter: ({ model }) => model?.id === series.id })\n */\n\n // 区域\n getRegion: () => IRegion;\n\n // mark\n initMark: () => void;\n getMarks: () => IMark[];\n getMarksWithoutRoot: () => IMark[];\n getMarkNameMap: () => Record<string, IMark>;\n getMarksInType: (type: string | string[]) => IMark[];\n getMarkInName: (name: string) => IMark | undefined;\n getMarkInId: (id: number) => IMark | undefined;\n\n getRootMark: () => IGroupMark;\n\n // tooltip\n tooltipHelper: ISeriesTooltipHelper;\n\n // example\n /**\n * [\n * {\n * fields: {\n * x: '周一',\n * __VChart_STACK: 'stack'\n * },\n * valueField: 'y',\n * values: [{x: '周一', y: 20}];\n * },\n * {\n * fields: {\n * x: '周一',\n * stack: 'stackA'\n * },\n * valueField: 'y',\n * values: [{x: '周一', y: 20, stack: 'stackA'}];\n * },\n * {\n * fields: {\n * x: '周一',\n * stack: 'stackB'\n * },\n * valueField: 'y',\n * values: [{x: '周一', y: 20, stack: 'stackB'}];\n * },\n * ]\n */\n getStackData: () => ISeriesStackData;\n\n getStack: () => boolean;\n\n getStackValueField: () => string;\n setValueFieldToStack: () => void;\n setValueFieldToPercent: () => void;\n setValueFieldToStackOffsetSilhouette: () => void;\n\n getStackGroupFields: () => string[];\n getSeriesField: () => string | undefined;\n getSeriesKeys: () => string[];\n getSeriesStyle: (datum: Datum) => ISeriesSeriesInfo['style'];\n getSeriesInfoList: () => ISeriesSeriesInfo[];\n getGroups: () => Group | undefined;\n getDimensionField: () => string[];\n getMeasureField: () => string[];\n getStatisticFields: () => { key: string; operations: StatisticOperations }[];\n\n setSeriesField: (field: string) => void;\n handleZoom?: (e: ZoomEventParam) => void;\n handlePan?: (e: PanEventParam) => void;\n\n // 数据映射\n dataToPosition: (datum: any) => IPoint | null;\n dataToPositionX: (xValue: any) => number | null;\n dataToPositionY: (yValue: any) => number | null;\n dataToPositionZ?: (yValue: any) => number | null;\n\n getColorAttribute: () => { scale: IBaseScale; field: string };\n getDefaultColorDomain: () => any[];\n\n getInvalidType: () => IInvalidType;\n\n // 交互\n getTrigger: () => ITrigger;\n\n /**\n * 获取系列默认的缩略图形\n * @returns 默认的缩略图形\n */\n getDefaultShapeType: () => string;\n /** 获取系列标签配置 */\n initLabelMarkStyle?: (textMark: ITextMark) => void;\n}\n\nexport interface ICartesianSeries extends ISeries {\n readonly coordinate: 'cartesian';\n readonly direction: DirectionType;\n\n scaleX: IBaseScale;\n setScaleX: (s: IBaseScale) => void;\n scaleY: IBaseScale;\n setScaleY: (s: IBaseScale) => void;\n scaleZ?: IBaseScale;\n setScaleZ: (s: IBaseScale) => void;\n // 要考虑基于多个field的场景\n fieldX: string[];\n setFieldX: (field: string | string[], level?: number) => void;\n fieldY: string[];\n setFieldY: (field: string | string[], level?: number) => void;\n fieldZ?: string[];\n setFieldZ: (field: string | string[], level?: number) => void;\n\n positionToData: (p: IPoint) => any | null;\n positionToDataX: (xPos: number) => any | null;\n positionToDataY: (yPos: number) => any | null;\n\n // 轴API\n getXAxisHelper: () => IAxisHelper;\n setXAxisHelper: (h: IAxisHelper) => void;\n getYAxisHelper: () => IAxisHelper;\n setYAxisHelper: (h: IAxisHelper) => void;\n getZAxisHelper: () => IAxisHelper | undefined;\n setZAxisHelper: (h: IAxisHelper) => void;\n}\n\nexport interface IPolarSeries extends ISeries {\n readonly coordinate: 'polar';\n\n outerRadius: number;\n innerRadius: number;\n\n getRadiusField: () => string[];\n setRadiusField: (field: string | string[], level?: number) => void;\n getAngleField: () => string[];\n setAngleField: (field: string | string[], level?: number) => void;\n\n // 轴将是一个实现了 scale 的组件。这里接收的可以是一个轴\n radiusScale: IBaseScale;\n setRadiusScale: (s: IBaseScale) => void;\n angleScale: IBaseScale;\n setAngleScale: (s: IBaseScale) => void;\n\n // TODO:\n positionToData: (point: IPolarPoint) => any;\n radiusToData: (radius: number) => any;\n angleToData: (angle: number) => any;\n\n // 轴\n radiusAxisHelper: IPolarAxisHelper;\n angleAxisHelper: IPolarAxisHelper;\n}\n\nexport interface IGeoSeries extends ISeries {\n readonly coordinate: 'geo';\n\n nameField?: string;\n valueField?: string;\n\n getMapViewData: () => DataView;\n\n dataToPosition: (datum: any) => IPoint | null;\n dataToLatitude: (latValue: any) => number | null;\n dataToLongitude: (lonValue: any) => number | null;\n\n positionToData: (p: IPoint) => any;\n latitudeToData: (lat: number) => any;\n longitudeToData: (lon: number) => any;\n\n getCoordinateHelper: () => IGeoCoordinateHelper;\n setCoordinateHelper: (helper: IGeoCoordinateHelper) => void;\n}\n\n// 收拢扇区标签形式依赖的 api\nexport interface IArcSeries extends IPolarSeries {\n center: (() => IPoint) | IPoint;\n getRadius: (state?: StateValueType) => number;\n getInnerRadius: (state?: StateValueType) => number;\n getLabelConfig: () => IArcLabelSpec;\n\n computeRadius: (r: number, k?: number) => number;\n computeDatumRadius: (datum: any, state?: StateValueType) => number;\n}\n\nexport interface IFunnelSeries extends ISeries {\n getPoints: (datum: any) => IPoint[];\n getCategoryField: () => string;\n}\n"]}
@@ -1,13 +1,13 @@
1
- import type { ITooltipPattern, TooltipActiveType, TooltipContentCallback } from '../../typings';
1
+ import type { ITooltipPattern, ShapeType, TooltipActiveType, TooltipContentCallback } from '../../typings';
2
2
  import type { ISeries } from './series';
3
3
  import type { ITooltipHelper } from '../../model/tooltip-helper';
4
4
  import type { IDimensionInfo } from '../../event/events/dimension/interface';
5
5
  export interface ISeriesTooltipHelper extends ITooltipHelper {
6
6
  series: ISeries;
7
7
  getDefaultTooltipPattern: (activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]) => ITooltipPattern | null;
8
- contentKeyCallback: TooltipContentCallback;
9
- contentValueCallback: TooltipContentCallback;
10
- contentShapeTypeCallback: TooltipContentCallback;
11
- contentShapeColorCallback: TooltipContentCallback;
12
- titleValueCallback: TooltipContentCallback;
8
+ contentKeyCallback: TooltipContentCallback<string>;
9
+ contentValueCallback: TooltipContentCallback<string>;
10
+ contentShapeTypeCallback: TooltipContentCallback<ShapeType>;
11
+ contentShapeColorCallback: TooltipContentCallback<string>;
12
+ titleValueCallback: TooltipContentCallback<string>;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/interface/tooltip-helper.ts"],"names":[],"mappings":"","file":"tooltip-helper.js","sourcesContent":["import type { ITooltipPattern, TooltipActiveType, TooltipContentCallback } from '../../typings';\nimport type { ISeries } from './series';\nimport type { ITooltipHelper } from '../../model/tooltip-helper';\nimport type { IDimensionInfo } from '../../event/events/dimension/interface';\n\nexport interface ISeriesTooltipHelper extends ITooltipHelper {\n /** 对应系列 */\n series: ISeries;\n\n /** 获得默认tooltip pattern */\n getDefaultTooltipPattern: (activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]) => ITooltipPattern | null;\n\n // 可以继承的原子化回调\n contentKeyCallback: TooltipContentCallback;\n contentValueCallback: TooltipContentCallback;\n contentShapeTypeCallback: TooltipContentCallback;\n contentShapeColorCallback: TooltipContentCallback;\n titleValueCallback: TooltipContentCallback;\n}\n"]}
1
+ {"version":3,"sources":["../src/series/interface/tooltip-helper.ts"],"names":[],"mappings":"","file":"tooltip-helper.js","sourcesContent":["import type { ITooltipPattern, ShapeType, TooltipActiveType, TooltipContentCallback } from '../../typings';\nimport type { ISeries } from './series';\nimport type { ITooltipHelper } from '../../model/tooltip-helper';\nimport type { IDimensionInfo } from '../../event/events/dimension/interface';\n\nexport interface ISeriesTooltipHelper extends ITooltipHelper {\n /** 对应系列 */\n series: ISeries;\n\n /** 获得默认tooltip pattern */\n getDefaultTooltipPattern: (activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]) => ITooltipPattern | null;\n\n // 可以继承的原子化回调\n contentKeyCallback: TooltipContentCallback<string>;\n contentValueCallback: TooltipContentCallback<string>;\n contentShapeTypeCallback: TooltipContentCallback<ShapeType>;\n contentShapeColorCallback: TooltipContentCallback<string>;\n titleValueCallback: TooltipContentCallback<string>;\n}\n"]}
@@ -16,6 +16,16 @@ import { DEFAULT_MARK_ANIMATION } from "../../animation/config";
16
16
 
17
17
  import { BaseSeries } from "../base/base-series";
18
18
 
19
+ import { VChart } from "../../core/vchart";
20
+
21
+ import { LineMark } from "../../mark/line";
22
+
23
+ import { SymbolMark } from "../../mark/symbol";
24
+
25
+ import { TextMark } from "../../mark/text";
26
+
27
+ VChart.useMark([ LineMark, SymbolMark, TextMark ]);
28
+
19
29
  export class LineSeries extends CartesianSeries {
20
30
  constructor() {
21
31
  super(...arguments), this.type = SeriesTypeEnum.line, this._invalidType = "break";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/line/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAejD,MAAM,OAAO,UA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AAC,aAAa,EAAE,CAAC;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC7C,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAC1B,OAAO;gBACL,GAAG;gBACH,KAAK,EAAE,CAAC,SAAiB,EAAE,EAAE;;oBAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;wBACnB,OAAO,IAAI,CAAC;qBACb;oBACD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,SAAgB,EAAE;wBACzD,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,yBAAyB,CAAC,EAAE,GAAG;qBACtD,CAAC,CAAC;oBACH,IAAI,IAAI,EAAE;wBACR,OAAO,IAAI,CAAC;qBACb;oBACD,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAgB,EAAE;wBACrD,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,yBAAyB,CAAC,EAAE,GAAG;qBACtD,CAAC,CAAC;gBACL,CAAC;gBACD,SAAS;aACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;;AAnEe,eAAI,GAAW,cAAc,CAAC,IAAI,CAAC;AAInC,eAAI,mCACf,UAAU,CAAC,IAAI,GACf,qBAAqB,EACxB;AA+DJ,KAAK,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC","file":"line.js","sourcesContent":["import { DEFAULT_DATA_SERIES_FIELD } from '../../constant';\nimport { CartesianSeries } from '../cartesian/cartesian';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesTypeEnum } from '../interface';\nimport { LineLikeSeriesMixin, lineLikeSeriesMarkMap } from '../mixin/line-mixin';\nimport { mixin } from '@visactor/vutils';\nimport type { IInvalidType, Maybe } from '../../typings';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport type { ILineSeriesSpec, ILineSeriesTheme } from './interface';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport type { LineAppearPreset } from './animation';\nimport { BaseSeries } from '../base/base-series';\n\nexport interface LineSeries\n extends Pick<\n LineLikeSeriesMixin,\n | 'initLineMark'\n | 'initSymbolMark'\n | 'initLabelMarkStyle'\n | 'initLineMarkStyle'\n | 'initSymbolMarkStyle'\n | '_lineMark'\n | '_symbolMark'\n >,\n CartesianSeries<ILineSeriesSpec> {}\n\nexport class LineSeries extends CartesianSeries<ILineSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.line;\n type = SeriesTypeEnum.line;\n protected _invalidType: IInvalidType = 'break';\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n ...lineLikeSeriesMarkMap\n };\n\n protected declare _theme: Maybe<ILineSeriesTheme>;\n\n initMark(): void {\n const progressive = {\n progressiveStep: this._spec.progressiveStep,\n progressiveThreshold: this._spec.progressiveThreshold,\n large: this._spec.large,\n largeThreshold: this._spec.largeThreshold\n };\n this.initLineMark(progressive);\n this.initSymbolMark(progressive);\n }\n\n initMarkStyle(): void {\n this.initLineMarkStyle(this._direction);\n this.initSymbolMarkStyle();\n }\n\n initAnimation() {\n const animationParams = { direction: this.direction };\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<LineAppearPreset>)?.preset;\n this._lineMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.line(animationParams, appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.line, this._spec)\n )\n );\n\n if (this._symbolMark) {\n this._symbolMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.symbol(), userAnimationConfig(SeriesMarkNameEnum.point, this._spec))\n );\n }\n }\n\n getSeriesInfoList() {\n const seriesKeys = this.getSeriesKeys();\n const shapeType = this.getDefaultShapeType();\n return seriesKeys.map(key => {\n return {\n key,\n style: (attribute: string) => {\n if (!this._lineMark) {\n return null;\n }\n const attr = this._lineMark.getAttribute(attribute as any, {\n [this._seriesField ?? DEFAULT_DATA_SERIES_FIELD]: key\n });\n if (attr) {\n return attr;\n }\n return this._symbolMark.getAttribute(attribute as any, {\n [this._seriesField ?? DEFAULT_DATA_SERIES_FIELD]: key\n });\n },\n shapeType\n };\n });\n }\n}\n\nmixin(LineSeries, LineLikeSeriesMixin);\n"]}
1
+ {"version":3,"sources":["../src/series/line/line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAejD,MAAM,OAAO,UAAW,SAAQ,eAAgC;IAAhE;;QAEE,SAAI,GAAG,cAAc,CAAC,IAAI,CAAC;QACjB,iBAAY,GAAiB,OAAO,CAAC;IAkEjD,CAAC;IAzDC,QAAQ;QACN,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YAC1B,OAAO;gBACL,GAAG;gBACH,KAAK,EAAE,CAAC,SAAiB,EAAE,EAAE;;oBAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;wBACnB,OAAO,IAAI,CAAC;qBACb;oBACD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,SAAgB,EAAE;wBACzD,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,yBAAyB,CAAC,EAAE,GAAG;qBACtD,CAAC,CAAC;oBACH,IAAI,IAAI,EAAE;wBACR,OAAO,IAAI,CAAC;qBACb;oBACD,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAgB,EAAE;wBACrD,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,yBAAyB,CAAC,EAAE,GAAG;qBACtD,CAAC,CAAC;gBACL,CAAC;gBACD,SAAS;aACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;;AAnEe,eAAI,GAAW,cAAc,CAAC,IAAI,CAAC;AAInC,eAAI,mCACf,UAAU,CAAC,IAAI,GACf,qBAAqB,EACxB;AA+DJ,KAAK,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC","file":"line.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport { DEFAULT_DATA_SERIES_FIELD } from '../../constant';\nimport { CartesianSeries } from '../cartesian/cartesian';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface';\nimport { SeriesTypeEnum } from '../interface';\nimport { LineLikeSeriesMixin, lineLikeSeriesMarkMap } from '../mixin/line-mixin';\nimport { mixin } from '@visactor/vutils';\nimport type { IInvalidType, Maybe } from '../../typings';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport type { ILineSeriesSpec, ILineSeriesTheme } from './interface';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport type { LineAppearPreset } from './animation';\nimport { BaseSeries } from '../base/base-series';\nimport { VChart } from '../../core/vchart';\nimport { LineMark } from '../../mark/line';\nimport { SymbolMark } from '../../mark/symbol';\nimport { TextMark } from '../../mark/text';\n\nVChart.useMark([LineMark, SymbolMark, TextMark]);\n\nexport interface LineSeries\n extends Pick<\n LineLikeSeriesMixin,\n | 'initLineMark'\n | 'initSymbolMark'\n | 'initLabelMarkStyle'\n | 'initLineMarkStyle'\n | 'initSymbolMarkStyle'\n | '_lineMark'\n | '_symbolMark'\n >,\n CartesianSeries<ILineSeriesSpec> {}\n\nexport class LineSeries extends CartesianSeries<ILineSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.line;\n type = SeriesTypeEnum.line;\n protected _invalidType: IInvalidType = 'break';\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n ...lineLikeSeriesMarkMap\n };\n\n protected declare _theme: Maybe<ILineSeriesTheme>;\n\n initMark(): void {\n const progressive = {\n progressiveStep: this._spec.progressiveStep,\n progressiveThreshold: this._spec.progressiveThreshold,\n large: this._spec.large,\n largeThreshold: this._spec.largeThreshold\n };\n this.initLineMark(progressive);\n this.initSymbolMark(progressive);\n }\n\n initMarkStyle(): void {\n this.initLineMarkStyle(this._direction);\n this.initSymbolMarkStyle();\n }\n\n initAnimation() {\n const animationParams = { direction: this.direction };\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<LineAppearPreset>)?.preset;\n this._lineMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.line(animationParams, appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.line, this._spec)\n )\n );\n\n if (this._symbolMark) {\n this._symbolMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.symbol(), userAnimationConfig(SeriesMarkNameEnum.point, this._spec))\n );\n }\n }\n\n getSeriesInfoList() {\n const seriesKeys = this.getSeriesKeys();\n const shapeType = this.getDefaultShapeType();\n return seriesKeys.map(key => {\n return {\n key,\n style: (attribute: string) => {\n if (!this._lineMark) {\n return null;\n }\n const attr = this._lineMark.getAttribute(attribute as any, {\n [this._seriesField ?? DEFAULT_DATA_SERIES_FIELD]: key\n });\n if (attr) {\n return attr;\n }\n return this._symbolMark.getAttribute(attribute as any, {\n [this._seriesField ?? DEFAULT_DATA_SERIES_FIELD]: key\n });\n },\n shapeType\n };\n });\n }\n}\n\nmixin(LineSeries, LineLikeSeriesMixin);\n"]}
@@ -18,6 +18,14 @@ import { SeriesMarkNameEnum } from "../interface";
18
18
 
19
19
  import { BaseSeries } from "../base/base-series";
20
20
 
21
+ import { VChart } from "../../core/vchart";
22
+
23
+ import { RuleMark } from "../../mark/rule";
24
+
25
+ import { SymbolMark } from "../../mark/symbol";
26
+
27
+ VChart.useMark([ RuleMark, SymbolMark ]);
28
+
21
29
  export class LinkSeries extends CartesianSeries {
22
30
  constructor() {
23
31
  super(...arguments), this.type = SeriesTypeEnum.link;