@antv/g2 5.0.0-alpha.3 → 5.0.0-alpha.4

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 (1479) hide show
  1. package/dist/g2-lite.min.js +2 -2
  2. package/dist/g2.min.js +2 -2
  3. package/esm/animation/fadeIn.d.ts +2 -2
  4. package/esm/animation/fadeOut.d.ts +2 -2
  5. package/esm/animation/growInX.d.ts +7 -0
  6. package/esm/animation/growInX.js +26 -0
  7. package/esm/animation/growInX.js.map +1 -0
  8. package/esm/animation/growInY.d.ts +7 -0
  9. package/esm/animation/growInY.js +26 -0
  10. package/esm/animation/growInY.js.map +1 -0
  11. package/esm/animation/index.d.ts +6 -0
  12. package/esm/animation/index.js +3 -0
  13. package/esm/animation/index.js.map +1 -1
  14. package/esm/animation/morphing.d.ts +4 -4
  15. package/esm/animation/morphing.js +49 -12
  16. package/esm/animation/morphing.js.map +1 -1
  17. package/esm/animation/pathIn.d.ts +7 -0
  18. package/esm/animation/pathIn.js +18 -0
  19. package/esm/animation/pathIn.js.map +1 -0
  20. package/esm/animation/scaleInX.d.ts +2 -2
  21. package/esm/animation/scaleInY.d.ts +2 -2
  22. package/esm/animation/scaleOutX.d.ts +2 -2
  23. package/esm/animation/scaleOutY.d.ts +2 -2
  24. package/esm/animation/types.d.ts +6 -0
  25. package/esm/animation/types.js +2 -0
  26. package/esm/animation/types.js.map +1 -0
  27. package/esm/animation/waveIn.d.ts +2 -2
  28. package/esm/animation/waveIn.js +28 -2
  29. package/esm/animation/waveIn.js.map +1 -1
  30. package/esm/animation/zoomIn.d.ts +2 -2
  31. package/esm/animation/zoomOut.d.ts +2 -2
  32. package/esm/api/chart.d.ts +8 -4
  33. package/esm/api/chart.js +19 -3
  34. package/esm/api/chart.js.map +1 -1
  35. package/esm/api/composition/facetCircle.d.ts +3 -6
  36. package/esm/api/composition/facetCircle.js +2 -5
  37. package/esm/api/composition/facetCircle.js.map +1 -1
  38. package/esm/api/composition/facetRect.d.ts +3 -8
  39. package/esm/api/composition/facetRect.js +2 -7
  40. package/esm/api/composition/facetRect.js.map +1 -1
  41. package/esm/api/composition/geoPath.d.ts +21 -0
  42. package/esm/api/composition/geoPath.js +30 -0
  43. package/esm/api/composition/geoPath.js.map +1 -0
  44. package/esm/api/composition/geoView.d.ts +21 -0
  45. package/esm/api/composition/geoView.js +29 -0
  46. package/esm/api/composition/geoView.js.map +1 -0
  47. package/esm/api/composition/index.d.ts +7 -1
  48. package/esm/api/composition/index.js +5 -1
  49. package/esm/api/composition/index.js.map +1 -1
  50. package/esm/api/composition/repeatMatrix.d.ts +3 -6
  51. package/esm/api/composition/repeatMatrix.js +2 -5
  52. package/esm/api/composition/repeatMatrix.js.map +1 -1
  53. package/esm/api/composition/spaceFlex.d.ts +1 -5
  54. package/esm/api/composition/spaceFlex.js +1 -8
  55. package/esm/api/composition/spaceFlex.js.map +1 -1
  56. package/esm/api/composition/spaceLayer.d.ts +1 -2
  57. package/esm/api/composition/spaceLayer.js +1 -5
  58. package/esm/api/composition/spaceLayer.js.map +1 -1
  59. package/esm/api/composition/timingKeyframe.d.ts +2 -7
  60. package/esm/api/composition/timingKeyframe.js +1 -8
  61. package/esm/api/composition/timingKeyframe.js.map +1 -1
  62. package/esm/api/composition/view.d.ts +7 -8
  63. package/esm/api/composition/view.js +6 -7
  64. package/esm/api/composition/view.js.map +1 -1
  65. package/esm/api/mark/index.d.ts +17 -1
  66. package/esm/api/mark/index.js +9 -1
  67. package/esm/api/mark/index.js.map +1 -1
  68. package/esm/api/mark/mark.d.ts +49 -1
  69. package/esm/api/mark/mark.js +74 -11
  70. package/esm/api/mark/mark.js.map +1 -1
  71. package/esm/api/mark/types.d.ts +4 -12
  72. package/esm/api/props.d.ts +1 -1
  73. package/esm/api/types.d.ts +7 -7
  74. package/esm/component/axis.d.ts +2 -2
  75. package/esm/component/axis.js +23 -25
  76. package/esm/component/axis.js.map +1 -1
  77. package/esm/component/axisX.d.ts +1 -1
  78. package/esm/component/axisY.d.ts +1 -1
  79. package/esm/component/legendCategory.d.ts +2 -2
  80. package/esm/component/legendCategory.js +2 -2
  81. package/esm/component/legendCategory.js.map +1 -1
  82. package/esm/component/legendContinuous.d.ts +1 -1
  83. package/esm/component/title.d.ts +1 -1
  84. package/esm/component/utils.d.ts +1 -1
  85. package/esm/composition/facetCircle.d.ts +1 -1
  86. package/esm/composition/facetCircle.js +2 -2
  87. package/esm/composition/facetCircle.js.map +1 -1
  88. package/esm/composition/facetRect.d.ts +2 -2
  89. package/esm/composition/facetRect.js +8 -10
  90. package/esm/composition/facetRect.js.map +1 -1
  91. package/esm/composition/mark.d.ts +1 -1
  92. package/esm/composition/mark.js +3 -3
  93. package/esm/composition/mark.js.map +1 -1
  94. package/esm/composition/repeatMatrix.d.ts +1 -1
  95. package/esm/composition/repeatMatrix.js +4 -4
  96. package/esm/composition/repeatMatrix.js.map +1 -1
  97. package/esm/composition/spaceFlex.d.ts +1 -1
  98. package/esm/composition/spaceLayer.d.ts +1 -1
  99. package/esm/composition/timingKeyframe.d.ts +1 -1
  100. package/esm/composition/timingKeyframe.js +7 -8
  101. package/esm/composition/timingKeyframe.js.map +1 -1
  102. package/esm/composition/utils.d.ts +1 -1
  103. package/esm/composition/view.d.ts +1 -1
  104. package/esm/coordinate/cartesian.d.ts +1 -1
  105. package/esm/coordinate/fisheye.d.ts +1 -1
  106. package/esm/coordinate/fisheyeX.d.ts +1 -1
  107. package/esm/coordinate/fisheyeY.d.ts +1 -1
  108. package/esm/coordinate/helix.d.ts +1 -1
  109. package/esm/coordinate/parallel.d.ts +1 -1
  110. package/esm/coordinate/polar.d.ts +1 -1
  111. package/esm/coordinate/radial.d.ts +1 -1
  112. package/esm/coordinate/reflect.d.ts +1 -1
  113. package/esm/coordinate/reflectX.d.ts +1 -1
  114. package/esm/coordinate/reflectY.d.ts +1 -1
  115. package/esm/coordinate/theta.d.ts +1 -1
  116. package/esm/coordinate/transpose.d.ts +1 -1
  117. package/esm/data/arc.d.ts +1 -1
  118. package/esm/data/cluster.d.ts +1 -1
  119. package/esm/data/custom.d.ts +1 -1
  120. package/esm/data/fetch.d.ts +1 -1
  121. package/esm/data/fetch.js.map +1 -1
  122. package/esm/data/filter.d.ts +9 -0
  123. package/esm/data/filter.js +13 -0
  124. package/esm/data/filter.js.map +1 -0
  125. package/esm/data/fold.d.ts +1 -1
  126. package/esm/data/index.d.ts +4 -2
  127. package/esm/data/index.js +2 -1
  128. package/esm/data/index.js.map +1 -1
  129. package/esm/data/inline.d.ts +1 -1
  130. package/esm/data/join.d.ts +7 -0
  131. package/esm/data/join.js +22 -0
  132. package/esm/data/join.js.map +1 -0
  133. package/esm/data/map.d.ts +1 -1
  134. package/esm/data/pick.d.ts +1 -1
  135. package/esm/data/rename.d.ts +1 -1
  136. package/esm/data/rename.js +2 -3
  137. package/esm/data/rename.js.map +1 -1
  138. package/esm/data/sankey.d.ts +1 -1
  139. package/esm/data/sortBy.d.ts +1 -1
  140. package/esm/data/subset.d.ts +1 -1
  141. package/esm/data/tree.d.ts +1 -1
  142. package/esm/data/utils/arc/types.d.ts +2 -2
  143. package/esm/data/utils/flow.d.ts +1 -1
  144. package/esm/data/wordCloud.d.ts +1 -1
  145. package/esm/encode/column.d.ts +1 -1
  146. package/esm/encode/constant.d.ts +1 -1
  147. package/esm/encode/field.d.ts +1 -1
  148. package/esm/encode/transform.d.ts +1 -1
  149. package/esm/geo/d3-projection.d.ts +1 -0
  150. package/esm/geo/d3-projection.js +2 -0
  151. package/esm/geo/d3-projection.js.map +1 -0
  152. package/esm/geo/geoPath.d.ts +7 -0
  153. package/esm/geo/geoPath.js +36 -0
  154. package/esm/geo/geoPath.js.map +1 -0
  155. package/esm/geo/geoView.d.ts +7 -0
  156. package/esm/geo/geoView.js +215 -0
  157. package/esm/geo/geoView.js.map +1 -0
  158. package/esm/geo/index.d.ts +9 -0
  159. package/esm/geo/index.js +8 -0
  160. package/esm/geo/index.js.map +1 -0
  161. package/esm/interaction/action/service/elementSelection.d.ts +1 -1
  162. package/esm/interaction/action/service/elementSelection.js +1 -1
  163. package/esm/interaction/action/service/elementSelection.js.map +1 -1
  164. package/esm/interaction/action/service/fisheyeFocus.d.ts +1 -1
  165. package/esm/interaction/action/service/legendItemSelection.d.ts +1 -1
  166. package/esm/interaction/action/service/recordCurrentPoint.d.ts +1 -1
  167. package/esm/interaction/action/service/recordPoint.d.ts +1 -1
  168. package/esm/interaction/action/service/recordRegion.d.ts +1 -1
  169. package/esm/interaction/action/service/recordState.d.ts +1 -1
  170. package/esm/interaction/action/service/recordTip.d.ts +1 -1
  171. package/esm/interaction/action/service/surfacePointSelection.d.ts +1 -1
  172. package/esm/interaction/action/service/triggerInfoSelection.d.ts +1 -1
  173. package/esm/interaction/action/transformer/activeElement.d.ts +1 -1
  174. package/esm/interaction/action/transformer/activeRegion.d.ts +1 -1
  175. package/esm/interaction/action/transformer/button.d.ts +1 -1
  176. package/esm/interaction/action/transformer/cursor.d.ts +1 -1
  177. package/esm/interaction/action/transformer/filter.d.ts +2 -2
  178. package/esm/interaction/action/transformer/filter.js +6 -4
  179. package/esm/interaction/action/transformer/filter.js.map +1 -1
  180. package/esm/interaction/action/transformer/filterElement.d.ts +1 -1
  181. package/esm/interaction/action/transformer/highlightElement.d.ts +1 -1
  182. package/esm/interaction/action/transformer/mask.d.ts +1 -1
  183. package/esm/interaction/action/transformer/move.d.ts +1 -1
  184. package/esm/interaction/action/transformer/plot.d.ts +1 -1
  185. package/esm/interaction/action/transformer/poptip.d.ts +1 -1
  186. package/esm/interaction/action/transformer/setItemState.d.ts +1 -1
  187. package/esm/interaction/action/transformer/tooltip.d.ts +1 -1
  188. package/esm/interaction/builtin/activeRegion.d.ts +1 -1
  189. package/esm/interaction/builtin/brush.d.ts +1 -1
  190. package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
  191. package/esm/interaction/builtin/brushVisible.d.ts +1 -1
  192. package/esm/interaction/builtin/elementActive.d.ts +1 -1
  193. package/esm/interaction/builtin/elementHighlight.d.ts +1 -1
  194. package/esm/interaction/builtin/elementHighlightByColor.d.ts +5 -3
  195. package/esm/interaction/builtin/elementHighlightByColor.js +1 -1
  196. package/esm/interaction/builtin/elementHighlightByColor.js.map +1 -1
  197. package/esm/interaction/builtin/elementHighlightByX.d.ts +5 -3
  198. package/esm/interaction/builtin/elementHighlightByX.js +1 -1
  199. package/esm/interaction/builtin/elementHighlightByX.js.map +1 -1
  200. package/esm/interaction/builtin/elementListHighlight.d.ts +1 -1
  201. package/esm/interaction/builtin/elementSelected.d.ts +1 -1
  202. package/esm/interaction/builtin/ellipsisText.d.ts +1 -1
  203. package/esm/interaction/builtin/fisheye.d.ts +1 -1
  204. package/esm/interaction/builtin/legendActive.d.ts +1 -1
  205. package/esm/interaction/builtin/legendHighlight.d.ts +1 -1
  206. package/esm/interaction/builtin/tooltip.d.ts +9 -5
  207. package/esm/interaction/index.d.ts +4 -3
  208. package/esm/interaction/index.js +4 -3
  209. package/esm/interaction/index.js.map +1 -1
  210. package/esm/interaction/interactor/mousePosition.d.ts +1 -1
  211. package/esm/interaction/interactor/touchPosition.d.ts +1 -1
  212. package/esm/interaction/native/chartIndex.js +6 -2
  213. package/esm/interaction/native/chartIndex.js.map +1 -1
  214. package/esm/interaction/native/elementHighlight.d.ts +10 -0
  215. package/esm/interaction/native/{elementActive.js → elementHighlight.js} +9 -9
  216. package/esm/interaction/native/elementHighlight.js.map +1 -0
  217. package/esm/interaction/native/elementHighlightByColor.d.ts +4 -0
  218. package/esm/interaction/native/elementHighlightByColor.js +12 -0
  219. package/esm/interaction/native/elementHighlightByColor.js.map +1 -0
  220. package/esm/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
  221. package/esm/interaction/native/elementHighlightByX.js +13 -0
  222. package/esm/interaction/native/elementHighlightByX.js.map +1 -0
  223. package/esm/interaction/native/elementSelect.js +2 -2
  224. package/esm/interaction/native/elementSelect.js.map +1 -1
  225. package/esm/interaction/native/elementSelectByColor.js +2 -2
  226. package/esm/interaction/native/elementSelectByColor.js.map +1 -1
  227. package/esm/interaction/native/elementSelectByX.js +2 -2
  228. package/esm/interaction/native/elementSelectByX.js.map +1 -1
  229. package/esm/interaction/native/fisheye.js +8 -5
  230. package/esm/interaction/native/fisheye.js.map +1 -1
  231. package/esm/interaction/native/tooltip.d.ts +11 -0
  232. package/esm/interaction/native/tooltip.js +279 -0
  233. package/esm/interaction/native/tooltip.js.map +1 -0
  234. package/esm/interaction/native/utils.d.ts +1 -1
  235. package/esm/interaction/native/utils.js +2 -2
  236. package/esm/interaction/native/utils.js.map +1 -1
  237. package/esm/interaction/types.d.ts +16 -16
  238. package/esm/label-transform/dodgeY.d.ts +1 -1
  239. package/esm/label-transform/dodgeY.js +9 -1
  240. package/esm/label-transform/dodgeY.js.map +1 -1
  241. package/esm/label-transform/hideOverlap.d.ts +1 -1
  242. package/esm/label-transform/hideOverlap.js +14 -4
  243. package/esm/label-transform/hideOverlap.js.map +1 -1
  244. package/esm/label-transform/index.d.ts +4 -0
  245. package/esm/label-transform/index.js +2 -0
  246. package/esm/label-transform/index.js.map +1 -1
  247. package/esm/label-transform/spider.d.ts +7 -0
  248. package/esm/label-transform/spider.js +30 -0
  249. package/esm/label-transform/spider.js.map +1 -0
  250. package/esm/label-transform/surround.d.ts +7 -0
  251. package/esm/label-transform/surround.js +30 -0
  252. package/esm/label-transform/surround.js.map +1 -0
  253. package/esm/mark/area.d.ts +1 -1
  254. package/esm/mark/area.js +9 -8
  255. package/esm/mark/area.js.map +1 -1
  256. package/esm/mark/box.d.ts +1 -1
  257. package/esm/mark/box.js +7 -9
  258. package/esm/mark/box.js.map +1 -1
  259. package/esm/mark/boxplot.d.ts +4 -0
  260. package/esm/mark/boxplot.js +104 -0
  261. package/esm/mark/boxplot.js.map +1 -0
  262. package/esm/mark/cell.d.ts +1 -1
  263. package/esm/mark/cell.js +4 -8
  264. package/esm/mark/cell.js.map +1 -1
  265. package/esm/mark/connector.d.ts +1 -1
  266. package/esm/mark/connector.js +2 -2
  267. package/esm/mark/connector.js.map +1 -1
  268. package/esm/mark/forceGraph.d.ts +4 -0
  269. package/esm/mark/forceGraph.js +95 -0
  270. package/esm/mark/forceGraph.js.map +1 -0
  271. package/esm/mark/image.d.ts +1 -1
  272. package/esm/mark/image.js +12 -9
  273. package/esm/mark/image.js.map +1 -1
  274. package/esm/mark/index.d.ts +16 -0
  275. package/esm/mark/index.js +9 -0
  276. package/esm/mark/index.js.map +1 -1
  277. package/esm/mark/interval.d.ts +1 -1
  278. package/esm/mark/interval.js +7 -8
  279. package/esm/mark/interval.js.map +1 -1
  280. package/esm/mark/line.d.ts +1 -1
  281. package/esm/mark/line.js +13 -9
  282. package/esm/mark/line.js.map +1 -1
  283. package/esm/mark/lineX.d.ts +1 -1
  284. package/esm/mark/lineX.js +5 -2
  285. package/esm/mark/lineX.js.map +1 -1
  286. package/esm/mark/lineY.d.ts +1 -1
  287. package/esm/mark/lineY.js +5 -2
  288. package/esm/mark/lineY.js.map +1 -1
  289. package/esm/mark/link.d.ts +1 -1
  290. package/esm/mark/link.js +4 -8
  291. package/esm/mark/link.js.map +1 -1
  292. package/esm/mark/pack.d.ts +4 -0
  293. package/esm/mark/pack.js +81 -0
  294. package/esm/mark/pack.js.map +1 -0
  295. package/esm/mark/path.d.ts +7 -0
  296. package/esm/mark/path.js +24 -0
  297. package/esm/mark/path.js.map +1 -0
  298. package/esm/mark/point.d.ts +1 -1
  299. package/esm/mark/point.js +31 -28
  300. package/esm/mark/point.js.map +1 -1
  301. package/esm/mark/polygon.d.ts +1 -1
  302. package/esm/mark/polygon.js +4 -8
  303. package/esm/mark/polygon.js.map +1 -1
  304. package/esm/mark/range.d.ts +1 -1
  305. package/esm/mark/range.js +2 -2
  306. package/esm/mark/range.js.map +1 -1
  307. package/esm/mark/rangeX.d.ts +1 -1
  308. package/esm/mark/rangeX.js +5 -2
  309. package/esm/mark/rangeX.js.map +1 -1
  310. package/esm/mark/rangeY.d.ts +1 -1
  311. package/esm/mark/rangeY.js +5 -2
  312. package/esm/mark/rangeY.js.map +1 -1
  313. package/esm/mark/rect.d.ts +1 -1
  314. package/esm/mark/rect.js +7 -8
  315. package/esm/mark/rect.js.map +1 -1
  316. package/esm/mark/sankey.d.ts +8 -0
  317. package/esm/mark/sankey.js +97 -0
  318. package/esm/mark/sankey.js.map +1 -0
  319. package/esm/mark/shape.d.ts +7 -0
  320. package/esm/mark/shape.js +33 -0
  321. package/esm/mark/shape.js.map +1 -0
  322. package/esm/mark/text.d.ts +1 -1
  323. package/esm/mark/text.js +16 -11
  324. package/esm/mark/text.js.map +1 -1
  325. package/esm/mark/tree.d.ts +4 -0
  326. package/esm/mark/tree.js +59 -0
  327. package/esm/mark/tree.js.map +1 -0
  328. package/esm/mark/treemap.d.ts +4 -0
  329. package/esm/mark/treemap.js +123 -0
  330. package/esm/mark/treemap.js.map +1 -0
  331. package/esm/mark/utils.d.ts +51 -3
  332. package/esm/mark/utils.js +84 -12
  333. package/esm/mark/utils.js.map +1 -1
  334. package/esm/mark/vector.d.ts +1 -1
  335. package/esm/mark/vector.js +4 -8
  336. package/esm/mark/vector.js.map +1 -1
  337. package/esm/mark/wordCloud.d.ts +4 -0
  338. package/esm/mark/wordCloud.js +65 -0
  339. package/esm/mark/wordCloud.js.map +1 -0
  340. package/esm/palette/category10.d.ts +1 -1
  341. package/esm/palette/category20.d.ts +1 -1
  342. package/esm/palette/divergingGreenRed.d.ts +1 -1
  343. package/esm/palette/divergingGreenYellow.d.ts +1 -1
  344. package/esm/palette/divergingRedBlue.d.ts +1 -1
  345. package/esm/palette/divergingRedPurple.d.ts +1 -1
  346. package/esm/palette/sequentialBlue.d.ts +1 -1
  347. package/esm/palette/sequentialDarkBlue.d.ts +1 -1
  348. package/esm/palette/sequentialDarkGreen.d.ts +1 -1
  349. package/esm/palette/sequentialGreen.d.ts +1 -1
  350. package/esm/palette/sequentialGreenBlue.d.ts +1 -1
  351. package/esm/palette/sequentialGrey.d.ts +1 -1
  352. package/esm/palette/sequentialOrange.d.ts +1 -1
  353. package/esm/palette/sequentialPink.d.ts +1 -1
  354. package/esm/palette/sequentialPinkPurple.d.ts +1 -1
  355. package/esm/palette/sequentialPurple.d.ts +1 -1
  356. package/esm/palette/sequentialRed.d.ts +1 -1
  357. package/esm/palette/sequentialYellow.d.ts +1 -1
  358. package/esm/palette/sequentialYellowGreen.d.ts +1 -1
  359. package/esm/palette/sequentialYellowOrange.d.ts +1 -1
  360. package/esm/runtime/component.d.ts +1 -1
  361. package/esm/runtime/component.js +18 -29
  362. package/esm/runtime/component.js.map +1 -1
  363. package/esm/runtime/coordinate.d.ts +8 -8
  364. package/esm/runtime/coordinate.js +21 -21
  365. package/esm/runtime/coordinate.js.map +1 -1
  366. package/esm/runtime/mark.d.ts +3 -3
  367. package/esm/runtime/mark.js +37 -41
  368. package/esm/runtime/mark.js.map +1 -1
  369. package/esm/runtime/plot.d.ts +2 -2
  370. package/esm/runtime/plot.js +153 -42
  371. package/esm/runtime/plot.js.map +1 -1
  372. package/esm/runtime/render.d.ts +0 -7
  373. package/esm/runtime/render.js +6 -5
  374. package/esm/runtime/render.js.map +1 -1
  375. package/esm/runtime/scale.d.ts +4 -4
  376. package/esm/runtime/scale.js +98 -175
  377. package/esm/runtime/scale.js.map +1 -1
  378. package/esm/runtime/transform.d.ts +1 -0
  379. package/esm/runtime/transform.js +18 -2
  380. package/esm/runtime/transform.js.map +1 -1
  381. package/esm/runtime/types/common.d.ts +37 -21
  382. package/esm/runtime/types/component.d.ts +35 -35
  383. package/esm/runtime/types/data.d.ts +4 -4
  384. package/esm/runtime/types/encode.d.ts +9 -9
  385. package/esm/runtime/types/mark.d.ts +14 -6
  386. package/esm/runtime/types/options.d.ts +32 -34
  387. package/esm/runtime/types/theme.d.ts +32 -12
  388. package/esm/runtime/types/transform.d.ts +7 -7
  389. package/esm/scale/band.d.ts +1 -1
  390. package/esm/scale/identity.d.ts +1 -1
  391. package/esm/scale/linear.d.ts +1 -1
  392. package/esm/scale/log.d.ts +1 -1
  393. package/esm/scale/ordinal.d.ts +1 -1
  394. package/esm/scale/point.d.ts +1 -1
  395. package/esm/scale/pow.d.ts +1 -1
  396. package/esm/scale/quantile.d.ts +1 -1
  397. package/esm/scale/quantize.d.ts +1 -1
  398. package/esm/scale/sequential.d.ts +1 -1
  399. package/esm/scale/sqrt.d.ts +1 -1
  400. package/esm/scale/threshold.d.ts +1 -1
  401. package/esm/scale/time.d.ts +1 -1
  402. package/esm/shape/area/area.d.ts +1 -1
  403. package/esm/shape/area/curve.d.ts +1 -1
  404. package/esm/shape/area/curve.js +2 -0
  405. package/esm/shape/area/curve.js.map +1 -1
  406. package/esm/shape/area/smooth.d.ts +1 -1
  407. package/esm/shape/area/step.d.ts +1 -1
  408. package/esm/shape/box/box.d.ts +1 -1
  409. package/esm/shape/box/box.js +3 -1
  410. package/esm/shape/box/box.js.map +1 -1
  411. package/esm/shape/connector/connector.d.ts +5 -11
  412. package/esm/shape/connector/connector.js +50 -64
  413. package/esm/shape/connector/connector.js.map +1 -1
  414. package/esm/shape/createElement.d.ts +1 -1
  415. package/esm/shape/image/image.d.ts +1 -1
  416. package/esm/shape/image/image.js +5 -2
  417. package/esm/shape/image/image.js.map +1 -1
  418. package/esm/shape/index.d.ts +4 -0
  419. package/esm/shape/index.js +3 -0
  420. package/esm/shape/index.js.map +1 -1
  421. package/esm/shape/interval/color.d.ts +1 -1
  422. package/esm/shape/interval/color.js +14 -10
  423. package/esm/shape/interval/color.js.map +1 -1
  424. package/esm/shape/interval/funnel.d.ts +1 -1
  425. package/esm/shape/interval/funnel.js +1 -3
  426. package/esm/shape/interval/funnel.js.map +1 -1
  427. package/esm/shape/interval/hollow.d.ts +1 -1
  428. package/esm/shape/interval/pyramid.d.ts +1 -1
  429. package/esm/shape/interval/pyramid.js +2 -3
  430. package/esm/shape/interval/pyramid.js.map +1 -1
  431. package/esm/shape/interval/rect.d.ts +1 -1
  432. package/esm/shape/label/label.d.ts +1 -1
  433. package/esm/shape/label/label.js +13 -5
  434. package/esm/shape/label/label.js.map +1 -1
  435. package/esm/shape/label/position.d.ts +1 -1
  436. package/esm/shape/label/position.js +77 -36
  437. package/esm/shape/label/position.js.map +1 -1
  438. package/esm/shape/line/curve.d.ts +1 -1
  439. package/esm/shape/line/curve.js +8 -2
  440. package/esm/shape/line/curve.js.map +1 -1
  441. package/esm/shape/line/hv.d.ts +1 -1
  442. package/esm/shape/line/hvh.d.ts +1 -1
  443. package/esm/shape/line/line.d.ts +1 -1
  444. package/esm/shape/line/smooth.d.ts +1 -1
  445. package/esm/shape/line/vh.d.ts +1 -1
  446. package/esm/shape/lineXY/line.d.ts +1 -1
  447. package/esm/shape/lineXY/line.js +2 -0
  448. package/esm/shape/lineXY/line.js.map +1 -1
  449. package/esm/shape/link/arc.d.ts +1 -1
  450. package/esm/shape/link/arc.js +2 -0
  451. package/esm/shape/link/arc.js.map +1 -1
  452. package/esm/shape/link/link.d.ts +1 -7
  453. package/esm/shape/link/link.js +5 -3
  454. package/esm/shape/link/link.js.map +1 -1
  455. package/esm/shape/link/smooth.d.ts +1 -1
  456. package/esm/shape/link/smooth.js +2 -0
  457. package/esm/shape/link/smooth.js.map +1 -1
  458. package/esm/shape/link/vhv.d.ts +1 -1
  459. package/esm/shape/link/vhv.js +2 -0
  460. package/esm/shape/link/vhv.js.map +1 -1
  461. package/esm/shape/path/color.d.ts +9 -0
  462. package/esm/shape/path/color.js +37 -0
  463. package/esm/shape/path/color.js.map +1 -0
  464. package/esm/shape/path/hollow.d.ts +8 -0
  465. package/esm/shape/path/hollow.js +13 -0
  466. package/esm/shape/path/hollow.js.map +1 -0
  467. package/esm/shape/path/path.d.ts +8 -0
  468. package/esm/shape/path/path.js +13 -0
  469. package/esm/shape/path/path.js.map +1 -0
  470. package/esm/shape/point/bowtie.d.ts +1 -1
  471. package/esm/shape/point/color.d.ts +1 -1
  472. package/esm/shape/point/color.js +5 -2
  473. package/esm/shape/point/color.js.map +1 -1
  474. package/esm/shape/point/cross.d.ts +1 -1
  475. package/esm/shape/point/diamond.d.ts +1 -1
  476. package/esm/shape/point/hexagon.d.ts +1 -1
  477. package/esm/shape/point/hollow.d.ts +1 -1
  478. package/esm/shape/point/hollowBowtie.d.ts +1 -1
  479. package/esm/shape/point/hollowDiamond.d.ts +1 -1
  480. package/esm/shape/point/hollowHexagon.d.ts +1 -1
  481. package/esm/shape/point/hollowSquare.d.ts +1 -1
  482. package/esm/shape/point/hollowTriangle.d.ts +1 -1
  483. package/esm/shape/point/hollowTriangleDown.d.ts +1 -1
  484. package/esm/shape/point/hyphen.d.ts +1 -1
  485. package/esm/shape/point/line.d.ts +1 -1
  486. package/esm/shape/point/plus.d.ts +1 -1
  487. package/esm/shape/point/point.d.ts +1 -1
  488. package/esm/shape/point/square.d.ts +1 -1
  489. package/esm/shape/point/tick.d.ts +1 -1
  490. package/esm/shape/point/triangle.d.ts +1 -1
  491. package/esm/shape/point/triangleDown.d.ts +1 -1
  492. package/esm/shape/polygon/polygon.d.ts +1 -1
  493. package/esm/shape/polygon/polygon.js +2 -0
  494. package/esm/shape/polygon/polygon.js.map +1 -1
  495. package/esm/shape/polygon/ribbon.d.ts +1 -1
  496. package/esm/shape/polygon/ribbon.js +2 -0
  497. package/esm/shape/polygon/ribbon.js.map +1 -1
  498. package/esm/shape/shape/shape.d.ts +6 -0
  499. package/esm/shape/shape/shape.js +27 -0
  500. package/esm/shape/shape/shape.js.map +1 -0
  501. package/esm/shape/text/advance.d.ts +2 -0
  502. package/esm/shape/text/advance.js +122 -0
  503. package/esm/shape/text/advance.js.map +1 -0
  504. package/esm/shape/text/badge.d.ts +5 -9
  505. package/esm/shape/text/badge.js +31 -50
  506. package/esm/shape/text/badge.js.map +1 -1
  507. package/esm/shape/text/text.d.ts +1 -15
  508. package/esm/shape/text/text.js +15 -144
  509. package/esm/shape/text/text.js.map +1 -1
  510. package/esm/shape/utils.d.ts +21 -21
  511. package/esm/shape/utils.js +31 -12
  512. package/esm/shape/utils.js.map +1 -1
  513. package/esm/shape/vector/vector.d.ts +1 -7
  514. package/esm/shape/vector/vector.js +4 -2
  515. package/esm/shape/vector/vector.js.map +1 -1
  516. package/esm/spec/action.d.ts +27 -27
  517. package/esm/spec/animate.d.ts +1 -8
  518. package/esm/spec/composition.d.ts +40 -17
  519. package/esm/spec/coordinate.d.ts +17 -17
  520. package/esm/spec/data.d.ts +47 -25
  521. package/esm/spec/encode.d.ts +7 -7
  522. package/esm/spec/geometry.d.ts +79 -39
  523. package/esm/spec/index.d.ts +1 -1
  524. package/esm/spec/interaction.d.ts +28 -26
  525. package/esm/spec/labelTransform.d.ts +10 -3
  526. package/esm/spec/palette.d.ts +23 -23
  527. package/esm/spec/scale.d.ts +17 -17
  528. package/esm/spec/theme.d.ts +5 -5
  529. package/esm/spec/title.d.ts +1 -1
  530. package/esm/spec/transform.d.ts +44 -26
  531. package/esm/stdlib/index.js +12 -216
  532. package/esm/stdlib/index.js.map +1 -1
  533. package/esm/theme/dark.d.ts +1 -1
  534. package/esm/theme/dark.js +157 -57
  535. package/esm/theme/dark.js.map +1 -1
  536. package/esm/theme/light.d.ts +1 -1
  537. package/esm/theme/light.js +155 -52
  538. package/esm/theme/light.js.map +1 -1
  539. package/esm/transform/Select.d.ts +1 -1
  540. package/esm/transform/SelectX.d.ts +1 -1
  541. package/esm/transform/SelectY.d.ts +1 -1
  542. package/esm/transform/bin.d.ts +12 -0
  543. package/esm/transform/bin.js +82 -0
  544. package/esm/transform/bin.js.map +1 -0
  545. package/esm/transform/binX.d.ts +4 -0
  546. package/esm/transform/binX.js +7 -0
  547. package/esm/transform/binX.js.map +1 -0
  548. package/esm/transform/diffY.d.ts +1 -1
  549. package/esm/transform/dodgeX.d.ts +1 -1
  550. package/esm/transform/flexX.d.ts +1 -1
  551. package/esm/transform/group.d.ts +2 -2
  552. package/esm/transform/group.js +4 -82
  553. package/esm/transform/group.js.map +1 -1
  554. package/esm/transform/groupColor.d.ts +1 -1
  555. package/esm/transform/groupColor.js +1 -1
  556. package/esm/transform/groupColor.js.map +1 -1
  557. package/esm/transform/groupN.d.ts +9 -0
  558. package/esm/transform/groupN.js +99 -0
  559. package/esm/transform/groupN.js.map +1 -0
  560. package/esm/transform/groupX.d.ts +1 -1
  561. package/esm/transform/groupX.js +1 -1
  562. package/esm/transform/groupX.js.map +1 -1
  563. package/esm/transform/groupY.d.ts +1 -1
  564. package/esm/transform/groupY.js +1 -1
  565. package/esm/transform/groupY.js.map +1 -1
  566. package/esm/transform/index.d.ts +16 -6
  567. package/esm/transform/index.js +8 -3
  568. package/esm/transform/index.js.map +1 -1
  569. package/esm/transform/jitter.d.ts +1 -1
  570. package/esm/transform/jitterX.d.ts +1 -1
  571. package/esm/transform/maybeFunctionAttribute.d.ts +6 -0
  572. package/esm/transform/maybeFunctionAttribute.js +19 -0
  573. package/esm/transform/maybeFunctionAttribute.js.map +1 -0
  574. package/esm/transform/maybeGradient.d.ts +7 -0
  575. package/esm/transform/maybeGradient.js +24 -0
  576. package/esm/transform/maybeGradient.js.map +1 -0
  577. package/esm/transform/maybeIdentityX.d.ts +1 -1
  578. package/esm/transform/maybeIdentityY.d.ts +1 -1
  579. package/esm/transform/maybeKey.d.ts +1 -1
  580. package/esm/transform/maybeSeries.d.ts +1 -1
  581. package/esm/transform/maybeSize.d.ts +1 -1
  582. package/esm/transform/maybeStackY.d.ts +1 -1
  583. package/esm/transform/maybeTitle.d.ts +8 -0
  584. package/esm/transform/{maybeTitleX.js → maybeTitle.js} +6 -5
  585. package/esm/transform/maybeTitle.js.map +1 -0
  586. package/esm/transform/maybeTooltip.d.ts +2 -2
  587. package/esm/transform/maybeTooltip.js +7 -5
  588. package/esm/transform/maybeTooltip.js.map +1 -1
  589. package/esm/transform/maybeTuple.d.ts +7 -0
  590. package/esm/transform/maybeTuple.js +19 -0
  591. package/esm/transform/maybeTuple.js.map +1 -0
  592. package/esm/transform/maybeTupleX.d.ts +1 -1
  593. package/esm/transform/maybeTupleX.js +2 -2
  594. package/esm/transform/maybeTupleX.js.map +1 -1
  595. package/esm/transform/maybeTupleY.d.ts +1 -1
  596. package/esm/transform/maybeTupleY.js +2 -2
  597. package/esm/transform/maybeTupleY.js.map +1 -1
  598. package/esm/transform/maybeVisualPosition.d.ts +7 -0
  599. package/esm/transform/maybeVisualPosition.js +45 -0
  600. package/esm/transform/maybeVisualPosition.js.map +1 -0
  601. package/esm/transform/maybeZeroPadding.d.ts +1 -1
  602. package/esm/transform/maybeZeroX.d.ts +1 -1
  603. package/esm/transform/maybeZeroY.d.ts +1 -1
  604. package/esm/transform/maybeZeroY1.d.ts +1 -1
  605. package/esm/transform/normalizeY.d.ts +1 -1
  606. package/esm/transform/pack.d.ts +1 -1
  607. package/esm/transform/sort.d.ts +1 -1
  608. package/esm/transform/sortColor.d.ts +1 -1
  609. package/esm/transform/sortX.d.ts +1 -1
  610. package/esm/transform/sortY.d.ts +1 -1
  611. package/esm/transform/stackEnter.d.ts +2 -1
  612. package/esm/transform/stackEnter.js +15 -5
  613. package/esm/transform/stackEnter.js.map +1 -1
  614. package/esm/transform/stackY.d.ts +1 -1
  615. package/esm/transform/stackY.js +25 -4
  616. package/esm/transform/stackY.js.map +1 -1
  617. package/esm/transform/symmetryY.d.ts +1 -1
  618. package/esm/transform/utils/helper.d.ts +1 -0
  619. package/esm/transform/utils/helper.js +9 -1
  620. package/esm/transform/utils/helper.js.map +1 -1
  621. package/esm/transform/utils/order.d.ts +3 -3
  622. package/esm/transform/utils/order.js +2 -0
  623. package/esm/transform/utils/order.js.map +1 -1
  624. package/esm/utils/coordinate.js +3 -1
  625. package/esm/utils/coordinate.js.map +1 -1
  626. package/esm/utils/helper.d.ts +5 -2
  627. package/esm/utils/helper.js +11 -3
  628. package/esm/utils/helper.js.map +1 -1
  629. package/esm/utils/selection.d.ts +4 -4
  630. package/esm/utils/selection.js +3 -1
  631. package/esm/utils/selection.js.map +1 -1
  632. package/esm/utils/size.d.ts +6 -1
  633. package/esm/utils/size.js +22 -1
  634. package/esm/utils/size.js.map +1 -1
  635. package/esm/utils/vector.d.ts +1 -1
  636. package/lib/animation/fadeIn.d.ts +2 -2
  637. package/lib/animation/fadeOut.d.ts +2 -2
  638. package/lib/animation/growInX.d.ts +7 -0
  639. package/lib/animation/growInX.js +30 -0
  640. package/lib/animation/growInX.js.map +1 -0
  641. package/lib/animation/growInY.d.ts +7 -0
  642. package/lib/animation/growInY.js +30 -0
  643. package/lib/animation/growInY.js.map +1 -0
  644. package/lib/animation/index.d.ts +6 -0
  645. package/lib/animation/index.js +7 -1
  646. package/lib/animation/index.js.map +1 -1
  647. package/lib/animation/morphing.d.ts +4 -4
  648. package/lib/animation/morphing.js +49 -12
  649. package/lib/animation/morphing.js.map +1 -1
  650. package/lib/animation/pathIn.d.ts +7 -0
  651. package/lib/animation/pathIn.js +22 -0
  652. package/lib/animation/pathIn.js.map +1 -0
  653. package/lib/animation/scaleInX.d.ts +2 -2
  654. package/lib/animation/scaleInY.d.ts +2 -2
  655. package/lib/animation/scaleOutX.d.ts +2 -2
  656. package/lib/animation/scaleOutY.d.ts +2 -2
  657. package/lib/animation/types.d.ts +6 -0
  658. package/lib/animation/types.js +3 -0
  659. package/lib/animation/types.js.map +1 -0
  660. package/lib/animation/waveIn.d.ts +2 -2
  661. package/lib/animation/waveIn.js +28 -2
  662. package/lib/animation/waveIn.js.map +1 -1
  663. package/lib/animation/zoomIn.d.ts +2 -2
  664. package/lib/animation/zoomOut.d.ts +2 -2
  665. package/lib/api/chart.d.ts +8 -4
  666. package/lib/api/chart.js +19 -3
  667. package/lib/api/chart.js.map +1 -1
  668. package/lib/api/composition/facetCircle.d.ts +3 -6
  669. package/lib/api/composition/facetCircle.js +2 -5
  670. package/lib/api/composition/facetCircle.js.map +1 -1
  671. package/lib/api/composition/facetRect.d.ts +3 -8
  672. package/lib/api/composition/facetRect.js +2 -7
  673. package/lib/api/composition/facetRect.js.map +1 -1
  674. package/lib/api/composition/geoPath.d.ts +21 -0
  675. package/lib/api/composition/geoPath.js +33 -0
  676. package/lib/api/composition/geoPath.js.map +1 -0
  677. package/lib/api/composition/geoView.d.ts +21 -0
  678. package/lib/api/composition/geoView.js +32 -0
  679. package/lib/api/composition/geoView.js.map +1 -0
  680. package/lib/api/composition/index.d.ts +7 -1
  681. package/lib/api/composition/index.js +7 -1
  682. package/lib/api/composition/index.js.map +1 -1
  683. package/lib/api/composition/repeatMatrix.d.ts +3 -6
  684. package/lib/api/composition/repeatMatrix.js +2 -5
  685. package/lib/api/composition/repeatMatrix.js.map +1 -1
  686. package/lib/api/composition/spaceFlex.d.ts +1 -5
  687. package/lib/api/composition/spaceFlex.js +1 -8
  688. package/lib/api/composition/spaceFlex.js.map +1 -1
  689. package/lib/api/composition/spaceLayer.d.ts +1 -2
  690. package/lib/api/composition/spaceLayer.js +1 -5
  691. package/lib/api/composition/spaceLayer.js.map +1 -1
  692. package/lib/api/composition/timingKeyframe.d.ts +2 -7
  693. package/lib/api/composition/timingKeyframe.js +1 -8
  694. package/lib/api/composition/timingKeyframe.js.map +1 -1
  695. package/lib/api/composition/view.d.ts +7 -8
  696. package/lib/api/composition/view.js +6 -7
  697. package/lib/api/composition/view.js.map +1 -1
  698. package/lib/api/mark/index.d.ts +17 -1
  699. package/lib/api/mark/index.js +8 -0
  700. package/lib/api/mark/index.js.map +1 -1
  701. package/lib/api/mark/mark.d.ts +49 -1
  702. package/lib/api/mark/mark.js +75 -12
  703. package/lib/api/mark/mark.js.map +1 -1
  704. package/lib/api/mark/types.d.ts +4 -12
  705. package/lib/api/props.d.ts +1 -1
  706. package/lib/api/types.d.ts +7 -7
  707. package/lib/component/axis.d.ts +2 -2
  708. package/lib/component/axis.js +23 -25
  709. package/lib/component/axis.js.map +1 -1
  710. package/lib/component/axisX.d.ts +1 -1
  711. package/lib/component/axisY.d.ts +1 -1
  712. package/lib/component/legendCategory.d.ts +2 -2
  713. package/lib/component/legendCategory.js +2 -2
  714. package/lib/component/legendCategory.js.map +1 -1
  715. package/lib/component/legendContinuous.d.ts +1 -1
  716. package/lib/component/title.d.ts +1 -1
  717. package/lib/component/utils.d.ts +1 -1
  718. package/lib/composition/facetCircle.d.ts +1 -1
  719. package/lib/composition/facetCircle.js +2 -2
  720. package/lib/composition/facetCircle.js.map +1 -1
  721. package/lib/composition/facetRect.d.ts +2 -2
  722. package/lib/composition/facetRect.js +8 -10
  723. package/lib/composition/facetRect.js.map +1 -1
  724. package/lib/composition/mark.d.ts +1 -1
  725. package/lib/composition/mark.js +3 -3
  726. package/lib/composition/mark.js.map +1 -1
  727. package/lib/composition/repeatMatrix.d.ts +1 -1
  728. package/lib/composition/repeatMatrix.js +4 -4
  729. package/lib/composition/repeatMatrix.js.map +1 -1
  730. package/lib/composition/spaceFlex.d.ts +1 -1
  731. package/lib/composition/spaceLayer.d.ts +1 -1
  732. package/lib/composition/timingKeyframe.d.ts +1 -1
  733. package/lib/composition/timingKeyframe.js +7 -8
  734. package/lib/composition/timingKeyframe.js.map +1 -1
  735. package/lib/composition/utils.d.ts +1 -1
  736. package/lib/composition/view.d.ts +1 -1
  737. package/lib/coordinate/cartesian.d.ts +1 -1
  738. package/lib/coordinate/fisheye.d.ts +1 -1
  739. package/lib/coordinate/fisheyeX.d.ts +1 -1
  740. package/lib/coordinate/fisheyeY.d.ts +1 -1
  741. package/lib/coordinate/helix.d.ts +1 -1
  742. package/lib/coordinate/parallel.d.ts +1 -1
  743. package/lib/coordinate/polar.d.ts +1 -1
  744. package/lib/coordinate/radial.d.ts +1 -1
  745. package/lib/coordinate/reflect.d.ts +1 -1
  746. package/lib/coordinate/reflectX.d.ts +1 -1
  747. package/lib/coordinate/reflectY.d.ts +1 -1
  748. package/lib/coordinate/theta.d.ts +1 -1
  749. package/lib/coordinate/transpose.d.ts +1 -1
  750. package/lib/data/arc.d.ts +1 -1
  751. package/lib/data/cluster.d.ts +1 -1
  752. package/lib/data/custom.d.ts +1 -1
  753. package/lib/data/fetch.d.ts +1 -1
  754. package/lib/data/fetch.js.map +1 -1
  755. package/lib/data/filter.d.ts +9 -0
  756. package/lib/data/filter.js +18 -0
  757. package/lib/data/filter.js.map +1 -0
  758. package/lib/data/fold.d.ts +1 -1
  759. package/lib/data/index.d.ts +4 -2
  760. package/lib/data/index.js +5 -3
  761. package/lib/data/index.js.map +1 -1
  762. package/lib/data/inline.d.ts +1 -1
  763. package/lib/data/join.d.ts +7 -0
  764. package/lib/data/join.js +26 -0
  765. package/lib/data/join.js.map +1 -0
  766. package/lib/data/map.d.ts +1 -1
  767. package/lib/data/pick.d.ts +1 -1
  768. package/lib/data/rename.d.ts +1 -1
  769. package/lib/data/rename.js +2 -3
  770. package/lib/data/rename.js.map +1 -1
  771. package/lib/data/sankey.d.ts +1 -1
  772. package/lib/data/sortBy.d.ts +1 -1
  773. package/lib/data/subset.d.ts +1 -1
  774. package/lib/data/tree.d.ts +1 -1
  775. package/lib/data/utils/arc/types.d.ts +2 -2
  776. package/lib/data/utils/flow.d.ts +1 -1
  777. package/lib/data/wordCloud.d.ts +1 -1
  778. package/lib/encode/column.d.ts +1 -1
  779. package/lib/encode/constant.d.ts +1 -1
  780. package/lib/encode/field.d.ts +1 -1
  781. package/lib/encode/transform.d.ts +1 -1
  782. package/lib/geo/d3-projection.d.ts +1 -0
  783. package/lib/geo/d3-projection.js +36 -0
  784. package/lib/geo/d3-projection.js.map +1 -0
  785. package/lib/geo/geoPath.d.ts +7 -0
  786. package/lib/geo/geoPath.js +40 -0
  787. package/lib/geo/geoPath.js.map +1 -0
  788. package/lib/geo/geoView.d.ts +7 -0
  789. package/lib/geo/geoView.js +242 -0
  790. package/lib/geo/geoView.js.map +1 -0
  791. package/lib/geo/index.d.ts +9 -0
  792. package/lib/geo/index.js +12 -0
  793. package/lib/geo/index.js.map +1 -0
  794. package/lib/interaction/action/service/elementSelection.d.ts +1 -1
  795. package/lib/interaction/action/service/elementSelection.js +1 -1
  796. package/lib/interaction/action/service/elementSelection.js.map +1 -1
  797. package/lib/interaction/action/service/fisheyeFocus.d.ts +1 -1
  798. package/lib/interaction/action/service/legendItemSelection.d.ts +1 -1
  799. package/lib/interaction/action/service/recordCurrentPoint.d.ts +1 -1
  800. package/lib/interaction/action/service/recordPoint.d.ts +1 -1
  801. package/lib/interaction/action/service/recordRegion.d.ts +1 -1
  802. package/lib/interaction/action/service/recordState.d.ts +1 -1
  803. package/lib/interaction/action/service/recordTip.d.ts +1 -1
  804. package/lib/interaction/action/service/surfacePointSelection.d.ts +1 -1
  805. package/lib/interaction/action/service/triggerInfoSelection.d.ts +1 -1
  806. package/lib/interaction/action/transformer/activeElement.d.ts +1 -1
  807. package/lib/interaction/action/transformer/activeRegion.d.ts +1 -1
  808. package/lib/interaction/action/transformer/button.d.ts +1 -1
  809. package/lib/interaction/action/transformer/cursor.d.ts +1 -1
  810. package/lib/interaction/action/transformer/filter.d.ts +2 -2
  811. package/lib/interaction/action/transformer/filter.js +6 -4
  812. package/lib/interaction/action/transformer/filter.js.map +1 -1
  813. package/lib/interaction/action/transformer/filterElement.d.ts +1 -1
  814. package/lib/interaction/action/transformer/highlightElement.d.ts +1 -1
  815. package/lib/interaction/action/transformer/mask.d.ts +1 -1
  816. package/lib/interaction/action/transformer/move.d.ts +1 -1
  817. package/lib/interaction/action/transformer/plot.d.ts +1 -1
  818. package/lib/interaction/action/transformer/poptip.d.ts +1 -1
  819. package/lib/interaction/action/transformer/setItemState.d.ts +1 -1
  820. package/lib/interaction/action/transformer/tooltip.d.ts +1 -1
  821. package/lib/interaction/builtin/activeRegion.d.ts +1 -1
  822. package/lib/interaction/builtin/brush.d.ts +1 -1
  823. package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
  824. package/lib/interaction/builtin/brushVisible.d.ts +1 -1
  825. package/lib/interaction/builtin/elementActive.d.ts +1 -1
  826. package/lib/interaction/builtin/elementHighlight.d.ts +1 -1
  827. package/lib/interaction/builtin/elementHighlightByColor.d.ts +5 -3
  828. package/lib/interaction/builtin/elementHighlightByColor.js +1 -1
  829. package/lib/interaction/builtin/elementHighlightByColor.js.map +1 -1
  830. package/lib/interaction/builtin/elementHighlightByX.d.ts +5 -3
  831. package/lib/interaction/builtin/elementHighlightByX.js +1 -1
  832. package/lib/interaction/builtin/elementHighlightByX.js.map +1 -1
  833. package/lib/interaction/builtin/elementListHighlight.d.ts +1 -1
  834. package/lib/interaction/builtin/elementSelected.d.ts +1 -1
  835. package/lib/interaction/builtin/ellipsisText.d.ts +1 -1
  836. package/lib/interaction/builtin/fisheye.d.ts +1 -1
  837. package/lib/interaction/builtin/legendActive.d.ts +1 -1
  838. package/lib/interaction/builtin/legendHighlight.d.ts +1 -1
  839. package/lib/interaction/builtin/tooltip.d.ts +9 -5
  840. package/lib/interaction/index.d.ts +4 -3
  841. package/lib/interaction/index.js +9 -7
  842. package/lib/interaction/index.js.map +1 -1
  843. package/lib/interaction/interactor/mousePosition.d.ts +1 -1
  844. package/lib/interaction/interactor/touchPosition.d.ts +1 -1
  845. package/lib/interaction/native/chartIndex.js +6 -2
  846. package/lib/interaction/native/chartIndex.js.map +1 -1
  847. package/lib/interaction/native/elementHighlight.d.ts +10 -0
  848. package/lib/interaction/native/{elementActive.js → elementHighlight.js} +11 -11
  849. package/lib/interaction/native/elementHighlight.js.map +1 -0
  850. package/lib/interaction/native/elementHighlightByColor.d.ts +4 -0
  851. package/lib/interaction/native/elementHighlightByColor.js +16 -0
  852. package/lib/interaction/native/elementHighlightByColor.js.map +1 -0
  853. package/lib/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
  854. package/lib/interaction/native/elementHighlightByX.js +17 -0
  855. package/lib/interaction/native/elementHighlightByX.js.map +1 -0
  856. package/lib/interaction/native/elementSelect.js +1 -1
  857. package/lib/interaction/native/elementSelect.js.map +1 -1
  858. package/lib/interaction/native/elementSelectByColor.js +1 -1
  859. package/lib/interaction/native/elementSelectByColor.js.map +1 -1
  860. package/lib/interaction/native/elementSelectByX.js +1 -1
  861. package/lib/interaction/native/elementSelectByX.js.map +1 -1
  862. package/lib/interaction/native/fisheye.js +8 -5
  863. package/lib/interaction/native/fisheye.js.map +1 -1
  864. package/lib/interaction/native/tooltip.d.ts +11 -0
  865. package/lib/interaction/native/tooltip.js +285 -0
  866. package/lib/interaction/native/tooltip.js.map +1 -0
  867. package/lib/interaction/native/utils.d.ts +1 -1
  868. package/lib/interaction/native/utils.js +4 -4
  869. package/lib/interaction/native/utils.js.map +1 -1
  870. package/lib/interaction/types.d.ts +16 -16
  871. package/lib/label-transform/dodgeY.d.ts +1 -1
  872. package/lib/label-transform/dodgeY.js +9 -1
  873. package/lib/label-transform/dodgeY.js.map +1 -1
  874. package/lib/label-transform/hideOverlap.d.ts +1 -1
  875. package/lib/label-transform/hideOverlap.js +14 -4
  876. package/lib/label-transform/hideOverlap.js.map +1 -1
  877. package/lib/label-transform/index.d.ts +4 -0
  878. package/lib/label-transform/index.js +5 -1
  879. package/lib/label-transform/index.js.map +1 -1
  880. package/lib/label-transform/spider.d.ts +7 -0
  881. package/lib/label-transform/spider.js +34 -0
  882. package/lib/label-transform/spider.js.map +1 -0
  883. package/lib/label-transform/surround.d.ts +7 -0
  884. package/lib/label-transform/surround.js +34 -0
  885. package/lib/label-transform/surround.js.map +1 -0
  886. package/lib/mark/area.d.ts +1 -1
  887. package/lib/mark/area.js +8 -7
  888. package/lib/mark/area.js.map +1 -1
  889. package/lib/mark/box.d.ts +1 -1
  890. package/lib/mark/box.js +6 -8
  891. package/lib/mark/box.js.map +1 -1
  892. package/lib/mark/boxplot.d.ts +4 -0
  893. package/lib/mark/boxplot.js +108 -0
  894. package/lib/mark/boxplot.js.map +1 -0
  895. package/lib/mark/cell.d.ts +1 -1
  896. package/lib/mark/cell.js +3 -7
  897. package/lib/mark/cell.js.map +1 -1
  898. package/lib/mark/connector.d.ts +1 -1
  899. package/lib/mark/connector.js +2 -2
  900. package/lib/mark/connector.js.map +1 -1
  901. package/lib/mark/forceGraph.d.ts +4 -0
  902. package/lib/mark/forceGraph.js +99 -0
  903. package/lib/mark/forceGraph.js.map +1 -0
  904. package/lib/mark/image.d.ts +1 -1
  905. package/lib/mark/image.js +11 -8
  906. package/lib/mark/image.js.map +1 -1
  907. package/lib/mark/index.d.ts +16 -0
  908. package/lib/mark/index.js +19 -1
  909. package/lib/mark/index.js.map +1 -1
  910. package/lib/mark/interval.d.ts +1 -1
  911. package/lib/mark/interval.js +6 -7
  912. package/lib/mark/interval.js.map +1 -1
  913. package/lib/mark/line.d.ts +1 -1
  914. package/lib/mark/line.js +12 -8
  915. package/lib/mark/line.js.map +1 -1
  916. package/lib/mark/lineX.d.ts +1 -1
  917. package/lib/mark/lineX.js +5 -2
  918. package/lib/mark/lineX.js.map +1 -1
  919. package/lib/mark/lineY.d.ts +1 -1
  920. package/lib/mark/lineY.js +5 -2
  921. package/lib/mark/lineY.js.map +1 -1
  922. package/lib/mark/link.d.ts +1 -1
  923. package/lib/mark/link.js +3 -7
  924. package/lib/mark/link.js.map +1 -1
  925. package/lib/mark/pack.d.ts +4 -0
  926. package/lib/mark/pack.js +85 -0
  927. package/lib/mark/pack.js.map +1 -0
  928. package/lib/mark/path.d.ts +7 -0
  929. package/lib/mark/path.js +28 -0
  930. package/lib/mark/path.js.map +1 -0
  931. package/lib/mark/point.d.ts +1 -1
  932. package/lib/mark/point.js +30 -27
  933. package/lib/mark/point.js.map +1 -1
  934. package/lib/mark/polygon.d.ts +1 -1
  935. package/lib/mark/polygon.js +3 -7
  936. package/lib/mark/polygon.js.map +1 -1
  937. package/lib/mark/range.d.ts +1 -1
  938. package/lib/mark/range.js +2 -2
  939. package/lib/mark/range.js.map +1 -1
  940. package/lib/mark/rangeX.d.ts +1 -1
  941. package/lib/mark/rangeX.js +5 -2
  942. package/lib/mark/rangeX.js.map +1 -1
  943. package/lib/mark/rangeY.d.ts +1 -1
  944. package/lib/mark/rangeY.js +5 -2
  945. package/lib/mark/rangeY.js.map +1 -1
  946. package/lib/mark/rect.d.ts +1 -1
  947. package/lib/mark/rect.js +6 -7
  948. package/lib/mark/rect.js.map +1 -1
  949. package/lib/mark/sankey.d.ts +8 -0
  950. package/lib/mark/sankey.js +101 -0
  951. package/lib/mark/sankey.js.map +1 -0
  952. package/lib/mark/shape.d.ts +7 -0
  953. package/lib/mark/shape.js +37 -0
  954. package/lib/mark/shape.js.map +1 -0
  955. package/lib/mark/text.d.ts +1 -1
  956. package/lib/mark/text.js +15 -10
  957. package/lib/mark/text.js.map +1 -1
  958. package/lib/mark/tree.d.ts +4 -0
  959. package/lib/mark/tree.js +63 -0
  960. package/lib/mark/tree.js.map +1 -0
  961. package/lib/mark/treemap.d.ts +4 -0
  962. package/lib/mark/treemap.js +127 -0
  963. package/lib/mark/treemap.js.map +1 -0
  964. package/lib/mark/utils.d.ts +51 -3
  965. package/lib/mark/utils.js +93 -13
  966. package/lib/mark/utils.js.map +1 -1
  967. package/lib/mark/vector.d.ts +1 -1
  968. package/lib/mark/vector.js +3 -7
  969. package/lib/mark/vector.js.map +1 -1
  970. package/lib/mark/wordCloud.d.ts +4 -0
  971. package/lib/mark/wordCloud.js +69 -0
  972. package/lib/mark/wordCloud.js.map +1 -0
  973. package/lib/palette/category10.d.ts +1 -1
  974. package/lib/palette/category20.d.ts +1 -1
  975. package/lib/palette/divergingGreenRed.d.ts +1 -1
  976. package/lib/palette/divergingGreenYellow.d.ts +1 -1
  977. package/lib/palette/divergingRedBlue.d.ts +1 -1
  978. package/lib/palette/divergingRedPurple.d.ts +1 -1
  979. package/lib/palette/sequentialBlue.d.ts +1 -1
  980. package/lib/palette/sequentialDarkBlue.d.ts +1 -1
  981. package/lib/palette/sequentialDarkGreen.d.ts +1 -1
  982. package/lib/palette/sequentialGreen.d.ts +1 -1
  983. package/lib/palette/sequentialGreenBlue.d.ts +1 -1
  984. package/lib/palette/sequentialGrey.d.ts +1 -1
  985. package/lib/palette/sequentialOrange.d.ts +1 -1
  986. package/lib/palette/sequentialPink.d.ts +1 -1
  987. package/lib/palette/sequentialPinkPurple.d.ts +1 -1
  988. package/lib/palette/sequentialPurple.d.ts +1 -1
  989. package/lib/palette/sequentialRed.d.ts +1 -1
  990. package/lib/palette/sequentialYellow.d.ts +1 -1
  991. package/lib/palette/sequentialYellowGreen.d.ts +1 -1
  992. package/lib/palette/sequentialYellowOrange.d.ts +1 -1
  993. package/lib/runtime/component.d.ts +1 -1
  994. package/lib/runtime/component.js +18 -29
  995. package/lib/runtime/component.js.map +1 -1
  996. package/lib/runtime/coordinate.d.ts +8 -8
  997. package/lib/runtime/coordinate.js +21 -21
  998. package/lib/runtime/coordinate.js.map +1 -1
  999. package/lib/runtime/mark.d.ts +3 -3
  1000. package/lib/runtime/mark.js +35 -39
  1001. package/lib/runtime/mark.js.map +1 -1
  1002. package/lib/runtime/plot.d.ts +2 -2
  1003. package/lib/runtime/plot.js +152 -41
  1004. package/lib/runtime/plot.js.map +1 -1
  1005. package/lib/runtime/render.d.ts +0 -7
  1006. package/lib/runtime/render.js +6 -6
  1007. package/lib/runtime/render.js.map +1 -1
  1008. package/lib/runtime/scale.d.ts +4 -4
  1009. package/lib/runtime/scale.js +98 -175
  1010. package/lib/runtime/scale.js.map +1 -1
  1011. package/lib/runtime/transform.d.ts +1 -0
  1012. package/lib/runtime/transform.js +20 -3
  1013. package/lib/runtime/transform.js.map +1 -1
  1014. package/lib/runtime/types/common.d.ts +37 -21
  1015. package/lib/runtime/types/component.d.ts +35 -35
  1016. package/lib/runtime/types/data.d.ts +4 -4
  1017. package/lib/runtime/types/encode.d.ts +9 -9
  1018. package/lib/runtime/types/mark.d.ts +14 -6
  1019. package/lib/runtime/types/options.d.ts +32 -34
  1020. package/lib/runtime/types/theme.d.ts +32 -12
  1021. package/lib/runtime/types/transform.d.ts +7 -7
  1022. package/lib/scale/band.d.ts +1 -1
  1023. package/lib/scale/identity.d.ts +1 -1
  1024. package/lib/scale/linear.d.ts +1 -1
  1025. package/lib/scale/log.d.ts +1 -1
  1026. package/lib/scale/ordinal.d.ts +1 -1
  1027. package/lib/scale/point.d.ts +1 -1
  1028. package/lib/scale/pow.d.ts +1 -1
  1029. package/lib/scale/quantile.d.ts +1 -1
  1030. package/lib/scale/quantize.d.ts +1 -1
  1031. package/lib/scale/sequential.d.ts +1 -1
  1032. package/lib/scale/sqrt.d.ts +1 -1
  1033. package/lib/scale/threshold.d.ts +1 -1
  1034. package/lib/scale/time.d.ts +1 -1
  1035. package/lib/shape/area/area.d.ts +1 -1
  1036. package/lib/shape/area/curve.d.ts +1 -1
  1037. package/lib/shape/area/curve.js +2 -0
  1038. package/lib/shape/area/curve.js.map +1 -1
  1039. package/lib/shape/area/smooth.d.ts +1 -1
  1040. package/lib/shape/area/step.d.ts +1 -1
  1041. package/lib/shape/box/box.d.ts +1 -1
  1042. package/lib/shape/box/box.js +3 -1
  1043. package/lib/shape/box/box.js.map +1 -1
  1044. package/lib/shape/connector/connector.d.ts +5 -11
  1045. package/lib/shape/connector/connector.js +50 -64
  1046. package/lib/shape/connector/connector.js.map +1 -1
  1047. package/lib/shape/createElement.d.ts +1 -1
  1048. package/lib/shape/image/image.d.ts +1 -1
  1049. package/lib/shape/image/image.js +5 -2
  1050. package/lib/shape/image/image.js.map +1 -1
  1051. package/lib/shape/index.d.ts +4 -0
  1052. package/lib/shape/index.js +7 -1
  1053. package/lib/shape/index.js.map +1 -1
  1054. package/lib/shape/interval/color.d.ts +1 -1
  1055. package/lib/shape/interval/color.js +13 -9
  1056. package/lib/shape/interval/color.js.map +1 -1
  1057. package/lib/shape/interval/funnel.d.ts +1 -1
  1058. package/lib/shape/interval/funnel.js +1 -3
  1059. package/lib/shape/interval/funnel.js.map +1 -1
  1060. package/lib/shape/interval/hollow.d.ts +1 -1
  1061. package/lib/shape/interval/pyramid.d.ts +1 -1
  1062. package/lib/shape/interval/pyramid.js +2 -3
  1063. package/lib/shape/interval/pyramid.js.map +1 -1
  1064. package/lib/shape/interval/rect.d.ts +1 -1
  1065. package/lib/shape/label/label.d.ts +1 -1
  1066. package/lib/shape/label/label.js +13 -5
  1067. package/lib/shape/label/label.js.map +1 -1
  1068. package/lib/shape/label/position.d.ts +1 -1
  1069. package/lib/shape/label/position.js +77 -36
  1070. package/lib/shape/label/position.js.map +1 -1
  1071. package/lib/shape/line/curve.d.ts +1 -1
  1072. package/lib/shape/line/curve.js +8 -2
  1073. package/lib/shape/line/curve.js.map +1 -1
  1074. package/lib/shape/line/hv.d.ts +1 -1
  1075. package/lib/shape/line/hvh.d.ts +1 -1
  1076. package/lib/shape/line/line.d.ts +1 -1
  1077. package/lib/shape/line/smooth.d.ts +1 -1
  1078. package/lib/shape/line/vh.d.ts +1 -1
  1079. package/lib/shape/lineXY/line.d.ts +1 -1
  1080. package/lib/shape/lineXY/line.js +2 -0
  1081. package/lib/shape/lineXY/line.js.map +1 -1
  1082. package/lib/shape/link/arc.d.ts +1 -1
  1083. package/lib/shape/link/arc.js +2 -0
  1084. package/lib/shape/link/arc.js.map +1 -1
  1085. package/lib/shape/link/link.d.ts +1 -7
  1086. package/lib/shape/link/link.js +5 -3
  1087. package/lib/shape/link/link.js.map +1 -1
  1088. package/lib/shape/link/smooth.d.ts +1 -1
  1089. package/lib/shape/link/smooth.js +2 -0
  1090. package/lib/shape/link/smooth.js.map +1 -1
  1091. package/lib/shape/link/vhv.d.ts +1 -1
  1092. package/lib/shape/link/vhv.js +2 -0
  1093. package/lib/shape/link/vhv.js.map +1 -1
  1094. package/lib/shape/path/color.d.ts +9 -0
  1095. package/lib/shape/path/color.js +41 -0
  1096. package/lib/shape/path/color.js.map +1 -0
  1097. package/lib/shape/path/hollow.d.ts +8 -0
  1098. package/lib/shape/path/hollow.js +17 -0
  1099. package/lib/shape/path/hollow.js.map +1 -0
  1100. package/lib/shape/path/path.d.ts +8 -0
  1101. package/lib/shape/path/path.js +17 -0
  1102. package/lib/shape/path/path.js.map +1 -0
  1103. package/lib/shape/point/bowtie.d.ts +1 -1
  1104. package/lib/shape/point/color.d.ts +1 -1
  1105. package/lib/shape/point/color.js +4 -1
  1106. package/lib/shape/point/color.js.map +1 -1
  1107. package/lib/shape/point/cross.d.ts +1 -1
  1108. package/lib/shape/point/diamond.d.ts +1 -1
  1109. package/lib/shape/point/hexagon.d.ts +1 -1
  1110. package/lib/shape/point/hollow.d.ts +1 -1
  1111. package/lib/shape/point/hollowBowtie.d.ts +1 -1
  1112. package/lib/shape/point/hollowDiamond.d.ts +1 -1
  1113. package/lib/shape/point/hollowHexagon.d.ts +1 -1
  1114. package/lib/shape/point/hollowSquare.d.ts +1 -1
  1115. package/lib/shape/point/hollowTriangle.d.ts +1 -1
  1116. package/lib/shape/point/hollowTriangleDown.d.ts +1 -1
  1117. package/lib/shape/point/hyphen.d.ts +1 -1
  1118. package/lib/shape/point/line.d.ts +1 -1
  1119. package/lib/shape/point/plus.d.ts +1 -1
  1120. package/lib/shape/point/point.d.ts +1 -1
  1121. package/lib/shape/point/square.d.ts +1 -1
  1122. package/lib/shape/point/tick.d.ts +1 -1
  1123. package/lib/shape/point/triangle.d.ts +1 -1
  1124. package/lib/shape/point/triangleDown.d.ts +1 -1
  1125. package/lib/shape/polygon/polygon.d.ts +1 -1
  1126. package/lib/shape/polygon/polygon.js +2 -0
  1127. package/lib/shape/polygon/polygon.js.map +1 -1
  1128. package/lib/shape/polygon/ribbon.d.ts +1 -1
  1129. package/lib/shape/polygon/ribbon.js +2 -0
  1130. package/lib/shape/polygon/ribbon.js.map +1 -1
  1131. package/lib/shape/shape/shape.d.ts +6 -0
  1132. package/lib/shape/shape/shape.js +31 -0
  1133. package/lib/shape/shape/shape.js.map +1 -0
  1134. package/lib/shape/text/advance.d.ts +2 -0
  1135. package/lib/shape/text/advance.js +125 -0
  1136. package/lib/shape/text/advance.js.map +1 -0
  1137. package/lib/shape/text/badge.d.ts +5 -9
  1138. package/lib/shape/text/badge.js +31 -50
  1139. package/lib/shape/text/badge.js.map +1 -1
  1140. package/lib/shape/text/text.d.ts +1 -15
  1141. package/lib/shape/text/text.js +15 -144
  1142. package/lib/shape/text/text.js.map +1 -1
  1143. package/lib/shape/utils.d.ts +21 -21
  1144. package/lib/shape/utils.js +33 -13
  1145. package/lib/shape/utils.js.map +1 -1
  1146. package/lib/shape/vector/vector.d.ts +1 -7
  1147. package/lib/shape/vector/vector.js +4 -2
  1148. package/lib/shape/vector/vector.js.map +1 -1
  1149. package/lib/spec/action.d.ts +27 -27
  1150. package/lib/spec/animate.d.ts +1 -8
  1151. package/lib/spec/composition.d.ts +40 -17
  1152. package/lib/spec/coordinate.d.ts +17 -17
  1153. package/lib/spec/data.d.ts +47 -25
  1154. package/lib/spec/encode.d.ts +7 -7
  1155. package/lib/spec/geometry.d.ts +79 -39
  1156. package/lib/spec/index.d.ts +1 -1
  1157. package/lib/spec/interaction.d.ts +28 -26
  1158. package/lib/spec/labelTransform.d.ts +10 -3
  1159. package/lib/spec/palette.d.ts +23 -23
  1160. package/lib/spec/scale.d.ts +17 -17
  1161. package/lib/spec/theme.d.ts +5 -5
  1162. package/lib/spec/title.d.ts +1 -1
  1163. package/lib/spec/transform.d.ts +44 -26
  1164. package/lib/stdlib/index.js +4 -208
  1165. package/lib/stdlib/index.js.map +1 -1
  1166. package/lib/theme/dark.d.ts +1 -1
  1167. package/lib/theme/dark.js +157 -57
  1168. package/lib/theme/dark.js.map +1 -1
  1169. package/lib/theme/light.d.ts +1 -1
  1170. package/lib/theme/light.js +155 -52
  1171. package/lib/theme/light.js.map +1 -1
  1172. package/lib/transform/Select.d.ts +1 -1
  1173. package/lib/transform/SelectX.d.ts +1 -1
  1174. package/lib/transform/SelectY.d.ts +1 -1
  1175. package/lib/transform/bin.d.ts +12 -0
  1176. package/lib/transform/bin.js +86 -0
  1177. package/lib/transform/bin.js.map +1 -0
  1178. package/lib/transform/binX.d.ts +4 -0
  1179. package/lib/transform/binX.js +11 -0
  1180. package/lib/transform/binX.js.map +1 -0
  1181. package/lib/transform/diffY.d.ts +1 -1
  1182. package/lib/transform/dodgeX.d.ts +1 -1
  1183. package/lib/transform/flexX.d.ts +1 -1
  1184. package/lib/transform/group.d.ts +2 -2
  1185. package/lib/transform/group.js +4 -82
  1186. package/lib/transform/group.js.map +1 -1
  1187. package/lib/transform/groupColor.d.ts +1 -1
  1188. package/lib/transform/groupColor.js +1 -1
  1189. package/lib/transform/groupColor.js.map +1 -1
  1190. package/lib/transform/groupN.d.ts +9 -0
  1191. package/lib/transform/groupN.js +103 -0
  1192. package/lib/transform/groupN.js.map +1 -0
  1193. package/lib/transform/groupX.d.ts +1 -1
  1194. package/lib/transform/groupX.js +1 -1
  1195. package/lib/transform/groupX.js.map +1 -1
  1196. package/lib/transform/groupY.d.ts +1 -1
  1197. package/lib/transform/groupY.js +1 -1
  1198. package/lib/transform/groupY.js.map +1 -1
  1199. package/lib/transform/index.d.ts +16 -6
  1200. package/lib/transform/index.js +17 -7
  1201. package/lib/transform/index.js.map +1 -1
  1202. package/lib/transform/jitter.d.ts +1 -1
  1203. package/lib/transform/jitterX.d.ts +1 -1
  1204. package/lib/transform/maybeFunctionAttribute.d.ts +6 -0
  1205. package/lib/transform/maybeFunctionAttribute.js +23 -0
  1206. package/lib/transform/maybeFunctionAttribute.js.map +1 -0
  1207. package/lib/transform/maybeGradient.d.ts +7 -0
  1208. package/lib/transform/maybeGradient.js +28 -0
  1209. package/lib/transform/maybeGradient.js.map +1 -0
  1210. package/lib/transform/maybeIdentityX.d.ts +1 -1
  1211. package/lib/transform/maybeIdentityY.d.ts +1 -1
  1212. package/lib/transform/maybeKey.d.ts +1 -1
  1213. package/lib/transform/maybeSeries.d.ts +1 -1
  1214. package/lib/transform/maybeSize.d.ts +1 -1
  1215. package/lib/transform/maybeStackY.d.ts +1 -1
  1216. package/lib/transform/maybeTitle.d.ts +8 -0
  1217. package/lib/transform/{maybeTitleX.js → maybeTitle.js} +8 -7
  1218. package/lib/transform/maybeTitle.js.map +1 -0
  1219. package/lib/transform/maybeTooltip.d.ts +2 -2
  1220. package/lib/transform/maybeTooltip.js +7 -5
  1221. package/lib/transform/maybeTooltip.js.map +1 -1
  1222. package/lib/transform/maybeTuple.d.ts +7 -0
  1223. package/lib/transform/maybeTuple.js +23 -0
  1224. package/lib/transform/maybeTuple.js.map +1 -0
  1225. package/lib/transform/maybeTupleX.d.ts +1 -1
  1226. package/lib/transform/maybeTupleX.js +1 -1
  1227. package/lib/transform/maybeTupleX.js.map +1 -1
  1228. package/lib/transform/maybeTupleY.d.ts +1 -1
  1229. package/lib/transform/maybeTupleY.js +1 -1
  1230. package/lib/transform/maybeTupleY.js.map +1 -1
  1231. package/lib/transform/maybeVisualPosition.d.ts +7 -0
  1232. package/lib/transform/maybeVisualPosition.js +49 -0
  1233. package/lib/transform/maybeVisualPosition.js.map +1 -0
  1234. package/lib/transform/maybeZeroPadding.d.ts +1 -1
  1235. package/lib/transform/maybeZeroX.d.ts +1 -1
  1236. package/lib/transform/maybeZeroY.d.ts +1 -1
  1237. package/lib/transform/maybeZeroY1.d.ts +1 -1
  1238. package/lib/transform/normalizeY.d.ts +1 -1
  1239. package/lib/transform/pack.d.ts +1 -1
  1240. package/lib/transform/sort.d.ts +1 -1
  1241. package/lib/transform/sortColor.d.ts +1 -1
  1242. package/lib/transform/sortX.d.ts +1 -1
  1243. package/lib/transform/sortY.d.ts +1 -1
  1244. package/lib/transform/stackEnter.d.ts +2 -1
  1245. package/lib/transform/stackEnter.js +15 -5
  1246. package/lib/transform/stackEnter.js.map +1 -1
  1247. package/lib/transform/stackY.d.ts +1 -1
  1248. package/lib/transform/stackY.js +25 -4
  1249. package/lib/transform/stackY.js.map +1 -1
  1250. package/lib/transform/symmetryY.d.ts +1 -1
  1251. package/lib/transform/utils/helper.d.ts +1 -0
  1252. package/lib/transform/utils/helper.js +11 -2
  1253. package/lib/transform/utils/helper.js.map +1 -1
  1254. package/lib/transform/utils/order.d.ts +3 -3
  1255. package/lib/transform/utils/order.js +2 -0
  1256. package/lib/transform/utils/order.js.map +1 -1
  1257. package/lib/utils/coordinate.js +3 -1
  1258. package/lib/utils/coordinate.js.map +1 -1
  1259. package/lib/utils/helper.d.ts +5 -2
  1260. package/lib/utils/helper.js +13 -4
  1261. package/lib/utils/helper.js.map +1 -1
  1262. package/lib/utils/selection.d.ts +4 -4
  1263. package/lib/utils/selection.js +3 -1
  1264. package/lib/utils/selection.js.map +1 -1
  1265. package/lib/utils/size.d.ts +6 -1
  1266. package/lib/utils/size.js +24 -2
  1267. package/lib/utils/size.js.map +1 -1
  1268. package/lib/utils/vector.d.ts +1 -1
  1269. package/package.json +12 -11
  1270. package/src/animation/fadeIn.ts +1 -1
  1271. package/src/animation/fadeOut.ts +1 -1
  1272. package/src/animation/growInX.ts +40 -0
  1273. package/src/animation/growInY.ts +40 -0
  1274. package/src/animation/index.ts +6 -0
  1275. package/src/animation/morphing.ts +60 -11
  1276. package/src/animation/pathIn.ts +24 -0
  1277. package/src/animation/scaleInX.ts +1 -1
  1278. package/src/animation/scaleInY.ts +1 -1
  1279. package/src/animation/scaleOutX.ts +1 -1
  1280. package/src/animation/scaleOutY.ts +1 -1
  1281. package/src/animation/types.ts +6 -0
  1282. package/src/animation/waveIn.ts +26 -3
  1283. package/src/animation/zoomIn.ts +1 -1
  1284. package/src/animation/zoomOut.ts +1 -1
  1285. package/src/api/chart.ts +25 -5
  1286. package/src/api/composition/facetCircle.ts +4 -10
  1287. package/src/api/composition/facetRect.ts +4 -14
  1288. package/src/api/composition/geoPath.ts +43 -0
  1289. package/src/api/composition/geoView.ts +42 -0
  1290. package/src/api/composition/index.ts +8 -0
  1291. package/src/api/composition/repeatMatrix.ts +4 -13
  1292. package/src/api/composition/spaceFlex.ts +1 -12
  1293. package/src/api/composition/spaceLayer.ts +1 -6
  1294. package/src/api/composition/timingKeyframe.ts +3 -19
  1295. package/src/api/composition/view.ts +12 -14
  1296. package/src/api/mark/index.ts +24 -0
  1297. package/src/api/mark/mark.ts +97 -11
  1298. package/src/api/mark/types.ts +3 -11
  1299. package/src/api/types.ts +4 -2
  1300. package/src/component/axis.ts +29 -13
  1301. package/src/component/legendCategory.ts +3 -3
  1302. package/src/composition/facetCircle.ts +2 -2
  1303. package/src/composition/facetRect.ts +8 -10
  1304. package/src/composition/mark.ts +4 -4
  1305. package/src/composition/repeatMatrix.ts +4 -4
  1306. package/src/composition/timingKeyframe.ts +7 -8
  1307. package/src/data/fetch.ts +1 -0
  1308. package/src/data/filter.ts +19 -0
  1309. package/src/data/index.ts +4 -2
  1310. package/src/data/join.ts +40 -0
  1311. package/src/data/rename.ts +2 -3
  1312. package/src/geo/d3-projection.ts +33 -0
  1313. package/src/geo/geoPath.ts +34 -0
  1314. package/src/geo/geoView.ts +235 -0
  1315. package/src/geo/index.ts +12 -0
  1316. package/src/interaction/action/service/elementSelection.ts +1 -1
  1317. package/src/interaction/action/transformer/filter.ts +6 -5
  1318. package/src/interaction/builtin/elementHighlightByColor.ts +1 -1
  1319. package/src/interaction/builtin/elementHighlightByX.ts +1 -1
  1320. package/src/interaction/index.ts +4 -3
  1321. package/src/interaction/native/chartIndex.ts +5 -2
  1322. package/src/interaction/native/{elementActive.ts → elementHighlight.ts} +9 -9
  1323. package/src/interaction/native/{elementActiveByColor.ts → elementHighlightByColor.ts} +5 -5
  1324. package/src/interaction/native/{elementActiveByX.ts → elementHighlightByX.ts} +5 -5
  1325. package/src/interaction/native/elementSelect.ts +2 -2
  1326. package/src/interaction/native/elementSelectByColor.ts +2 -2
  1327. package/src/interaction/native/elementSelectByX.ts +2 -2
  1328. package/src/interaction/native/fisheye.ts +7 -5
  1329. package/src/interaction/native/tooltip.ts +381 -0
  1330. package/src/interaction/native/utils.ts +2 -2
  1331. package/src/label-transform/dodgeY.ts +11 -1
  1332. package/src/label-transform/hideOverlap.ts +17 -5
  1333. package/src/label-transform/index.ts +4 -0
  1334. package/src/label-transform/spider.ts +37 -0
  1335. package/src/label-transform/surround.ts +37 -0
  1336. package/src/mark/area.ts +10 -7
  1337. package/src/mark/box.ts +7 -8
  1338. package/src/mark/boxplot.ts +119 -0
  1339. package/src/mark/cell.ts +5 -7
  1340. package/src/mark/connector.ts +3 -2
  1341. package/src/mark/forceGraph.ts +133 -0
  1342. package/src/mark/image.ts +14 -9
  1343. package/src/mark/index.ts +16 -0
  1344. package/src/mark/interval.ts +8 -7
  1345. package/src/mark/line.ts +15 -8
  1346. package/src/mark/lineX.ts +6 -2
  1347. package/src/mark/lineY.ts +6 -2
  1348. package/src/mark/link.ts +5 -7
  1349. package/src/mark/pack.ts +104 -0
  1350. package/src/mark/path.ts +34 -0
  1351. package/src/mark/point.ts +32 -27
  1352. package/src/mark/polygon.ts +5 -7
  1353. package/src/mark/range.ts +3 -2
  1354. package/src/mark/rangeX.ts +6 -2
  1355. package/src/mark/rangeY.ts +6 -2
  1356. package/src/mark/rect.ts +8 -7
  1357. package/src/mark/sankey.ts +127 -0
  1358. package/src/mark/shape.ts +37 -0
  1359. package/src/mark/text.ts +17 -11
  1360. package/src/mark/tree.ts +86 -0
  1361. package/src/mark/treemap.ts +188 -0
  1362. package/src/mark/utils.ts +115 -12
  1363. package/src/mark/vector.ts +5 -7
  1364. package/src/mark/wordCloud.ts +73 -0
  1365. package/src/runtime/component.ts +18 -28
  1366. package/src/runtime/coordinate.ts +20 -20
  1367. package/src/runtime/mark.ts +52 -71
  1368. package/src/runtime/plot.ts +229 -61
  1369. package/src/runtime/render.ts +7 -5
  1370. package/src/runtime/scale.ts +112 -246
  1371. package/src/runtime/transform.ts +21 -2
  1372. package/src/runtime/types/common.ts +21 -1
  1373. package/src/runtime/types/component.ts +11 -5
  1374. package/src/runtime/types/mark.ts +12 -2
  1375. package/src/runtime/types/options.ts +6 -4
  1376. package/src/runtime/types/theme.ts +32 -4
  1377. package/src/shape/.DS_Store +0 -0
  1378. package/src/shape/area/curve.ts +2 -0
  1379. package/src/shape/box/box.ts +3 -1
  1380. package/src/shape/connector/connector.ts +75 -102
  1381. package/src/shape/image/image.ts +5 -2
  1382. package/src/shape/index.ts +5 -0
  1383. package/src/shape/interval/color.ts +31 -9
  1384. package/src/shape/interval/funnel.ts +1 -1
  1385. package/src/shape/interval/pyramid.ts +1 -1
  1386. package/src/shape/label/label.ts +20 -7
  1387. package/src/shape/label/position.ts +116 -34
  1388. package/src/shape/line/curve.ts +7 -1
  1389. package/src/shape/lineXY/line.ts +2 -0
  1390. package/src/shape/link/arc.ts +2 -0
  1391. package/src/shape/link/link.ts +6 -10
  1392. package/src/shape/link/smooth.ts +2 -0
  1393. package/src/shape/link/vhv.ts +2 -0
  1394. package/src/shape/path/color.ts +38 -0
  1395. package/src/shape/path/hollow.ts +20 -0
  1396. package/src/shape/path/path.ts +20 -0
  1397. package/src/shape/point/color.ts +5 -2
  1398. package/src/shape/polygon/polygon.ts +2 -0
  1399. package/src/shape/polygon/ribbon.ts +2 -0
  1400. package/src/shape/shape/shape.ts +25 -0
  1401. package/src/shape/text/advance.ts +181 -0
  1402. package/src/shape/text/badge.ts +40 -79
  1403. package/src/shape/text/text.ts +19 -219
  1404. package/src/shape/utils.ts +42 -18
  1405. package/src/shape/vector/vector.ts +5 -9
  1406. package/src/spec/action.ts +1 -1
  1407. package/src/spec/animate.ts +9 -9
  1408. package/src/spec/composition.ts +41 -5
  1409. package/src/spec/data.ts +38 -10
  1410. package/src/spec/geometry.ts +121 -13
  1411. package/src/spec/interaction.ts +40 -34
  1412. package/src/spec/labelTransform.ts +9 -0
  1413. package/src/spec/transform.ts +19 -1
  1414. package/src/stdlib/index.ts +66 -18
  1415. package/src/theme/dark.ts +161 -58
  1416. package/src/theme/light.ts +159 -53
  1417. package/src/transform/bin.ts +102 -0
  1418. package/src/transform/binX.ts +17 -0
  1419. package/src/transform/group.ts +7 -104
  1420. package/src/transform/groupColor.ts +1 -1
  1421. package/src/transform/groupN.ts +120 -0
  1422. package/src/transform/groupX.ts +1 -1
  1423. package/src/transform/groupY.ts +1 -1
  1424. package/src/transform/index.ts +16 -6
  1425. package/src/transform/maybeFunctionAttribute.ts +28 -0
  1426. package/src/transform/maybeGradient.ts +27 -0
  1427. package/src/transform/{maybeTitleX.ts → maybeTitle.ts} +8 -5
  1428. package/src/transform/maybeTooltip.ts +17 -13
  1429. package/src/transform/maybeTuple.ts +22 -0
  1430. package/src/transform/maybeTupleX.ts +2 -2
  1431. package/src/transform/maybeTupleY.ts +2 -2
  1432. package/src/transform/maybeVisualPosition.ts +37 -0
  1433. package/src/transform/stackEnter.ts +20 -4
  1434. package/src/transform/stackY.ts +30 -4
  1435. package/src/transform/utils/helper.ts +8 -1
  1436. package/src/transform/utils/order.ts +1 -0
  1437. package/src/utils/coordinate.ts +2 -1
  1438. package/src/utils/helper.ts +17 -4
  1439. package/src/utils/selection.ts +7 -4
  1440. package/src/utils/size.ts +45 -1
  1441. package/esm/data/filterBy.d.ts +0 -8
  1442. package/esm/data/filterBy.js +0 -17
  1443. package/esm/data/filterBy.js.map +0 -1
  1444. package/esm/interaction/native/elementActive.d.ts +0 -10
  1445. package/esm/interaction/native/elementActive.js.map +0 -1
  1446. package/esm/interaction/native/elementActiveByColor.d.ts +0 -4
  1447. package/esm/interaction/native/elementActiveByColor.js +0 -12
  1448. package/esm/interaction/native/elementActiveByColor.js.map +0 -1
  1449. package/esm/interaction/native/elementActiveByX.js +0 -13
  1450. package/esm/interaction/native/elementActiveByX.js.map +0 -1
  1451. package/esm/transform/maybeTitleX.d.ts +0 -6
  1452. package/esm/transform/maybeTitleX.js.map +0 -1
  1453. package/esm/transform/maybeTooltipPosition.d.ts +0 -7
  1454. package/esm/transform/maybeTooltipPosition.js +0 -10
  1455. package/esm/transform/maybeTooltipPosition.js.map +0 -1
  1456. package/esm/transform/maybeTooltipY.d.ts +0 -6
  1457. package/esm/transform/maybeTooltipY.js +0 -9
  1458. package/esm/transform/maybeTooltipY.js.map +0 -1
  1459. package/lib/data/filterBy.d.ts +0 -8
  1460. package/lib/data/filterBy.js +0 -21
  1461. package/lib/data/filterBy.js.map +0 -1
  1462. package/lib/interaction/native/elementActive.d.ts +0 -10
  1463. package/lib/interaction/native/elementActive.js.map +0 -1
  1464. package/lib/interaction/native/elementActiveByColor.d.ts +0 -4
  1465. package/lib/interaction/native/elementActiveByColor.js +0 -16
  1466. package/lib/interaction/native/elementActiveByColor.js.map +0 -1
  1467. package/lib/interaction/native/elementActiveByX.js +0 -17
  1468. package/lib/interaction/native/elementActiveByX.js.map +0 -1
  1469. package/lib/transform/maybeTitleX.d.ts +0 -6
  1470. package/lib/transform/maybeTitleX.js.map +0 -1
  1471. package/lib/transform/maybeTooltipPosition.d.ts +0 -7
  1472. package/lib/transform/maybeTooltipPosition.js +0 -14
  1473. package/lib/transform/maybeTooltipPosition.js.map +0 -1
  1474. package/lib/transform/maybeTooltipY.d.ts +0 -6
  1475. package/lib/transform/maybeTooltipY.js +0 -13
  1476. package/lib/transform/maybeTooltipY.js.map +0 -1
  1477. package/src/data/filterBy.ts +0 -28
  1478. package/src/transform/maybeTooltipPosition.ts +0 -14
  1479. package/src/transform/maybeTooltipY.ts +0 -13
@@ -0,0 +1,120 @@
1
+ import { deepMix } from '@antv/util';
2
+ import {
3
+ max as d3Max,
4
+ mean as d3Mean,
5
+ sum as d3Sum,
6
+ min as d3Min,
7
+ median as d3Median,
8
+ } from 'd3-array';
9
+ import { TransformComponent as TC, Primitive, G2Mark } from '../runtime';
10
+ import { GroupTransform, Reducer } from '../spec';
11
+ import { indexOf } from '../utils/array';
12
+ import { columnOf, column } from './utils/helper';
13
+
14
+ export type GroupNOptions = Omit<
15
+ GroupTransform & {
16
+ groupBy?: (
17
+ I: number[],
18
+ mark: G2Mark,
19
+ options?: Record<string, any>,
20
+ ) => number[][];
21
+ },
22
+ 'type'
23
+ >;
24
+
25
+ type ReducerFunction = (I: number[], V: Primitive[]) => Primitive;
26
+
27
+ type Formatter = (d: Primitive) => string;
28
+
29
+ function builtinFormatter(summary: string) {
30
+ return (d: string) => (d === null ? summary : `${summary} of ${d}`);
31
+ }
32
+
33
+ function normalizeReducer(reducer: Reducer): [ReducerFunction, Formatter] {
34
+ if (typeof reducer === 'function') return [reducer, null];
35
+ const registry = { mean, max, count, first, last, sum, min, median };
36
+ const reducerFunction = registry[reducer];
37
+ if (!reducerFunction) throw new Error(`Unknown reducer: ${reducer}.`);
38
+ return reducerFunction();
39
+ }
40
+
41
+ function mean(): [ReducerFunction, Formatter] {
42
+ const reducer: ReducerFunction = (I, V) => d3Mean(I, (i) => +V[i]);
43
+ const formatter: Formatter = builtinFormatter('mean');
44
+ return [reducer, formatter];
45
+ }
46
+
47
+ function median(): [ReducerFunction, Formatter] {
48
+ const reducer: ReducerFunction = (I, V) => d3Median(I, (i) => +V[i]);
49
+ const formatter: Formatter = builtinFormatter('median');
50
+ return [reducer, formatter];
51
+ }
52
+
53
+ function max(): [ReducerFunction, Formatter] {
54
+ const reducer: ReducerFunction = (I, V) => d3Max(I, (i) => +V[i]);
55
+ const formatter: Formatter = builtinFormatter('max');
56
+ return [reducer, formatter];
57
+ }
58
+
59
+ function min(): [ReducerFunction, Formatter] {
60
+ const reducer: ReducerFunction = (I, V) => d3Min(I, (i) => +V[i]);
61
+ const formatter: Formatter = builtinFormatter('min');
62
+ return [reducer, formatter];
63
+ }
64
+
65
+ function count(): [ReducerFunction, Formatter] {
66
+ const reducer: ReducerFunction = (I, V) => I.length;
67
+ const formatter: Formatter = builtinFormatter('count');
68
+ return [reducer, formatter];
69
+ }
70
+
71
+ function sum(): [ReducerFunction, Formatter] {
72
+ const reducer: ReducerFunction = (I, V) => d3Sum(I, (i) => +V[i]);
73
+ const formatter: Formatter = builtinFormatter('sum');
74
+ return [reducer, formatter];
75
+ }
76
+
77
+ function first(): [ReducerFunction, Formatter] {
78
+ const reducer: ReducerFunction = (I, V) => V[I[0]];
79
+ const formatter: Formatter = builtinFormatter('first');
80
+ return [reducer, formatter];
81
+ }
82
+
83
+ function last(): [ReducerFunction, Formatter] {
84
+ const reducer: ReducerFunction = (I, V) => V[I[I.length - 1]];
85
+ const formatter: Formatter = builtinFormatter('last');
86
+ return [reducer, formatter];
87
+ }
88
+
89
+ /**
90
+ * The Group transform group data by x and y channels, and aggregate.
91
+ */
92
+ export const GroupN: TC<GroupNOptions> = (options = {}) => {
93
+ const { groupBy, ...rest } = options;
94
+ return (I, mark) => {
95
+ const { data, encode } = mark;
96
+ const groups = groupBy(I, mark);
97
+ const outputs = Object.entries(rest).map(([channel, reducer]) => {
98
+ const [reducerFunction, formatter] = normalizeReducer(reducer);
99
+ const [V, field] = columnOf(encode, channel);
100
+ const RV = groups.map((I) => reducerFunction(I, V ?? data));
101
+ return [channel, column(RV, formatter?.(field) || field)];
102
+ });
103
+ const reducedColumns = Object.keys(encode).map((key) => {
104
+ const [V, fv] = columnOf(encode, key);
105
+ const GV = groups.map((I) => V[I[0]]);
106
+ return [key, column(GV, fv)];
107
+ });
108
+ const GD = groups.map((I) => data[I[0]]);
109
+ const GI = indexOf(groups);
110
+ return [
111
+ GI,
112
+ deepMix({}, mark, {
113
+ data: GD,
114
+ encode: Object.fromEntries([...reducedColumns, ...outputs]),
115
+ }),
116
+ ];
117
+ };
118
+ };
119
+
120
+ GroupN.props = {};
@@ -8,7 +8,7 @@ export type GroupXOptions = Omit<GroupXTransform, 'type'>;
8
8
  * The GroupX transform group data by x channel, and aggregate.
9
9
  */
10
10
  export const GroupX: TC<GroupXOptions> = (options = {}) => {
11
- return Group({ ...options, channel: ['x', 'color'] });
11
+ return Group({ ...options, channels: ['x', 'color', 'series'] });
12
12
  };
13
13
 
14
14
  GroupX.props = {};
@@ -8,7 +8,7 @@ export type GroupYOptions = Omit<GroupYTransform, 'type'>;
8
8
  * The GroupY transform group data by x channel, and aggregate.
9
9
  */
10
10
  export const GroupY: TC<GroupYOptions> = (options = {}) => {
11
- return Group({ ...options, channel: ['y', 'color'] });
11
+ return Group({ ...options, channels: ['y', 'color', 'series'] });
12
12
  };
13
13
 
14
14
  GroupY.props = {};
@@ -1,8 +1,6 @@
1
1
  export { MaybeZeroY1 } from './maybeZeroY1';
2
2
  export { MaybeStackY } from './maybeStackY';
3
- export { MaybeTitleX } from './maybeTitleX';
4
- export { MaybeTooltipPosition } from './maybeTooltipPosition';
5
- export { MaybeTooltipY } from './maybeTooltipY';
3
+ export { MaybeTitle } from './maybeTitle';
6
4
  export { MaybeZeroX } from './maybeZeroX';
7
5
  export { MaybeZeroY } from './maybeZeroY';
8
6
  export { MaybeSize } from './maybeSize';
@@ -12,7 +10,12 @@ export { MaybeTupleY } from './maybeTupleY';
12
10
  export { MaybeTupleX } from './maybeTupleX';
13
11
  export { MaybeIdentityY } from './maybeIdentityY';
14
12
  export { MaybeIdentityX } from './maybeIdentityX';
13
+ export { MaybeTooltip } from './maybeTooltip';
15
14
  export { MaybeZeroPadding } from './maybeZeroPadding';
15
+ export { MaybeVisualPosition } from './maybeVisualPosition';
16
+ export { MaybeFunctionAttribute } from './maybeFunctionAttribute';
17
+ export { MaybeTuple } from './maybeTuple';
18
+ export { MaybeGradient } from './maybeGradient';
16
19
  export { StackY } from './stackY';
17
20
  export { DodgeX } from './dodgeX';
18
21
  export { StackEnter } from './stackEnter';
@@ -33,12 +36,12 @@ export { SortColor } from './sortColor';
33
36
  export { SortY } from './sortY';
34
37
  export { FlexX } from './flexX';
35
38
  export { Pack } from './pack';
39
+ export { BinX } from './binX';
40
+ export { Bin } from './bin';
36
41
 
37
42
  export type { MaybeZeroY1Options } from './maybeZeroY1';
38
43
  export type { MaybeStackYOptions } from './maybeStackY';
39
- export type { MaybeTitleXOptions } from './maybeTitleX';
40
- export type { MaybeTooltipPositionOptions } from './maybeTooltipPosition';
41
- export type { MaybeTooltipYOptions } from './maybeTooltipY';
44
+ export type { MaybeTitleOptions } from './maybeTitle';
42
45
  export type { MaybeZeroXOptions } from './maybeZeroX';
43
46
  export type { MaybeZeroYOptions } from './maybeZeroY';
44
47
  export type { MaybeSizeOptions } from './maybeSize';
@@ -46,9 +49,14 @@ export type { MaybeKeyOptions } from './maybeKey';
46
49
  export type { MaybeSeriesOptions } from './maybeSeries';
47
50
  export type { MaybeTupleYOptions } from './maybeTupleY';
48
51
  export type { MaybeTupleXOptions } from './maybeTupleX';
52
+ export type { MaybeTupleOptions } from './maybeTuple';
49
53
  export type { MaybeIdentityYOptions } from './maybeIdentityY';
50
54
  export type { MaybeIdentityXOptions } from './maybeIdentityX';
51
55
  export type { MaybeZeroPaddingOptions } from './maybeZeroPadding';
56
+ export type { MaybeVisualPositionOptions } from './maybeVisualPosition';
57
+ export type { MaybeFunctionAttributeOptions } from './maybeFunctionAttribute';
58
+ export type { MaybeTooltipOptions } from './maybeTooltip';
59
+ export type { MaybeGradientOptions } from './maybeGradient';
52
60
  export type { StackYOptions } from './stackY';
53
61
  export type { DodgeXOptions } from './dodgeX';
54
62
  export type { StackEnterOptions } from './stackEnter';
@@ -69,3 +77,5 @@ export type { SortYOptions } from './sortY';
69
77
  export type { SortColorOptions } from './sortColor';
70
78
  export type { FlexXOptions } from './flexX';
71
79
  export type { PackOptions } from './pack';
80
+ export type { BinXOptions } from './binX';
81
+ export type { BinOptions } from './bin';
@@ -0,0 +1,28 @@
1
+ import { deepMix } from '@antv/util';
2
+ import { TransformComponent as TC } from '../runtime';
3
+
4
+ export type MaybeFunctionAttributeOptions = Record<string, never>;
5
+
6
+ /**
7
+ * Mark functional attribute constant.
8
+ */
9
+ export const MaybeFunctionAttribute: TC<MaybeFunctionAttributeOptions> = () => {
10
+ return (I, mark) => {
11
+ const { style = {} } = mark;
12
+ return [
13
+ I,
14
+ deepMix({}, mark, {
15
+ style: {
16
+ ...style,
17
+ ...Object.fromEntries(
18
+ Object.entries(style)
19
+ .filter(([, v]) => typeof v === 'function')
20
+ .map(([k, v]) => [k, () => v]),
21
+ ),
22
+ },
23
+ }),
24
+ ];
25
+ };
26
+ };
27
+
28
+ MaybeFunctionAttribute.props = {};
@@ -0,0 +1,27 @@
1
+ import { deepMix } from '@antv/util';
2
+ import { TransformComponent as TC } from '../runtime';
3
+ import { column, columnOf, constant, visualColumn } from './utils/helper';
4
+
5
+ export type MaybeGradientOptions = Record<string, never>;
6
+
7
+ /**
8
+ * Add 3 constant encode for size channel.
9
+ * This is useful for point geometry.
10
+ */
11
+ export const MaybeGradient: TC<MaybeGradientOptions> = () => {
12
+ return (I, mark) => {
13
+ const { style = {} } = mark;
14
+ const { gradient } = style;
15
+ if (!gradient) return [I, mark];
16
+ return [
17
+ I,
18
+ deepMix({}, mark, {
19
+ encode: {
20
+ series: visualColumn(constant(I, undefined)),
21
+ },
22
+ }),
23
+ ];
24
+ };
25
+ };
26
+
27
+ MaybeGradient.props = {};
@@ -2,19 +2,22 @@ import { deepMix } from '@antv/util';
2
2
  import { TransformComponent as TC } from '../runtime';
3
3
  import { column, columnOf } from './utils/helper';
4
4
 
5
- export type MaybeTitleXOptions = Record<string, never>;
5
+ export type MaybeTitleOptions = {
6
+ channel?: string;
7
+ };
6
8
 
7
9
  /**
8
10
  * Infer title channel from x-position channel.
9
11
  */
10
- export const MaybeTitleX: TC<MaybeTitleXOptions> = () => {
12
+ export const MaybeTitle: TC<MaybeTitleOptions> = (options = {}) => {
13
+ const { channel = 'x' } = options;
11
14
  return (I, mark) => {
12
15
  const { encode } = mark;
13
16
  const { title } = encode;
14
17
  if (title !== undefined) return [I, mark];
15
- const [X, fx] = columnOf(encode, 'x');
16
- return [I, deepMix({}, mark, { encode: { title: column(X, fx) } })];
18
+ const [T, ft] = columnOf(encode, channel);
19
+ return [I, deepMix({}, mark, { encode: { title: column(T, ft) } })];
17
20
  };
18
21
  };
19
22
 
20
- MaybeTitleX.props = {};
23
+ MaybeTitle.props = {};
@@ -3,7 +3,7 @@ import { TransformComponent as TC } from '../runtime';
3
3
  import { column, columnOf } from './utils/helper';
4
4
 
5
5
  export type MaybeTooltipOptions = {
6
- channel: string;
6
+ channel: string | string[];
7
7
  };
8
8
 
9
9
  /**
@@ -15,18 +15,22 @@ export const MaybeTooltip: TC<MaybeTooltipOptions> = (options) => {
15
15
  const { encode } = mark;
16
16
  const { tooltip } = encode;
17
17
  if (tooltip !== undefined) return [I, mark];
18
- const entries = Object.entries(encode)
19
- .filter(([key]) => key.startsWith(channel))
20
- .flatMap(([key]) => {
21
- const match = new RegExp(`${channel}(\\d*)`).exec(key);
22
- const index = match[1];
23
- const [V, fv] = columnOf(encode, key);
24
- const E = [[key, column(V)]];
25
- if (V && fv !== null) {
26
- E.push([`tooltip${index}`, column(V, fv)]);
27
- }
28
- return E;
29
- });
18
+ const channels = Array.isArray(channel) ? channel : [channel];
19
+ let index = 0;
20
+ const entries = channels.flatMap((channel) =>
21
+ Object.entries(encode)
22
+ .filter(([key]) => key.startsWith(channel))
23
+ .flatMap(([key]) => {
24
+ const [V, fv] = columnOf(encode, key);
25
+ const E = [[key, column(V)]];
26
+ // Only show channel with field.
27
+ if (V && fv !== null) {
28
+ E.push([`tooltip${index === 0 ? '' : index}`, column(V, fv)]);
29
+ index++;
30
+ }
31
+ return E;
32
+ }),
33
+ );
30
34
  return [I, deepMix({}, mark, { encode: Object.fromEntries(entries) })];
31
35
  };
32
36
  };
@@ -0,0 +1,22 @@
1
+ import { deepMix } from '@antv/util';
2
+ import { TransformComponent as TC } from '../runtime';
3
+ import { column, isObject } from './utils/helper';
4
+
5
+ export type MaybeTupleOptions = Record<string, never>;
6
+
7
+ /**
8
+ * Add 3 constant encode for size channel.
9
+ * This is useful for point geometry.
10
+ */
11
+ export const MaybeTuple: TC<MaybeTupleOptions> = () => {
12
+ return (I, mark) => {
13
+ const { data } = mark;
14
+ if (!Array.isArray(data) || data.some(isObject)) return [I, mark];
15
+ const position = Array.isArray(data[0]) ? data : [data];
16
+ const X = position.map((d) => d[0]);
17
+ const Y = position.map((d) => d[1]);
18
+ return [I, deepMix({}, mark, { encode: { x: column(X), y: column(Y) } })];
19
+ };
20
+ };
21
+
22
+ MaybeTuple.props = {};
@@ -1,6 +1,6 @@
1
- import { deepMix, isObject } from '@antv/util';
1
+ import { deepMix } from '@antv/util';
2
2
  import { TransformComponent as TC } from '../runtime';
3
- import { column } from './utils/helper';
3
+ import { column, isObject } from './utils/helper';
4
4
 
5
5
  export type MaybeTupleXOptions = Record<string, never>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { deepMix, isObject } from '@antv/util';
1
+ import { deepMix } from '@antv/util';
2
2
  import { TransformComponent as TC } from '../runtime';
3
- import { column } from './utils/helper';
3
+ import { column, isObject } from './utils/helper';
4
4
 
5
5
  export type MaybeTupleYOptions = Record<string, never>;
6
6
 
@@ -0,0 +1,37 @@
1
+ import { deepMix } from '@antv/util';
2
+ import { TransformComponent as TC } from '../runtime';
3
+ import { column } from './utils/helper';
4
+
5
+ export type MaybeVisualPositionOptions = Record<string, never>;
6
+
7
+ /**
8
+ * Set visual position with style.x and style.y.
9
+ * The priority of style.x, style.y is higher than data.
10
+ */
11
+ export const MaybeVisualPosition: TC<MaybeVisualPositionOptions> = () => {
12
+ return (I, mark) => {
13
+ const { data, style = {}, ...restMark } = mark;
14
+ const { x: x0, y: y0, ...rest } = style;
15
+ if (x0 == undefined || y0 == undefined) return [I, mark];
16
+ const x = x0 || 0;
17
+ const y = y0 || 0;
18
+ return [
19
+ [0],
20
+ deepMix({}, restMark, {
21
+ data: [0],
22
+ cartesian: true,
23
+ encode: {
24
+ x: column([x]),
25
+ y: column([y]),
26
+ },
27
+ scale: {
28
+ x: { type: 'identity', independent: true, guide: null }, // hide axis
29
+ y: { type: 'identity', independent: true, guide: null }, // hide axis
30
+ },
31
+ style: rest,
32
+ }),
33
+ ];
34
+ };
35
+ };
36
+
37
+ MaybeVisualPosition.props = {};
@@ -15,20 +15,26 @@ export type StackEnterOptions = Omit<StackEnterTransform, 'type'>;
15
15
  * Group marks by channels into groups and stacking their enterDelay
16
16
  * to make marks show up groups by groups.
17
17
  * It will update enterDelay channel for each mark by its enterDuration and group.
18
+ * @todo Support orderBy.
18
19
  * @todo Sort among groups(e.g. reverse).
19
20
  * @todo Stack enter in groups rather than between groups?
20
21
  * @todo Auto inter this statistic for scaleInY animation in stacked interval?
21
22
  * @todo All the groups shared the enterDuration?
22
23
  */
23
24
  export const StackEnter: TC<StackEnterOptions> = (options) => {
24
- const { by = ['x'] } = options;
25
+ const {
26
+ groupBy = ['x'],
27
+ reducer = (I, V) => V[I[0]],
28
+ orderBy = null,
29
+ reverse = false,
30
+ duration,
31
+ } = options;
25
32
  return (I, mark) => {
26
33
  const { encode } = mark;
27
- const { enterDuration } = encode;
28
- if (enterDuration === undefined) return [I, mark];
29
34
 
30
35
  // Extract group information by each specified channel,
31
36
  // and skip if all values of channels are empty.
37
+ const by = Array.isArray(groupBy) ? groupBy : [groupBy];
32
38
  const groupEntries = by.map((k) => [k, columnOf(encode, k)[0]]);
33
39
  if (groupEntries.length === 0) return [I, mark];
34
40
 
@@ -47,8 +53,18 @@ export const StackEnter: TC<StackEnterOptions> = (options) => {
47
53
  groups = newGroups;
48
54
  }
49
55
 
56
+ // const {color} = encode;
57
+ if (orderBy) {
58
+ const [V] = columnOf(encode, orderBy);
59
+ if (V) groups.sort((I, J) => reducer(I, V) - reducer(J, V));
60
+ if (reverse) groups.reverse();
61
+ }
62
+
50
63
  // Stack delay for each group.
51
- const [ED] = columnOf(encode, 'enterDuration');
64
+ const t = (duration || 3000) / groups.length;
65
+ const [ED] = duration
66
+ ? [constant(I, t)] // If specified duration, generate enter duration for each.
67
+ : maybeColumnOf(encode, 'enterDuration', constant(I, t));
52
68
  const [EDL] = maybeColumnOf(encode, 'enterDelay', constant(I, 0));
53
69
  const newEnterDelay = new Array(I.length);
54
70
  for (let i = 0, pd = 0; i < groups.length; i++) {
@@ -16,11 +16,12 @@ export const StackY: TC<StackYOptions> = (options = {}) => {
16
16
  groupBy = 'x',
17
17
  orderBy = null,
18
18
  reverse = false,
19
- y: from = 'y',
19
+ y: fromY = 'y',
20
+ y1: fromY1 = 'y1',
20
21
  series = true,
21
22
  } = options;
22
23
  return (I, mark) => {
23
- const { data, encode } = mark;
24
+ const { data, encode, style = {} } = mark;
24
25
  const [Y, fy] = columnOf(encode, 'y');
25
26
  const [Y1, fy1] = columnOf(encode, 'y1');
26
27
  const [S] = series
@@ -37,6 +38,8 @@ export const StackY: TC<StackYOptions> = (options = {}) => {
37
38
  const newY = new Array(I.length);
38
39
  const newY1 = new Array(I.length);
39
40
  const TY = new Array(I.length);
41
+ const F = [];
42
+ const L = [];
40
43
  for (const G of groups) {
41
44
  if (reverse) G.reverse();
42
45
  // For range interval with specified y and y1.
@@ -51,6 +54,18 @@ export const StackY: TC<StackYOptions> = (options = {}) => {
51
54
  else if (y >= 0) PG.push(i);
52
55
  }
53
56
 
57
+ // Store the first and last layer.
58
+ const FG = PG.length > 0 ? PG : NG;
59
+ const LG = NG.length > 0 ? NG : PG;
60
+ let i = PG.length - 1;
61
+ let j = 0;
62
+ // Find the last non-zero index.
63
+ while (i > 0 && Y[FG[i]] === 0) i--;
64
+ // Find the first non-zero index.
65
+ while (j < LG.length - 1 && Y[LG[j]] === 0) j++;
66
+ F.push(FG[i]);
67
+ L.push(LG[j]);
68
+
54
69
  // Stack negative y in reverse order.
55
70
  let ny = start;
56
71
  for (const i of NG.reverse()) {
@@ -67,14 +82,25 @@ export const StackY: TC<StackYOptions> = (options = {}) => {
67
82
  }
68
83
  }
69
84
 
85
+ // Only set top radius for the first layer,
86
+ // and set bottom radius for the last layer.
87
+ const FS = new Set(F);
88
+ const LS = new Set(L);
89
+
70
90
  // Choose new y or y1 channel as the new y channel.
71
- const V = from === 'y' ? newY : newY1;
91
+ const V = fromY === 'y' ? newY : newY1;
92
+ const V1 = fromY1 === 'y' ? newY : newY1;
72
93
  return [
73
94
  I,
74
95
  deepMix({}, mark, {
75
96
  encode: {
76
97
  y: column(V, fy),
77
- y1: column(newY1, fy1),
98
+ y1: column(V1, fy1),
99
+ },
100
+ style: {
101
+ first: (_, i) => FS.has(i),
102
+ last: (_, i) => LS.has(i),
103
+ ...style,
78
104
  },
79
105
  }),
80
106
  ];
@@ -11,7 +11,9 @@ export function visualColumn(value: Primitive[], field?: string) {
11
11
  }
12
12
 
13
13
  export function constant(I: number[], value: any) {
14
- return new Array(I.length).fill(value);
14
+ const array = [];
15
+ for (const i of I) array[i] = value;
16
+ return array;
15
17
  }
16
18
 
17
19
  export function columnOf(encode, key: string): [Primitive[], string] {
@@ -35,3 +37,8 @@ export function maybeColumnOf(
35
37
  }
36
38
  return [null, null];
37
39
  }
40
+
41
+ export function isObject(d) {
42
+ if (d instanceof Date) return false;
43
+ return typeof d === 'object';
44
+ }
@@ -26,6 +26,7 @@ export function createGroups(
26
26
  mark: G2Mark,
27
27
  ): number[][] {
28
28
  const { encode } = mark;
29
+ if (groupBy === null) return [I];
29
30
  const G = normalizeGroupBy(groupBy)
30
31
  .map((k) => [k, columnOf(encode, k)?.[0]] as const)
31
32
  .filter(([, column]) => defined(column));
@@ -16,7 +16,8 @@ export function isPolar(coordinate: Coordinate): boolean {
16
16
  export function isRadial(coordinate: Coordinate): boolean {
17
17
  const { transformations } = coordinate.getOptions();
18
18
  return (
19
- transformations.some(([type]) => type.startsWith('reflect')) &&
19
+ // distinguish radial from theta.
20
+ transformations.some(([type]) => type === 'reflect') &&
20
21
  transformations.some(([type]) => type.startsWith('transpose'))
21
22
  );
22
23
  }
@@ -5,11 +5,17 @@ export function identity<T>(x: T): T {
5
5
  return x;
6
6
  }
7
7
 
8
+ type Func<R> = (x: R, ...args: any[]) => R;
8
9
  /**
9
- * Composes single-argument sync functions from left to right.
10
+ * Composes functions from left to right.
10
11
  */
11
- export function compose<R>(fns: ((x: R) => R)[]): (x: R) => R {
12
- return fns.reduce((composed, fn) => (x) => fn(composed(x)), identity);
12
+ export function compose<R>(fns: Func<R>[]): Func<R> {
13
+ return fns.reduce(
14
+ (composed, fn) =>
15
+ (x, ...args) =>
16
+ fn(composed(x, ...args), ...args),
17
+ identity,
18
+ );
13
19
  }
14
20
 
15
21
  /**
@@ -83,6 +89,13 @@ export function maybeSubObject(
83
89
  const entries = Object.entries(obj)
84
90
  .filter(([key]) => key.startsWith(prefix))
85
91
  .map(([key, value]) => [lowerFirst(key.replace(prefix, '').trim()), value])
86
- .filter(([key]) => key !== undefined);
92
+ .filter(([key]) => !!key);
87
93
  return entries.length === 0 ? null : Object.fromEntries(entries);
88
94
  }
95
+
96
+ export function maybePercentage(x: number | string, size: number) {
97
+ if (x === undefined) return null;
98
+ if (typeof x === 'number') return x;
99
+ const px = +x.replace('%', '');
100
+ return Number.isNaN(px) ? null : (px / 100) * size;
101
+ }
@@ -13,6 +13,7 @@ import {
13
13
  Polygon,
14
14
  Polyline,
15
15
  HTML,
16
+ IAnimation as GAnimation,
16
17
  } from '@antv/g';
17
18
  import { group } from 'd3-array';
18
19
  import { error } from './helper';
@@ -65,7 +66,7 @@ export class Selection<T = any> {
65
66
  private _merge: Selection;
66
67
  private _split: Selection;
67
68
  private _document: IDocument;
68
- private _transitions: Promise<void>[];
69
+ private _transitions: (GAnimation | GAnimation[])[];
69
70
  private _facetElements: G2Element[];
70
71
 
71
72
  constructor(
@@ -80,7 +81,7 @@ export class Selection<T = any> {
80
81
  null,
81
82
  null,
82
83
  ],
83
- transitions: Promise<void>[] = [],
84
+ transitions: (GAnimation | GAnimation[])[] = [],
84
85
  updateElements: G2Element[] = [],
85
86
  ) {
86
87
  this._elements = Array.from(elements);
@@ -258,6 +259,7 @@ export class Selection<T = any> {
258
259
  split.add(element);
259
260
  exit.delete(element);
260
261
  } else {
262
+ // @todo Data with non-unique key.
261
263
  enter.push(datum);
262
264
  }
263
265
  }
@@ -337,7 +339,8 @@ export class Selection<T = any> {
337
339
  const element = this._elements[i];
338
340
  const transition = this._transitions[i];
339
341
  if (transition) {
340
- transition.then(() => element.remove());
342
+ const T = Array.isArray(transition) ? transition : [transition];
343
+ T.map((d) => d.finished.then(() => element.remove()));
341
344
  } else {
342
345
  element.remove();
343
346
  }
@@ -406,7 +409,7 @@ export class Selection<T = any> {
406
409
  return this._elements;
407
410
  }
408
411
 
409
- transitions(): Promise<void>[] {
412
+ transitions(): (GAnimation | GAnimation[])[] {
410
413
  return this._transitions;
411
414
  }
412
415