@antv/g2plot 2.4.22 → 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 (864) hide show
  1. package/CHANGELOG.md +414 -413
  2. package/dist/g2plot.min.js +17 -2
  3. package/dist/g2plot.min.js.map +1 -1
  4. package/esm/adaptor/brush.d.ts +1 -1
  5. package/esm/adaptor/brush.js +2 -2
  6. package/esm/adaptor/brush.js.map +1 -1
  7. package/esm/adaptor/common.d.ts +1 -1
  8. package/esm/adaptor/common.js +1 -1
  9. package/esm/adaptor/common.js.map +1 -1
  10. package/esm/adaptor/connected-area.d.ts +1 -1
  11. package/esm/adaptor/connected-area.js.map +1 -1
  12. package/esm/adaptor/conversion-tag.js +1 -1
  13. package/esm/adaptor/conversion-tag.js.map +1 -1
  14. package/esm/adaptor/geometries/area.js +1 -1
  15. package/esm/adaptor/geometries/area.js.map +1 -1
  16. package/esm/adaptor/geometries/base.d.ts +1 -1
  17. package/esm/adaptor/geometries/base.js +1 -1
  18. package/esm/adaptor/geometries/base.js.map +1 -1
  19. package/esm/adaptor/geometries/edge.d.ts +1 -1
  20. package/esm/adaptor/geometries/edge.js +1 -1
  21. package/esm/adaptor/geometries/edge.js.map +1 -1
  22. package/esm/adaptor/geometries/index.d.ts +5 -5
  23. package/esm/adaptor/geometries/index.js +2 -2
  24. package/esm/adaptor/geometries/index.js.map +1 -1
  25. package/esm/adaptor/geometries/interval.js.map +1 -1
  26. package/esm/adaptor/geometries/line.js +1 -1
  27. package/esm/adaptor/geometries/line.js.map +1 -1
  28. package/esm/adaptor/geometries/point.d.ts +1 -1
  29. package/esm/adaptor/geometries/point.js +1 -1
  30. package/esm/adaptor/geometries/point.js.map +1 -1
  31. package/esm/adaptor/geometries/polygon.d.ts +1 -1
  32. package/esm/adaptor/geometries/polygon.js +1 -1
  33. package/esm/adaptor/geometries/polygon.js.map +1 -1
  34. package/esm/adaptor/geometries/schema.d.ts +1 -1
  35. package/esm/adaptor/geometries/schema.js +1 -1
  36. package/esm/adaptor/geometries/schema.js.map +1 -1
  37. package/esm/adaptor/geometries/violin.d.ts +1 -1
  38. package/esm/adaptor/geometries/violin.js +1 -1
  39. package/esm/adaptor/geometries/violin.js.map +1 -1
  40. package/esm/adaptor/pattern.d.ts +1 -1
  41. package/esm/adaptor/pattern.js +1 -1
  42. package/esm/adaptor/pattern.js.map +1 -1
  43. package/esm/core/plot.d.ts +2 -2
  44. package/esm/core/plot.js +2 -2
  45. package/esm/core/plot.js.map +1 -1
  46. package/esm/index.d.ts +68 -71
  47. package/esm/index.js +69 -71
  48. package/esm/index.js.map +1 -1
  49. package/esm/interactions/actions/drill-down.js +1 -1
  50. package/esm/interactions/actions/drill-down.js.map +1 -1
  51. package/esm/interactions/drill-down.js +1 -1
  52. package/esm/interactions/drill-down.js.map +1 -1
  53. package/esm/plots/_template/adaptor.js +1 -1
  54. package/esm/plots/_template/adaptor.js.map +1 -1
  55. package/esm/plots/_template/index.d.ts +1 -1
  56. package/esm/plots/_template/index.js.map +1 -1
  57. package/esm/plots/area/adaptor.js +4 -5
  58. package/esm/plots/area/adaptor.js.map +1 -1
  59. package/esm/plots/area/index.d.ts +1 -1
  60. package/esm/plots/area/index.js.map +1 -1
  61. package/esm/plots/bar/adaptor.d.ts +1 -1
  62. package/esm/plots/bar/adaptor.js.map +1 -1
  63. package/esm/plots/bar/index.d.ts +1 -1
  64. package/esm/plots/bar/index.js.map +1 -1
  65. package/esm/plots/bidirectional-bar/adaptor.js +2 -2
  66. package/esm/plots/bidirectional-bar/adaptor.js.map +1 -1
  67. package/esm/plots/bidirectional-bar/index.d.ts +1 -1
  68. package/esm/plots/bidirectional-bar/index.js +3 -3
  69. package/esm/plots/bidirectional-bar/index.js.map +1 -1
  70. package/esm/plots/bidirectional-bar/types.d.ts +1 -1
  71. package/esm/plots/bidirectional-bar/types.js.map +1 -1
  72. package/esm/plots/bidirectional-bar/utils.js.map +1 -1
  73. package/esm/plots/box/adaptor.js +2 -2
  74. package/esm/plots/box/adaptor.js.map +1 -1
  75. package/esm/plots/box/index.d.ts +1 -1
  76. package/esm/plots/box/index.js +1 -1
  77. package/esm/plots/box/index.js.map +1 -1
  78. package/esm/plots/bullet/adaptor.js +2 -2
  79. package/esm/plots/bullet/adaptor.js.map +1 -1
  80. package/esm/plots/bullet/index.d.ts +1 -1
  81. package/esm/plots/bullet/index.js +1 -1
  82. package/esm/plots/bullet/index.js.map +1 -1
  83. package/esm/plots/bullet/types.d.ts +1 -1
  84. package/esm/plots/bullet/types.js.map +1 -1
  85. package/esm/plots/chord/adaptor.js +4 -5
  86. package/esm/plots/chord/adaptor.js.map +1 -1
  87. package/esm/plots/chord/index.d.ts +1 -1
  88. package/esm/plots/chord/index.js.map +1 -1
  89. package/esm/plots/circle-packing/adaptor.js +3 -3
  90. package/esm/plots/circle-packing/adaptor.js.map +1 -1
  91. package/esm/plots/circle-packing/index.d.ts +2 -2
  92. package/esm/plots/circle-packing/index.js.map +1 -1
  93. package/esm/plots/circle-packing/utils.js +2 -2
  94. package/esm/plots/circle-packing/utils.js.map +1 -1
  95. package/esm/plots/column/adaptor.js +4 -4
  96. package/esm/plots/column/adaptor.js.map +1 -1
  97. package/esm/plots/column/index.d.ts +1 -1
  98. package/esm/plots/column/index.js.map +1 -1
  99. package/esm/plots/column/types.d.ts +2 -2
  100. package/esm/plots/column/types.js.map +1 -1
  101. package/esm/plots/dual-axes/adaptor.js +7 -7
  102. package/esm/plots/dual-axes/adaptor.js.map +1 -1
  103. package/esm/plots/dual-axes/index.d.ts +1 -1
  104. package/esm/plots/dual-axes/index.js.map +1 -1
  105. package/esm/plots/dual-axes/types.d.ts +1 -1
  106. package/esm/plots/dual-axes/types.js.map +1 -1
  107. package/esm/plots/dual-axes/util/geometry.js +3 -3
  108. package/esm/plots/dual-axes/util/geometry.js.map +1 -1
  109. package/esm/plots/dual-axes/util/legend.d.ts +1 -1
  110. package/esm/plots/dual-axes/util/legend.js +1 -1
  111. package/esm/plots/dual-axes/util/legend.js.map +1 -1
  112. package/esm/plots/dual-axes/util/option.d.ts +1 -1
  113. package/esm/plots/dual-axes/util/option.js +1 -1
  114. package/esm/plots/dual-axes/util/option.js.map +1 -1
  115. package/esm/plots/facet/adaptor.js +1 -1
  116. package/esm/plots/facet/adaptor.js.map +1 -1
  117. package/esm/plots/facet/index.d.ts +1 -1
  118. package/esm/plots/facet/index.js.map +1 -1
  119. package/esm/plots/facet/types.d.ts +4 -4
  120. package/esm/plots/facet/types.js.map +1 -1
  121. package/esm/plots/facet/utils.js +1 -1
  122. package/esm/plots/facet/utils.js.map +1 -1
  123. package/esm/plots/funnel/adaptor.js +6 -6
  124. package/esm/plots/funnel/adaptor.js.map +1 -1
  125. package/esm/plots/funnel/geometries/basic.js +4 -4
  126. package/esm/plots/funnel/geometries/basic.js.map +1 -1
  127. package/esm/plots/funnel/geometries/common.d.ts +1 -1
  128. package/esm/plots/funnel/geometries/common.js +2 -2
  129. package/esm/plots/funnel/geometries/common.js.map +1 -1
  130. package/esm/plots/funnel/geometries/compare.js +4 -4
  131. package/esm/plots/funnel/geometries/compare.js.map +1 -1
  132. package/esm/plots/funnel/geometries/dynamic-height.js +3 -3
  133. package/esm/plots/funnel/geometries/dynamic-height.js.map +1 -1
  134. package/esm/plots/funnel/geometries/facet.js +1 -1
  135. package/esm/plots/funnel/geometries/facet.js.map +1 -1
  136. package/esm/plots/funnel/index.d.ts +3 -3
  137. package/esm/plots/funnel/index.js.map +1 -1
  138. package/esm/plots/funnel/interactions/funnel-conversion-tag.js +2 -2
  139. package/esm/plots/funnel/interactions/funnel-conversion-tag.js.map +1 -1
  140. package/esm/plots/funnel/types.d.ts +1 -1
  141. package/esm/plots/funnel/types.js.map +1 -1
  142. package/esm/plots/gauge/adaptor.js +2 -2
  143. package/esm/plots/gauge/adaptor.js.map +1 -1
  144. package/esm/plots/gauge/index.d.ts +2 -2
  145. package/esm/plots/gauge/index.js +3 -3
  146. package/esm/plots/gauge/index.js.map +1 -1
  147. package/esm/plots/gauge/utils.js +1 -1
  148. package/esm/plots/gauge/utils.js.map +1 -1
  149. package/esm/plots/heatmap/adaptor.js +2 -3
  150. package/esm/plots/heatmap/adaptor.js.map +1 -1
  151. package/esm/plots/heatmap/index.d.ts +2 -2
  152. package/esm/plots/heatmap/index.js.map +1 -1
  153. package/esm/plots/heatmap/shapes/circle.js.map +1 -1
  154. package/esm/plots/heatmap/shapes/square.js.map +1 -1
  155. package/esm/plots/histogram/adaptor.js +3 -4
  156. package/esm/plots/histogram/adaptor.js.map +1 -1
  157. package/esm/plots/histogram/index.d.ts +1 -1
  158. package/esm/plots/histogram/index.js.map +1 -1
  159. package/esm/plots/line/adaptor.js +3 -4
  160. package/esm/plots/line/adaptor.js.map +1 -1
  161. package/esm/plots/line/index.d.ts +2 -2
  162. package/esm/plots/line/index.js.map +1 -1
  163. package/esm/plots/line/interactions/marker-active.js +1 -1
  164. package/esm/plots/line/interactions/marker-active.js.map +1 -1
  165. package/esm/plots/line/types.d.ts +1 -1
  166. package/esm/plots/line/types.js.map +1 -1
  167. package/esm/plots/liquid/adaptor.js +4 -3
  168. package/esm/plots/liquid/adaptor.js.map +1 -1
  169. package/esm/plots/liquid/index.d.ts +2 -2
  170. package/esm/plots/liquid/index.js +2 -2
  171. package/esm/plots/liquid/index.js.map +1 -1
  172. package/esm/plots/liquid/shapes/liquid.js +13 -6
  173. package/esm/plots/liquid/shapes/liquid.js.map +1 -1
  174. package/esm/plots/liquid/types.d.ts +6 -1
  175. package/esm/plots/liquid/types.js.map +1 -1
  176. package/esm/plots/mix/adaptor.js +2 -2
  177. package/esm/plots/mix/adaptor.js.map +1 -1
  178. package/esm/plots/mix/index.d.ts +2 -2
  179. package/esm/plots/mix/index.js.map +1 -1
  180. package/esm/plots/mix/interactions/association.js +3 -3
  181. package/esm/plots/mix/interactions/association.js.map +1 -1
  182. package/esm/plots/mix/interactions/utils.d.ts +1 -1
  183. package/esm/plots/mix/interactions/utils.js.map +1 -1
  184. package/esm/plots/mix/types.d.ts +3 -3
  185. package/esm/plots/mix/types.js.map +1 -1
  186. package/esm/plots/mix/utils.d.ts +10 -10
  187. package/esm/plots/mix/utils.js +22 -22
  188. package/esm/plots/mix/utils.js.map +1 -1
  189. package/esm/plots/pie/adaptor.js +5 -5
  190. package/esm/plots/pie/adaptor.js.map +1 -1
  191. package/esm/plots/pie/index.d.ts +2 -2
  192. package/esm/plots/pie/index.js +2 -2
  193. package/esm/plots/pie/index.js.map +1 -1
  194. package/esm/plots/pie/interactions/actions/legend-active.js +1 -1
  195. package/esm/plots/pie/interactions/actions/legend-active.js.map +1 -1
  196. package/esm/plots/pie/interactions/actions/statistic-active.js.map +1 -1
  197. package/esm/plots/pie/types.d.ts +1 -1
  198. package/esm/plots/pie/types.js.map +1 -1
  199. package/esm/plots/progress/adaptor.js +2 -2
  200. package/esm/plots/progress/adaptor.js.map +1 -1
  201. package/esm/plots/progress/index.d.ts +1 -1
  202. package/esm/plots/progress/index.js.map +1 -1
  203. package/esm/plots/progress/types.d.ts +1 -1
  204. package/esm/plots/progress/types.js.map +1 -1
  205. package/esm/plots/radar/adaptor.js +3 -3
  206. package/esm/plots/radar/adaptor.js.map +1 -1
  207. package/esm/plots/radar/index.d.ts +2 -2
  208. package/esm/plots/radar/index.js.map +1 -1
  209. package/esm/plots/radar/interactions/radar-tooltip-action.d.ts +1 -1
  210. package/esm/plots/radar/interactions/radar-tooltip-action.js +1 -1
  211. package/esm/plots/radar/interactions/radar-tooltip-action.js.map +1 -1
  212. package/esm/plots/radar/types.d.ts +1 -1
  213. package/esm/plots/radar/types.js.map +1 -1
  214. package/esm/plots/radial-bar/adaptor.js +2 -3
  215. package/esm/plots/radial-bar/adaptor.js.map +1 -1
  216. package/esm/plots/radial-bar/index.d.ts +1 -1
  217. package/esm/plots/radial-bar/index.js.map +1 -1
  218. package/esm/plots/ring-progress/adaptor.js +1 -1
  219. package/esm/plots/ring-progress/adaptor.js.map +1 -1
  220. package/esm/plots/ring-progress/index.d.ts +1 -1
  221. package/esm/plots/ring-progress/index.js +1 -1
  222. package/esm/plots/ring-progress/index.js.map +1 -1
  223. package/esm/plots/ring-progress/types.d.ts +1 -1
  224. package/esm/plots/ring-progress/types.js.map +1 -1
  225. package/esm/plots/rose/adaptor.js +3 -3
  226. package/esm/plots/rose/adaptor.js.map +1 -1
  227. package/esm/plots/rose/index.d.ts +1 -1
  228. package/esm/plots/rose/index.js.map +1 -1
  229. package/esm/plots/sankey/adaptor.js +2 -2
  230. package/esm/plots/sankey/adaptor.js.map +1 -1
  231. package/esm/plots/sankey/helper.js +1 -1
  232. package/esm/plots/sankey/helper.js.map +1 -1
  233. package/esm/plots/sankey/index.d.ts +2 -2
  234. package/esm/plots/sankey/index.js +1 -1
  235. package/esm/plots/sankey/index.js.map +1 -1
  236. package/esm/plots/sankey/interactions/node-draggable.js +1 -1
  237. package/esm/plots/sankey/interactions/node-draggable.js.map +1 -1
  238. package/esm/plots/sankey/layout.d.ts +1 -1
  239. package/esm/plots/sankey/layout.js +2 -2
  240. package/esm/plots/sankey/layout.js.map +1 -1
  241. package/esm/plots/sankey/sankey/index.d.ts +1 -1
  242. package/esm/plots/sankey/sankey/index.js +1 -1
  243. package/esm/plots/sankey/sankey/index.js.map +1 -1
  244. package/esm/plots/sankey/sankey/sankey.js +1 -1
  245. package/esm/plots/sankey/sankey/sankey.js.map +1 -1
  246. package/esm/plots/scatter/adaptor.js +4 -5
  247. package/esm/plots/scatter/adaptor.js.map +1 -1
  248. package/esm/plots/scatter/index.d.ts +2 -2
  249. package/esm/plots/scatter/index.js +1 -1
  250. package/esm/plots/scatter/index.js.map +1 -1
  251. package/esm/plots/scatter/types.d.ts +1 -1
  252. package/esm/plots/scatter/types.js.map +1 -1
  253. package/esm/plots/scatter/util.js +2 -2
  254. package/esm/plots/scatter/util.js.map +1 -1
  255. package/esm/plots/stock/adaptor.js +3 -3
  256. package/esm/plots/stock/adaptor.js.map +1 -1
  257. package/esm/plots/stock/index.d.ts +1 -1
  258. package/esm/plots/stock/index.js +1 -1
  259. package/esm/plots/stock/index.js.map +1 -1
  260. package/esm/plots/stock/utils.js +1 -1
  261. package/esm/plots/stock/utils.js.map +1 -1
  262. package/esm/plots/sunburst/adaptor.js +3 -3
  263. package/esm/plots/sunburst/adaptor.js.map +1 -1
  264. package/esm/plots/sunburst/index.d.ts +2 -2
  265. package/esm/plots/sunburst/index.js.map +1 -1
  266. package/esm/plots/tiny-area/adaptor.js +3 -3
  267. package/esm/plots/tiny-area/adaptor.js.map +1 -1
  268. package/esm/plots/tiny-area/index.d.ts +1 -1
  269. package/esm/plots/tiny-area/index.js.map +1 -1
  270. package/esm/plots/tiny-area/types.d.ts +1 -1
  271. package/esm/plots/tiny-area/types.js.map +1 -1
  272. package/esm/plots/tiny-column/adaptor.js +3 -3
  273. package/esm/plots/tiny-column/adaptor.js.map +1 -1
  274. package/esm/plots/tiny-line/adaptor.js +3 -3
  275. package/esm/plots/tiny-line/adaptor.js.map +1 -1
  276. package/esm/plots/tiny-line/index.d.ts +1 -1
  277. package/esm/plots/tiny-line/index.js.map +1 -1
  278. package/esm/plots/tiny-line/types.d.ts +1 -1
  279. package/esm/plots/tiny-line/types.js.map +1 -1
  280. package/esm/plots/treemap/adaptor.js +3 -3
  281. package/esm/plots/treemap/adaptor.js.map +1 -1
  282. package/esm/plots/treemap/index.d.ts +2 -2
  283. package/esm/plots/treemap/index.js +1 -1
  284. package/esm/plots/treemap/index.js.map +1 -1
  285. package/esm/plots/treemap/utils.js +1 -1
  286. package/esm/plots/treemap/utils.js.map +1 -1
  287. package/esm/plots/venn/adaptor.d.ts +3 -3
  288. package/esm/plots/venn/adaptor.js +6 -7
  289. package/esm/plots/venn/adaptor.js.map +1 -1
  290. package/esm/plots/venn/index.d.ts +1 -1
  291. package/esm/plots/venn/index.js.map +1 -1
  292. package/esm/plots/venn/interactions/index.js +1 -1
  293. package/esm/plots/venn/interactions/index.js.map +1 -1
  294. package/esm/plots/venn/label.js +1 -1
  295. package/esm/plots/venn/label.js.map +1 -1
  296. package/esm/plots/venn/layout/diagram.js +1 -1
  297. package/esm/plots/venn/layout/diagram.js.map +1 -1
  298. package/esm/plots/venn/layout/layout.js +2 -2
  299. package/esm/plots/venn/layout/layout.js.map +1 -1
  300. package/esm/plots/venn/shape.js.map +1 -1
  301. package/esm/plots/venn/utils.js +3 -3
  302. package/esm/plots/venn/utils.js.map +1 -1
  303. package/esm/plots/violin/adaptor.js +5 -5
  304. package/esm/plots/violin/adaptor.js.map +1 -1
  305. package/esm/plots/violin/index.d.ts +1 -1
  306. package/esm/plots/violin/index.js.map +1 -1
  307. package/esm/plots/violin/utils.js +1 -1
  308. package/esm/plots/violin/utils.js.map +1 -1
  309. package/esm/plots/waterfall/adaptor.d.ts +1 -1
  310. package/esm/plots/waterfall/adaptor.js +4 -4
  311. package/esm/plots/waterfall/adaptor.js.map +1 -1
  312. package/esm/plots/waterfall/index.d.ts +1 -1
  313. package/esm/plots/waterfall/index.js.map +1 -1
  314. package/esm/plots/waterfall/shape.js.map +1 -1
  315. package/esm/plots/waterfall/utils.js +1 -1
  316. package/esm/plots/waterfall/utils.js.map +1 -1
  317. package/esm/plots/word-cloud/adaptor.js +4 -4
  318. package/esm/plots/word-cloud/adaptor.js.map +1 -1
  319. package/esm/plots/word-cloud/index.d.ts +2 -2
  320. package/esm/plots/word-cloud/index.js +1 -1
  321. package/esm/plots/word-cloud/index.js.map +1 -1
  322. package/esm/plots/word-cloud/shapes/word-cloud.js.map +1 -1
  323. package/esm/plots/word-cloud/utils.js +1 -1
  324. package/esm/plots/word-cloud/utils.js.map +1 -1
  325. package/esm/plugin/index.d.ts +1 -1
  326. package/esm/plugin/index.js +1 -1
  327. package/esm/plugin/index.js.map +1 -1
  328. package/esm/types/common.d.ts +8 -8
  329. package/esm/types/common.js.map +1 -1
  330. package/esm/types/index.d.ts +7 -7
  331. package/esm/types/index.js +7 -7
  332. package/esm/types/index.js.map +1 -1
  333. package/esm/types/state.d.ts +2 -2
  334. package/esm/types/state.js.map +1 -1
  335. package/esm/utils/data.js +1 -1
  336. package/esm/utils/data.js.map +1 -1
  337. package/esm/utils/geometry.d.ts +1 -1
  338. package/esm/utils/geometry.js +1 -1
  339. package/esm/utils/geometry.js.map +1 -1
  340. package/esm/utils/hierarchy/pack.js +2 -2
  341. package/esm/utils/hierarchy/pack.js.map +1 -1
  342. package/esm/utils/hierarchy/partition.js +2 -2
  343. package/esm/utils/hierarchy/partition.js.map +1 -1
  344. package/esm/utils/hierarchy/treemap.js +2 -2
  345. package/esm/utils/hierarchy/treemap.js.map +1 -1
  346. package/esm/utils/hierarchy/util.js +1 -1
  347. package/esm/utils/hierarchy/util.js.map +1 -1
  348. package/esm/utils/index.d.ts +10 -11
  349. package/esm/utils/index.js +10 -11
  350. package/esm/utils/index.js.map +1 -1
  351. package/esm/utils/padding.js +1 -1
  352. package/esm/utils/padding.js.map +1 -1
  353. package/esm/utils/path.d.ts +1 -1
  354. package/esm/utils/path.js.map +1 -1
  355. package/esm/utils/pattern/dot.js +1 -1
  356. package/esm/utils/pattern/dot.js.map +1 -1
  357. package/esm/utils/pattern/line.js +1 -1
  358. package/esm/utils/pattern/line.js.map +1 -1
  359. package/esm/utils/pattern/square.js +1 -1
  360. package/esm/utils/pattern/square.js.map +1 -1
  361. package/esm/utils/statistic.js +3 -2
  362. package/esm/utils/statistic.js.map +1 -1
  363. package/esm/utils/transform/histogram.js +1 -1
  364. package/esm/utils/transform/histogram.js.map +1 -1
  365. package/esm/utils/transform/word-cloud.js +1 -1
  366. package/esm/utils/transform/word-cloud.js.map +1 -1
  367. package/esm/utils/view.d.ts +1 -1
  368. package/esm/utils/view.js.map +1 -1
  369. package/lib/adaptor/brush.d.ts +1 -1
  370. package/lib/adaptor/brush.js +2 -2
  371. package/lib/adaptor/brush.js.map +1 -1
  372. package/lib/adaptor/common.d.ts +1 -1
  373. package/lib/adaptor/common.js.map +1 -1
  374. package/lib/adaptor/connected-area.d.ts +1 -1
  375. package/lib/adaptor/connected-area.js.map +1 -1
  376. package/lib/adaptor/conversion-tag.js +1 -1
  377. package/lib/adaptor/conversion-tag.js.map +1 -1
  378. package/lib/adaptor/geometries/area.js +1 -1
  379. package/lib/adaptor/geometries/area.js.map +1 -1
  380. package/lib/adaptor/geometries/base.d.ts +1 -1
  381. package/lib/adaptor/geometries/base.js.map +1 -1
  382. package/lib/adaptor/geometries/edge.d.ts +1 -1
  383. package/lib/adaptor/geometries/edge.js +1 -1
  384. package/lib/adaptor/geometries/edge.js.map +1 -1
  385. package/lib/adaptor/geometries/index.d.ts +5 -5
  386. package/lib/adaptor/geometries/index.js +4 -4
  387. package/lib/adaptor/geometries/index.js.map +1 -1
  388. package/lib/adaptor/geometries/interval.js.map +1 -1
  389. package/lib/adaptor/geometries/line.js +1 -1
  390. package/lib/adaptor/geometries/line.js.map +1 -1
  391. package/lib/adaptor/geometries/point.d.ts +1 -1
  392. package/lib/adaptor/geometries/point.js +1 -1
  393. package/lib/adaptor/geometries/point.js.map +1 -1
  394. package/lib/adaptor/geometries/polygon.d.ts +1 -1
  395. package/lib/adaptor/geometries/polygon.js +1 -1
  396. package/lib/adaptor/geometries/polygon.js.map +1 -1
  397. package/lib/adaptor/geometries/schema.d.ts +1 -1
  398. package/lib/adaptor/geometries/schema.js +1 -1
  399. package/lib/adaptor/geometries/schema.js.map +1 -1
  400. package/lib/adaptor/geometries/violin.d.ts +1 -1
  401. package/lib/adaptor/geometries/violin.js +1 -1
  402. package/lib/adaptor/geometries/violin.js.map +1 -1
  403. package/lib/adaptor/pattern.d.ts +1 -1
  404. package/lib/adaptor/pattern.js +1 -1
  405. package/lib/adaptor/pattern.js.map +1 -1
  406. package/lib/core/plot.d.ts +2 -2
  407. package/lib/core/plot.js +1 -1
  408. package/lib/core/plot.js.map +1 -1
  409. package/lib/index.d.ts +68 -71
  410. package/lib/index.js +103 -105
  411. package/lib/index.js.map +1 -1
  412. package/lib/interactions/actions/drill-down.js.map +1 -1
  413. package/lib/interactions/drill-down.js.map +1 -1
  414. package/lib/plots/_template/adaptor.js.map +1 -1
  415. package/lib/plots/_template/index.d.ts +1 -1
  416. package/lib/plots/_template/index.js.map +1 -1
  417. package/lib/plots/area/adaptor.js +6 -7
  418. package/lib/plots/area/adaptor.js.map +1 -1
  419. package/lib/plots/area/index.d.ts +1 -1
  420. package/lib/plots/area/index.js.map +1 -1
  421. package/lib/plots/bar/adaptor.d.ts +1 -1
  422. package/lib/plots/bar/adaptor.js.map +1 -1
  423. package/lib/plots/bar/index.d.ts +1 -1
  424. package/lib/plots/bar/index.js.map +1 -1
  425. package/lib/plots/bidirectional-bar/adaptor.js.map +1 -1
  426. package/lib/plots/bidirectional-bar/index.d.ts +1 -1
  427. package/lib/plots/bidirectional-bar/index.js +1 -1
  428. package/lib/plots/bidirectional-bar/index.js.map +1 -1
  429. package/lib/plots/bidirectional-bar/types.d.ts +1 -1
  430. package/lib/plots/bidirectional-bar/types.js.map +1 -1
  431. package/lib/plots/bidirectional-bar/utils.js.map +1 -1
  432. package/lib/plots/box/adaptor.js +1 -1
  433. package/lib/plots/box/adaptor.js.map +1 -1
  434. package/lib/plots/box/index.d.ts +1 -1
  435. package/lib/plots/box/index.js +1 -1
  436. package/lib/plots/box/index.js.map +1 -1
  437. package/lib/plots/bullet/adaptor.js +1 -1
  438. package/lib/plots/bullet/adaptor.js.map +1 -1
  439. package/lib/plots/bullet/index.d.ts +1 -1
  440. package/lib/plots/bullet/index.js +1 -1
  441. package/lib/plots/bullet/index.js.map +1 -1
  442. package/lib/plots/bullet/types.d.ts +1 -1
  443. package/lib/plots/bullet/types.js.map +1 -1
  444. package/lib/plots/chord/adaptor.js +3 -4
  445. package/lib/plots/chord/adaptor.js.map +1 -1
  446. package/lib/plots/chord/index.d.ts +1 -1
  447. package/lib/plots/chord/index.js.map +1 -1
  448. package/lib/plots/circle-packing/adaptor.js +2 -2
  449. package/lib/plots/circle-packing/adaptor.js.map +1 -1
  450. package/lib/plots/circle-packing/index.d.ts +2 -2
  451. package/lib/plots/circle-packing/index.js.map +1 -1
  452. package/lib/plots/circle-packing/utils.js +2 -2
  453. package/lib/plots/circle-packing/utils.js.map +1 -1
  454. package/lib/plots/column/adaptor.js +2 -2
  455. package/lib/plots/column/adaptor.js.map +1 -1
  456. package/lib/plots/column/index.d.ts +1 -1
  457. package/lib/plots/column/index.js.map +1 -1
  458. package/lib/plots/column/types.d.ts +2 -2
  459. package/lib/plots/column/types.js.map +1 -1
  460. package/lib/plots/dual-axes/adaptor.js +5 -5
  461. package/lib/plots/dual-axes/adaptor.js.map +1 -1
  462. package/lib/plots/dual-axes/index.d.ts +1 -1
  463. package/lib/plots/dual-axes/index.js.map +1 -1
  464. package/lib/plots/dual-axes/types.d.ts +1 -1
  465. package/lib/plots/dual-axes/types.js.map +1 -1
  466. package/lib/plots/dual-axes/util/geometry.js.map +1 -1
  467. package/lib/plots/dual-axes/util/legend.d.ts +1 -1
  468. package/lib/plots/dual-axes/util/legend.js +1 -1
  469. package/lib/plots/dual-axes/util/legend.js.map +1 -1
  470. package/lib/plots/dual-axes/util/option.d.ts +1 -1
  471. package/lib/plots/dual-axes/util/option.js +1 -1
  472. package/lib/plots/dual-axes/util/option.js.map +1 -1
  473. package/lib/plots/facet/adaptor.js.map +1 -1
  474. package/lib/plots/facet/index.d.ts +1 -1
  475. package/lib/plots/facet/index.js.map +1 -1
  476. package/lib/plots/facet/types.d.ts +4 -4
  477. package/lib/plots/facet/types.js.map +1 -1
  478. package/lib/plots/facet/utils.js.map +1 -1
  479. package/lib/plots/funnel/adaptor.js +2 -2
  480. package/lib/plots/funnel/adaptor.js.map +1 -1
  481. package/lib/plots/funnel/geometries/basic.js +1 -1
  482. package/lib/plots/funnel/geometries/basic.js.map +1 -1
  483. package/lib/plots/funnel/geometries/common.d.ts +1 -1
  484. package/lib/plots/funnel/geometries/common.js.map +1 -1
  485. package/lib/plots/funnel/geometries/compare.js +1 -1
  486. package/lib/plots/funnel/geometries/compare.js.map +1 -1
  487. package/lib/plots/funnel/geometries/dynamic-height.js +2 -2
  488. package/lib/plots/funnel/geometries/dynamic-height.js.map +1 -1
  489. package/lib/plots/funnel/geometries/facet.js.map +1 -1
  490. package/lib/plots/funnel/index.d.ts +3 -3
  491. package/lib/plots/funnel/index.js.map +1 -1
  492. package/lib/plots/funnel/interactions/funnel-conversion-tag.js +2 -2
  493. package/lib/plots/funnel/interactions/funnel-conversion-tag.js.map +1 -1
  494. package/lib/plots/funnel/types.d.ts +1 -1
  495. package/lib/plots/funnel/types.js.map +1 -1
  496. package/lib/plots/gauge/adaptor.js.map +1 -1
  497. package/lib/plots/gauge/index.d.ts +2 -2
  498. package/lib/plots/gauge/index.js +1 -1
  499. package/lib/plots/gauge/index.js.map +1 -1
  500. package/lib/plots/gauge/utils.js.map +1 -1
  501. package/lib/plots/heatmap/adaptor.js +4 -5
  502. package/lib/plots/heatmap/adaptor.js.map +1 -1
  503. package/lib/plots/heatmap/index.d.ts +2 -2
  504. package/lib/plots/heatmap/index.js.map +1 -1
  505. package/lib/plots/heatmap/shapes/circle.js.map +1 -1
  506. package/lib/plots/heatmap/shapes/square.js.map +1 -1
  507. package/lib/plots/histogram/adaptor.js +4 -5
  508. package/lib/plots/histogram/adaptor.js.map +1 -1
  509. package/lib/plots/histogram/index.d.ts +1 -1
  510. package/lib/plots/histogram/index.js.map +1 -1
  511. package/lib/plots/line/adaptor.js +3 -4
  512. package/lib/plots/line/adaptor.js.map +1 -1
  513. package/lib/plots/line/index.d.ts +2 -2
  514. package/lib/plots/line/index.js.map +1 -1
  515. package/lib/plots/line/interactions/marker-active.js +1 -1
  516. package/lib/plots/line/interactions/marker-active.js.map +1 -1
  517. package/lib/plots/line/types.d.ts +1 -1
  518. package/lib/plots/line/types.js.map +1 -1
  519. package/lib/plots/liquid/adaptor.js +3 -2
  520. package/lib/plots/liquid/adaptor.js.map +1 -1
  521. package/lib/plots/liquid/index.d.ts +2 -2
  522. package/lib/plots/liquid/index.js +1 -1
  523. package/lib/plots/liquid/index.js.map +1 -1
  524. package/lib/plots/liquid/shapes/liquid.js +12 -5
  525. package/lib/plots/liquid/shapes/liquid.js.map +1 -1
  526. package/lib/plots/liquid/types.d.ts +6 -1
  527. package/lib/plots/liquid/types.js.map +1 -1
  528. package/lib/plots/mix/adaptor.js +2 -2
  529. package/lib/plots/mix/adaptor.js.map +1 -1
  530. package/lib/plots/mix/index.d.ts +2 -2
  531. package/lib/plots/mix/index.js.map +1 -1
  532. package/lib/plots/mix/interactions/association.js +1 -1
  533. package/lib/plots/mix/interactions/association.js.map +1 -1
  534. package/lib/plots/mix/interactions/utils.d.ts +1 -1
  535. package/lib/plots/mix/interactions/utils.js.map +1 -1
  536. package/lib/plots/mix/types.d.ts +3 -3
  537. package/lib/plots/mix/types.js.map +1 -1
  538. package/lib/plots/mix/utils.d.ts +10 -10
  539. package/lib/plots/mix/utils.js +37 -37
  540. package/lib/plots/mix/utils.js.map +1 -1
  541. package/lib/plots/pie/adaptor.js +2 -2
  542. package/lib/plots/pie/adaptor.js.map +1 -1
  543. package/lib/plots/pie/index.d.ts +2 -2
  544. package/lib/plots/pie/index.js +1 -1
  545. package/lib/plots/pie/index.js.map +1 -1
  546. package/lib/plots/pie/interactions/actions/legend-active.js.map +1 -1
  547. package/lib/plots/pie/interactions/actions/statistic-active.js.map +1 -1
  548. package/lib/plots/pie/types.d.ts +1 -1
  549. package/lib/plots/pie/types.js.map +1 -1
  550. package/lib/plots/progress/adaptor.js +1 -1
  551. package/lib/plots/progress/adaptor.js.map +1 -1
  552. package/lib/plots/progress/index.d.ts +1 -1
  553. package/lib/plots/progress/index.js.map +1 -1
  554. package/lib/plots/progress/types.d.ts +1 -1
  555. package/lib/plots/progress/types.js.map +1 -1
  556. package/lib/plots/radar/adaptor.js.map +1 -1
  557. package/lib/plots/radar/index.d.ts +2 -2
  558. package/lib/plots/radar/index.js.map +1 -1
  559. package/lib/plots/radar/interactions/radar-tooltip-action.d.ts +1 -1
  560. package/lib/plots/radar/interactions/radar-tooltip-action.js.map +1 -1
  561. package/lib/plots/radar/types.d.ts +1 -1
  562. package/lib/plots/radar/types.js.map +1 -1
  563. package/lib/plots/radial-bar/adaptor.js +6 -7
  564. package/lib/plots/radial-bar/adaptor.js.map +1 -1
  565. package/lib/plots/radial-bar/index.d.ts +1 -1
  566. package/lib/plots/radial-bar/index.js.map +1 -1
  567. package/lib/plots/ring-progress/adaptor.js +1 -1
  568. package/lib/plots/ring-progress/adaptor.js.map +1 -1
  569. package/lib/plots/ring-progress/index.d.ts +1 -1
  570. package/lib/plots/ring-progress/index.js.map +1 -1
  571. package/lib/plots/ring-progress/types.d.ts +1 -1
  572. package/lib/plots/ring-progress/types.js.map +1 -1
  573. package/lib/plots/rose/adaptor.js +1 -1
  574. package/lib/plots/rose/adaptor.js.map +1 -1
  575. package/lib/plots/rose/index.d.ts +1 -1
  576. package/lib/plots/rose/index.js.map +1 -1
  577. package/lib/plots/sankey/adaptor.js +2 -2
  578. package/lib/plots/sankey/adaptor.js.map +1 -1
  579. package/lib/plots/sankey/helper.js +1 -1
  580. package/lib/plots/sankey/helper.js.map +1 -1
  581. package/lib/plots/sankey/index.d.ts +2 -2
  582. package/lib/plots/sankey/index.js +1 -1
  583. package/lib/plots/sankey/index.js.map +1 -1
  584. package/lib/plots/sankey/interactions/node-draggable.js.map +1 -1
  585. package/lib/plots/sankey/layout.d.ts +1 -1
  586. package/lib/plots/sankey/layout.js.map +1 -1
  587. package/lib/plots/sankey/sankey/index.d.ts +1 -1
  588. package/lib/plots/sankey/sankey/index.js +1 -1
  589. package/lib/plots/sankey/sankey/index.js.map +1 -1
  590. package/lib/plots/sankey/sankey/sankey.js.map +1 -1
  591. package/lib/plots/scatter/adaptor.js +5 -6
  592. package/lib/plots/scatter/adaptor.js.map +1 -1
  593. package/lib/plots/scatter/index.d.ts +2 -2
  594. package/lib/plots/scatter/index.js.map +1 -1
  595. package/lib/plots/scatter/types.d.ts +1 -1
  596. package/lib/plots/scatter/types.js.map +1 -1
  597. package/lib/plots/scatter/util.js +1 -1
  598. package/lib/plots/scatter/util.js.map +1 -1
  599. package/lib/plots/stock/adaptor.js +1 -1
  600. package/lib/plots/stock/adaptor.js.map +1 -1
  601. package/lib/plots/stock/index.d.ts +1 -1
  602. package/lib/plots/stock/index.js +1 -1
  603. package/lib/plots/stock/index.js.map +1 -1
  604. package/lib/plots/stock/utils.js.map +1 -1
  605. package/lib/plots/sunburst/adaptor.js +1 -1
  606. package/lib/plots/sunburst/adaptor.js.map +1 -1
  607. package/lib/plots/sunburst/index.d.ts +2 -2
  608. package/lib/plots/sunburst/index.js.map +1 -1
  609. package/lib/plots/tiny-area/adaptor.js +2 -2
  610. package/lib/plots/tiny-area/adaptor.js.map +1 -1
  611. package/lib/plots/tiny-area/index.d.ts +1 -1
  612. package/lib/plots/tiny-area/index.js.map +1 -1
  613. package/lib/plots/tiny-area/types.d.ts +1 -1
  614. package/lib/plots/tiny-area/types.js.map +1 -1
  615. package/lib/plots/tiny-column/adaptor.js +3 -3
  616. package/lib/plots/tiny-column/adaptor.js.map +1 -1
  617. package/lib/plots/tiny-line/adaptor.js +2 -2
  618. package/lib/plots/tiny-line/adaptor.js.map +1 -1
  619. package/lib/plots/tiny-line/index.d.ts +1 -1
  620. package/lib/plots/tiny-line/index.js.map +1 -1
  621. package/lib/plots/tiny-line/types.d.ts +1 -1
  622. package/lib/plots/tiny-line/types.js.map +1 -1
  623. package/lib/plots/treemap/adaptor.js +1 -1
  624. package/lib/plots/treemap/adaptor.js.map +1 -1
  625. package/lib/plots/treemap/index.d.ts +2 -2
  626. package/lib/plots/treemap/index.js +1 -1
  627. package/lib/plots/treemap/index.js.map +1 -1
  628. package/lib/plots/treemap/utils.js.map +1 -1
  629. package/lib/plots/venn/adaptor.d.ts +3 -3
  630. package/lib/plots/venn/adaptor.js +8 -9
  631. package/lib/plots/venn/adaptor.js.map +1 -1
  632. package/lib/plots/venn/index.d.ts +1 -1
  633. package/lib/plots/venn/index.js.map +1 -1
  634. package/lib/plots/venn/interactions/index.js.map +1 -1
  635. package/lib/plots/venn/label.js.map +1 -1
  636. package/lib/plots/venn/layout/diagram.js.map +1 -1
  637. package/lib/plots/venn/layout/layout.js.map +1 -1
  638. package/lib/plots/venn/shape.js.map +1 -1
  639. package/lib/plots/venn/utils.js +3 -3
  640. package/lib/plots/venn/utils.js.map +1 -1
  641. package/lib/plots/violin/adaptor.js +2 -2
  642. package/lib/plots/violin/adaptor.js.map +1 -1
  643. package/lib/plots/violin/index.d.ts +1 -1
  644. package/lib/plots/violin/index.js.map +1 -1
  645. package/lib/plots/violin/utils.js.map +1 -1
  646. package/lib/plots/waterfall/adaptor.d.ts +1 -1
  647. package/lib/plots/waterfall/adaptor.js +1 -1
  648. package/lib/plots/waterfall/adaptor.js.map +1 -1
  649. package/lib/plots/waterfall/index.d.ts +1 -1
  650. package/lib/plots/waterfall/index.js.map +1 -1
  651. package/lib/plots/waterfall/shape.js.map +1 -1
  652. package/lib/plots/waterfall/utils.js.map +1 -1
  653. package/lib/plots/word-cloud/adaptor.js +2 -2
  654. package/lib/plots/word-cloud/adaptor.js.map +1 -1
  655. package/lib/plots/word-cloud/index.d.ts +2 -2
  656. package/lib/plots/word-cloud/index.js +1 -1
  657. package/lib/plots/word-cloud/index.js.map +1 -1
  658. package/lib/plots/word-cloud/shapes/word-cloud.js.map +1 -1
  659. package/lib/plots/word-cloud/utils.js +1 -1
  660. package/lib/plots/word-cloud/utils.js.map +1 -1
  661. package/lib/plugin/index.d.ts +1 -1
  662. package/lib/plugin/index.js +1 -1
  663. package/lib/plugin/index.js.map +1 -1
  664. package/lib/types/common.d.ts +8 -8
  665. package/lib/types/common.js.map +1 -1
  666. package/lib/types/index.d.ts +7 -7
  667. package/lib/types/index.js +7 -7
  668. package/lib/types/index.js.map +1 -1
  669. package/lib/types/state.d.ts +2 -2
  670. package/lib/types/state.js.map +1 -1
  671. package/lib/utils/data.js.map +1 -1
  672. package/lib/utils/geometry.d.ts +1 -1
  673. package/lib/utils/geometry.js.map +1 -1
  674. package/lib/utils/hierarchy/pack.js +1 -1
  675. package/lib/utils/hierarchy/pack.js.map +1 -1
  676. package/lib/utils/hierarchy/partition.js +1 -1
  677. package/lib/utils/hierarchy/partition.js.map +1 -1
  678. package/lib/utils/hierarchy/treemap.js +1 -1
  679. package/lib/utils/hierarchy/treemap.js.map +1 -1
  680. package/lib/utils/hierarchy/util.js.map +1 -1
  681. package/lib/utils/index.d.ts +10 -11
  682. package/lib/utils/index.js +23 -24
  683. package/lib/utils/index.js.map +1 -1
  684. package/lib/utils/padding.js.map +1 -1
  685. package/lib/utils/path.d.ts +1 -1
  686. package/lib/utils/path.js.map +1 -1
  687. package/lib/utils/pattern/dot.js.map +1 -1
  688. package/lib/utils/pattern/line.js.map +1 -1
  689. package/lib/utils/pattern/square.js.map +1 -1
  690. package/lib/utils/statistic.js +8 -7
  691. package/lib/utils/statistic.js.map +1 -1
  692. package/lib/utils/transform/histogram.js.map +1 -1
  693. package/lib/utils/transform/word-cloud.js.map +1 -1
  694. package/lib/utils/view.d.ts +1 -1
  695. package/lib/utils/view.js.map +1 -1
  696. package/package.json +8 -23
  697. package/src/adaptor/brush.ts +3 -4
  698. package/src/adaptor/common.ts +4 -4
  699. package/src/adaptor/connected-area.ts +1 -1
  700. package/src/adaptor/conversion-tag.ts +3 -3
  701. package/src/adaptor/geometries/area.ts +2 -2
  702. package/src/adaptor/geometries/base.ts +2 -2
  703. package/src/adaptor/geometries/edge.ts +2 -2
  704. package/src/adaptor/geometries/index.ts +5 -5
  705. package/src/adaptor/geometries/interval.ts +1 -1
  706. package/src/adaptor/geometries/line.ts +2 -2
  707. package/src/adaptor/geometries/point.ts +2 -2
  708. package/src/adaptor/geometries/polygon.ts +2 -2
  709. package/src/adaptor/geometries/schema.ts +2 -2
  710. package/src/adaptor/geometries/violin.ts +2 -2
  711. package/src/adaptor/pattern.ts +1 -1
  712. package/src/core/plot.ts +4 -4
  713. package/src/index.ts +105 -151
  714. package/src/interactions/actions/drill-down.ts +1 -1
  715. package/src/interactions/drill-down.ts +1 -1
  716. package/src/plots/_template/adaptor.ts +1 -1
  717. package/src/plots/_template/index.ts +2 -2
  718. package/src/plots/area/adaptor.ts +8 -9
  719. package/src/plots/area/index.ts +2 -2
  720. package/src/plots/bar/adaptor.ts +3 -3
  721. package/src/plots/bar/index.ts +2 -2
  722. package/src/plots/bidirectional-bar/adaptor.ts +6 -6
  723. package/src/plots/bidirectional-bar/index.ts +5 -5
  724. package/src/plots/bidirectional-bar/types.ts +1 -1
  725. package/src/plots/bidirectional-bar/utils.ts +1 -1
  726. package/src/plots/box/adaptor.ts +5 -5
  727. package/src/plots/box/index.ts +3 -3
  728. package/src/plots/bullet/adaptor.ts +3 -3
  729. package/src/plots/bullet/index.ts +3 -3
  730. package/src/plots/bullet/types.ts +1 -1
  731. package/src/plots/chord/adaptor.ts +4 -5
  732. package/src/plots/chord/index.ts +1 -1
  733. package/src/plots/circle-packing/adaptor.ts +10 -10
  734. package/src/plots/circle-packing/index.ts +2 -2
  735. package/src/plots/circle-packing/utils.ts +2 -2
  736. package/src/plots/column/adaptor.ts +10 -10
  737. package/src/plots/column/index.ts +2 -2
  738. package/src/plots/column/types.ts +2 -2
  739. package/src/plots/dual-axes/adaptor.ts +11 -11
  740. package/src/plots/dual-axes/index.ts +2 -2
  741. package/src/plots/dual-axes/types.ts +1 -1
  742. package/src/plots/dual-axes/util/geometry.ts +4 -4
  743. package/src/plots/dual-axes/util/legend.ts +3 -3
  744. package/src/plots/dual-axes/util/option.ts +5 -5
  745. package/src/plots/facet/adaptor.ts +2 -2
  746. package/src/plots/facet/index.ts +1 -1
  747. package/src/plots/facet/types.ts +4 -5
  748. package/src/plots/facet/utils.ts +1 -1
  749. package/src/plots/funnel/adaptor.ts +7 -7
  750. package/src/plots/funnel/geometries/basic.ts +6 -6
  751. package/src/plots/funnel/geometries/common.ts +3 -3
  752. package/src/plots/funnel/geometries/compare.ts +5 -5
  753. package/src/plots/funnel/geometries/dynamic-height.ts +5 -5
  754. package/src/plots/funnel/geometries/facet.ts +1 -1
  755. package/src/plots/funnel/index.ts +4 -5
  756. package/src/plots/funnel/interactions/funnel-conversion-tag.ts +2 -2
  757. package/src/plots/funnel/types.ts +1 -1
  758. package/src/plots/gauge/adaptor.ts +2 -2
  759. package/src/plots/gauge/index.ts +5 -6
  760. package/src/plots/gauge/utils.ts +2 -2
  761. package/src/plots/heatmap/adaptor.ts +3 -4
  762. package/src/plots/heatmap/index.ts +2 -2
  763. package/src/plots/heatmap/shapes/circle.ts +1 -1
  764. package/src/plots/heatmap/shapes/square.ts +1 -1
  765. package/src/plots/histogram/adaptor.ts +5 -6
  766. package/src/plots/histogram/index.ts +2 -2
  767. package/src/plots/line/adaptor.ts +8 -9
  768. package/src/plots/line/index.ts +2 -2
  769. package/src/plots/line/interactions/marker-active.ts +1 -1
  770. package/src/plots/line/types.ts +1 -1
  771. package/src/plots/liquid/adaptor.ts +6 -5
  772. package/src/plots/liquid/index.ts +4 -5
  773. package/src/plots/liquid/shapes/liquid.ts +20 -9
  774. package/src/plots/liquid/types.ts +6 -1
  775. package/src/plots/mix/adaptor.ts +6 -6
  776. package/src/plots/mix/index.ts +2 -2
  777. package/src/plots/mix/interactions/association.ts +3 -3
  778. package/src/plots/mix/interactions/utils.ts +1 -1
  779. package/src/plots/mix/types.ts +3 -3
  780. package/src/plots/mix/utils.ts +23 -23
  781. package/src/plots/pie/adaptor.ts +7 -7
  782. package/src/plots/pie/index.ts +3 -3
  783. package/src/plots/pie/interactions/actions/legend-active.ts +1 -1
  784. package/src/plots/pie/interactions/actions/statistic-active.ts +1 -1
  785. package/src/plots/pie/types.ts +1 -1
  786. package/src/plots/progress/adaptor.ts +4 -4
  787. package/src/plots/progress/index.ts +2 -2
  788. package/src/plots/progress/types.ts +1 -1
  789. package/src/plots/radar/adaptor.ts +3 -3
  790. package/src/plots/radar/index.ts +2 -2
  791. package/src/plots/radar/interactions/radar-tooltip-action.ts +1 -1
  792. package/src/plots/radar/types.ts +1 -1
  793. package/src/plots/radial-bar/adaptor.ts +3 -4
  794. package/src/plots/radial-bar/index.ts +2 -2
  795. package/src/plots/ring-progress/adaptor.ts +1 -1
  796. package/src/plots/ring-progress/index.ts +3 -3
  797. package/src/plots/ring-progress/types.ts +1 -1
  798. package/src/plots/rose/adaptor.ts +4 -4
  799. package/src/plots/rose/index.ts +2 -2
  800. package/src/plots/sankey/adaptor.ts +2 -2
  801. package/src/plots/sankey/helper.ts +2 -2
  802. package/src/plots/sankey/index.ts +3 -3
  803. package/src/plots/sankey/interactions/node-draggable.ts +1 -1
  804. package/src/plots/sankey/layout.ts +2 -2
  805. package/src/plots/sankey/sankey/index.ts +1 -1
  806. package/src/plots/sankey/sankey/sankey.ts +1 -1
  807. package/src/plots/scatter/adaptor.ts +5 -6
  808. package/src/plots/scatter/index.ts +3 -3
  809. package/src/plots/scatter/types.ts +5 -5
  810. package/src/plots/scatter/util.ts +3 -3
  811. package/src/plots/stock/adaptor.ts +4 -5
  812. package/src/plots/stock/index.ts +3 -3
  813. package/src/plots/stock/utils.ts +1 -1
  814. package/src/plots/sunburst/adaptor.ts +10 -10
  815. package/src/plots/sunburst/index.ts +2 -2
  816. package/src/plots/tiny-area/adaptor.ts +4 -4
  817. package/src/plots/tiny-area/index.ts +2 -2
  818. package/src/plots/tiny-area/types.ts +1 -1
  819. package/src/plots/tiny-column/adaptor.ts +4 -4
  820. package/src/plots/tiny-line/adaptor.ts +5 -5
  821. package/src/plots/tiny-line/index.ts +2 -2
  822. package/src/plots/tiny-line/types.ts +1 -1
  823. package/src/plots/treemap/adaptor.ts +4 -4
  824. package/src/plots/treemap/index.ts +3 -3
  825. package/src/plots/treemap/utils.ts +1 -1
  826. package/src/plots/venn/adaptor.ts +12 -11
  827. package/src/plots/venn/index.ts +2 -2
  828. package/src/plots/venn/interactions/index.ts +1 -1
  829. package/src/plots/venn/label.ts +1 -1
  830. package/src/plots/venn/layout/diagram.ts +1 -1
  831. package/src/plots/venn/layout/layout.ts +2 -2
  832. package/src/plots/venn/shape.ts +2 -2
  833. package/src/plots/venn/utils.ts +3 -3
  834. package/src/plots/violin/adaptor.ts +7 -7
  835. package/src/plots/violin/index.ts +2 -2
  836. package/src/plots/violin/utils.ts +1 -1
  837. package/src/plots/waterfall/adaptor.ts +6 -6
  838. package/src/plots/waterfall/index.ts +2 -2
  839. package/src/plots/waterfall/shape.ts +2 -3
  840. package/src/plots/waterfall/utils.ts +1 -1
  841. package/src/plots/word-cloud/adaptor.ts +5 -5
  842. package/src/plots/word-cloud/index.ts +3 -3
  843. package/src/plots/word-cloud/shapes/word-cloud.ts +1 -1
  844. package/src/plots/word-cloud/utils.ts +3 -4
  845. package/src/plugin/index.ts +2 -2
  846. package/src/types/common.ts +8 -8
  847. package/src/types/index.ts +7 -7
  848. package/src/types/state.ts +2 -2
  849. package/src/utils/data.ts +1 -1
  850. package/src/utils/geometry.ts +2 -2
  851. package/src/utils/hierarchy/pack.ts +2 -2
  852. package/src/utils/hierarchy/partition.ts +2 -2
  853. package/src/utils/hierarchy/treemap.ts +2 -2
  854. package/src/utils/hierarchy/util.ts +1 -1
  855. package/src/utils/index.ts +10 -11
  856. package/src/utils/padding.ts +1 -1
  857. package/src/utils/path.ts +1 -1
  858. package/src/utils/pattern/dot.ts +3 -3
  859. package/src/utils/pattern/line.ts +1 -1
  860. package/src/utils/pattern/square.ts +3 -3
  861. package/src/utils/statistic.ts +4 -3
  862. package/src/utils/transform/histogram.ts +1 -1
  863. package/src/utils/transform/word-cloud.ts +1 -1
  864. package/src/utils/view.ts +1 -1
package/lib/index.js CHANGED
@@ -2,159 +2,157 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.adaptors = exports.registerLocale = exports.G2 = exports.version = void 0;
4
4
  var tslib_1 = require("tslib");
5
- exports.version = '2.4.22';
5
+ exports.version = '2.4.23';
6
6
  // G2 自定义能力透出
7
7
  var G2 = tslib_1.__importStar(require("@antv/g2"));
8
8
  exports.G2 = G2;
9
+ /** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */
10
+ var common_1 = require("./adaptor/common");
9
11
  // 国际化处理
10
12
  var locale_1 = require("./core/locale");
11
13
  Object.defineProperty(exports, "registerLocale", { enumerable: true, get: function () { return locale_1.registerLocale; } });
12
14
  var en_US_1 = require("./locales/en_US");
13
15
  var zh_CN_1 = require("./locales/zh_CN");
14
- /** default locale register */
15
- locale_1.registerLocale('en-US', en_US_1.EN_US_LOCALE);
16
- locale_1.registerLocale('zh-CN', zh_CN_1.ZH_CN_LOCALE);
16
+ /** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */
17
+ var geometries_1 = require("./adaptor/geometries");
18
+ Object.defineProperty(exports, "area", { enumerable: true, get: function () { return geometries_1.area; } });
19
+ Object.defineProperty(exports, "interval", { enumerable: true, get: function () { return geometries_1.interval; } });
20
+ Object.defineProperty(exports, "line", { enumerable: true, get: function () { return geometries_1.line; } });
21
+ Object.defineProperty(exports, "point", { enumerable: true, get: function () { return geometries_1.point; } });
22
+ Object.defineProperty(exports, "polygon", { enumerable: true, get: function () { return geometries_1.polygon; } });
23
+ Object.defineProperty(exports, "schema", { enumerable: true, get: function () { return geometries_1.schema; } });
17
24
  /** 全局变量 */
18
25
  var global_1 = require("./core/global");
19
26
  Object.defineProperty(exports, "setGlobal", { enumerable: true, get: function () { return global_1.setGlobal; } });
20
27
  /** G2Plot 的 Plot 基类 */
21
28
  var plot_1 = require("./core/plot");
22
29
  Object.defineProperty(exports, "Plot", { enumerable: true, get: function () { return plot_1.Plot; } });
23
- // 类型定义导出
24
- tslib_1.__exportStar(require("./types"), exports);
25
- // 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)
26
- var line_1 = require("./plots/line");
27
- Object.defineProperty(exports, "Line", { enumerable: true, get: function () { return line_1.Line; } });
30
+ /** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
31
+ var lab_1 = require("./lab");
32
+ Object.defineProperty(exports, "Lab", { enumerable: true, get: function () { return lab_1.Lab; } });
28
33
  // 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)
29
34
  var area_1 = require("./plots/area");
30
35
  Object.defineProperty(exports, "Area", { enumerable: true, get: function () { return area_1.Area; } });
31
- // 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)
32
- var column_1 = require("./plots/column");
33
- Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return column_1.Column; } });
34
36
  // 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)
35
37
  var bar_1 = require("./plots/bar");
36
38
  Object.defineProperty(exports, "Bar", { enumerable: true, get: function () { return bar_1.Bar; } });
37
- // 饼图及类型定义 | author by [visiky](https://github.com/visiky)
38
- var pie_1 = require("./plots/pie");
39
- Object.defineProperty(exports, "Pie", { enumerable: true, get: function () { return pie_1.Pie; } });
40
- // 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
41
- var rose_1 = require("./plots/rose");
42
- Object.defineProperty(exports, "Rose", { enumerable: true, get: function () { return rose_1.Rose; } });
43
- // 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
44
- var word_cloud_1 = require("./plots/word-cloud");
45
- Object.defineProperty(exports, "WordCloud", { enumerable: true, get: function () { return word_cloud_1.WordCloud; } });
46
- // 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)
47
- var scatter_1 = require("./plots/scatter");
48
- Object.defineProperty(exports, "Scatter", { enumerable: true, get: function () { return scatter_1.Scatter; } });
49
- // 雷达图及类型定义 | author by [visiky](https://github.com/visiky)
50
- var radar_1 = require("./plots/radar");
51
- Object.defineProperty(exports, "Radar", { enumerable: true, get: function () { return radar_1.Radar; } });
39
+ // 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
40
+ var bidirectional_bar_1 = require("./plots/bidirectional-bar");
41
+ Object.defineProperty(exports, "BidirectionalBar", { enumerable: true, get: function () { return bidirectional_bar_1.BidirectionalBar; } });
42
+ // 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)
43
+ var box_1 = require("./plots/box");
44
+ Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return box_1.Box; } });
45
+ // 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
46
+ var bullet_1 = require("./plots/bullet");
47
+ Object.defineProperty(exports, "Bullet", { enumerable: true, get: function () { return bullet_1.Bullet; } });
48
+ // 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)
49
+ var chord_1 = require("./plots/chord");
50
+ Object.defineProperty(exports, "Chord", { enumerable: true, get: function () { return chord_1.Chord; } });
51
+ // circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)
52
+ var circle_packing_1 = require("./plots/circle-packing");
53
+ Object.defineProperty(exports, "CirclePacking", { enumerable: true, get: function () { return circle_packing_1.CirclePacking; } });
54
+ // 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)
55
+ var column_1 = require("./plots/column");
56
+ Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return column_1.Column; } });
52
57
  // 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)
53
58
  var dual_axes_1 = require("./plots/dual-axes");
54
59
  Object.defineProperty(exports, "DualAxes", { enumerable: true, get: function () { return dual_axes_1.DualAxes; } });
55
- // 迷你折线图及类型定义 | author by [connono](https://github.com/connono)
56
- var tiny_line_1 = require("./plots/tiny-line");
57
- Object.defineProperty(exports, "TinyLine", { enumerable: true, get: function () { return tiny_line_1.TinyLine; } });
58
- // 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)
59
- var tiny_column_1 = require("./plots/tiny-column");
60
- Object.defineProperty(exports, "TinyColumn", { enumerable: true, get: function () { return tiny_column_1.TinyColumn; } });
61
- // 迷你面积图及类型定义 | author by [connono](https://github.com/connono)
62
- var tiny_area_1 = require("./plots/tiny-area");
63
- Object.defineProperty(exports, "TinyArea", { enumerable: true, get: function () { return tiny_area_1.TinyArea; } });
60
+ // 分面图及类型定义 | author by [visiky](https://github.com/visiky)
61
+ var facet_1 = require("./plots/facet");
62
+ Object.defineProperty(exports, "Facet", { enumerable: true, get: function () { return facet_1.Facet; } });
63
+ // 漏斗图及类型定义
64
+ var funnel_1 = require("./plots/funnel");
65
+ Object.defineProperty(exports, "Funnel", { enumerable: true, get: function () { return funnel_1.Funnel; } });
66
+ Object.defineProperty(exports, "FUNNEL_CONVERSATION_FIELD", { enumerable: true, get: function () { return funnel_1.FUNNEL_CONVERSATION_FIELD; } });
67
+ // 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)
68
+ var gauge_1 = require("./plots/gauge");
69
+ Object.defineProperty(exports, "Gauge", { enumerable: true, get: function () { return gauge_1.Gauge; } });
70
+ // 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)
71
+ var heatmap_1 = require("./plots/heatmap");
72
+ Object.defineProperty(exports, "Heatmap", { enumerable: true, get: function () { return heatmap_1.Heatmap; } });
64
73
  // 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)
65
74
  var histogram_1 = require("./plots/histogram");
66
75
  Object.defineProperty(exports, "Histogram", { enumerable: true, get: function () { return histogram_1.Histogram; } });
76
+ // 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)
77
+ var line_1 = require("./plots/line");
78
+ Object.defineProperty(exports, "Line", { enumerable: true, get: function () { return line_1.Line; } });
79
+ // 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)
80
+ var liquid_1 = require("./plots/liquid");
81
+ Object.defineProperty(exports, "addWaterWave", { enumerable: true, get: function () { return liquid_1.addWaterWave; } });
82
+ Object.defineProperty(exports, "Liquid", { enumerable: true, get: function () { return liquid_1.Liquid; } });
83
+ // 已经废弃,更名为 Mix
84
+ var mix_1 = require("./plots/mix");
85
+ Object.defineProperty(exports, "Mix", { enumerable: true, get: function () { return mix_1.Mix; } });
86
+ Object.defineProperty(exports, "MultiView", { enumerable: true, get: function () { return mix_1.Mix; } });
87
+ // 饼图及类型定义 | author by [visiky](https://github.com/visiky)
88
+ var pie_1 = require("./plots/pie");
89
+ Object.defineProperty(exports, "Pie", { enumerable: true, get: function () { return pie_1.Pie; } });
67
90
  // 进度图及类型定义 | author by [connono](https://github.com/connono)
68
91
  var progress_1 = require("./plots/progress");
69
92
  Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return progress_1.Progress; } });
93
+ // 雷达图及类型定义 | author by [visiky](https://github.com/visiky)
94
+ var radar_1 = require("./plots/radar");
95
+ Object.defineProperty(exports, "Radar", { enumerable: true, get: function () { return radar_1.Radar; } });
96
+ // 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)
97
+ var radial_bar_1 = require("./plots/radial-bar");
98
+ Object.defineProperty(exports, "RadialBar", { enumerable: true, get: function () { return radial_bar_1.RadialBar; } });
70
99
  // 环形进度图及类型定义 | author by [connono](https://github.com/connono)
71
100
  var ring_progress_1 = require("./plots/ring-progress");
72
101
  Object.defineProperty(exports, "RingProgress", { enumerable: true, get: function () { return ring_progress_1.RingProgress; } });
73
- // 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)
74
- var heatmap_1 = require("./plots/heatmap");
75
- Object.defineProperty(exports, "Heatmap", { enumerable: true, get: function () { return heatmap_1.Heatmap; } });
76
- // 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)
77
- var box_1 = require("./plots/box");
78
- Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return box_1.Box; } });
79
- // 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)
80
- var violin_1 = require("./plots/violin");
81
- Object.defineProperty(exports, "Violin", { enumerable: true, get: function () { return violin_1.Violin; } });
82
- // 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)
83
- var venn_1 = require("./plots/venn");
84
- Object.defineProperty(exports, "Venn", { enumerable: true, get: function () { return venn_1.Venn; } });
102
+ // 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
103
+ var rose_1 = require("./plots/rose");
104
+ Object.defineProperty(exports, "Rose", { enumerable: true, get: function () { return rose_1.Rose; } });
105
+ // 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)
106
+ var sankey_1 = require("./plots/sankey");
107
+ Object.defineProperty(exports, "Sankey", { enumerable: true, get: function () { return sankey_1.Sankey; } });
108
+ // 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)
109
+ var scatter_1 = require("./plots/scatter");
110
+ Object.defineProperty(exports, "Scatter", { enumerable: true, get: function () { return scatter_1.Scatter; } });
85
111
  // K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)
86
112
  var stock_1 = require("./plots/stock");
87
113
  Object.defineProperty(exports, "Stock", { enumerable: true, get: function () { return stock_1.Stock; } });
88
- // 漏斗图及类型定义
89
- var funnel_1 = require("./plots/funnel");
90
- Object.defineProperty(exports, "Funnel", { enumerable: true, get: function () { return funnel_1.Funnel; } });
91
- Object.defineProperty(exports, "FUNNEL_CONVERSATION_FIELD", { enumerable: true, get: function () { return funnel_1.FUNNEL_CONVERSATION_FIELD; } });
92
- // 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)
93
- var liquid_1 = require("./plots/liquid");
94
- Object.defineProperty(exports, "Liquid", { enumerable: true, get: function () { return liquid_1.Liquid; } });
95
- Object.defineProperty(exports, "addWaterWave", { enumerable: true, get: function () { return liquid_1.addWaterWave; } });
96
- // 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
97
- var bullet_1 = require("./plots/bullet");
98
- Object.defineProperty(exports, "Bullet", { enumerable: true, get: function () { return bullet_1.Bullet; } });
99
114
  // 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)
100
115
  var sunburst_1 = require("./plots/sunburst");
101
116
  Object.defineProperty(exports, "Sunburst", { enumerable: true, get: function () { return sunburst_1.Sunburst; } });
102
- // 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)
103
- var gauge_1 = require("./plots/gauge");
104
- Object.defineProperty(exports, "Gauge", { enumerable: true, get: function () { return gauge_1.Gauge; } });
105
- // 瀑布图 | author by [visiky](https://github.com/visiky)
106
- var waterfall_1 = require("./plots/waterfall");
107
- Object.defineProperty(exports, "Waterfall", { enumerable: true, get: function () { return waterfall_1.Waterfall; } });
108
- // 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)
109
- var radial_bar_1 = require("./plots/radial-bar");
110
- Object.defineProperty(exports, "RadialBar", { enumerable: true, get: function () { return radial_bar_1.RadialBar; } });
111
- // 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
112
- var bidirectional_bar_1 = require("./plots/bidirectional-bar");
113
- Object.defineProperty(exports, "BidirectionalBar", { enumerable: true, get: function () { return bidirectional_bar_1.BidirectionalBar; } });
117
+ // 迷你面积图及类型定义 | author by [connono](https://github.com/connono)
118
+ var tiny_area_1 = require("./plots/tiny-area");
119
+ Object.defineProperty(exports, "TinyArea", { enumerable: true, get: function () { return tiny_area_1.TinyArea; } });
120
+ // 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)
121
+ var tiny_column_1 = require("./plots/tiny-column");
122
+ Object.defineProperty(exports, "TinyColumn", { enumerable: true, get: function () { return tiny_column_1.TinyColumn; } });
123
+ // 迷你折线图及类型定义 | author by [connono](https://github.com/connono)
124
+ var tiny_line_1 = require("./plots/tiny-line");
125
+ Object.defineProperty(exports, "TinyLine", { enumerable: true, get: function () { return tiny_line_1.TinyLine; } });
114
126
  // 矩形树图
115
127
  var treemap_1 = require("./plots/treemap");
116
128
  Object.defineProperty(exports, "Treemap", { enumerable: true, get: function () { return treemap_1.Treemap; } });
117
- // 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)
118
- var sankey_1 = require("./plots/sankey");
119
- Object.defineProperty(exports, "Sankey", { enumerable: true, get: function () { return sankey_1.Sankey; } });
120
- // 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)
121
- var chord_1 = require("./plots/chord");
122
- Object.defineProperty(exports, "Chord", { enumerable: true, get: function () { return chord_1.Chord; } });
123
- // circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)
124
- var circle_packing_1 = require("./plots/circle-packing");
125
- Object.defineProperty(exports, "CirclePacking", { enumerable: true, get: function () { return circle_packing_1.CirclePacking; } });
129
+ // 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)
130
+ var venn_1 = require("./plots/venn");
131
+ Object.defineProperty(exports, "Venn", { enumerable: true, get: function () { return venn_1.Venn; } });
132
+ // 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)
133
+ var violin_1 = require("./plots/violin");
134
+ Object.defineProperty(exports, "Violin", { enumerable: true, get: function () { return violin_1.Violin; } });
135
+ // 瀑布图 | author by [visiky](https://github.com/visiky)
136
+ var waterfall_1 = require("./plots/waterfall");
137
+ Object.defineProperty(exports, "Waterfall", { enumerable: true, get: function () { return waterfall_1.Waterfall; } });
138
+ // 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
139
+ var word_cloud_1 = require("./plots/word-cloud");
140
+ Object.defineProperty(exports, "WordCloud", { enumerable: true, get: function () { return word_cloud_1.WordCloud; } });
126
141
  // 以下开放自定义图表开发的能力(目前仅仅是孵化中)
127
142
  /** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */
128
143
  var plugin_1 = require("./plugin");
129
144
  Object.defineProperty(exports, "P", { enumerable: true, get: function () { return plugin_1.P; } });
130
- /** 开放 getCanvasPatterng 方法 */
131
- var pattern_1 = require("./utils/pattern");
132
- Object.defineProperty(exports, "getCanvasPattern", { enumerable: true, get: function () { return pattern_1.getCanvasPattern; } });
133
- // 已经废弃,更名为 Mix
134
- var mix_1 = require("./plots/mix");
135
- Object.defineProperty(exports, "MultiView", { enumerable: true, get: function () { return mix_1.Mix; } });
136
- /** 开放多图层图表 (mix) */
137
- var mix_2 = require("./plots/mix");
138
- Object.defineProperty(exports, "Mix", { enumerable: true, get: function () { return mix_2.Mix; } });
139
- // 分面图及类型定义 | author by [visiky](https://github.com/visiky)
140
- var facet_1 = require("./plots/facet");
141
- Object.defineProperty(exports, "Facet", { enumerable: true, get: function () { return facet_1.Facet; } });
145
+ // 类型定义导出
146
+ tslib_1.__exportStar(require("./types"), exports);
142
147
  /** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */
143
148
  var utils_1 = require("./utils");
144
149
  Object.defineProperty(exports, "flow", { enumerable: true, get: function () { return utils_1.flow; } });
145
150
  Object.defineProperty(exports, "measureTextWidth", { enumerable: true, get: function () { return utils_1.measureTextWidth; } });
146
- /** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */
147
- var geometries_1 = require("./adaptor/geometries");
148
- Object.defineProperty(exports, "line", { enumerable: true, get: function () { return geometries_1.line; } });
149
- Object.defineProperty(exports, "interval", { enumerable: true, get: function () { return geometries_1.interval; } });
150
- Object.defineProperty(exports, "area", { enumerable: true, get: function () { return geometries_1.area; } });
151
- Object.defineProperty(exports, "point", { enumerable: true, get: function () { return geometries_1.point; } });
152
- Object.defineProperty(exports, "polygon", { enumerable: true, get: function () { return geometries_1.polygon; } });
153
- Object.defineProperty(exports, "schema", { enumerable: true, get: function () { return geometries_1.schema; } });
154
- /** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */
155
- var common_1 = require("./adaptor/common");
151
+ /** 开放 getCanvasPatterng 方法 */
152
+ var pattern_1 = require("./utils/pattern");
153
+ Object.defineProperty(exports, "getCanvasPattern", { enumerable: true, get: function () { return pattern_1.getCanvasPattern; } });
154
+ /** default locale register */
155
+ locale_1.registerLocale('en-US', en_US_1.EN_US_LOCALE);
156
+ locale_1.registerLocale('zh-CN', zh_CN_1.ZH_CN_LOCALE);
156
157
  exports.adaptors = { scale: common_1.scale, legend: common_1.legend, tooltip: common_1.tooltip, annotation: common_1.annotation, interaction: common_1.interaction, theme: common_1.theme, animation: common_1.animation };
157
- /** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
158
- var lab_1 = require("./lab");
159
- Object.defineProperty(exports, "Lab", { enumerable: true, get: function () { return lab_1.Lab; } });
160
158
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,aAAa;AACb,mDAA+B;AACtB,gBAAE;AAEX,QAAQ;AACR,wCAA+C;AAOtC,+FAPA,uBAAc,OAOA;AANvB,yCAA+C;AAC/C,yCAA+C;AAC/C,8BAA8B;AAC9B,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AACtC,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AAItC,WAAW;AACX,wCAA0C;AAAjC,mGAAA,SAAS,OAAA;AAElB,uBAAuB;AACvB,oCAAmC;AAA1B,4FAAA,IAAI,OAAA;AAKb,SAAS;AACT,kDAAwB;AAExB,2DAA2D;AAC3D,qCAAoC;AAA3B,4FAAA,IAAI,OAAA;AAGb,2DAA2D;AAC3D,qCAAoC;AAA3B,4FAAA,IAAI,OAAA;AAGb,uDAAuD;AACvD,yCAAwC;AAA/B,gGAAA,MAAM,OAAA;AAGf,yDAAyD;AACzD,mCAAkC;AAAzB,0FAAA,GAAG,OAAA;AAGZ,0DAA0D;AAC1D,mCAAkC;AAAzB,0FAAA,GAAG,OAAA;AAGZ,uEAAuE;AACvE,qCAAoC;AAA3B,4FAAA,IAAI,OAAA;AAGb,uEAAuE;AACvE,iDAA+C;AAAtC,uGA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AAAtC,uGAAA,SAAS,OAAA;AAGlB,+DAA+D;AAC/D,+DAA6D;AAApD,qHAAA,gBAAgB,OAAA;AAGzB,OAAO;AACP,2CAA0C;AAAjC,kGAAA,OAAO,OAAA;AAGhB,2DAA2D;AAC3D,yCAAwC;AAA/B,gGAAA,MAAM,OAAA;AAGf,uGAAuG;AACvG,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AAGd,6GAA6G;AAC7G,yDAAuD;AAA9C,+GAAA,aAAa,OAAA;AAGtB,2BAA2B;AAC3B,mEAAmE;AACnE,mCAA6B;AAApB,2FAAA,CAAC,OAAA;AAEV,8BAA8B;AAC9B,2CAAmD;AAA1C,2GAAA,gBAAgB,OAAA;AAEzB,eAAe;AACf,mCAA+C;AAAtC,gGAAA,GAAG,OAAa;AAEzB,oBAAoB;AACpB,mCAAyC;AAAhC,0FAAA,GAAG,OAAO;AAGnB,2DAA2D;AAC3D,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AAGd,uCAAuC;AACvC,iCAAiD;AAAxC,6FAAA,IAAI,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAE/B,0CAA0C;AAC1C,mDAAoF;AAA3E,kGAAA,IAAI,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,kGAAA,IAAI,OAAA;AAAE,mGAAA,KAAK,OAAA;AAAE,qGAAA,OAAO,OAAA;AAAE,oGAAA,MAAM,OAAA;AASrD,uCAAuC;AACvC,2CAAqG;AACxF,QAAA,QAAQ,GAAG,EAAE,KAAK,gBAAA,EAAE,MAAM,iBAAA,EAAE,OAAO,kBAAA,EAAE,UAAU,qBAAA,EAAE,WAAW,sBAAA,EAAE,KAAK,gBAAA,EAAE,SAAS,oBAAA,EAAE,CAAC;AAE9F,oDAAoD;AACpD,6BAA4B;AAAnB,0FAAA,GAAG,OAAA","sourcesContent":["export const version = '2.4.22';\n\n// G2 自定义能力透出\nimport * as G2 from '@antv/g2';\nexport { G2 };\n\n// 国际化处理\nimport { registerLocale } from './core/locale';\nimport { EN_US_LOCALE } from './locales/en_US';\nimport { ZH_CN_LOCALE } from './locales/zh_CN';\n/** default locale register */\nregisterLocale('en-US', EN_US_LOCALE);\nregisterLocale('zh-CN', ZH_CN_LOCALE);\n/** 透出 国际化 工具函数,便于使用 */\nexport { registerLocale };\n\n/** 全局变量 */\nexport { setGlobal } from './core/global';\n\n/** G2Plot 的 Plot 基类 */\nexport { Plot } from './core/plot';\n\n/** Adaptor 及其参数的类型定义 */\nexport type { Adaptor, Params } from './core/adaptor';\n\n// 类型定义导出\nexport * from './types';\n\n// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Line } from './plots/line';\nexport type { LineOptions } from './plots/line';\n\n// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Area } from './plots/area';\nexport type { AreaOptions } from './plots/area';\n\n// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)\nexport { Column } from './plots/column';\nexport type { ColumnOptions } from './plots/column';\n\n// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)\nexport { Bar } from './plots/bar';\nexport type { BarOptions } from './plots/bar';\n\n// 饼图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Pie } from './plots/pie';\nexport type { PieOptions } from './plots/pie';\n\n// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { Rose } from './plots/rose';\nexport type { RoseOptions } from './plots/rose';\n\n// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { WordCloud } from './plots/word-cloud';\nexport type { WordCloudOptions } from './plots/word-cloud';\n\n// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)\nexport { Scatter } from './plots/scatter';\nexport type { ScatterOptions } from './plots/scatter';\n\n// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Radar } from './plots/radar';\nexport type { RadarOptions } from './plots/radar';\n\n// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)\nexport { DualAxes } from './plots/dual-axes';\nexport type { DualAxesOptions } from './plots/dual-axes';\n\n// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyLine } from './plots/tiny-line';\nexport type { TinyLineOptions } from './plots/tiny-line';\n\n// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyColumn } from './plots/tiny-column';\nexport type { TinyColumnOptions } from './plots/tiny-column';\n\n// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyArea } from './plots/tiny-area';\nexport type { TinyAreaOptions } from './plots/tiny-area';\n\n// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)\nexport { Histogram } from './plots/histogram';\nexport type { HistogramOptions } from './plots/histogram';\n\n// 进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { Progress } from './plots/progress';\nexport type { ProgressOptions } from './plots/progress';\n\n// 环形进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { RingProgress } from './plots/ring-progress';\nexport type { RingProgressOptions } from './plots/ring-progress';\n\n// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)\nexport { Heatmap } from './plots/heatmap';\nexport type { HeatmapOptions } from './plots/heatmap';\n\n// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)\nexport { Box } from './plots/box';\nexport type { BoxOptions } from './plots/box';\n\n// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)\nexport { Violin } from './plots/violin';\nexport type { ViolinOptions } from './plots/violin';\n\n// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Venn } from './plots/venn';\nexport type { VennOptions } from './plots/venn';\n\n// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)\nexport { Stock } from './plots/stock';\nexport type { StockOptions } from './plots/stock';\n\n// 漏斗图及类型定义\nexport { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';\nexport type { FunnelOptions } from './plots/funnel';\n\n// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)\nexport { Liquid, addWaterWave } from './plots/liquid';\nexport type { LiquidOptions } from './plots/liquid';\n\n// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { Bullet } from './plots/bullet';\nexport type { BulletOptions } from './plots/bullet';\n\n// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)\nexport { Sunburst } from './plots/sunburst';\nexport type { SunburstOptions } from './plots/sunburst';\n\n// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Gauge } from './plots/gauge';\nexport type { GaugeOptions } from './plots/gauge';\n\n// 瀑布图 | author by [visiky](https://github.com/visiky)\nexport { Waterfall } from './plots/waterfall';\nexport type { WaterfallOptions } from './plots/waterfall';\n\n// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)\nexport { RadialBar } from './plots/radial-bar';\nexport type { RadialBarOptions } from './plots/radial-bar';\n\n// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { BidirectionalBar } from './plots/bidirectional-bar';\nexport type { BidirectionalBarOptions } from './plots/bidirectional-bar';\n\n// 矩形树图\nexport { Treemap } from './plots/treemap';\nexport type { TreemapOptions } from './plots/treemap';\n\n// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Sankey } from './plots/sankey';\nexport type { SankeyOptions } from './plots/sankey';\n\n// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)\nexport { Chord } from './plots/chord';\nexport type { ChordOptions } from './plots/chord';\n\n// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)\nexport { CirclePacking } from './plots/circle-packing';\nexport type { CirclePackingOptions } from './plots/circle-packing';\n\n// 以下开放自定义图表开发的能力(目前仅仅是孵化中)\n/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */\nexport { P } from './plugin';\n\n/** 开放 getCanvasPatterng 方法 */\nexport { getCanvasPattern } from './utils/pattern';\n\n// 已经废弃,更名为 Mix\nexport { Mix as MultiView } from './plots/mix';\nexport type { MixOptions as MultiViewOptions } from './plots/mix';\n/** 开放多图层图表 (mix) */\nexport { Mix as Mix } from './plots/mix';\nexport type { MixOptions } from './plots/mix';\n\n// 分面图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Facet } from './plots/facet';\nexport type { FacetOptions } from './plots/facet';\n\n/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */\nexport { flow, measureTextWidth } from './utils';\n\n/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */\nexport { line, interval, area, point, polygon, schema } from './adaptor/geometries';\nexport type {\n LineGeometryOptions,\n IntervalGeometryOptions,\n AreaGeometryOptions,\n PointGeometryOptions,\n PolygonGeometryOptions,\n SchemaGeometryOptions,\n} from './adaptor/geometries';\n/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */\nimport { scale, legend, tooltip, annotation, interaction, theme, animation } from './adaptor/common';\nexport const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };\n\n/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */\nexport { Lab } from './lab';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,aAAa;AACb,mDAA+B;AA2ItB,gBAAE;AA1IX,uCAAuC;AACvC,2CAAqG;AACrG,QAAQ;AACR,wCAA+C;AAyItC,+FAzIA,uBAAc,OAyIA;AAxIvB,yCAA+C;AAC/C,yCAA+C;AAC/C,0CAA0C;AAC1C,mDAAoF;AAA3E,kGAAA,IAAI,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE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AA,gBAAgB,OAAA;AAC/B,8BAA8B;AAC9B,2CAAmD;AAA1C,2GAAA,gBAAgB,OAAA;AAKzB,8BAA8B;AAC9B,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AACtC,uBAAc,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;AAEzB,QAAA,QAAQ,GAAG,EAAE,KAAK,gBAAA,EAAE,MAAM,iBAAA,EAAE,OAAO,kBAAA,EAAE,UAAU,qBAAA,EAAE,WAAW,sBAAA,EAAE,KAAK,gBAAA,EAAE,SAAS,oBAAA,EAAE,CAAC","sourcesContent":["export const version = '2.4.23';\n\n// G2 自定义能力透出\nimport * as G2 from '@antv/g2';\n/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */\nimport { animation, annotation, interaction, legend, scale, theme, tooltip } from './adaptor/common';\n// 国际化处理\nimport { registerLocale } from './core/locale';\nimport { EN_US_LOCALE } from './locales/en_US';\nimport { ZH_CN_LOCALE } from './locales/zh_CN';\n/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */\nexport { area, interval, line, point, polygon, schema } from './adaptor/geometries';\nexport type {\n AreaGeometryOptions,\n IntervalGeometryOptions,\n LineGeometryOptions,\n PointGeometryOptions,\n PolygonGeometryOptions,\n SchemaGeometryOptions,\n} from './adaptor/geometries';\n/** Adaptor 及其参数的类型定义 */\nexport type { Adaptor, Params } from './core/adaptor';\n/** 全局变量 */\nexport { setGlobal } from './core/global';\n/** G2Plot 的 Plot 基类 */\nexport { Plot } from './core/plot';\n/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */\nexport { Lab } from './lab';\n// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Area } from './plots/area';\nexport type { AreaOptions } from './plots/area';\n// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)\nexport { Bar } from './plots/bar';\nexport type { BarOptions } from './plots/bar';\n// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { BidirectionalBar } from './plots/bidirectional-bar';\nexport type { BidirectionalBarOptions } from './plots/bidirectional-bar';\n// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)\nexport { Box } from './plots/box';\nexport type { BoxOptions } from './plots/box';\n// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { Bullet } from './plots/bullet';\nexport type { BulletOptions } from './plots/bullet';\n// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)\nexport { Chord } from './plots/chord';\nexport type { ChordOptions } from './plots/chord';\n// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)\nexport { CirclePacking } from './plots/circle-packing';\nexport type { CirclePackingOptions } from './plots/circle-packing';\n// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)\nexport { Column } from './plots/column';\nexport type { ColumnOptions } from './plots/column';\n// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)\nexport { DualAxes } from './plots/dual-axes';\nexport type { DualAxesOptions } from './plots/dual-axes';\n// 分面图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Facet } from './plots/facet';\nexport type { FacetOptions } from './plots/facet';\n// 漏斗图及类型定义\nexport { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';\nexport type { FunnelOptions } from './plots/funnel';\n// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Gauge } from './plots/gauge';\nexport type { GaugeOptions } from './plots/gauge';\n// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)\nexport { Heatmap } from './plots/heatmap';\nexport type { HeatmapOptions } from './plots/heatmap';\n// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)\nexport { Histogram } from './plots/histogram';\nexport type { HistogramOptions } from './plots/histogram';\n// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Line } from './plots/line';\nexport type { LineOptions } from './plots/line';\n// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)\nexport { addWaterWave, Liquid } from './plots/liquid';\nexport type { LiquidOptions } from './plots/liquid';\n// 已经废弃,更名为 Mix\nexport { Mix as Mix, Mix as MultiView } from './plots/mix';\nexport type { MixOptions, MixOptions as MultiViewOptions } from './plots/mix';\n// 饼图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Pie } from './plots/pie';\nexport type { PieOptions } from './plots/pie';\n// 进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { Progress } from './plots/progress';\nexport type { ProgressOptions } from './plots/progress';\n// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Radar } from './plots/radar';\nexport type { RadarOptions } from './plots/radar';\n// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)\nexport { RadialBar } from './plots/radial-bar';\nexport type { RadialBarOptions } from './plots/radial-bar';\n// 环形进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { RingProgress } from './plots/ring-progress';\nexport type { RingProgressOptions } from './plots/ring-progress';\n// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { Rose } from './plots/rose';\nexport type { RoseOptions } from './plots/rose';\n// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Sankey } from './plots/sankey';\nexport type { SankeyOptions } from './plots/sankey';\n// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)\nexport { Scatter } from './plots/scatter';\nexport type { ScatterOptions } from './plots/scatter';\n// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)\nexport { Stock } from './plots/stock';\nexport type { StockOptions } from './plots/stock';\n// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)\nexport { Sunburst } from './plots/sunburst';\nexport type { SunburstOptions } from './plots/sunburst';\n// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyArea } from './plots/tiny-area';\nexport type { TinyAreaOptions } from './plots/tiny-area';\n// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyColumn } from './plots/tiny-column';\nexport type { TinyColumnOptions } from './plots/tiny-column';\n// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyLine } from './plots/tiny-line';\nexport type { TinyLineOptions } from './plots/tiny-line';\n// 矩形树图\nexport { Treemap } from './plots/treemap';\nexport type { TreemapOptions } from './plots/treemap';\n// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Venn } from './plots/venn';\nexport type { VennOptions } from './plots/venn';\n// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)\nexport { Violin } from './plots/violin';\nexport type { ViolinOptions } from './plots/violin';\n// 瀑布图 | author by [visiky](https://github.com/visiky)\nexport { Waterfall } from './plots/waterfall';\nexport type { WaterfallOptions } from './plots/waterfall';\n// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { WordCloud } from './plots/word-cloud';\nexport type { WordCloudOptions } from './plots/word-cloud';\n// 以下开放自定义图表开发的能力(目前仅仅是孵化中)\n/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */\nexport { P } from './plugin';\n// 类型定义导出\nexport * from './types';\n/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */\nexport { flow, measureTextWidth } from './utils';\n/** 开放 getCanvasPatterng 方法 */\nexport { getCanvasPattern } from './utils/pattern';\nexport { G2 };\n/** 透出 国际化 工具函数,便于使用 */\nexport { registerLocale };\n\n/** default locale register */\nregisterLocale('en-US', EN_US_LOCALE);\nregisterLocale('zh-CN', ZH_CN_LOCALE);\n\nexport const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"drill-down.js","s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KACnB,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,CAAC,GACL;iBACF,CAAC,CAAC;gBAEH,IAAM,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;gBAC1C,IAAI,IAAI,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC;aACpC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,wCAAc,GAAtB;QACE,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;SAC7B;IACH,CAAC;IAED;;;OAGG;IACI,iCAAO,GAAd;QACE,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;SAC/B;QACD,iBAAM,OAAO,WAAE,CAAC;IAClB,CAAC;IACH,sBAAC;AAAD,CAAC,AA7OD,CAAqC,WAAM,GA6O1C;AA7OY,0CAAe","sourcesContent":["import { Action, IGroup, Util } from '@antv/g2';\nimport { get, last, isNil, size } from '@antv/util';\nimport { Data } from '../../types';\nimport { DrillDownCfg } from '../../types/drill-down';\nimport { deepAssign } from '../../utils/deep-assign';\n\n// 面包屑文字和分割符'/'之间的距离\nconst PADDING = 4;\n// 面包屑位置距离树图的距离\nconst PADDING_LEFT = 0;\n// 面包屑位置距离树图的顶部距离\nexport const PADDING_TOP = 5;\n\n/** Group name of breadCrumb: 面包屑 */\nexport const BREAD_CRUMB_NAME = 'drilldown-bread-crumb';\n\n// 面包屑默认配置\nexport const DEFAULT_BREAD_CRUMB_CONFIG: DrillDownCfg['breadCrumb'] = {\n /** 位置,默认:左上角 */\n position: 'top-left',\n dividerText: '/',\n textStyle: {\n fontSize: 12,\n fill: 'rgba(0, 0, 0, 0.65)',\n cursor: 'pointer',\n },\n activeTextStyle: {\n fill: '#87B5FF',\n },\n};\n\n/**\n * hierarchy 数据转换的参数\n */\nexport const HIERARCHY_DATA_TRANSFORM_PARAMS = 'hierarchy-data-transform-params';\n\n/**\n * Hierarchy plot 节点的数据\n */\nexport type HierarchyNode<N = any /** 节点 */> = {\n /** 节点的原始数据,树型结构(todo 是否更正 key 为 origin) */\n data: { name: string; value?: any; children: { name: string; value?: any }[] };\n /** 在构建节点数据时候,增加的扩展配置, 用于存储 transformData 的入参配置 */\n [HIERARCHY_DATA_TRANSFORM_PARAMS]: object;\n /** 当前的层级结构,每一次下钻都会更新. 不是 unique */\n depth: number;\n /** 当前所处高度,depth + height = 总的层级 */\n height: number;\n parent: N;\n children: N[];\n};\n\ntype HistoryCache = {\n name: string;\n id: string;\n children: Data;\n}[];\n\n/**\n * @description 下钻交互的 action\n * @author liuzhenying\n *\n * 适用于:hierarchy plot\n */\nexport class DrillDownAction extends Action {\n /** Action name */\n public name = 'drill-down';\n\n // 存储历史下钻数据\n protected historyCache: HistoryCache = [];\n // 面包屑 group\n private breadCrumbGroup: IGroup = null;\n // 面包屑基础配置\n private breadCrumbCfg: DrillDownCfg['breadCrumb'] = DEFAULT_BREAD_CRUMB_CONFIG;\n\n /**\n * 点击事件, 下钻数据,并绘制面包屑\n */\n public click() {\n const data = get(this.context, ['event', 'data', 'data']);\n if (!data) return false;\n\n this.drill(data);\n this.drawBreadCrumb();\n }\n\n /**\n * 重置位置,初始化及触发 chart afterchangesize 回调时使用\n */\n public resetPosition() {\n // 当在第一层级未绘制面包屑,此时 changedata 触发 resetPosition 函数,需判断 this.breadCrumbGroup 是否存在\n if (!this.breadCrumbGroup) return;\n const coordinate = this.context.view.getCoordinate();\n const breadCrumbGroup = this.breadCrumbGroup;\n const bbox = breadCrumbGroup.getBBox();\n\n const { position } = this.getButtonCfg();\n\n // @todo 后续抽取一个函数来处理,以及增加 margin 或者 padding 的设置\n // 非 polar 的,需要使用 coordinate,除却图表组件\n let point = { x: coordinate.start.x, y: coordinate.end.y - (bbox.height + PADDING_TOP * 2) };\n if (coordinate.isPolar) {\n // 默认,左上角直接出发\n point = { x: 0, y: 0 };\n }\n if (position === 'bottom-left') {\n // 涉及到坐标反转的问题\n point = { x: coordinate.start.x, y: coordinate.start.y };\n }\n /** PADDING_LEFT, PADDING_TOP 与画布边缘的距离 */\n const matrix = Util.transform(null, [['t', point.x + PADDING_LEFT, point.y + bbox.height + PADDING_TOP]]);\n breadCrumbGroup.setMatrix(matrix);\n }\n\n /**\n * 返回上一层\n */\n public back(): void {\n if (size(this.historyCache)) {\n this.backTo(this.historyCache.slice(0, -1));\n }\n }\n\n /**\n * 重置\n */\n public reset(): void {\n if (this.historyCache[0]) {\n this.backTo(this.historyCache.slice(0, 1));\n }\n // 清空\n this.historyCache = [];\n this.hideCrumbGroup();\n }\n\n /**\n * 下钻数据并更新 view 显示层\n * @param nodeInfo 下钻数据\n */\n protected drill(nodeInfo: HierarchyNode) {\n const { view } = this.context;\n const transformData = get(view, ['interactions', 'drill-down', 'cfg', 'transformData'], (v) => v);\n\n // 重新 update 数据\n const drillData = transformData({ data: nodeInfo.data, ...nodeInfo[HIERARCHY_DATA_TRANSFORM_PARAMS] });\n view.changeData(drillData);\n\n // 存储历史记录\n const historyCache: HistoryCache = [];\n\n let node = nodeInfo;\n while (node) {\n const nodeData = node.data;\n historyCache.unshift({\n id: `${nodeData.name}_${node.height}_${node.depth}`,\n name: nodeData.name,\n // children 是实际数据\n children: transformData({ data: nodeData, ...nodeInfo[HIERARCHY_DATA_TRANSFORM_PARAMS] }),\n });\n node = node.parent;\n }\n\n this.historyCache = (this.historyCache || []).slice(0, -1).concat(historyCache);\n }\n\n /**\n * 回退事件,点击面包屑时触发\n * @param historyCache 当前要回退到的历史\n */\n protected backTo(historyCache: HistoryCache) {\n if (!historyCache || historyCache.length <= 0) {\n return;\n }\n\n const { view } = this.context;\n const data = last(historyCache).children; // 处理后的数组\n view.changeData(data);\n\n if (historyCache.length > 1) {\n this.historyCache = historyCache;\n this.drawBreadCrumb();\n } else {\n // 清空\n this.historyCache = [];\n this.hideCrumbGroup();\n }\n }\n\n /**\n * 获取 mix 默认的配置和用户配置\n */\n private getButtonCfg() {\n const { view } = this.context;\n const drillDownConfig: DrillDownCfg = get(view, ['interactions', 'drill-down', 'cfg', 'drillDownConfig']);\n\n return deepAssign(this.breadCrumbCfg, drillDownConfig?.breadCrumb, this.cfg);\n }\n\n /**\n * 显示面包屑\n */\n private drawBreadCrumb() {\n this.drawBreadCrumbGroup();\n this.resetPosition();\n this.breadCrumbGroup.show();\n }\n\n /**\n * 绘制 Button 和 文本\n */\n private drawBreadCrumbGroup() {\n const config = this.getButtonCfg();\n const cache = this.historyCache;\n\n // 初始化面包屑 group\n if (!this.breadCrumbGroup) {\n this.breadCrumbGroup = this.context.view.foregroundGroup.addGroup({\n name: BREAD_CRUMB_NAME,\n });\n } else {\n this.breadCrumbGroup.clear();\n }\n\n // 绘制面包屑\n let left = 0;\n cache.forEach((record, index) => {\n // 添加文本\n const textShape = this.breadCrumbGroup.addShape({\n type: 'text',\n id: record.id,\n name: `${BREAD_CRUMB_NAME}_${record.name}_text`,\n attrs: {\n text: index === 0 && !isNil(config.rootText) ? config.rootText : record.name,\n ...config.textStyle,\n x: left,\n y: 0,\n },\n });\n\n const textShapeBox = textShape.getBBox();\n left += textShapeBox.width + PADDING;\n\n // 增加文本事件\n textShape.on('click', (event) => {\n const targetId = event.target.get('id');\n if (targetId !== last(cache)?.id) {\n const newHistoryCache = cache.slice(0, cache.findIndex((d) => d.id === targetId) + 1);\n this.backTo(newHistoryCache);\n }\n });\n // active 效果内置\n textShape.on('mouseenter', (event) => {\n const targetId = event.target.get('id');\n if (targetId !== last(cache)?.id) {\n textShape.attr(config.activeTextStyle);\n } else {\n textShape.attr({ cursor: 'default' });\n }\n });\n textShape.on('mouseleave', () => {\n textShape.attr(config.textStyle);\n });\n\n if (index < cache.length - 1) {\n // 添加反斜杠\n const dividerShape = this.breadCrumbGroup.addShape({\n type: 'text',\n name: `${config.name}_${record.name}_divider`,\n attrs: {\n text: config.dividerText,\n ...config.textStyle,\n x: left,\n y: 0,\n },\n });\n\n const dividerBox = dividerShape.getBBox();\n left += dividerBox.width + PADDING;\n }\n });\n }\n\n /**\n * 隐藏面包屑\n */\n private hideCrumbGroup() {\n if (this.breadCrumbGroup) {\n this.breadCrumbGroup.hide();\n }\n }\n\n /**\n * @override\n * destroy: 销毁资源\n */\n public destroy() {\n if (this.breadCrumbGroup) {\n this.breadCrumbGroup.remove();\n }\n super.destroy();\n }\n}\n"]}
1
+ {"version":3,"file":"drill-down.js","sourceRoot":"","sources":["../../../src/interactions/actions/drill-down.ts"],"names":[],"mappings":";;;;AAAA,+BAAgD;AAChD,mCAAoD;AAGpD,uDAAqD;AAErD,oBAAoB;AACpB,IAAM,OAAO,GAAG,CAAC,CAAC;AAClB,eAAe;AACf,IAAM,YAAY,GAAG,CAAC,CAAC;AACvB,iBAAiB;AACJ,QAAA,WAAW,GAAG,CAAC,CAAC;AAE7B,oCAAoC;AACvB,QAAA,gBAAgB,GAAG,uBAAuB,CAAC;AAExD,UAAU;AACG,QAAA,0BAA0B,GAA+B;IACpE,gBAAgB;IAChB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,SAAS;KAClB;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,+BAA+B,GAAG,iCAAiC,CAAC;AAwBjF;;;;;GAKG;AACH;IAAqC,2CAAM;IAA3C;QAAA,qEA6OC;QA5OC,kBAAkB;QACX,UAAI,GAAG,YAAY,CAAC;QAE3B,WAAW;QACD,kBAAY,GAAiB,EAAE,CAAC;QAC1C,YAAY;QACJ,qBAAe,GAAW,IAAI,CAAC;QACvC,UAAU;QACF,mBAAa,GAA+B,kCAA0B,CAAC;;IAoOjF,CAAC;IAlOC;;OAEG;IACI,+BAAK,GAAZ;QACE,IAAM,IAAI,GAAG,UAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,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AAG,CAAC,EAAE;gBAC5B,QAAQ;gBACR,IAAM,YAAY,GAAG,KAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;oBACjD,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAK,MAAM,CAAC,IAAI,SAAI,MAAM,CAAC,IAAI,aAAU;oBAC7C,KAAK,sCACH,IAAI,EAAE,MAAM,CAAC,WAAW,IACrB,MAAM,CAAC,SAAS,KACnB,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,CAAC,GACL;iBACF,CAAC,CAAC;gBAEH,IAAM,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;gBAC1C,IAAI,IAAI,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC;aACpC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,wCAAc,GAAtB;QACE,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;SAC7B;IACH,CAAC;IAED;;;OAGG;IACI,iCAAO,GAAd;QACE,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;SAC/B;QACD,iBAAM,OAAO,WAAE,CAAC;IAClB,CAAC;IACH,sBAAC;AAAD,CAAC,AA7OD,CAAqC,WAAM,GA6O1C;AA7OY,0CAAe","sourcesContent":["import { Action, IGroup, Util } from '@antv/g2';\nimport { get, isNil, last, size } from '@antv/util';\nimport { Data } from '../../types';\nimport { DrillDownCfg } from '../../types/drill-down';\nimport { deepAssign } from '../../utils/deep-assign';\n\n// 面包屑文字和分割符'/'之间的距离\nconst PADDING = 4;\n// 面包屑位置距离树图的距离\nconst PADDING_LEFT = 0;\n// 面包屑位置距离树图的顶部距离\nexport const PADDING_TOP = 5;\n\n/** Group name of breadCrumb: 面包屑 */\nexport const BREAD_CRUMB_NAME = 'drilldown-bread-crumb';\n\n// 面包屑默认配置\nexport const DEFAULT_BREAD_CRUMB_CONFIG: DrillDownCfg['breadCrumb'] = {\n /** 位置,默认:左上角 */\n position: 'top-left',\n dividerText: '/',\n textStyle: {\n fontSize: 12,\n fill: 'rgba(0, 0, 0, 0.65)',\n cursor: 'pointer',\n },\n activeTextStyle: {\n fill: '#87B5FF',\n },\n};\n\n/**\n * hierarchy 数据转换的参数\n */\nexport const HIERARCHY_DATA_TRANSFORM_PARAMS = 'hierarchy-data-transform-params';\n\n/**\n * Hierarchy plot 节点的数据\n */\nexport type HierarchyNode<N = any /** 节点 */> = {\n /** 节点的原始数据,树型结构(todo 是否更正 key 为 origin) */\n data: { name: string; value?: any; children: { name: string; value?: any }[] };\n /** 在构建节点数据时候,增加的扩展配置, 用于存储 transformData 的入参配置 */\n [HIERARCHY_DATA_TRANSFORM_PARAMS]: object;\n /** 当前的层级结构,每一次下钻都会更新. 不是 unique */\n depth: number;\n /** 当前所处高度,depth + height = 总的层级 */\n height: number;\n parent: N;\n children: N[];\n};\n\ntype HistoryCache = {\n name: string;\n id: string;\n children: Data;\n}[];\n\n/**\n * @description 下钻交互的 action\n * @author liuzhenying\n *\n * 适用于:hierarchy plot\n */\nexport class DrillDownAction extends Action {\n /** Action name */\n public name = 'drill-down';\n\n // 存储历史下钻数据\n protected historyCache: HistoryCache = [];\n // 面包屑 group\n private breadCrumbGroup: IGroup = null;\n // 面包屑基础配置\n private breadCrumbCfg: DrillDownCfg['breadCrumb'] = DEFAULT_BREAD_CRUMB_CONFIG;\n\n /**\n * 点击事件, 下钻数据,并绘制面包屑\n */\n public click() {\n const data = get(this.context, ['event', 'data', 'data']);\n if (!data) return false;\n\n this.drill(data);\n this.drawBreadCrumb();\n }\n\n /**\n * 重置位置,初始化及触发 chart afterchangesize 回调时使用\n */\n public resetPosition() {\n // 当在第一层级未绘制面包屑,此时 changedata 触发 resetPosition 函数,需判断 this.breadCrumbGroup 是否存在\n if (!this.breadCrumbGroup) return;\n const coordinate = this.context.view.getCoordinate();\n const breadCrumbGroup = this.breadCrumbGroup;\n const bbox = breadCrumbGroup.getBBox();\n\n const { position } = this.getButtonCfg();\n\n // @todo 后续抽取一个函数来处理,以及增加 margin 或者 padding 的设置\n // 非 polar 的,需要使用 coordinate,除却图表组件\n let point = { x: coordinate.start.x, y: coordinate.end.y - (bbox.height + PADDING_TOP * 2) };\n if (coordinate.isPolar) {\n // 默认,左上角直接出发\n point = { x: 0, y: 0 };\n }\n if (position === 'bottom-left') {\n // 涉及到坐标反转的问题\n point = { x: coordinate.start.x, y: coordinate.start.y };\n }\n /** PADDING_LEFT, PADDING_TOP 与画布边缘的距离 */\n const matrix = Util.transform(null, [['t', point.x + PADDING_LEFT, point.y + bbox.height + PADDING_TOP]]);\n breadCrumbGroup.setMatrix(matrix);\n }\n\n /**\n * 返回上一层\n */\n public back(): void {\n if (size(this.historyCache)) {\n this.backTo(this.historyCache.slice(0, -1));\n }\n }\n\n /**\n * 重置\n */\n public reset(): void {\n if (this.historyCache[0]) {\n this.backTo(this.historyCache.slice(0, 1));\n }\n // 清空\n this.historyCache = [];\n this.hideCrumbGroup();\n }\n\n /**\n * 下钻数据并更新 view 显示层\n * @param nodeInfo 下钻数据\n */\n protected drill(nodeInfo: HierarchyNode) {\n const { view } = this.context;\n const transformData = get(view, ['interactions', 'drill-down', 'cfg', 'transformData'], (v) => v);\n\n // 重新 update 数据\n const drillData = transformData({ data: nodeInfo.data, ...nodeInfo[HIERARCHY_DATA_TRANSFORM_PARAMS] });\n view.changeData(drillData);\n\n // 存储历史记录\n const historyCache: HistoryCache = [];\n\n let node = nodeInfo;\n while (node) {\n const nodeData = node.data;\n historyCache.unshift({\n id: `${nodeData.name}_${node.height}_${node.depth}`,\n name: nodeData.name,\n // children 是实际数据\n children: transformData({ data: nodeData, ...nodeInfo[HIERARCHY_DATA_TRANSFORM_PARAMS] }),\n });\n node = node.parent;\n }\n\n this.historyCache = (this.historyCache || []).slice(0, -1).concat(historyCache);\n }\n\n /**\n * 回退事件,点击面包屑时触发\n * @param historyCache 当前要回退到的历史\n */\n protected backTo(historyCache: HistoryCache) {\n if (!historyCache || historyCache.length <= 0) {\n return;\n }\n\n const { view } = this.context;\n const data = last(historyCache).children; // 处理后的数组\n view.changeData(data);\n\n if (historyCache.length > 1) {\n this.historyCache = historyCache;\n this.drawBreadCrumb();\n } else {\n // 清空\n this.historyCache = [];\n this.hideCrumbGroup();\n }\n }\n\n /**\n * 获取 mix 默认的配置和用户配置\n */\n private getButtonCfg() {\n const { view } = this.context;\n const drillDownConfig: DrillDownCfg = get(view, ['interactions', 'drill-down', 'cfg', 'drillDownConfig']);\n\n return deepAssign(this.breadCrumbCfg, drillDownConfig?.breadCrumb, this.cfg);\n }\n\n /**\n * 显示面包屑\n */\n private drawBreadCrumb() {\n this.drawBreadCrumbGroup();\n this.resetPosition();\n this.breadCrumbGroup.show();\n }\n\n /**\n * 绘制 Button 和 文本\n */\n private drawBreadCrumbGroup() {\n const config = this.getButtonCfg();\n const cache = this.historyCache;\n\n // 初始化面包屑 group\n if (!this.breadCrumbGroup) {\n this.breadCrumbGroup = this.context.view.foregroundGroup.addGroup({\n name: BREAD_CRUMB_NAME,\n });\n } else {\n this.breadCrumbGroup.clear();\n }\n\n // 绘制面包屑\n let left = 0;\n cache.forEach((record, index) => {\n // 添加文本\n const textShape = this.breadCrumbGroup.addShape({\n type: 'text',\n id: record.id,\n name: `${BREAD_CRUMB_NAME}_${record.name}_text`,\n attrs: {\n text: index === 0 && !isNil(config.rootText) ? config.rootText : record.name,\n ...config.textStyle,\n x: left,\n y: 0,\n },\n });\n\n const textShapeBox = textShape.getBBox();\n left += textShapeBox.width + PADDING;\n\n // 增加文本事件\n textShape.on('click', (event) => {\n const targetId = event.target.get('id');\n if (targetId !== last(cache)?.id) {\n const newHistoryCache = cache.slice(0, cache.findIndex((d) => d.id === targetId) + 1);\n this.backTo(newHistoryCache);\n }\n });\n // active 效果内置\n textShape.on('mouseenter', (event) => {\n const targetId = event.target.get('id');\n if (targetId !== last(cache)?.id) {\n textShape.attr(config.activeTextStyle);\n } else {\n textShape.attr({ cursor: 'default' });\n }\n });\n textShape.on('mouseleave', () => {\n textShape.attr(config.textStyle);\n });\n\n if (index < cache.length - 1) {\n // 添加反斜杠\n const dividerShape = this.breadCrumbGroup.addShape({\n type: 'text',\n name: `${config.name}_${record.name}_divider`,\n attrs: {\n text: config.dividerText,\n ...config.textStyle,\n x: left,\n y: 0,\n },\n });\n\n const dividerBox = dividerShape.getBBox();\n left += dividerBox.width + PADDING;\n }\n });\n }\n\n /**\n * 隐藏面包屑\n */\n private hideCrumbGroup() {\n if (this.breadCrumbGroup) {\n this.breadCrumbGroup.hide();\n }\n }\n\n /**\n * @override\n * destroy: 销毁资源\n */\n public destroy() {\n if (this.breadCrumbGroup) {\n this.breadCrumbGroup.remove();\n }\n super.destroy();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"drill-down.js","sourceRoot":"","sources":["../../src/interactions/drill-down.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAC/D,mCAA0C;AAC1C,mDAAuD;AAEvD;;GAEG;AACH,SAAgB,YAAY,CAAC,OAAO;IAClC,IAAM,IAAI,GAAG,UAAG,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,OAAO,cAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5D,CAAC;AAHD,oCAGC;AAED;;GAEG;AACH,SAAS,QAAQ,CAAC,OAAO;IACvB,IAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IACxC,IAAA,WAAW,GAAK,UAAU,YAAf,CAAgB;IACnC,IAAI,WAAW,EAAE;QACT,IAAA,KAAW,OAAO,CAAC,KAAK,EAAtB,CAAC,OAAA,EAAE,CAAC,OAAkB,CAAC;QACzB,IAAA,KAA6B,UAAU,CAAC,MAAM,EAAzC,OAAO,OAAA,EAAK,OAAO,OAAsB,CAAC;QACrD,IAAM,CAAC,GAAG,UAAU,CAAC,SAAS,EAAE,GAAG,WAAW,CAAC;QAC/C,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAA,CAAC,OAAO,GAAG,CAAC,CAAC,EAAI,CAAC,CAAA,GAAG,SAAA,CAAC,OAAO,GAAG,CAAC,CAAC,EAAI,CAAC,CAAA,CAAC,CAAC;QACpE,OAAO,QAAQ,GAAG,CAAC,CAAC;KACrB;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,mBAAc,CAAC,mBAAmB,EAAE,4BAAe,CAAC,CAAC;AACrD,wBAAmB,CAAC,YAAY,EAAE;IAChC,UAAU,EAAE;QACV,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE;QACnF,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,gBAAgB,EAAE;QAC3D,kCAAkC;QAClC,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE;KAChF;IACD,KAAK,EAAE;QACL;YACE,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,CAAC,yBAAyB,CAAC;SACpC;QACD;YACE,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,CAAC,iCAAiC,CAAC;SAC5C;QACD;YACE,aAAa;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,CAAC,wBAAwB,CAAC;SACnC;KACF;CACF,CAAC,CAAC","sourcesContent":["import { registerInteraction, registerAction } from '@antv/g2';\nimport { get, isArray } from '@antv/util';\nimport { DrillDownAction } from './actions/drill-down';\n\n/**\n * 判断是否为父节点\n */\nexport function isParentNode(context) {\n const data = get(context, ['event', 'data', 'data'], {});\n return isArray(data.children) && data.children.length > 0;\n}\n\n/**\n * 判断是否在中心\n */\nfunction inCenter(context) {\n const coordinate = context.view.getCoordinate();\n const { innerRadius } = coordinate;\n if (innerRadius) {\n const { x, y } = context.event;\n const { x: centerX, y: centerY } = coordinate.center;\n const r = coordinate.getRadius() * innerRadius;\n const distance = Math.sqrt((centerX - x) ** 2 + (centerY - y) ** 2);\n return distance < r;\n }\n return false;\n}\n\nregisterAction('drill-down-action', DrillDownAction);\nregisterInteraction('drill-down', {\n showEnable: [\n { trigger: 'element:mouseenter', action: 'cursor:pointer', isEnable: isParentNode },\n { trigger: 'element:mouseleave', action: 'cursor:default' },\n // 中心处,肯定会触发 element:mouseleave 操作\n { trigger: 'element:mouseleave', action: 'cursor:pointer', isEnable: inCenter },\n ],\n start: [\n {\n trigger: 'element:click',\n isEnable: isParentNode,\n action: ['drill-down-action:click'],\n },\n {\n trigger: 'afterchangesize',\n action: ['drill-down-action:resetPosition'],\n },\n {\n // 点击中心,返回上一层\n trigger: 'click',\n isEnable: inCenter,\n action: ['drill-down-action:back'],\n },\n ],\n});\n"]}
1
+ {"version":3,"file":"drill-down.js","sourceRoot":"","sources":["../../src/interactions/drill-down.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAC/D,mCAA0C;AAC1C,mDAAuD;AAEvD;;GAEG;AACH,SAAgB,YAAY,CAAC,OAAO;IAClC,IAAM,IAAI,GAAG,UAAG,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,OAAO,cAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5D,CAAC;AAHD,oCAGC;AAED;;GAEG;AACH,SAAS,QAAQ,CAAC,OAAO;IACvB,IAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IACxC,IAAA,WAAW,GAAK,UAAU,YAAf,CAAgB;IACnC,IAAI,WAAW,E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antv/util';\nimport { DrillDownAction } from './actions/drill-down';\n\n/**\n * 判断是否为父节点\n */\nexport function isParentNode(context) {\n const data = get(context, ['event', 'data', 'data'], {});\n return isArray(data.children) && data.children.length > 0;\n}\n\n/**\n * 判断是否在中心\n */\nfunction inCenter(context) {\n const coordinate = context.view.getCoordinate();\n const { innerRadius } = coordinate;\n if (innerRadius) {\n const { x, y } = context.event;\n const { x: centerX, y: centerY } = coordinate.center;\n const r = coordinate.getRadius() * innerRadius;\n const distance = Math.sqrt((centerX - x) ** 2 + (centerY - y) ** 2);\n return distance < r;\n }\n return false;\n}\n\nregisterAction('drill-down-action', DrillDownAction);\nregisterInteraction('drill-down', {\n showEnable: [\n { trigger: 'element:mouseenter', action: 'cursor:pointer', isEnable: isParentNode },\n { trigger: 'element:mouseleave', action: 'cursor:default' },\n // 中心处,肯定会触发 element:mouseleave 操作\n { trigger: 'element:mouseleave', action: 'cursor:pointer', isEnable: inCenter },\n ],\n start: [\n {\n trigger: 'element:click',\n isEnable: isParentNode,\n action: ['drill-down-action:click'],\n },\n {\n trigger: 'afterchangesize',\n action: ['drill-down-action:resetPosition'],\n },\n {\n // 点击中心,返回上一层\n trigger: 'click',\n isEnable: inCenter,\n action: ['drill-down-action:back'],\n },\n ],\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"adaptor.js","sourceRoot":"","sources":["../../../src/plots/_template/adaptor.ts"],"names":[],"mappings":";;;AAAA,+CAA4E;AAE5E,qCAAmC;AAGnC;;;GAGG;AACH,SAAS,QAAQ,CAAC,MAA+B;IACvC,IAAA,KAAK,GAAc,MAAM,MAApB,EAAE,OAAO,GAAK,MAAM,QAAX,CAAY;IAC1B,IAAA,IAAI,GAAqB,OAAO,KAA5B,EAAE,MAAM,GAAa,OAAO,OAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;IAEzC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjB,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAI,MAAM,SAAI,MAAQ,CAAC,CAAC;IAEjD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,MAA+B;;IAC1C,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,KAAK,GAA4B,OAAO,MAAnC,EAAE,KAAK,GAAqB,OAAO,MAA5B,EAAE,MAAM,GAAa,OAAO,OAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;IAEjD,OAAO,YAAI,CACT,cAAK;QACH,GAAC,MAAM,IAAG,KAAK;QACf,GAAC,MAAM,IAAG,KAAK;YACf,CACH,CAAC,MAAM,CAAC,CAAC;AACZ,CAAC;AAVD,oBAUC;AACD;;;;GAIG;AACH,SAAgB,OAAO,CAAC,MAA+B;IACrD,0BAA0B;IAC1B,OAAO,YAAI,CACT,cAAK,EACL,QAAQ,EACR,IAAI,EACJ,oBAAW,EACX,kBAAS;IACT,uBAAuB;KACxB,CAAC,MAAM,CAAC,CAAC;AACZ,CAAC;AAVD,0BAUC","sourcesContent":["import { interaction, animation, theme, scale } from '../../adaptor/common';\nimport { Params } from '../../core/adaptor';\nimport { flow } from '../../utils';\nimport { TemplateOptions } from './types';\n\n/**\n * geometry 处理\n * @param params\n */\nfunction geometry(params: Params<TemplateOptions>): Params<TemplateOptions> {\n const { chart, options } = params;\n const { data, xField, yField } = options;\n\n chart.data(data);\n\n chart.interval().position(`${xField}*${yField}`);\n\n return params;\n}\n\n/**\n * meta 配置\n * @param params\n */\nexport function meta(params: Params<TemplateOptions>): Params<TemplateOptions> {\n const { options } = params;\n const { xAxis, yAxis, xField, yField } = options;\n\n return flow(\n scale({\n [xField]: xAxis,\n [yField]: yAxis,\n })\n )(params);\n}\n/**\n * 图适配器\n * @param chart\n * @param options\n */\nexport function adaptor(params: Params<TemplateOptions>) {\n // flow 的方式处理所有的配置到 G2 API\n return flow(\n theme,\n geometry,\n meta,\n interaction,\n animation\n // ... 其他的 adaptor flow\n )(params);\n}\n"]}
1
+ {"version":3,"file":"adaptor.js","sourceRoot":"","sources":["../../../src/plots/_template/adaptor.ts"],"names":[],"mappings":";;;AAAA,+CAA4E;AAE5E,qCAAmC;AAGnC;;;GAGG;AACH,SAAS,QAAQ,CAAC,MAA+B;IACvC,IAAA,KAAK,GAAc,MAAM,MAApB,EAAE,OAAO,GAAK,MAAM,QAAX,CAAY;IAC1B,IAAA,IAAI,GAAqB,OAAO,KAA5B,EAAE,MAAM,GAAa,OAAO,OAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;IAEzC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjB,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAI,MAAM,SAAI,MAAQ,CAAC,CAAC;IAEjD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,MAA+B;;IAC1C,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,KAAK,GAA4B,OAAO,MAAnC,EAAE,KAAK,GAAqB,OAAO,MAA5B,EAAE,MAAM,GAAa,OAAO,OAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;IAEjD,OAAO,YAAI,CACT,cAAK;QACH,GAAC,MAAM,IAAG,KAAK;QACf,GAAC,MAAM,IAAG,KAAK;YACf,CACH,CAAC,MAAM,CAAC,CAAC;AACZ,CAAC;AAVD,oBAUC;AACD;;;;GAIG;AACH,SAAgB,OAAO,CAAC,MAA+B;IACrD,0BAA0B;IAC1B,OAAO,YAAI,CACT,cAAK,EACL,QAAQ,EACR,IAAI,EACJ,oBAAW,EACX,kBAAS;IACT,uBAAuB;KACxB,CAAC,MAAM,CAAC,CAAC;AACZ,CAAC;AAVD,0BAUC","sourcesContent":["import { animation, interaction, scale, theme } from '../../adaptor/common';\nimport { Params } from '../../core/adaptor';\nimport { flow } from '../../utils';\nimport { TemplateOptions } from './types';\n\n/**\n * geometry 处理\n * @param params\n */\nfunction geometry(params: Params<TemplateOptions>): Params<TemplateOptions> {\n const { chart, options } = params;\n const { data, xField, yField } = options;\n\n chart.data(data);\n\n chart.interval().position(`${xField}*${yField}`);\n\n return params;\n}\n\n/**\n * meta 配置\n * @param params\n */\nexport function meta(params: Params<TemplateOptions>): Params<TemplateOptions> {\n const { options } = params;\n const { xAxis, yAxis, xField, yField } = options;\n\n return flow(\n scale({\n [xField]: xAxis,\n [yField]: yAxis,\n })\n )(params);\n}\n/**\n * 图适配器\n * @param chart\n * @param options\n */\nexport function adaptor(params: Params<TemplateOptions>) {\n // flow 的方式处理所有的配置到 G2 API\n return flow(\n theme,\n geometry,\n meta,\n interaction,\n animation\n // ... 其他的 adaptor flow\n )(params);\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { Plot } from '../../core/plot';
2
1
  import { Adaptor } from '../../core/adaptor';
2
+ import { Plot } from '../../core/plot';
3
3
  import { TemplateOptions } from './types';
4
4
  export type { TemplateOptions };
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plots/_template/index.ts"],"names":[],"mappings":";;;;AAAA,wCAAuC;AAGvC,qCAAoC;AAIpC;;GAEG;AACH;IAA8B,oCAAqB;IAAnD;QAAA,qEAUC;QATC,WAAW;QACJ,UAAI,GAAW,UAAU,CAAC;;IAQnC,CAAC;IANC;;OAEG;IACO,mCAAgB,GAA1B;QACE,OAAO,iBAAO,CAAC;IACjB,CAAC;IACH,eAAC;AAAD,CAAC,AAVD,CAA8B,WAAI,GAUjC;AAVY,4BAAQ","sourcesContent":["import { Plot } from '../../core/plot';\nimport { Adaptor } from '../../core/adaptor';\nimport { TemplateOptions } from './types';\nimport { adaptor } from './adaptor';\n\nexport type { TemplateOptions };\n\n/**\n * 这个是一个图表开发的 模板代码!\n */\nexport class Template extends Plot<TemplateOptions> {\n /** 图表类型 */\n public type: string = 'template';\n\n /**\n * 获取适配器\n */\n protected getSchemaAdaptor(): Adaptor<TemplateOptions> {\n return adaptor;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plots/_template/index.ts"],"names":[],"mappings":";;;;AACA,wCAAuC;AACvC,qCAAoC;AAKpC;;GAEG;AACH;IAA8B,oCAAqB;IAAnD;QAAA,qEAUC;QATC,WAAW;QACJ,UAAI,GAAW,UAAU,CAAC;;IAQnC,CAAC;IANC;;OAEG;IACO,mCAAgB,GAA1B;QACE,OAAO,iBAAO,CAAC;IACjB,CAAC;IACH,eAAC;AAAD,CAAC,AAVD,CAA8B,WAAI,GAUjC;AAVY,4BAAQ","sourcesContent":["import { Adaptor } from '../../core/adaptor';\nimport { Plot } from '../../core/plot';\nimport { adaptor } from './adaptor';\nimport { TemplateOptions } from './types';\n\nexport type { TemplateOptions };\n\n/**\n * 这个是一个图表开发的 模板代码!\n */\nexport class Template extends Plot<TemplateOptions> {\n /** 图表类型 */\n public type: string = 'template';\n\n /**\n * 获取适配器\n */\n protected getSchemaAdaptor(): Adaptor<TemplateOptions> {\n return adaptor;\n }\n}\n"]}
@@ -4,9 +4,8 @@ exports.adaptor = exports.meta = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var util_1 = require("@antv/util");
6
6
  var common_1 = require("../../adaptor/common");
7
- var utils_1 = require("../../utils");
8
7
  var geometries_1 = require("../../adaptor/geometries");
9
- var utils_2 = require("../../utils");
8
+ var utils_1 = require("../../utils");
10
9
  var percent_1 = require("../../utils/transform/percent");
11
10
  var adaptor_1 = require("../line/adaptor");
12
11
  Object.defineProperty(exports, "meta", { enumerable: true, get: function () { return adaptor_1.meta; } });
@@ -26,7 +25,7 @@ function geometry(params) {
26
25
  name: datum[seriesField] || datum[xField],
27
26
  value: (Number(datum[yField]) * 100).toFixed(2) + '%',
28
27
  }); } }, tooltip) : tooltip;
29
- var primary = utils_2.deepAssign({}, params, {
28
+ var primary = utils_1.deepAssign({}, params, {
30
29
  options: {
31
30
  area: { color: color, style: areaStyle },
32
31
  point: pointMapping && tslib_1.__assign({ color: color }, pointMapping),
@@ -41,7 +40,7 @@ function geometry(params) {
41
40
  // 线默认 2px (折线不能复用面积图的 state,因为 fill 和 stroke 不匹配)
42
41
  var lineParams = {
43
42
  chart: chart,
44
- options: utils_2.deepAssign({ line: { size: 2 } }, util_1.omit(options, ['state']), {
43
+ options: utils_1.deepAssign({ line: { size: 2 } }, util_1.omit(options, ['state']), {
45
44
  // 颜色保持一致,因为如果颜色不一致,会导致 tooltip 中元素重复。
46
45
  // 如果存在,才设置,否则为空
47
46
  line: lineMapping && tslib_1.__assign({ color: color }, lineMapping),
@@ -55,7 +54,7 @@ function geometry(params) {
55
54
  },
56
55
  }),
57
56
  };
58
- var pointParams = utils_2.deepAssign({}, primary, { options: { tooltip: false, state: pointState } });
57
+ var pointParams = utils_1.deepAssign({}, primary, { options: { tooltip: false, state: pointState } });
59
58
  // area geometry 处理
60
59
  geometries_1.area(primary);
61
60
  geometries_1.line(lineParams);
@@ -84,7 +83,7 @@ function label(params) {
84
83
  { type: 'path-adjust-position' },
85
84
  { type: 'point-adjust-position' },
86
85
  { type: 'limit-in-plot', cfg: { action: 'hide' } },
87
- ] }, utils_2.transformLabel(cfg)),
86
+ ] }, utils_1.transformLabel(cfg)),
88
87
  });
89
88
  }
90
89
  return params;
@@ -110,7 +109,7 @@ function adjust(params) {
110
109
  */
111
110
  function adaptor(params) {
112
111
  // flow 的方式处理所有的配置到 G2 API
113
- return utils_2.flow(common_1.theme, common_1.pattern('areaStyle'), common_1.transformations('rect'), geometry, adaptor_1.meta, adjust, adaptor_1.axis, adaptor_1.legend, common_1.tooltip, label, common_1.slider, common_1.annotation(), common_1.interaction, common_1.animation, common_1.limitInPlot)(params);
112
+ return utils_1.flow(common_1.theme, common_1.pattern('areaStyle'), common_1.transformations('rect'), geometry, adaptor_1.meta, adjust, adaptor_1.axis, adaptor_1.legend, common_1.tooltip, label, common_1.slider, common_1.annotation(), common_1.interaction, common_1.animation, common_1.limitInPlot)(params);
114
113
  }
115
114
  exports.adaptor = adaptor;
116
115
  //# sourceMappingURL=adaptor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adaptor.js","sourceRoot":"","sources":["../../../src/plots/area/adaptor.ts"],"names":[],"mappings":";;;;AACA,mCAAwC;AACxC,+CAU8B;AAC9B,qCAA2C;AAE3C,uDAA6D;AAC7D,qCAA+D;AAC/D,yDAAyE;AAEzE,2CAAqD;AAG5C,qFAHA,cAAI,OAGA;AAEb;;;GAGG;AACH,SAAS,QAAQ,CAAC,MAA2B;IACnC,IAAA,KAAK,GAAc,MAAM,MAApB,EAAE,OAAO,GAAK,MAAM,QAAX,CAAY;IAEhC,IAAA,IAAI,GAWF,OAAO,KAXL,EACJ,SAAS,GAUP,OAAO,UAVA,EACT,KAAK,GASH,OAAO,MATJ,EACE,YAAY,GAQjB,OAAO,MARU,EACb,WAAW,GAOf,OAAO,KAPQ,EACjB,SAAS,GAMP,OAAO,UANA,EACT,MAAM,GAKJ,OAAO,OALH,EACN,MAAM,GAIJ,OAAO,OAJH,EACN,OAAO,GAGL,OAAO,QAHF,EACP,WAAW,GAET,OAAO,YAFE,EACX,WAAW,GACT,OAAO,YADE,CACD;IACZ,IAAM,UAAU,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC;IAEvC,IAAM,SAAS,GAAG,kCAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACpF,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,gCAAgC;IAChC,IAAM,cAAc,GAAG,SAAS;QAC9B,CAAC,oBACG,SAAS,EAAE,UAAC,KAAY,IAAK,OAAA,CAAC;gBAC5B,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC;gBACzC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,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C,MAAM,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAC,MAA2B;IACjD,0BAA0B;IAC1B,OAAO,YAAI,CACT,cAAK,EACL,gBAAO,CAAC,WAAW,CAAC,EACpB,wBAAe,CAAC,MAAM,CAAC,EACvB,QAAQ,EACR,cAAI,EACJ,MAAM,EACN,cAAI,EACJ,gBAAM,EACN,gBAAO,EACP,KAAK,EACL,eAAM,EACN,mBAAU,EAAE,EACZ,oBAAW,EACX,kBAAS,EACT,oBAAW,CACZ,CAAC,MAAM,CAAC,CAAC;AACZ,CAAC;AAnBD,0BAmBC","sourcesContent":["import { Geometry } from '@antv/g2';\nimport { each, omit } from '@antv/util';\nimport {\n tooltip,\n slider,\n interaction,\n animation,\n theme,\n annotation,\n limitInPlot,\n pattern,\n transformations,\n} from '../../adaptor/common';\nimport { findGeometry } from '../../utils';\nimport { Params } from '../../core/adaptor';\nimport { area, point, line } from '../../adaptor/geometries';\nimport { flow, transformLabel, deepAssign } from '../../utils';\nimport { getDataWhetherPercentage } from '../../utils/transform/percent';\nimport { Datum } from '../../types';\nimport { meta, legend, axis } from '../line/adaptor';\nimport { AreaOptions } from './types';\n\nexport { meta };\n\n/**\n * geometry 处理\n * @param params\n */\nfunction geometry(params: Params<AreaOptions>): Params<AreaOptions> {\n const { chart, options } = params;\n const {\n data,\n areaStyle,\n color,\n point: pointMapping,\n line: lineMapping,\n isPercent,\n xField,\n yField,\n tooltip,\n seriesField,\n startOnZero,\n } = options;\n const pointState = pointMapping?.state;\n\n const chartData = getDataWhetherPercentage(data, yField, xField, yField, isPercent);\n chart.data(chartData);\n // 百分比堆积图,默认会给一个 % 格式化逻辑, 用户可自定义\n const tooltipOptions = isPercent\n ? {\n formatter: (datum: Datum) => ({\n name: datum[seriesField] || datum[xField],\n value: (Number(datum[yField]) * 100).toFixed(2) + '%',\n }),\n ...tooltip,\n }\n : tooltip;\n const primary = deepAssign({}, params, {\n options: {\n area: { color, style: areaStyle },\n point: pointMapping && {\n color,\n ...pointMapping,\n },\n tooltip: tooltipOptions,\n // label 不传递给各个 geometry adaptor,由 label adaptor 处理\n label: undefined,\n args: {\n startOnZero,\n },\n },\n });\n // 线默认 2px (折线不能复用面积图的 state,因为 fill 和 stroke 不匹配)\n const lineParams = {\n chart,\n options: deepAssign({ line: { size: 2 } }, omit(options as any, ['state']), {\n // 颜色保持一致,因为如果颜色不一致,会导致 tooltip 中元素重复。\n // 如果存在,才设置,否则为空\n line: lineMapping && {\n color,\n ...lineMapping,\n },\n sizeField: seriesField,\n state: lineMapping?.state,\n tooltip: false,\n // label 不传递给各个 geometry adaptor,由 label adaptor 处理\n label: undefined,\n args: {\n startOnZero,\n },\n }),\n };\n const pointParams = deepAssign({}, primary, { options: { tooltip: false, state: pointState } });\n\n // area geometry 处理\n area(primary);\n line(lineParams);\n point(pointParams);\n\n return params;\n}\n\n/**\n * 数据标签\n * @param params\n */\nfunction label(params: Params<AreaOptions>): Params<AreaOptions> {\n const { chart, options } = params;\n const { label, yField } = options;\n\n const areaGeometry = findGeometry(chart, 'area');\n\n // label 为 false, 空 则不显示 label\n if (!label) {\n areaGeometry.label(false);\n } else {\n const { callback, ...cfg } = label;\n areaGeometry.label({\n fields: [yField],\n callback,\n cfg: {\n layout: [\n { type: 'limit-in-plot' },\n { type: 'path-adjust-position' },\n { type: 'point-adjust-position' },\n { type: 'limit-in-plot', cfg: { action: 'hide' } },\n ],\n ...transformLabel(cfg),\n },\n });\n }\n\n return params;\n}\n\n/**\n * 处理 adjust\n * @param params\n */\nfunction adjust(params: Params<AreaOptions>): Params<AreaOptions> {\n const { chart, options } = params;\n const { isStack, isPercent, seriesField } = options;\n if ((isPercent || isStack) && seriesField) {\n each(chart.geometries, (g: Geometry) => {\n g.adjust('stack');\n });\n }\n\n return params;\n}\n\n/**\n * 折线图适配器\n * @param chart\n * @param options\n */\nexport function adaptor(params: Params<AreaOptions>) {\n // flow 的方式处理所有的配置到 G2 API\n return flow(\n theme,\n pattern('areaStyle'),\n transformations('rect'),\n geometry,\n meta,\n adjust,\n axis,\n legend,\n tooltip,\n label,\n slider,\n annotation(),\n interaction,\n animation,\n limitInPlot\n )(params);\n}\n"]}
1
+ {"version":3,"file":"adaptor.js","sourceRoot":"","sources":["../../../src/plots/area/adaptor.ts"],"names":[],"mappings":";;;;AACA,mCAAwC;AACxC,+CAU8B;AAC9B,uDAA6D;AAG7D,qCAA6E;AAC7E,yDAAyE;AACzE,2CAAqD;AAG5C,qFAHc,cAAI,OAGd;AAEb;;;GAGG;AACH,SAAS,QAAQ,CAAC,MAA2B;IACnC,IAAA,KAAK,GAAc,MAAM,MAApB,EAAE,OAAO,GAAK,MAAM,QAAX,CAAY;IAEhC,IAAA,IAAI,GAWF,OAAO,KAXL,EACJ,SAAS,GAUP,OAAO,UAVA,EACT,KAAK,GASH,OAAO,MATJ,EACE,YAAY,GAQjB,OAAO,MARU,EACb,WAAW,GAOf,OAAO,KAPQ,EACjB,SAAS,GAMP,OAAO,UANA,EACT,MAAM,GAKJ,OAAO,OALH,EACN,MAAM,GAIJ,OAAO,OAJH,EACN,OAAO,GAGL,OAAO,QAHF,EACP,WAAW,GAET,OAAO,YAFE,EACX,WAAW,GACT,OAAO,YADE,CACD;IACZ,IAAM,UAAU,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC;IAEvC,IAAM,SAAS,GAAG,kCAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACpF,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,gCAAgC;IAChC,IAAM,cAAc,GAAG,SAAS;QAC9B,CAAC,oBACG,SAAS,EAAE,UAAC,KAAY,IAAK,OAAA,CAAC;gBAC5B,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC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AAS,IAAI,OAAO,CAAC,IAAI,WAAW,EAAE;QACzC,WAAI,CAAC,KAAK,CAAC,UAAU,EAAE,UAAC,CAAW;YACjC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAC,MAA2B;IACjD,0BAA0B;IAC1B,OAAO,YAAI,CACT,cAAK,EACL,gBAAO,CAAC,WAAW,CAAC,EACpB,wBAAe,CAAC,MAAM,CAAC,EACvB,QAAQ,EACR,cAAI,EACJ,MAAM,EACN,cAAI,EACJ,gBAAM,EACN,gBAAO,EACP,KAAK,EACL,eAAM,EACN,mBAAU,EAAE,EACZ,oBAAW,EACX,kBAAS,EACT,oBAAW,CACZ,CAAC,MAAM,CAAC,CAAC;AACZ,CAAC;AAnBD,0BAmBC","sourcesContent":["import { Geometry } from '@antv/g2';\nimport { each, omit } from '@antv/util';\nimport {\n animation,\n annotation,\n interaction,\n limitInPlot,\n pattern,\n slider,\n theme,\n tooltip,\n transformations,\n} from '../../adaptor/common';\nimport { area, line, point } from '../../adaptor/geometries';\nimport { Params } from '../../core/adaptor';\nimport { Datum } from '../../types';\nimport { deepAssign, findGeometry, flow, transformLabel } from '../../utils';\nimport { getDataWhetherPercentage } from '../../utils/transform/percent';\nimport { axis, legend, meta } from '../line/adaptor';\nimport { AreaOptions } from './types';\n\nexport { meta };\n\n/**\n * geometry 处理\n * @param params\n */\nfunction geometry(params: Params<AreaOptions>): Params<AreaOptions> {\n const { chart, options } = params;\n const {\n data,\n areaStyle,\n color,\n point: pointMapping,\n line: lineMapping,\n isPercent,\n xField,\n yField,\n tooltip,\n seriesField,\n startOnZero,\n } = options;\n const pointState = pointMapping?.state;\n\n const chartData = getDataWhetherPercentage(data, yField, xField, yField, isPercent);\n chart.data(chartData);\n // 百分比堆积图,默认会给一个 % 格式化逻辑, 用户可自定义\n const tooltipOptions = isPercent\n ? {\n formatter: (datum: Datum) => ({\n name: datum[seriesField] || datum[xField],\n value: (Number(datum[yField]) * 100).toFixed(2) + '%',\n }),\n ...tooltip,\n }\n : tooltip;\n const primary = deepAssign({}, params, {\n options: {\n area: { color, style: areaStyle },\n point: pointMapping && {\n color,\n ...pointMapping,\n },\n tooltip: tooltipOptions,\n // label 不传递给各个 geometry adaptor,由 label adaptor 处理\n label: undefined,\n args: {\n startOnZero,\n },\n },\n });\n // 线默认 2px (折线不能复用面积图的 state,因为 fill 和 stroke 不匹配)\n const lineParams = {\n chart,\n options: deepAssign({ line: { size: 2 } }, omit(options as any, ['state']), {\n // 颜色保持一致,因为如果颜色不一致,会导致 tooltip 中元素重复。\n // 如果存在,才设置,否则为空\n line: lineMapping && {\n color,\n ...lineMapping,\n },\n sizeField: seriesField,\n state: lineMapping?.state,\n tooltip: false,\n // label 不传递给各个 geometry adaptor,由 label adaptor 处理\n label: undefined,\n args: {\n startOnZero,\n },\n }),\n };\n const pointParams = deepAssign({}, primary, { options: { tooltip: false, state: pointState } });\n\n // area geometry 处理\n area(primary);\n line(lineParams);\n point(pointParams);\n\n return params;\n}\n\n/**\n * 数据标签\n * @param params\n */\nfunction label(params: Params<AreaOptions>): Params<AreaOptions> {\n const { chart, options } = params;\n const { label, yField } = options;\n\n const areaGeometry = findGeometry(chart, 'area');\n\n // label 为 false, 空 则不显示 label\n if (!label) {\n areaGeometry.label(false);\n } else {\n const { callback, ...cfg } = label;\n areaGeometry.label({\n fields: [yField],\n callback,\n cfg: {\n layout: [\n { type: 'limit-in-plot' },\n { type: 'path-adjust-position' },\n { type: 'point-adjust-position' },\n { type: 'limit-in-plot', cfg: { action: 'hide' } },\n ],\n ...transformLabel(cfg),\n },\n });\n }\n\n return params;\n}\n\n/**\n * 处理 adjust\n * @param params\n */\nfunction adjust(params: Params<AreaOptions>): Params<AreaOptions> {\n const { chart, options } = params;\n const { isStack, isPercent, seriesField } = options;\n if ((isPercent || isStack) && seriesField) {\n each(chart.geometries, (g: Geometry) => {\n g.adjust('stack');\n });\n }\n\n return params;\n}\n\n/**\n * 折线图适配器\n * @param chart\n * @param options\n */\nexport function adaptor(params: Params<AreaOptions>) {\n // flow 的方式处理所有的配置到 G2 API\n return flow(\n theme,\n pattern('areaStyle'),\n transformations('rect'),\n geometry,\n meta,\n adjust,\n axis,\n legend,\n tooltip,\n label,\n slider,\n annotation(),\n interaction,\n animation,\n limitInPlot\n )(params);\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { Plot } from '../../core/plot';
2
1
  import { Adaptor } from '../../core/adaptor';
2
+ import { Plot } from '../../core/plot';
3
3
  import { AreaOptions } from './types';
4
4
  export type { AreaOptions };
5
5
  export declare class Area extends Plot<AreaOptions> {