@antv/g2 5.0.0-beta.6 → 5.0.0-beta.8

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 (387) hide show
  1. package/dist/g2-lite.min.js +3 -3
  2. package/dist/g2.min.js +3 -3
  3. package/esm/api/chart.d.ts +8 -4
  4. package/esm/api/chart.js +33 -17
  5. package/esm/api/chart.js.map +1 -1
  6. package/esm/api/composition/base.d.ts +21 -0
  7. package/esm/api/composition/base.js +59 -0
  8. package/esm/api/composition/base.js.map +1 -0
  9. package/esm/api/composition/facetCircle.d.ts +2 -3
  10. package/esm/api/composition/facetCircle.js +2 -2
  11. package/esm/api/composition/facetCircle.js.map +1 -1
  12. package/esm/api/composition/facetRect.d.ts +2 -3
  13. package/esm/api/composition/facetRect.js +2 -2
  14. package/esm/api/composition/facetRect.js.map +1 -1
  15. package/esm/api/composition/geoPath.d.ts +2 -3
  16. package/esm/api/composition/geoPath.js +2 -2
  17. package/esm/api/composition/geoPath.js.map +1 -1
  18. package/esm/api/composition/geoView.d.ts +2 -3
  19. package/esm/api/composition/geoView.js +2 -2
  20. package/esm/api/composition/geoView.js.map +1 -1
  21. package/esm/api/composition/index.d.ts +2 -1
  22. package/esm/api/composition/index.js +2 -1
  23. package/esm/api/composition/index.js.map +1 -1
  24. package/esm/api/composition/repeatMatrix.d.ts +2 -3
  25. package/esm/api/composition/repeatMatrix.js +2 -2
  26. package/esm/api/composition/repeatMatrix.js.map +1 -1
  27. package/esm/api/composition/spaceFlex.d.ts +2 -3
  28. package/esm/api/composition/spaceFlex.js +2 -2
  29. package/esm/api/composition/spaceFlex.js.map +1 -1
  30. package/esm/api/composition/spaceLayer.d.ts +2 -3
  31. package/esm/api/composition/spaceLayer.js +2 -2
  32. package/esm/api/composition/spaceLayer.js.map +1 -1
  33. package/esm/api/composition/timingKeyframe.d.ts +2 -3
  34. package/esm/api/composition/timingKeyframe.js +2 -2
  35. package/esm/api/composition/timingKeyframe.js.map +1 -1
  36. package/esm/api/composition/view.d.ts +3 -3
  37. package/esm/api/composition/view.js +4 -4
  38. package/esm/api/composition/view.js.map +1 -1
  39. package/esm/api/mark/base.d.ts +22 -0
  40. package/esm/api/mark/base.js +54 -0
  41. package/esm/api/mark/base.js.map +1 -0
  42. package/esm/api/mark/mark.d.ts +29 -29
  43. package/esm/api/mark/mark.js +27 -27
  44. package/esm/api/mark/mark.js.map +1 -1
  45. package/esm/api/node.d.ts +2 -1
  46. package/esm/api/node.js +8 -9
  47. package/esm/api/node.js.map +1 -1
  48. package/esm/api/props.js +0 -20
  49. package/esm/api/props.js.map +1 -1
  50. package/esm/component/axis.js +4 -0
  51. package/esm/component/axis.js.map +1 -1
  52. package/esm/component/legendContinuous.d.ts +1 -0
  53. package/esm/component/legendContinuous.js +14 -16
  54. package/esm/component/legendContinuous.js.map +1 -1
  55. package/esm/component/slider.js +3 -13
  56. package/esm/component/slider.js.map +1 -1
  57. package/esm/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
  58. package/esm/geo/{d3-projection.js → d3Projection.js} +1 -1
  59. package/esm/geo/d3Projection.js.map +1 -0
  60. package/esm/geo/geoView.js +1 -1
  61. package/esm/geo/geoView.js.map +1 -1
  62. package/esm/interaction/builtin/elementHighlight.d.ts +2 -0
  63. package/esm/interaction/builtin/elementHighlightByColor.d.ts +2 -0
  64. package/esm/interaction/builtin/elementHighlightByX.d.ts +2 -0
  65. package/esm/interaction/index.d.ts +2 -0
  66. package/esm/interaction/index.js +2 -0
  67. package/esm/interaction/index.js.map +1 -1
  68. package/esm/interaction/native/brushFilter.d.ts +3 -1
  69. package/esm/interaction/native/brushFilter.js +7 -32
  70. package/esm/interaction/native/brushFilter.js.map +1 -1
  71. package/esm/interaction/native/brushXFilter.js +1 -1
  72. package/esm/interaction/native/brushXFilter.js.map +1 -1
  73. package/esm/interaction/native/brushYFilter.js +1 -1
  74. package/esm/interaction/native/brushYFilter.js.map +1 -1
  75. package/esm/interaction/native/elementHighlight.d.ts +7 -2
  76. package/esm/interaction/native/elementHighlight.js +72 -18
  77. package/esm/interaction/native/elementHighlight.js.map +1 -1
  78. package/esm/interaction/native/elementHighlightByColor.d.ts +4 -1
  79. package/esm/interaction/native/elementHighlightByColor.js +19 -3
  80. package/esm/interaction/native/elementHighlightByColor.js.map +1 -1
  81. package/esm/interaction/native/elementHighlightByX.d.ts +3 -3
  82. package/esm/interaction/native/elementHighlightByX.js +19 -3
  83. package/esm/interaction/native/elementHighlightByX.js.map +1 -1
  84. package/esm/interaction/native/elementSelect.d.ts +1 -1
  85. package/esm/interaction/native/elementSelect.js +42 -20
  86. package/esm/interaction/native/elementSelect.js.map +1 -1
  87. package/esm/interaction/native/elementSelectByColor.js +3 -2
  88. package/esm/interaction/native/elementSelectByColor.js.map +1 -1
  89. package/esm/interaction/native/elementSelectByX.js +3 -2
  90. package/esm/interaction/native/elementSelectByX.js.map +1 -1
  91. package/esm/interaction/native/legendFilter.d.ts +4 -0
  92. package/esm/interaction/native/legendFilter.js +7 -4
  93. package/esm/interaction/native/legendFilter.js.map +1 -1
  94. package/esm/interaction/native/legendHighlight.d.ts +4 -0
  95. package/esm/interaction/native/legendHighlight.js +94 -0
  96. package/esm/interaction/native/legendHighlight.js.map +1 -0
  97. package/esm/interaction/native/sliderFilter.d.ts +5 -0
  98. package/esm/interaction/native/sliderFilter.js +87 -0
  99. package/esm/interaction/native/sliderFilter.js.map +1 -0
  100. package/esm/interaction/native/tooltip.js +11 -0
  101. package/esm/interaction/native/tooltip.js.map +1 -1
  102. package/esm/interaction/native/utils.d.ts +13 -2
  103. package/esm/interaction/native/utils.js +151 -26
  104. package/esm/interaction/native/utils.js.map +1 -1
  105. package/esm/label-transform/overlapDodgeY.js.map +1 -1
  106. package/esm/mark/area.js +1 -1
  107. package/esm/mark/area.js.map +1 -1
  108. package/esm/runtime/component.d.ts +1 -1
  109. package/esm/runtime/component.js +5 -3
  110. package/esm/runtime/component.js.map +1 -1
  111. package/esm/runtime/plot.d.ts +1 -1
  112. package/esm/runtime/plot.js +68 -29
  113. package/esm/runtime/plot.js.map +1 -1
  114. package/esm/runtime/render.js +18 -13
  115. package/esm/runtime/render.js.map +1 -1
  116. package/esm/runtime/scale.d.ts +2 -1
  117. package/esm/runtime/scale.js +7 -0
  118. package/esm/runtime/scale.js.map +1 -1
  119. package/esm/runtime/types/options.d.ts +4 -2
  120. package/esm/shape/area/hv.d.ts +3 -0
  121. package/esm/shape/area/hv.js +9 -0
  122. package/esm/shape/area/hv.js.map +1 -0
  123. package/esm/shape/area/hvh.d.ts +3 -0
  124. package/esm/shape/area/{step.js → hvh.js} +3 -3
  125. package/esm/shape/area/hvh.js.map +1 -0
  126. package/esm/shape/area/vh.d.ts +3 -0
  127. package/esm/shape/area/vh.js +9 -0
  128. package/esm/shape/area/vh.js.map +1 -0
  129. package/esm/shape/index.d.ts +6 -2
  130. package/esm/shape/index.js +3 -1
  131. package/esm/shape/index.js.map +1 -1
  132. package/esm/shape/interval/color.d.ts +1 -0
  133. package/esm/shape/interval/color.js +65 -53
  134. package/esm/shape/interval/color.js.map +1 -1
  135. package/esm/spec/composition.d.ts +0 -3
  136. package/esm/spec/geometry.d.ts +1 -0
  137. package/esm/spec/interaction.d.ts +30 -11
  138. package/esm/spec/transform.d.ts +15 -5
  139. package/esm/stdlib/index.js +3 -8
  140. package/esm/stdlib/index.js.map +1 -1
  141. package/esm/transform/sample.js +42 -26
  142. package/esm/transform/sample.js.map +1 -1
  143. package/esm/transform/select.js +1 -13
  144. package/esm/transform/select.js.map +1 -1
  145. package/esm/transform/selectX.js +1 -1
  146. package/esm/transform/selectX.js.map +1 -1
  147. package/esm/transform/selectY.js +1 -1
  148. package/esm/transform/selectY.js.map +1 -1
  149. package/esm/transform/utils/lttb.d.ts +5 -0
  150. package/esm/transform/utils/lttb.js +56 -0
  151. package/esm/transform/utils/lttb.js.map +1 -0
  152. package/esm/utils/event.d.ts +0 -2
  153. package/esm/utils/event.js +0 -18
  154. package/esm/utils/event.js.map +1 -1
  155. package/esm/utils/scale.d.ts +3 -0
  156. package/esm/utils/scale.js +30 -0
  157. package/esm/utils/scale.js.map +1 -0
  158. package/esm/utils/vector.d.ts +1 -1
  159. package/esm/utils/vector.js +1 -1
  160. package/lib/api/chart.d.ts +8 -4
  161. package/lib/api/chart.js +34 -15
  162. package/lib/api/chart.js.map +1 -1
  163. package/lib/api/composition/base.d.ts +21 -0
  164. package/lib/api/composition/base.js +62 -0
  165. package/lib/api/composition/base.js.map +1 -0
  166. package/lib/api/composition/facetCircle.d.ts +2 -3
  167. package/lib/api/composition/facetCircle.js +2 -2
  168. package/lib/api/composition/facetCircle.js.map +1 -1
  169. package/lib/api/composition/facetRect.d.ts +2 -3
  170. package/lib/api/composition/facetRect.js +2 -2
  171. package/lib/api/composition/facetRect.js.map +1 -1
  172. package/lib/api/composition/geoPath.d.ts +2 -3
  173. package/lib/api/composition/geoPath.js +2 -2
  174. package/lib/api/composition/geoPath.js.map +1 -1
  175. package/lib/api/composition/geoView.d.ts +2 -3
  176. package/lib/api/composition/geoView.js +2 -2
  177. package/lib/api/composition/geoView.js.map +1 -1
  178. package/lib/api/composition/index.d.ts +2 -1
  179. package/lib/api/composition/index.js +3 -1
  180. package/lib/api/composition/index.js.map +1 -1
  181. package/lib/api/composition/repeatMatrix.d.ts +2 -3
  182. package/lib/api/composition/repeatMatrix.js +2 -2
  183. package/lib/api/composition/repeatMatrix.js.map +1 -1
  184. package/lib/api/composition/spaceFlex.d.ts +2 -3
  185. package/lib/api/composition/spaceFlex.js +2 -2
  186. package/lib/api/composition/spaceFlex.js.map +1 -1
  187. package/lib/api/composition/spaceLayer.d.ts +2 -3
  188. package/lib/api/composition/spaceLayer.js +2 -2
  189. package/lib/api/composition/spaceLayer.js.map +1 -1
  190. package/lib/api/composition/timingKeyframe.d.ts +2 -3
  191. package/lib/api/composition/timingKeyframe.js +2 -2
  192. package/lib/api/composition/timingKeyframe.js.map +1 -1
  193. package/lib/api/composition/view.d.ts +3 -3
  194. package/lib/api/composition/view.js +4 -4
  195. package/lib/api/composition/view.js.map +1 -1
  196. package/lib/api/mark/base.d.ts +22 -0
  197. package/lib/api/mark/base.js +58 -0
  198. package/lib/api/mark/base.js.map +1 -0
  199. package/lib/api/mark/mark.d.ts +29 -29
  200. package/lib/api/mark/mark.js +27 -27
  201. package/lib/api/mark/mark.js.map +1 -1
  202. package/lib/api/node.d.ts +2 -1
  203. package/lib/api/node.js +8 -9
  204. package/lib/api/node.js.map +1 -1
  205. package/lib/api/props.js +0 -20
  206. package/lib/api/props.js.map +1 -1
  207. package/lib/component/axis.js +4 -0
  208. package/lib/component/axis.js.map +1 -1
  209. package/lib/component/legendContinuous.d.ts +1 -0
  210. package/lib/component/legendContinuous.js +14 -16
  211. package/lib/component/legendContinuous.js.map +1 -1
  212. package/lib/component/slider.js +3 -13
  213. package/lib/component/slider.js.map +1 -1
  214. package/lib/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
  215. package/lib/geo/{d3-projection.js → d3Projection.js} +1 -1
  216. package/lib/geo/d3Projection.js.map +1 -0
  217. package/lib/geo/geoView.js +1 -1
  218. package/lib/geo/geoView.js.map +1 -1
  219. package/lib/interaction/builtin/elementHighlight.d.ts +2 -0
  220. package/lib/interaction/builtin/elementHighlightByColor.d.ts +2 -0
  221. package/lib/interaction/builtin/elementHighlightByX.d.ts +2 -0
  222. package/lib/interaction/index.d.ts +2 -0
  223. package/lib/interaction/index.js +5 -1
  224. package/lib/interaction/index.js.map +1 -1
  225. package/lib/interaction/native/brushFilter.d.ts +3 -1
  226. package/lib/interaction/native/brushFilter.js +10 -35
  227. package/lib/interaction/native/brushFilter.js.map +1 -1
  228. package/lib/interaction/native/brushXFilter.js +1 -1
  229. package/lib/interaction/native/brushXFilter.js.map +1 -1
  230. package/lib/interaction/native/brushYFilter.js +1 -1
  231. package/lib/interaction/native/brushYFilter.js.map +1 -1
  232. package/lib/interaction/native/elementHighlight.d.ts +7 -2
  233. package/lib/interaction/native/elementHighlight.js +71 -17
  234. package/lib/interaction/native/elementHighlight.js.map +1 -1
  235. package/lib/interaction/native/elementHighlightByColor.d.ts +4 -1
  236. package/lib/interaction/native/elementHighlightByColor.js +18 -2
  237. package/lib/interaction/native/elementHighlightByColor.js.map +1 -1
  238. package/lib/interaction/native/elementHighlightByX.d.ts +3 -3
  239. package/lib/interaction/native/elementHighlightByX.js +18 -2
  240. package/lib/interaction/native/elementHighlightByX.js.map +1 -1
  241. package/lib/interaction/native/elementSelect.d.ts +1 -1
  242. package/lib/interaction/native/elementSelect.js +41 -19
  243. package/lib/interaction/native/elementSelect.js.map +1 -1
  244. package/lib/interaction/native/elementSelectByColor.js +2 -1
  245. package/lib/interaction/native/elementSelectByColor.js.map +1 -1
  246. package/lib/interaction/native/elementSelectByX.js +2 -1
  247. package/lib/interaction/native/elementSelectByX.js.map +1 -1
  248. package/lib/interaction/native/legendFilter.d.ts +4 -0
  249. package/lib/interaction/native/legendFilter.js +10 -3
  250. package/lib/interaction/native/legendFilter.js.map +1 -1
  251. package/lib/interaction/native/legendHighlight.d.ts +4 -0
  252. package/lib/interaction/native/legendHighlight.js +98 -0
  253. package/lib/interaction/native/legendHighlight.js.map +1 -0
  254. package/lib/interaction/native/sliderFilter.d.ts +5 -0
  255. package/lib/interaction/native/sliderFilter.js +91 -0
  256. package/lib/interaction/native/sliderFilter.js.map +1 -0
  257. package/lib/interaction/native/tooltip.js +11 -0
  258. package/lib/interaction/native/tooltip.js.map +1 -1
  259. package/lib/interaction/native/utils.d.ts +13 -2
  260. package/lib/interaction/native/utils.js +154 -27
  261. package/lib/interaction/native/utils.js.map +1 -1
  262. package/lib/label-transform/overlapDodgeY.js.map +1 -1
  263. package/lib/mark/area.js +1 -1
  264. package/lib/mark/area.js.map +1 -1
  265. package/lib/runtime/component.d.ts +1 -1
  266. package/lib/runtime/component.js +4 -2
  267. package/lib/runtime/component.js.map +1 -1
  268. package/lib/runtime/plot.d.ts +1 -1
  269. package/lib/runtime/plot.js +65 -26
  270. package/lib/runtime/plot.js.map +1 -1
  271. package/lib/runtime/render.js +20 -12
  272. package/lib/runtime/render.js.map +1 -1
  273. package/lib/runtime/scale.d.ts +2 -1
  274. package/lib/runtime/scale.js +9 -1
  275. package/lib/runtime/scale.js.map +1 -1
  276. package/lib/runtime/types/options.d.ts +4 -2
  277. package/lib/shape/area/hv.d.ts +3 -0
  278. package/lib/shape/area/hv.js +13 -0
  279. package/lib/shape/area/hv.js.map +1 -0
  280. package/lib/shape/area/hvh.d.ts +3 -0
  281. package/lib/shape/area/{step.js → hvh.js} +5 -5
  282. package/lib/shape/area/hvh.js.map +1 -0
  283. package/lib/shape/area/vh.d.ts +3 -0
  284. package/lib/shape/area/vh.js +13 -0
  285. package/lib/shape/area/vh.js.map +1 -0
  286. package/lib/shape/index.d.ts +6 -2
  287. package/lib/shape/index.js +7 -3
  288. package/lib/shape/index.js.map +1 -1
  289. package/lib/shape/interval/color.d.ts +1 -0
  290. package/lib/shape/interval/color.js +67 -54
  291. package/lib/shape/interval/color.js.map +1 -1
  292. package/lib/spec/composition.d.ts +0 -3
  293. package/lib/spec/geometry.d.ts +1 -0
  294. package/lib/spec/interaction.d.ts +30 -11
  295. package/lib/spec/transform.d.ts +15 -5
  296. package/lib/stdlib/index.js +1 -1
  297. package/lib/stdlib/index.js.map +1 -1
  298. package/lib/transform/sample.js +42 -26
  299. package/lib/transform/sample.js.map +1 -1
  300. package/lib/transform/select.js +1 -13
  301. package/lib/transform/select.js.map +1 -1
  302. package/lib/transform/selectX.js +1 -1
  303. package/lib/transform/selectX.js.map +1 -1
  304. package/lib/transform/selectY.js +1 -1
  305. package/lib/transform/selectY.js.map +1 -1
  306. package/lib/transform/utils/lttb.d.ts +5 -0
  307. package/lib/transform/utils/lttb.js +60 -0
  308. package/lib/transform/utils/lttb.js.map +1 -0
  309. package/lib/utils/event.d.ts +0 -2
  310. package/lib/utils/event.js +1 -21
  311. package/lib/utils/event.js.map +1 -1
  312. package/lib/utils/scale.d.ts +3 -0
  313. package/lib/utils/scale.js +36 -0
  314. package/lib/utils/scale.js.map +1 -0
  315. package/lib/utils/vector.d.ts +1 -1
  316. package/lib/utils/vector.js +1 -1
  317. package/package.json +4 -3
  318. package/src/.DS_Store +0 -0
  319. package/src/api/chart.ts +39 -18
  320. package/src/api/composition/base.ts +56 -0
  321. package/src/api/composition/facetCircle.ts +2 -3
  322. package/src/api/composition/facetRect.ts +2 -3
  323. package/src/api/composition/geoPath.ts +2 -3
  324. package/src/api/composition/geoView.ts +2 -3
  325. package/src/api/composition/index.ts +2 -0
  326. package/src/api/composition/repeatMatrix.ts +2 -3
  327. package/src/api/composition/spaceFlex.ts +2 -3
  328. package/src/api/composition/spaceLayer.ts +2 -3
  329. package/src/api/composition/timingKeyframe.ts +2 -3
  330. package/src/api/composition/view.ts +6 -4
  331. package/src/api/mark/base.ts +58 -0
  332. package/src/api/mark/mark.ts +29 -28
  333. package/src/api/node.ts +9 -11
  334. package/src/api/props.ts +0 -23
  335. package/src/component/axis.ts +7 -0
  336. package/src/component/legendContinuous.ts +15 -5
  337. package/src/component/slider.ts +3 -12
  338. package/src/data/.DS_Store +0 -0
  339. package/src/geo/{d3-projection.ts → d3Projection.ts} +0 -0
  340. package/src/geo/geoView.ts +1 -1
  341. package/src/interaction/index.ts +2 -0
  342. package/src/interaction/native/brushFilter.ts +18 -38
  343. package/src/interaction/native/brushXFilter.ts +1 -0
  344. package/src/interaction/native/brushYFilter.ts +1 -0
  345. package/src/interaction/native/elementHighlight.ts +78 -11
  346. package/src/interaction/native/elementHighlightByColor.ts +9 -4
  347. package/src/interaction/native/elementHighlightByX.ts +9 -5
  348. package/src/interaction/native/elementSelect.ts +58 -14
  349. package/src/interaction/native/elementSelectByColor.ts +4 -1
  350. package/src/interaction/native/elementSelectByX.ts +4 -1
  351. package/src/interaction/native/legendFilter.ts +8 -4
  352. package/src/interaction/native/legendHighlight.ts +87 -0
  353. package/src/interaction/native/sliderFilter.ts +112 -0
  354. package/src/interaction/native/tooltip.ts +11 -0
  355. package/src/interaction/native/utils.ts +183 -26
  356. package/src/label-transform/overlapDodgeY.ts +1 -1
  357. package/src/mark/area.ts +1 -1
  358. package/src/runtime/component.ts +18 -25
  359. package/src/runtime/plot.ts +123 -75
  360. package/src/runtime/render.ts +26 -13
  361. package/src/runtime/scale.ts +14 -0
  362. package/src/runtime/types/options.ts +10 -2
  363. package/src/shape/.DS_Store +0 -0
  364. package/src/shape/area/hv.ts +20 -0
  365. package/src/shape/area/{step.ts → hvh.ts} +3 -3
  366. package/src/shape/area/vh.ts +20 -0
  367. package/src/shape/index.ts +7 -2
  368. package/src/shape/interval/color.ts +86 -54
  369. package/src/spec/composition.ts +0 -1
  370. package/src/spec/geometry.ts +1 -0
  371. package/src/spec/interaction.ts +45 -12
  372. package/src/spec/transform.ts +30 -3
  373. package/src/stdlib/index.ts +10 -6
  374. package/src/transform/sample.ts +54 -18
  375. package/src/transform/select.ts +1 -2
  376. package/src/transform/selectX.ts +1 -1
  377. package/src/transform/selectY.ts +1 -1
  378. package/src/transform/utils/lttb.ts +73 -0
  379. package/src/utils/event.ts +0 -26
  380. package/src/utils/scale.ts +31 -0
  381. package/src/utils/vector.ts +1 -1
  382. package/esm/geo/d3-projection.js.map +0 -1
  383. package/esm/shape/area/step.d.ts +0 -3
  384. package/esm/shape/area/step.js.map +0 -1
  385. package/lib/geo/d3-projection.js.map +0 -1
  386. package/lib/shape/area/step.d.ts +0 -3
  387. package/lib/shape/area/step.js.map +0 -1
@@ -2,9 +2,10 @@ 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
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 { CHART_LIFE_CIRCLE } from '../utils/event';
8
9
  import { G2Context, G2ViewTree } from './types/options';
9
10
  import { plot } from './plot';
10
11
 
@@ -65,12 +66,17 @@ export function render<T extends G2ViewTree = G2ViewTree>(
65
66
  // Initialize the context if it is not provided.
66
67
  const { width = 640, height = 480, on } = options;
67
68
  const keyed = inferKeys(options);
68
- const { canvas = Canvas(width, height), library = createLibrary() } = context;
69
+ const {
70
+ canvas = Canvas(width, height),
71
+ library = createLibrary(),
72
+ emitter = new EventEmitter(),
73
+ } = context;
69
74
  context.canvas = canvas;
70
75
  context.library = library;
76
+ context.emitter = emitter;
71
77
  canvas.resize(width, height);
72
78
 
73
- emitEvent(on, CHART_LIFE_CIRCLE.BEFORE_RENDER);
79
+ emitter.emit(CHART_LIFE_CIRCLE.BEFORE_RENDER);
74
80
 
75
81
  // Plot the chart and mutate context.
76
82
  // Make sure that plot chart after container is ready for every time.
@@ -79,8 +85,10 @@ export function render<T extends G2ViewTree = G2ViewTree>(
79
85
  .then(() =>
80
86
  plot<T>({ ...keyed, width, height }, selection, library, context),
81
87
  )
82
- .then(callback)
83
- .then(() => emitEvent(on, CHART_LIFE_CIRCLE.AFTER_RENDER));
88
+ .then(() => {
89
+ emitter.emit(CHART_LIFE_CIRCLE.AFTER_RENDER);
90
+ callback?.();
91
+ });
84
92
 
85
93
  // Return the container HTML element wraps the canvas or svg element.
86
94
  return normalizeContainer(canvas.getConfig().container);
@@ -94,7 +102,11 @@ export function renderToMountedElement<T extends G2ViewTree = G2ViewTree>(
94
102
  // Initialize the context if it is not provided.
95
103
  const { width = 640, height = 480, on } = options;
96
104
  const keyed = inferKeys(options);
97
- const { library = createLibrary(), group = new Group() } = context;
105
+ const {
106
+ library = createLibrary(),
107
+ group = new Group(),
108
+ emitter = new EventEmitter(),
109
+ } = context;
98
110
 
99
111
  if (!group?.parentElement) {
100
112
  throw new Error(
@@ -105,13 +117,15 @@ export function renderToMountedElement<T extends G2ViewTree = G2ViewTree>(
105
117
  const selection = select(group);
106
118
  context.group = group;
107
119
  context.library = library;
120
+ context.emitter = emitter;
108
121
 
109
- emitEvent(on, CHART_LIFE_CIRCLE.BEFORE_RENDER);
122
+ emitter.emit(CHART_LIFE_CIRCLE.BEFORE_RENDER);
110
123
  // Plot the chart and mutate context.
111
124
  // Make sure that plot chart after container is ready for every time.
112
- plot<T>({ ...keyed, width, height }, selection, library, context)
113
- .then(callback)
114
- .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
+ });
115
129
 
116
130
  // Return the Group wraps the canvas or svg element.
117
131
  return group;
@@ -121,12 +135,11 @@ export function destroy<T extends G2ViewTree = G2ViewTree>(
121
135
  options: T,
122
136
  context: G2Context = {},
123
137
  ) {
124
- const { on } = options;
125
- const { canvas } = context;
138
+ const { canvas, emitter } = context;
126
139
  if (canvas) {
127
140
  canvas.destroy();
128
141
  }
129
- offEvent(on);
142
+ emitter.off();
130
143
  }
131
144
 
132
145
  function normalizeContainer(container: HTMLElement | string): HTMLElement {
@@ -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()))
@@ -1,6 +1,13 @@
1
1
  import { Canvas, IAnimation as GAnimation } from '@antv/g';
2
2
  import type { DisplayObject } from '@antv/g';
3
- import { G2Title, GuideComponentPosition, Layout, Primitive } from './common';
3
+ import EventEmitter from '@antv/event-emitter';
4
+ import {
5
+ G2Title,
6
+ G2ViewDescriptor,
7
+ GuideComponentPosition,
8
+ Layout,
9
+ Primitive,
10
+ } from './common';
4
11
  import {
5
12
  G2BaseComponent,
6
13
  StatisticComponent,
@@ -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 = {
Binary file
@@ -0,0 +1,20 @@
1
+ import { curveStepAfter } from 'd3-shape';
2
+ import { ShapeComponent as SC } from '../../runtime';
3
+ import { Curve } from './curve';
4
+
5
+ export type HVOptions = Record<string, any>;
6
+
7
+ export const HV: SC<HVOptions> = (options) => {
8
+ return (P, value, coordinate, theme) => {
9
+ return Curve({ curve: curveStepAfter, ...options })(
10
+ P,
11
+ value,
12
+ coordinate,
13
+ theme,
14
+ );
15
+ };
16
+ };
17
+
18
+ HV.props = {
19
+ ...Curve.props,
20
+ };
@@ -2,14 +2,14 @@ import { curveStep } from 'd3-shape';
2
2
  import { ShapeComponent as SC } from '../../runtime';
3
3
  import { Curve } from './curve';
4
4
 
5
- export type StepOptions = Record<string, any>;
5
+ export type HVHOptions = Record<string, any>;
6
6
 
7
- export const Step: SC<StepOptions> = (options) => {
7
+ export const HVH: SC<HVHOptions> = (options) => {
8
8
  return (P, value, coordinate, theme) => {
9
9
  return Curve({ curve: curveStep, ...options })(P, value, coordinate, theme);
10
10
  };
11
11
  };
12
12
 
13
- Step.props = {
13
+ HVH.props = {
14
14
  ...Curve.props,
15
15
  };
@@ -0,0 +1,20 @@
1
+ import { curveStepBefore } from 'd3-shape';
2
+ import { ShapeComponent as SC } from '../../runtime';
3
+ import { Curve } from './curve';
4
+
5
+ export type VHOptions = Record<string, any>;
6
+
7
+ export const VH: SC<VHOptions> = (options) => {
8
+ return (P, value, coordinate, theme) => {
9
+ return Curve({ curve: curveStepBefore, ...options })(
10
+ P,
11
+ value,
12
+ coordinate,
13
+ theme,
14
+ );
15
+ };
16
+ };
17
+
18
+ VH.props = {
19
+ ...Curve.props,
20
+ };
@@ -31,7 +31,9 @@ export { Text } from './text/text';
31
31
  export { Badge } from './text/badge';
32
32
  export { Area } from './area/area';
33
33
  export { Smooth as SmoothArea } from './area/smooth';
34
- export { Step } from './area/step';
34
+ export { HVH as HVHArea } from './area/hvh';
35
+ export { VH as VHArea } from './area/vh';
36
+ export { HV as HVArea } from './area/hv';
35
37
  export { Link } from './link/link';
36
38
  export { Smooth as SmoothEdge } from './link/smooth';
37
39
  export { VHV as VHVEdge } from './link/vhv';
@@ -83,7 +85,10 @@ export type { TextOptions } from './text/text';
83
85
  export type { BadgeOptions } from './text/badge';
84
86
  export type { AreaOptions } from './area/area';
85
87
  export type { SmoothOptions as SmoothAreaOptions } from './area/smooth';
86
- export type { StepOptions } from './area/step';
88
+ export type { HVHOptions as HVHAreaOptions } from './area/hvh';
89
+ export type { VHOptions as VHAreaOptions } from './area/vh';
90
+ export type { HVOptions as HVAreaOptions } from './area/hv';
91
+
87
92
  export type { LinkOptions } from './link/link';
88
93
  export type { ImageOptions } from './image/image';
89
94
  export type { PolygonOptions } from './polygon/polygon';
@@ -17,6 +17,72 @@ export type ColorOptions = {
17
17
  [key: string]: any;
18
18
  };
19
19
 
20
+ // Render rect in different coordinate.
21
+ export function rect(
22
+ points,
23
+ value,
24
+ coordinate,
25
+ style: Record<string, any> = {},
26
+ ) {
27
+ const {
28
+ inset = 0,
29
+ radius = 0,
30
+ insetLeft = inset,
31
+ insetTop = inset,
32
+ insetRight = inset,
33
+ insetBottom = inset,
34
+ radiusBottomLeft = radius,
35
+ radiusBottomRight = radius,
36
+ radiusTopLeft = radius,
37
+ radiusTopRight = radius,
38
+ ...rest
39
+ } = style;
40
+ if (!isPolar(coordinate) && !isHelix(coordinate)) {
41
+ const tpShape = !!isTranspose(coordinate);
42
+
43
+ const [p0, , p2] = tpShape ? reorder(points) : points;
44
+ const [x, y] = p0;
45
+ const [width, height] = sub(p2, p0);
46
+ // Deal with width or height is negative.
47
+ const absX = width > 0 ? x : x + width;
48
+ const absY = height > 0 ? y : y + height;
49
+ const absWidth = Math.abs(width);
50
+ const absHeight = Math.abs(height);
51
+ const finalX = absX + insetLeft;
52
+ const finalY = absY + insetTop;
53
+ const finalWidth = absWidth - (insetLeft + insetRight);
54
+ const finalHeight = absHeight - (insetTop + insetBottom);
55
+
56
+ return select(new Rect({}))
57
+ .style('x', finalX)
58
+ .style('y', finalY)
59
+ .style('width', finalWidth)
60
+ .style('height', finalHeight)
61
+ .style('radius', [
62
+ radiusTopLeft,
63
+ radiusTopRight,
64
+ radiusBottomRight,
65
+ radiusBottomLeft,
66
+ ])
67
+ .call(applyStyle, rest)
68
+ .node();
69
+ }
70
+
71
+ // Render path in polar coordinate.
72
+ const { y, y1 } = value;
73
+ const center = coordinate.getCenter() as Vector2;
74
+ const arcObject = getArcObject(coordinate, points, [y, y1]);
75
+ const path = arc()
76
+ .cornerRadius(radius as number)
77
+ .padAngle((inset * Math.PI) / 180);
78
+
79
+ return select(new Path({}))
80
+ .style('path', path(arcObject))
81
+ .style('transform', `translate(${center[0]}, ${center[1]})`)
82
+ .call(applyStyle, rest)
83
+ .node();
84
+ }
85
+
20
86
  /**
21
87
  * Render rect in different coordinate.
22
88
  * Calc arc path based on control points directly rather startAngle, endAngle, innerRadius,
@@ -36,7 +102,6 @@ export const Color: SC<ColorOptions> = (options) => {
36
102
  return (points, value, coordinate, theme) => {
37
103
  const { mark, shape, defaultShape } = value;
38
104
  const {
39
- // [colorAttribute]: defaultColor,
40
105
  defaultColor,
41
106
  radius: defaultRadius = 0,
42
107
  ...defaults
@@ -55,70 +120,37 @@ export const Color: SC<ColorOptions> = (options) => {
55
120
  innerRadiusTopRight = innerRadius,
56
121
  innerRadiusBottomRight = innerRadius,
57
122
  innerRadiusBottomLeft = innerRadius,
123
+ lineWidth = colorAttribute === 'stroke' || stroke ? defaultLineWidth : 0,
58
124
  inset = 0,
59
125
  insetLeft = inset,
60
126
  insetRight = inset,
61
127
  insetBottom = inset,
62
128
  insetTop = inset,
63
- lineWidth = colorAttribute === 'stroke' || stroke ? defaultLineWidth : 0,
64
129
  ...rest
65
130
  } = style;
66
131
  const { color = defaultColor, opacity } = value;
67
132
 
68
- // Render rect in non-polar coordinate.
69
- if (!isPolar(coordinate) && !isHelix(coordinate)) {
70
- const tpShape = !!isTranspose(coordinate);
71
-
72
- const [p0, , p2] = tpShape ? reorder(points) : points;
73
- const [x, y] = p0;
74
- const [width, height] = sub(p2, p0);
75
- // Deal with width or height is negative.
76
- const absX = width > 0 ? x : x + width;
77
- const absY = height > 0 ? y : y + height;
78
- const absWidth = Math.abs(width);
79
- const absHeight = Math.abs(height);
80
- const finalX = absX + insetLeft;
81
- const finalY = absY + insetTop;
82
- const finalWidth = absWidth - (insetLeft + insetRight);
83
- const finalHeight = absHeight - (insetTop + insetBottom);
84
-
85
- return select(new Rect({}))
86
- .call(applyStyle, defaults)
87
- .style('lineWidth', lineWidth)
88
- .style('x', finalX)
89
- .style('y', finalY)
90
- .style('width', finalWidth)
91
- .style('height', finalHeight)
92
- .style('stroke', stroke === undefined ? color : stroke)
93
- .style(toOpacityKey(options), opacity)
94
- .style(colorAttribute, color)
95
- .style('radius', [
96
- first ? radiusTopLeft : innerRadiusTopLeft,
97
- first ? radiusTopRight : innerRadiusTopRight,
98
- last ? radiusBottomRight : innerRadiusBottomRight,
99
- last ? radiusBottomLeft : innerRadiusBottomLeft,
100
- ])
101
- .call(applyStyle, rest)
102
- .node();
103
- }
104
-
105
- // Render path in polar coordinate.
106
- const { y, y1 } = value;
107
- const center = coordinate.getCenter() as Vector2;
108
- const arcObject = getArcObject(coordinate, points, [y, y1]);
109
- const path = arc()
110
- .cornerRadius(radius as number)
111
- .padAngle((inset * Math.PI) / 180);
133
+ // Extended style, which is not supported by native g shape,
134
+ // should apply at first.
135
+ const extendedStyle = {
136
+ radius,
137
+ radiusTopLeft: first ? radiusTopLeft : innerRadiusTopLeft,
138
+ radiusTopRight: first ? radiusTopRight : innerRadiusTopRight,
139
+ radiusBottomRight: last ? radiusBottomRight : innerRadiusBottomRight,
140
+ radiusBottomLeft: last ? radiusBottomLeft : innerRadiusBottomLeft,
141
+ inset,
142
+ insetLeft,
143
+ insetRight,
144
+ insetBottom,
145
+ insetTop,
146
+ };
112
147
 
113
- return select(new Path({}))
114
- .call(applyStyle, defaults)
115
- .style('path', path(arcObject))
116
- .style('transform', `translate(${center[0]}, ${center[1]})`)
117
- .style('stroke', color || stroke)
118
- .style('lineWidth', lineWidth)
119
- .style(colorAttribute, color)
148
+ return select(rect(points, value, coordinate, extendedStyle))
149
+ .call(applyStyle, { ...defaults, ...rest })
120
150
  .style(toOpacityKey(options), opacity)
121
- .call(applyStyle, style)
151
+ .style(colorAttribute, color)
152
+ .style('lineWidth', lineWidth)
153
+ .style('stroke', stroke === undefined ? color : stroke)
122
154
  .node();
123
155
  };
124
156
  };
@@ -61,7 +61,6 @@ export type ViewComposition = {
61
61
  axis?: Record<string, any>;
62
62
  // @todo
63
63
  legend?: Record<string, any>;
64
- on?: Record<string, EventType | EventType[]>;
65
64
  // @todo
66
65
  style?: Record<string, any>;
67
66
  clip?: boolean;
@@ -170,6 +170,7 @@ export type BaseGeometry<
170
170
  };
171
171
  cartesian?: boolean;
172
172
  layout?: Record<string, any>;
173
+ zIndex?: number;
173
174
  };
174
175
 
175
176
  export type Adjust = { type: 'pack' };
@@ -12,16 +12,18 @@ export type Interaction =
12
12
  | ElementSelectInteraction
13
13
  | TooltipInteraction
14
14
  | FisheyeInteraction
15
- | ChartIndex
15
+ | ChartIndexInteraction
16
16
  | CustomInteraction
17
17
  | LegendFilterInteraction
18
+ | LegendHighlightInteraction
18
19
  | BrushHighlightInteraction
19
20
  | BrushXHighlightInteraction
20
21
  | BrushYHighlightInteraction
21
22
  | BrushAxisHighlightInteraction
22
23
  | BrushFilter
23
24
  | BrushYFilter
24
- | BrushXFilter;
25
+ | BrushXFilter
26
+ | SliderFilter;
25
27
  // | ElementListHighlightInteraction
26
28
  // | LegendActiveInteraction
27
29
  // | LegendHighlightInteraction
@@ -44,12 +46,14 @@ export type InteractionTypes =
44
46
  | 'fisheye'
45
47
  | 'tooltip'
46
48
  | 'legendFilter'
49
+ | 'legendHighlight'
47
50
  | 'brushXHighlight'
48
51
  | 'brushYHighlight'
49
52
  | 'brushHighlight'
50
53
  | 'brushFilter'
51
54
  | 'brushXFilter'
52
55
  | 'brushYFilter'
56
+ | 'sliderFilter'
53
57
  | InteractionComponent;
54
58
  // | 'elementListHighlight'
55
59
  // | 'legendActive'
@@ -123,33 +127,54 @@ export type ElementHighlightInteraction = {
123
127
  type?: 'elementHighlight';
124
128
  // @todo: Style supported by G.
125
129
  link?: boolean;
126
- } & Record<`${'link' | 'highlighted' | 'unhighlighted'}${any}`, any>;
130
+ background?: boolean;
131
+ offset?: number;
132
+ } & Record<
133
+ `${'link' | 'highlighted' | 'unhighlighted' | 'background'}${any}`,
134
+ any
135
+ >;
127
136
 
128
137
  export type ElementSelectInteraction = {
129
138
  type?: 'elementSelect';
130
139
  single?: boolean;
131
- } & Record<`${'selected' | 'link' | 'unselected'}${any}`, any>;
140
+ background?: true;
141
+ offset?: number;
142
+ } & Record<`${'selected' | 'link' | 'unselected' | 'background'}${any}`, any>;
132
143
 
133
144
  export type ElementSelectByColorInteraction = {
134
145
  type?: 'elementSelectByColor';
135
146
  single?: boolean;
147
+ offset?: number;
136
148
  } & Record<`${'selected' | 'link' | 'unselected'}${any}`, any>;
137
149
 
138
150
  export type ElementSelectByXInteraction = {
139
151
  type?: 'elementSelectByX';
140
152
  single?: boolean;
141
- } & Record<`${'selected' | 'link' | 'unselected'}${any}`, any>;
153
+ background?: true;
154
+ offset?: number;
155
+ } & Record<`${'selected' | 'link' | 'unselected' | 'background'}${any}`, any>;
142
156
 
143
157
  export type ElementHighlightByXInteraction = {
144
158
  type?: 'elementHighlightByX';
145
159
  x?: string;
146
160
  link?: boolean;
147
- } & Record<`${'link' | 'highlighted' | 'unhighlighted'}${any}`, any>;
161
+ background?: boolean;
162
+ offset?: number;
163
+ } & Record<
164
+ `${'link' | 'highlighted' | 'unhighlighted' | 'background'}${any}`,
165
+ any
166
+ >;
148
167
 
149
168
  export type ElementHighlightByColorInteraction = {
150
169
  type?: 'elementHighlightByColor';
151
170
  color?: string;
152
- } & Record<`${'link' | 'highlighted' | 'unhighlighted'}${any}`, any>;
171
+ background?: boolean;
172
+ link?: boolean;
173
+ offset?: number;
174
+ } & Record<
175
+ `${'link' | 'highlighted' | 'unhighlighted' | 'background'}${any}`,
176
+ any
177
+ >;
153
178
 
154
179
  export type LegendFilterInteraction = {
155
180
  type?: 'legendFilter';
@@ -157,13 +182,25 @@ export type LegendFilterInteraction = {
157
182
  [key: string]: any; // @todo
158
183
  } & Record<`${'marker' | 'label'}Unselected${any}`, any>;
159
184
 
160
- export type ChartIndex = {
185
+ export type LegendHighlightInteraction = {
186
+ type?: 'legendHighlight';
187
+ [key: string]: any; // @todo
188
+ } & Record<`${'marker' | 'label'}Unhighlighted${any}`, any>;
189
+
190
+ export type ChartIndexInteraction = {
161
191
  type?: 'chartIndex';
162
192
  wait?: number;
163
193
  leading?: boolean;
164
194
  trailing?: boolean;
165
195
  } & Record<`${'rule' | 'label'}${any}`, any>;
166
196
 
197
+ export type SliderFilter = {
198
+ type?: 'sliderFilter';
199
+ wait?: number;
200
+ leading?: boolean;
201
+ trailing?: boolean;
202
+ };
203
+
167
204
  export type ElementListHighlightInteraction = {
168
205
  type?: 'elementListHighlight';
169
206
  };
@@ -172,10 +209,6 @@ export type LegendActiveInteraction = {
172
209
  type?: 'legendActive';
173
210
  };
174
211
 
175
- export type LegendHighlightInteraction = {
176
- type?: 'legendHighlight';
177
- };
178
-
179
212
  export type TooltipInteraction = Omit<TooltipAction, 'type'> & {
180
213
  type?: 'tooltip';
181
214
  shared?: boolean;
@@ -140,7 +140,9 @@ export type Selector =
140
140
  export type SelectTransform = {
141
141
  type?: 'select';
142
142
  groupBy?: string | string[];
143
- } & { [key in ChannelTypes]?: Selector };
143
+ channel?: ChannelTypes;
144
+ selector?: Selector;
145
+ };
144
146
 
145
147
  export type SelectXTransform = {
146
148
  type?: 'selectX';
@@ -252,11 +254,36 @@ export type BinTransform = {
252
254
  thresholdsY?: number;
253
255
  } & { [key in ChannelTypes]?: Reducer };
254
256
 
257
+ export type SampleFunction = (
258
+ I: number[],
259
+ X: number[],
260
+ Y: number[],
261
+ thresholds: number,
262
+ ) => number[];
263
+
255
264
  export type SampleTransform = {
256
265
  type?: 'sample';
257
- groupBy?: string | string[];
266
+ /**
267
+ * Sample strategy. Default is 'median'.
268
+ */
269
+ strategy?:
270
+ | 'lttb'
271
+ | 'median'
272
+ | 'max'
273
+ | 'min'
274
+ | 'first'
275
+ | 'last'
276
+ | SampleFunction;
277
+ /**
278
+ * The thresholds of sample, when data size great then thresholds, sample will take effect.
279
+ * Default is 2000.
280
+ */
258
281
  thresholds?: number;
259
- } & { [key in ChannelTypes]?: Reducer };
282
+ /**
283
+ * Group data by fields, for series data.
284
+ */
285
+ groupBy?: string | string[];
286
+ };
260
287
 
261
288
  export type FilterTransform = {
262
289
  type?: 'filter';
@@ -114,7 +114,9 @@ import {
114
114
  Connector as ConnectorShape,
115
115
  Area,
116
116
  SmoothArea,
117
- Step,
117
+ HVHArea,
118
+ VHArea,
119
+ HVArea,
118
120
  SmoothEdge,
119
121
  VHVEdge,
120
122
  Arc,
@@ -159,10 +161,6 @@ import {
159
161
  GrowInY,
160
162
  } from '../animation';
161
163
  import {
162
- // ElementHighlight,
163
- // ElementSelected,
164
- // Tooltip,
165
- // Fisheye as FisheyeInteraction,
166
164
  ElementHighlight,
167
165
  ElementHighlightByX,
168
166
  ElementHighlightByColor,
@@ -173,6 +171,7 @@ import {
173
171
  Fisheye as ChartFisheye,
174
172
  Tooltip,
175
173
  LegendFilter,
174
+ LegendHighlight,
176
175
  BrushHighlight,
177
176
  BrushXHighlight,
178
177
  BrushYHighlight,
@@ -180,6 +179,7 @@ import {
180
179
  BrushFilter,
181
180
  BrushXFilter,
182
181
  BrushYFilter,
182
+ SliderFilter,
183
183
  // ElementHighlightByX,
184
184
  // ElementHighlightByColor,
185
185
  // ElementListHighlight,
@@ -446,7 +446,9 @@ export function createLibrary(): G2Library {
446
446
  'shape.text.text': Text,
447
447
  'shape.area.area': Area,
448
448
  'shape.area.smooth': SmoothArea,
449
- 'shape.area.step': Step,
449
+ 'shape.area.hvh': HVHArea,
450
+ 'shape.area.vh': VHArea,
451
+ 'shape.area.hv': HVArea,
450
452
  'shape.link.smooth': SmoothEdge,
451
453
  'shape.link.vhv': VHVEdge,
452
454
  'shape.link.arc': Arc,
@@ -502,6 +504,7 @@ export function createLibrary(): G2Library {
502
504
  'interaction.chartIndex': ChartIndex,
503
505
  'interaction.tooltip': Tooltip,
504
506
  'interaction.legendFilter': LegendFilter,
507
+ 'interaction.legendHighlight': LegendHighlight,
505
508
  'interaction.brushHighlight': BrushHighlight,
506
509
  'interaction.brushXHighlight': BrushXHighlight,
507
510
  'interaction.brushYHighlight': BrushYHighlight,
@@ -509,6 +512,7 @@ export function createLibrary(): G2Library {
509
512
  'interaction.brushFilter': BrushFilter,
510
513
  'interaction.brushXFilter': BrushXFilter,
511
514
  'interaction.brushYFilter': BrushYFilter,
515
+ 'interaction.sliderFilter': SliderFilter,
512
516
  // 'interaction.elementSelected': ElementSelected,
513
517
  // 'interaction.elementHighlight': ElementHighlight,
514
518
  // 'interaction.elementHighlightByX': ElementHighlightByX,