@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
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  IntervalGeometry,
3
+ RectGeometry,
3
4
  AreaGeometry,
4
5
  PointGeometry,
5
6
  CellGeometry,
@@ -26,15 +27,15 @@ import {
26
27
  WordCloudMark,
27
28
  } from '../../spec';
28
29
  import { NodePropertyDescriptor, defineProps } from '../props';
29
- import { Node } from '../node';
30
30
  import { Concrete } from '../types';
31
+ import { MarkBase } from './base';
31
32
  import { API } from './types';
32
33
 
33
34
  export interface Interval extends API<Concrete<IntervalGeometry>, Interval> {
34
35
  type: 'interval';
35
36
  }
36
37
 
37
- export interface Rect extends API<Concrete<IntervalGeometry>, Rect> {
38
+ export interface Rect extends API<Concrete<RectGeometry>, Rect> {
38
39
  type: 'rect';
39
40
  }
40
41
 
@@ -148,182 +149,182 @@ export const props: NodePropertyDescriptor[] = [
148
149
  ];
149
150
 
150
151
  @defineProps(props)
151
- export class Interval extends Node<IntervalGeometry> {
152
+ export class Interval extends MarkBase<IntervalGeometry> {
152
153
  constructor() {
153
154
  super({}, 'interval');
154
155
  }
155
156
  }
156
157
 
157
158
  @defineProps(props)
158
- export class Rect extends Node<IntervalGeometry> {
159
+ export class Rect extends MarkBase<RectGeometry> {
159
160
  constructor() {
160
161
  super({}, 'rect');
161
162
  }
162
163
  }
163
164
 
164
165
  @defineProps(props)
165
- export class Point extends Node<PointGeometry> {
166
+ export class Point extends MarkBase<PointGeometry> {
166
167
  constructor() {
167
168
  super({}, 'point');
168
169
  }
169
170
  }
170
171
 
171
172
  @defineProps(props)
172
- export class Area extends Node<AreaGeometry> {
173
+ export class Area extends MarkBase<AreaGeometry> {
173
174
  constructor() {
174
175
  super({}, 'area');
175
176
  }
176
177
  }
177
178
 
178
179
  @defineProps(props)
179
- export class Line extends Node<LineGeometry> {
180
+ export class Line extends MarkBase<LineGeometry> {
180
181
  constructor() {
181
182
  super({}, 'line');
182
183
  }
183
184
  }
184
185
 
185
186
  @defineProps(props)
186
- export class Cell extends Node<CellGeometry> {
187
+ export class Cell extends MarkBase<CellGeometry> {
187
188
  constructor() {
188
189
  super({}, 'cell');
189
190
  }
190
191
  }
191
192
 
192
193
  @defineProps(props)
193
- export class Vector extends Node<VectorGeometry> {
194
+ export class Vector extends MarkBase<VectorGeometry> {
194
195
  constructor() {
195
196
  super({}, 'vector');
196
197
  }
197
198
  }
198
199
 
199
200
  @defineProps(props)
200
- export class Link extends Node<LinkGeometry> {
201
+ export class Link extends MarkBase<LinkGeometry> {
201
202
  constructor() {
202
203
  super({}, 'link');
203
204
  }
204
205
  }
205
206
 
206
207
  @defineProps(props)
207
- export class Polygon extends Node<PolygonGeometry> {
208
+ export class Polygon extends MarkBase<PolygonGeometry> {
208
209
  constructor() {
209
210
  super({}, 'polygon');
210
211
  }
211
212
  }
212
213
 
213
214
  @defineProps(props)
214
- export class Image extends Node<ImageGeometry> {
215
+ export class Image extends MarkBase<ImageGeometry> {
215
216
  constructor() {
216
217
  super({}, 'image');
217
218
  }
218
219
  }
219
220
 
220
221
  @defineProps(props)
221
- export class Text extends Node<TextGeometry> {
222
+ export class Text extends MarkBase<TextGeometry> {
222
223
  constructor() {
223
224
  super({}, 'text');
224
225
  }
225
226
  }
226
227
 
227
228
  @defineProps(props)
228
- export class Box extends Node<BoxGeometry> {
229
+ export class Box extends MarkBase<BoxGeometry> {
229
230
  constructor() {
230
231
  super({}, 'box');
231
232
  }
232
233
  }
233
234
 
234
235
  @defineProps(props)
235
- export class LineX extends Node<LineXMark> {
236
+ export class LineX extends MarkBase<LineXMark> {
236
237
  constructor() {
237
238
  super({}, 'lineX');
238
239
  }
239
240
  }
240
241
 
241
242
  @defineProps(props)
242
- export class LineY extends Node<LineYMark> {
243
+ export class LineY extends MarkBase<LineYMark> {
243
244
  constructor() {
244
245
  super({}, 'lineY');
245
246
  }
246
247
  }
247
248
 
248
249
  @defineProps(props)
249
- export class Range extends Node<RangeMark> {
250
+ export class Range extends MarkBase<RangeMark> {
250
251
  constructor() {
251
252
  super({}, 'range');
252
253
  }
253
254
  }
254
255
 
255
256
  @defineProps(props)
256
- export class RangeX extends Node<RangeXMark> {
257
+ export class RangeX extends MarkBase<RangeXMark> {
257
258
  constructor() {
258
259
  super({}, 'rangeX');
259
260
  }
260
261
  }
261
262
 
262
263
  @defineProps(props)
263
- export class RangeY extends Node<RangeYMark> {
264
+ export class RangeY extends MarkBase<RangeYMark> {
264
265
  constructor() {
265
266
  super({}, 'rangeY');
266
267
  }
267
268
  }
268
269
 
269
270
  @defineProps(props)
270
- export class Connector extends Node<ConnectorMark> {
271
+ export class Connector extends MarkBase<ConnectorMark> {
271
272
  constructor() {
272
273
  super({}, 'connector');
273
274
  }
274
275
  }
275
276
 
276
277
  @defineProps(props)
277
- export class Shape extends Node<ShapeMark> {
278
+ export class Shape extends MarkBase<ShapeMark> {
278
279
  constructor() {
279
280
  super({}, 'shape');
280
281
  }
281
282
  }
282
283
 
283
284
  @defineProps([...props, { name: 'layout', type: 'value' }])
284
- export class Sankey extends Node<SankeyMark> {
285
+ export class Sankey extends MarkBase<SankeyMark> {
285
286
  constructor() {
286
287
  super({}, 'sankey');
287
288
  }
288
289
  }
289
290
 
290
291
  @defineProps([...props, { name: 'layout', type: 'value' }])
291
- export class Treemap extends Node<ConnectorMark> {
292
+ export class Treemap extends MarkBase<ConnectorMark> {
292
293
  constructor() {
293
294
  super({}, 'treemap');
294
295
  }
295
296
  }
296
297
 
297
298
  @defineProps(props)
298
- export class Boxplot extends Node<Boxplot> {
299
+ export class Boxplot extends MarkBase<Boxplot> {
299
300
  constructor() {
300
301
  super({}, 'boxplot');
301
302
  }
302
303
  }
303
304
 
304
305
  @defineProps([...props, { name: 'layout', type: 'value' }])
305
- export class Pack extends Node<Pack> {
306
+ export class Pack extends MarkBase<Pack> {
306
307
  constructor() {
307
308
  super({}, 'pack');
308
309
  }
309
310
  }
310
311
 
311
312
  @defineProps([...props, { name: 'layout', type: 'value' }])
312
- export class ForceGraph extends Node<ForceGraph> {
313
+ export class ForceGraph extends MarkBase<ForceGraph> {
313
314
  constructor() {
314
315
  super({}, 'forceGraph');
315
316
  }
316
317
  }
317
318
 
318
319
  @defineProps([...props, { name: 'layout', type: 'value' }])
319
- export class Tree extends Node<Tree> {
320
+ export class Tree extends MarkBase<Tree> {
320
321
  constructor() {
321
322
  super({}, 'tree');
322
323
  }
323
324
  }
324
325
 
325
326
  @defineProps([...props, { name: 'layout', type: 'object' }])
326
- export class WordCloud extends Node<WordCloud> {
327
+ export class WordCloud extends MarkBase<WordCloud> {
327
328
  constructor() {
328
329
  super({}, 'wordCloud');
329
330
  }
package/src/api/node.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { emitEvent, CHART_LIFE_CIRCLE } from '../utils/event';
2
1
  import { Chart } from './chart';
3
2
 
4
3
  /**
@@ -116,16 +115,6 @@ export class Node<
116
115
  return nodes;
117
116
  }
118
117
 
119
- changeData(data: any) {
120
- // Find the root chart and render.
121
- let root: Node = this;
122
- while (root && root.parentNode) {
123
- root = root.parentNode;
124
- }
125
- this.attr('data', data);
126
- (root as Chart).render();
127
- }
128
-
129
118
  /**
130
119
  * Apply specified callback to the node value.
131
120
  */
@@ -136,4 +125,13 @@ export class Node<
136
125
  callback(this.map(), ...params);
137
126
  return this;
138
127
  }
128
+
129
+ root(): Chart {
130
+ // Find the root chart and render.
131
+ let root: Node = this;
132
+ while (root && root.parentNode) {
133
+ root = root.parentNode;
134
+ }
135
+ return root as Chart;
136
+ }
139
137
  }
package/src/api/props.ts CHANGED
@@ -1,7 +1,3 @@
1
- import { isObject, deepMix, get, isString, isArray } from '@antv/util';
2
-
3
- type EventListener = (...args: any[]) => void;
4
-
5
1
  export type NodePropertyDescriptor = {
6
2
  type: 'object' | 'value' | 'array' | 'node' | 'container' | 'event';
7
3
  name: string;
@@ -51,24 +47,6 @@ function defineContainerProp(Node, { name, ctor }: NodePropertyDescriptor) {
51
47
  };
52
48
  }
53
49
 
54
- function defineEventProp(Node, { name, key = name }: NodePropertyDescriptor) {
55
- Node.prototype[name] = function (
56
- eventName: string,
57
- listener: EventListener | EventListener[],
58
- ) {
59
- const events = this.attr(key) || {};
60
- if (arguments.length === 0) return events;
61
- if (arguments.length === 1) return events[eventName];
62
- const listeners = events[eventName];
63
- if (listeners) {
64
- isArray(listener) ? listeners.concat(listener) : listeners.push(listener);
65
- } else {
66
- events[eventName] = isArray(listener) ? listener : [listener];
67
- }
68
- return this.attr(key, events);
69
- };
70
- }
71
-
72
50
  /**
73
51
  * A decorator to define different type of attribute setter or
74
52
  * getter for current node.
@@ -82,7 +60,6 @@ export function defineProps(descriptors: NodePropertyDescriptor[]) {
82
60
  else if (type === 'object') defineObjectProp(Node, descriptor);
83
61
  else if (type === 'node') defineNodeProp(Node, descriptor);
84
62
  else if (type === 'container') defineContainerProp(Node, descriptor);
85
- else if (type === 'event') defineEventProp(Node, descriptor);
86
63
  }
87
64
  return Node;
88
65
  };
@@ -273,10 +273,17 @@ function inferOverrideStyle(
273
273
  startPos: [x, y],
274
274
  };
275
275
  } else if (position === 'arcY') {
276
+ const [startAngle, endAngle] = angleOf(coordinate);
276
277
  return {
277
278
  startPos: [x, y],
278
279
  endPos: [x + width, y + height],
279
280
  gridCenter: [bbox.x, cy + bbox.y],
281
+ gridControlAngles: new Array(3)
282
+ .fill(0)
283
+ .map(
284
+ (d, i, arr) =>
285
+ 90 + startAngle + ((endAngle - startAngle) / (arr.length - 1)) * i,
286
+ ),
280
287
  };
281
288
  }
282
289
 
@@ -8,8 +8,21 @@ import { titleContent } from './utils';
8
8
  export type LegendContinuousOptions = {
9
9
  position?: GuideComponentPosition;
10
10
  title?: string | string[];
11
+ [key: string]: any;
11
12
  };
12
13
 
14
+ function inferContinuousLayout(options: LegendContinuousOptions) {
15
+ const { position = 'top', size, length = 200 } = options;
16
+ const layouts = {
17
+ left: ['vertical', size, length],
18
+ right: ['vertical', size, length],
19
+ top: ['horizontal', length, size],
20
+ bottom: ['horizontal', length, size],
21
+ };
22
+ const [orient, width, height] = layouts[position];
23
+ return { orient, width, height };
24
+ }
25
+
13
26
  /**
14
27
  * Guide Component for continuous color scale.
15
28
  * @todo Custom style.
@@ -30,17 +43,14 @@ export const LegendContinuous: GCC<LegendContinuousOptions> = (options) => {
30
43
  {
31
44
  x,
32
45
  y,
33
- width: 400,
34
- height: 300,
35
46
  data: [{ value: min }, { value: max }],
36
47
  titleText: titleContent(title),
37
48
  titleFontSize: 12,
38
- ribbonLen: 120,
39
- ribbonSize: 12,
40
49
  ribbonColor: domain.map((d) => scale.map(d)),
41
50
  showHandle: false,
42
51
  showIndicator: false,
43
52
  labelAlign: 'value',
53
+ ...inferContinuousLayout(options),
44
54
  },
45
55
  rest,
46
56
  ),
@@ -51,5 +61,5 @@ export const LegendContinuous: GCC<LegendContinuousOptions> = (options) => {
51
61
  LegendContinuous.props = {
52
62
  defaultPosition: 'top',
53
63
  defaultOrder: 1,
54
- defaultSize: 40,
64
+ defaultSize: 50,
55
65
  };
@@ -2,6 +2,7 @@ import { Slider as SliderComponent } from '@antv/gui';
2
2
  import { format } from 'd3-format';
3
3
  import { least } from 'd3-array';
4
4
  import { GuideComponentComponent as GCC, Scale } from '../runtime';
5
+ import { invert } from '../utils/scale';
5
6
 
6
7
  export type SliderOptions = {
7
8
  orient: 'horizontal' | 'vertical';
@@ -34,7 +35,8 @@ export const Slider: GCC<SliderOptions> = (options) => {
34
35
  orient,
35
36
  formatter: (v) => {
36
37
  const f = formatter || defaultFormatter;
37
- const tick = invertTick(scale, v);
38
+ // @todo Pass index to distinguish the left and the right value.
39
+ const tick = invert(scale, v, true);
38
40
  return f(tick);
39
41
  },
40
42
  ...rest,
@@ -43,17 +45,6 @@ export const Slider: GCC<SliderOptions> = (options) => {
43
45
  };
44
46
  };
45
47
 
46
- /**
47
- * Translate [0,1] value to origin value.
48
- */
49
- function invertTick(scale: Scale, v: number) {
50
- if (!scale.getBandWidth) return scale.invert(v);
51
- // @ts-ignore @todo should support in scale
52
- const range = scale.adjustedRange as number[];
53
- const abs = (v) => Math.abs(v);
54
- return scale.invert(least(range, (a, b) => abs(a - v) - abs(b - v)));
55
- }
56
-
57
48
  Slider.props = {
58
49
  defaultPosition: 'bottom',
59
50
  defaultSize: 24,
Binary file
File without changes
@@ -4,7 +4,7 @@ import { geoPath, geoGraticule10 } from 'd3-geo';
4
4
  import { CompositionComponent as CC } from '../runtime';
5
5
  import { GeoViewComposition } from '../spec';
6
6
 
7
- import * as d3Projection from './d3-projection';
7
+ import * as d3Projection from './d3Projection';
8
8
 
9
9
  /**
10
10
  * Get projection factory from d3-projection.
@@ -10,6 +10,7 @@ export { ChartIndex } from './native/chartIndex';
10
10
  export { Fisheye } from './native/fisheye';
11
11
  export { Tooltip } from './native/tooltip';
12
12
  export { LegendFilter } from './native/legendFilter';
13
+ export { LegendHighlight } from './native/legendHighlight';
13
14
  export { BrushHighlight } from './native/brushHighlight';
14
15
  export { BrushXHighlight } from './native/brushXHighlight';
15
16
  export { BrushYHighlight } from './native/brushYHighlight';
@@ -17,6 +18,7 @@ export { BrushAxisHighlight } from './native/brushAxisHighlight';
17
18
  export { BrushFilter } from './native/brushFilter';
18
19
  export { BrushXFilter } from './native/brushXFilter';
19
20
  export { BrushYFilter } from './native/brushYFilter';
21
+ export { SliderFilter } from './native/sliderFilter';
20
22
 
21
23
  export { LEGEND_ITEMS_CLASS_NAME } from './native/legendFilter';
22
24
 
@@ -1,8 +1,8 @@
1
1
  import { deepMix } from '@antv/util';
2
- import { bisectLeft, sort } from 'd3-array';
3
2
  import { subObject } from '../../utils/helper';
4
- import { selectPlotArea } from './utils';
3
+ import { invert, domainOf } from '../../utils/scale';
5
4
  import { brush as createBrush } from './brushHighlight';
5
+ import { selectPlotArea } from './utils';
6
6
 
7
7
  // Mock dblclick events.
8
8
  function dblclick(interval = 300) {
@@ -64,37 +64,7 @@ export function brushFilter(
64
64
  };
65
65
  }
66
66
 
67
- function isOrdinalScale(scale) {
68
- return scale.getBandWidth;
69
- }
70
-
71
- function constrain(x, lo, hi) {
72
- return Math.min(hi, Math.max(lo, x));
73
- }
74
-
75
- function invert(scale, x, start) {
76
- if (!isOrdinalScale(scale)) return scale.invert(x);
77
- const { adjustedRange } = scale;
78
- const { domain } = scale.getOptions();
79
- const offset = start ? -1 : 0;
80
- const step = scale.getStep();
81
- const range = start ? adjustedRange : adjustedRange.map((d) => d + step);
82
- // R[i0 - 1] < x <= R[i0]
83
- const i0 = bisectLeft(range, x);
84
- const i1 = constrain(i0 + offset, 0, domain.length - 1);
85
- return domain[i1];
86
- }
87
-
88
- function domainOf(scale, values) {
89
- if (!isOrdinalScale(scale)) return sort(values);
90
- const { domain } = scale.getOptions();
91
- const [v1, v2] = values;
92
- const start = domain.indexOf(v1);
93
- const end = domain.indexOf(v2);
94
- return domain.slice(start, end + 1);
95
- }
96
-
97
- export function BrushFilter({ ...rest }) {
67
+ export function BrushFilter({ hideX = true, hideY = true, ...rest }) {
98
68
  return (target, viewInstances) => {
99
69
  const { container, view, options: viewOptions, update } = target;
100
70
  const plotArea = selectPlotArea(container);
@@ -130,12 +100,22 @@ export function BrushFilter({ ...rest }) {
130
100
  // Update the domain of x and y scale to filter data.
131
101
  const { marks } = viewOptions;
132
102
  const newMarks = marks.map((mark) =>
133
- deepMix({}, mark, {
134
- scale: {
135
- x: { domain: domainOf(scaleX, [p0[0], p1[0]]) },
136
- y: { domain: domainOf(scaleY, [p0[1], p1[1]]) },
103
+ deepMix(
104
+ {
105
+ // Hide label to keep smooth transition.
106
+ axis: {
107
+ ...(hideX && { x: { labelTransforms: [{ type: 'hide' }] } }),
108
+ ...(hideY && { y: { labelTransforms: [{ type: 'hide' }] } }),
109
+ },
110
+ },
111
+ mark,
112
+ {
113
+ scale: {
114
+ x: { domain: domainOf(scaleX, [p0[0], p1[0]]) },
115
+ y: { domain: domainOf(scaleY, [p0[1], p1[1]]) },
116
+ },
137
117
  },
138
- }),
118
+ ),
139
119
  );
140
120
 
141
121
  // Rerender and update view.
@@ -3,6 +3,7 @@ import { brushXRegion } from './brushXHighlight';
3
3
 
4
4
  export function BrushXFilter(options) {
5
5
  return BrushFilter({
6
+ hideX: true,
6
7
  ...options,
7
8
  brushRegion: brushXRegion,
8
9
  });
@@ -3,6 +3,7 @@ import { brushYRegion } from './brushYHighlight';
3
3
 
4
4
  export function BrushYFilter(options) {
5
5
  return BrushFilter({
6
+ hideY: true,
6
7
  ...options,
7
8
  brushRegion: brushYRegion,
8
9
  });
@@ -1,5 +1,6 @@
1
1
  import { DisplayObject } from '@antv/g';
2
2
  import { group } from 'd3-array';
3
+ import { isPolar, isTranspose } from '../../utils/coordinate';
3
4
  import { subObject } from '../../utils/helper';
4
5
  import {
5
6
  createValueof,
@@ -8,6 +9,9 @@ import {
8
9
  useState,
9
10
  renderLink,
10
11
  applyDefaultsHighlightedStyle,
12
+ renderBackground,
13
+ selectPlotArea,
14
+ offsetTransform,
11
15
  } from './utils';
12
16
 
13
17
  /**
@@ -20,6 +24,11 @@ export function elementHighlight(
20
24
  datum, // given each element returns the datum of it
21
25
  groupKey = (d) => d, // group elements by specified key
22
26
  link = false, // draw link or not
27
+ background = false, // draw background or not
28
+ delay = 60, // delay to unhighlighted element
29
+ scale,
30
+ coordinate,
31
+ offset = 0,
23
32
  ...rest
24
33
  }: Record<string, any>,
25
34
  ) {
@@ -27,49 +36,107 @@ export function elementHighlight(
27
36
  const elementSet = new Set(elements);
28
37
  const keyGroup = group(elements, groupKey);
29
38
  const valueof = createValueof(elements, datum);
30
- const [appendLink, removeLink] = renderLink(root, {
39
+ const [appendLink, removeLink] = renderLink({
31
40
  elements,
32
41
  valueof,
42
+ link,
43
+ coordinate,
33
44
  ...subObject(rest, 'link'),
34
45
  });
35
- const { setState, removeState } = useState(rest, valueof);
46
+ const [appendBackground, removeBackground, isBackground] = renderBackground({
47
+ scale,
48
+ coordinate,
49
+ background,
50
+ valueof,
51
+ ...subObject(rest, 'background'),
52
+ });
53
+ const elementStyle = {
54
+ ...(offset !== 0 && {
55
+ // Apply translate to mock slice out.
56
+ highlightedTransform: (_, i) => {
57
+ return offsetTransform(elements[i], offset, coordinate);
58
+ },
59
+ }),
60
+ ...rest,
61
+ };
62
+ const { setState, removeState, hasState } = useState(elementStyle, valueof);
36
63
 
64
+ let out; // Timer for delaying unhighlighted.
37
65
  const pointerover = (event) => {
38
66
  const { target: element } = event;
39
67
  if (!elementSet.has(element)) return;
68
+ if (out) clearTimeout(out);
40
69
  const k = groupKey(element);
41
70
  const group = keyGroup.get(k);
42
71
  const groupSet = new Set(group);
43
72
  for (const e of elements) {
44
- if (groupSet.has(e)) setState(e, 'highlighted');
45
- else setState(e, 'unhighlighted');
73
+ if (groupSet.has(e)) {
74
+ if (!hasState(e, 'highlighted')) setState(e, 'highlighted');
75
+ } else {
76
+ setState(e, 'unhighlighted');
77
+ removeLink(e);
78
+ }
79
+ if (e !== element) removeBackground(e);
80
+ }
81
+ appendBackground(element);
82
+ appendLink(group);
83
+ };
84
+
85
+ const delayUnhighlighted = () => {
86
+ if (out) clearTimeout(out);
87
+ out = setTimeout(() => {
88
+ unhighlighted();
89
+ out = null;
90
+ }, delay);
91
+ };
92
+
93
+ const unhighlighted = () => {
94
+ for (const e of elements) {
95
+ removeState(e, 'unhighlighted', 'highlighted');
96
+ removeBackground(e);
97
+ removeLink(e);
46
98
  }
47
- if (link) appendLink(group);
48
99
  };
49
100
 
50
101
  const pointerout = (event) => {
51
102
  const { target: element } = event;
52
- if (!elementSet.has(element)) return;
53
- for (const e of elements) removeState(e, 'unhighlighted', 'highlighted');
54
- if (link) removeLink();
103
+ if (background && !isBackground(element)) return;
104
+ if (!background && !elementSet.has(element)) return;
105
+ if (delay > 0) delayUnhighlighted();
106
+ else unhighlighted();
107
+ };
108
+
109
+ const pointerleave = () => {
110
+ unhighlighted();
55
111
  };
56
112
 
57
113
  root.addEventListener('pointerover', pointerover);
58
114
  root.addEventListener('pointerout', pointerout);
115
+ root.addEventListener('pointerleave', pointerleave);
59
116
 
60
117
  return () => {
61
118
  root.removeEventListener('pointerover', pointerover);
62
119
  root.removeEventListener('pointerout', pointerout);
120
+ root.removeEventListener('pointerleave', pointerleave);
121
+ for (const e of elements) {
122
+ removeBackground(e);
123
+ removeLink(e);
124
+ }
63
125
  };
64
126
  }
65
127
 
66
- export function ElementHighlight(options) {
128
+ export function ElementHighlight({ delay, ...rest }) {
67
129
  return (context) => {
68
130
  const { container, view } = context;
69
- return elementHighlight(container, {
70
- ...applyDefaultsHighlightedStyle(options),
131
+ const { scale, coordinate } = view;
132
+ const plotArea = selectPlotArea(container);
133
+ return elementHighlight(plotArea, {
134
+ ...applyDefaultsHighlightedStyle(rest),
71
135
  elements: selectG2Elements,
72
136
  datum: createDatumof(view),
137
+ scale,
138
+ coordinate,
139
+ delay,
73
140
  });
74
141
  };
75
142
  }