@antv/g2 5.0.0-alpha.4 → 5.0.0-beta.10

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 (1216) hide show
  1. package/README.md +29 -27
  2. package/dist/g2-lite.min.js +5 -2
  3. package/dist/g2.min.js +5 -2
  4. package/esm/animation/morphing.js +32 -10
  5. package/esm/animation/morphing.js.map +1 -1
  6. package/esm/animation/waveIn.js +1 -12
  7. package/esm/animation/waveIn.js.map +1 -1
  8. package/esm/api/chart.d.ts +16 -7
  9. package/esm/api/chart.js +66 -29
  10. package/esm/api/chart.js.map +1 -1
  11. package/esm/api/composition/base.d.ts +21 -0
  12. package/esm/api/composition/base.js +59 -0
  13. package/esm/api/composition/base.js.map +1 -0
  14. package/esm/api/composition/facetCircle.d.ts +2 -3
  15. package/esm/api/composition/facetCircle.js +2 -2
  16. package/esm/api/composition/facetCircle.js.map +1 -1
  17. package/esm/api/composition/facetRect.d.ts +2 -3
  18. package/esm/api/composition/facetRect.js +2 -2
  19. package/esm/api/composition/facetRect.js.map +1 -1
  20. package/esm/api/composition/geoPath.d.ts +5 -7
  21. package/esm/api/composition/geoPath.js +4 -5
  22. package/esm/api/composition/geoPath.js.map +1 -1
  23. package/esm/api/composition/geoView.d.ts +4 -6
  24. package/esm/api/composition/geoView.js +4 -5
  25. package/esm/api/composition/geoView.js.map +1 -1
  26. package/esm/api/composition/index.d.ts +2 -1
  27. package/esm/api/composition/index.js +2 -1
  28. package/esm/api/composition/index.js.map +1 -1
  29. package/esm/api/composition/repeatMatrix.d.ts +2 -3
  30. package/esm/api/composition/repeatMatrix.js +2 -2
  31. package/esm/api/composition/repeatMatrix.js.map +1 -1
  32. package/esm/api/composition/spaceFlex.d.ts +2 -3
  33. package/esm/api/composition/spaceFlex.js +2 -2
  34. package/esm/api/composition/spaceFlex.js.map +1 -1
  35. package/esm/api/composition/spaceLayer.d.ts +2 -3
  36. package/esm/api/composition/spaceLayer.js +2 -2
  37. package/esm/api/composition/spaceLayer.js.map +1 -1
  38. package/esm/api/composition/timingKeyframe.d.ts +2 -3
  39. package/esm/api/composition/timingKeyframe.js +2 -2
  40. package/esm/api/composition/timingKeyframe.js.map +1 -1
  41. package/esm/api/composition/view.d.ts +5 -5
  42. package/esm/api/composition/view.js +6 -6
  43. package/esm/api/composition/view.js.map +1 -1
  44. package/esm/api/mark/base.d.ts +22 -0
  45. package/esm/api/mark/base.js +54 -0
  46. package/esm/api/mark/base.js.map +1 -0
  47. package/esm/api/mark/mark.d.ts +29 -29
  48. package/esm/api/mark/mark.js +32 -29
  49. package/esm/api/mark/mark.js.map +1 -1
  50. package/esm/api/mark/types.d.ts +5 -2
  51. package/esm/api/node.d.ts +2 -1
  52. package/esm/api/node.js +8 -9
  53. package/esm/api/node.js.map +1 -1
  54. package/esm/api/props.js +3 -22
  55. package/esm/api/props.js.map +1 -1
  56. package/esm/component/axis.d.ts +5 -8
  57. package/esm/component/axis.js +182 -234
  58. package/esm/component/axis.js.map +1 -1
  59. package/esm/component/axisArc.d.ts +7 -0
  60. package/esm/component/axisArc.js +9 -0
  61. package/esm/component/axisArc.js.map +1 -0
  62. package/esm/component/axisRadar.d.ts +9 -0
  63. package/esm/component/axisRadar.js +45 -0
  64. package/esm/component/axisRadar.js.map +1 -0
  65. package/esm/component/axisX.d.ts +2 -1
  66. package/esm/component/axisX.js +5 -4
  67. package/esm/component/axisX.js.map +1 -1
  68. package/esm/component/axisY.d.ts +1 -1
  69. package/esm/component/axisY.js +4 -4
  70. package/esm/component/axisY.js.map +1 -1
  71. package/esm/component/index.d.ts +14 -0
  72. package/esm/component/index.js +9 -0
  73. package/esm/component/index.js.map +1 -1
  74. package/esm/component/legendCategory.d.ts +5 -4
  75. package/esm/component/legendCategory.js +87 -55
  76. package/esm/component/legendCategory.js.map +1 -1
  77. package/esm/component/legendContinuous.d.ts +4 -2
  78. package/esm/component/legendContinuous.js +87 -25
  79. package/esm/component/legendContinuous.js.map +1 -1
  80. package/esm/component/legendContinuousBlock.d.ts +4 -0
  81. package/esm/component/legendContinuousBlock.js +6 -0
  82. package/esm/component/legendContinuousBlock.js.map +1 -0
  83. package/esm/component/legendContinuousBlockSize.d.ts +4 -0
  84. package/esm/component/legendContinuousBlockSize.js +6 -0
  85. package/esm/component/legendContinuousBlockSize.js.map +1 -0
  86. package/esm/component/legendContinuousSize.d.ts +4 -0
  87. package/esm/component/legendContinuousSize.js +10 -0
  88. package/esm/component/legendContinuousSize.js.map +1 -0
  89. package/esm/component/scrollbar.d.ts +9 -0
  90. package/esm/component/scrollbar.js +36 -0
  91. package/esm/component/scrollbar.js.map +1 -0
  92. package/esm/component/scrollbarX.d.ts +7 -0
  93. package/esm/component/scrollbarX.js +9 -0
  94. package/esm/component/scrollbarX.js.map +1 -0
  95. package/esm/component/scrollbarY.d.ts +7 -0
  96. package/esm/component/scrollbarY.js +9 -0
  97. package/esm/component/scrollbarY.js.map +1 -0
  98. package/esm/component/slider.d.ts +9 -0
  99. package/esm/component/slider.js +47 -0
  100. package/esm/component/slider.js.map +1 -0
  101. package/esm/component/sliderX.d.ts +7 -0
  102. package/esm/component/sliderX.js +9 -0
  103. package/esm/component/sliderX.js.map +1 -0
  104. package/esm/component/sliderY.d.ts +7 -0
  105. package/esm/component/sliderY.js +9 -0
  106. package/esm/component/sliderY.js.map +1 -0
  107. package/esm/component/title.js +47 -23
  108. package/esm/component/title.js.map +1 -1
  109. package/esm/component/utils.d.ts +13 -0
  110. package/esm/component/utils.js +50 -0
  111. package/esm/component/utils.js.map +1 -1
  112. package/esm/composition/facetCircle.js +2 -2
  113. package/esm/composition/facetCircle.js.map +1 -1
  114. package/esm/composition/facetRect.js +6 -8
  115. package/esm/composition/facetRect.js.map +1 -1
  116. package/esm/composition/mark.js +5 -3
  117. package/esm/composition/mark.js.map +1 -1
  118. package/esm/composition/repeatMatrix.js +4 -4
  119. package/esm/composition/repeatMatrix.js.map +1 -1
  120. package/esm/composition/view.js +8 -4
  121. package/esm/composition/view.js.map +1 -1
  122. package/esm/coordinate/fisheye.js +1 -1
  123. package/esm/coordinate/fisheye.js.map +1 -1
  124. package/esm/coordinate/index.d.ts +5 -13
  125. package/esm/coordinate/index.js +4 -8
  126. package/esm/coordinate/index.js.map +1 -1
  127. package/esm/coordinate/polar.d.ts +6 -0
  128. package/esm/coordinate/polar.js +18 -6
  129. package/esm/coordinate/polar.js.map +1 -1
  130. package/esm/coordinate/radar.d.ts +7 -0
  131. package/esm/coordinate/radar.js +14 -0
  132. package/esm/coordinate/radar.js.map +1 -0
  133. package/esm/coordinate/radial.d.ts +6 -0
  134. package/esm/coordinate/radial.js +19 -6
  135. package/esm/coordinate/radial.js.map +1 -1
  136. package/esm/coordinate/theta.d.ts +7 -0
  137. package/esm/coordinate/theta.js +16 -4
  138. package/esm/coordinate/theta.js.map +1 -1
  139. package/esm/coordinate/transpose.js +1 -1
  140. package/esm/coordinate/transpose.js.map +1 -1
  141. package/esm/data/filter.d.ts +3 -3
  142. package/esm/data/filter.js.map +1 -1
  143. package/esm/data/fold.js +4 -10
  144. package/esm/data/fold.js.map +1 -1
  145. package/esm/data/index.d.ts +5 -3
  146. package/esm/data/index.js +2 -1
  147. package/esm/data/index.js.map +1 -1
  148. package/esm/data/pick.js +10 -2
  149. package/esm/data/pick.js.map +1 -1
  150. package/esm/data/slice.d.ts +8 -0
  151. package/esm/data/slice.js +10 -0
  152. package/esm/data/slice.js.map +1 -0
  153. package/esm/data/sort.d.ts +8 -0
  154. package/esm/data/sort.js +12 -0
  155. package/esm/data/sort.js.map +1 -0
  156. package/esm/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
  157. package/esm/geo/{d3-projection.js → d3Projection.js} +1 -1
  158. package/esm/geo/d3Projection.js.map +1 -0
  159. package/esm/geo/geoView.js +4 -4
  160. package/esm/geo/geoView.js.map +1 -1
  161. package/esm/interaction/action/service/legendItemSelection.js.map +1 -1
  162. package/esm/interaction/action/transformer/setItemState.js.map +1 -1
  163. package/esm/interaction/builtin/activeRegion.d.ts +0 -2
  164. package/esm/interaction/builtin/brush.d.ts +1 -1
  165. package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
  166. package/esm/interaction/builtin/brushVisible.d.ts +1 -1
  167. package/esm/interaction/builtin/elementHighlight.d.ts +2 -0
  168. package/esm/interaction/builtin/elementHighlightByColor.d.ts +2 -0
  169. package/esm/interaction/builtin/elementHighlightByX.d.ts +2 -0
  170. package/esm/interaction/builtin/ellipsisText.d.ts +0 -3
  171. package/esm/interaction/builtin/fisheye.d.ts +6 -6
  172. package/esm/interaction/builtin/tooltip.d.ts +4 -8
  173. package/esm/interaction/index.d.ts +13 -0
  174. package/esm/interaction/index.js +12 -30
  175. package/esm/interaction/index.js.map +1 -1
  176. package/esm/interaction/native/brushAxisHighlight.d.ts +27 -0
  177. package/esm/interaction/native/brushAxisHighlight.js +167 -0
  178. package/esm/interaction/native/brushAxisHighlight.js.map +1 -0
  179. package/esm/interaction/native/brushFilter.d.ts +14 -0
  180. package/esm/interaction/native/brushFilter.js +122 -0
  181. package/esm/interaction/native/brushFilter.js.map +1 -0
  182. package/esm/interaction/native/brushHighlight.d.ts +41 -0
  183. package/esm/interaction/native/brushHighlight.js +349 -0
  184. package/esm/interaction/native/brushHighlight.js.map +1 -0
  185. package/esm/interaction/native/brushXFilter.d.ts +1 -0
  186. package/esm/interaction/native/brushXFilter.js +6 -0
  187. package/esm/interaction/native/brushXFilter.js.map +1 -0
  188. package/esm/interaction/native/brushXHighlight.d.ts +6 -0
  189. package/esm/interaction/native/brushXHighlight.js +9 -0
  190. package/esm/interaction/native/brushXHighlight.js.map +1 -0
  191. package/esm/interaction/native/brushYFilter.d.ts +1 -0
  192. package/esm/interaction/native/brushYFilter.js +6 -0
  193. package/esm/interaction/native/brushYFilter.js.map +1 -0
  194. package/esm/interaction/native/brushYHighlight.d.ts +6 -0
  195. package/esm/interaction/native/brushYHighlight.js +9 -0
  196. package/esm/interaction/native/brushYHighlight.js.map +1 -0
  197. package/esm/interaction/native/elementHighlight.d.ts +10 -2
  198. package/esm/interaction/native/elementHighlight.js +87 -24
  199. package/esm/interaction/native/elementHighlight.js.map +1 -1
  200. package/esm/interaction/native/elementHighlightByColor.d.ts +0 -3
  201. package/esm/interaction/native/elementHighlightByColor.js +3 -9
  202. package/esm/interaction/native/elementHighlightByColor.js.map +1 -1
  203. package/esm/interaction/native/elementHighlightByX.d.ts +1 -8
  204. package/esm/interaction/native/elementHighlightByX.js +4 -11
  205. package/esm/interaction/native/elementHighlightByX.js.map +1 -1
  206. package/esm/interaction/native/elementSelect.d.ts +7 -2
  207. package/esm/interaction/native/elementSelect.js +59 -27
  208. package/esm/interaction/native/elementSelect.js.map +1 -1
  209. package/esm/interaction/native/elementSelectByColor.js +3 -6
  210. package/esm/interaction/native/elementSelectByColor.js.map +1 -1
  211. package/esm/interaction/native/elementSelectByX.js +3 -6
  212. package/esm/interaction/native/elementSelectByX.js.map +1 -1
  213. package/esm/interaction/native/fisheye.js +6 -4
  214. package/esm/interaction/native/fisheye.js.map +1 -1
  215. package/esm/interaction/native/legendFilter.d.ts +14 -0
  216. package/esm/interaction/native/legendFilter.js +195 -0
  217. package/esm/interaction/native/legendFilter.js.map +1 -0
  218. package/esm/interaction/native/legendHighlight.d.ts +1 -0
  219. package/esm/interaction/native/legendHighlight.js +87 -0
  220. package/esm/interaction/native/legendHighlight.js.map +1 -0
  221. package/esm/interaction/native/poptip.d.ts +5 -0
  222. package/esm/interaction/native/poptip.js +91 -0
  223. package/esm/interaction/native/poptip.js.map +1 -0
  224. package/esm/interaction/native/sliderFilter.d.ts +5 -0
  225. package/esm/interaction/native/sliderFilter.js +87 -0
  226. package/esm/interaction/native/sliderFilter.js.map +1 -0
  227. package/esm/interaction/native/tooltip.d.ts +2 -2
  228. package/esm/interaction/native/tooltip.js +149 -47
  229. package/esm/interaction/native/tooltip.js.map +1 -1
  230. package/esm/interaction/native/utils.d.ts +24 -5
  231. package/esm/interaction/native/utils.js +248 -42
  232. package/esm/interaction/native/utils.js.map +1 -1
  233. package/esm/label-transform/contrastReverse.d.ts +9 -0
  234. package/esm/label-transform/contrastReverse.js +48 -0
  235. package/esm/label-transform/contrastReverse.js.map +1 -0
  236. package/esm/label-transform/index.d.ts +8 -8
  237. package/esm/label-transform/index.js +4 -4
  238. package/esm/label-transform/index.js.map +1 -1
  239. package/esm/label-transform/overflowHide.d.ts +7 -0
  240. package/esm/label-transform/overflowHide.js +18 -0
  241. package/esm/label-transform/overflowHide.js.map +1 -0
  242. package/esm/label-transform/overlapDodgeY.d.ts +7 -0
  243. package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
  244. package/esm/label-transform/overlapDodgeY.js.map +1 -0
  245. package/esm/label-transform/overlapHide.d.ts +7 -0
  246. package/esm/label-transform/overlapHide.js +24 -0
  247. package/esm/label-transform/overlapHide.js.map +1 -0
  248. package/esm/mark/area.js +2 -2
  249. package/esm/mark/area.js.map +1 -1
  250. package/esm/mark/boxplot.js +5 -18
  251. package/esm/mark/boxplot.js.map +1 -1
  252. package/esm/mark/cell.js +1 -1
  253. package/esm/mark/line.js +1 -1
  254. package/esm/mark/line.js.map +1 -1
  255. package/esm/mark/pack.js +2 -3
  256. package/esm/mark/pack.js.map +1 -1
  257. package/esm/mark/sankey.js +1 -0
  258. package/esm/mark/sankey.js.map +1 -1
  259. package/esm/mark/treemap.js +2 -3
  260. package/esm/mark/treemap.js.map +1 -1
  261. package/esm/mark/wordCloud.js +2 -2
  262. package/esm/mark/wordCloud.js.map +1 -1
  263. package/esm/runtime/component.d.ts +4 -1
  264. package/esm/runtime/component.js +274 -106
  265. package/esm/runtime/component.js.map +1 -1
  266. package/esm/runtime/coordinate.d.ts +12 -0
  267. package/esm/runtime/coordinate.js +47 -16
  268. package/esm/runtime/coordinate.js.map +1 -1
  269. package/esm/runtime/layout.d.ts +1 -1
  270. package/esm/runtime/layout.js +145 -76
  271. package/esm/runtime/layout.js.map +1 -1
  272. package/esm/runtime/plot.d.ts +1 -1
  273. package/esm/runtime/plot.js +155 -69
  274. package/esm/runtime/plot.js.map +1 -1
  275. package/esm/runtime/render.d.ts +0 -1
  276. package/esm/runtime/render.js +22 -47
  277. package/esm/runtime/render.js.map +1 -1
  278. package/esm/runtime/scale.d.ts +3 -1
  279. package/esm/runtime/scale.js +59 -5
  280. package/esm/runtime/scale.js.map +1 -1
  281. package/esm/runtime/transform.js +17 -7
  282. package/esm/runtime/transform.js.map +1 -1
  283. package/esm/runtime/types/common.d.ts +38 -11
  284. package/esm/runtime/types/component.d.ts +13 -8
  285. package/esm/runtime/types/mark.d.ts +1 -1
  286. package/esm/runtime/types/options.d.ts +14 -12
  287. package/esm/runtime/types/scale.d.ts +18 -0
  288. package/esm/runtime/types/scale.js +19 -0
  289. package/esm/runtime/types/scale.js.map +1 -0
  290. package/esm/runtime/types/theme.d.ts +8 -5
  291. package/esm/shape/area/curve.js +17 -17
  292. package/esm/shape/area/curve.js.map +1 -1
  293. package/esm/shape/area/hv.d.ts +3 -0
  294. package/esm/shape/area/hv.js +9 -0
  295. package/esm/shape/area/hv.js.map +1 -0
  296. package/esm/shape/area/hvh.d.ts +3 -0
  297. package/esm/shape/area/{step.js → hvh.js} +3 -3
  298. package/esm/shape/area/hvh.js.map +1 -0
  299. package/esm/shape/area/vh.d.ts +3 -0
  300. package/esm/shape/area/vh.js +9 -0
  301. package/esm/shape/area/vh.js.map +1 -0
  302. package/esm/shape/box/box.js +1 -1
  303. package/esm/shape/box/box.js.map +1 -1
  304. package/esm/shape/connector/connector.js +3 -3
  305. package/esm/shape/connector/connector.js.map +1 -1
  306. package/esm/shape/image/image.js +2 -2
  307. package/esm/shape/image/image.js.map +1 -1
  308. package/esm/shape/index.d.ts +6 -2
  309. package/esm/shape/index.js +3 -1
  310. package/esm/shape/index.js.map +1 -1
  311. package/esm/shape/interval/color.d.ts +1 -0
  312. package/esm/shape/interval/color.js +67 -51
  313. package/esm/shape/interval/color.js.map +1 -1
  314. package/esm/shape/label/label.js +3 -3
  315. package/esm/shape/label/label.js.map +1 -1
  316. package/esm/shape/label/position/area.d.ts +13 -0
  317. package/esm/shape/label/position/area.js +28 -0
  318. package/esm/shape/label/position/area.js.map +1 -0
  319. package/esm/shape/label/position/bottom.d.ts +1 -0
  320. package/esm/shape/label/position/bottom.js +2 -0
  321. package/esm/shape/label/position/bottom.js.map +1 -0
  322. package/esm/shape/label/position/bottomLeft.d.ts +1 -0
  323. package/esm/shape/label/position/bottomLeft.js +2 -0
  324. package/esm/shape/label/position/bottomLeft.js.map +1 -0
  325. package/esm/shape/label/position/bottomRight.d.ts +1 -0
  326. package/esm/shape/label/position/bottomRight.js +2 -0
  327. package/esm/shape/label/position/bottomRight.js.map +1 -0
  328. package/esm/shape/label/position/default.d.ts +18 -0
  329. package/esm/shape/label/position/default.js +107 -0
  330. package/esm/shape/label/position/default.js.map +1 -0
  331. package/esm/shape/label/position/index.d.ts +13 -0
  332. package/esm/shape/label/position/index.js +14 -0
  333. package/esm/shape/label/position/index.js.map +1 -0
  334. package/esm/shape/label/position/inside.d.ts +1 -0
  335. package/esm/shape/label/position/inside.js +2 -0
  336. package/esm/shape/label/position/inside.js.map +1 -0
  337. package/esm/shape/label/position/left.d.ts +1 -0
  338. package/esm/shape/label/position/left.js +2 -0
  339. package/esm/shape/label/position/left.js.map +1 -0
  340. package/esm/shape/label/position/outside.d.ts +18 -0
  341. package/esm/shape/label/position/outside.js +67 -0
  342. package/esm/shape/label/position/outside.js.map +1 -0
  343. package/esm/shape/label/position/right.d.ts +1 -0
  344. package/esm/shape/label/position/right.js +2 -0
  345. package/esm/shape/label/position/right.js.map +1 -0
  346. package/esm/shape/label/position/spider.d.ts +7 -0
  347. package/esm/shape/label/position/spider.js +34 -0
  348. package/esm/shape/label/position/spider.js.map +1 -0
  349. package/esm/shape/label/position/surround.d.ts +7 -0
  350. package/esm/shape/label/position/surround.js +35 -0
  351. package/esm/shape/label/position/surround.js.map +1 -0
  352. package/esm/shape/label/position/top.d.ts +1 -0
  353. package/esm/shape/label/position/top.js +2 -0
  354. package/esm/shape/label/position/top.js.map +1 -0
  355. package/esm/shape/label/position/topLeft.d.ts +1 -0
  356. package/esm/shape/label/position/topLeft.js +2 -0
  357. package/esm/shape/label/position/topLeft.js.map +1 -0
  358. package/esm/shape/label/position/topRight.d.ts +1 -0
  359. package/esm/shape/label/position/topRight.js +2 -0
  360. package/esm/shape/label/position/topRight.js.map +1 -0
  361. package/esm/shape/line/curve.js +24 -13
  362. package/esm/shape/line/curve.js.map +1 -1
  363. package/esm/shape/line/line.js +6 -2
  364. package/esm/shape/line/line.js.map +1 -1
  365. package/esm/shape/line/smooth.js +6 -2
  366. package/esm/shape/line/smooth.js.map +1 -1
  367. package/esm/shape/lineXY/line.js +2 -2
  368. package/esm/shape/lineXY/line.js.map +1 -1
  369. package/esm/shape/link/arc.js +2 -2
  370. package/esm/shape/link/arc.js.map +1 -1
  371. package/esm/shape/link/link.js +2 -2
  372. package/esm/shape/link/link.js.map +1 -1
  373. package/esm/shape/link/smooth.js +2 -2
  374. package/esm/shape/link/smooth.js.map +1 -1
  375. package/esm/shape/link/vhv.js +2 -2
  376. package/esm/shape/link/vhv.js.map +1 -1
  377. package/esm/shape/point/color.js +1 -1
  378. package/esm/shape/point/color.js.map +1 -1
  379. package/esm/shape/polygon/polygon.js +3 -3
  380. package/esm/shape/polygon/polygon.js.map +1 -1
  381. package/esm/shape/polygon/ribbon.js +3 -3
  382. package/esm/shape/polygon/ribbon.js.map +1 -1
  383. package/esm/shape/text/advance.js +3 -3
  384. package/esm/shape/text/advance.js.map +1 -1
  385. package/esm/shape/text/badge.js +3 -3
  386. package/esm/shape/text/badge.js.map +1 -1
  387. package/esm/shape/text/text.js +1 -1
  388. package/esm/shape/text/text.js.map +1 -1
  389. package/esm/shape/utils.d.ts +5 -0
  390. package/esm/shape/utils.js +14 -2
  391. package/esm/shape/utils.js.map +1 -1
  392. package/esm/shape/vector/vector.js +3 -3
  393. package/esm/shape/vector/vector.js.map +1 -1
  394. package/esm/spec/composition.d.ts +9 -7
  395. package/esm/spec/coordinate.d.ts +17 -33
  396. package/esm/spec/data.d.ts +32 -10
  397. package/esm/spec/geometry.d.ts +26 -11
  398. package/esm/spec/interaction.d.ts +81 -27
  399. package/esm/spec/labelTransform.d.ts +24 -11
  400. package/esm/spec/theme.d.ts +5 -2
  401. package/esm/spec/transform.d.ts +27 -4
  402. package/esm/spec/utils.d.ts +7 -0
  403. package/esm/spec/utils.js +2 -0
  404. package/esm/spec/utils.js.map +1 -0
  405. package/esm/stdlib/index.js +11 -17
  406. package/esm/stdlib/index.js.map +1 -1
  407. package/esm/theme/academy.d.ts +3 -0
  408. package/esm/theme/academy.js +404 -0
  409. package/esm/theme/academy.js.map +1 -0
  410. package/esm/theme/dark.js +163 -100
  411. package/esm/theme/dark.js.map +1 -1
  412. package/esm/theme/index.d.ts +1 -0
  413. package/esm/theme/index.js +1 -0
  414. package/esm/theme/index.js.map +1 -1
  415. package/esm/theme/light.js +177 -101
  416. package/esm/theme/light.js.map +1 -1
  417. package/esm/transform/filter.d.ts +7 -0
  418. package/esm/transform/filter.js +42 -0
  419. package/esm/transform/filter.js.map +1 -0
  420. package/esm/transform/groupN.js +2 -0
  421. package/esm/transform/groupN.js.map +1 -1
  422. package/esm/transform/index.d.ts +10 -6
  423. package/esm/transform/index.js +5 -3
  424. package/esm/transform/index.js.map +1 -1
  425. package/esm/transform/maybeTooltip.js +3 -1
  426. package/esm/transform/maybeTooltip.js.map +1 -1
  427. package/esm/transform/sample.d.ts +8 -0
  428. package/esm/transform/sample.js +64 -0
  429. package/esm/transform/sample.js.map +1 -0
  430. package/esm/transform/{Select.d.ts → select.d.ts} +0 -0
  431. package/esm/transform/{Select.js → select.js} +2 -14
  432. package/esm/transform/select.js.map +1 -0
  433. package/esm/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
  434. package/esm/transform/{SelectX.js → selectX.js} +3 -3
  435. package/esm/transform/selectX.js.map +1 -0
  436. package/esm/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
  437. package/esm/transform/{SelectY.js → selectY.js} +3 -3
  438. package/esm/transform/selectY.js.map +1 -0
  439. package/esm/transform/sort.d.ts +1 -1
  440. package/esm/transform/sort.js +39 -21
  441. package/esm/transform/sort.js.map +1 -1
  442. package/esm/transform/utils/lttb.d.ts +5 -0
  443. package/esm/transform/utils/lttb.js +56 -0
  444. package/esm/transform/utils/lttb.js.map +1 -0
  445. package/esm/utils/angle.d.ts +2 -0
  446. package/esm/utils/angle.js +7 -0
  447. package/esm/utils/angle.js.map +1 -0
  448. package/esm/utils/array.d.ts +8 -0
  449. package/esm/utils/array.js +35 -0
  450. package/esm/utils/array.js.map +1 -1
  451. package/esm/utils/bounds.d.ts +26 -0
  452. package/esm/utils/bounds.js +41 -0
  453. package/esm/utils/bounds.js.map +1 -0
  454. package/esm/utils/color.d.ts +6 -0
  455. package/esm/utils/color.js +7 -0
  456. package/esm/utils/color.js.map +1 -0
  457. package/esm/utils/coordinate.d.ts +5 -0
  458. package/esm/utils/coordinate.js +31 -0
  459. package/esm/utils/coordinate.js.map +1 -1
  460. package/esm/utils/event.d.ts +0 -2
  461. package/esm/utils/event.js +0 -18
  462. package/esm/utils/event.js.map +1 -1
  463. package/esm/utils/helper.d.ts +2 -0
  464. package/esm/utils/helper.js +10 -2
  465. package/esm/utils/helper.js.map +1 -1
  466. package/esm/utils/scale.d.ts +3 -0
  467. package/esm/utils/scale.js +30 -0
  468. package/esm/utils/scale.js.map +1 -0
  469. package/esm/utils/selection.d.ts +1 -0
  470. package/esm/utils/selection.js +5 -2
  471. package/esm/utils/selection.js.map +1 -1
  472. package/esm/utils/size.js +1 -1
  473. package/esm/utils/size.js.map +1 -1
  474. package/esm/utils/vector.d.ts +1 -1
  475. package/esm/utils/vector.js +1 -1
  476. package/lib/animation/morphing.js +32 -10
  477. package/lib/animation/morphing.js.map +1 -1
  478. package/lib/animation/waveIn.js +1 -12
  479. package/lib/animation/waveIn.js.map +1 -1
  480. package/lib/api/chart.d.ts +16 -7
  481. package/lib/api/chart.js +67 -27
  482. package/lib/api/chart.js.map +1 -1
  483. package/lib/api/composition/base.d.ts +21 -0
  484. package/lib/api/composition/base.js +62 -0
  485. package/lib/api/composition/base.js.map +1 -0
  486. package/lib/api/composition/facetCircle.d.ts +2 -3
  487. package/lib/api/composition/facetCircle.js +2 -2
  488. package/lib/api/composition/facetCircle.js.map +1 -1
  489. package/lib/api/composition/facetRect.d.ts +2 -3
  490. package/lib/api/composition/facetRect.js +2 -2
  491. package/lib/api/composition/facetRect.js.map +1 -1
  492. package/lib/api/composition/geoPath.d.ts +5 -7
  493. package/lib/api/composition/geoPath.js +4 -5
  494. package/lib/api/composition/geoPath.js.map +1 -1
  495. package/lib/api/composition/geoView.d.ts +4 -6
  496. package/lib/api/composition/geoView.js +4 -5
  497. package/lib/api/composition/geoView.js.map +1 -1
  498. package/lib/api/composition/index.d.ts +2 -1
  499. package/lib/api/composition/index.js +3 -1
  500. package/lib/api/composition/index.js.map +1 -1
  501. package/lib/api/composition/repeatMatrix.d.ts +2 -3
  502. package/lib/api/composition/repeatMatrix.js +2 -2
  503. package/lib/api/composition/repeatMatrix.js.map +1 -1
  504. package/lib/api/composition/spaceFlex.d.ts +2 -3
  505. package/lib/api/composition/spaceFlex.js +2 -2
  506. package/lib/api/composition/spaceFlex.js.map +1 -1
  507. package/lib/api/composition/spaceLayer.d.ts +2 -3
  508. package/lib/api/composition/spaceLayer.js +2 -2
  509. package/lib/api/composition/spaceLayer.js.map +1 -1
  510. package/lib/api/composition/timingKeyframe.d.ts +2 -3
  511. package/lib/api/composition/timingKeyframe.js +2 -2
  512. package/lib/api/composition/timingKeyframe.js.map +1 -1
  513. package/lib/api/composition/view.d.ts +5 -5
  514. package/lib/api/composition/view.js +6 -6
  515. package/lib/api/composition/view.js.map +1 -1
  516. package/lib/api/mark/base.d.ts +22 -0
  517. package/lib/api/mark/base.js +58 -0
  518. package/lib/api/mark/base.js.map +1 -0
  519. package/lib/api/mark/mark.d.ts +29 -29
  520. package/lib/api/mark/mark.js +32 -29
  521. package/lib/api/mark/mark.js.map +1 -1
  522. package/lib/api/mark/types.d.ts +5 -2
  523. package/lib/api/node.d.ts +2 -1
  524. package/lib/api/node.js +8 -9
  525. package/lib/api/node.js.map +1 -1
  526. package/lib/api/props.js +3 -22
  527. package/lib/api/props.js.map +1 -1
  528. package/lib/component/axis.d.ts +5 -8
  529. package/lib/component/axis.js +181 -234
  530. package/lib/component/axis.js.map +1 -1
  531. package/lib/component/axisArc.d.ts +7 -0
  532. package/lib/component/axisArc.js +13 -0
  533. package/lib/component/axisArc.js.map +1 -0
  534. package/lib/component/axisRadar.d.ts +9 -0
  535. package/lib/component/axisRadar.js +49 -0
  536. package/lib/component/axisRadar.js.map +1 -0
  537. package/lib/component/axisX.d.ts +2 -1
  538. package/lib/component/axisX.js +6 -4
  539. package/lib/component/axisX.js.map +1 -1
  540. package/lib/component/axisY.d.ts +1 -1
  541. package/lib/component/axisY.js +3 -3
  542. package/lib/component/axisY.js.map +1 -1
  543. package/lib/component/index.d.ts +14 -0
  544. package/lib/component/index.js +20 -1
  545. package/lib/component/index.js.map +1 -1
  546. package/lib/component/legendCategory.d.ts +5 -4
  547. package/lib/component/legendCategory.js +87 -55
  548. package/lib/component/legendCategory.js.map +1 -1
  549. package/lib/component/legendContinuous.d.ts +4 -2
  550. package/lib/component/legendContinuous.js +87 -25
  551. package/lib/component/legendContinuous.js.map +1 -1
  552. package/lib/component/legendContinuousBlock.d.ts +4 -0
  553. package/lib/component/legendContinuousBlock.js +10 -0
  554. package/lib/component/legendContinuousBlock.js.map +1 -0
  555. package/lib/component/legendContinuousBlockSize.d.ts +4 -0
  556. package/lib/component/legendContinuousBlockSize.js +10 -0
  557. package/lib/component/legendContinuousBlockSize.js.map +1 -0
  558. package/lib/component/legendContinuousSize.d.ts +4 -0
  559. package/lib/component/legendContinuousSize.js +14 -0
  560. package/lib/component/legendContinuousSize.js.map +1 -0
  561. package/lib/component/scrollbar.d.ts +9 -0
  562. package/lib/component/scrollbar.js +40 -0
  563. package/lib/component/scrollbar.js.map +1 -0
  564. package/lib/component/scrollbarX.d.ts +7 -0
  565. package/lib/component/scrollbarX.js +13 -0
  566. package/lib/component/scrollbarX.js.map +1 -0
  567. package/lib/component/scrollbarY.d.ts +7 -0
  568. package/lib/component/scrollbarY.js +13 -0
  569. package/lib/component/scrollbarY.js.map +1 -0
  570. package/lib/component/slider.d.ts +9 -0
  571. package/lib/component/slider.js +51 -0
  572. package/lib/component/slider.js.map +1 -0
  573. package/lib/component/sliderX.d.ts +7 -0
  574. package/lib/component/sliderX.js +13 -0
  575. package/lib/component/sliderX.js.map +1 -0
  576. package/lib/component/sliderY.d.ts +7 -0
  577. package/lib/component/sliderY.js +13 -0
  578. package/lib/component/sliderY.js.map +1 -0
  579. package/lib/component/title.js +47 -23
  580. package/lib/component/title.js.map +1 -1
  581. package/lib/component/utils.d.ts +13 -0
  582. package/lib/component/utils.js +55 -1
  583. package/lib/component/utils.js.map +1 -1
  584. package/lib/composition/facetCircle.js +2 -2
  585. package/lib/composition/facetCircle.js.map +1 -1
  586. package/lib/composition/facetRect.js +6 -8
  587. package/lib/composition/facetRect.js.map +1 -1
  588. package/lib/composition/mark.js +5 -3
  589. package/lib/composition/mark.js.map +1 -1
  590. package/lib/composition/repeatMatrix.js +4 -4
  591. package/lib/composition/repeatMatrix.js.map +1 -1
  592. package/lib/composition/view.js +8 -4
  593. package/lib/composition/view.js.map +1 -1
  594. package/lib/coordinate/fisheye.js +1 -1
  595. package/lib/coordinate/fisheye.js.map +1 -1
  596. package/lib/coordinate/index.d.ts +5 -13
  597. package/lib/coordinate/index.js +6 -11
  598. package/lib/coordinate/index.js.map +1 -1
  599. package/lib/coordinate/polar.d.ts +6 -0
  600. package/lib/coordinate/polar.js +20 -7
  601. package/lib/coordinate/polar.js.map +1 -1
  602. package/lib/coordinate/radar.d.ts +7 -0
  603. package/lib/coordinate/radar.js +18 -0
  604. package/lib/coordinate/radar.js.map +1 -0
  605. package/lib/coordinate/radial.d.ts +6 -0
  606. package/lib/coordinate/radial.js +21 -7
  607. package/lib/coordinate/radial.js.map +1 -1
  608. package/lib/coordinate/theta.d.ts +7 -0
  609. package/lib/coordinate/theta.js +18 -5
  610. package/lib/coordinate/theta.js.map +1 -1
  611. package/lib/coordinate/transpose.js +1 -1
  612. package/lib/coordinate/transpose.js.map +1 -1
  613. package/lib/data/filter.d.ts +3 -3
  614. package/lib/data/filter.js.map +1 -1
  615. package/lib/data/fold.js +4 -10
  616. package/lib/data/fold.js.map +1 -1
  617. package/lib/data/index.d.ts +5 -3
  618. package/lib/data/index.js +5 -3
  619. package/lib/data/index.js.map +1 -1
  620. package/lib/data/pick.js +10 -2
  621. package/lib/data/pick.js.map +1 -1
  622. package/lib/data/slice.d.ts +8 -0
  623. package/lib/data/slice.js +14 -0
  624. package/lib/data/slice.js.map +1 -0
  625. package/lib/data/sort.d.ts +8 -0
  626. package/lib/data/sort.js +17 -0
  627. package/lib/data/sort.js.map +1 -0
  628. package/lib/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
  629. package/lib/geo/{d3-projection.js → d3Projection.js} +1 -1
  630. package/lib/geo/d3Projection.js.map +1 -0
  631. package/lib/geo/geoView.js +4 -4
  632. package/lib/geo/geoView.js.map +1 -1
  633. package/lib/interaction/action/service/legendItemSelection.js.map +1 -1
  634. package/lib/interaction/action/transformer/setItemState.js.map +1 -1
  635. package/lib/interaction/builtin/activeRegion.d.ts +0 -2
  636. package/lib/interaction/builtin/brush.d.ts +1 -1
  637. package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
  638. package/lib/interaction/builtin/brushVisible.d.ts +1 -1
  639. package/lib/interaction/builtin/elementHighlight.d.ts +2 -0
  640. package/lib/interaction/builtin/elementHighlightByColor.d.ts +2 -0
  641. package/lib/interaction/builtin/elementHighlightByX.d.ts +2 -0
  642. package/lib/interaction/builtin/ellipsisText.d.ts +0 -3
  643. package/lib/interaction/builtin/fisheye.d.ts +6 -6
  644. package/lib/interaction/builtin/tooltip.d.ts +4 -8
  645. package/lib/interaction/index.d.ts +13 -0
  646. package/lib/interaction/index.js +25 -31
  647. package/lib/interaction/index.js.map +1 -1
  648. package/lib/interaction/native/brushAxisHighlight.d.ts +27 -0
  649. package/lib/interaction/native/brushAxisHighlight.js +172 -0
  650. package/lib/interaction/native/brushAxisHighlight.js.map +1 -0
  651. package/lib/interaction/native/brushFilter.d.ts +14 -0
  652. package/lib/interaction/native/brushFilter.js +127 -0
  653. package/lib/interaction/native/brushFilter.js.map +1 -0
  654. package/lib/interaction/native/brushHighlight.d.ts +41 -0
  655. package/lib/interaction/native/brushHighlight.js +355 -0
  656. package/lib/interaction/native/brushHighlight.js.map +1 -0
  657. package/lib/interaction/native/brushXFilter.d.ts +1 -0
  658. package/lib/interaction/native/brushXFilter.js +10 -0
  659. package/lib/interaction/native/brushXFilter.js.map +1 -0
  660. package/lib/interaction/native/brushXHighlight.d.ts +6 -0
  661. package/lib/interaction/native/brushXHighlight.js +14 -0
  662. package/lib/interaction/native/brushXHighlight.js.map +1 -0
  663. package/lib/interaction/native/brushYFilter.d.ts +1 -0
  664. package/lib/interaction/native/brushYFilter.js +10 -0
  665. package/lib/interaction/native/brushYFilter.js.map +1 -0
  666. package/lib/interaction/native/brushYHighlight.d.ts +6 -0
  667. package/lib/interaction/native/brushYHighlight.js +14 -0
  668. package/lib/interaction/native/brushYHighlight.js.map +1 -0
  669. package/lib/interaction/native/elementHighlight.d.ts +10 -2
  670. package/lib/interaction/native/elementHighlight.js +86 -23
  671. package/lib/interaction/native/elementHighlight.js.map +1 -1
  672. package/lib/interaction/native/elementHighlightByColor.d.ts +0 -3
  673. package/lib/interaction/native/elementHighlightByColor.js +1 -7
  674. package/lib/interaction/native/elementHighlightByColor.js.map +1 -1
  675. package/lib/interaction/native/elementHighlightByX.d.ts +1 -8
  676. package/lib/interaction/native/elementHighlightByX.js +2 -9
  677. package/lib/interaction/native/elementHighlightByX.js.map +1 -1
  678. package/lib/interaction/native/elementSelect.d.ts +7 -2
  679. package/lib/interaction/native/elementSelect.js +58 -26
  680. package/lib/interaction/native/elementSelect.js.map +1 -1
  681. package/lib/interaction/native/elementSelectByColor.js +1 -4
  682. package/lib/interaction/native/elementSelectByColor.js.map +1 -1
  683. package/lib/interaction/native/elementSelectByX.js +1 -4
  684. package/lib/interaction/native/elementSelectByX.js.map +1 -1
  685. package/lib/interaction/native/fisheye.js +6 -4
  686. package/lib/interaction/native/fisheye.js.map +1 -1
  687. package/lib/interaction/native/legendFilter.d.ts +14 -0
  688. package/lib/interaction/native/legendFilter.js +205 -0
  689. package/lib/interaction/native/legendFilter.js.map +1 -0
  690. package/lib/interaction/native/legendHighlight.d.ts +1 -0
  691. package/lib/interaction/native/legendHighlight.js +91 -0
  692. package/lib/interaction/native/legendHighlight.js.map +1 -0
  693. package/lib/interaction/native/poptip.d.ts +5 -0
  694. package/lib/interaction/native/poptip.js +95 -0
  695. package/lib/interaction/native/poptip.js.map +1 -0
  696. package/lib/interaction/native/sliderFilter.d.ts +5 -0
  697. package/lib/interaction/native/sliderFilter.js +91 -0
  698. package/lib/interaction/native/sliderFilter.js.map +1 -0
  699. package/lib/interaction/native/tooltip.d.ts +2 -2
  700. package/lib/interaction/native/tooltip.js +146 -44
  701. package/lib/interaction/native/tooltip.js.map +1 -1
  702. package/lib/interaction/native/utils.d.ts +24 -5
  703. package/lib/interaction/native/utils.js +258 -44
  704. package/lib/interaction/native/utils.js.map +1 -1
  705. package/lib/label-transform/contrastReverse.d.ts +9 -0
  706. package/lib/label-transform/contrastReverse.js +52 -0
  707. package/lib/label-transform/contrastReverse.js.map +1 -0
  708. package/lib/label-transform/index.d.ts +8 -8
  709. package/lib/label-transform/index.js +9 -9
  710. package/lib/label-transform/index.js.map +1 -1
  711. package/lib/label-transform/overflowHide.d.ts +7 -0
  712. package/lib/label-transform/overflowHide.js +22 -0
  713. package/lib/label-transform/overflowHide.js.map +1 -0
  714. package/lib/label-transform/overlapDodgeY.d.ts +7 -0
  715. package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
  716. package/lib/label-transform/overlapDodgeY.js.map +1 -0
  717. package/lib/label-transform/overlapHide.d.ts +7 -0
  718. package/lib/label-transform/overlapHide.js +28 -0
  719. package/lib/label-transform/overlapHide.js.map +1 -0
  720. package/lib/mark/area.js +2 -2
  721. package/lib/mark/area.js.map +1 -1
  722. package/lib/mark/boxplot.js +5 -18
  723. package/lib/mark/boxplot.js.map +1 -1
  724. package/lib/mark/cell.js +1 -1
  725. package/lib/mark/line.js +1 -1
  726. package/lib/mark/line.js.map +1 -1
  727. package/lib/mark/pack.js +2 -3
  728. package/lib/mark/pack.js.map +1 -1
  729. package/lib/mark/sankey.js +1 -0
  730. package/lib/mark/sankey.js.map +1 -1
  731. package/lib/mark/treemap.js +2 -3
  732. package/lib/mark/treemap.js.map +1 -1
  733. package/lib/mark/wordCloud.js +2 -2
  734. package/lib/mark/wordCloud.js.map +1 -1
  735. package/lib/runtime/component.d.ts +4 -1
  736. package/lib/runtime/component.js +276 -108
  737. package/lib/runtime/component.js.map +1 -1
  738. package/lib/runtime/coordinate.d.ts +12 -0
  739. package/lib/runtime/coordinate.js +51 -17
  740. package/lib/runtime/coordinate.js.map +1 -1
  741. package/lib/runtime/layout.d.ts +1 -1
  742. package/lib/runtime/layout.js +146 -77
  743. package/lib/runtime/layout.js.map +1 -1
  744. package/lib/runtime/plot.d.ts +1 -1
  745. package/lib/runtime/plot.js +152 -66
  746. package/lib/runtime/plot.js.map +1 -1
  747. package/lib/runtime/render.d.ts +0 -1
  748. package/lib/runtime/render.js +24 -47
  749. package/lib/runtime/render.js.map +1 -1
  750. package/lib/runtime/scale.d.ts +3 -1
  751. package/lib/runtime/scale.js +61 -5
  752. package/lib/runtime/scale.js.map +1 -1
  753. package/lib/runtime/transform.js +17 -7
  754. package/lib/runtime/transform.js.map +1 -1
  755. package/lib/runtime/types/common.d.ts +38 -11
  756. package/lib/runtime/types/component.d.ts +13 -8
  757. package/lib/runtime/types/mark.d.ts +1 -1
  758. package/lib/runtime/types/options.d.ts +14 -12
  759. package/lib/runtime/types/scale.d.ts +18 -0
  760. package/lib/runtime/types/scale.js +22 -0
  761. package/lib/runtime/types/scale.js.map +1 -0
  762. package/lib/runtime/types/theme.d.ts +8 -5
  763. package/lib/shape/area/curve.js +16 -16
  764. package/lib/shape/area/curve.js.map +1 -1
  765. package/lib/shape/area/hv.d.ts +3 -0
  766. package/lib/shape/area/hv.js +13 -0
  767. package/lib/shape/area/hv.js.map +1 -0
  768. package/lib/shape/area/hvh.d.ts +3 -0
  769. package/lib/shape/area/{step.js → hvh.js} +5 -5
  770. package/lib/shape/area/hvh.js.map +1 -0
  771. package/lib/shape/area/vh.d.ts +3 -0
  772. package/lib/shape/area/vh.js +13 -0
  773. package/lib/shape/area/vh.js.map +1 -0
  774. package/lib/shape/box/box.js +1 -1
  775. package/lib/shape/box/box.js.map +1 -1
  776. package/lib/shape/connector/connector.js +3 -3
  777. package/lib/shape/connector/connector.js.map +1 -1
  778. package/lib/shape/image/image.js +2 -2
  779. package/lib/shape/image/image.js.map +1 -1
  780. package/lib/shape/index.d.ts +6 -2
  781. package/lib/shape/index.js +7 -3
  782. package/lib/shape/index.js.map +1 -1
  783. package/lib/shape/interval/color.d.ts +1 -0
  784. package/lib/shape/interval/color.js +69 -52
  785. package/lib/shape/interval/color.js.map +1 -1
  786. package/lib/shape/label/label.js +3 -3
  787. package/lib/shape/label/label.js.map +1 -1
  788. package/lib/shape/label/position/area.d.ts +13 -0
  789. package/lib/shape/label/position/area.js +32 -0
  790. package/lib/shape/label/position/area.js.map +1 -0
  791. package/lib/shape/label/position/bottom.d.ts +1 -0
  792. package/lib/shape/label/position/bottom.js +6 -0
  793. package/lib/shape/label/position/bottom.js.map +1 -0
  794. package/lib/shape/label/position/bottomLeft.d.ts +1 -0
  795. package/lib/shape/label/position/bottomLeft.js +6 -0
  796. package/lib/shape/label/position/bottomLeft.js.map +1 -0
  797. package/lib/shape/label/position/bottomRight.d.ts +1 -0
  798. package/lib/shape/label/position/bottomRight.js +6 -0
  799. package/lib/shape/label/position/bottomRight.js.map +1 -0
  800. package/lib/shape/label/position/default.d.ts +18 -0
  801. package/lib/shape/label/{position.js → position/default.js} +24 -81
  802. package/lib/shape/label/position/default.js.map +1 -0
  803. package/lib/shape/label/position/index.d.ts +13 -0
  804. package/lib/shape/label/position/index.js +30 -0
  805. package/lib/shape/label/position/index.js.map +1 -0
  806. package/lib/shape/label/position/inside.d.ts +1 -0
  807. package/lib/shape/label/position/inside.js +6 -0
  808. package/lib/shape/label/position/inside.js.map +1 -0
  809. package/lib/shape/label/position/left.d.ts +1 -0
  810. package/lib/shape/label/position/left.js +6 -0
  811. package/lib/shape/label/position/left.js.map +1 -0
  812. package/lib/shape/label/position/outside.d.ts +18 -0
  813. package/lib/shape/label/position/outside.js +75 -0
  814. package/lib/shape/label/position/outside.js.map +1 -0
  815. package/lib/shape/label/position/right.d.ts +1 -0
  816. package/lib/shape/label/position/right.js +6 -0
  817. package/lib/shape/label/position/right.js.map +1 -0
  818. package/lib/shape/label/position/spider.d.ts +7 -0
  819. package/lib/shape/label/position/spider.js +38 -0
  820. package/lib/shape/label/position/spider.js.map +1 -0
  821. package/lib/shape/label/position/surround.d.ts +7 -0
  822. package/lib/shape/label/position/surround.js +39 -0
  823. package/lib/shape/label/position/surround.js.map +1 -0
  824. package/lib/shape/label/position/top.d.ts +1 -0
  825. package/lib/shape/label/position/top.js +6 -0
  826. package/lib/shape/label/position/top.js.map +1 -0
  827. package/lib/shape/label/position/topLeft.d.ts +1 -0
  828. package/lib/shape/label/position/topLeft.js +6 -0
  829. package/lib/shape/label/position/topLeft.js.map +1 -0
  830. package/lib/shape/label/position/topRight.d.ts +1 -0
  831. package/lib/shape/label/position/topRight.js +6 -0
  832. package/lib/shape/label/position/topRight.js.map +1 -0
  833. package/lib/shape/line/curve.js +22 -11
  834. package/lib/shape/line/curve.js.map +1 -1
  835. package/lib/shape/line/line.js +5 -1
  836. package/lib/shape/line/line.js.map +1 -1
  837. package/lib/shape/line/smooth.js +5 -1
  838. package/lib/shape/line/smooth.js.map +1 -1
  839. package/lib/shape/lineXY/line.js +2 -2
  840. package/lib/shape/lineXY/line.js.map +1 -1
  841. package/lib/shape/link/arc.js +2 -2
  842. package/lib/shape/link/arc.js.map +1 -1
  843. package/lib/shape/link/link.js +2 -2
  844. package/lib/shape/link/link.js.map +1 -1
  845. package/lib/shape/link/smooth.js +2 -2
  846. package/lib/shape/link/smooth.js.map +1 -1
  847. package/lib/shape/link/vhv.js +2 -2
  848. package/lib/shape/link/vhv.js.map +1 -1
  849. package/lib/shape/point/color.js +1 -1
  850. package/lib/shape/point/color.js.map +1 -1
  851. package/lib/shape/polygon/polygon.js +3 -3
  852. package/lib/shape/polygon/polygon.js.map +1 -1
  853. package/lib/shape/polygon/ribbon.js +3 -3
  854. package/lib/shape/polygon/ribbon.js.map +1 -1
  855. package/lib/shape/text/advance.js +3 -3
  856. package/lib/shape/text/advance.js.map +1 -1
  857. package/lib/shape/text/badge.js +3 -3
  858. package/lib/shape/text/badge.js.map +1 -1
  859. package/lib/shape/text/text.js +1 -1
  860. package/lib/shape/text/text.js.map +1 -1
  861. package/lib/shape/utils.d.ts +5 -0
  862. package/lib/shape/utils.js +15 -2
  863. package/lib/shape/utils.js.map +1 -1
  864. package/lib/shape/vector/vector.js +3 -3
  865. package/lib/shape/vector/vector.js.map +1 -1
  866. package/lib/spec/composition.d.ts +9 -7
  867. package/lib/spec/coordinate.d.ts +17 -33
  868. package/lib/spec/data.d.ts +32 -10
  869. package/lib/spec/geometry.d.ts +26 -11
  870. package/lib/spec/interaction.d.ts +81 -27
  871. package/lib/spec/labelTransform.d.ts +24 -11
  872. package/lib/spec/theme.d.ts +5 -2
  873. package/lib/spec/transform.d.ts +27 -4
  874. package/lib/spec/utils.d.ts +7 -0
  875. package/lib/spec/utils.js +3 -0
  876. package/lib/spec/utils.js.map +1 -0
  877. package/lib/stdlib/index.js +3 -4
  878. package/lib/stdlib/index.js.map +1 -1
  879. package/lib/theme/academy.d.ts +3 -0
  880. package/lib/theme/academy.js +408 -0
  881. package/lib/theme/academy.js.map +1 -0
  882. package/lib/theme/dark.js +163 -100
  883. package/lib/theme/dark.js.map +1 -1
  884. package/lib/theme/index.d.ts +1 -0
  885. package/lib/theme/index.js +3 -1
  886. package/lib/theme/index.js.map +1 -1
  887. package/lib/theme/light.js +177 -101
  888. package/lib/theme/light.js.map +1 -1
  889. package/lib/transform/filter.d.ts +7 -0
  890. package/lib/transform/filter.js +46 -0
  891. package/lib/transform/filter.js.map +1 -0
  892. package/lib/transform/groupN.js +2 -0
  893. package/lib/transform/groupN.js.map +1 -1
  894. package/lib/transform/index.d.ts +10 -6
  895. package/lib/transform/index.js +11 -7
  896. package/lib/transform/index.js.map +1 -1
  897. package/lib/transform/maybeTooltip.js +3 -1
  898. package/lib/transform/maybeTooltip.js.map +1 -1
  899. package/lib/transform/sample.d.ts +8 -0
  900. package/lib/transform/sample.js +68 -0
  901. package/lib/transform/sample.js.map +1 -0
  902. package/lib/transform/{Select.d.ts → select.d.ts} +0 -0
  903. package/lib/transform/{Select.js → select.js} +2 -14
  904. package/lib/transform/select.js.map +1 -0
  905. package/lib/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
  906. package/lib/transform/{SelectX.js → selectX.js} +3 -3
  907. package/lib/transform/selectX.js.map +1 -0
  908. package/lib/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
  909. package/lib/transform/{SelectY.js → selectY.js} +3 -3
  910. package/lib/transform/selectY.js.map +1 -0
  911. package/lib/transform/sort.d.ts +1 -1
  912. package/lib/transform/sort.js +38 -20
  913. package/lib/transform/sort.js.map +1 -1
  914. package/lib/transform/utils/lttb.d.ts +5 -0
  915. package/lib/transform/utils/lttb.js +60 -0
  916. package/lib/transform/utils/lttb.js.map +1 -0
  917. package/lib/utils/angle.d.ts +2 -0
  918. package/lib/utils/angle.js +12 -0
  919. package/lib/utils/angle.js.map +1 -0
  920. package/lib/utils/array.d.ts +8 -0
  921. package/lib/utils/array.js +38 -1
  922. package/lib/utils/array.js.map +1 -1
  923. package/lib/utils/bounds.d.ts +26 -0
  924. package/lib/utils/bounds.js +48 -0
  925. package/lib/utils/bounds.js.map +1 -0
  926. package/lib/utils/color.d.ts +6 -0
  927. package/lib/utils/color.js +11 -0
  928. package/lib/utils/color.js.map +1 -0
  929. package/lib/utils/coordinate.d.ts +5 -0
  930. package/lib/utils/coordinate.js +37 -1
  931. package/lib/utils/coordinate.js.map +1 -1
  932. package/lib/utils/event.d.ts +0 -2
  933. package/lib/utils/event.js +1 -21
  934. package/lib/utils/event.js.map +1 -1
  935. package/lib/utils/helper.d.ts +2 -0
  936. package/lib/utils/helper.js +12 -2
  937. package/lib/utils/helper.js.map +1 -1
  938. package/lib/utils/scale.d.ts +3 -0
  939. package/lib/utils/scale.js +36 -0
  940. package/lib/utils/scale.js.map +1 -0
  941. package/lib/utils/selection.d.ts +1 -0
  942. package/lib/utils/selection.js +5 -2
  943. package/lib/utils/selection.js.map +1 -1
  944. package/lib/utils/size.js +1 -1
  945. package/lib/utils/size.js.map +1 -1
  946. package/lib/utils/vector.d.ts +1 -1
  947. package/lib/utils/vector.js +1 -1
  948. package/package.json +9 -8
  949. package/src/animation/morphing.ts +35 -10
  950. package/src/animation/waveIn.ts +0 -1
  951. package/src/api/chart.ts +78 -37
  952. package/src/api/composition/base.ts +56 -0
  953. package/src/api/composition/facetCircle.ts +2 -3
  954. package/src/api/composition/facetRect.ts +2 -3
  955. package/src/api/composition/geoPath.ts +6 -9
  956. package/src/api/composition/geoView.ts +6 -9
  957. package/src/api/composition/index.ts +2 -0
  958. package/src/api/composition/repeatMatrix.ts +2 -3
  959. package/src/api/composition/spaceFlex.ts +2 -3
  960. package/src/api/composition/spaceLayer.ts +2 -3
  961. package/src/api/composition/timingKeyframe.ts +2 -3
  962. package/src/api/composition/view.ts +10 -8
  963. package/src/api/mark/base.ts +58 -0
  964. package/src/api/mark/mark.ts +34 -30
  965. package/src/api/mark/types.ts +5 -2
  966. package/src/api/node.ts +9 -11
  967. package/src/api/props.ts +4 -25
  968. package/src/component/axis.ts +341 -366
  969. package/src/component/axisArc.ts +16 -0
  970. package/src/component/axisRadar.ts +72 -0
  971. package/src/component/axisX.ts +7 -4
  972. package/src/component/axisY.ts +4 -4
  973. package/src/component/index.ts +14 -0
  974. package/src/component/legendCategory.ts +182 -76
  975. package/src/component/legendContinuous.ts +133 -33
  976. package/src/component/legendContinuousBlock.ts +17 -0
  977. package/src/component/legendContinuousBlockSize.ts +22 -0
  978. package/src/component/legendContinuousSize.ts +27 -0
  979. package/src/component/scrollbar.ts +41 -0
  980. package/src/component/scrollbarX.ts +16 -0
  981. package/src/component/scrollbarY.ts +16 -0
  982. package/src/component/slider.ts +52 -0
  983. package/src/component/sliderX.ts +16 -0
  984. package/src/component/sliderY.ts +16 -0
  985. package/src/component/title.ts +70 -31
  986. package/src/component/utils.ts +51 -0
  987. package/src/composition/facetCircle.ts +2 -2
  988. package/src/composition/facetRect.ts +6 -6
  989. package/src/composition/mark.ts +8 -4
  990. package/src/composition/repeatMatrix.ts +10 -3
  991. package/src/composition/view.ts +22 -2
  992. package/src/coordinate/fisheye.ts +1 -1
  993. package/src/coordinate/index.ts +5 -13
  994. package/src/coordinate/polar.ts +19 -11
  995. package/src/coordinate/radar.ts +24 -0
  996. package/src/coordinate/radial.ts +21 -11
  997. package/src/coordinate/theta.ts +18 -9
  998. package/src/coordinate/transpose.ts +1 -1
  999. package/src/data/filter.ts +3 -3
  1000. package/src/data/fold.ts +6 -10
  1001. package/src/data/index.ts +5 -3
  1002. package/src/data/pick.ts +11 -2
  1003. package/src/data/slice.ts +15 -0
  1004. package/src/data/sort.ts +18 -0
  1005. package/src/geo/{d3-projection.ts → d3Projection.ts} +0 -0
  1006. package/src/geo/geoView.ts +4 -4
  1007. package/src/interaction/action/service/legendItemSelection.ts +1 -2
  1008. package/src/interaction/action/transformer/setItemState.ts +2 -3
  1009. package/src/interaction/index.ts +29 -16
  1010. package/src/interaction/native/brushAxisHighlight.ts +207 -0
  1011. package/src/interaction/native/brushFilter.ts +143 -0
  1012. package/src/interaction/native/brushHighlight.ts +447 -0
  1013. package/src/interaction/native/brushXFilter.ts +10 -0
  1014. package/src/interaction/native/brushXHighlight.ts +13 -0
  1015. package/src/interaction/native/brushYFilter.ts +10 -0
  1016. package/src/interaction/native/brushYHighlight.ts +13 -0
  1017. package/src/interaction/native/elementHighlight.ts +99 -15
  1018. package/src/interaction/native/elementHighlightByColor.ts +3 -20
  1019. package/src/interaction/native/elementHighlightByX.ts +4 -23
  1020. package/src/interaction/native/elementSelect.ts +79 -20
  1021. package/src/interaction/native/elementSelectByColor.ts +3 -16
  1022. package/src/interaction/native/elementSelectByX.ts +3 -16
  1023. package/src/interaction/native/fisheye.ts +6 -4
  1024. package/src/interaction/native/legendFilter.ts +214 -0
  1025. package/src/interaction/native/legendHighlight.ts +100 -0
  1026. package/src/interaction/native/poptip.ts +87 -0
  1027. package/src/interaction/native/sliderFilter.ts +112 -0
  1028. package/src/interaction/native/tooltip.ts +191 -49
  1029. package/src/interaction/native/utils.ts +298 -44
  1030. package/src/label-transform/contrastReverse.ts +56 -0
  1031. package/src/label-transform/index.ts +8 -8
  1032. package/src/label-transform/overflowHide.ts +23 -0
  1033. package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +7 -7
  1034. package/src/label-transform/overlapHide.ts +32 -0
  1035. package/src/mark/area.ts +2 -2
  1036. package/src/mark/boxplot.ts +3 -1
  1037. package/src/mark/cell.ts +1 -1
  1038. package/src/mark/line.ts +1 -1
  1039. package/src/mark/pack.ts +1 -1
  1040. package/src/mark/sankey.ts +1 -0
  1041. package/src/mark/treemap.ts +1 -1
  1042. package/src/mark/wordCloud.ts +1 -0
  1043. package/src/runtime/component.ts +393 -143
  1044. package/src/runtime/coordinate.ts +46 -16
  1045. package/src/runtime/layout.ts +206 -97
  1046. package/src/runtime/plot.ts +253 -118
  1047. package/src/runtime/render.ts +33 -72
  1048. package/src/runtime/scale.ts +70 -7
  1049. package/src/runtime/transform.ts +22 -6
  1050. package/src/runtime/types/common.ts +50 -20
  1051. package/src/runtime/types/component.ts +18 -11
  1052. package/src/runtime/types/mark.ts +1 -1
  1053. package/src/runtime/types/options.ts +30 -22
  1054. package/src/runtime/types/scale.ts +20 -0
  1055. package/src/runtime/types/theme.ts +8 -5
  1056. package/src/shape/area/curve.ts +22 -17
  1057. package/src/shape/area/hv.ts +20 -0
  1058. package/src/shape/area/{step.ts → hvh.ts} +3 -3
  1059. package/src/shape/area/vh.ts +20 -0
  1060. package/src/shape/box/box.ts +6 -6
  1061. package/src/shape/connector/connector.ts +3 -4
  1062. package/src/shape/image/image.ts +2 -2
  1063. package/src/shape/index.ts +7 -2
  1064. package/src/shape/interval/color.ts +95 -60
  1065. package/src/shape/label/label.ts +4 -3
  1066. package/src/shape/label/position/area.ts +39 -0
  1067. package/src/shape/label/position/bottom.ts +1 -0
  1068. package/src/shape/label/position/bottomLeft.ts +1 -0
  1069. package/src/shape/label/position/bottomRight.ts +1 -0
  1070. package/src/shape/label/{position.ts → position/default.ts} +26 -110
  1071. package/src/shape/label/position/index.ts +13 -0
  1072. package/src/shape/label/position/inside.ts +1 -0
  1073. package/src/shape/label/position/left.ts +1 -0
  1074. package/src/shape/label/position/outside.ts +121 -0
  1075. package/src/shape/label/position/right.ts +1 -0
  1076. package/src/shape/label/position/spider.ts +39 -0
  1077. package/src/shape/label/position/surround.ts +40 -0
  1078. package/src/shape/label/position/top.ts +1 -0
  1079. package/src/shape/label/position/topLeft.ts +1 -0
  1080. package/src/shape/label/position/topRight.ts +1 -0
  1081. package/src/shape/line/curve.ts +28 -13
  1082. package/src/shape/line/line.ts +6 -2
  1083. package/src/shape/line/smooth.ts +11 -2
  1084. package/src/shape/lineXY/line.ts +2 -2
  1085. package/src/shape/link/arc.ts +2 -2
  1086. package/src/shape/link/link.ts +2 -2
  1087. package/src/shape/link/smooth.ts +2 -2
  1088. package/src/shape/link/vhv.ts +2 -2
  1089. package/src/shape/point/color.ts +6 -5
  1090. package/src/shape/polygon/polygon.ts +3 -3
  1091. package/src/shape/polygon/ribbon.ts +3 -3
  1092. package/src/shape/text/advance.ts +6 -3
  1093. package/src/shape/text/badge.ts +8 -3
  1094. package/src/shape/text/text.ts +1 -1
  1095. package/src/shape/utils.ts +16 -6
  1096. package/src/shape/vector/vector.ts +3 -3
  1097. package/src/spec/action.ts +0 -1
  1098. package/src/spec/composition.ts +8 -8
  1099. package/src/spec/coordinate.ts +25 -51
  1100. package/src/spec/data.ts +36 -11
  1101. package/src/spec/geometry.ts +31 -15
  1102. package/src/spec/interaction.ts +120 -50
  1103. package/src/spec/labelTransform.ts +29 -11
  1104. package/src/spec/theme.ts +6 -2
  1105. package/src/spec/transform.ts +47 -3
  1106. package/src/spec/utils.ts +7 -0
  1107. package/src/stdlib/index.ts +73 -27
  1108. package/src/theme/academy.ts +410 -0
  1109. package/src/theme/dark.ts +164 -101
  1110. package/src/theme/index.ts +1 -0
  1111. package/src/theme/light.ts +177 -102
  1112. package/src/transform/filter.ts +48 -0
  1113. package/src/transform/groupN.ts +2 -0
  1114. package/src/transform/index.ts +10 -6
  1115. package/src/transform/maybeTooltip.ts +3 -1
  1116. package/src/transform/sample.ts +80 -0
  1117. package/src/transform/select.ts +1 -2
  1118. package/src/transform/selectX.ts +2 -2
  1119. package/src/transform/selectY.ts +2 -2
  1120. package/src/transform/sort.ts +53 -21
  1121. package/src/transform/utils/lttb.ts +73 -0
  1122. package/src/utils/angle.ts +7 -0
  1123. package/src/utils/array.ts +39 -0
  1124. package/src/utils/bounds.ts +52 -0
  1125. package/src/utils/color.ts +12 -0
  1126. package/src/utils/coordinate.ts +41 -0
  1127. package/src/utils/event.ts +0 -26
  1128. package/src/utils/helper.ts +17 -2
  1129. package/src/utils/scale.ts +31 -0
  1130. package/src/utils/selection.ts +7 -2
  1131. package/src/utils/size.ts +1 -1
  1132. package/src/utils/vector.ts +1 -1
  1133. package/esm/coordinate/fisheyeX.d.ts +0 -7
  1134. package/esm/coordinate/fisheyeX.js +0 -6
  1135. package/esm/coordinate/fisheyeX.js.map +0 -1
  1136. package/esm/coordinate/fisheyeY.d.ts +0 -7
  1137. package/esm/coordinate/fisheyeY.js +0 -6
  1138. package/esm/coordinate/fisheyeY.js.map +0 -1
  1139. package/esm/coordinate/reflect.d.ts +0 -7
  1140. package/esm/coordinate/reflect.js +0 -10
  1141. package/esm/coordinate/reflect.js.map +0 -1
  1142. package/esm/coordinate/reflectX.d.ts +0 -7
  1143. package/esm/coordinate/reflectX.js +0 -10
  1144. package/esm/coordinate/reflectX.js.map +0 -1
  1145. package/esm/coordinate/reflectY.d.ts +0 -7
  1146. package/esm/coordinate/reflectY.js +0 -10
  1147. package/esm/coordinate/reflectY.js.map +0 -1
  1148. package/esm/data/subset.d.ts +0 -7
  1149. package/esm/data/subset.js +0 -26
  1150. package/esm/data/subset.js.map +0 -1
  1151. package/esm/geo/d3-projection.js.map +0 -1
  1152. package/esm/label-transform/dodgeY.d.ts +0 -7
  1153. package/esm/label-transform/dodgeY.js.map +0 -1
  1154. package/esm/label-transform/hideOverlap.d.ts +0 -4
  1155. package/esm/label-transform/hideOverlap.js +0 -48
  1156. package/esm/label-transform/hideOverlap.js.map +0 -1
  1157. package/esm/label-transform/spider.d.ts +0 -7
  1158. package/esm/label-transform/spider.js +0 -30
  1159. package/esm/label-transform/spider.js.map +0 -1
  1160. package/esm/label-transform/surround.d.ts +0 -7
  1161. package/esm/label-transform/surround.js +0 -30
  1162. package/esm/label-transform/surround.js.map +0 -1
  1163. package/esm/shape/area/step.d.ts +0 -3
  1164. package/esm/shape/area/step.js.map +0 -1
  1165. package/esm/shape/label/position.d.ts +0 -25
  1166. package/esm/shape/label/position.js +0 -169
  1167. package/esm/shape/label/position.js.map +0 -1
  1168. package/esm/transform/Select.js.map +0 -1
  1169. package/esm/transform/SelectX.js.map +0 -1
  1170. package/esm/transform/SelectY.js.map +0 -1
  1171. package/lib/coordinate/fisheyeX.d.ts +0 -7
  1172. package/lib/coordinate/fisheyeX.js +0 -10
  1173. package/lib/coordinate/fisheyeX.js.map +0 -1
  1174. package/lib/coordinate/fisheyeY.d.ts +0 -7
  1175. package/lib/coordinate/fisheyeY.js +0 -10
  1176. package/lib/coordinate/fisheyeY.js.map +0 -1
  1177. package/lib/coordinate/reflect.d.ts +0 -7
  1178. package/lib/coordinate/reflect.js +0 -14
  1179. package/lib/coordinate/reflect.js.map +0 -1
  1180. package/lib/coordinate/reflectX.d.ts +0 -7
  1181. package/lib/coordinate/reflectX.js +0 -14
  1182. package/lib/coordinate/reflectX.js.map +0 -1
  1183. package/lib/coordinate/reflectY.d.ts +0 -7
  1184. package/lib/coordinate/reflectY.js +0 -14
  1185. package/lib/coordinate/reflectY.js.map +0 -1
  1186. package/lib/data/subset.d.ts +0 -7
  1187. package/lib/data/subset.js +0 -30
  1188. package/lib/data/subset.js.map +0 -1
  1189. package/lib/geo/d3-projection.js.map +0 -1
  1190. package/lib/label-transform/dodgeY.d.ts +0 -7
  1191. package/lib/label-transform/dodgeY.js.map +0 -1
  1192. package/lib/label-transform/hideOverlap.d.ts +0 -4
  1193. package/lib/label-transform/hideOverlap.js +0 -52
  1194. package/lib/label-transform/hideOverlap.js.map +0 -1
  1195. package/lib/label-transform/spider.d.ts +0 -7
  1196. package/lib/label-transform/spider.js +0 -34
  1197. package/lib/label-transform/spider.js.map +0 -1
  1198. package/lib/label-transform/surround.d.ts +0 -7
  1199. package/lib/label-transform/surround.js +0 -34
  1200. package/lib/label-transform/surround.js.map +0 -1
  1201. package/lib/shape/area/step.d.ts +0 -3
  1202. package/lib/shape/area/step.js.map +0 -1
  1203. package/lib/shape/label/position.d.ts +0 -25
  1204. package/lib/shape/label/position.js.map +0 -1
  1205. package/lib/transform/Select.js.map +0 -1
  1206. package/lib/transform/SelectX.js.map +0 -1
  1207. package/lib/transform/SelectY.js.map +0 -1
  1208. package/src/coordinate/fisheyeX.ts +0 -15
  1209. package/src/coordinate/fisheyeY.ts +0 -15
  1210. package/src/coordinate/reflect.ts +0 -15
  1211. package/src/coordinate/reflectX.ts +0 -15
  1212. package/src/coordinate/reflectY.ts +0 -15
  1213. package/src/data/subset.ts +0 -35
  1214. package/src/label-transform/hideOverlap.ts +0 -62
  1215. package/src/label-transform/spider.ts +0 -37
  1216. package/src/label-transform/surround.ts +0 -37
@@ -1,11 +1,11 @@
1
1
  import { Canvas as GCanvas, DisplayObject, Group } from '@antv/g';
2
2
  import { Renderer as CanvasRenderer } from '@antv/g-canvas';
3
3
  import { Plugin as DragAndDropPlugin } from '@antv/g-plugin-dragndrop';
4
- import { debounce, deepMix, isEmpty } from '@antv/util';
4
+ import { deepMix } from '@antv/util';
5
+ import EventEmitter from '@antv/event-emitter';
5
6
  import { createLibrary } from '../stdlib';
6
7
  import { select } from '../utils/selection';
7
- import { emitEvent, CHART_LIFE_CIRCLE, offEvent } from '../utils/event';
8
- import { getChartSize } from '../utils/size';
8
+ import { CHART_LIFE_CIRCLE } from '../utils/event';
9
9
  import { G2Context, G2ViewTree } from './types/options';
10
10
  import { plot } from './plot';
11
11
 
@@ -64,21 +64,19 @@ export function render<T extends G2ViewTree = G2ViewTree>(
64
64
  callback?: () => void,
65
65
  ): HTMLElement {
66
66
  // Initialize the context if it is not provided.
67
- const { width = 640, height = 480, autoFit = false, on } = options;
67
+ const { width = 640, height = 480, on } = options;
68
68
  const keyed = inferKeys(options);
69
- const { canvas = Canvas(width, height), library = createLibrary() } = context;
69
+ const {
70
+ canvas = Canvas(width, height),
71
+ library = createLibrary(),
72
+ emitter = new EventEmitter(),
73
+ } = context;
70
74
  context.canvas = canvas;
71
75
  context.library = library;
72
-
73
- if (autoFit && !context.bindAutoFit) {
74
- // Bind the autoFit event once.
75
- bindAutoFit(options, context);
76
- context.bindAutoFit = true;
77
- }
78
-
76
+ context.emitter = emitter;
79
77
  canvas.resize(width, height);
80
78
 
81
- emitEvent(on, CHART_LIFE_CIRCLE.BEFORE_RENDER);
79
+ emitter.emit(CHART_LIFE_CIRCLE.BEFORE_RENDER);
82
80
 
83
81
  // Plot the chart and mutate context.
84
82
  // Make sure that plot chart after container is ready for every time.
@@ -87,8 +85,10 @@ export function render<T extends G2ViewTree = G2ViewTree>(
87
85
  .then(() =>
88
86
  plot<T>({ ...keyed, width, height }, selection, library, context),
89
87
  )
90
- .then(callback)
91
- .then(() => emitEvent(on, CHART_LIFE_CIRCLE.AFTER_RENDER));
88
+ .then(() => {
89
+ emitter.emit(CHART_LIFE_CIRCLE.AFTER_RENDER);
90
+ callback?.();
91
+ });
92
92
 
93
93
  // Return the container HTML element wraps the canvas or svg element.
94
94
  return normalizeContainer(canvas.getConfig().container);
@@ -102,22 +102,30 @@ export function renderToMountedElement<T extends G2ViewTree = G2ViewTree>(
102
102
  // Initialize the context if it is not provided.
103
103
  const { width = 640, height = 480, on } = options;
104
104
  const keyed = inferKeys(options);
105
- const { library = createLibrary(), group = new Group() } = context;
106
-
107
- if (isEmpty(group?.parentElement)) {
108
- throw new Error(`Unmounted group`);
105
+ const {
106
+ library = createLibrary(),
107
+ group = new Group(),
108
+ emitter = new EventEmitter(),
109
+ } = context;
110
+
111
+ if (!group?.parentElement) {
112
+ throw new Error(
113
+ `renderToMountedElement can't render chart to unmounted group.`,
114
+ );
109
115
  }
110
116
 
111
117
  const selection = select(group);
112
118
  context.group = group;
113
119
  context.library = library;
120
+ context.emitter = emitter;
114
121
 
115
- emitEvent(on, CHART_LIFE_CIRCLE.BEFORE_RENDER);
122
+ emitter.emit(CHART_LIFE_CIRCLE.BEFORE_RENDER);
116
123
  // Plot the chart and mutate context.
117
124
  // Make sure that plot chart after container is ready for every time.
118
- plot<T>({ ...keyed, width, height }, selection, library, context)
119
- .then(callback)
120
- .then(() => emitEvent(on, CHART_LIFE_CIRCLE.AFTER_RENDER));
125
+ plot<T>({ ...keyed, width, height }, selection, library, context).then(() => {
126
+ emitter.emit(CHART_LIFE_CIRCLE.AFTER_RENDER);
127
+ callback?.();
128
+ });
121
129
 
122
130
  // Return the Group wraps the canvas or svg element.
123
131
  return group;
@@ -127,15 +135,11 @@ export function destroy<T extends G2ViewTree = G2ViewTree>(
127
135
  options: T,
128
136
  context: G2Context = {},
129
137
  ) {
130
- const { on } = options;
131
- const { canvas } = context;
138
+ const { canvas, emitter } = context;
132
139
  if (canvas) {
133
140
  canvas.destroy();
134
141
  }
135
-
136
- // Unbind chart events.
137
- unbindAutoFit(options, context);
138
- offEvent(on);
142
+ emitter.off();
139
143
  }
140
144
 
141
145
  function normalizeContainer(container: HTMLElement | string): HTMLElement {
@@ -143,46 +147,3 @@ function normalizeContainer(container: HTMLElement | string): HTMLElement {
143
147
  ? document.getElementById(container)
144
148
  : container;
145
149
  }
146
-
147
- const onResize = <T extends G2ViewTree = G2ViewTree>(
148
- options: T,
149
- context: G2Context = {},
150
- ) =>
151
- debounce(() => {
152
- // Update size.
153
- const { width, height, autoFit } = options;
154
- const { canvas } = context;
155
- const container = canvas.getConfig().container as HTMLElement;
156
- const { width: adjustedWidth, height: adjustedHeight } = getChartSize(
157
- container,
158
- autoFit,
159
- width,
160
- height,
161
- );
162
- const newOptions = {
163
- ...options,
164
- width: adjustedWidth,
165
- height: adjustedHeight,
166
- };
167
- if (newOptions.width && newOptions.height) render(newOptions, context);
168
- }, 300);
169
-
170
- export function bindAutoFit<T extends G2ViewTree = G2ViewTree>(
171
- options: T,
172
- context: G2Context = {},
173
- ) {
174
- const { autoFit } = options;
175
- if (autoFit) {
176
- window.addEventListener('resize', onResize(options, context));
177
- }
178
- }
179
-
180
- function unbindAutoFit<T extends G2ViewTree = G2ViewTree>(
181
- options: T,
182
- context: G2Context = {},
183
- ) {
184
- const { autoFit } = options;
185
- if (autoFit) {
186
- window.removeEventListener('resize', onResize(options, context));
187
- }
188
- }
@@ -3,7 +3,7 @@ import { extent } from 'd3-array';
3
3
  import * as d3ScaleChromatic from 'd3-scale-chromatic';
4
4
  import { upperFirst } from '@antv/util';
5
5
  import { firstOf, lastOf, unique } from '../utils/array';
6
- import { defined, identity } from '../utils/helper';
6
+ import { defined, identity, isStrictObject } from '../utils/helper';
7
7
  import { Primitive, G2Theme, G2MarkState, ChannelGroups } from './types/common';
8
8
  import {
9
9
  G2CoordinateOptions,
@@ -103,6 +103,20 @@ export function useRelation(
103
103
  return [conditionalize, deconditionalize];
104
104
  }
105
105
 
106
+ export function useRelationScale(
107
+ options: Record<string, any>,
108
+ library: G2Library,
109
+ ) {
110
+ const [useScale] = useLibrary<G2ScaleOptions, ScaleComponent, Scale>(
111
+ 'scale',
112
+ library,
113
+ );
114
+ const { relations } = options;
115
+ const [conditionalize] = useRelation(relations);
116
+ const scale = useScale(options);
117
+ return conditionalize(scale);
118
+ }
119
+
106
120
  export function syncFacetsScales(states: Map<G2Mark, G2MarkState>[]): void {
107
121
  const scales = states
108
122
  .flatMap((d) => Array.from(d.values()))
@@ -155,7 +169,7 @@ function inferScaleType(
155
169
  ): string | ScaleComponent {
156
170
  const { type, domain, range } = options;
157
171
  if (type !== undefined) return type;
158
-
172
+ if (isObject(values)) return 'identity';
159
173
  if (typeof range === 'string') return 'linear';
160
174
  if ((domain || range || []).length > 2) return asOrdinalType(name);
161
175
  if (domain !== undefined) {
@@ -220,6 +234,7 @@ function inferScaleRange(
220
234
  case 'linear':
221
235
  case 'time':
222
236
  case 'log':
237
+ case 'pow':
223
238
  case 'sqrt': {
224
239
  const colors = categoricalColors(values, options, domain, theme, library);
225
240
  const [r0, r1] = inferRangeQ(name, colors);
@@ -275,11 +290,15 @@ function categoricalColors(
275
290
  );
276
291
  const { defaultCategory10: c10, defaultCategory20: c20 } = theme;
277
292
  const defaultPalette = unique(values.flat()).length <= c10.length ? c10 : c20;
278
- const { palette, offset } = options;
279
- const colors =
280
- interpolatedColors(palette, domain, offset) ||
281
- usePalette({ type: palette || defaultPalette });
282
- return colors;
293
+ const { palette = defaultPalette, offset } = options;
294
+ // Built-in palettes have higher priority.
295
+ try {
296
+ return usePalette({ type: palette });
297
+ } catch (e) {
298
+ const colors = interpolatedColors(palette, domain, offset);
299
+ if (colors) return colors;
300
+ throw new Error(`Unknown Component: ${palette} `);
301
+ }
283
302
  }
284
303
 
285
304
  function gradientColors(range: string): string[] {
@@ -446,6 +465,10 @@ function isTemporal(values: Primitive[][]): boolean {
446
465
  return some(values, (d) => d instanceof Date);
447
466
  }
448
467
 
468
+ function isObject(values: Primitive[][]): boolean {
469
+ return some(values, isStrictObject);
470
+ }
471
+
449
472
  function some(values, callback) {
450
473
  for (const V of values) {
451
474
  if (V.some(callback)) return true;
@@ -476,3 +499,43 @@ export function isPosition(name: string): boolean {
476
499
  name === 'exitDuration'
477
500
  );
478
501
  }
502
+
503
+ export function isValidScale(scale: G2ScaleOptions) {
504
+ if (!scale || !scale.type) return false;
505
+ if (typeof scale.type === 'function') return true;
506
+ const { type, domain, range, interpolator } = scale;
507
+ const isValidDomain = domain && domain.length > 0;
508
+ const isValidRange = range && range.length > 0;
509
+
510
+ if (
511
+ [
512
+ 'linear',
513
+ 'sqrt',
514
+ 'log',
515
+ 'time',
516
+ 'pow',
517
+ 'threshold',
518
+ 'quantize',
519
+ 'quantile',
520
+ 'ordinal',
521
+ 'band',
522
+ 'point',
523
+ ].includes(type) &&
524
+ isValidDomain &&
525
+ isValidRange
526
+ ) {
527
+ return true;
528
+ }
529
+
530
+ if (
531
+ ['sequential'].includes(type) &&
532
+ isValidDomain &&
533
+ (isValidRange || interpolator)
534
+ ) {
535
+ return true;
536
+ }
537
+
538
+ if (['constant', 'identity'].includes(type) && isValidRange) return true;
539
+
540
+ return false;
541
+ }
@@ -149,7 +149,7 @@ export function addGuideToScale(
149
149
  mark: G2Mark,
150
150
  context: TransformContext,
151
151
  ): [number[], G2Mark] {
152
- const { axis = {}, legend = {} } = mark;
152
+ const { axis = {}, legend = {}, slider = {}, scrollbar = {} } = mark;
153
153
  const normalize = (guide: boolean | Record<string, any>, channel: string) => {
154
154
  if (typeof guide === 'boolean') return guide ? {} : null;
155
155
  const eachGuide = guide[channel];
@@ -165,11 +165,18 @@ export function addGuideToScale(
165
165
  ...Object.fromEntries(
166
166
  axisChannels.map((channel) => [
167
167
  channel,
168
- { guide: normalize(axis, channel) },
168
+ {
169
+ guide: normalize(axis, channel),
170
+ slider: normalize(slider, channel),
171
+ scrollbar: normalize(scrollbar, channel),
172
+ },
169
173
  ]),
170
174
  ),
171
175
  color: { guide: normalize(legend, 'color') },
172
176
  size: { guide: normalize(legend, 'size') },
177
+ shape: { guide: normalize(legend, 'shape') },
178
+ // fixme: opacity is conflict with DisplayObject.opacity
179
+ // opacity: { guide: normalize(legend, 'opacity') },
173
180
  },
174
181
  });
175
182
  return [I, mark];
@@ -193,19 +200,28 @@ export function maybeNonAnimate(
193
200
  }
194
201
 
195
202
  function isTypedChannel(channel): boolean {
196
- if (typeof channel !== 'object' || channel instanceof Date) return false;
203
+ if (
204
+ typeof channel !== 'object' ||
205
+ channel instanceof Date ||
206
+ channel === null
207
+ ) {
208
+ return false;
209
+ }
197
210
  const { type } = channel;
198
211
  return defined(type);
199
212
  }
200
213
 
201
214
  function inferChannelType(data: Record<string, Primitive>[], channel): string {
202
215
  if (typeof channel === 'function') return 'transform';
203
- if (typeof channel === 'string' && data?.[0]?.[channel] !== undefined) {
204
- return 'field';
205
- }
216
+ if (typeof channel === 'string' && isField(data, channel)) return 'field';
206
217
  return 'constant';
207
218
  }
208
219
 
220
+ function isField(data: Record<string, Primitive>[], value: string): boolean {
221
+ if (!Array.isArray(data)) return false;
222
+ return data.some((d) => d[value] !== undefined);
223
+ }
224
+
209
225
  function normalizedDataSource(data) {
210
226
  // Return null as a placeholder.
211
227
  if (!data) return { type: 'inline', value: null };
@@ -1,5 +1,5 @@
1
1
  import { Coordinate } from '@antv/coord';
2
- import { DisplayObject } from '@antv/g';
2
+ import { DisplayObject, TextStyleProps } from '@antv/g';
3
3
  import { G2GuideComponentOptions, G2Mark, G2ViewTree } from './options';
4
4
  import { LabelTransform, Scale } from './component';
5
5
  import { MarkProps } from './mark';
@@ -8,11 +8,28 @@ import { G2Theme } from './theme';
8
8
  export type { G2Theme };
9
9
 
10
10
  export type G2Title = {
11
- text?: string;
11
+ /**
12
+ * Height of title, default is 36.
13
+ */
14
+ size?: number;
15
+ /**
16
+ * Text of title.
17
+ */
18
+ title?: string;
19
+ /**
20
+ * Text of subtitle.
21
+ */
12
22
  subtitle?: string | null;
13
- style?: Record<string, any>;
14
- subtitleStyle?: Record<string, any>;
15
- };
23
+ /**
24
+ * Align method for title.
25
+ */
26
+ align?: 'left' | 'center' | 'right';
27
+ /**
28
+ * The vertical spacing between title and subtitle, default is 2.
29
+ */
30
+ spacing?: number;
31
+ } & WithPrefix<Omit<TextStyleProps, 'x' | 'y' | 'text'>, 'title'> & // G.Text style for title.
32
+ WithPrefix<Omit<TextStyleProps, 'x' | 'y' | 'text'>, 'subtitle'>; // G.Text style for subtitle.
16
33
 
17
34
  export type G2ViewDescriptor = {
18
35
  scale: Record<string, Scale>;
@@ -22,7 +39,8 @@ export type G2ViewDescriptor = {
22
39
  components: G2GuideComponentOptions[];
23
40
  layout: Layout;
24
41
  key: string;
25
- labelTransform?: LabelTransform;
42
+ clip: boolean;
43
+ labelTransform: LabelTransform;
26
44
  // @todo More accurate type.
27
45
  style: Record<string, any>;
28
46
  };
@@ -58,10 +76,9 @@ export type Primitive = number | string | boolean | Date;
58
76
 
59
77
  export type TabularData = Record<string, Primitive>[];
60
78
 
61
- export type WithPrefix<T, P extends string, F = keyof T> = F extends keyof T &
62
- string
63
- ? { [key in `${P}${Capitalize<F>}`]?: T[F] }
64
- : unknown;
79
+ export type WithPrefix<O extends Record<string, any>, P extends string> = {
80
+ [K in keyof O as `${P}${Capitalize<K & string>}`]?: O[K];
81
+ };
65
82
 
66
83
  export type EncodeFunction = (
67
84
  data: Record<string, MaybeArray<Primitive>>[],
@@ -110,18 +127,24 @@ export type BBox = {
110
127
  height?: number;
111
128
  };
112
129
 
113
- export type GuideComponentPosition =
130
+ export type GuidePrimitivePosition =
114
131
  | 'top'
115
- | 'left'
116
132
  | 'bottom'
133
+ | 'left'
117
134
  | 'right'
118
- | 'centerHorizontal'
119
- | 'centerVertical'
120
135
  | 'center'
121
- | 'arc'
122
- | 'arcY'
123
- | 'arcInner'
124
- | 'arcCenter';
136
+ | 'inner'
137
+ | 'outer';
138
+ export type GuideCompositePosition =
139
+ | 'top-left'
140
+ | 'top-right'
141
+ | 'bottom-left'
142
+ | 'bottom-right';
143
+ export type GuideComponentPosition =
144
+ | GuidePrimitivePosition
145
+ | GuideCompositePosition;
146
+
147
+ export type GuideComponentOrientation = 'horizontal' | 'vertical' | number;
125
148
 
126
149
  export type Layout = {
127
150
  paddingLeft?: number;
@@ -145,13 +168,20 @@ export type Layout = {
145
168
  y?: number;
146
169
  };
147
170
 
148
- // @todo Using emus.
171
+ export type Direction = 'horizontal' | 'vertical' | 'center';
172
+
173
+ export type FlexLayout = {
174
+ flexDirection?: 'row' | 'column';
175
+ justifyContent?: 'flex-start' | 'flex-end' | 'center';
176
+ alignItems?: 'flex-start' | 'flex-end' | 'center';
177
+ };
178
+
149
179
  export type SectionArea = [
150
180
  x: number,
151
181
  y: number,
152
182
  width: number,
153
183
  height: number,
154
- direction: 0 | 1 | -1, // horizontal: 1, vertical: 0, center: -1
184
+ direction: Direction,
155
185
  reverse: boolean,
156
186
  comparator: (a: Primitive, b: Primitive) => number,
157
187
  ];
@@ -1,18 +1,19 @@
1
+ import { Coordinate, Transformation } from '@antv/coord';
1
2
  import { DisplayObject, IAnimation as GAnimation } from '@antv/g';
2
- import { Transformation, Coordinate } from '@antv/coord';
3
+ import { G2ViewTree } from './options';
3
4
  import {
4
- IndexedValue,
5
5
  G2Theme,
6
- Vector2,
6
+ G2ViewInstance,
7
7
  GuideComponentPosition,
8
+ GuideComponentOrientation,
9
+ IndexedValue,
8
10
  Layout,
9
- G2ViewInstance,
11
+ Vector2,
10
12
  } from './common';
11
- import { G2ViewTree } from './options';
12
- import { EncodeComponent, Encode } from './encode';
13
- import { MarkComponent, Mark } from './mark';
14
- import { TransformComponent, Transform } from './transform';
15
13
  import { DataComponent } from './data';
14
+ import { Encode, EncodeComponent } from './encode';
15
+ import { Mark, MarkComponent } from './mark';
16
+ import { Transform, TransformComponent } from './transform';
16
17
 
17
18
  export type G2ComponentNamespaces =
18
19
  | 'coordinate'
@@ -116,9 +117,13 @@ export type ScaleComponent<O = Record<string, unknown>> = G2BaseComponent<
116
117
  >;
117
118
 
118
119
  export type CoordinateTransform = Transformation[];
120
+ export type CoordinateProps = {
121
+ transform?: boolean;
122
+ };
119
123
  export type CoordinateComponent<O = Record<string, unknown>> = G2BaseComponent<
120
124
  CoordinateTransform,
121
- O
125
+ O,
126
+ CoordinateProps
122
127
  >;
123
128
 
124
129
  export type Palette = string[];
@@ -156,15 +161,17 @@ export type ThemeComponent<O = Record<string, unknown>> = G2BaseComponent<
156
161
  >;
157
162
 
158
163
  export type GuideComponent = (
159
- scale: Scale,
164
+ scales: Scale[],
160
165
  style: Record<string, any>,
161
166
  coordinate: Coordinate,
162
167
  theme: G2Theme,
163
168
  ) => DisplayObject;
164
169
  export type GuideComponentProps = {
165
- defaultPosition: GuideComponentPosition;
170
+ defaultPosition?: GuideComponentPosition;
171
+ defaultOrientation?: GuideComponentOrientation;
166
172
  defaultSize: number;
167
173
  defaultOrder: number;
174
+ [key: string]: any;
168
175
  };
169
176
  export type GuideComponentComponent<O = Record<string, unknown>> =
170
177
  G2BaseComponent<GuideComponent, O, GuideComponentProps>;
@@ -23,7 +23,7 @@ export type MarkProps = {
23
23
  interaction?: {
24
24
  shareTooltip?: boolean;
25
25
  seriesTooltip?: boolean;
26
- showCrosshairs?: boolean;
26
+ crosshairs?: boolean;
27
27
  };
28
28
  };
29
29
 
@@ -1,29 +1,36 @@
1
- import { Canvas, IAnimation as GAnimation } from '@antv/g';
1
+ import EventEmitter from '@antv/event-emitter';
2
2
  import type { DisplayObject } from '@antv/g';
3
- import { G2Title, GuideComponentPosition, Layout, Primitive } from './common';
3
+ import { Canvas, IAnimation as GAnimation } from '@antv/g';
4
4
  import {
5
+ G2Title,
6
+ G2ViewDescriptor,
7
+ GuideComponentPosition,
8
+ Layout,
9
+ Primitive,
10
+ } from './common';
11
+ import {
12
+ AdjustComponent,
13
+ AnimationComponent,
14
+ CompositionComponent,
15
+ CoordinateComponent,
5
16
  G2BaseComponent,
6
- StatisticComponent,
7
- ThemeComponent,
8
17
  G2ComponentNamespaces,
9
- CoordinateComponent,
10
- ScaleComponent,
11
- InferComponent,
12
- ShapeComponent,
13
- PaletteComponent,
14
18
  GuideComponentComponent,
15
- AnimationComponent,
19
+ InferComponent,
16
20
  InteractionComponent,
17
- CompositionComponent,
18
- AdjustComponent,
19
- Scale,
20
21
  LabelTransformComponent,
22
+ PaletteComponent,
23
+ Scale,
24
+ ScaleComponent,
25
+ ShapeComponent,
26
+ StatisticComponent,
27
+ ThemeComponent,
21
28
  } from './component';
22
29
 
23
- import { TransformComponent } from './transform';
30
+ import { DataComponent } from './data';
24
31
  import { EncodeComponent } from './encode';
25
32
  import { MarkComponent } from './mark';
26
- import { DataComponent } from './data';
33
+ import { TransformComponent } from './transform';
27
34
 
28
35
  export type G2ViewTree = {
29
36
  width?: number;
@@ -46,9 +53,10 @@ export type G2Library = Record<
46
53
  export type G2Context = {
47
54
  library?: G2Library;
48
55
  canvas?: Canvas;
56
+ emitter?: EventEmitter;
49
57
  group?: DisplayObject;
50
58
  animations?: GAnimation[];
51
- bindAutoFit?: boolean;
59
+ views?: G2ViewDescriptor[];
52
60
  };
53
61
 
54
62
  export type G2View = {
@@ -76,12 +84,13 @@ export type G2View = {
76
84
  title?: G2TitleOptions;
77
85
  coordinates?: G2CoordinateOptions[];
78
86
  component?: G2GuideComponentOptions[];
79
- interactions?: G2InteractionOptions[];
87
+ interaction?: Record<string, any>;
80
88
  marks?: G2Mark[];
81
89
  frame?: boolean;
82
90
  labelTransform?: G2LabelTransformOptions[];
83
91
  style?: Record<string, any>;
84
92
  tooltip?: boolean;
93
+ clip?: boolean;
85
94
  };
86
95
 
87
96
  export type G2Mark = {
@@ -100,6 +109,8 @@ export type G2Mark = {
100
109
  facet?: boolean;
101
110
  axis?: boolean | Record<string, any>;
102
111
  legend?: boolean | Record<string, any>;
112
+ slider?: Record<string, any>;
113
+ scrollbar?: Record<string, any>;
103
114
  filter?: (i: number) => boolean;
104
115
  children?: G2MarkChildrenCallback;
105
116
  dataDomain?: number;
@@ -107,6 +118,7 @@ export type G2Mark = {
107
118
  frame?: boolean;
108
119
  style?: Record<string, Primitive>;
109
120
  labels?: Record<string, any>[];
121
+ interaction?: Record<string, any>;
110
122
  };
111
123
 
112
124
  export type G2MarkChildrenCallback = (
@@ -178,9 +190,5 @@ export type G2CompositionOptions = G2BaseComponentOptions<CompositionComponent>;
178
190
  export type G2AdjustOptions = G2BaseComponentOptions<AdjustComponent>;
179
191
  export type G2LabelTransformOptions =
180
192
  G2BaseComponentOptions<LabelTransformComponent>;
181
- export type G2TitleOptions = G2Title & {
182
- position?: GuideComponentPosition;
183
- size?: number;
184
- zIndex?: number;
185
- };
193
+ export type G2TitleOptions = G2Title;
186
194
  export type G2DataOptions = G2BaseComponent<DataComponent>;
@@ -0,0 +1,20 @@
1
+ export const ContinuousScale = {
2
+ linear: 'linear',
3
+ identity: 'identity',
4
+ log: 'log',
5
+ pow: 'pow',
6
+ sqrt: 'sqrt',
7
+ sequential: 'sequential',
8
+ } as const;
9
+
10
+ export const DistributionScale = {
11
+ threshold: 'threshold',
12
+ quantize: 'quantize',
13
+ quantile: 'quantile',
14
+ } as const;
15
+
16
+ export const DiscreteScale = {
17
+ ordinal: 'ordinal',
18
+ band: 'band',
19
+ point: 'point',
20
+ } as const;
@@ -1,5 +1,5 @@
1
1
  import { TextStyleProps, PathStyleProps } from '@antv/g';
2
- import { WithPrefix } from './common';
2
+ import { G2Title, WithPrefix } from './common';
3
3
 
4
4
  type TupleToUnion<T, U> = T extends [infer F, ...infer R]
5
5
  ? F extends string
@@ -70,16 +70,19 @@ type InteractionTheme = {
70
70
 
71
71
  type ComponentTheme = {
72
72
  axis?: any;
73
+ axisLinear?: any;
74
+ axisTop?: any;
75
+ axisBottom?: any;
76
+ axisLeft?: any;
77
+ axisRight?: any;
78
+ axisRadar?: any;
73
79
  legend?: any;
74
80
  continuousLegend?: any;
75
81
  label?: LabelStyleProps;
76
82
  innerLabel?: LabelStyleProps;
77
83
  slider?: any;
78
84
  scrollbar?: any;
79
- title?: Omit<TextStyleProps, 'text'>;
80
- subtitle?: Omit<TextStyleProps, 'text'> & {
81
- spacing?: number;
82
- };
85
+ title?: Partial<G2Title>;
83
86
  };
84
87
 
85
88
  type AnimationTheme = {