@antv/g2plot 2.4.20 → 2.4.23

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 (912) hide show
  1. package/CHANGELOG.md +1627 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/dist/g2plot.min.js +17 -2
  5. package/dist/g2plot.min.js.map +1 -1
  6. package/esm/adaptor/brush.d.ts +1 -1
  7. package/esm/adaptor/brush.js +2 -2
  8. package/esm/adaptor/brush.js.map +1 -1
  9. package/esm/adaptor/common.d.ts +1 -1
  10. package/esm/adaptor/common.js +2 -11
  11. package/esm/adaptor/common.js.map +1 -1
  12. package/esm/adaptor/connected-area.d.ts +1 -1
  13. package/esm/adaptor/connected-area.js.map +1 -1
  14. package/esm/adaptor/conversion-tag.js +1 -1
  15. package/esm/adaptor/conversion-tag.js.map +1 -1
  16. package/esm/adaptor/geometries/area.js +1 -1
  17. package/esm/adaptor/geometries/area.js.map +1 -1
  18. package/esm/adaptor/geometries/base.d.ts +2 -2
  19. package/esm/adaptor/geometries/base.js +4 -2
  20. package/esm/adaptor/geometries/base.js.map +1 -1
  21. package/esm/adaptor/geometries/edge.d.ts +1 -1
  22. package/esm/adaptor/geometries/edge.js +1 -1
  23. package/esm/adaptor/geometries/edge.js.map +1 -1
  24. package/esm/adaptor/geometries/index.d.ts +5 -5
  25. package/esm/adaptor/geometries/index.js +2 -2
  26. package/esm/adaptor/geometries/index.js.map +1 -1
  27. package/esm/adaptor/geometries/interval.js.map +1 -1
  28. package/esm/adaptor/geometries/line.js +1 -1
  29. package/esm/adaptor/geometries/line.js.map +1 -1
  30. package/esm/adaptor/geometries/point.d.ts +1 -1
  31. package/esm/adaptor/geometries/point.js +1 -1
  32. package/esm/adaptor/geometries/point.js.map +1 -1
  33. package/esm/adaptor/geometries/polygon.d.ts +1 -1
  34. package/esm/adaptor/geometries/polygon.js +1 -1
  35. package/esm/adaptor/geometries/polygon.js.map +1 -1
  36. package/esm/adaptor/geometries/schema.d.ts +1 -1
  37. package/esm/adaptor/geometries/schema.js +1 -1
  38. package/esm/adaptor/geometries/schema.js.map +1 -1
  39. package/esm/adaptor/geometries/violin.d.ts +1 -1
  40. package/esm/adaptor/geometries/violin.js +1 -1
  41. package/esm/adaptor/geometries/violin.js.map +1 -1
  42. package/esm/adaptor/pattern.d.ts +1 -1
  43. package/esm/adaptor/pattern.js +1 -1
  44. package/esm/adaptor/pattern.js.map +1 -1
  45. package/esm/core/plot.d.ts +2 -2
  46. package/esm/core/plot.js +2 -2
  47. package/esm/core/plot.js.map +1 -1
  48. package/esm/index.d.ts +68 -71
  49. package/esm/index.js +69 -71
  50. package/esm/index.js.map +1 -1
  51. package/esm/interactions/actions/drill-down.js +1 -1
  52. package/esm/interactions/actions/drill-down.js.map +1 -1
  53. package/esm/interactions/drill-down.js +1 -1
  54. package/esm/interactions/drill-down.js.map +1 -1
  55. package/esm/plots/_template/adaptor.js +1 -1
  56. package/esm/plots/_template/adaptor.js.map +1 -1
  57. package/esm/plots/_template/index.d.ts +1 -1
  58. package/esm/plots/_template/index.js.map +1 -1
  59. package/esm/plots/area/adaptor.js +4 -5
  60. package/esm/plots/area/adaptor.js.map +1 -1
  61. package/esm/plots/area/index.d.ts +1 -1
  62. package/esm/plots/area/index.js.map +1 -1
  63. package/esm/plots/bar/adaptor.d.ts +1 -1
  64. package/esm/plots/bar/adaptor.js.map +1 -1
  65. package/esm/plots/bar/index.d.ts +1 -1
  66. package/esm/plots/bar/index.js.map +1 -1
  67. package/esm/plots/bidirectional-bar/adaptor.js +2 -2
  68. package/esm/plots/bidirectional-bar/adaptor.js.map +1 -1
  69. package/esm/plots/bidirectional-bar/index.d.ts +1 -1
  70. package/esm/plots/bidirectional-bar/index.js +3 -3
  71. package/esm/plots/bidirectional-bar/index.js.map +1 -1
  72. package/esm/plots/bidirectional-bar/types.d.ts +1 -1
  73. package/esm/plots/bidirectional-bar/types.js.map +1 -1
  74. package/esm/plots/bidirectional-bar/utils.js.map +1 -1
  75. package/esm/plots/box/adaptor.js +3 -3
  76. package/esm/plots/box/adaptor.js.map +1 -1
  77. package/esm/plots/box/index.d.ts +1 -1
  78. package/esm/plots/box/index.js +1 -1
  79. package/esm/plots/box/index.js.map +1 -1
  80. package/esm/plots/bullet/adaptor.js +2 -2
  81. package/esm/plots/bullet/adaptor.js.map +1 -1
  82. package/esm/plots/bullet/index.d.ts +1 -1
  83. package/esm/plots/bullet/index.js +1 -1
  84. package/esm/plots/bullet/index.js.map +1 -1
  85. package/esm/plots/bullet/types.d.ts +1 -1
  86. package/esm/plots/bullet/types.js.map +1 -1
  87. package/esm/plots/chord/adaptor.js +5 -17
  88. package/esm/plots/chord/adaptor.js.map +1 -1
  89. package/esm/plots/chord/constant.d.ts +4 -4
  90. package/esm/plots/chord/constant.js +4 -4
  91. package/esm/plots/chord/constant.js.map +1 -1
  92. package/esm/plots/chord/index.d.ts +1 -1
  93. package/esm/plots/chord/index.js.map +1 -1
  94. package/esm/plots/circle-packing/adaptor.js +3 -3
  95. package/esm/plots/circle-packing/adaptor.js.map +1 -1
  96. package/esm/plots/circle-packing/index.d.ts +2 -2
  97. package/esm/plots/circle-packing/index.js.map +1 -1
  98. package/esm/plots/circle-packing/utils.js +2 -2
  99. package/esm/plots/circle-packing/utils.js.map +1 -1
  100. package/esm/plots/column/adaptor.js +7 -5
  101. package/esm/plots/column/adaptor.js.map +1 -1
  102. package/esm/plots/column/index.d.ts +1 -1
  103. package/esm/plots/column/index.js.map +1 -1
  104. package/esm/plots/column/types.d.ts +2 -2
  105. package/esm/plots/column/types.js.map +1 -1
  106. package/esm/plots/dual-axes/adaptor.js +7 -7
  107. package/esm/plots/dual-axes/adaptor.js.map +1 -1
  108. package/esm/plots/dual-axes/index.d.ts +1 -1
  109. package/esm/plots/dual-axes/index.js.map +1 -1
  110. package/esm/plots/dual-axes/types.d.ts +1 -1
  111. package/esm/plots/dual-axes/types.js.map +1 -1
  112. package/esm/plots/dual-axes/util/geometry.js +3 -3
  113. package/esm/plots/dual-axes/util/geometry.js.map +1 -1
  114. package/esm/plots/dual-axes/util/legend.d.ts +1 -1
  115. package/esm/plots/dual-axes/util/legend.js +1 -1
  116. package/esm/plots/dual-axes/util/legend.js.map +1 -1
  117. package/esm/plots/dual-axes/util/option.d.ts +1 -1
  118. package/esm/plots/dual-axes/util/option.js +1 -1
  119. package/esm/plots/dual-axes/util/option.js.map +1 -1
  120. package/esm/plots/facet/adaptor.js +1 -1
  121. package/esm/plots/facet/adaptor.js.map +1 -1
  122. package/esm/plots/facet/index.d.ts +1 -1
  123. package/esm/plots/facet/index.js.map +1 -1
  124. package/esm/plots/facet/types.d.ts +5 -6
  125. package/esm/plots/facet/types.js.map +1 -1
  126. package/esm/plots/facet/utils.js +2 -11
  127. package/esm/plots/facet/utils.js.map +1 -1
  128. package/esm/plots/funnel/adaptor.d.ts +5 -0
  129. package/esm/plots/funnel/adaptor.js +34 -5
  130. package/esm/plots/funnel/adaptor.js.map +1 -1
  131. package/esm/plots/funnel/geometries/basic.d.ts +5 -0
  132. package/esm/plots/funnel/geometries/basic.js +11 -7
  133. package/esm/plots/funnel/geometries/basic.js.map +1 -1
  134. package/esm/plots/funnel/geometries/common.d.ts +2 -1
  135. package/esm/plots/funnel/geometries/common.js +7 -4
  136. package/esm/plots/funnel/geometries/common.js.map +1 -1
  137. package/esm/plots/funnel/geometries/compare.d.ts +1 -0
  138. package/esm/plots/funnel/geometries/compare.js +40 -33
  139. package/esm/plots/funnel/geometries/compare.js.map +1 -1
  140. package/esm/plots/funnel/geometries/dynamic-height.js +3 -3
  141. package/esm/plots/funnel/geometries/dynamic-height.js.map +1 -1
  142. package/esm/plots/funnel/geometries/facet.js +1 -1
  143. package/esm/plots/funnel/geometries/facet.js.map +1 -1
  144. package/esm/plots/funnel/index.d.ts +4 -3
  145. package/esm/plots/funnel/index.js +1 -0
  146. package/esm/plots/funnel/index.js.map +1 -1
  147. package/esm/plots/funnel/interactions/funnel-conversion-tag.d.ts +9 -0
  148. package/esm/plots/funnel/interactions/funnel-conversion-tag.js +57 -0
  149. package/esm/plots/funnel/interactions/funnel-conversion-tag.js.map +1 -0
  150. package/esm/plots/funnel/interactions/index.d.ts +5 -0
  151. package/esm/plots/funnel/interactions/index.js +10 -0
  152. package/esm/plots/funnel/interactions/index.js.map +1 -0
  153. package/esm/plots/funnel/types.d.ts +2 -1
  154. package/esm/plots/funnel/types.js.map +1 -1
  155. package/esm/plots/gauge/adaptor.js +2 -2
  156. package/esm/plots/gauge/adaptor.js.map +1 -1
  157. package/esm/plots/gauge/index.d.ts +2 -2
  158. package/esm/plots/gauge/index.js +3 -3
  159. package/esm/plots/gauge/index.js.map +1 -1
  160. package/esm/plots/gauge/utils.js +7 -6
  161. package/esm/plots/gauge/utils.js.map +1 -1
  162. package/esm/plots/heatmap/adaptor.js +11 -14
  163. package/esm/plots/heatmap/adaptor.js.map +1 -1
  164. package/esm/plots/heatmap/index.d.ts +2 -2
  165. package/esm/plots/heatmap/index.js.map +1 -1
  166. package/esm/plots/heatmap/shapes/circle.js.map +1 -1
  167. package/esm/plots/heatmap/shapes/square.js.map +1 -1
  168. package/esm/plots/histogram/adaptor.js +6 -4
  169. package/esm/plots/histogram/adaptor.js.map +1 -1
  170. package/esm/plots/histogram/index.d.ts +1 -1
  171. package/esm/plots/histogram/index.js.map +1 -1
  172. package/esm/plots/line/adaptor.js +3 -4
  173. package/esm/plots/line/adaptor.js.map +1 -1
  174. package/esm/plots/line/index.d.ts +2 -2
  175. package/esm/plots/line/index.js.map +1 -1
  176. package/esm/plots/line/interactions/marker-active.js +1 -1
  177. package/esm/plots/line/interactions/marker-active.js.map +1 -1
  178. package/esm/plots/line/types.d.ts +1 -1
  179. package/esm/plots/line/types.js.map +1 -1
  180. package/esm/plots/liquid/adaptor.js +4 -3
  181. package/esm/plots/liquid/adaptor.js.map +1 -1
  182. package/esm/plots/liquid/index.d.ts +2 -2
  183. package/esm/plots/liquid/index.js +2 -2
  184. package/esm/plots/liquid/index.js.map +1 -1
  185. package/esm/plots/liquid/shapes/liquid.js +13 -6
  186. package/esm/plots/liquid/shapes/liquid.js.map +1 -1
  187. package/esm/plots/liquid/types.d.ts +6 -1
  188. package/esm/plots/liquid/types.js.map +1 -1
  189. package/esm/plots/mix/adaptor.js +2 -2
  190. package/esm/plots/mix/adaptor.js.map +1 -1
  191. package/esm/plots/mix/index.d.ts +2 -2
  192. package/esm/plots/mix/index.js.map +1 -1
  193. package/esm/plots/mix/interactions/association.js +3 -3
  194. package/esm/plots/mix/interactions/association.js.map +1 -1
  195. package/esm/plots/mix/interactions/utils.d.ts +1 -1
  196. package/esm/plots/mix/interactions/utils.js.map +1 -1
  197. package/esm/plots/mix/types.d.ts +3 -3
  198. package/esm/plots/mix/types.js.map +1 -1
  199. package/esm/plots/mix/utils.d.ts +10 -10
  200. package/esm/plots/mix/utils.js +22 -22
  201. package/esm/plots/mix/utils.js.map +1 -1
  202. package/esm/plots/pie/adaptor.js +8 -6
  203. package/esm/plots/pie/adaptor.js.map +1 -1
  204. package/esm/plots/pie/index.d.ts +2 -2
  205. package/esm/plots/pie/index.js +2 -2
  206. package/esm/plots/pie/index.js.map +1 -1
  207. package/esm/plots/pie/interactions/actions/legend-active.js +1 -1
  208. package/esm/plots/pie/interactions/actions/legend-active.js.map +1 -1
  209. package/esm/plots/pie/interactions/actions/statistic-active.js.map +1 -1
  210. package/esm/plots/pie/types.d.ts +6 -1
  211. package/esm/plots/pie/types.js.map +1 -1
  212. package/esm/plots/progress/adaptor.js +3 -4
  213. package/esm/plots/progress/adaptor.js.map +1 -1
  214. package/esm/plots/progress/index.d.ts +1 -1
  215. package/esm/plots/progress/index.js.map +1 -1
  216. package/esm/plots/progress/types.d.ts +1 -1
  217. package/esm/plots/progress/types.js.map +1 -1
  218. package/esm/plots/progress/utils.d.ts +1 -0
  219. package/esm/plots/progress/utils.js +4 -1
  220. package/esm/plots/progress/utils.js.map +1 -1
  221. package/esm/plots/radar/adaptor.js +3 -3
  222. package/esm/plots/radar/adaptor.js.map +1 -1
  223. package/esm/plots/radar/index.d.ts +2 -2
  224. package/esm/plots/radar/index.js.map +1 -1
  225. package/esm/plots/radar/interactions/radar-tooltip-action.d.ts +1 -1
  226. package/esm/plots/radar/interactions/radar-tooltip-action.js +1 -1
  227. package/esm/plots/radar/interactions/radar-tooltip-action.js.map +1 -1
  228. package/esm/plots/radar/types.d.ts +1 -1
  229. package/esm/plots/radar/types.js.map +1 -1
  230. package/esm/plots/radial-bar/adaptor.js +2 -3
  231. package/esm/plots/radial-bar/adaptor.js.map +1 -1
  232. package/esm/plots/radial-bar/index.d.ts +1 -1
  233. package/esm/plots/radial-bar/index.js.map +1 -1
  234. package/esm/plots/ring-progress/adaptor.js +1 -1
  235. package/esm/plots/ring-progress/adaptor.js.map +1 -1
  236. package/esm/plots/ring-progress/index.d.ts +1 -1
  237. package/esm/plots/ring-progress/index.js +1 -1
  238. package/esm/plots/ring-progress/index.js.map +1 -1
  239. package/esm/plots/ring-progress/types.d.ts +1 -1
  240. package/esm/plots/ring-progress/types.js.map +1 -1
  241. package/esm/plots/rose/adaptor.js +3 -3
  242. package/esm/plots/rose/adaptor.js.map +1 -1
  243. package/esm/plots/rose/index.d.ts +1 -1
  244. package/esm/plots/rose/index.js.map +1 -1
  245. package/esm/plots/sankey/adaptor.js +4 -13
  246. package/esm/plots/sankey/adaptor.js.map +1 -1
  247. package/esm/plots/sankey/helper.js +1 -1
  248. package/esm/plots/sankey/helper.js.map +1 -1
  249. package/esm/plots/sankey/index.d.ts +2 -2
  250. package/esm/plots/sankey/index.js +1 -1
  251. package/esm/plots/sankey/index.js.map +1 -1
  252. package/esm/plots/sankey/interactions/node-draggable.js +1 -1
  253. package/esm/plots/sankey/interactions/node-draggable.js.map +1 -1
  254. package/esm/plots/sankey/layout.d.ts +1 -1
  255. package/esm/plots/sankey/layout.js +2 -2
  256. package/esm/plots/sankey/layout.js.map +1 -1
  257. package/esm/plots/sankey/sankey/index.d.ts +1 -1
  258. package/esm/plots/sankey/sankey/index.js +1 -1
  259. package/esm/plots/sankey/sankey/index.js.map +1 -1
  260. package/esm/plots/sankey/sankey/sankey.js +1 -1
  261. package/esm/plots/sankey/sankey/sankey.js.map +1 -1
  262. package/esm/plots/scatter/adaptor.js +4 -5
  263. package/esm/plots/scatter/adaptor.js.map +1 -1
  264. package/esm/plots/scatter/index.d.ts +2 -2
  265. package/esm/plots/scatter/index.js +1 -1
  266. package/esm/plots/scatter/index.js.map +1 -1
  267. package/esm/plots/scatter/types.d.ts +1 -1
  268. package/esm/plots/scatter/types.js.map +1 -1
  269. package/esm/plots/scatter/util.js +2 -2
  270. package/esm/plots/scatter/util.js.map +1 -1
  271. package/esm/plots/stock/adaptor.js +3 -3
  272. package/esm/plots/stock/adaptor.js.map +1 -1
  273. package/esm/plots/stock/index.d.ts +1 -1
  274. package/esm/plots/stock/index.js +1 -1
  275. package/esm/plots/stock/index.js.map +1 -1
  276. package/esm/plots/stock/utils.d.ts +3 -1
  277. package/esm/plots/stock/utils.js +5 -3
  278. package/esm/plots/stock/utils.js.map +1 -1
  279. package/esm/plots/sunburst/adaptor.js +3 -3
  280. package/esm/plots/sunburst/adaptor.js.map +1 -1
  281. package/esm/plots/sunburst/index.d.ts +2 -2
  282. package/esm/plots/sunburst/index.js.map +1 -1
  283. package/esm/plots/tiny-area/adaptor.js +3 -3
  284. package/esm/plots/tiny-area/adaptor.js.map +1 -1
  285. package/esm/plots/tiny-area/index.d.ts +1 -1
  286. package/esm/plots/tiny-area/index.js.map +1 -1
  287. package/esm/plots/tiny-area/types.d.ts +1 -1
  288. package/esm/plots/tiny-area/types.js.map +1 -1
  289. package/esm/plots/tiny-column/adaptor.js +3 -3
  290. package/esm/plots/tiny-column/adaptor.js.map +1 -1
  291. package/esm/plots/tiny-line/adaptor.js +3 -3
  292. package/esm/plots/tiny-line/adaptor.js.map +1 -1
  293. package/esm/plots/tiny-line/index.d.ts +1 -1
  294. package/esm/plots/tiny-line/index.js.map +1 -1
  295. package/esm/plots/tiny-line/types.d.ts +1 -1
  296. package/esm/plots/tiny-line/types.js.map +1 -1
  297. package/esm/plots/treemap/adaptor.js +3 -3
  298. package/esm/plots/treemap/adaptor.js.map +1 -1
  299. package/esm/plots/treemap/index.d.ts +2 -2
  300. package/esm/plots/treemap/index.js +1 -1
  301. package/esm/plots/treemap/index.js.map +1 -1
  302. package/esm/plots/treemap/utils.js +1 -1
  303. package/esm/plots/treemap/utils.js.map +1 -1
  304. package/esm/plots/venn/adaptor.d.ts +3 -3
  305. package/esm/plots/venn/adaptor.js +6 -7
  306. package/esm/plots/venn/adaptor.js.map +1 -1
  307. package/esm/plots/venn/index.d.ts +1 -1
  308. package/esm/plots/venn/index.js.map +1 -1
  309. package/esm/plots/venn/interactions/index.js +1 -1
  310. package/esm/plots/venn/interactions/index.js.map +1 -1
  311. package/esm/plots/venn/label.js +1 -1
  312. package/esm/plots/venn/label.js.map +1 -1
  313. package/esm/plots/venn/layout/diagram.js +1 -1
  314. package/esm/plots/venn/layout/diagram.js.map +1 -1
  315. package/esm/plots/venn/layout/layout.js +2 -2
  316. package/esm/plots/venn/layout/layout.js.map +1 -1
  317. package/esm/plots/venn/shape.js.map +1 -1
  318. package/esm/plots/venn/utils.js +3 -3
  319. package/esm/plots/venn/utils.js.map +1 -1
  320. package/esm/plots/violin/adaptor.js +6 -14
  321. package/esm/plots/violin/adaptor.js.map +1 -1
  322. package/esm/plots/violin/index.d.ts +1 -1
  323. package/esm/plots/violin/index.js.map +1 -1
  324. package/esm/plots/violin/utils.js +1 -1
  325. package/esm/plots/violin/utils.js.map +1 -1
  326. package/esm/plots/waterfall/adaptor.d.ts +1 -1
  327. package/esm/plots/waterfall/adaptor.js +4 -4
  328. package/esm/plots/waterfall/adaptor.js.map +1 -1
  329. package/esm/plots/waterfall/index.d.ts +1 -1
  330. package/esm/plots/waterfall/index.js.map +1 -1
  331. package/esm/plots/waterfall/shape.js.map +1 -1
  332. package/esm/plots/waterfall/utils.js +1 -1
  333. package/esm/plots/waterfall/utils.js.map +1 -1
  334. package/esm/plots/word-cloud/adaptor.js +4 -4
  335. package/esm/plots/word-cloud/adaptor.js.map +1 -1
  336. package/esm/plots/word-cloud/index.d.ts +2 -2
  337. package/esm/plots/word-cloud/index.js +1 -1
  338. package/esm/plots/word-cloud/index.js.map +1 -1
  339. package/esm/plots/word-cloud/shapes/word-cloud.js.map +1 -1
  340. package/esm/plots/word-cloud/utils.js +1 -1
  341. package/esm/plots/word-cloud/utils.js.map +1 -1
  342. package/esm/plugin/index.d.ts +1 -1
  343. package/esm/plugin/index.js +1 -1
  344. package/esm/plugin/index.js.map +1 -1
  345. package/esm/types/common.d.ts +12 -11
  346. package/esm/types/common.js.map +1 -1
  347. package/esm/types/index.d.ts +7 -7
  348. package/esm/types/index.js +7 -7
  349. package/esm/types/index.js.map +1 -1
  350. package/esm/types/state.d.ts +2 -2
  351. package/esm/types/state.js.map +1 -1
  352. package/esm/utils/conversion.js +4 -3
  353. package/esm/utils/conversion.js.map +1 -1
  354. package/esm/utils/data.js +1 -1
  355. package/esm/utils/data.js.map +1 -1
  356. package/esm/utils/geometry.d.ts +1 -1
  357. package/esm/utils/geometry.js +1 -1
  358. package/esm/utils/geometry.js.map +1 -1
  359. package/esm/utils/hierarchy/pack.js +2 -2
  360. package/esm/utils/hierarchy/pack.js.map +1 -1
  361. package/esm/utils/hierarchy/partition.js +2 -2
  362. package/esm/utils/hierarchy/partition.js.map +1 -1
  363. package/esm/utils/hierarchy/treemap.js +2 -2
  364. package/esm/utils/hierarchy/treemap.js.map +1 -1
  365. package/esm/utils/hierarchy/util.js +1 -1
  366. package/esm/utils/hierarchy/util.js.map +1 -1
  367. package/esm/utils/index.d.ts +10 -10
  368. package/esm/utils/index.js +10 -10
  369. package/esm/utils/index.js.map +1 -1
  370. package/esm/utils/padding.js +1 -1
  371. package/esm/utils/padding.js.map +1 -1
  372. package/esm/utils/path.d.ts +1 -1
  373. package/esm/utils/path.js.map +1 -1
  374. package/esm/utils/pattern/dot.js +1 -1
  375. package/esm/utils/pattern/dot.js.map +1 -1
  376. package/esm/utils/pattern/line.js +1 -1
  377. package/esm/utils/pattern/line.js.map +1 -1
  378. package/esm/utils/pattern/square.js +1 -1
  379. package/esm/utils/pattern/square.js.map +1 -1
  380. package/esm/utils/statistic.js +3 -2
  381. package/esm/utils/statistic.js.map +1 -1
  382. package/esm/utils/transform/histogram.js +1 -1
  383. package/esm/utils/transform/histogram.js.map +1 -1
  384. package/esm/utils/transform/word-cloud.js +1 -1
  385. package/esm/utils/transform/word-cloud.js.map +1 -1
  386. package/esm/utils/view.d.ts +8 -1
  387. package/esm/utils/view.js +27 -0
  388. package/esm/utils/view.js.map +1 -1
  389. package/lib/adaptor/brush.d.ts +1 -1
  390. package/lib/adaptor/brush.js +2 -2
  391. package/lib/adaptor/brush.js.map +1 -1
  392. package/lib/adaptor/common.d.ts +1 -1
  393. package/lib/adaptor/common.js +1 -10
  394. package/lib/adaptor/common.js.map +1 -1
  395. package/lib/adaptor/connected-area.d.ts +1 -1
  396. package/lib/adaptor/connected-area.js.map +1 -1
  397. package/lib/adaptor/conversion-tag.js +1 -1
  398. package/lib/adaptor/conversion-tag.js.map +1 -1
  399. package/lib/adaptor/geometries/area.js +1 -1
  400. package/lib/adaptor/geometries/area.js.map +1 -1
  401. package/lib/adaptor/geometries/base.d.ts +2 -2
  402. package/lib/adaptor/geometries/base.js +3 -1
  403. package/lib/adaptor/geometries/base.js.map +1 -1
  404. package/lib/adaptor/geometries/edge.d.ts +1 -1
  405. package/lib/adaptor/geometries/edge.js +1 -1
  406. package/lib/adaptor/geometries/edge.js.map +1 -1
  407. package/lib/adaptor/geometries/index.d.ts +5 -5
  408. package/lib/adaptor/geometries/index.js +4 -4
  409. package/lib/adaptor/geometries/index.js.map +1 -1
  410. package/lib/adaptor/geometries/interval.js.map +1 -1
  411. package/lib/adaptor/geometries/line.js +1 -1
  412. package/lib/adaptor/geometries/line.js.map +1 -1
  413. package/lib/adaptor/geometries/point.d.ts +1 -1
  414. package/lib/adaptor/geometries/point.js +1 -1
  415. package/lib/adaptor/geometries/point.js.map +1 -1
  416. package/lib/adaptor/geometries/polygon.d.ts +1 -1
  417. package/lib/adaptor/geometries/polygon.js +1 -1
  418. package/lib/adaptor/geometries/polygon.js.map +1 -1
  419. package/lib/adaptor/geometries/schema.d.ts +1 -1
  420. package/lib/adaptor/geometries/schema.js +1 -1
  421. package/lib/adaptor/geometries/schema.js.map +1 -1
  422. package/lib/adaptor/geometries/violin.d.ts +1 -1
  423. package/lib/adaptor/geometries/violin.js +1 -1
  424. package/lib/adaptor/geometries/violin.js.map +1 -1
  425. package/lib/adaptor/pattern.d.ts +1 -1
  426. package/lib/adaptor/pattern.js +1 -1
  427. package/lib/adaptor/pattern.js.map +1 -1
  428. package/lib/core/plot.d.ts +2 -2
  429. package/lib/core/plot.js +1 -1
  430. package/lib/core/plot.js.map +1 -1
  431. package/lib/index.d.ts +68 -71
  432. package/lib/index.js +103 -105
  433. package/lib/index.js.map +1 -1
  434. package/lib/interactions/actions/drill-down.js.map +1 -1
  435. package/lib/interactions/drill-down.js.map +1 -1
  436. package/lib/plots/_template/adaptor.js.map +1 -1
  437. package/lib/plots/_template/index.d.ts +1 -1
  438. package/lib/plots/_template/index.js.map +1 -1
  439. package/lib/plots/area/adaptor.js +6 -7
  440. package/lib/plots/area/adaptor.js.map +1 -1
  441. package/lib/plots/area/index.d.ts +1 -1
  442. package/lib/plots/area/index.js.map +1 -1
  443. package/lib/plots/bar/adaptor.d.ts +1 -1
  444. package/lib/plots/bar/adaptor.js.map +1 -1
  445. package/lib/plots/bar/index.d.ts +1 -1
  446. package/lib/plots/bar/index.js.map +1 -1
  447. package/lib/plots/bidirectional-bar/adaptor.js.map +1 -1
  448. package/lib/plots/bidirectional-bar/index.d.ts +1 -1
  449. package/lib/plots/bidirectional-bar/index.js +1 -1
  450. package/lib/plots/bidirectional-bar/index.js.map +1 -1
  451. package/lib/plots/bidirectional-bar/types.d.ts +1 -1
  452. package/lib/plots/bidirectional-bar/types.js.map +1 -1
  453. package/lib/plots/bidirectional-bar/utils.js.map +1 -1
  454. package/lib/plots/box/adaptor.js +2 -2
  455. package/lib/plots/box/adaptor.js.map +1 -1
  456. package/lib/plots/box/index.d.ts +1 -1
  457. package/lib/plots/box/index.js +1 -1
  458. package/lib/plots/box/index.js.map +1 -1
  459. package/lib/plots/bullet/adaptor.js +1 -1
  460. package/lib/plots/bullet/adaptor.js.map +1 -1
  461. package/lib/plots/bullet/index.d.ts +1 -1
  462. package/lib/plots/bullet/index.js +1 -1
  463. package/lib/plots/bullet/index.js.map +1 -1
  464. package/lib/plots/bullet/types.d.ts +1 -1
  465. package/lib/plots/bullet/types.js.map +1 -1
  466. package/lib/plots/chord/adaptor.js +3 -15
  467. package/lib/plots/chord/adaptor.js.map +1 -1
  468. package/lib/plots/chord/constant.d.ts +4 -4
  469. package/lib/plots/chord/constant.js +4 -4
  470. package/lib/plots/chord/constant.js.map +1 -1
  471. package/lib/plots/chord/index.d.ts +1 -1
  472. package/lib/plots/chord/index.js.map +1 -1
  473. package/lib/plots/circle-packing/adaptor.js +2 -2
  474. package/lib/plots/circle-packing/adaptor.js.map +1 -1
  475. package/lib/plots/circle-packing/index.d.ts +2 -2
  476. package/lib/plots/circle-packing/index.js.map +1 -1
  477. package/lib/plots/circle-packing/utils.js +2 -2
  478. package/lib/plots/circle-packing/utils.js.map +1 -1
  479. package/lib/plots/column/adaptor.js +5 -3
  480. package/lib/plots/column/adaptor.js.map +1 -1
  481. package/lib/plots/column/index.d.ts +1 -1
  482. package/lib/plots/column/index.js.map +1 -1
  483. package/lib/plots/column/types.d.ts +2 -2
  484. package/lib/plots/column/types.js.map +1 -1
  485. package/lib/plots/dual-axes/adaptor.js +5 -5
  486. package/lib/plots/dual-axes/adaptor.js.map +1 -1
  487. package/lib/plots/dual-axes/index.d.ts +1 -1
  488. package/lib/plots/dual-axes/index.js.map +1 -1
  489. package/lib/plots/dual-axes/types.d.ts +1 -1
  490. package/lib/plots/dual-axes/types.js.map +1 -1
  491. package/lib/plots/dual-axes/util/geometry.js.map +1 -1
  492. package/lib/plots/dual-axes/util/legend.d.ts +1 -1
  493. package/lib/plots/dual-axes/util/legend.js +1 -1
  494. package/lib/plots/dual-axes/util/legend.js.map +1 -1
  495. package/lib/plots/dual-axes/util/option.d.ts +1 -1
  496. package/lib/plots/dual-axes/util/option.js +1 -1
  497. package/lib/plots/dual-axes/util/option.js.map +1 -1
  498. package/lib/plots/facet/adaptor.js.map +1 -1
  499. package/lib/plots/facet/index.d.ts +1 -1
  500. package/lib/plots/facet/index.js.map +1 -1
  501. package/lib/plots/facet/types.d.ts +5 -6
  502. package/lib/plots/facet/types.js.map +1 -1
  503. package/lib/plots/facet/utils.js +1 -10
  504. package/lib/plots/facet/utils.js.map +1 -1
  505. package/lib/plots/funnel/adaptor.d.ts +5 -0
  506. package/lib/plots/funnel/adaptor.js +34 -4
  507. package/lib/plots/funnel/adaptor.js.map +1 -1
  508. package/lib/plots/funnel/geometries/basic.d.ts +5 -0
  509. package/lib/plots/funnel/geometries/basic.js +9 -4
  510. package/lib/plots/funnel/geometries/basic.js.map +1 -1
  511. package/lib/plots/funnel/geometries/common.d.ts +2 -1
  512. package/lib/plots/funnel/geometries/common.js +6 -3
  513. package/lib/plots/funnel/geometries/common.js.map +1 -1
  514. package/lib/plots/funnel/geometries/compare.d.ts +1 -0
  515. package/lib/plots/funnel/geometries/compare.js +39 -31
  516. package/lib/plots/funnel/geometries/compare.js.map +1 -1
  517. package/lib/plots/funnel/geometries/dynamic-height.js +2 -2
  518. package/lib/plots/funnel/geometries/dynamic-height.js.map +1 -1
  519. package/lib/plots/funnel/geometries/facet.js.map +1 -1
  520. package/lib/plots/funnel/index.d.ts +4 -3
  521. package/lib/plots/funnel/index.js +1 -0
  522. package/lib/plots/funnel/index.js.map +1 -1
  523. package/lib/plots/funnel/interactions/funnel-conversion-tag.d.ts +9 -0
  524. package/lib/plots/funnel/interactions/funnel-conversion-tag.js +60 -0
  525. package/lib/plots/funnel/interactions/funnel-conversion-tag.js.map +1 -0
  526. package/lib/plots/funnel/interactions/index.d.ts +5 -0
  527. package/lib/plots/funnel/interactions/index.js +13 -0
  528. package/lib/plots/funnel/interactions/index.js.map +1 -0
  529. package/lib/plots/funnel/types.d.ts +2 -1
  530. package/lib/plots/funnel/types.js.map +1 -1
  531. package/lib/plots/gauge/adaptor.js.map +1 -1
  532. package/lib/plots/gauge/index.d.ts +2 -2
  533. package/lib/plots/gauge/index.js +1 -1
  534. package/lib/plots/gauge/index.js.map +1 -1
  535. package/lib/plots/gauge/utils.js +5 -4
  536. package/lib/plots/gauge/utils.js.map +1 -1
  537. package/lib/plots/heatmap/adaptor.js +12 -15
  538. package/lib/plots/heatmap/adaptor.js.map +1 -1
  539. package/lib/plots/heatmap/index.d.ts +2 -2
  540. package/lib/plots/heatmap/index.js.map +1 -1
  541. package/lib/plots/heatmap/shapes/circle.js.map +1 -1
  542. package/lib/plots/heatmap/shapes/square.js.map +1 -1
  543. package/lib/plots/histogram/adaptor.js +7 -5
  544. package/lib/plots/histogram/adaptor.js.map +1 -1
  545. package/lib/plots/histogram/index.d.ts +1 -1
  546. package/lib/plots/histogram/index.js.map +1 -1
  547. package/lib/plots/line/adaptor.js +3 -4
  548. package/lib/plots/line/adaptor.js.map +1 -1
  549. package/lib/plots/line/index.d.ts +2 -2
  550. package/lib/plots/line/index.js.map +1 -1
  551. package/lib/plots/line/interactions/marker-active.js +1 -1
  552. package/lib/plots/line/interactions/marker-active.js.map +1 -1
  553. package/lib/plots/line/types.d.ts +1 -1
  554. package/lib/plots/line/types.js.map +1 -1
  555. package/lib/plots/liquid/adaptor.js +3 -2
  556. package/lib/plots/liquid/adaptor.js.map +1 -1
  557. package/lib/plots/liquid/index.d.ts +2 -2
  558. package/lib/plots/liquid/index.js +1 -1
  559. package/lib/plots/liquid/index.js.map +1 -1
  560. package/lib/plots/liquid/shapes/liquid.js +12 -5
  561. package/lib/plots/liquid/shapes/liquid.js.map +1 -1
  562. package/lib/plots/liquid/types.d.ts +6 -1
  563. package/lib/plots/liquid/types.js.map +1 -1
  564. package/lib/plots/mix/adaptor.js +2 -2
  565. package/lib/plots/mix/adaptor.js.map +1 -1
  566. package/lib/plots/mix/index.d.ts +2 -2
  567. package/lib/plots/mix/index.js.map +1 -1
  568. package/lib/plots/mix/interactions/association.js +1 -1
  569. package/lib/plots/mix/interactions/association.js.map +1 -1
  570. package/lib/plots/mix/interactions/utils.d.ts +1 -1
  571. package/lib/plots/mix/interactions/utils.js.map +1 -1
  572. package/lib/plots/mix/types.d.ts +3 -3
  573. package/lib/plots/mix/types.js.map +1 -1
  574. package/lib/plots/mix/utils.d.ts +10 -10
  575. package/lib/plots/mix/utils.js +37 -37
  576. package/lib/plots/mix/utils.js.map +1 -1
  577. package/lib/plots/pie/adaptor.js +5 -3
  578. package/lib/plots/pie/adaptor.js.map +1 -1
  579. package/lib/plots/pie/index.d.ts +2 -2
  580. package/lib/plots/pie/index.js +1 -1
  581. package/lib/plots/pie/index.js.map +1 -1
  582. package/lib/plots/pie/interactions/actions/legend-active.js.map +1 -1
  583. package/lib/plots/pie/interactions/actions/statistic-active.js.map +1 -1
  584. package/lib/plots/pie/types.d.ts +6 -1
  585. package/lib/plots/pie/types.js.map +1 -1
  586. package/lib/plots/progress/adaptor.js +2 -3
  587. package/lib/plots/progress/adaptor.js.map +1 -1
  588. package/lib/plots/progress/index.d.ts +1 -1
  589. package/lib/plots/progress/index.js.map +1 -1
  590. package/lib/plots/progress/types.d.ts +1 -1
  591. package/lib/plots/progress/types.js.map +1 -1
  592. package/lib/plots/progress/utils.d.ts +1 -0
  593. package/lib/plots/progress/utils.js +4 -1
  594. package/lib/plots/progress/utils.js.map +1 -1
  595. package/lib/plots/radar/adaptor.js.map +1 -1
  596. package/lib/plots/radar/index.d.ts +2 -2
  597. package/lib/plots/radar/index.js.map +1 -1
  598. package/lib/plots/radar/interactions/radar-tooltip-action.d.ts +1 -1
  599. package/lib/plots/radar/interactions/radar-tooltip-action.js.map +1 -1
  600. package/lib/plots/radar/types.d.ts +1 -1
  601. package/lib/plots/radar/types.js.map +1 -1
  602. package/lib/plots/radial-bar/adaptor.js +6 -7
  603. package/lib/plots/radial-bar/adaptor.js.map +1 -1
  604. package/lib/plots/radial-bar/index.d.ts +1 -1
  605. package/lib/plots/radial-bar/index.js.map +1 -1
  606. package/lib/plots/ring-progress/adaptor.js +1 -1
  607. package/lib/plots/ring-progress/adaptor.js.map +1 -1
  608. package/lib/plots/ring-progress/index.d.ts +1 -1
  609. package/lib/plots/ring-progress/index.js.map +1 -1
  610. package/lib/plots/ring-progress/types.d.ts +1 -1
  611. package/lib/plots/ring-progress/types.js.map +1 -1
  612. package/lib/plots/rose/adaptor.js +1 -1
  613. package/lib/plots/rose/adaptor.js.map +1 -1
  614. package/lib/plots/rose/index.d.ts +1 -1
  615. package/lib/plots/rose/index.js.map +1 -1
  616. package/lib/plots/sankey/adaptor.js +4 -13
  617. package/lib/plots/sankey/adaptor.js.map +1 -1
  618. package/lib/plots/sankey/helper.js +1 -1
  619. package/lib/plots/sankey/helper.js.map +1 -1
  620. package/lib/plots/sankey/index.d.ts +2 -2
  621. package/lib/plots/sankey/index.js +1 -1
  622. package/lib/plots/sankey/index.js.map +1 -1
  623. package/lib/plots/sankey/interactions/node-draggable.js.map +1 -1
  624. package/lib/plots/sankey/layout.d.ts +1 -1
  625. package/lib/plots/sankey/layout.js.map +1 -1
  626. package/lib/plots/sankey/sankey/index.d.ts +1 -1
  627. package/lib/plots/sankey/sankey/index.js +1 -1
  628. package/lib/plots/sankey/sankey/index.js.map +1 -1
  629. package/lib/plots/sankey/sankey/sankey.js.map +1 -1
  630. package/lib/plots/scatter/adaptor.js +5 -6
  631. package/lib/plots/scatter/adaptor.js.map +1 -1
  632. package/lib/plots/scatter/index.d.ts +2 -2
  633. package/lib/plots/scatter/index.js.map +1 -1
  634. package/lib/plots/scatter/types.d.ts +1 -1
  635. package/lib/plots/scatter/types.js.map +1 -1
  636. package/lib/plots/scatter/util.js +1 -1
  637. package/lib/plots/scatter/util.js.map +1 -1
  638. package/lib/plots/stock/adaptor.js +1 -1
  639. package/lib/plots/stock/adaptor.js.map +1 -1
  640. package/lib/plots/stock/index.d.ts +1 -1
  641. package/lib/plots/stock/index.js +1 -1
  642. package/lib/plots/stock/index.js.map +1 -1
  643. package/lib/plots/stock/utils.d.ts +3 -1
  644. package/lib/plots/stock/utils.js +4 -2
  645. package/lib/plots/stock/utils.js.map +1 -1
  646. package/lib/plots/sunburst/adaptor.js +1 -1
  647. package/lib/plots/sunburst/adaptor.js.map +1 -1
  648. package/lib/plots/sunburst/index.d.ts +2 -2
  649. package/lib/plots/sunburst/index.js.map +1 -1
  650. package/lib/plots/tiny-area/adaptor.js +2 -2
  651. package/lib/plots/tiny-area/adaptor.js.map +1 -1
  652. package/lib/plots/tiny-area/index.d.ts +1 -1
  653. package/lib/plots/tiny-area/index.js.map +1 -1
  654. package/lib/plots/tiny-area/types.d.ts +1 -1
  655. package/lib/plots/tiny-area/types.js.map +1 -1
  656. package/lib/plots/tiny-column/adaptor.js +3 -3
  657. package/lib/plots/tiny-column/adaptor.js.map +1 -1
  658. package/lib/plots/tiny-line/adaptor.js +2 -2
  659. package/lib/plots/tiny-line/adaptor.js.map +1 -1
  660. package/lib/plots/tiny-line/index.d.ts +1 -1
  661. package/lib/plots/tiny-line/index.js.map +1 -1
  662. package/lib/plots/tiny-line/types.d.ts +1 -1
  663. package/lib/plots/tiny-line/types.js.map +1 -1
  664. package/lib/plots/treemap/adaptor.js +1 -1
  665. package/lib/plots/treemap/adaptor.js.map +1 -1
  666. package/lib/plots/treemap/index.d.ts +2 -2
  667. package/lib/plots/treemap/index.js +1 -1
  668. package/lib/plots/treemap/index.js.map +1 -1
  669. package/lib/plots/treemap/utils.js.map +1 -1
  670. package/lib/plots/venn/adaptor.d.ts +3 -3
  671. package/lib/plots/venn/adaptor.js +8 -9
  672. package/lib/plots/venn/adaptor.js.map +1 -1
  673. package/lib/plots/venn/index.d.ts +1 -1
  674. package/lib/plots/venn/index.js.map +1 -1
  675. package/lib/plots/venn/interactions/index.js.map +1 -1
  676. package/lib/plots/venn/label.js.map +1 -1
  677. package/lib/plots/venn/layout/diagram.js.map +1 -1
  678. package/lib/plots/venn/layout/layout.js.map +1 -1
  679. package/lib/plots/venn/shape.js.map +1 -1
  680. package/lib/plots/venn/utils.js +3 -3
  681. package/lib/plots/venn/utils.js.map +1 -1
  682. package/lib/plots/violin/adaptor.js +4 -12
  683. package/lib/plots/violin/adaptor.js.map +1 -1
  684. package/lib/plots/violin/index.d.ts +1 -1
  685. package/lib/plots/violin/index.js.map +1 -1
  686. package/lib/plots/violin/utils.js.map +1 -1
  687. package/lib/plots/waterfall/adaptor.d.ts +1 -1
  688. package/lib/plots/waterfall/adaptor.js +1 -1
  689. package/lib/plots/waterfall/adaptor.js.map +1 -1
  690. package/lib/plots/waterfall/index.d.ts +1 -1
  691. package/lib/plots/waterfall/index.js.map +1 -1
  692. package/lib/plots/waterfall/shape.js.map +1 -1
  693. package/lib/plots/waterfall/utils.js.map +1 -1
  694. package/lib/plots/word-cloud/adaptor.js +2 -2
  695. package/lib/plots/word-cloud/adaptor.js.map +1 -1
  696. package/lib/plots/word-cloud/index.d.ts +2 -2
  697. package/lib/plots/word-cloud/index.js +1 -1
  698. package/lib/plots/word-cloud/index.js.map +1 -1
  699. package/lib/plots/word-cloud/shapes/word-cloud.js.map +1 -1
  700. package/lib/plots/word-cloud/utils.js +1 -1
  701. package/lib/plots/word-cloud/utils.js.map +1 -1
  702. package/lib/plugin/index.d.ts +1 -1
  703. package/lib/plugin/index.js +1 -1
  704. package/lib/plugin/index.js.map +1 -1
  705. package/lib/types/common.d.ts +12 -11
  706. package/lib/types/common.js.map +1 -1
  707. package/lib/types/index.d.ts +7 -7
  708. package/lib/types/index.js +7 -7
  709. package/lib/types/index.js.map +1 -1
  710. package/lib/types/state.d.ts +2 -2
  711. package/lib/types/state.js.map +1 -1
  712. package/lib/utils/conversion.js +4 -3
  713. package/lib/utils/conversion.js.map +1 -1
  714. package/lib/utils/data.js.map +1 -1
  715. package/lib/utils/geometry.d.ts +1 -1
  716. package/lib/utils/geometry.js.map +1 -1
  717. package/lib/utils/hierarchy/pack.js +1 -1
  718. package/lib/utils/hierarchy/pack.js.map +1 -1
  719. package/lib/utils/hierarchy/partition.js +1 -1
  720. package/lib/utils/hierarchy/partition.js.map +1 -1
  721. package/lib/utils/hierarchy/treemap.js +1 -1
  722. package/lib/utils/hierarchy/treemap.js.map +1 -1
  723. package/lib/utils/hierarchy/util.js.map +1 -1
  724. package/lib/utils/index.d.ts +10 -10
  725. package/lib/utils/index.js +23 -22
  726. package/lib/utils/index.js.map +1 -1
  727. package/lib/utils/padding.js.map +1 -1
  728. package/lib/utils/path.d.ts +1 -1
  729. package/lib/utils/path.js.map +1 -1
  730. package/lib/utils/pattern/dot.js.map +1 -1
  731. package/lib/utils/pattern/line.js.map +1 -1
  732. package/lib/utils/pattern/square.js.map +1 -1
  733. package/lib/utils/statistic.js +8 -7
  734. package/lib/utils/statistic.js.map +1 -1
  735. package/lib/utils/transform/histogram.js.map +1 -1
  736. package/lib/utils/transform/word-cloud.js.map +1 -1
  737. package/lib/utils/view.d.ts +8 -1
  738. package/lib/utils/view.js +29 -1
  739. package/lib/utils/view.js.map +1 -1
  740. package/package.json +9 -22
  741. package/src/adaptor/brush.ts +3 -4
  742. package/src/adaptor/common.ts +5 -14
  743. package/src/adaptor/connected-area.ts +1 -1
  744. package/src/adaptor/conversion-tag.ts +3 -3
  745. package/src/adaptor/geometries/area.ts +2 -2
  746. package/src/adaptor/geometries/base.ts +6 -4
  747. package/src/adaptor/geometries/edge.ts +2 -2
  748. package/src/adaptor/geometries/index.ts +5 -5
  749. package/src/adaptor/geometries/interval.ts +1 -1
  750. package/src/adaptor/geometries/line.ts +2 -2
  751. package/src/adaptor/geometries/point.ts +2 -2
  752. package/src/adaptor/geometries/polygon.ts +2 -2
  753. package/src/adaptor/geometries/schema.ts +2 -2
  754. package/src/adaptor/geometries/violin.ts +2 -2
  755. package/src/adaptor/pattern.ts +1 -1
  756. package/src/core/plot.ts +4 -4
  757. package/src/index.ts +105 -151
  758. package/src/interactions/actions/drill-down.ts +1 -1
  759. package/src/interactions/drill-down.ts +1 -1
  760. package/src/plots/_template/adaptor.ts +1 -1
  761. package/src/plots/_template/index.ts +2 -2
  762. package/src/plots/area/adaptor.ts +8 -9
  763. package/src/plots/area/index.ts +2 -2
  764. package/src/plots/bar/adaptor.ts +3 -3
  765. package/src/plots/bar/index.ts +2 -2
  766. package/src/plots/bidirectional-bar/adaptor.ts +6 -6
  767. package/src/plots/bidirectional-bar/index.ts +5 -5
  768. package/src/plots/bidirectional-bar/types.ts +1 -1
  769. package/src/plots/bidirectional-bar/utils.ts +1 -1
  770. package/src/plots/box/adaptor.ts +6 -6
  771. package/src/plots/box/index.ts +3 -3
  772. package/src/plots/bullet/adaptor.ts +3 -3
  773. package/src/plots/bullet/index.ts +3 -3
  774. package/src/plots/bullet/types.ts +1 -1
  775. package/src/plots/chord/adaptor.ts +5 -18
  776. package/src/plots/chord/constant.ts +4 -4
  777. package/src/plots/chord/index.ts +1 -1
  778. package/src/plots/circle-packing/adaptor.ts +10 -10
  779. package/src/plots/circle-packing/index.ts +2 -2
  780. package/src/plots/circle-packing/utils.ts +2 -2
  781. package/src/plots/column/adaptor.ts +13 -11
  782. package/src/plots/column/index.ts +2 -2
  783. package/src/plots/column/types.ts +2 -2
  784. package/src/plots/dual-axes/adaptor.ts +11 -11
  785. package/src/plots/dual-axes/index.ts +2 -2
  786. package/src/plots/dual-axes/types.ts +1 -1
  787. package/src/plots/dual-axes/util/geometry.ts +4 -4
  788. package/src/plots/dual-axes/util/legend.ts +3 -3
  789. package/src/plots/dual-axes/util/option.ts +5 -5
  790. package/src/plots/facet/adaptor.ts +2 -2
  791. package/src/plots/facet/index.ts +1 -1
  792. package/src/plots/facet/types.ts +5 -6
  793. package/src/plots/facet/utils.ts +4 -12
  794. package/src/plots/funnel/adaptor.ts +36 -6
  795. package/src/plots/funnel/geometries/basic.ts +15 -10
  796. package/src/plots/funnel/geometries/common.ts +9 -6
  797. package/src/plots/funnel/geometries/compare.ts +54 -45
  798. package/src/plots/funnel/geometries/dynamic-height.ts +5 -5
  799. package/src/plots/funnel/geometries/facet.ts +1 -1
  800. package/src/plots/funnel/index.ts +5 -5
  801. package/src/plots/funnel/interactions/funnel-conversion-tag.ts +57 -0
  802. package/src/plots/funnel/interactions/index.ts +11 -0
  803. package/src/plots/funnel/types.ts +2 -1
  804. package/src/plots/gauge/adaptor.ts +2 -2
  805. package/src/plots/gauge/index.ts +5 -6
  806. package/src/plots/gauge/utils.ts +7 -6
  807. package/src/plots/heatmap/adaptor.ts +13 -15
  808. package/src/plots/heatmap/index.ts +2 -2
  809. package/src/plots/heatmap/shapes/circle.ts +1 -1
  810. package/src/plots/heatmap/shapes/square.ts +1 -1
  811. package/src/plots/histogram/adaptor.ts +7 -6
  812. package/src/plots/histogram/index.ts +2 -2
  813. package/src/plots/line/adaptor.ts +8 -9
  814. package/src/plots/line/index.ts +2 -2
  815. package/src/plots/line/interactions/marker-active.ts +1 -1
  816. package/src/plots/line/types.ts +1 -1
  817. package/src/plots/liquid/adaptor.ts +6 -5
  818. package/src/plots/liquid/index.ts +4 -5
  819. package/src/plots/liquid/shapes/liquid.ts +20 -9
  820. package/src/plots/liquid/types.ts +6 -1
  821. package/src/plots/mix/adaptor.ts +6 -6
  822. package/src/plots/mix/index.ts +2 -2
  823. package/src/plots/mix/interactions/association.ts +3 -3
  824. package/src/plots/mix/interactions/utils.ts +1 -1
  825. package/src/plots/mix/types.ts +3 -3
  826. package/src/plots/mix/utils.ts +23 -23
  827. package/src/plots/pie/adaptor.ts +10 -8
  828. package/src/plots/pie/index.ts +3 -3
  829. package/src/plots/pie/interactions/actions/legend-active.ts +1 -1
  830. package/src/plots/pie/interactions/actions/statistic-active.ts +1 -1
  831. package/src/plots/pie/types.ts +6 -1
  832. package/src/plots/progress/adaptor.ts +5 -6
  833. package/src/plots/progress/index.ts +2 -2
  834. package/src/plots/progress/types.ts +1 -1
  835. package/src/plots/progress/utils.ts +4 -1
  836. package/src/plots/radar/adaptor.ts +3 -3
  837. package/src/plots/radar/index.ts +2 -2
  838. package/src/plots/radar/interactions/radar-tooltip-action.ts +1 -1
  839. package/src/plots/radar/types.ts +1 -1
  840. package/src/plots/radial-bar/adaptor.ts +3 -4
  841. package/src/plots/radial-bar/index.ts +2 -2
  842. package/src/plots/ring-progress/adaptor.ts +1 -1
  843. package/src/plots/ring-progress/index.ts +3 -3
  844. package/src/plots/ring-progress/types.ts +1 -1
  845. package/src/plots/rose/adaptor.ts +4 -4
  846. package/src/plots/rose/index.ts +2 -2
  847. package/src/plots/sankey/adaptor.ts +4 -13
  848. package/src/plots/sankey/helper.ts +2 -2
  849. package/src/plots/sankey/index.ts +3 -3
  850. package/src/plots/sankey/interactions/node-draggable.ts +1 -1
  851. package/src/plots/sankey/layout.ts +2 -2
  852. package/src/plots/sankey/sankey/index.ts +1 -1
  853. package/src/plots/sankey/sankey/sankey.ts +1 -1
  854. package/src/plots/scatter/adaptor.ts +5 -6
  855. package/src/plots/scatter/index.ts +3 -3
  856. package/src/plots/scatter/types.ts +5 -5
  857. package/src/plots/scatter/util.ts +3 -3
  858. package/src/plots/stock/adaptor.ts +4 -5
  859. package/src/plots/stock/index.ts +3 -3
  860. package/src/plots/stock/utils.ts +5 -4
  861. package/src/plots/sunburst/adaptor.ts +10 -10
  862. package/src/plots/sunburst/index.ts +2 -2
  863. package/src/plots/tiny-area/adaptor.ts +4 -4
  864. package/src/plots/tiny-area/index.ts +2 -2
  865. package/src/plots/tiny-area/types.ts +1 -1
  866. package/src/plots/tiny-column/adaptor.ts +4 -4
  867. package/src/plots/tiny-line/adaptor.ts +5 -5
  868. package/src/plots/tiny-line/index.ts +2 -2
  869. package/src/plots/tiny-line/types.ts +1 -1
  870. package/src/plots/treemap/adaptor.ts +4 -4
  871. package/src/plots/treemap/index.ts +3 -3
  872. package/src/plots/treemap/utils.ts +1 -1
  873. package/src/plots/venn/adaptor.ts +12 -11
  874. package/src/plots/venn/index.ts +2 -2
  875. package/src/plots/venn/interactions/index.ts +1 -1
  876. package/src/plots/venn/label.ts +1 -1
  877. package/src/plots/venn/layout/diagram.ts +1 -1
  878. package/src/plots/venn/layout/layout.ts +2 -2
  879. package/src/plots/venn/shape.ts +2 -2
  880. package/src/plots/venn/utils.ts +3 -3
  881. package/src/plots/violin/adaptor.ts +8 -17
  882. package/src/plots/violin/index.ts +2 -2
  883. package/src/plots/violin/utils.ts +1 -1
  884. package/src/plots/waterfall/adaptor.ts +6 -6
  885. package/src/plots/waterfall/index.ts +2 -2
  886. package/src/plots/waterfall/shape.ts +2 -3
  887. package/src/plots/waterfall/utils.ts +1 -1
  888. package/src/plots/word-cloud/adaptor.ts +5 -5
  889. package/src/plots/word-cloud/index.ts +3 -3
  890. package/src/plots/word-cloud/shapes/word-cloud.ts +1 -1
  891. package/src/plots/word-cloud/utils.ts +3 -4
  892. package/src/plugin/index.ts +2 -2
  893. package/src/types/common.ts +13 -11
  894. package/src/types/index.ts +7 -7
  895. package/src/types/state.ts +2 -2
  896. package/src/utils/conversion.ts +6 -3
  897. package/src/utils/data.ts +1 -1
  898. package/src/utils/geometry.ts +2 -2
  899. package/src/utils/hierarchy/pack.ts +2 -2
  900. package/src/utils/hierarchy/partition.ts +2 -2
  901. package/src/utils/hierarchy/treemap.ts +2 -2
  902. package/src/utils/hierarchy/util.ts +1 -1
  903. package/src/utils/index.ts +10 -10
  904. package/src/utils/padding.ts +1 -1
  905. package/src/utils/path.ts +1 -1
  906. package/src/utils/pattern/dot.ts +3 -3
  907. package/src/utils/pattern/line.ts +1 -1
  908. package/src/utils/pattern/square.ts +3 -3
  909. package/src/utils/statistic.ts +4 -3
  910. package/src/utils/transform/histogram.ts +1 -1
  911. package/src/utils/transform/word-cloud.ts +1 -1
  912. package/src/utils/view.ts +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CAAC;QACxB,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QAC1B,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC;QACxB,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { isNil, isFunction, assign } from '@antv/util';\r\nimport { Tag, Word } from '../../plots/word-cloud/types';\r\n\r\ntype FontWeight = number | 'normal' | 'bold' | 'bolder' | 'lighter';\r\n\r\nexport interface Options {\r\n size: [number, number];\r\n font?: string | ((row: Word, index?: number, words?: Word[]) => string);\r\n fontSize?: number | ((row: Word, index?: number, words?: Word[]) => number);\r\n fontWeight?: FontWeight | ((row: Word, index?: number, words?: Word[]) => FontWeight);\r\n rotate?: number | ((row: Word, index?: number, words?: Word[]) => number);\r\n padding?: number | ((row: Word, index?: number, words?: Word[]) => number);\r\n spiral?: 'archimedean' | 'rectangular' | ((size: [number, number]) => (t: number) => number[]);\r\n random?: number | (() => number);\r\n timeInterval?: number;\r\n imageMask?: HTMLImageElement;\r\n}\r\n\r\nconst DEFAULT_OPTIONS: Options = {\r\n font: () => 'serif',\r\n padding: 1,\r\n size: [500, 500],\r\n spiral: 'archimedean', // 'archimedean' || 'rectangular' || {function}\r\n // timeInterval: Infinity // max execute time\r\n timeInterval: 3000, // max execute time\r\n // imageMask: '', // instance of Image, must be loaded\r\n};\r\n\r\n/**\r\n * 根据对应的数据对象,计算每个\r\n * 词语在画布中的渲染位置,并返回\r\n * 计算后的数据对象\r\n * @param words\r\n * @param options\r\n */\r\nexport function wordCloud(words: Word[], options?: Partial<Options>): Tag[] {\r\n // 混入默认配置\r\n options = assign({} as Options, DEFAULT_OPTIONS, options);\r\n return transform(words, options as Options);\r\n}\r\n\r\n/**\r\n * 抛出没有混入默认配置的方法,用于测试。\r\n * @param words\r\n * @param options\r\n */\r\nexport function transform(words: Word[], options: Options) {\r\n // 布局对象\r\n const layout = tagCloud();\r\n ['font', 'fontSize', 'fontWeight', 'padding', 'rotate', 'size', 'spiral', 'timeInterval', 'random'].forEach(\r\n (key: string) => {\r\n if (!isNil(options[key])) {\r\n layout[key](options[key]);\r\n }\r\n }\r\n );\r\n\r\n layout.words(words);\r\n if (options.imageMask) {\r\n layout.createMask(options.imageMask);\r\n }\r\n\r\n const result = layout.start();\r\n const tags: any[] = result._tags;\r\n\r\n tags.forEach((tag) => {\r\n tag.x += options.size[0] / 2;\r\n tag.y += options.size[1] / 2;\r\n });\r\n\r\n const [w, h] = options.size;\r\n // 添加两个参照数据,分别表示左上角和右下角。\r\n // 不添加的话不会按照真实的坐标渲染,而是以\r\n // 数据中的边界坐标为边界进行拉伸,以铺满画布。\r\n // 这样的后果会导致词语之间的重叠。\r\n tags.push({\r\n text: '',\r\n value: 0,\r\n x: 0,\r\n y: 0,\r\n opacity: 0,\r\n });\r\n tags.push({\r\n text: '',\r\n value: 0,\r\n x: w,\r\n y: h,\r\n opacity: 0,\r\n });\r\n\r\n return tags;\r\n}\r\n\r\n/*\r\n * Synchronous version of d3-cloud\r\n */\r\n// Word cloud layout by Jason Davies, https://www.jasondavies.com/wordcloud/\r\n// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf\r\n/* eslint-disable no-return-assign, no-cond-assign */\r\n\r\ninterface Item {\r\n value: number;\r\n text: string;\r\n sprite: boolean;\r\n}\r\n\r\nconst cloudRadians = Math.PI / 180,\r\n cw = (1 << 11) >> 5,\r\n ch = 1 << 11;\r\n\r\nfunction cloudText(d: Item) {\r\n return d.text;\r\n}\r\n\r\nfunction cloudFont() {\r\n return 'serif';\r\n}\r\n\r\nfunction cloudFontNormal() {\r\n return 'normal';\r\n}\r\n\r\nfunction cloudFontSize(d: Item) {\r\n return d.value;\r\n}\r\n\r\nfunction cloudRotate() {\r\n return ~~(Math.random() * 2) * 90;\r\n}\r\n\r\nfunction cloudPadding() {\r\n return 1;\r\n}\r\n\r\n// Fetches a monochrome sprite bitmap for the specified text.\r\n// Load in batches for speed.\r\nfunction cloudSprite(contextAndRatio, d, data, di) {\r\n if (d.sprite) return;\r\n const c = contextAndRatio.context,\r\n ratio = contextAndRatio.ratio;\r\n\r\n c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);\r\n let x = 0,\r\n y = 0,\r\n maxh = 0;\r\n const n = data.length;\r\n --di;\r\n while (++di < n) {\r\n d = data[di];\r\n c.save();\r\n c.font = d.style + ' ' + d.weight + ' ' + ~~((d.size + 1) / ratio) + 'px ' + d.font;\r\n let w = c.measureText(d.text + 'm').width * ratio,\r\n h = d.size << 1;\r\n if (d.rotate) {\r\n const sr = Math.sin(d.rotate * cloudRadians),\r\n cr = Math.cos(d.rotate * cloudRadians),\r\n wcr = w * cr,\r\n wsr = w * sr,\r\n hcr = h * cr,\r\n hsr = h * sr;\r\n w = ((Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f) >> 5) << 5;\r\n h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));\r\n } else {\r\n w = ((w + 0x1f) >> 5) << 5;\r\n }\r\n if (h > maxh) maxh = h;\r\n if (x + w >= cw << 5) {\r\n x = 0;\r\n y += maxh;\r\n maxh = 0;\r\n }\r\n if (y + h >= ch) break;\r\n c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);\r\n if (d.rotate) c.rotate(d.rotate * cloudRadians);\r\n c.fillText(d.text, 0, 0);\r\n if (d.padding) {\r\n c.lineWidth = 2 * d.padding;\r\n c.strokeText(d.text, 0, 0);\r\n }\r\n c.restore();\r\n d.width = w;\r\n d.height = h;\r\n d.xoff = x;\r\n d.yoff = y;\r\n d.x1 = w >> 1;\r\n d.y1 = h >> 1;\r\n d.x0 = -d.x1;\r\n d.y0 = -d.y1;\r\n d.hasText = true;\r\n x += w;\r\n }\r\n const pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,\r\n sprite = [];\r\n while (--di >= 0) {\r\n d = data[di];\r\n if (!d.hasText) continue;\r\n const w = d.width,\r\n w32 = w >> 5;\r\n let h = d.y1 - d.y0;\r\n // Zero the buffer\r\n for (let i = 0; i < h * w32; i++) sprite[i] = 0;\r\n x = d.xoff;\r\n if (x == null) return;\r\n y = d.yoff;\r\n let seen = 0,\r\n seenRow = -1;\r\n for (let j = 0; j < h; j++) {\r\n for (let i = 0; i < w; i++) {\r\n const k = w32 * j + (i >> 5),\r\n m = pixels[((y + j) * (cw << 5) + (x + i)) << 2] ? 1 << (31 - (i % 32)) : 0;\r\n sprite[k] |= m;\r\n seen |= m;\r\n }\r\n if (seen) seenRow = j;\r\n else {\r\n d.y0++;\r\n h--;\r\n j--;\r\n y++;\r\n }\r\n }\r\n d.y1 = d.y0 + seenRow;\r\n d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);\r\n }\r\n}\r\n\r\n// Use mask-based collision detection.\r\nfunction cloudCollide(tag, board, sw) {\r\n sw >>= 5;\r\n const sprite = tag.sprite,\r\n w = tag.width >> 5,\r\n lx = tag.x - (w << 4),\r\n sx = lx & 0x7f,\r\n msx = 32 - sx,\r\n h = tag.y1 - tag.y0;\r\n let x = (tag.y + tag.y0) * sw + (lx >> 5),\r\n last;\r\n for (let j = 0; j < h; j++) {\r\n last = 0;\r\n for (let i = 0; i <= w; i++) {\r\n if (((last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0)) & board[x + i]) return true;\r\n }\r\n x += sw;\r\n }\r\n return false;\r\n}\r\n\r\nfunction cloudBounds(bounds, d) {\r\n const b0 = bounds[0],\r\n b1 = bounds[1];\r\n if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;\r\n if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;\r\n if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;\r\n if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;\r\n}\r\n\r\nfunction collideRects(a, b) {\r\n return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;\r\n}\r\n\r\nfunction archimedeanSpiral(size) {\r\n const e = size[0] / size[1];\r\n return function (t) {\r\n return [e * (t *= 0.1) * Math.cos(t), t * Math.sin(t)];\r\n };\r\n}\r\n\r\nfunction rectangularSpiral(size) {\r\n const dy = 4,\r\n dx = (dy * size[0]) / size[1];\r\n let x = 0,\r\n y = 0;\r\n return function (t) {\r\n const sign = t < 0 ? -1 : 1;\r\n // See triangular numbers: T_n = n * (n + 1) / 2.\r\n switch ((Math.sqrt(1 + 4 * sign * t) - sign) & 3) {\r\n case 0:\r\n x += dx;\r\n break;\r\n case 1:\r\n y += dy;\r\n break;\r\n case 2:\r\n x -= dx;\r\n break;\r\n default:\r\n y -= dy;\r\n break;\r\n }\r\n return [x, y];\r\n };\r\n}\r\n\r\n// TODO reuse arrays?\r\nfunction zeroArray(n) {\r\n const a = [];\r\n let i = -1;\r\n while (++i < n) a[i] = 0;\r\n return a;\r\n}\r\n\r\nfunction cloudCanvas() {\r\n return document.createElement('canvas');\r\n}\r\n\r\nexport function functor(d) {\r\n return isFunction(d)\r\n ? d\r\n : function () {\r\n return d;\r\n };\r\n}\r\n\r\nconst spirals = {\r\n archimedean: archimedeanSpiral,\r\n rectangular: rectangularSpiral,\r\n};\r\n\r\nfunction tagCloud() {\r\n let size = [256, 256],\r\n font = cloudFont,\r\n fontSize = cloudFontSize,\r\n fontWeight = cloudFontNormal,\r\n rotate = cloudRotate,\r\n padding = cloudPadding,\r\n spiral = archimedeanSpiral,\r\n random = Math.random,\r\n words = [],\r\n timeInterval = Infinity;\r\n\r\n const text = cloudText;\r\n const fontStyle = cloudFontNormal;\r\n const canvas = cloudCanvas;\r\n const cloud: any = {};\r\n\r\n cloud.start = function () {\r\n const [width, height] = size;\r\n const contextAndRatio = getContext(canvas()),\r\n board = cloud.board ? cloud.board : zeroArray((size[0] >> 5) * size[1]),\r\n n = words.length,\r\n tags = [],\r\n data = words\r\n .map(function (d, i, data) {\r\n d.text = text.call(this, d, i, data);\r\n d.font = font.call(this, d, i, data);\r\n d.style = fontStyle.call(this, d, i, data);\r\n d.weight = fontWeight.call(this, d, i, data);\r\n d.rotate = rotate.call(this, d, i, data);\r\n d.size = ~~fontSize.call(this, d, i, data);\r\n d.padding = padding.call(this, d, i, data);\r\n return d;\r\n })\r\n .sort(function (a, b) {\r\n return b.size - a.size;\r\n });\r\n let i = -1,\r\n bounds = !cloud.board\r\n ? null\r\n : [\r\n {\r\n x: 0,\r\n y: 0,\r\n },\r\n {\r\n x: width,\r\n y: height,\r\n },\r\n ];\r\n\r\n step();\r\n\r\n function step() {\r\n const start = Date.now();\r\n while (Date.now() - start < timeInterval && ++i < n) {\r\n const d = data[i];\r\n d.x = (width * (random() + 0.5)) >> 1;\r\n d.y = (height * (random() + 0.5)) >> 1;\r\n cloudSprite(contextAndRatio, d, data, i);\r\n if (d.hasText && place(board, d, bounds)) {\r\n tags.push(d);\r\n if (bounds) {\r\n if (!cloud.hasImage) {\r\n // update bounds if image mask not set\r\n cloudBounds(bounds, d);\r\n }\r\n } else {\r\n bounds = [\r\n { x: d.x + d.x0, y: d.y + d.y0 },\r\n { x: d.x + d.x1, y: d.y + d.y1 },\r\n ];\r\n }\r\n // Temporary hack\r\n d.x -= size[0] >> 1;\r\n d.y -= size[1] >> 1;\r\n }\r\n }\r\n cloud._tags = tags;\r\n cloud._bounds = bounds;\r\n }\r\n\r\n return cloud;\r\n };\r\n\r\n function getContext(canvas: HTMLCanvasElement) {\r\n canvas.width = canvas.height = 1;\r\n const ratio = Math.sqrt(canvas.getContext('2d')!.getImageData(0, 0, 1, 1).data.length >> 2);\r\n canvas.width = (cw << 5) / ratio;\r\n canvas.height = ch / ratio;\r\n\r\n const context = canvas.getContext('2d') as CanvasRenderingContext2D;\r\n context.fillStyle = context.strokeStyle = 'red';\r\n context.textAlign = 'center';\r\n return { context, ratio };\r\n }\r\n\r\n function place(board, tag, bounds) {\r\n // const perimeter = [{ x: 0, y: 0 }, { x: size[0], y: size[1] }],\r\n const startX = tag.x,\r\n startY = tag.y,\r\n maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),\r\n s = spiral(size),\r\n dt = random() < 0.5 ? 1 : -1;\r\n let dxdy,\r\n t = -dt,\r\n dx,\r\n dy;\r\n\r\n while ((dxdy = s((t += dt)))) {\r\n dx = ~~dxdy[0];\r\n dy = ~~dxdy[1];\r\n\r\n if (Math.min(Math.abs(dx), Math.abs(dy)) >= maxDelta) break;\r\n\r\n tag.x = startX + dx;\r\n tag.y = startY + dy;\r\n\r\n if (tag.x + tag.x0 < 0 || tag.y + tag.y0 < 0 || tag.x + tag.x1 > size[0] || tag.y + tag.y1 > size[1]) continue;\r\n // TODO only check for collisions within current bounds.\r\n if (!bounds || !cloudCollide(tag, board, size[0])) {\r\n if (!bounds || collideRects(tag, bounds)) {\r\n const sprite = tag.sprite,\r\n w = tag.width >> 5,\r\n sw = size[0] >> 5,\r\n lx = tag.x - (w << 4),\r\n sx = lx & 0x7f,\r\n msx = 32 - sx,\r\n h = tag.y1 - tag.y0;\r\n let last,\r\n x = (tag.y + tag.y0) * sw + (lx >> 5);\r\n for (let j = 0; j < h; j++) {\r\n last = 0;\r\n for (let i = 0; i <= w; i++) {\r\n board[x + i] |= (last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);\r\n }\r\n x += sw;\r\n }\r\n delete tag.sprite;\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n cloud.createMask = (img: HTMLImageElement) => {\r\n const can: HTMLCanvasElement = document.createElement('canvas');\r\n const [width, height] = size;\r\n\r\n // 当 width 或 height 为 0 时,调用 cxt.getImageData 会报错\r\n if (!width || !height) {\r\n return;\r\n }\r\n const w32 = width >> 5;\r\n const board = zeroArray((width >> 5) * height);\r\n can.width = width;\r\n can.height = height;\r\n const cxt = can.getContext('2d') as CanvasRenderingContext2D;\r\n cxt.drawImage(img, 0, 0, img.width, img.height, 0, 0, width, height);\r\n const imageData = cxt.getImageData(0, 0, width, height).data;\r\n for (let j = 0; j < height; j++) {\r\n for (let i = 0; i < width; i++) {\r\n const k = w32 * j + (i >> 5);\r\n const tmp = (j * width + i) << 2;\r\n const flag = imageData[tmp] >= 250 && imageData[tmp + 1] >= 250 && imageData[tmp + 2] >= 250;\r\n const m = flag ? 1 << (31 - (i % 32)) : 0;\r\n board[k] |= m;\r\n }\r\n }\r\n cloud.board = board;\r\n cloud.hasImage = true;\r\n };\r\n\r\n cloud.timeInterval = function (_) {\r\n timeInterval = _ == null ? Infinity : _;\r\n };\r\n\r\n cloud.words = function (_) {\r\n words = _;\r\n };\r\n\r\n cloud.size = function (_) {\r\n size = [+_[0], +_[1]];\r\n };\r\n\r\n cloud.font = function (_) {\r\n font = functor(_);\r\n };\r\n\r\n cloud.fontWeight = function (_) {\r\n fontWeight = functor(_);\r\n };\r\n\r\n cloud.rotate = function (_) {\r\n rotate = functor(_);\r\n };\r\n\r\n cloud.spiral = function (_) {\r\n spiral = spirals[_] || _;\r\n };\r\n\r\n cloud.fontSize = function (_) {\r\n fontSize = functor(_);\r\n };\r\n\r\n cloud.padding = function (_) {\r\n padding = functor(_);\r\n };\r\n\r\n cloud.random = function (_) {\r\n random = functor(_);\r\n };\r\n\r\n return cloud;\r\n}\r\n"]}
1
+ {"version":3,"file":"word-cloud.js","sourceRoot":"","sources":["../../../src/utils/transform/word-cloud.ts"],"names":[],"mappings":";;;AAAA,mCAAuD;AAkBvD,IAAM,eAAe,GAAY;IAC/B,IAAI,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO;IACnB,OAAO,E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AK,CAAC,OAAO,GAAG,UAAU,CAAC;QACzB,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC;QACxB,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { assign, isFunction, isNil } from '@antv/util';\r\nimport { Tag, Word } from '../../plots/word-cloud/types';\r\n\r\ntype FontWeight = number | 'normal' | 'bold' | 'bolder' | 'lighter';\r\n\r\nexport interface Options {\r\n size: [number, number];\r\n font?: string | ((row: Word, index?: number, words?: Word[]) => string);\r\n fontSize?: number | ((row: Word, index?: number, words?: Word[]) => number);\r\n fontWeight?: FontWeight | ((row: Word, index?: number, words?: Word[]) => FontWeight);\r\n rotate?: number | ((row: Word, index?: number, words?: Word[]) => number);\r\n padding?: number | ((row: Word, index?: number, words?: Word[]) => number);\r\n spiral?: 'archimedean' | 'rectangular' | ((size: [number, number]) => (t: number) => number[]);\r\n random?: number | (() => number);\r\n timeInterval?: number;\r\n imageMask?: HTMLImageElement;\r\n}\r\n\r\nconst DEFAULT_OPTIONS: Options = {\r\n font: () => 'serif',\r\n padding: 1,\r\n size: [500, 500],\r\n spiral: 'archimedean', // 'archimedean' || 'rectangular' || {function}\r\n // timeInterval: Infinity // max execute time\r\n timeInterval: 3000, // max execute time\r\n // imageMask: '', // instance of Image, must be loaded\r\n};\r\n\r\n/**\r\n * 根据对应的数据对象,计算每个\r\n * 词语在画布中的渲染位置,并返回\r\n * 计算后的数据对象\r\n * @param words\r\n * @param options\r\n */\r\nexport function wordCloud(words: Word[], options?: Partial<Options>): Tag[] {\r\n // 混入默认配置\r\n options = assign({} as Options, DEFAULT_OPTIONS, options);\r\n return transform(words, options as Options);\r\n}\r\n\r\n/**\r\n * 抛出没有混入默认配置的方法,用于测试。\r\n * @param words\r\n * @param options\r\n */\r\nexport function transform(words: Word[], options: Options) {\r\n // 布局对象\r\n const layout = tagCloud();\r\n ['font', 'fontSize', 'fontWeight', 'padding', 'rotate', 'size', 'spiral', 'timeInterval', 'random'].forEach(\r\n (key: string) => {\r\n if (!isNil(options[key])) {\r\n layout[key](options[key]);\r\n }\r\n }\r\n );\r\n\r\n layout.words(words);\r\n if (options.imageMask) {\r\n layout.createMask(options.imageMask);\r\n }\r\n\r\n const result = layout.start();\r\n const tags: any[] = result._tags;\r\n\r\n tags.forEach((tag) => {\r\n tag.x += options.size[0] / 2;\r\n tag.y += options.size[1] / 2;\r\n });\r\n\r\n const [w, h] = options.size;\r\n // 添加两个参照数据,分别表示左上角和右下角。\r\n // 不添加的话不会按照真实的坐标渲染,而是以\r\n // 数据中的边界坐标为边界进行拉伸,以铺满画布。\r\n // 这样的后果会导致词语之间的重叠。\r\n tags.push({\r\n text: '',\r\n value: 0,\r\n x: 0,\r\n y: 0,\r\n opacity: 0,\r\n });\r\n tags.push({\r\n text: '',\r\n value: 0,\r\n x: w,\r\n y: h,\r\n opacity: 0,\r\n });\r\n\r\n return tags;\r\n}\r\n\r\n/*\r\n * Synchronous version of d3-cloud\r\n */\r\n// Word cloud layout by Jason Davies, https://www.jasondavies.com/wordcloud/\r\n// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf\r\n/* eslint-disable no-return-assign, no-cond-assign */\r\n\r\ninterface Item {\r\n value: number;\r\n text: string;\r\n sprite: boolean;\r\n}\r\n\r\nconst cloudRadians = Math.PI / 180,\r\n cw = (1 << 11) >> 5,\r\n ch = 1 << 11;\r\n\r\nfunction cloudText(d: Item) {\r\n return d.text;\r\n}\r\n\r\nfunction cloudFont() {\r\n return 'serif';\r\n}\r\n\r\nfunction cloudFontNormal() {\r\n return 'normal';\r\n}\r\n\r\nfunction cloudFontSize(d: Item) {\r\n return d.value;\r\n}\r\n\r\nfunction cloudRotate() {\r\n return ~~(Math.random() * 2) * 90;\r\n}\r\n\r\nfunction cloudPadding() {\r\n return 1;\r\n}\r\n\r\n// Fetches a monochrome sprite bitmap for the specified text.\r\n// Load in batches for speed.\r\nfunction cloudSprite(contextAndRatio, d, data, di) {\r\n if (d.sprite) return;\r\n const c = contextAndRatio.context,\r\n ratio = contextAndRatio.ratio;\r\n\r\n c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);\r\n let x = 0,\r\n y = 0,\r\n maxh = 0;\r\n const n = data.length;\r\n --di;\r\n while (++di < n) {\r\n d = data[di];\r\n c.save();\r\n c.font = d.style + ' ' + d.weight + ' ' + ~~((d.size + 1) / ratio) + 'px ' + d.font;\r\n let w = c.measureText(d.text + 'm').width * ratio,\r\n h = d.size << 1;\r\n if (d.rotate) {\r\n const sr = Math.sin(d.rotate * cloudRadians),\r\n cr = Math.cos(d.rotate * cloudRadians),\r\n wcr = w * cr,\r\n wsr = w * sr,\r\n hcr = h * cr,\r\n hsr = h * sr;\r\n w = ((Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f) >> 5) << 5;\r\n h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));\r\n } else {\r\n w = ((w + 0x1f) >> 5) << 5;\r\n }\r\n if (h > maxh) maxh = h;\r\n if (x + w >= cw << 5) {\r\n x = 0;\r\n y += maxh;\r\n maxh = 0;\r\n }\r\n if (y + h >= ch) break;\r\n c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);\r\n if (d.rotate) c.rotate(d.rotate * cloudRadians);\r\n c.fillText(d.text, 0, 0);\r\n if (d.padding) {\r\n c.lineWidth = 2 * d.padding;\r\n c.strokeText(d.text, 0, 0);\r\n }\r\n c.restore();\r\n d.width = w;\r\n d.height = h;\r\n d.xoff = x;\r\n d.yoff = y;\r\n d.x1 = w >> 1;\r\n d.y1 = h >> 1;\r\n d.x0 = -d.x1;\r\n d.y0 = -d.y1;\r\n d.hasText = true;\r\n x += w;\r\n }\r\n const pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,\r\n sprite = [];\r\n while (--di >= 0) {\r\n d = data[di];\r\n if (!d.hasText) continue;\r\n const w = d.width,\r\n w32 = w >> 5;\r\n let h = d.y1 - d.y0;\r\n // Zero the buffer\r\n for (let i = 0; i < h * w32; i++) sprite[i] = 0;\r\n x = d.xoff;\r\n if (x == null) return;\r\n y = d.yoff;\r\n let seen = 0,\r\n seenRow = -1;\r\n for (let j = 0; j < h; j++) {\r\n for (let i = 0; i < w; i++) {\r\n const k = w32 * j + (i >> 5),\r\n m = pixels[((y + j) * (cw << 5) + (x + i)) << 2] ? 1 << (31 - (i % 32)) : 0;\r\n sprite[k] |= m;\r\n seen |= m;\r\n }\r\n if (seen) seenRow = j;\r\n else {\r\n d.y0++;\r\n h--;\r\n j--;\r\n y++;\r\n }\r\n }\r\n d.y1 = d.y0 + seenRow;\r\n d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);\r\n }\r\n}\r\n\r\n// Use mask-based collision detection.\r\nfunction cloudCollide(tag, board, sw) {\r\n sw >>= 5;\r\n const sprite = tag.sprite,\r\n w = tag.width >> 5,\r\n lx = tag.x - (w << 4),\r\n sx = lx & 0x7f,\r\n msx = 32 - sx,\r\n h = tag.y1 - tag.y0;\r\n let x = (tag.y + tag.y0) * sw + (lx >> 5),\r\n last;\r\n for (let j = 0; j < h; j++) {\r\n last = 0;\r\n for (let i = 0; i <= w; i++) {\r\n if (((last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0)) & board[x + i]) return true;\r\n }\r\n x += sw;\r\n }\r\n return false;\r\n}\r\n\r\nfunction cloudBounds(bounds, d) {\r\n const b0 = bounds[0],\r\n b1 = bounds[1];\r\n if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;\r\n if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;\r\n if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;\r\n if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;\r\n}\r\n\r\nfunction collideRects(a, b) {\r\n return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;\r\n}\r\n\r\nfunction archimedeanSpiral(size) {\r\n const e = size[0] / size[1];\r\n return function (t) {\r\n return [e * (t *= 0.1) * Math.cos(t), t * Math.sin(t)];\r\n };\r\n}\r\n\r\nfunction rectangularSpiral(size) {\r\n const dy = 4,\r\n dx = (dy * size[0]) / size[1];\r\n let x = 0,\r\n y = 0;\r\n return function (t) {\r\n const sign = t < 0 ? -1 : 1;\r\n // See triangular numbers: T_n = n * (n + 1) / 2.\r\n switch ((Math.sqrt(1 + 4 * sign * t) - sign) & 3) {\r\n case 0:\r\n x += dx;\r\n break;\r\n case 1:\r\n y += dy;\r\n break;\r\n case 2:\r\n x -= dx;\r\n break;\r\n default:\r\n y -= dy;\r\n break;\r\n }\r\n return [x, y];\r\n };\r\n}\r\n\r\n// TODO reuse arrays?\r\nfunction zeroArray(n) {\r\n const a = [];\r\n let i = -1;\r\n while (++i < n) a[i] = 0;\r\n return a;\r\n}\r\n\r\nfunction cloudCanvas() {\r\n return document.createElement('canvas');\r\n}\r\n\r\nexport function functor(d) {\r\n return isFunction(d)\r\n ? d\r\n : function () {\r\n return d;\r\n };\r\n}\r\n\r\nconst spirals = {\r\n archimedean: archimedeanSpiral,\r\n rectangular: rectangularSpiral,\r\n};\r\n\r\nfunction tagCloud() {\r\n let size = [256, 256],\r\n font = cloudFont,\r\n fontSize = cloudFontSize,\r\n fontWeight = cloudFontNormal,\r\n rotate = cloudRotate,\r\n padding = cloudPadding,\r\n spiral = archimedeanSpiral,\r\n random = Math.random,\r\n words = [],\r\n timeInterval = Infinity;\r\n\r\n const text = cloudText;\r\n const fontStyle = cloudFontNormal;\r\n const canvas = cloudCanvas;\r\n const cloud: any = {};\r\n\r\n cloud.start = function () {\r\n const [width, height] = size;\r\n const contextAndRatio = getContext(canvas()),\r\n board = cloud.board ? cloud.board : zeroArray((size[0] >> 5) * size[1]),\r\n n = words.length,\r\n tags = [],\r\n data = words\r\n .map(function (d, i, data) {\r\n d.text = text.call(this, d, i, data);\r\n d.font = font.call(this, d, i, data);\r\n d.style = fontStyle.call(this, d, i, data);\r\n d.weight = fontWeight.call(this, d, i, data);\r\n d.rotate = rotate.call(this, d, i, data);\r\n d.size = ~~fontSize.call(this, d, i, data);\r\n d.padding = padding.call(this, d, i, data);\r\n return d;\r\n })\r\n .sort(function (a, b) {\r\n return b.size - a.size;\r\n });\r\n let i = -1,\r\n bounds = !cloud.board\r\n ? null\r\n : [\r\n {\r\n x: 0,\r\n y: 0,\r\n },\r\n {\r\n x: width,\r\n y: height,\r\n },\r\n ];\r\n\r\n step();\r\n\r\n function step() {\r\n const start = Date.now();\r\n while (Date.now() - start < timeInterval && ++i < n) {\r\n const d = data[i];\r\n d.x = (width * (random() + 0.5)) >> 1;\r\n d.y = (height * (random() + 0.5)) >> 1;\r\n cloudSprite(contextAndRatio, d, data, i);\r\n if (d.hasText && place(board, d, bounds)) {\r\n tags.push(d);\r\n if (bounds) {\r\n if (!cloud.hasImage) {\r\n // update bounds if image mask not set\r\n cloudBounds(bounds, d);\r\n }\r\n } else {\r\n bounds = [\r\n { x: d.x + d.x0, y: d.y + d.y0 },\r\n { x: d.x + d.x1, y: d.y + d.y1 },\r\n ];\r\n }\r\n // Temporary hack\r\n d.x -= size[0] >> 1;\r\n d.y -= size[1] >> 1;\r\n }\r\n }\r\n cloud._tags = tags;\r\n cloud._bounds = bounds;\r\n }\r\n\r\n return cloud;\r\n };\r\n\r\n function getContext(canvas: HTMLCanvasElement) {\r\n canvas.width = canvas.height = 1;\r\n const ratio = Math.sqrt(canvas.getContext('2d')!.getImageData(0, 0, 1, 1).data.length >> 2);\r\n canvas.width = (cw << 5) / ratio;\r\n canvas.height = ch / ratio;\r\n\r\n const context = canvas.getContext('2d') as CanvasRenderingContext2D;\r\n context.fillStyle = context.strokeStyle = 'red';\r\n context.textAlign = 'center';\r\n return { context, ratio };\r\n }\r\n\r\n function place(board, tag, bounds) {\r\n // const perimeter = [{ x: 0, y: 0 }, { x: size[0], y: size[1] }],\r\n const startX = tag.x,\r\n startY = tag.y,\r\n maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),\r\n s = spiral(size),\r\n dt = random() < 0.5 ? 1 : -1;\r\n let dxdy,\r\n t = -dt,\r\n dx,\r\n dy;\r\n\r\n while ((dxdy = s((t += dt)))) {\r\n dx = ~~dxdy[0];\r\n dy = ~~dxdy[1];\r\n\r\n if (Math.min(Math.abs(dx), Math.abs(dy)) >= maxDelta) break;\r\n\r\n tag.x = startX + dx;\r\n tag.y = startY + dy;\r\n\r\n if (tag.x + tag.x0 < 0 || tag.y + tag.y0 < 0 || tag.x + tag.x1 > size[0] || tag.y + tag.y1 > size[1]) continue;\r\n // TODO only check for collisions within current bounds.\r\n if (!bounds || !cloudCollide(tag, board, size[0])) {\r\n if (!bounds || collideRects(tag, bounds)) {\r\n const sprite = tag.sprite,\r\n w = tag.width >> 5,\r\n sw = size[0] >> 5,\r\n lx = tag.x - (w << 4),\r\n sx = lx & 0x7f,\r\n msx = 32 - sx,\r\n h = tag.y1 - tag.y0;\r\n let last,\r\n x = (tag.y + tag.y0) * sw + (lx >> 5);\r\n for (let j = 0; j < h; j++) {\r\n last = 0;\r\n for (let i = 0; i <= w; i++) {\r\n board[x + i] |= (last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);\r\n }\r\n x += sw;\r\n }\r\n delete tag.sprite;\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n cloud.createMask = (img: HTMLImageElement) => {\r\n const can: HTMLCanvasElement = document.createElement('canvas');\r\n const [width, height] = size;\r\n\r\n // 当 width 或 height 为 0 时,调用 cxt.getImageData 会报错\r\n if (!width || !height) {\r\n return;\r\n }\r\n const w32 = width >> 5;\r\n const board = zeroArray((width >> 5) * height);\r\n can.width = width;\r\n can.height = height;\r\n const cxt = can.getContext('2d') as CanvasRenderingContext2D;\r\n cxt.drawImage(img, 0, 0, img.width, img.height, 0, 0, width, height);\r\n const imageData = cxt.getImageData(0, 0, width, height).data;\r\n for (let j = 0; j < height; j++) {\r\n for (let i = 0; i < width; i++) {\r\n const k = w32 * j + (i >> 5);\r\n const tmp = (j * width + i) << 2;\r\n const flag = imageData[tmp] >= 250 && imageData[tmp + 1] >= 250 && imageData[tmp + 2] >= 250;\r\n const m = flag ? 1 << (31 - (i % 32)) : 0;\r\n board[k] |= m;\r\n }\r\n }\r\n cloud.board = board;\r\n cloud.hasImage = true;\r\n };\r\n\r\n cloud.timeInterval = function (_) {\r\n timeInterval = _ == null ? Infinity : _;\r\n };\r\n\r\n cloud.words = function (_) {\r\n words = _;\r\n };\r\n\r\n cloud.size = function (_) {\r\n size = [+_[0], +_[1]];\r\n };\r\n\r\n cloud.font = function (_) {\r\n font = functor(_);\r\n };\r\n\r\n cloud.fontWeight = function (_) {\r\n fontWeight = functor(_);\r\n };\r\n\r\n cloud.rotate = function (_) {\r\n rotate = functor(_);\r\n };\r\n\r\n cloud.spiral = function (_) {\r\n spiral = spirals[_] || _;\r\n };\r\n\r\n cloud.fontSize = function (_) {\r\n fontSize = functor(_);\r\n };\r\n\r\n cloud.padding = function (_) {\r\n padding = functor(_);\r\n };\r\n\r\n cloud.random = function (_) {\r\n random = functor(_);\r\n };\r\n\r\n return cloud;\r\n}\r\n"]}
@@ -1,4 +1,5 @@
1
- import { View } from '@antv/g2';
1
+ import { Geometry, Types, View } from '@antv/g2';
2
+ import { Options } from '../types';
2
3
  /**
3
4
  * 在 Chart 中查找特定 id 的子 View
4
5
  * @param chart
@@ -19,3 +20,9 @@ export declare function getViews(view: View): View[];
19
20
  * @ignore
20
21
  */
21
22
  export declare function getSiblingViews(view: View): View[];
23
+ /**
24
+ * 所有的 Geometries 都使用同一动画(各个图形如有区别,自行覆盖)并添加处理动画回调
25
+ * @param view View
26
+ * @param animation 动画配置
27
+ */
28
+ export declare function addViewAnimation(view: View, animation: Options['animation'], geometries?: Geometry<Types.ShapePoint>[]): void;
package/lib/utils/view.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSiblingViews = exports.getViews = exports.findViewById = void 0;
3
+ exports.addViewAnimation = exports.getSiblingViews = exports.getViews = exports.findViewById = void 0;
4
+ var util_1 = require("@antv/util");
4
5
  /**
5
6
  * 在 Chart 中查找特定 id 的子 View
6
7
  * @param chart
@@ -31,4 +32,31 @@ function getSiblingViews(view) {
31
32
  return getViews(view).filter(function (sub) { return sub !== view; });
32
33
  }
33
34
  exports.getSiblingViews = getSiblingViews;
35
+ /**
36
+ * 所有的 Geometries 都使用同一动画(各个图形如有区别,自行覆盖)并添加处理动画回调
37
+ * @param view View
38
+ * @param animation 动画配置
39
+ */
40
+ function addViewAnimation(view, animation, geometries) {
41
+ if (geometries === void 0) { geometries = view.geometries; }
42
+ // 同时设置整个 view 动画选项
43
+ if (typeof animation === 'boolean') {
44
+ view.animate(animation);
45
+ }
46
+ else {
47
+ view.animate(true);
48
+ }
49
+ // 所有的 Geometry 都使用同一动画(各个图形如有区别,自行覆盖)
50
+ util_1.each(geometries, function (g) {
51
+ var animationCfg;
52
+ if (util_1.isFunction(animation)) {
53
+ animationCfg = animation(g.type || g.shapeType, g) || true;
54
+ }
55
+ else {
56
+ animationCfg = animation;
57
+ }
58
+ g.animate(animationCfg);
59
+ });
60
+ }
61
+ exports.addViewAnimation = addViewAnimation;
34
62
  //# sourceMappingURL=view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../src/utils/view.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,YAAY,CAAC,KAAW,EAAE,EAAU;IAClD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAC,IAAU,IAAK,OAAA,IAAI,CAAC,EAAE,KAAK,EAAE,EAAd,CAAc,CAAC,CAAC;AAC1D,CAAC;AAFD,oCAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAU;IACjC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACpC,CAAC;AAHD,4BAGC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,IAAU;IACxC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,KAAK,IAAI,EAAZ,CAAY,CAAC,CAAC;AACtD,CAAC;AAFD,0CAEC","sourcesContent":["import { View } from '@antv/g2';\n\n/**\n * 在 Chart 中查找特定 id 的子 View\n * @param chart\n * @param id\n */\nexport function findViewById(chart: View, id: string): View {\n return chart.views.find((view: View) => view.id === id);\n}\n\n/**\n * 获取同 view 同一级的所有 views\n * @param view 当前 view\n * @returns 同一级的 views\n * @ignore\n */\nexport function getViews(view: View): View[] {\n const parent = view.parent;\n return parent ? parent.views : [];\n}\n\n/**\n * 获取同 view 同一级的 views,不包括自身\n * @param view 当前 view\n * @returns 同一级的 views\n * @ignore\n */\nexport function getSiblingViews(view: View): View[] {\n return getViews(view).filter((sub) => sub !== view);\n}\n"]}
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../src/utils/view.ts"],"names":[],"mappings":";;;AACA,mCAA8C;AAI9C;;;;GAIG;AACH,SAAgB,YAAY,CAAC,KAAW,EAAE,EAAU;IAClD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAC,IAAU,IAAK,OAAA,IAAI,CAAC,EAAE,KAAK,EAAE,EAAd,CAAc,CAAC,CAAC;AAC1D,CAAC;AAFD,oCAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAU;IACjC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACpC,CAAC;AAHD,4BAGC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,IAAU;IACxC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,KAAK,IAAI,EAAZ,CAAY,CAAC,CAAC;AACtD,CAAC;AAFD,0CAEC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAC9B,IAAU,EACV,SAA+B,EAC/B,UAA0D;IAA1D,2BAAA,EAAA,aAA2C,IAAI,CAAC,UAAU;IAE1D,mBAAmB;IACnB,IAAI,OAAO,SAAS,KAAK,SAAS,EAAE;QAClC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;KACzB;SAAM;QACL,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACpB;IAED,sCAAsC;IACtC,WAAI,CAAC,UAAU,EAAE,UAAC,CAAW;QAC3B,IAAI,YAAY,CAAC;QACjB,IAAI,iBAAU,CAAC,SAAS,CAAC,EAAE;YACzB,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC;SAC5D;aAAM;YACL,YAAY,GAAG,SAAS,CAAC;SAC1B;QAED,CAAC,CAAC,OAAO,CAAC,YAAyB,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AAvBD,4CAuBC","sourcesContent":["import { Geometry, Types, View } from '@antv/g2';\nimport { each, isFunction } from '@antv/util';\nimport { Options } from '../types';\nimport { Animation } from '../types/animation';\n\n/**\n * 在 Chart 中查找特定 id 的子 View\n * @param chart\n * @param id\n */\nexport function findViewById(chart: View, id: string): View {\n return chart.views.find((view: View) => view.id === id);\n}\n\n/**\n * 获取同 view 同一级的所有 views\n * @param view 当前 view\n * @returns 同一级的 views\n * @ignore\n */\nexport function getViews(view: View): View[] {\n const parent = view.parent;\n return parent ? parent.views : [];\n}\n\n/**\n * 获取同 view 同一级的 views,不包括自身\n * @param view 当前 view\n * @returns 同一级的 views\n * @ignore\n */\nexport function getSiblingViews(view: View): View[] {\n return getViews(view).filter((sub) => sub !== view);\n}\n\n/**\n * 所有的 Geometries 都使用同一动画(各个图形如有区别,自行覆盖)并添加处理动画回调\n * @param view View\n * @param animation 动画配置\n */\nexport function addViewAnimation(\n view: View,\n animation: Options['animation'],\n geometries: Geometry<Types.ShapePoint>[] = view.geometries\n) {\n // 同时设置整个 view 动画选项\n if (typeof animation === 'boolean') {\n view.animate(animation);\n } else {\n view.animate(true);\n }\n\n // 所有的 Geometry 都使用同一动画(各个图形如有区别,自行覆盖)\n each(geometries, (g: Geometry) => {\n let animationCfg;\n if (isFunction(animation)) {\n animationCfg = animation(g.type || g.shapeType, g) || true;\n } else {\n animationCfg = animation;\n }\n\n g.animate(animationCfg as Animation);\n });\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g2plot",
3
- "version": "2.4.20",
3
+ "version": "2.4.23",
4
4
  "description": "An interactive and responsive charting library",
5
5
  "keywords": [
6
6
  "chart",
@@ -24,11 +24,7 @@
24
24
  "url": "https://github.com/antvis/G2plot"
25
25
  },
26
26
  "scripts": {
27
- "start": "npm run site:clean && npm run site:develop",
28
- "site:develop": "cross-env PORT=8080 gatsby develop --open -H 0.0.0.0",
29
- "site:build": "NODE_OPTIONS='--max_old_space_size=8192' npm run site:clean && gatsby build --prefix-paths",
30
- "site:clean": "gatsby clean",
31
- "site:deploy": "npm run build && npm run site:build && gh-pages -d public",
27
+ "start": "cd site && npm start",
32
28
  "fix": "eslint --ext .ts ./src ./__tests__ --fix && prettier --write ./src ./__tests__ && lint-md --fix ./examples ./docs",
33
29
  "build": "run-s clean lib dist size",
34
30
  "size": "limit-size",
@@ -45,8 +41,7 @@
45
41
  "ci": "run-s lint coverage build",
46
42
  "changelog": "generate-changelog",
47
43
  "prepublishOnly": "run-s lint test build",
48
- "analyze": "webpack --profile --json > dist/stats.json && webpack-bundle-analyzer ./dist/stats.json",
49
- "contributors:add": "all-contributors add"
44
+ "analyze": "webpack --profile --json > dist/stats.json && webpack-bundle-analyzer ./dist/stats.json"
50
45
  },
51
46
  "husky": {
52
47
  "hooks": {
@@ -67,7 +62,6 @@
67
62
  },
68
63
  "devDependencies": {
69
64
  "@antv/data-set": "^0.11.5",
70
- "@antv/gatsby-theme-antv": "^1.1.15",
71
65
  "@babel/core": "^7.10.4",
72
66
  "@babel/plugin-transform-runtime": "^7.11.5",
73
67
  "@babel/preset-env": "^7.10.4",
@@ -77,20 +71,15 @@
77
71
  "@types/jest": "^25.2.1",
78
72
  "@typescript-eslint/eslint-plugin": "^2.0.0",
79
73
  "@typescript-eslint/parser": "^2.0.0",
80
- "all-contributors-cli": "^6.20.0",
81
74
  "antd": "^4.8.4",
82
75
  "babel-loader": "^8.1.0",
83
- "chroma-js": "^2.1.2",
84
76
  "conventional-changelog-cli": "^2.0.34",
85
77
  "cross-env": "^7.0.2",
86
78
  "eslint": "^6.1.0",
87
79
  "eslint-config-prettier": "^6.0.0",
88
80
  "eslint-plugin-import": "^2.22.0",
89
81
  "eslint-plugin-prettier": "^3.1.0",
90
- "gatsby": "^2.24.63",
91
- "gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.27",
92
82
  "generate-changelog": "^1.8.0",
93
- "gh-pages": "^3.1.0",
94
83
  "husky": "^4.2.3",
95
84
  "jest": "^26.0.1",
96
85
  "jest-electron": "^0.1.7",
@@ -102,7 +91,6 @@
102
91
  "miz": "^1.0.1",
103
92
  "npm-run-all": "^4.1.5",
104
93
  "prettier": "^2.0.1",
105
- "rc-for-plots": "^0.0.1",
106
94
  "react": "^16.11.0",
107
95
  "react-dom": "^16.11.0",
108
96
  "react-i18next": "^11.7.0",
@@ -155,11 +143,10 @@
155
143
  "gzip": true
156
144
  }
157
145
  ],
158
- "license": "MIT",
159
146
  "resolutions": {
160
- "monaco-editor": "0.21.3",
161
- "@babel/plugin-transform-spread": "7.12.1",
162
- "@babel/standalone": "7.12.6",
163
- "d3-array": "2.12.1"
164
- }
165
- }
147
+ "d3-array": "2.12.1",
148
+ "@types/lodash": "4.14.182",
149
+ "@types/babel__traverse": "7.0.6"
150
+ },
151
+ "license": "MIT"
152
+ }
@@ -1,11 +1,10 @@
1
1
  import { filter } from '@antv/util';
2
2
  import { Params } from '../core/adaptor';
3
- import { getInteractionCfg } from '../interactions/brush';
4
- import { deepAssign } from '../utils';
5
- import { Options as BaseOptions, BrushCfg, Interaction, Writable } from '../types';
6
-
7
3
  /** 先引入brush 交互 */
8
4
  import '../interactions/brush';
5
+ import { getInteractionCfg } from '../interactions/brush';
6
+ import { BrushCfg, Interaction, Options as BaseOptions, Writable } from '../types';
7
+ import { deepAssign } from '../utils';
9
8
 
10
9
  type Options = Pick<BaseOptions, 'interactions'> & { brush?: BrushCfg };
11
10
 
@@ -1,12 +1,12 @@
1
1
  import { Geometry, Types } from '@antv/g2';
2
2
  import { each, isNil, isObject } from '@antv/util';
3
+ import { AXIS_META_CONFIG_KEYS } from '../constant';
3
4
  import { Params } from '../core/adaptor';
4
5
  import { Options } from '../types';
5
- import { Interaction } from '../types/interaction';
6
- import { Transformations } from '../types/coordinate';
7
6
  import { Axis } from '../types/axis';
8
- import { AXIS_META_CONFIG_KEYS } from '../constant';
9
- import { pick, deepAssign } from '../utils';
7
+ import { Transformations } from '../types/coordinate';
8
+ import { Interaction } from '../types/interaction';
9
+ import { addViewAnimation, deepAssign, pick } from '../utils';
10
10
 
11
11
  /**
12
12
  * 通用 legend 配置, 适用于带 colorField 或 seriesField 的图表
@@ -69,17 +69,8 @@ export function animation<O extends Pick<Options, 'animation'>>(params: Params<O
69
69
  const { chart, options } = params;
70
70
  const { animation } = options;
71
71
 
72
- // 同时设置整个 view 动画选项
73
- if (typeof animation === 'boolean') {
74
- chart.animate(animation);
75
- } else {
76
- chart.animate(true);
77
- }
78
-
79
72
  // 所有的 Geometry 都使用同一动画(各个图形如有区别,自行覆盖)
80
- each(chart.geometries, (g: Geometry) => {
81
- g.animate(animation);
82
- });
73
+ addViewAnimation(chart, animation);
83
74
 
84
75
  return params;
85
76
  }
@@ -1,4 +1,4 @@
1
- import { registerInteraction, ShapeAttrs, Element } from '@antv/g2';
1
+ import { Element, registerInteraction, ShapeAttrs } from '@antv/g2';
2
2
  import { Params } from '../core/adaptor';
3
3
 
4
4
  export interface ConnectedAreaOptions {
@@ -1,9 +1,9 @@
1
- import { map, find, each, isObject } from '@antv/util';
2
- import { Coordinate, IGroup, ShapeAttrs, Element, Geometry, View, getTheme } from '@antv/g2';
1
+ import { Coordinate, Element, Geometry, getTheme, IGroup, ShapeAttrs, View } from '@antv/g2';
2
+ import { each, find, isObject, map } from '@antv/util';
3
3
  import { Params } from '../core/adaptor';
4
+ import { Options } from '../types';
4
5
  import { deepAssign } from '../utils';
5
6
  import { conversionTagFormatter } from '../utils/conversion';
6
- import { Options } from '../types';
7
7
 
8
8
  /** 转化率组件配置选项 */
9
9
  export interface ConversionTagOptions {
@@ -1,7 +1,7 @@
1
1
  import { Params } from '../../core/adaptor';
2
- import { getTooltipMapping } from '../../utils/tooltip';
3
2
  import { deepAssign } from '../../utils';
4
- import { GeometryOptions, geometry, MappingOptions } from './base';
3
+ import { getTooltipMapping } from '../../utils/tooltip';
4
+ import { geometry, GeometryOptions, MappingOptions } from './base';
5
5
 
6
6
  export interface AreaGeometryOptions extends GeometryOptions {
7
7
  /** x 轴字段 */
@@ -1,6 +1,6 @@
1
- import { uniq, isFunction, isObject, isString, isNumber, isEmpty } from '@antv/util';
1
+ import { isEmpty, isFunction, isNumber, isObject, isString, uniq } from '@antv/util';
2
2
  import { Params } from '../../core/adaptor';
3
- import { ColorAttr, ShapeAttr, SizeAttr, StyleAttr, TooltipAttr, Options, Datum } from '../../types';
3
+ import { ColorAttr, Datum, Options, RawFields, ShapeAttr, SizeAttr, StyleAttr, TooltipAttr } from '../../types';
4
4
  import { Label } from '../../types/label';
5
5
  import { State } from '../../types/state';
6
6
  import { transformLabel } from '../../utils';
@@ -43,7 +43,7 @@ export type Geometry = {
43
43
  /** tooltip 的映射字段 */
44
44
  readonly tooltipFields?: string[] | false;
45
45
  /** 其他原始字段, 用于 mapping 回调参数 */
46
- readonly rawFields?: string[];
46
+ readonly rawFields?: RawFields;
47
47
  /** 图形映射规则 */
48
48
  readonly mapping?: MappingOptions;
49
49
  /** label 映射通道,因为历史原因导致实现略有区别 */
@@ -73,9 +73,11 @@ export function getMappingField(
73
73
  mappingFields: string[];
74
74
  tileMappingField: string;
75
75
  } {
76
- const { type, xField, yField, colorField, shapeField, sizeField, styleField, rawFields = [] } = o;
76
+ const { type, xField, yField, colorField, shapeField, sizeField, styleField } = o;
77
+ let { rawFields } = o;
77
78
 
78
79
  let fields = [];
80
+ rawFields = (isFunction(rawFields) ? rawFields(type, field) : rawFields) || [];
79
81
 
80
82
  // 因为 color 会影响到数据分组,以及最后的图形映射。所以导致 bar 图中的 widthRatio 设置不生效
81
83
  // 所以对于 color 字段,仅仅保留 colorField 好了! + rawFields
@@ -1,7 +1,7 @@
1
1
  import { Params } from '../../core/adaptor';
2
- import { getTooltipMapping } from '../../utils/tooltip';
3
2
  import { deepAssign } from '../../utils';
4
- import { geometry, MappingOptions, GeometryOptions } from './base';
3
+ import { getTooltipMapping } from '../../utils/tooltip';
4
+ import { geometry, GeometryOptions, MappingOptions } from './base';
5
5
 
6
6
  export interface EdgeGeometryOptions extends GeometryOptions {
7
7
  /** x 轴字段 */
@@ -1,16 +1,16 @@
1
- export type { GeometryOptions } from './base';
2
1
  export { area } from './area';
3
2
  export type { AreaGeometryOptions } from './area';
3
+ export type { GeometryOptions } from './base';
4
+ export { edge } from './edge';
5
+ export type { EdgeGeometryOptions } from './edge';
6
+ export { interval } from './interval';
7
+ export type { IntervalGeometryOptions } from './interval';
4
8
  export { line } from './line';
5
9
  export type { LineGeometryOptions } from './line';
6
10
  export { point } from './point';
7
11
  export type { PointGeometryOptions } from './point';
8
- export { interval } from './interval';
9
- export type { IntervalGeometryOptions } from './interval';
10
12
  export { polygon } from './polygon';
11
13
  export type { PolygonGeometryOptions } from './polygon';
12
- export { edge } from './edge';
13
- export type { EdgeGeometryOptions } from './edge';
14
14
  export { schema } from './schema';
15
15
  export type { SchemaGeometryOptions } from './schema';
16
16
  export { violin } from './violin';
@@ -3,7 +3,7 @@ import { isNil, isObject } from '@antv/util';
3
3
  import { Params } from '../../core/adaptor';
4
4
  import { deepAssign } from '../../utils';
5
5
  import { getTooltipMapping } from '../../utils/tooltip';
6
- import { GeometryOptions, MappingOptions, geometry } from './base';
6
+ import { geometry, GeometryOptions, MappingOptions } from './base';
7
7
 
8
8
  export interface IntervalGeometryOptions extends GeometryOptions {
9
9
  /** x 轴字段 */
@@ -1,8 +1,8 @@
1
1
  import { deepMix } from '@antv/util';
2
2
  import { Params } from '../../core/adaptor';
3
- import { getTooltipMapping } from '../../utils/tooltip';
4
3
  import { deepAssign } from '../../utils';
5
- import { GeometryOptions, geometry, MappingOptions } from './base';
4
+ import { getTooltipMapping } from '../../utils/tooltip';
5
+ import { geometry, GeometryOptions, MappingOptions } from './base';
6
6
 
7
7
  export interface LineGeometryOptions extends GeometryOptions {
8
8
  /** x 轴字段 */
@@ -1,7 +1,7 @@
1
1
  import { Params } from '../../core/adaptor';
2
- import { getTooltipMapping } from '../../utils/tooltip';
3
2
  import { deepAssign } from '../../utils';
4
- import { geometry, MappingOptions, GeometryOptions } from './base';
3
+ import { getTooltipMapping } from '../../utils/tooltip';
4
+ import { geometry, GeometryOptions, MappingOptions } from './base';
5
5
 
6
6
  export interface PointGeometryOptions extends GeometryOptions {
7
7
  /** x 轴字段 */
@@ -1,7 +1,7 @@
1
1
  import { Params } from '../../core/adaptor';
2
- import { getTooltipMapping } from '../../utils/tooltip';
3
2
  import { deepAssign } from '../../utils';
4
- import { geometry, MappingOptions, GeometryOptions } from './base';
3
+ import { getTooltipMapping } from '../../utils/tooltip';
4
+ import { geometry, GeometryOptions, MappingOptions } from './base';
5
5
 
6
6
  export interface PolygonGeometryOptions extends GeometryOptions {
7
7
  /** x 轴字段 */
@@ -1,7 +1,7 @@
1
1
  import { Params } from '../../core/adaptor';
2
- import { getTooltipMapping } from '../../utils/tooltip';
3
2
  import { deepAssign } from '../../utils';
4
- import { geometry, MappingOptions, GeometryOptions } from './base';
3
+ import { getTooltipMapping } from '../../utils/tooltip';
4
+ import { geometry, GeometryOptions, MappingOptions } from './base';
5
5
 
6
6
  export interface SchemaGeometryOptions extends GeometryOptions {
7
7
  /** x 轴字段 */
@@ -1,7 +1,7 @@
1
1
  import { Params } from '../../core/adaptor';
2
- import { getTooltipMapping } from '../../utils/tooltip';
3
2
  import { deepAssign } from '../../utils';
4
- import { geometry, MappingOptions, GeometryOptions } from './base';
3
+ import { getTooltipMapping } from '../../utils/tooltip';
4
+ import { geometry, GeometryOptions, MappingOptions } from './base';
5
5
 
6
6
  export interface ViolinGeometryOptions extends GeometryOptions {
7
7
  /** x 轴字段 */
@@ -1,9 +1,9 @@
1
1
  import { Util } from '@antv/g2';
2
2
  import { get } from '@antv/util';
3
- import { getCanvasPattern } from '../utils/pattern';
4
3
  import { Params } from '../core/adaptor';
5
4
  import { Datum, Options, StyleAttr } from '../types';
6
5
  import { deepAssign } from '../utils';
6
+ import { getCanvasPattern } from '../utils/pattern';
7
7
 
8
8
  /**
9
9
  * 使用 Pattern 通道的 options,要求有 colorField/seriesField/stackField 作为分类字段(进行颜色映射)
package/src/core/plot.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Chart, Event, Element, View } from '@antv/g2';
2
- import { each } from '@antv/util';
3
1
  import EE from '@antv/event-emitter';
2
+ import { Chart, Element, Event, View } from '@antv/g2';
3
+ import { each } from '@antv/util';
4
4
  import { bind } from 'size-sensor';
5
- import { Options, StateName, StateCondition, Size, StateObject, Annotation } from '../types';
6
- import { getContainerSize, getAllElementsRecursively, deepAssign, pick } from '../utils';
5
+ import { Annotation, Options, Size, StateCondition, StateName, StateObject } from '../types';
6
+ import { deepAssign, getAllElementsRecursively, getContainerSize, pick } from '../utils';
7
7
  import { Adaptor } from './adaptor';
8
8
 
9
9
  /** 单独 pick 出来的用于基类的类型定义 */