@antv/g2 4.1.42 → 4.1.43

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 (1338) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/package.json +3 -4
  3. package/src/chart/controller/annotation.ts +4 -0
  4. package/src/core.ts +1 -1
  5. package/dist/g2.min.js +0 -44
  6. package/dist/g2.min.js.map +0 -1
  7. package/esm/animate/animation/fade.d.ts +0 -21
  8. package/esm/animate/animation/fade.js +0 -42
  9. package/esm/animate/animation/fade.js.map +0 -1
  10. package/esm/animate/animation/grow-in.d.ts +0 -30
  11. package/esm/animate/animation/grow-in.js +0 -38
  12. package/esm/animate/animation/grow-in.js.map +0 -1
  13. package/esm/animate/animation/index.d.ts +0 -16
  14. package/esm/animate/animation/index.js +0 -17
  15. package/esm/animate/animation/index.js.map +0 -1
  16. package/esm/animate/animation/path-in.d.ts +0 -12
  17. package/esm/animate/animation/path-in.js +0 -21
  18. package/esm/animate/animation/path-in.js.map +0 -1
  19. package/esm/animate/animation/position-update.d.ts +0 -11
  20. package/esm/animate/animation/position-update.js +0 -24
  21. package/esm/animate/animation/position-update.js.map +0 -1
  22. package/esm/animate/animation/scale-in.d.ts +0 -19
  23. package/esm/animate/animation/scale-in.js +0 -60
  24. package/esm/animate/animation/scale-in.js.map +0 -1
  25. package/esm/animate/animation/sector-path-update.d.ts +0 -11
  26. package/esm/animate/animation/sector-path-update.js +0 -131
  27. package/esm/animate/animation/sector-path-update.js.map +0 -1
  28. package/esm/animate/animation/util.d.ts +0 -19
  29. package/esm/animate/animation/util.js +0 -88
  30. package/esm/animate/animation/util.js.map +0 -1
  31. package/esm/animate/animation/wave-in.d.ts +0 -13
  32. package/esm/animate/animation/wave-in.js +0 -26
  33. package/esm/animate/animation/wave-in.js.map +0 -1
  34. package/esm/animate/animation/zoom.d.ts +0 -21
  35. package/esm/animate/animation/zoom.js +0 -66
  36. package/esm/animate/animation/zoom.js.map +0 -1
  37. package/esm/animate/index.d.ts +0 -48
  38. package/esm/animate/index.js +0 -249
  39. package/esm/animate/index.js.map +0 -1
  40. package/esm/animate/interface.d.ts +0 -12
  41. package/esm/animate/interface.js +0 -2
  42. package/esm/animate/interface.js.map +0 -1
  43. package/esm/api.d.ts +0 -2
  44. package/esm/api.js +0 -3
  45. package/esm/api.js.map +0 -1
  46. package/esm/base.d.ts +0 -33
  47. package/esm/base.js +0 -55
  48. package/esm/base.js.map +0 -1
  49. package/esm/chart/chart.d.ts +0 -61
  50. package/esm/chart/chart.js +0 -157
  51. package/esm/chart/chart.js.map +0 -1
  52. package/esm/chart/controller/annotation.d.ts +0 -162
  53. package/esm/chart/controller/annotation.js +0 -577
  54. package/esm/chart/controller/annotation.js.map +0 -1
  55. package/esm/chart/controller/axis.d.ts +0 -93
  56. package/esm/chart/controller/axis.js +0 -578
  57. package/esm/chart/controller/axis.js.map +0 -1
  58. package/esm/chart/controller/base.d.ts +0 -64
  59. package/esm/chart/controller/base.js +0 -62
  60. package/esm/chart/controller/base.js.map +0 -1
  61. package/esm/chart/controller/coordinate.d.ts +0 -74
  62. package/esm/chart/controller/coordinate.js +0 -145
  63. package/esm/chart/controller/coordinate.js.map +0 -1
  64. package/esm/chart/controller/gesture.d.ts +0 -37
  65. package/esm/chart/controller/gesture.js +0 -258
  66. package/esm/chart/controller/gesture.js.map +0 -1
  67. package/esm/chart/controller/index.d.ts +0 -25
  68. package/esm/chart/controller/index.js +0 -34
  69. package/esm/chart/controller/index.js.map +0 -1
  70. package/esm/chart/controller/legend.d.ts +0 -106
  71. package/esm/chart/controller/legend.js +0 -484
  72. package/esm/chart/controller/legend.js.map +0 -1
  73. package/esm/chart/controller/scrollbar.d.ts +0 -64
  74. package/esm/chart/controller/scrollbar.js +0 -316
  75. package/esm/chart/controller/scrollbar.js.map +0 -1
  76. package/esm/chart/controller/slider.d.ts +0 -88
  77. package/esm/chart/controller/slider.js +0 -296
  78. package/esm/chart/controller/slider.js.map +0 -1
  79. package/esm/chart/controller/tooltip.d.ts +0 -68
  80. package/esm/chart/controller/tooltip.js +0 -644
  81. package/esm/chart/controller/tooltip.js.map +0 -1
  82. package/esm/chart/event.d.ts +0 -47
  83. package/esm/chart/event.js +0 -91
  84. package/esm/chart/event.js.map +0 -1
  85. package/esm/chart/index.d.ts +0 -4
  86. package/esm/chart/index.js +0 -5
  87. package/esm/chart/index.js.map +0 -1
  88. package/esm/chart/layout/auto.d.ts +0 -8
  89. package/esm/chart/layout/auto.js +0 -64
  90. package/esm/chart/layout/auto.js.map +0 -1
  91. package/esm/chart/layout/constraint/bounds.d.ts +0 -32
  92. package/esm/chart/layout/constraint/bounds.js +0 -30
  93. package/esm/chart/layout/constraint/bounds.js.map +0 -1
  94. package/esm/chart/layout/constraint/constraint.d.ts +0 -31
  95. package/esm/chart/layout/constraint/constraint.js +0 -81
  96. package/esm/chart/layout/constraint/constraint.js.map +0 -1
  97. package/esm/chart/layout/constraint/gauss.d.ts +0 -11
  98. package/esm/chart/layout/constraint/gauss.js +0 -63
  99. package/esm/chart/layout/constraint/gauss.js.map +0 -1
  100. package/esm/chart/layout/constraint/index.d.ts +0 -5
  101. package/esm/chart/layout/constraint/index.js +0 -30
  102. package/esm/chart/layout/constraint/index.js.map +0 -1
  103. package/esm/chart/layout/constraint/solver.d.ts +0 -40
  104. package/esm/chart/layout/constraint/solver.js +0 -77
  105. package/esm/chart/layout/constraint/solver.js.map +0 -1
  106. package/esm/chart/layout/constraint/types.d.ts +0 -21
  107. package/esm/chart/layout/constraint/types.js +0 -13
  108. package/esm/chart/layout/constraint/types.js.map +0 -1
  109. package/esm/chart/layout/constraint/variable.d.ts +0 -24
  110. package/esm/chart/layout/constraint/variable.js +0 -28
  111. package/esm/chart/layout/constraint/variable.js.map +0 -1
  112. package/esm/chart/layout/index.d.ts +0 -15
  113. package/esm/chart/layout/index.js +0 -26
  114. package/esm/chart/layout/index.js.map +0 -1
  115. package/esm/chart/layout/padding-cal.d.ts +0 -53
  116. package/esm/chart/layout/padding-cal.js +0 -108
  117. package/esm/chart/layout/padding-cal.js.map +0 -1
  118. package/esm/chart/util/scale-pool.d.ts +0 -57
  119. package/esm/chart/util/scale-pool.js +0 -212
  120. package/esm/chart/util/scale-pool.js.map +0 -1
  121. package/esm/chart/util/sync-view-padding.d.ts +0 -9
  122. package/esm/chart/util/sync-view-padding.js +0 -14
  123. package/esm/chart/util/sync-view-padding.js.map +0 -1
  124. package/esm/chart/view.d.ts +0 -747
  125. package/esm/chart/view.js +0 -1633
  126. package/esm/chart/view.js.map +0 -1
  127. package/esm/component/labels.d.ts +0 -47
  128. package/esm/component/labels.js +0 -274
  129. package/esm/component/labels.js.map +0 -1
  130. package/esm/component/update-label.d.ts +0 -21
  131. package/esm/component/update-label.js +0 -57
  132. package/esm/component/update-label.js.map +0 -1
  133. package/esm/constant.d.ts +0 -122
  134. package/esm/constant.js +0 -134
  135. package/esm/constant.js.map +0 -1
  136. package/esm/core.d.ts +0 -46
  137. package/esm/core.js +0 -60
  138. package/esm/core.js.map +0 -1
  139. package/esm/dependents.d.ts +0 -21
  140. package/esm/dependents.js +0 -33
  141. package/esm/dependents.js.map +0 -1
  142. package/esm/engine/index.d.ts +0 -13
  143. package/esm/engine/index.js +0 -22
  144. package/esm/engine/index.js.map +0 -1
  145. package/esm/facet/circle.d.ts +0 -36
  146. package/esm/facet/circle.js +0 -119
  147. package/esm/facet/circle.js.map +0 -1
  148. package/esm/facet/facet.d.ts +0 -165
  149. package/esm/facet/facet.js +0 -291
  150. package/esm/facet/facet.js.map +0 -1
  151. package/esm/facet/index.d.ts +0 -13
  152. package/esm/facet/index.js +0 -22
  153. package/esm/facet/index.js.map +0 -1
  154. package/esm/facet/list.d.ts +0 -46
  155. package/esm/facet/list.js +0 -134
  156. package/esm/facet/list.js.map +0 -1
  157. package/esm/facet/matrix.d.ts +0 -34
  158. package/esm/facet/matrix.js +0 -119
  159. package/esm/facet/matrix.js.map +0 -1
  160. package/esm/facet/mirror.d.ts +0 -31
  161. package/esm/facet/mirror.js +0 -144
  162. package/esm/facet/mirror.js.map +0 -1
  163. package/esm/facet/rect.d.ts +0 -35
  164. package/esm/facet/rect.js +0 -141
  165. package/esm/facet/rect.js.map +0 -1
  166. package/esm/facet/tree.d.ts +0 -40
  167. package/esm/facet/tree.js +0 -288
  168. package/esm/facet/tree.js.map +0 -1
  169. package/esm/geometry/area.d.ts +0 -46
  170. package/esm/geometry/area.js +0 -62
  171. package/esm/geometry/area.js.map +0 -1
  172. package/esm/geometry/base.d.ts +0 -793
  173. package/esm/geometry/base.js +0 -1487
  174. package/esm/geometry/base.js.map +0 -1
  175. package/esm/geometry/edge.d.ts +0 -15
  176. package/esm/geometry/edge.js +0 -24
  177. package/esm/geometry/edge.js.map +0 -1
  178. package/esm/geometry/element/index.d.ts +0 -127
  179. package/esm/geometry/element/index.js +0 -436
  180. package/esm/geometry/element/index.js.map +0 -1
  181. package/esm/geometry/heatmap.d.ts +0 -31
  182. package/esm/geometry/heatmap.js +0 -190
  183. package/esm/geometry/heatmap.js.map +0 -1
  184. package/esm/geometry/interval.d.ts +0 -41
  185. package/esm/geometry/interval.js +0 -98
  186. package/esm/geometry/interval.js.map +0 -1
  187. package/esm/geometry/label/base.d.ts +0 -76
  188. package/esm/geometry/label/base.js +0 -404
  189. package/esm/geometry/label/base.js.map +0 -1
  190. package/esm/geometry/label/index.d.ts +0 -38
  191. package/esm/geometry/label/index.js +0 -35
  192. package/esm/geometry/label/index.js.map +0 -1
  193. package/esm/geometry/label/interface.d.ts +0 -50
  194. package/esm/geometry/label/interface.js +0 -2
  195. package/esm/geometry/label/interface.js.map +0 -1
  196. package/esm/geometry/label/interval.d.ts +0 -27
  197. package/esm/geometry/label/interval.js +0 -146
  198. package/esm/geometry/label/interval.js.map +0 -1
  199. package/esm/geometry/label/layout/adjust-color.d.ts +0 -3
  200. package/esm/geometry/label/layout/adjust-color.js +0 -36
  201. package/esm/geometry/label/layout/adjust-color.js.map +0 -1
  202. package/esm/geometry/label/layout/hide-overlap.d.ts +0 -8
  203. package/esm/geometry/label/layout/hide-overlap.js +0 -29
  204. package/esm/geometry/label/layout/hide-overlap.js.map +0 -1
  205. package/esm/geometry/label/layout/interval/adjust-position.d.ts +0 -9
  206. package/esm/geometry/label/layout/interval/adjust-position.js +0 -61
  207. package/esm/geometry/label/layout/interval/adjust-position.js.map +0 -1
  208. package/esm/geometry/label/layout/interval/hide-overlap.d.ts +0 -9
  209. package/esm/geometry/label/layout/interval/hide-overlap.js +0 -78
  210. package/esm/geometry/label/layout/interval/hide-overlap.js.map +0 -1
  211. package/esm/geometry/label/layout/limit-in-canvas.d.ts +0 -9
  212. package/esm/geometry/label/layout/limit-in-canvas.js +0 -44
  213. package/esm/geometry/label/layout/limit-in-canvas.js.map +0 -1
  214. package/esm/geometry/label/layout/limit-in-plot.d.ts +0 -18
  215. package/esm/geometry/label/layout/limit-in-plot.js +0 -75
  216. package/esm/geometry/label/layout/limit-in-plot.js.map +0 -1
  217. package/esm/geometry/label/layout/limit-in-shape.d.ts +0 -7
  218. package/esm/geometry/label/layout/limit-in-shape.js +0 -18
  219. package/esm/geometry/label/layout/limit-in-shape.js.map +0 -1
  220. package/esm/geometry/label/layout/overlap.d.ts +0 -15
  221. package/esm/geometry/label/layout/overlap.js +0 -223
  222. package/esm/geometry/label/layout/overlap.js.map +0 -1
  223. package/esm/geometry/label/layout/path/adjust-position.d.ts +0 -17
  224. package/esm/geometry/label/layout/path/adjust-position.js +0 -94
  225. package/esm/geometry/label/layout/path/adjust-position.js.map +0 -1
  226. package/esm/geometry/label/layout/pie/distribute.d.ts +0 -3
  227. package/esm/geometry/label/layout/pie/distribute.js +0 -185
  228. package/esm/geometry/label/layout/pie/distribute.js.map +0 -1
  229. package/esm/geometry/label/layout/pie/outer.d.ts +0 -6
  230. package/esm/geometry/label/layout/pie/outer.js +0 -207
  231. package/esm/geometry/label/layout/pie/outer.js.map +0 -1
  232. package/esm/geometry/label/layout/pie/spider.d.ts +0 -7
  233. package/esm/geometry/label/layout/pie/spider.js +0 -181
  234. package/esm/geometry/label/layout/pie/spider.js.map +0 -1
  235. package/esm/geometry/label/layout/pie/util.d.ts +0 -10
  236. package/esm/geometry/label/layout/pie/util.js +0 -73
  237. package/esm/geometry/label/layout/pie/util.js.map +0 -1
  238. package/esm/geometry/label/layout/point/adjust-position.d.ts +0 -17
  239. package/esm/geometry/label/layout/point/adjust-position.js +0 -94
  240. package/esm/geometry/label/layout/point/adjust-position.js.map +0 -1
  241. package/esm/geometry/label/pie.d.ts +0 -22
  242. package/esm/geometry/label/pie.js +0 -95
  243. package/esm/geometry/label/pie.js.map +0 -1
  244. package/esm/geometry/label/polar.d.ts +0 -64
  245. package/esm/geometry/label/polar.js +0 -221
  246. package/esm/geometry/label/polar.js.map +0 -1
  247. package/esm/geometry/label/util/index.d.ts +0 -26
  248. package/esm/geometry/label/util/index.js +0 -61
  249. package/esm/geometry/label/util/index.js.map +0 -1
  250. package/esm/geometry/line.d.ts +0 -11
  251. package/esm/geometry/line.js +0 -21
  252. package/esm/geometry/line.js.map +0 -1
  253. package/esm/geometry/path.d.ts +0 -40
  254. package/esm/geometry/path.js +0 -122
  255. package/esm/geometry/path.js.map +0 -1
  256. package/esm/geometry/point.d.ts +0 -19
  257. package/esm/geometry/point.js +0 -30
  258. package/esm/geometry/point.js.map +0 -1
  259. package/esm/geometry/polygon.d.ts +0 -19
  260. package/esm/geometry/polygon.js +0 -62
  261. package/esm/geometry/polygon.js.map +0 -1
  262. package/esm/geometry/schema.d.ts +0 -18
  263. package/esm/geometry/schema.js +0 -48
  264. package/esm/geometry/schema.js.map +0 -1
  265. package/esm/geometry/shape/area/index.d.ts +0 -2
  266. package/esm/geometry/shape/area/index.js +0 -44
  267. package/esm/geometry/shape/area/index.js.map +0 -1
  268. package/esm/geometry/shape/area/line.d.ts +0 -1
  269. package/esm/geometry/shape/area/line.js +0 -31
  270. package/esm/geometry/shape/area/line.js.map +0 -1
  271. package/esm/geometry/shape/area/smooth-line.d.ts +0 -1
  272. package/esm/geometry/shape/area/smooth-line.js +0 -30
  273. package/esm/geometry/shape/area/smooth-line.js.map +0 -1
  274. package/esm/geometry/shape/area/smooth.d.ts +0 -1
  275. package/esm/geometry/shape/area/smooth.js +0 -31
  276. package/esm/geometry/shape/area/smooth.js.map +0 -1
  277. package/esm/geometry/shape/area/util.d.ts +0 -22
  278. package/esm/geometry/shape/area/util.js +0 -88
  279. package/esm/geometry/shape/area/util.js.map +0 -1
  280. package/esm/geometry/shape/base.d.ts +0 -22
  281. package/esm/geometry/shape/base.js +0 -162
  282. package/esm/geometry/shape/base.js.map +0 -1
  283. package/esm/geometry/shape/constant.d.ts +0 -4
  284. package/esm/geometry/shape/constant.js +0 -5
  285. package/esm/geometry/shape/constant.js.map +0 -1
  286. package/esm/geometry/shape/edge/arc.d.ts +0 -1
  287. package/esm/geometry/shape/edge/arc.js +0 -84
  288. package/esm/geometry/shape/edge/arc.js.map +0 -1
  289. package/esm/geometry/shape/edge/index.d.ts +0 -2
  290. package/esm/geometry/shape/edge/index.js +0 -31
  291. package/esm/geometry/shape/edge/index.js.map +0 -1
  292. package/esm/geometry/shape/edge/smooth.d.ts +0 -1
  293. package/esm/geometry/shape/edge/smooth.js +0 -30
  294. package/esm/geometry/shape/edge/smooth.js.map +0 -1
  295. package/esm/geometry/shape/edge/util.d.ts +0 -17
  296. package/esm/geometry/shape/edge/util.js +0 -32
  297. package/esm/geometry/shape/edge/util.js.map +0 -1
  298. package/esm/geometry/shape/edge/vhv.d.ts +0 -1
  299. package/esm/geometry/shape/edge/vhv.js +0 -42
  300. package/esm/geometry/shape/edge/vhv.js.map +0 -1
  301. package/esm/geometry/shape/interval/funnel.d.ts +0 -1
  302. package/esm/geometry/shape/interval/funnel.js +0 -31
  303. package/esm/geometry/shape/interval/funnel.js.map +0 -1
  304. package/esm/geometry/shape/interval/hollow-rect.d.ts +0 -1
  305. package/esm/geometry/shape/interval/hollow-rect.js +0 -51
  306. package/esm/geometry/shape/interval/hollow-rect.js.map +0 -1
  307. package/esm/geometry/shape/interval/index.d.ts +0 -3
  308. package/esm/geometry/shape/interval/index.js +0 -63
  309. package/esm/geometry/shape/interval/index.js.map +0 -1
  310. package/esm/geometry/shape/interval/line.d.ts +0 -1
  311. package/esm/geometry/shape/interval/line.js +0 -54
  312. package/esm/geometry/shape/interval/line.js.map +0 -1
  313. package/esm/geometry/shape/interval/pyramid.d.ts +0 -1
  314. package/esm/geometry/shape/interval/pyramid.js +0 -31
  315. package/esm/geometry/shape/interval/pyramid.js.map +0 -1
  316. package/esm/geometry/shape/interval/tick.d.ts +0 -1
  317. package/esm/geometry/shape/interval/tick.js +0 -77
  318. package/esm/geometry/shape/interval/tick.js.map +0 -1
  319. package/esm/geometry/shape/interval/util.d.ts +0 -55
  320. package/esm/geometry/shape/interval/util.js +0 -311
  321. package/esm/geometry/shape/interval/util.js.map +0 -1
  322. package/esm/geometry/shape/line/index.d.ts +0 -8
  323. package/esm/geometry/shape/line/index.js +0 -105
  324. package/esm/geometry/shape/line/index.js.map +0 -1
  325. package/esm/geometry/shape/line/step.d.ts +0 -1
  326. package/esm/geometry/shape/line/step.js +0 -84
  327. package/esm/geometry/shape/line/step.js.map +0 -1
  328. package/esm/geometry/shape/line/util.d.ts +0 -16
  329. package/esm/geometry/shape/line/util.js +0 -83
  330. package/esm/geometry/shape/line/util.js.map +0 -1
  331. package/esm/geometry/shape/point/hollow.d.ts +0 -1
  332. package/esm/geometry/shape/point/hollow.js +0 -24
  333. package/esm/geometry/shape/point/hollow.js.map +0 -1
  334. package/esm/geometry/shape/point/image.d.ts +0 -1
  335. package/esm/geometry/shape/point/image.js +0 -48
  336. package/esm/geometry/shape/point/image.js.map +0 -1
  337. package/esm/geometry/shape/point/index.d.ts +0 -2
  338. package/esm/geometry/shape/point/index.js +0 -32
  339. package/esm/geometry/shape/point/index.js.map +0 -1
  340. package/esm/geometry/shape/point/solid.d.ts +0 -1
  341. package/esm/geometry/shape/point/solid.js +0 -23
  342. package/esm/geometry/shape/point/solid.js.map +0 -1
  343. package/esm/geometry/shape/point/util.d.ts +0 -15
  344. package/esm/geometry/shape/point/util.js +0 -39
  345. package/esm/geometry/shape/point/util.js.map +0 -1
  346. package/esm/geometry/shape/polygon/index.d.ts +0 -2
  347. package/esm/geometry/shape/polygon/index.js +0 -65
  348. package/esm/geometry/shape/polygon/index.js.map +0 -1
  349. package/esm/geometry/shape/polygon/square.d.ts +0 -1
  350. package/esm/geometry/shape/polygon/square.js +0 -44
  351. package/esm/geometry/shape/polygon/square.js.map +0 -1
  352. package/esm/geometry/shape/schema/box.d.ts +0 -1
  353. package/esm/geometry/shape/schema/box.js +0 -142
  354. package/esm/geometry/shape/schema/box.js.map +0 -1
  355. package/esm/geometry/shape/schema/candle.d.ts +0 -1
  356. package/esm/geometry/shape/schema/candle.js +0 -80
  357. package/esm/geometry/shape/schema/candle.js.map +0 -1
  358. package/esm/geometry/shape/schema/index.d.ts +0 -2
  359. package/esm/geometry/shape/schema/index.js +0 -6
  360. package/esm/geometry/shape/schema/index.js.map +0 -1
  361. package/esm/geometry/shape/util/get-path-points.d.ts +0 -38
  362. package/esm/geometry/shape/util/get-path-points.js +0 -131
  363. package/esm/geometry/shape/util/get-path-points.js.map +0 -1
  364. package/esm/geometry/shape/util/get-style.d.ts +0 -18
  365. package/esm/geometry/shape/util/get-style.js +0 -47
  366. package/esm/geometry/shape/util/get-style.js.map +0 -1
  367. package/esm/geometry/shape/util/path.d.ts +0 -32
  368. package/esm/geometry/shape/util/path.js +0 -311
  369. package/esm/geometry/shape/util/path.js.map +0 -1
  370. package/esm/geometry/shape/util/split-points.d.ts +0 -13
  371. package/esm/geometry/shape/util/split-points.js +0 -24
  372. package/esm/geometry/shape/util/split-points.js.map +0 -1
  373. package/esm/geometry/shape/violin/hollow.d.ts +0 -1
  374. package/esm/geometry/shape/violin/hollow.js +0 -51
  375. package/esm/geometry/shape/violin/hollow.js.map +0 -1
  376. package/esm/geometry/shape/violin/index.d.ts +0 -2
  377. package/esm/geometry/shape/violin/index.js +0 -60
  378. package/esm/geometry/shape/violin/index.js.map +0 -1
  379. package/esm/geometry/shape/violin/smooth.d.ts +0 -1
  380. package/esm/geometry/shape/violin/smooth.js +0 -28
  381. package/esm/geometry/shape/violin/smooth.js.map +0 -1
  382. package/esm/geometry/util/diff.d.ts +0 -11
  383. package/esm/geometry/util/diff.js +0 -30
  384. package/esm/geometry/util/diff.js.map +0 -1
  385. package/esm/geometry/util/get-shape-type.d.ts +0 -8
  386. package/esm/geometry/util/get-shape-type.js +0 -16
  387. package/esm/geometry/util/get-shape-type.js.map +0 -1
  388. package/esm/geometry/util/group-data.d.ts +0 -3
  389. package/esm/geometry/util/group-data.js +0 -31
  390. package/esm/geometry/util/group-data.js.map +0 -1
  391. package/esm/geometry/util/is-model-change.d.ts +0 -9
  392. package/esm/geometry/util/is-model-change.js +0 -14
  393. package/esm/geometry/util/is-model-change.js.map +0 -1
  394. package/esm/geometry/util/parse-fields.d.ts +0 -2
  395. package/esm/geometry/util/parse-fields.js +0 -9
  396. package/esm/geometry/util/parse-fields.js.map +0 -1
  397. package/esm/geometry/util/shape-size.d.ts +0 -2
  398. package/esm/geometry/util/shape-size.js +0 -124
  399. package/esm/geometry/util/shape-size.js.map +0 -1
  400. package/esm/geometry/violin.d.ts +0 -25
  401. package/esm/geometry/violin.js +0 -67
  402. package/esm/geometry/violin.js.map +0 -1
  403. package/esm/index.d.ts +0 -107
  404. package/esm/index.js +0 -581
  405. package/esm/index.js.map +0 -1
  406. package/esm/interaction/action/active-region.d.ts +0 -33
  407. package/esm/interaction/action/active-region.js +0 -198
  408. package/esm/interaction/action/active-region.js.map +0 -1
  409. package/esm/interaction/action/base.d.ts +0 -29
  410. package/esm/interaction/action/base.js +0 -36
  411. package/esm/interaction/action/base.js.map +0 -1
  412. package/esm/interaction/action/callback.d.ts +0 -17
  413. package/esm/interaction/action/callback.js +0 -27
  414. package/esm/interaction/action/callback.js.map +0 -1
  415. package/esm/interaction/action/component/list-active.d.ts +0 -14
  416. package/esm/interaction/action/component/list-active.js +0 -24
  417. package/esm/interaction/action/component/list-active.js.map +0 -1
  418. package/esm/interaction/action/component/list-checked.d.ts +0 -30
  419. package/esm/interaction/action/component/list-checked.js +0 -82
  420. package/esm/interaction/action/component/list-checked.js.map +0 -1
  421. package/esm/interaction/action/component/list-focus.d.ts +0 -5
  422. package/esm/interaction/action/component/list-focus.js +0 -55
  423. package/esm/interaction/action/component/list-focus.js.map +0 -1
  424. package/esm/interaction/action/component/list-highlight-util.d.ts +0 -7
  425. package/esm/interaction/action/component/list-highlight-util.js +0 -20
  426. package/esm/interaction/action/component/list-highlight-util.js.map +0 -1
  427. package/esm/interaction/action/component/list-highlight.d.ts +0 -20
  428. package/esm/interaction/action/component/list-highlight.js +0 -97
  429. package/esm/interaction/action/component/list-highlight.js.map +0 -1
  430. package/esm/interaction/action/component/list-radio.d.ts +0 -24
  431. package/esm/interaction/action/component/list-radio.js +0 -116
  432. package/esm/interaction/action/component/list-radio.js.map +0 -1
  433. package/esm/interaction/action/component/list-selected.d.ts +0 -10
  434. package/esm/interaction/action/component/list-selected.js +0 -20
  435. package/esm/interaction/action/component/list-selected.js.map +0 -1
  436. package/esm/interaction/action/component/list-state.d.ts +0 -46
  437. package/esm/interaction/action/component/list-state.js +0 -167
  438. package/esm/interaction/action/component/list-state.js.map +0 -1
  439. package/esm/interaction/action/component/list-unchecked.d.ts +0 -13
  440. package/esm/interaction/action/component/list-unchecked.js +0 -23
  441. package/esm/interaction/action/component/list-unchecked.js.map +0 -1
  442. package/esm/interaction/action/component/tooltip/ellipsis-text.d.ts +0 -25
  443. package/esm/interaction/action/component/tooltip/ellipsis-text.js +0 -93
  444. package/esm/interaction/action/component/tooltip/ellipsis-text.js.map +0 -1
  445. package/esm/interaction/action/component/tooltip/geometry.d.ts +0 -24
  446. package/esm/interaction/action/component/tooltip/geometry.js +0 -71
  447. package/esm/interaction/action/component/tooltip/geometry.js.map +0 -1
  448. package/esm/interaction/action/component/tooltip/sibling.d.ts +0 -21
  449. package/esm/interaction/action/component/tooltip/sibling.js +0 -39
  450. package/esm/interaction/action/component/tooltip/sibling.js.map +0 -1
  451. package/esm/interaction/action/cursor.d.ts +0 -69
  452. package/esm/interaction/action/cursor.js +0 -113
  453. package/esm/interaction/action/cursor.js.map +0 -1
  454. package/esm/interaction/action/data/filter.d.ts +0 -13
  455. package/esm/interaction/action/data/filter.js +0 -66
  456. package/esm/interaction/action/data/filter.js.map +0 -1
  457. package/esm/interaction/action/data/range-filter.d.ts +0 -56
  458. package/esm/interaction/action/data/range-filter.js +0 -163
  459. package/esm/interaction/action/data/range-filter.js.map +0 -1
  460. package/esm/interaction/action/data/sibling-filter.d.ts +0 -22
  461. package/esm/interaction/action/data/sibling-filter.js +0 -39
  462. package/esm/interaction/action/data/sibling-filter.js.map +0 -1
  463. package/esm/interaction/action/element/active.d.ts +0 -14
  464. package/esm/interaction/action/element/active.js +0 -24
  465. package/esm/interaction/action/element/active.js.map +0 -1
  466. package/esm/interaction/action/element/filter.d.ts +0 -20
  467. package/esm/interaction/action/element/filter.js +0 -89
  468. package/esm/interaction/action/element/filter.js.map +0 -1
  469. package/esm/interaction/action/element/highlight-by-color.d.ts +0 -10
  470. package/esm/interaction/action/element/highlight-by-color.js +0 -30
  471. package/esm/interaction/action/element/highlight-by-color.js.map +0 -1
  472. package/esm/interaction/action/element/highlight-by-x.d.ts +0 -15
  473. package/esm/interaction/action/element/highlight-by-x.js +0 -51
  474. package/esm/interaction/action/element/highlight-by-x.js.map +0 -1
  475. package/esm/interaction/action/element/highlight-util.d.ts +0 -18
  476. package/esm/interaction/action/element/highlight-util.js +0 -45
  477. package/esm/interaction/action/element/highlight-util.js.map +0 -1
  478. package/esm/interaction/action/element/highlight.d.ts +0 -21
  479. package/esm/interaction/action/element/highlight.js +0 -93
  480. package/esm/interaction/action/element/highlight.js.map +0 -1
  481. package/esm/interaction/action/element/link-by-color.d.ts +0 -51
  482. package/esm/interaction/action/element/link-by-color.js +0 -156
  483. package/esm/interaction/action/element/link-by-color.js.map +0 -1
  484. package/esm/interaction/action/element/range-active.d.ts +0 -13
  485. package/esm/interaction/action/element/range-active.js +0 -23
  486. package/esm/interaction/action/element/range-active.js.map +0 -1
  487. package/esm/interaction/action/element/range-highlight.d.ts +0 -27
  488. package/esm/interaction/action/element/range-highlight.js +0 -54
  489. package/esm/interaction/action/element/range-highlight.js.map +0 -1
  490. package/esm/interaction/action/element/range-selected.d.ts +0 -13
  491. package/esm/interaction/action/element/range-selected.js +0 -23
  492. package/esm/interaction/action/element/range-selected.js.map +0 -1
  493. package/esm/interaction/action/element/range-state.d.ts +0 -38
  494. package/esm/interaction/action/element/range-state.js +0 -164
  495. package/esm/interaction/action/element/range-state.js.map +0 -1
  496. package/esm/interaction/action/element/selected.d.ts +0 -14
  497. package/esm/interaction/action/element/selected.js +0 -24
  498. package/esm/interaction/action/element/selected.js.map +0 -1
  499. package/esm/interaction/action/element/sibling-filter.d.ts +0 -19
  500. package/esm/interaction/action/element/sibling-filter.js +0 -93
  501. package/esm/interaction/action/element/sibling-filter.js.map +0 -1
  502. package/esm/interaction/action/element/single-active.d.ts +0 -13
  503. package/esm/interaction/action/element/single-active.js +0 -23
  504. package/esm/interaction/action/element/single-active.js.map +0 -1
  505. package/esm/interaction/action/element/single-highlight.d.ts +0 -16
  506. package/esm/interaction/action/element/single-highlight.js +0 -35
  507. package/esm/interaction/action/element/single-highlight.js.map +0 -1
  508. package/esm/interaction/action/element/single-selected.d.ts +0 -13
  509. package/esm/interaction/action/element/single-selected.js +0 -23
  510. package/esm/interaction/action/element/single-selected.js.map +0 -1
  511. package/esm/interaction/action/element/single-state.d.ts +0 -18
  512. package/esm/interaction/action/element/single-state.js +0 -53
  513. package/esm/interaction/action/element/single-state.js.map +0 -1
  514. package/esm/interaction/action/element/state-base.d.ts +0 -39
  515. package/esm/interaction/action/element/state-base.js +0 -59
  516. package/esm/interaction/action/element/state-base.js.map +0 -1
  517. package/esm/interaction/action/element/state.d.ts +0 -28
  518. package/esm/interaction/action/element/state.js +0 -99
  519. package/esm/interaction/action/element/state.js.map +0 -1
  520. package/esm/interaction/action/index.d.ts +0 -2
  521. package/esm/interaction/action/index.js +0 -3
  522. package/esm/interaction/action/index.js.map +0 -1
  523. package/esm/interaction/action/mask/base.d.ts +0 -62
  524. package/esm/interaction/action/mask/base.js +0 -169
  525. package/esm/interaction/action/mask/base.js.map +0 -1
  526. package/esm/interaction/action/mask/circle.d.ts +0 -14
  527. package/esm/interaction/action/mask/circle.js +0 -37
  528. package/esm/interaction/action/mask/circle.js.map +0 -1
  529. package/esm/interaction/action/mask/dim-rect.d.ts +0 -11
  530. package/esm/interaction/action/mask/dim-rect.js +0 -62
  531. package/esm/interaction/action/mask/dim-rect.js.map +0 -1
  532. package/esm/interaction/action/mask/path.d.ts +0 -16
  533. package/esm/interaction/action/mask/path.js +0 -44
  534. package/esm/interaction/action/mask/path.js.map +0 -1
  535. package/esm/interaction/action/mask/rect.d.ts +0 -17
  536. package/esm/interaction/action/mask/rect.js +0 -39
  537. package/esm/interaction/action/mask/rect.js.map +0 -1
  538. package/esm/interaction/action/mask/smooth-path.d.ts +0 -9
  539. package/esm/interaction/action/mask/smooth-path.js +0 -21
  540. package/esm/interaction/action/mask/smooth-path.js.map +0 -1
  541. package/esm/interaction/action/register.d.ts +0 -36
  542. package/esm/interaction/action/register.js +0 -60
  543. package/esm/interaction/action/register.js.map +0 -1
  544. package/esm/interaction/action/util.d.ts +0 -140
  545. package/esm/interaction/action/util.js +0 -361
  546. package/esm/interaction/action/util.js.map +0 -1
  547. package/esm/interaction/action/view/button.d.ts +0 -25
  548. package/esm/interaction/action/view/button.js +0 -116
  549. package/esm/interaction/action/view/button.js.map +0 -1
  550. package/esm/interaction/action/view/drag.d.ts +0 -24
  551. package/esm/interaction/action/view/drag.js +0 -73
  552. package/esm/interaction/action/view/drag.js.map +0 -1
  553. package/esm/interaction/action/view/mousewheel-scroll.d.ts +0 -5
  554. package/esm/interaction/action/view/mousewheel-scroll.js +0 -35
  555. package/esm/interaction/action/view/mousewheel-scroll.js.map +0 -1
  556. package/esm/interaction/action/view/move.d.ts +0 -28
  557. package/esm/interaction/action/view/move.js +0 -80
  558. package/esm/interaction/action/view/move.js.map +0 -1
  559. package/esm/interaction/action/view/scale-transform.d.ts +0 -18
  560. package/esm/interaction/action/view/scale-transform.js +0 -51
  561. package/esm/interaction/action/view/scale-transform.js.map +0 -1
  562. package/esm/interaction/action/view/scale-translate.d.ts +0 -30
  563. package/esm/interaction/action/view/scale-translate.js +0 -112
  564. package/esm/interaction/action/view/scale-translate.js.map +0 -1
  565. package/esm/interaction/action/view/scale-zoom.d.ts +0 -20
  566. package/esm/interaction/action/view/scale-zoom.js +0 -83
  567. package/esm/interaction/action/view/scale-zoom.js.map +0 -1
  568. package/esm/interaction/context.d.ts +0 -65
  569. package/esm/interaction/context.js +0 -142
  570. package/esm/interaction/context.js.map +0 -1
  571. package/esm/interaction/grammar-interaction.d.ts +0 -158
  572. package/esm/interaction/grammar-interaction.js +0 -285
  573. package/esm/interaction/grammar-interaction.js.map +0 -1
  574. package/esm/interaction/index.d.ts +0 -25
  575. package/esm/interaction/index.js +0 -43
  576. package/esm/interaction/index.js.map +0 -1
  577. package/esm/interaction/interaction.d.ts +0 -29
  578. package/esm/interaction/interaction.js +0 -32
  579. package/esm/interaction/interaction.js.map +0 -1
  580. package/esm/interface.d.ts +0 -2264
  581. package/esm/interface.js +0 -2
  582. package/esm/interface.js.map +0 -1
  583. package/esm/theme/index.d.ts +0 -12
  584. package/esm/theme/index.js +0 -23
  585. package/esm/theme/index.js.map +0 -1
  586. package/esm/theme/style-sheet/dark.d.ts +0 -825
  587. package/esm/theme/style-sheet/dark.js +0 -496
  588. package/esm/theme/style-sheet/dark.js.map +0 -1
  589. package/esm/theme/style-sheet/light.d.ts +0 -817
  590. package/esm/theme/style-sheet/light.js +0 -492
  591. package/esm/theme/style-sheet/light.js.map +0 -1
  592. package/esm/theme/util/create-by-style-sheet.d.ts +0 -6
  593. package/esm/theme/util/create-by-style-sheet.js +0 -1422
  594. package/esm/theme/util/create-by-style-sheet.js.map +0 -1
  595. package/esm/theme/util/create-theme.d.ts +0 -6
  596. package/esm/theme/util/create-theme.js +0 -12
  597. package/esm/theme/util/create-theme.js.map +0 -1
  598. package/esm/theme/util/index.d.ts +0 -1
  599. package/esm/theme/util/index.js +0 -2
  600. package/esm/theme/util/index.js.map +0 -1
  601. package/esm/util/annotation.d.ts +0 -7
  602. package/esm/util/annotation.js +0 -39
  603. package/esm/util/annotation.js.map +0 -1
  604. package/esm/util/attr.d.ts +0 -10
  605. package/esm/util/attr.js +0 -25
  606. package/esm/util/attr.js.map +0 -1
  607. package/esm/util/axis.d.ts +0 -100
  608. package/esm/util/axis.js +0 -236
  609. package/esm/util/axis.js.map +0 -1
  610. package/esm/util/bbox.d.ts +0 -105
  611. package/esm/util/bbox.js +0 -282
  612. package/esm/util/bbox.js.map +0 -1
  613. package/esm/util/collision-detect.d.ts +0 -16
  614. package/esm/util/collision-detect.js +0 -127
  615. package/esm/util/collision-detect.js.map +0 -1
  616. package/esm/util/color.d.ts +0 -1
  617. package/esm/util/color.js +0 -18
  618. package/esm/util/color.js.map +0 -1
  619. package/esm/util/context.d.ts +0 -4
  620. package/esm/util/context.js +0 -11
  621. package/esm/util/context.js.map +0 -1
  622. package/esm/util/coordinate.d.ts +0 -86
  623. package/esm/util/coordinate.js +0 -147
  624. package/esm/util/coordinate.js.map +0 -1
  625. package/esm/util/direction.d.ts +0 -19
  626. package/esm/util/direction.js +0 -120
  627. package/esm/util/direction.js.map +0 -1
  628. package/esm/util/dom.d.ts +0 -19
  629. package/esm/util/dom.js +0 -61
  630. package/esm/util/dom.js.map +0 -1
  631. package/esm/util/event.d.ts +0 -8
  632. package/esm/util/event.js +0 -14
  633. package/esm/util/event.js.map +0 -1
  634. package/esm/util/facet.d.ts +0 -16
  635. package/esm/util/facet.js +0 -43
  636. package/esm/util/facet.js.map +0 -1
  637. package/esm/util/graphics.d.ts +0 -58
  638. package/esm/util/graphics.js +0 -203
  639. package/esm/util/graphics.js.map +0 -1
  640. package/esm/util/grid.d.ts +0 -36
  641. package/esm/util/grid.js +0 -118
  642. package/esm/util/grid.js.map +0 -1
  643. package/esm/util/helper.d.ts +0 -34
  644. package/esm/util/helper.js +0 -72
  645. package/esm/util/helper.js.map +0 -1
  646. package/esm/util/legend.d.ts +0 -45
  647. package/esm/util/legend.js +0 -145
  648. package/esm/util/legend.js.map +0 -1
  649. package/esm/util/marker.d.ts +0 -10
  650. package/esm/util/marker.js +0 -58
  651. package/esm/util/marker.js.map +0 -1
  652. package/esm/util/padding.d.ts +0 -14
  653. package/esm/util/padding.js +0 -40
  654. package/esm/util/padding.js.map +0 -1
  655. package/esm/util/scale.d.ts +0 -42
  656. package/esm/util/scale.js +0 -128
  657. package/esm/util/scale.js.map +0 -1
  658. package/esm/util/stat.d.ts +0 -10
  659. package/esm/util/stat.js +0 -36
  660. package/esm/util/stat.js.map +0 -1
  661. package/esm/util/text.d.ts +0 -23
  662. package/esm/util/text.js +0 -84
  663. package/esm/util/text.js.map +0 -1
  664. package/esm/util/tooltip.d.ts +0 -26
  665. package/esm/util/tooltip.js +0 -419
  666. package/esm/util/tooltip.js.map +0 -1
  667. package/esm/util/transform.d.ts +0 -33
  668. package/esm/util/transform.js +0 -61
  669. package/esm/util/transform.js.map +0 -1
  670. package/esm/util/types.d.ts +0 -6
  671. package/esm/util/types.js +0 -2
  672. package/esm/util/types.js.map +0 -1
  673. package/lib/animate/animation/fade.d.ts +0 -21
  674. package/lib/animate/animation/fade.js +0 -47
  675. package/lib/animate/animation/fade.js.map +0 -1
  676. package/lib/animate/animation/grow-in.d.ts +0 -30
  677. package/lib/animate/animation/grow-in.js +0 -44
  678. package/lib/animate/animation/grow-in.js.map +0 -1
  679. package/lib/animate/animation/index.d.ts +0 -16
  680. package/lib/animate/animation/index.js +0 -22
  681. package/lib/animate/animation/index.js.map +0 -1
  682. package/lib/animate/animation/path-in.d.ts +0 -12
  683. package/lib/animate/animation/path-in.js +0 -25
  684. package/lib/animate/animation/path-in.js.map +0 -1
  685. package/lib/animate/animation/position-update.d.ts +0 -11
  686. package/lib/animate/animation/position-update.js +0 -28
  687. package/lib/animate/animation/position-update.js.map +0 -1
  688. package/lib/animate/animation/scale-in.d.ts +0 -19
  689. package/lib/animate/animation/scale-in.js +0 -65
  690. package/lib/animate/animation/scale-in.js.map +0 -1
  691. package/lib/animate/animation/sector-path-update.d.ts +0 -11
  692. package/lib/animate/animation/sector-path-update.js +0 -135
  693. package/lib/animate/animation/sector-path-update.js.map +0 -1
  694. package/lib/animate/animation/util.d.ts +0 -19
  695. package/lib/animate/animation/util.js +0 -93
  696. package/lib/animate/animation/util.js.map +0 -1
  697. package/lib/animate/animation/wave-in.d.ts +0 -13
  698. package/lib/animate/animation/wave-in.js +0 -30
  699. package/lib/animate/animation/wave-in.js.map +0 -1
  700. package/lib/animate/animation/zoom.d.ts +0 -21
  701. package/lib/animate/animation/zoom.js +0 -71
  702. package/lib/animate/animation/zoom.js.map +0 -1
  703. package/lib/animate/index.d.ts +0 -48
  704. package/lib/animate/index.js +0 -255
  705. package/lib/animate/index.js.map +0 -1
  706. package/lib/animate/interface.d.ts +0 -12
  707. package/lib/animate/interface.js +0 -3
  708. package/lib/animate/interface.js.map +0 -1
  709. package/lib/api.d.ts +0 -2
  710. package/lib/api.js +0 -7
  711. package/lib/api.js.map +0 -1
  712. package/lib/base.d.ts +0 -33
  713. package/lib/base.js +0 -57
  714. package/lib/base.js.map +0 -1
  715. package/lib/chart/chart.d.ts +0 -61
  716. package/lib/chart/chart.js +0 -159
  717. package/lib/chart/chart.js.map +0 -1
  718. package/lib/chart/controller/annotation.d.ts +0 -162
  719. package/lib/chart/controller/annotation.js +0 -579
  720. package/lib/chart/controller/annotation.js.map +0 -1
  721. package/lib/chart/controller/axis.d.ts +0 -93
  722. package/lib/chart/controller/axis.js +0 -580
  723. package/lib/chart/controller/axis.js.map +0 -1
  724. package/lib/chart/controller/base.d.ts +0 -64
  725. package/lib/chart/controller/base.js +0 -65
  726. package/lib/chart/controller/base.js.map +0 -1
  727. package/lib/chart/controller/coordinate.d.ts +0 -74
  728. package/lib/chart/controller/coordinate.js +0 -147
  729. package/lib/chart/controller/coordinate.js.map +0 -1
  730. package/lib/chart/controller/gesture.d.ts +0 -37
  731. package/lib/chart/controller/gesture.js +0 -260
  732. package/lib/chart/controller/gesture.js.map +0 -1
  733. package/lib/chart/controller/index.d.ts +0 -25
  734. package/lib/chart/controller/index.js +0 -41
  735. package/lib/chart/controller/index.js.map +0 -1
  736. package/lib/chart/controller/legend.d.ts +0 -106
  737. package/lib/chart/controller/legend.js +0 -486
  738. package/lib/chart/controller/legend.js.map +0 -1
  739. package/lib/chart/controller/scrollbar.d.ts +0 -64
  740. package/lib/chart/controller/scrollbar.js +0 -318
  741. package/lib/chart/controller/scrollbar.js.map +0 -1
  742. package/lib/chart/controller/slider.d.ts +0 -88
  743. package/lib/chart/controller/slider.js +0 -298
  744. package/lib/chart/controller/slider.js.map +0 -1
  745. package/lib/chart/controller/tooltip.d.ts +0 -68
  746. package/lib/chart/controller/tooltip.js +0 -646
  747. package/lib/chart/controller/tooltip.js.map +0 -1
  748. package/lib/chart/event.d.ts +0 -47
  749. package/lib/chart/event.js +0 -93
  750. package/lib/chart/event.js.map +0 -1
  751. package/lib/chart/index.d.ts +0 -4
  752. package/lib/chart/index.js +0 -16
  753. package/lib/chart/index.js.map +0 -1
  754. package/lib/chart/layout/auto.d.ts +0 -8
  755. package/lib/chart/layout/auto.js +0 -68
  756. package/lib/chart/layout/auto.js.map +0 -1
  757. package/lib/chart/layout/constraint/bounds.d.ts +0 -32
  758. package/lib/chart/layout/constraint/bounds.js +0 -33
  759. package/lib/chart/layout/constraint/bounds.js.map +0 -1
  760. package/lib/chart/layout/constraint/constraint.d.ts +0 -31
  761. package/lib/chart/layout/constraint/constraint.js +0 -84
  762. package/lib/chart/layout/constraint/constraint.js.map +0 -1
  763. package/lib/chart/layout/constraint/gauss.d.ts +0 -11
  764. package/lib/chart/layout/constraint/gauss.js +0 -68
  765. package/lib/chart/layout/constraint/gauss.js.map +0 -1
  766. package/lib/chart/layout/constraint/index.d.ts +0 -5
  767. package/lib/chart/layout/constraint/index.js +0 -38
  768. package/lib/chart/layout/constraint/index.js.map +0 -1
  769. package/lib/chart/layout/constraint/solver.d.ts +0 -40
  770. package/lib/chart/layout/constraint/solver.js +0 -80
  771. package/lib/chart/layout/constraint/solver.js.map +0 -1
  772. package/lib/chart/layout/constraint/types.d.ts +0 -21
  773. package/lib/chart/layout/constraint/types.js +0 -16
  774. package/lib/chart/layout/constraint/types.js.map +0 -1
  775. package/lib/chart/layout/constraint/variable.d.ts +0 -24
  776. package/lib/chart/layout/constraint/variable.js +0 -31
  777. package/lib/chart/layout/constraint/variable.js.map +0 -1
  778. package/lib/chart/layout/index.d.ts +0 -15
  779. package/lib/chart/layout/index.js +0 -29
  780. package/lib/chart/layout/index.js.map +0 -1
  781. package/lib/chart/layout/padding-cal.d.ts +0 -53
  782. package/lib/chart/layout/padding-cal.js +0 -111
  783. package/lib/chart/layout/padding-cal.js.map +0 -1
  784. package/lib/chart/util/scale-pool.d.ts +0 -57
  785. package/lib/chart/util/scale-pool.js +0 -215
  786. package/lib/chart/util/scale-pool.js.map +0 -1
  787. package/lib/chart/util/sync-view-padding.d.ts +0 -9
  788. package/lib/chart/util/sync-view-padding.js +0 -18
  789. package/lib/chart/util/sync-view-padding.js.map +0 -1
  790. package/lib/chart/view.d.ts +0 -747
  791. package/lib/chart/view.js +0 -1637
  792. package/lib/chart/view.js.map +0 -1
  793. package/lib/component/labels.d.ts +0 -47
  794. package/lib/component/labels.js +0 -276
  795. package/lib/component/labels.js.map +0 -1
  796. package/lib/component/update-label.d.ts +0 -21
  797. package/lib/component/update-label.js +0 -61
  798. package/lib/component/update-label.js.map +0 -1
  799. package/lib/constant.d.ts +0 -122
  800. package/lib/constant.js +0 -137
  801. package/lib/constant.js.map +0 -1
  802. package/lib/core.d.ts +0 -46
  803. package/lib/core.js +0 -101
  804. package/lib/core.js.map +0 -1
  805. package/lib/dependents.d.ts +0 -21
  806. package/lib/dependents.js +0 -55
  807. package/lib/dependents.js.map +0 -1
  808. package/lib/engine/index.d.ts +0 -13
  809. package/lib/engine/index.js +0 -27
  810. package/lib/engine/index.js.map +0 -1
  811. package/lib/facet/circle.d.ts +0 -36
  812. package/lib/facet/circle.js +0 -121
  813. package/lib/facet/circle.js.map +0 -1
  814. package/lib/facet/facet.d.ts +0 -165
  815. package/lib/facet/facet.js +0 -294
  816. package/lib/facet/facet.js.map +0 -1
  817. package/lib/facet/index.d.ts +0 -13
  818. package/lib/facet/index.js +0 -28
  819. package/lib/facet/index.js.map +0 -1
  820. package/lib/facet/list.d.ts +0 -46
  821. package/lib/facet/list.js +0 -136
  822. package/lib/facet/list.js.map +0 -1
  823. package/lib/facet/matrix.d.ts +0 -34
  824. package/lib/facet/matrix.js +0 -121
  825. package/lib/facet/matrix.js.map +0 -1
  826. package/lib/facet/mirror.d.ts +0 -31
  827. package/lib/facet/mirror.js +0 -146
  828. package/lib/facet/mirror.js.map +0 -1
  829. package/lib/facet/rect.d.ts +0 -35
  830. package/lib/facet/rect.js +0 -143
  831. package/lib/facet/rect.js.map +0 -1
  832. package/lib/facet/tree.d.ts +0 -40
  833. package/lib/facet/tree.js +0 -290
  834. package/lib/facet/tree.js.map +0 -1
  835. package/lib/geometry/area.d.ts +0 -46
  836. package/lib/geometry/area.js +0 -64
  837. package/lib/geometry/area.js.map +0 -1
  838. package/lib/geometry/base.d.ts +0 -793
  839. package/lib/geometry/base.js +0 -1489
  840. package/lib/geometry/base.js.map +0 -1
  841. package/lib/geometry/edge.d.ts +0 -15
  842. package/lib/geometry/edge.js +0 -26
  843. package/lib/geometry/edge.js.map +0 -1
  844. package/lib/geometry/element/index.d.ts +0 -127
  845. package/lib/geometry/element/index.js +0 -438
  846. package/lib/geometry/element/index.js.map +0 -1
  847. package/lib/geometry/heatmap.d.ts +0 -31
  848. package/lib/geometry/heatmap.js +0 -192
  849. package/lib/geometry/heatmap.js.map +0 -1
  850. package/lib/geometry/interval.d.ts +0 -41
  851. package/lib/geometry/interval.js +0 -100
  852. package/lib/geometry/interval.js.map +0 -1
  853. package/lib/geometry/label/base.d.ts +0 -76
  854. package/lib/geometry/label/base.js +0 -406
  855. package/lib/geometry/label/base.js.map +0 -1
  856. package/lib/geometry/label/index.d.ts +0 -38
  857. package/lib/geometry/label/index.js +0 -42
  858. package/lib/geometry/label/index.js.map +0 -1
  859. package/lib/geometry/label/interface.d.ts +0 -50
  860. package/lib/geometry/label/interface.js +0 -3
  861. package/lib/geometry/label/interface.js.map +0 -1
  862. package/lib/geometry/label/interval.d.ts +0 -27
  863. package/lib/geometry/label/interval.js +0 -148
  864. package/lib/geometry/label/interval.js.map +0 -1
  865. package/lib/geometry/label/layout/adjust-color.d.ts +0 -3
  866. package/lib/geometry/label/layout/adjust-color.js +0 -40
  867. package/lib/geometry/label/layout/adjust-color.js.map +0 -1
  868. package/lib/geometry/label/layout/hide-overlap.d.ts +0 -8
  869. package/lib/geometry/label/layout/hide-overlap.js +0 -33
  870. package/lib/geometry/label/layout/hide-overlap.js.map +0 -1
  871. package/lib/geometry/label/layout/interval/adjust-position.d.ts +0 -9
  872. package/lib/geometry/label/layout/interval/adjust-position.js +0 -65
  873. package/lib/geometry/label/layout/interval/adjust-position.js.map +0 -1
  874. package/lib/geometry/label/layout/interval/hide-overlap.d.ts +0 -9
  875. package/lib/geometry/label/layout/interval/hide-overlap.js +0 -82
  876. package/lib/geometry/label/layout/interval/hide-overlap.js.map +0 -1
  877. package/lib/geometry/label/layout/limit-in-canvas.d.ts +0 -9
  878. package/lib/geometry/label/layout/limit-in-canvas.js +0 -48
  879. package/lib/geometry/label/layout/limit-in-canvas.js.map +0 -1
  880. package/lib/geometry/label/layout/limit-in-plot.d.ts +0 -18
  881. package/lib/geometry/label/layout/limit-in-plot.js +0 -79
  882. package/lib/geometry/label/layout/limit-in-plot.js.map +0 -1
  883. package/lib/geometry/label/layout/limit-in-shape.d.ts +0 -7
  884. package/lib/geometry/label/layout/limit-in-shape.js +0 -22
  885. package/lib/geometry/label/layout/limit-in-shape.js.map +0 -1
  886. package/lib/geometry/label/layout/overlap.d.ts +0 -15
  887. package/lib/geometry/label/layout/overlap.js +0 -228
  888. package/lib/geometry/label/layout/overlap.js.map +0 -1
  889. package/lib/geometry/label/layout/path/adjust-position.d.ts +0 -17
  890. package/lib/geometry/label/layout/path/adjust-position.js +0 -98
  891. package/lib/geometry/label/layout/path/adjust-position.js.map +0 -1
  892. package/lib/geometry/label/layout/pie/distribute.d.ts +0 -3
  893. package/lib/geometry/label/layout/pie/distribute.js +0 -189
  894. package/lib/geometry/label/layout/pie/distribute.js.map +0 -1
  895. package/lib/geometry/label/layout/pie/outer.d.ts +0 -6
  896. package/lib/geometry/label/layout/pie/outer.js +0 -211
  897. package/lib/geometry/label/layout/pie/outer.js.map +0 -1
  898. package/lib/geometry/label/layout/pie/spider.d.ts +0 -7
  899. package/lib/geometry/label/layout/pie/spider.js +0 -185
  900. package/lib/geometry/label/layout/pie/spider.js.map +0 -1
  901. package/lib/geometry/label/layout/pie/util.d.ts +0 -10
  902. package/lib/geometry/label/layout/pie/util.js +0 -77
  903. package/lib/geometry/label/layout/pie/util.js.map +0 -1
  904. package/lib/geometry/label/layout/point/adjust-position.d.ts +0 -17
  905. package/lib/geometry/label/layout/point/adjust-position.js +0 -98
  906. package/lib/geometry/label/layout/point/adjust-position.js.map +0 -1
  907. package/lib/geometry/label/pie.d.ts +0 -22
  908. package/lib/geometry/label/pie.js +0 -97
  909. package/lib/geometry/label/pie.js.map +0 -1
  910. package/lib/geometry/label/polar.d.ts +0 -64
  911. package/lib/geometry/label/polar.js +0 -223
  912. package/lib/geometry/label/polar.js.map +0 -1
  913. package/lib/geometry/label/util/index.d.ts +0 -26
  914. package/lib/geometry/label/util/index.js +0 -68
  915. package/lib/geometry/label/util/index.js.map +0 -1
  916. package/lib/geometry/line.d.ts +0 -11
  917. package/lib/geometry/line.js +0 -23
  918. package/lib/geometry/line.js.map +0 -1
  919. package/lib/geometry/path.d.ts +0 -40
  920. package/lib/geometry/path.js +0 -124
  921. package/lib/geometry/path.js.map +0 -1
  922. package/lib/geometry/point.d.ts +0 -19
  923. package/lib/geometry/point.js +0 -32
  924. package/lib/geometry/point.js.map +0 -1
  925. package/lib/geometry/polygon.d.ts +0 -19
  926. package/lib/geometry/polygon.js +0 -64
  927. package/lib/geometry/polygon.js.map +0 -1
  928. package/lib/geometry/schema.d.ts +0 -18
  929. package/lib/geometry/schema.js +0 -50
  930. package/lib/geometry/schema.js.map +0 -1
  931. package/lib/geometry/shape/area/index.d.ts +0 -2
  932. package/lib/geometry/shape/area/index.js +0 -46
  933. package/lib/geometry/shape/area/index.js.map +0 -1
  934. package/lib/geometry/shape/area/line.d.ts +0 -1
  935. package/lib/geometry/shape/area/line.js +0 -33
  936. package/lib/geometry/shape/area/line.js.map +0 -1
  937. package/lib/geometry/shape/area/smooth-line.d.ts +0 -1
  938. package/lib/geometry/shape/area/smooth-line.js +0 -32
  939. package/lib/geometry/shape/area/smooth-line.js.map +0 -1
  940. package/lib/geometry/shape/area/smooth.d.ts +0 -1
  941. package/lib/geometry/shape/area/smooth.js +0 -33
  942. package/lib/geometry/shape/area/smooth.js.map +0 -1
  943. package/lib/geometry/shape/area/util.d.ts +0 -22
  944. package/lib/geometry/shape/area/util.js +0 -93
  945. package/lib/geometry/shape/area/util.js.map +0 -1
  946. package/lib/geometry/shape/base.d.ts +0 -22
  947. package/lib/geometry/shape/base.js +0 -168
  948. package/lib/geometry/shape/base.js.map +0 -1
  949. package/lib/geometry/shape/constant.d.ts +0 -4
  950. package/lib/geometry/shape/constant.js +0 -8
  951. package/lib/geometry/shape/constant.js.map +0 -1
  952. package/lib/geometry/shape/edge/arc.d.ts +0 -1
  953. package/lib/geometry/shape/edge/arc.js +0 -86
  954. package/lib/geometry/shape/edge/arc.js.map +0 -1
  955. package/lib/geometry/shape/edge/index.d.ts +0 -2
  956. package/lib/geometry/shape/edge/index.js +0 -33
  957. package/lib/geometry/shape/edge/index.js.map +0 -1
  958. package/lib/geometry/shape/edge/smooth.d.ts +0 -1
  959. package/lib/geometry/shape/edge/smooth.js +0 -32
  960. package/lib/geometry/shape/edge/smooth.js.map +0 -1
  961. package/lib/geometry/shape/edge/util.d.ts +0 -17
  962. package/lib/geometry/shape/edge/util.js +0 -37
  963. package/lib/geometry/shape/edge/util.js.map +0 -1
  964. package/lib/geometry/shape/edge/vhv.d.ts +0 -1
  965. package/lib/geometry/shape/edge/vhv.js +0 -44
  966. package/lib/geometry/shape/edge/vhv.js.map +0 -1
  967. package/lib/geometry/shape/interval/funnel.d.ts +0 -1
  968. package/lib/geometry/shape/interval/funnel.js +0 -33
  969. package/lib/geometry/shape/interval/funnel.js.map +0 -1
  970. package/lib/geometry/shape/interval/hollow-rect.d.ts +0 -1
  971. package/lib/geometry/shape/interval/hollow-rect.js +0 -53
  972. package/lib/geometry/shape/interval/hollow-rect.js.map +0 -1
  973. package/lib/geometry/shape/interval/index.d.ts +0 -3
  974. package/lib/geometry/shape/interval/index.js +0 -65
  975. package/lib/geometry/shape/interval/index.js.map +0 -1
  976. package/lib/geometry/shape/interval/line.d.ts +0 -1
  977. package/lib/geometry/shape/interval/line.js +0 -56
  978. package/lib/geometry/shape/interval/line.js.map +0 -1
  979. package/lib/geometry/shape/interval/pyramid.d.ts +0 -1
  980. package/lib/geometry/shape/interval/pyramid.js +0 -33
  981. package/lib/geometry/shape/interval/pyramid.js.map +0 -1
  982. package/lib/geometry/shape/interval/tick.d.ts +0 -1
  983. package/lib/geometry/shape/interval/tick.js +0 -79
  984. package/lib/geometry/shape/interval/tick.js.map +0 -1
  985. package/lib/geometry/shape/interval/util.d.ts +0 -55
  986. package/lib/geometry/shape/interval/util.js +0 -321
  987. package/lib/geometry/shape/interval/util.js.map +0 -1
  988. package/lib/geometry/shape/line/index.d.ts +0 -8
  989. package/lib/geometry/shape/line/index.js +0 -109
  990. package/lib/geometry/shape/line/index.js.map +0 -1
  991. package/lib/geometry/shape/line/step.d.ts +0 -1
  992. package/lib/geometry/shape/line/step.js +0 -86
  993. package/lib/geometry/shape/line/step.js.map +0 -1
  994. package/lib/geometry/shape/line/util.d.ts +0 -16
  995. package/lib/geometry/shape/line/util.js +0 -87
  996. package/lib/geometry/shape/line/util.js.map +0 -1
  997. package/lib/geometry/shape/point/hollow.d.ts +0 -1
  998. package/lib/geometry/shape/point/hollow.js +0 -26
  999. package/lib/geometry/shape/point/hollow.js.map +0 -1
  1000. package/lib/geometry/shape/point/image.d.ts +0 -1
  1001. package/lib/geometry/shape/point/image.js +0 -50
  1002. package/lib/geometry/shape/point/image.js.map +0 -1
  1003. package/lib/geometry/shape/point/index.d.ts +0 -2
  1004. package/lib/geometry/shape/point/index.js +0 -34
  1005. package/lib/geometry/shape/point/index.js.map +0 -1
  1006. package/lib/geometry/shape/point/solid.d.ts +0 -1
  1007. package/lib/geometry/shape/point/solid.js +0 -25
  1008. package/lib/geometry/shape/point/solid.js.map +0 -1
  1009. package/lib/geometry/shape/point/util.d.ts +0 -15
  1010. package/lib/geometry/shape/point/util.js +0 -43
  1011. package/lib/geometry/shape/point/util.js.map +0 -1
  1012. package/lib/geometry/shape/polygon/index.d.ts +0 -2
  1013. package/lib/geometry/shape/polygon/index.js +0 -67
  1014. package/lib/geometry/shape/polygon/index.js.map +0 -1
  1015. package/lib/geometry/shape/polygon/square.d.ts +0 -1
  1016. package/lib/geometry/shape/polygon/square.js +0 -46
  1017. package/lib/geometry/shape/polygon/square.js.map +0 -1
  1018. package/lib/geometry/shape/schema/box.d.ts +0 -1
  1019. package/lib/geometry/shape/schema/box.js +0 -144
  1020. package/lib/geometry/shape/schema/box.js.map +0 -1
  1021. package/lib/geometry/shape/schema/candle.d.ts +0 -1
  1022. package/lib/geometry/shape/schema/candle.js +0 -82
  1023. package/lib/geometry/shape/schema/candle.js.map +0 -1
  1024. package/lib/geometry/shape/schema/index.d.ts +0 -2
  1025. package/lib/geometry/shape/schema/index.js +0 -8
  1026. package/lib/geometry/shape/schema/index.js.map +0 -1
  1027. package/lib/geometry/shape/util/get-path-points.d.ts +0 -38
  1028. package/lib/geometry/shape/util/get-path-points.js +0 -137
  1029. package/lib/geometry/shape/util/get-path-points.js.map +0 -1
  1030. package/lib/geometry/shape/util/get-style.d.ts +0 -18
  1031. package/lib/geometry/shape/util/get-style.js +0 -52
  1032. package/lib/geometry/shape/util/get-style.js.map +0 -1
  1033. package/lib/geometry/shape/util/path.d.ts +0 -32
  1034. package/lib/geometry/shape/util/path.js +0 -320
  1035. package/lib/geometry/shape/util/path.js.map +0 -1
  1036. package/lib/geometry/shape/util/split-points.d.ts +0 -13
  1037. package/lib/geometry/shape/util/split-points.js +0 -28
  1038. package/lib/geometry/shape/util/split-points.js.map +0 -1
  1039. package/lib/geometry/shape/violin/hollow.d.ts +0 -1
  1040. package/lib/geometry/shape/violin/hollow.js +0 -53
  1041. package/lib/geometry/shape/violin/hollow.js.map +0 -1
  1042. package/lib/geometry/shape/violin/index.d.ts +0 -2
  1043. package/lib/geometry/shape/violin/index.js +0 -62
  1044. package/lib/geometry/shape/violin/index.js.map +0 -1
  1045. package/lib/geometry/shape/violin/smooth.d.ts +0 -1
  1046. package/lib/geometry/shape/violin/smooth.js +0 -30
  1047. package/lib/geometry/shape/violin/smooth.js.map +0 -1
  1048. package/lib/geometry/util/diff.d.ts +0 -11
  1049. package/lib/geometry/util/diff.js +0 -34
  1050. package/lib/geometry/util/diff.js.map +0 -1
  1051. package/lib/geometry/util/get-shape-type.d.ts +0 -8
  1052. package/lib/geometry/util/get-shape-type.js +0 -20
  1053. package/lib/geometry/util/get-shape-type.js.map +0 -1
  1054. package/lib/geometry/util/group-data.d.ts +0 -3
  1055. package/lib/geometry/util/group-data.js +0 -35
  1056. package/lib/geometry/util/group-data.js.map +0 -1
  1057. package/lib/geometry/util/is-model-change.d.ts +0 -9
  1058. package/lib/geometry/util/is-model-change.js +0 -18
  1059. package/lib/geometry/util/is-model-change.js.map +0 -1
  1060. package/lib/geometry/util/parse-fields.d.ts +0 -2
  1061. package/lib/geometry/util/parse-fields.js +0 -13
  1062. package/lib/geometry/util/parse-fields.js.map +0 -1
  1063. package/lib/geometry/util/shape-size.d.ts +0 -2
  1064. package/lib/geometry/util/shape-size.js +0 -128
  1065. package/lib/geometry/util/shape-size.js.map +0 -1
  1066. package/lib/geometry/violin.d.ts +0 -25
  1067. package/lib/geometry/violin.js +0 -69
  1068. package/lib/geometry/violin.js.map +0 -1
  1069. package/lib/index.d.ts +0 -107
  1070. package/lib/index.js +0 -586
  1071. package/lib/index.js.map +0 -1
  1072. package/lib/interaction/action/active-region.d.ts +0 -33
  1073. package/lib/interaction/action/active-region.js +0 -202
  1074. package/lib/interaction/action/active-region.js.map +0 -1
  1075. package/lib/interaction/action/base.d.ts +0 -29
  1076. package/lib/interaction/action/base.js +0 -38
  1077. package/lib/interaction/action/base.js.map +0 -1
  1078. package/lib/interaction/action/callback.d.ts +0 -17
  1079. package/lib/interaction/action/callback.js +0 -29
  1080. package/lib/interaction/action/callback.js.map +0 -1
  1081. package/lib/interaction/action/component/list-active.d.ts +0 -14
  1082. package/lib/interaction/action/component/list-active.js +0 -26
  1083. package/lib/interaction/action/component/list-active.js.map +0 -1
  1084. package/lib/interaction/action/component/list-checked.d.ts +0 -30
  1085. package/lib/interaction/action/component/list-checked.js +0 -84
  1086. package/lib/interaction/action/component/list-checked.js.map +0 -1
  1087. package/lib/interaction/action/component/list-focus.d.ts +0 -5
  1088. package/lib/interaction/action/component/list-focus.js +0 -57
  1089. package/lib/interaction/action/component/list-focus.js.map +0 -1
  1090. package/lib/interaction/action/component/list-highlight-util.d.ts +0 -7
  1091. package/lib/interaction/action/component/list-highlight-util.js +0 -24
  1092. package/lib/interaction/action/component/list-highlight-util.js.map +0 -1
  1093. package/lib/interaction/action/component/list-highlight.d.ts +0 -20
  1094. package/lib/interaction/action/component/list-highlight.js +0 -99
  1095. package/lib/interaction/action/component/list-highlight.js.map +0 -1
  1096. package/lib/interaction/action/component/list-radio.d.ts +0 -24
  1097. package/lib/interaction/action/component/list-radio.js +0 -118
  1098. package/lib/interaction/action/component/list-radio.js.map +0 -1
  1099. package/lib/interaction/action/component/list-selected.d.ts +0 -10
  1100. package/lib/interaction/action/component/list-selected.js +0 -22
  1101. package/lib/interaction/action/component/list-selected.js.map +0 -1
  1102. package/lib/interaction/action/component/list-state.d.ts +0 -46
  1103. package/lib/interaction/action/component/list-state.js +0 -169
  1104. package/lib/interaction/action/component/list-state.js.map +0 -1
  1105. package/lib/interaction/action/component/list-unchecked.d.ts +0 -13
  1106. package/lib/interaction/action/component/list-unchecked.js +0 -25
  1107. package/lib/interaction/action/component/list-unchecked.js.map +0 -1
  1108. package/lib/interaction/action/component/tooltip/ellipsis-text.d.ts +0 -25
  1109. package/lib/interaction/action/component/tooltip/ellipsis-text.js +0 -95
  1110. package/lib/interaction/action/component/tooltip/ellipsis-text.js.map +0 -1
  1111. package/lib/interaction/action/component/tooltip/geometry.d.ts +0 -24
  1112. package/lib/interaction/action/component/tooltip/geometry.js +0 -73
  1113. package/lib/interaction/action/component/tooltip/geometry.js.map +0 -1
  1114. package/lib/interaction/action/component/tooltip/sibling.d.ts +0 -21
  1115. package/lib/interaction/action/component/tooltip/sibling.js +0 -41
  1116. package/lib/interaction/action/component/tooltip/sibling.js.map +0 -1
  1117. package/lib/interaction/action/cursor.d.ts +0 -69
  1118. package/lib/interaction/action/cursor.js +0 -115
  1119. package/lib/interaction/action/cursor.js.map +0 -1
  1120. package/lib/interaction/action/data/filter.d.ts +0 -13
  1121. package/lib/interaction/action/data/filter.js +0 -68
  1122. package/lib/interaction/action/data/filter.js.map +0 -1
  1123. package/lib/interaction/action/data/range-filter.d.ts +0 -56
  1124. package/lib/interaction/action/data/range-filter.js +0 -166
  1125. package/lib/interaction/action/data/range-filter.js.map +0 -1
  1126. package/lib/interaction/action/data/sibling-filter.d.ts +0 -22
  1127. package/lib/interaction/action/data/sibling-filter.js +0 -41
  1128. package/lib/interaction/action/data/sibling-filter.js.map +0 -1
  1129. package/lib/interaction/action/element/active.d.ts +0 -14
  1130. package/lib/interaction/action/element/active.js +0 -26
  1131. package/lib/interaction/action/element/active.js.map +0 -1
  1132. package/lib/interaction/action/element/filter.d.ts +0 -20
  1133. package/lib/interaction/action/element/filter.js +0 -91
  1134. package/lib/interaction/action/element/filter.js.map +0 -1
  1135. package/lib/interaction/action/element/highlight-by-color.d.ts +0 -10
  1136. package/lib/interaction/action/element/highlight-by-color.js +0 -32
  1137. package/lib/interaction/action/element/highlight-by-color.js.map +0 -1
  1138. package/lib/interaction/action/element/highlight-by-x.d.ts +0 -15
  1139. package/lib/interaction/action/element/highlight-by-x.js +0 -53
  1140. package/lib/interaction/action/element/highlight-by-x.js.map +0 -1
  1141. package/lib/interaction/action/element/highlight-util.d.ts +0 -18
  1142. package/lib/interaction/action/element/highlight-util.js +0 -50
  1143. package/lib/interaction/action/element/highlight-util.js.map +0 -1
  1144. package/lib/interaction/action/element/highlight.d.ts +0 -21
  1145. package/lib/interaction/action/element/highlight.js +0 -96
  1146. package/lib/interaction/action/element/highlight.js.map +0 -1
  1147. package/lib/interaction/action/element/link-by-color.d.ts +0 -51
  1148. package/lib/interaction/action/element/link-by-color.js +0 -158
  1149. package/lib/interaction/action/element/link-by-color.js.map +0 -1
  1150. package/lib/interaction/action/element/range-active.d.ts +0 -13
  1151. package/lib/interaction/action/element/range-active.js +0 -25
  1152. package/lib/interaction/action/element/range-active.js.map +0 -1
  1153. package/lib/interaction/action/element/range-highlight.d.ts +0 -27
  1154. package/lib/interaction/action/element/range-highlight.js +0 -57
  1155. package/lib/interaction/action/element/range-highlight.js.map +0 -1
  1156. package/lib/interaction/action/element/range-selected.d.ts +0 -13
  1157. package/lib/interaction/action/element/range-selected.js +0 -25
  1158. package/lib/interaction/action/element/range-selected.js.map +0 -1
  1159. package/lib/interaction/action/element/range-state.d.ts +0 -38
  1160. package/lib/interaction/action/element/range-state.js +0 -166
  1161. package/lib/interaction/action/element/range-state.js.map +0 -1
  1162. package/lib/interaction/action/element/selected.d.ts +0 -14
  1163. package/lib/interaction/action/element/selected.js +0 -26
  1164. package/lib/interaction/action/element/selected.js.map +0 -1
  1165. package/lib/interaction/action/element/sibling-filter.d.ts +0 -19
  1166. package/lib/interaction/action/element/sibling-filter.js +0 -95
  1167. package/lib/interaction/action/element/sibling-filter.js.map +0 -1
  1168. package/lib/interaction/action/element/single-active.d.ts +0 -13
  1169. package/lib/interaction/action/element/single-active.js +0 -25
  1170. package/lib/interaction/action/element/single-active.js.map +0 -1
  1171. package/lib/interaction/action/element/single-highlight.d.ts +0 -16
  1172. package/lib/interaction/action/element/single-highlight.js +0 -37
  1173. package/lib/interaction/action/element/single-highlight.js.map +0 -1
  1174. package/lib/interaction/action/element/single-selected.d.ts +0 -13
  1175. package/lib/interaction/action/element/single-selected.js +0 -25
  1176. package/lib/interaction/action/element/single-selected.js.map +0 -1
  1177. package/lib/interaction/action/element/single-state.d.ts +0 -18
  1178. package/lib/interaction/action/element/single-state.js +0 -55
  1179. package/lib/interaction/action/element/single-state.js.map +0 -1
  1180. package/lib/interaction/action/element/state-base.d.ts +0 -39
  1181. package/lib/interaction/action/element/state-base.js +0 -61
  1182. package/lib/interaction/action/element/state-base.js.map +0 -1
  1183. package/lib/interaction/action/element/state.d.ts +0 -28
  1184. package/lib/interaction/action/element/state.js +0 -101
  1185. package/lib/interaction/action/element/state.js.map +0 -1
  1186. package/lib/interaction/action/index.d.ts +0 -2
  1187. package/lib/interaction/action/index.js +0 -13
  1188. package/lib/interaction/action/index.js.map +0 -1
  1189. package/lib/interaction/action/mask/base.d.ts +0 -62
  1190. package/lib/interaction/action/mask/base.js +0 -171
  1191. package/lib/interaction/action/mask/base.js.map +0 -1
  1192. package/lib/interaction/action/mask/circle.d.ts +0 -14
  1193. package/lib/interaction/action/mask/circle.js +0 -39
  1194. package/lib/interaction/action/mask/circle.js.map +0 -1
  1195. package/lib/interaction/action/mask/dim-rect.d.ts +0 -11
  1196. package/lib/interaction/action/mask/dim-rect.js +0 -64
  1197. package/lib/interaction/action/mask/dim-rect.js.map +0 -1
  1198. package/lib/interaction/action/mask/path.d.ts +0 -16
  1199. package/lib/interaction/action/mask/path.js +0 -46
  1200. package/lib/interaction/action/mask/path.js.map +0 -1
  1201. package/lib/interaction/action/mask/rect.d.ts +0 -17
  1202. package/lib/interaction/action/mask/rect.js +0 -41
  1203. package/lib/interaction/action/mask/rect.js.map +0 -1
  1204. package/lib/interaction/action/mask/smooth-path.d.ts +0 -9
  1205. package/lib/interaction/action/mask/smooth-path.js +0 -23
  1206. package/lib/interaction/action/mask/smooth-path.js.map +0 -1
  1207. package/lib/interaction/action/register.d.ts +0 -36
  1208. package/lib/interaction/action/register.js +0 -69
  1209. package/lib/interaction/action/register.js.map +0 -1
  1210. package/lib/interaction/action/util.d.ts +0 -140
  1211. package/lib/interaction/action/util.js +0 -387
  1212. package/lib/interaction/action/util.js.map +0 -1
  1213. package/lib/interaction/action/view/button.d.ts +0 -25
  1214. package/lib/interaction/action/view/button.js +0 -118
  1215. package/lib/interaction/action/view/button.js.map +0 -1
  1216. package/lib/interaction/action/view/drag.d.ts +0 -24
  1217. package/lib/interaction/action/view/drag.js +0 -75
  1218. package/lib/interaction/action/view/drag.js.map +0 -1
  1219. package/lib/interaction/action/view/mousewheel-scroll.d.ts +0 -5
  1220. package/lib/interaction/action/view/mousewheel-scroll.js +0 -37
  1221. package/lib/interaction/action/view/mousewheel-scroll.js.map +0 -1
  1222. package/lib/interaction/action/view/move.d.ts +0 -28
  1223. package/lib/interaction/action/view/move.js +0 -82
  1224. package/lib/interaction/action/view/move.js.map +0 -1
  1225. package/lib/interaction/action/view/scale-transform.d.ts +0 -18
  1226. package/lib/interaction/action/view/scale-transform.js +0 -53
  1227. package/lib/interaction/action/view/scale-transform.js.map +0 -1
  1228. package/lib/interaction/action/view/scale-translate.d.ts +0 -30
  1229. package/lib/interaction/action/view/scale-translate.js +0 -114
  1230. package/lib/interaction/action/view/scale-translate.js.map +0 -1
  1231. package/lib/interaction/action/view/scale-zoom.d.ts +0 -20
  1232. package/lib/interaction/action/view/scale-zoom.js +0 -85
  1233. package/lib/interaction/action/view/scale-zoom.js.map +0 -1
  1234. package/lib/interaction/context.d.ts +0 -65
  1235. package/lib/interaction/context.js +0 -144
  1236. package/lib/interaction/context.js.map +0 -1
  1237. package/lib/interaction/grammar-interaction.d.ts +0 -158
  1238. package/lib/interaction/grammar-interaction.js +0 -289
  1239. package/lib/interaction/grammar-interaction.js.map +0 -1
  1240. package/lib/interaction/index.d.ts +0 -25
  1241. package/lib/interaction/index.js +0 -54
  1242. package/lib/interaction/index.js.map +0 -1
  1243. package/lib/interaction/interaction.d.ts +0 -29
  1244. package/lib/interaction/interaction.js +0 -34
  1245. package/lib/interaction/interaction.js.map +0 -1
  1246. package/lib/interface.d.ts +0 -2264
  1247. package/lib/interface.js +0 -3
  1248. package/lib/interface.js.map +0 -1
  1249. package/lib/theme/index.d.ts +0 -12
  1250. package/lib/theme/index.js +0 -28
  1251. package/lib/theme/index.js.map +0 -1
  1252. package/lib/theme/style-sheet/dark.d.ts +0 -825
  1253. package/lib/theme/style-sheet/dark.js +0 -500
  1254. package/lib/theme/style-sheet/dark.js.map +0 -1
  1255. package/lib/theme/style-sheet/light.d.ts +0 -817
  1256. package/lib/theme/style-sheet/light.js +0 -496
  1257. package/lib/theme/style-sheet/light.js.map +0 -1
  1258. package/lib/theme/util/create-by-style-sheet.d.ts +0 -6
  1259. package/lib/theme/util/create-by-style-sheet.js +0 -1426
  1260. package/lib/theme/util/create-by-style-sheet.js.map +0 -1
  1261. package/lib/theme/util/create-theme.d.ts +0 -6
  1262. package/lib/theme/util/create-theme.js +0 -16
  1263. package/lib/theme/util/create-theme.js.map +0 -1
  1264. package/lib/theme/util/index.d.ts +0 -1
  1265. package/lib/theme/util/index.js +0 -6
  1266. package/lib/theme/util/index.js.map +0 -1
  1267. package/lib/util/annotation.d.ts +0 -7
  1268. package/lib/util/annotation.js +0 -43
  1269. package/lib/util/annotation.js.map +0 -1
  1270. package/lib/util/attr.d.ts +0 -10
  1271. package/lib/util/attr.js +0 -29
  1272. package/lib/util/attr.js.map +0 -1
  1273. package/lib/util/axis.d.ts +0 -100
  1274. package/lib/util/axis.js +0 -251
  1275. package/lib/util/axis.js.map +0 -1
  1276. package/lib/util/bbox.d.ts +0 -105
  1277. package/lib/util/bbox.js +0 -287
  1278. package/lib/util/bbox.js.map +0 -1
  1279. package/lib/util/collision-detect.d.ts +0 -16
  1280. package/lib/util/collision-detect.js +0 -132
  1281. package/lib/util/collision-detect.js.map +0 -1
  1282. package/lib/util/color.d.ts +0 -1
  1283. package/lib/util/color.js +0 -23
  1284. package/lib/util/color.js.map +0 -1
  1285. package/lib/util/context.d.ts +0 -4
  1286. package/lib/util/context.js +0 -15
  1287. package/lib/util/context.js.map +0 -1
  1288. package/lib/util/coordinate.d.ts +0 -86
  1289. package/lib/util/coordinate.js +0 -157
  1290. package/lib/util/coordinate.js.map +0 -1
  1291. package/lib/util/direction.d.ts +0 -19
  1292. package/lib/util/direction.js +0 -125
  1293. package/lib/util/direction.js.map +0 -1
  1294. package/lib/util/dom.d.ts +0 -19
  1295. package/lib/util/dom.js +0 -68
  1296. package/lib/util/dom.js.map +0 -1
  1297. package/lib/util/event.d.ts +0 -8
  1298. package/lib/util/event.js +0 -18
  1299. package/lib/util/event.js.map +0 -1
  1300. package/lib/util/facet.d.ts +0 -16
  1301. package/lib/util/facet.js +0 -48
  1302. package/lib/util/facet.js.map +0 -1
  1303. package/lib/util/graphics.d.ts +0 -58
  1304. package/lib/util/graphics.js +0 -212
  1305. package/lib/util/graphics.js.map +0 -1
  1306. package/lib/util/grid.d.ts +0 -36
  1307. package/lib/util/grid.js +0 -125
  1308. package/lib/util/grid.js.map +0 -1
  1309. package/lib/util/helper.d.ts +0 -34
  1310. package/lib/util/helper.js +0 -79
  1311. package/lib/util/helper.js.map +0 -1
  1312. package/lib/util/legend.d.ts +0 -45
  1313. package/lib/util/legend.js +0 -152
  1314. package/lib/util/legend.js.map +0 -1
  1315. package/lib/util/marker.d.ts +0 -10
  1316. package/lib/util/marker.js +0 -61
  1317. package/lib/util/marker.js.map +0 -1
  1318. package/lib/util/padding.d.ts +0 -14
  1319. package/lib/util/padding.js +0 -45
  1320. package/lib/util/padding.js.map +0 -1
  1321. package/lib/util/scale.d.ts +0 -42
  1322. package/lib/util/scale.js +0 -137
  1323. package/lib/util/scale.js.map +0 -1
  1324. package/lib/util/stat.d.ts +0 -10
  1325. package/lib/util/stat.js +0 -41
  1326. package/lib/util/stat.js.map +0 -1
  1327. package/lib/util/text.d.ts +0 -23
  1328. package/lib/util/text.js +0 -88
  1329. package/lib/util/text.js.map +0 -1
  1330. package/lib/util/tooltip.d.ts +0 -26
  1331. package/lib/util/tooltip.js +0 -426
  1332. package/lib/util/tooltip.js.map +0 -1
  1333. package/lib/util/transform.d.ts +0 -33
  1334. package/lib/util/transform.js +0 -69
  1335. package/lib/util/transform.js.map +0 -1
  1336. package/lib/util/types.d.ts +0 -6
  1337. package/lib/util/types.js +0 -3
  1338. package/lib/util/types.js.map +0 -1
@@ -1,1487 +0,0 @@
1
- import { __assign, __extends } from "tslib";
2
- import { getAdjust as getAdjustClass } from '@antv/adjust';
3
- import { getAttribute as getAttributeClass } from '@antv/attr';
4
- import { clone, deepMix, each, flatten, get, isArray, isEmpty, isEqual, isFunction, isNil, isNumber, isObject, isPlainObject, isString, set, } from '@antv/util';
5
- import { doGroupAppearAnimate, getDefaultAnimateCfg } from '../animate';
6
- import Base from '../base';
7
- import { FIELD_ORIGIN, GROUP_ATTRS } from '../constant';
8
- import { uniq } from '../util/helper';
9
- import Element from './element';
10
- import { getGeometryLabel } from './label';
11
- import { getShapeFactory } from './shape/base';
12
- import { group } from './util/group-data';
13
- import { isModelChange } from './util/is-model-change';
14
- import { parseFields } from './util/parse-fields';
15
- import { diff } from './util/diff';
16
- import { inferScaleType } from '../util/scale';
17
- import { getXDimensionLength } from '../util/coordinate';
18
- // 根据 elementId 查找对应的 label,因为有可能一个 element 对应多个 labels,所以在给 labels 打标识时做了处理
19
- // 打标规则详见 ./label/base.ts#L263
20
- function filterLabelsById(id, labelsMap) {
21
- var labels = [];
22
- each(labelsMap, function (label, labelId) {
23
- var elementId = labelId.split(' ')[0];
24
- if (elementId === id) {
25
- labels.push(label);
26
- }
27
- });
28
- return labels;
29
- }
30
- /**
31
- * Geometry 几何标记基类,主要负责数据到图形属性的映射以及绘制逻辑。
32
- */
33
- var Geometry = /** @class */ (function (_super) {
34
- __extends(Geometry, _super);
35
- /**
36
- * 创建 Geometry 实例。
37
- * @param cfg
38
- */
39
- function Geometry(cfg) {
40
- var _this = _super.call(this, cfg) || this;
41
- /** Geometry 几何标记类型。 */
42
- _this.type = 'base';
43
- // 内部产生的属性
44
- /** Attribute map */
45
- _this.attributes = {};
46
- /** Element map */
47
- _this.elements = [];
48
- /** 使用 key-value 结构存储 Element,key 为每个 Element 实例对应的唯一 ID */
49
- _this.elementsMap = {};
50
- /** animate 配置项 */
51
- _this.animateOption = true;
52
- /** 图形属性映射配置 */
53
- _this.attributeOption = {};
54
- /** 存储上一次渲染时的 element 映射表,用于更新逻辑 */
55
- _this.lastElementsMap = {};
56
- /** 是否生成多个点来绘制图形。 */
57
- _this.generatePoints = false;
58
- /** 存储发生图形属性映射前的数据 */
59
- _this.beforeMappingData = null;
60
- _this.adjusts = {};
61
- _this.idFields = [];
62
- _this.hasSorted = false;
63
- _this.isCoordinateChanged = false;
64
- var container = cfg.container, labelsContainer = cfg.labelsContainer, coordinate = cfg.coordinate, data = cfg.data, _a = cfg.sortable, sortable = _a === void 0 ? false : _a, _b = cfg.visible, visible = _b === void 0 ? true : _b, theme = cfg.theme, _c = cfg.scales, scales = _c === void 0 ? {} : _c, _d = cfg.scaleDefs, scaleDefs = _d === void 0 ? {} : _d,
65
- // 柱状图间隔与宽度相关配置
66
- intervalPadding = cfg.intervalPadding, dodgePadding = cfg.dodgePadding, maxColumnWidth = cfg.maxColumnWidth, minColumnWidth = cfg.minColumnWidth, columnWidthRatio = cfg.columnWidthRatio, roseWidthRatio = cfg.roseWidthRatio, multiplePieWidthRatio = cfg.multiplePieWidthRatio, zIndexReversed = cfg.zIndexReversed, sortZIndex = cfg.sortZIndex;
67
- _this.container = container;
68
- _this.labelsContainer = labelsContainer;
69
- _this.coordinate = coordinate;
70
- _this.data = data;
71
- _this.sortable = sortable;
72
- _this.visible = visible;
73
- _this.userTheme = theme;
74
- _this.scales = scales;
75
- _this.scaleDefs = scaleDefs;
76
- // 柱状图间隔与宽度相关配置
77
- _this.intervalPadding = intervalPadding;
78
- _this.dodgePadding = dodgePadding;
79
- _this.maxColumnWidth = maxColumnWidth;
80
- _this.minColumnWidth = minColumnWidth;
81
- _this.columnWidthRatio = columnWidthRatio;
82
- _this.roseWidthRatio = roseWidthRatio;
83
- _this.multiplePieWidthRatio = multiplePieWidthRatio;
84
- _this.zIndexReversed = zIndexReversed;
85
- _this.sortZIndex = sortZIndex;
86
- return _this;
87
- }
88
- /**
89
- * 配置 position 通道映射规则。
90
- *
91
- * @example
92
- * ```typescript
93
- * // 数据结构: [{ x: 'A', y: 10, color: 'red' }]
94
- * geometry.position('x*y');
95
- * geometry.position([ 'x', 'y' ]);
96
- * geometry.position({
97
- * fields: [ 'x', 'y' ],
98
- * });
99
- * ```
100
- *
101
- * @param cfg 映射规则
102
- * @returns
103
- */
104
- Geometry.prototype.position = function (cfg) {
105
- var positionCfg = cfg;
106
- if (!isPlainObject(cfg)) {
107
- // 字符串字段或者数组字段
108
- positionCfg = {
109
- fields: parseFields(cfg),
110
- };
111
- }
112
- var fields = get(positionCfg, 'fields');
113
- if (fields.length === 1) {
114
- // 默认填充一维 1*xx
115
- fields.unshift('1');
116
- set(positionCfg, 'fields', fields);
117
- }
118
- set(this.attributeOption, 'position', positionCfg);
119
- return this;
120
- };
121
- Geometry.prototype.color = function (field, cfg) {
122
- this.createAttrOption('color', field, cfg);
123
- return this;
124
- };
125
- Geometry.prototype.shape = function (field, cfg) {
126
- this.createAttrOption('shape', field, cfg);
127
- return this;
128
- };
129
- Geometry.prototype.size = function (field, cfg) {
130
- this.createAttrOption('size', field, cfg);
131
- return this;
132
- };
133
- /**
134
- * 设置数据调整方式。G2 目前内置了四种类型:
135
- * 1. dodge
136
- * 2. stack
137
- * 3. symmetric
138
- * 4. jitter
139
- *
140
- *
141
- * **Tip**
142
- * + 对于 'dodge' 类型,可以额外进行如下属性的配置:
143
- * ```typescript
144
- * geometry.adjust('dodge', {
145
- * marginRatio: 0, // 取 0 到 1 范围的值(相对于每个柱子宽度),用于控制一个分组中柱子之间的间距
146
- * dodgeBy: 'x', // 该属性只对 'dodge' 类型生效,声明以哪个数据字段为分组依据
147
- * });
148
- * ```
149
- *
150
- * + 对于 'stack' 类型,可以额外进行如下属性的配置:
151
- * ```typescript
152
- * geometry.adjust('stack', {
153
- * reverseOrder: false, // 用于控制是否对数据进行反序操作
154
- * });
155
- * ```
156
- *
157
- * @example
158
- * ```typescript
159
- * geometry.adjust('stack');
160
- *
161
- * geometry.adjust({
162
- * type: 'stack',
163
- * reverseOrder: false,
164
- * });
165
- *
166
- * // 组合使用 adjust
167
- * geometry.adjust([ 'stack', 'dodge' ]);
168
- *
169
- * geometry.adjust([
170
- * { type: 'stack' },
171
- * { type: 'dodge', dodgeBy: 'x' },
172
- * ]);
173
- * ```
174
- *
175
- * @param adjustCfg 数据调整配置
176
- * @returns
177
- */
178
- Geometry.prototype.adjust = function (adjustCfg) {
179
- var adjusts = adjustCfg;
180
- if (isString(adjustCfg) || isPlainObject(adjustCfg)) {
181
- adjusts = [adjustCfg];
182
- }
183
- each(adjusts, function (adjust, index) {
184
- if (!isObject(adjust)) {
185
- adjusts[index] = { type: adjust };
186
- }
187
- });
188
- this.adjustOption = adjusts;
189
- return this;
190
- };
191
- Geometry.prototype.style = function (field, styleFunc) {
192
- if (isString(field)) {
193
- var fields = parseFields(field);
194
- this.styleOption = {
195
- fields: fields,
196
- callback: styleFunc,
197
- };
198
- }
199
- else {
200
- var _a = field, fields = _a.fields, callback = _a.callback, cfg = _a.cfg;
201
- if (fields || callback || cfg) {
202
- this.styleOption = field;
203
- }
204
- else {
205
- this.styleOption = {
206
- cfg: field,
207
- };
208
- }
209
- }
210
- return this;
211
- };
212
- Geometry.prototype.tooltip = function (field, cfg) {
213
- if (isString(field)) {
214
- var fields = parseFields(field);
215
- this.tooltipOption = {
216
- fields: fields,
217
- callback: cfg,
218
- };
219
- }
220
- else {
221
- this.tooltipOption = field;
222
- }
223
- return this;
224
- };
225
- /**
226
- * Geometry 动画配置。
227
- *
228
- * + `animate(false)` 关闭动画
229
- * + `animate(true)` 开启动画,默认开启。
230
- *
231
- * 我们将动画分为四个场景:
232
- * 1. appear: 图表第一次加载时的入场动画;
233
- * 2. enter: 图表绘制完成,发生更新后,产生的新图形的进场动画;
234
- * 3. update: 图表绘制完成,数据发生变更后,有状态变更的图形的更新动画;
235
- * 4. leave: 图表绘制完成,数据发生变更后,被销毁图形的销毁动画。
236
- *
237
- * @example
238
- * ```typescript
239
- * animate({
240
- * enter: {
241
- * duration: 1000, // enter 动画执行时间
242
- * },
243
- * leave: false, // 关闭 leave 销毁动画
244
- * });
245
- * ```
246
- *
247
- * @param cfg 动画配置
248
- * @returns
249
- */
250
- Geometry.prototype.animate = function (cfg) {
251
- this.animateOption = cfg;
252
- return this;
253
- };
254
- Geometry.prototype.label = function (field, secondParam, thirdParam) {
255
- if (isString(field)) {
256
- var labelOption = {};
257
- var fields = parseFields(field);
258
- labelOption.fields = fields;
259
- if (isFunction(secondParam)) {
260
- labelOption.callback = secondParam;
261
- }
262
- else if (isPlainObject(secondParam)) {
263
- labelOption.cfg = secondParam;
264
- }
265
- if (thirdParam) {
266
- labelOption.cfg = thirdParam;
267
- }
268
- this.labelOption = labelOption;
269
- }
270
- else {
271
- this.labelOption = field;
272
- }
273
- return this;
274
- };
275
- /**
276
- * 设置状态对应的样式。
277
- *
278
- * @example
279
- * ```ts
280
- * chart.interval().state({
281
- * selected: {
282
- * animate: { duration: 100, easing: 'easeLinear' },
283
- * style: {
284
- * lineWidth: 2,
285
- * stroke: '#000',
286
- * },
287
- * },
288
- * });
289
- * ```
290
- *
291
- * 如果图形 shape 是由多个 shape 组成,即为一个 G.Group 对象,那么针对 group 中的每个 shape,我们需要使用下列方式进行状态样式设置:
292
- * 如果我们为 group 中的每个 shape 设置了 'name' 属性(shape.set('name', 'xx')),则以 'name' 作为 key,否则默认以索引值(即 shape 的 添加顺序)为 key。
293
- *
294
- * ```ts
295
- * chart.interval().shape('groupShape').state({
296
- * selected: {
297
- * style: {
298
- * 0: { lineWidth: 2 },
299
- * 1: { fillOpacity: 1 },
300
- * }
301
- * }
302
- * });
303
- * ```
304
- *
305
- * @param cfg 状态样式
306
- */
307
- Geometry.prototype.state = function (cfg) {
308
- this.stateOption = cfg;
309
- return this;
310
- };
311
- /**
312
- * 用于向 shape 中传入自定义的数据。目前可能仅仅可能用于在自定义 shape 的时候,像自定义 shape 中传入自定义的数据,方便实现自定义 shape 的配置能力。
313
- *
314
- * @example
315
- * ```ts
316
- * chart.interval().customInfo({ yourData: 'hello, g2!' });
317
- * ```
318
- *
319
- * 然后在自定义 shape 的时候,可以拿到这个信息。
320
- *
321
- * ```ts
322
- * registerShape('interval', 'your-shape', {
323
- * draw(shapeInfo, container) {
324
- * const { customInfo } = shapeInfo;
325
- * console.log(customInfo); // will log { yourData: 'hello, g2!' }.
326
- * }
327
- * });
328
- * ```
329
- *
330
- * @param cfg
331
- */
332
- Geometry.prototype.customInfo = function (cfg) {
333
- this.customOption = cfg;
334
- return this;
335
- };
336
- /**
337
- * 初始化 Geomtry 实例:
338
- * 创建 [[Attribute]] and [[Scale]] 实例,进行数据处理,包括分组、数值化以及数据调整。
339
- */
340
- Geometry.prototype.init = function (cfg) {
341
- if (cfg === void 0) { cfg = {}; }
342
- this.setCfg(cfg);
343
- this.initAttributes(); // 创建图形属性
344
- // 数据加工:分组 -> 数字化 -> adjust
345
- this.processData(this.data);
346
- // 调整 scale
347
- this.adjustScale();
348
- };
349
- /**
350
- * Geometry 更新。
351
- * @param [cfg] 更新的配置
352
- */
353
- Geometry.prototype.update = function (cfg) {
354
- if (cfg === void 0) { cfg = {}; }
355
- var data = cfg.data, isDataChanged = cfg.isDataChanged, isCoordinateChanged = cfg.isCoordinateChanged;
356
- var _a = this, attributeOption = _a.attributeOption, lastAttributeOption = _a.lastAttributeOption;
357
- if (!isEqual(attributeOption, lastAttributeOption)) {
358
- // 映射发生改变,则重新创建图形属性
359
- this.init(cfg);
360
- }
361
- else if (data && (isDataChanged || !isEqual(data, this.data))) {
362
- // 数据发生变化
363
- this.setCfg(cfg);
364
- this.initAttributes(); // 创建图形属性
365
- this.processData(data); // 数据加工:分组 -> 数字化 -> adjust
366
- }
367
- else {
368
- // 有可能 coordinate 变化
369
- this.setCfg(cfg);
370
- }
371
- // 调整 scale
372
- this.adjustScale();
373
- this.isCoordinateChanged = isCoordinateChanged;
374
- };
375
- /**
376
- * 将原始数据映射至图形空间,同时创建图形对象。
377
- */
378
- Geometry.prototype.paint = function (isUpdate) {
379
- if (isUpdate === void 0) { isUpdate = false; }
380
- if (this.animateOption) {
381
- this.animateOption = deepMix({}, getDefaultAnimateCfg(this.type, this.coordinate), this.animateOption);
382
- }
383
- this.defaultSize = undefined;
384
- this.elementsMap = {};
385
- this.elements = [];
386
- var offscreenGroup = this.getOffscreenGroup();
387
- offscreenGroup.clear();
388
- var beforeMappingData = this.beforeMappingData;
389
- var dataArray = this.beforeMapping(beforeMappingData);
390
- this.dataArray = new Array(dataArray.length);
391
- for (var i = 0; i < dataArray.length; i++) {
392
- var data = dataArray[i];
393
- this.dataArray[i] = this.mapping(data);
394
- }
395
- this.updateElements(this.dataArray, isUpdate);
396
- this.lastElementsMap = this.elementsMap;
397
- if (this.canDoGroupAnimation(isUpdate)) {
398
- // 如果用户没有配置 appear.animation,就默认走整体动画
399
- var container = this.container;
400
- var type = this.type;
401
- var coordinate = this.coordinate;
402
- var animateCfg = get(this.animateOption, 'appear');
403
- var yScale = this.getYScale();
404
- var yMinPoint = coordinate.convert({
405
- x: 0,
406
- y: yScale.scale(this.getYMinValue()),
407
- });
408
- doGroupAppearAnimate(container, animateCfg, type, coordinate, yMinPoint);
409
- }
410
- // 添加 label
411
- if (this.labelOption) {
412
- this.renderLabels(flatten(this.dataArray), isUpdate);
413
- }
414
- // 缓存,用于更新
415
- this.lastAttributeOption = __assign({}, this.attributeOption);
416
- if (this.visible === false) {
417
- // 用户在初始化的时候声明 visible: false
418
- this.changeVisible(false);
419
- }
420
- };
421
- /**
422
- * 清空当前 Geometry,配置项仍保留,但是内部创建的对象全部清空。
423
- * @override
424
- */
425
- Geometry.prototype.clear = function () {
426
- var _a = this, container = _a.container, geometryLabel = _a.geometryLabel, offscreenGroup = _a.offscreenGroup;
427
- if (container) {
428
- container.clear();
429
- }
430
- if (geometryLabel) {
431
- geometryLabel.clear();
432
- }
433
- if (offscreenGroup) {
434
- offscreenGroup.clear();
435
- }
436
- // 属性恢复至出厂状态
437
- this.scaleDefs = undefined;
438
- this.attributes = {};
439
- this.scales = {};
440
- this.elementsMap = {};
441
- this.lastElementsMap = {};
442
- this.elements = [];
443
- this.adjusts = {};
444
- this.dataArray = null;
445
- this.beforeMappingData = null;
446
- this.lastAttributeOption = undefined;
447
- this.defaultSize = undefined;
448
- this.idFields = [];
449
- this.groupScales = undefined;
450
- this.hasSorted = false;
451
- this.isCoordinateChanged = false;
452
- };
453
- /**
454
- * 销毁 Geometry 实例。
455
- */
456
- Geometry.prototype.destroy = function () {
457
- this.clear();
458
- var container = this.container;
459
- container.remove(true);
460
- if (this.offscreenGroup) {
461
- this.offscreenGroup.remove(true);
462
- this.offscreenGroup = null;
463
- }
464
- if (this.geometryLabel) {
465
- this.geometryLabel.destroy();
466
- this.geometryLabel = null;
467
- }
468
- this.theme = undefined;
469
- this.shapeFactory = undefined;
470
- _super.prototype.destroy.call(this);
471
- };
472
- /**
473
- * 获取决定分组的图形属性对应的 scale 实例。
474
- * @returns
475
- */
476
- Geometry.prototype.getGroupScales = function () {
477
- return this.groupScales;
478
- };
479
- /**
480
- * 根据名字获取图形属性实例。
481
- */
482
- Geometry.prototype.getAttribute = function (name) {
483
- return this.attributes[name];
484
- };
485
- /** 获取 x 轴对应的 scale 实例。 */
486
- Geometry.prototype.getXScale = function () {
487
- return this.getAttribute('position').scales[0];
488
- };
489
- /** 获取 y 轴对应的 scale 实例。 */
490
- Geometry.prototype.getYScale = function () {
491
- return this.getAttribute('position').scales[1];
492
- };
493
- /**
494
- * 获取决定分组的图形属性实例。
495
- */
496
- Geometry.prototype.getGroupAttributes = function () {
497
- var rst = [];
498
- each(this.attributes, function (attr) {
499
- if (GROUP_ATTRS.includes(attr.type)) {
500
- rst.push(attr);
501
- }
502
- });
503
- return rst;
504
- };
505
- /** 获取图形属性默认的映射值。 */
506
- Geometry.prototype.getDefaultValue = function (attrName) {
507
- var value;
508
- var attr = this.getAttribute(attrName);
509
- if (attr && isEmpty(attr.scales)) {
510
- // 获取映射至常量的值
511
- value = attr.values[0];
512
- }
513
- return value;
514
- };
515
- /**
516
- * 获取该数据发生图形映射后对应的 Attribute 图形空间数据。
517
- * @param attr Attribute 图形属性实例。
518
- * @param obj 需要进行映射的原始数据。
519
- * @returns
520
- */
521
- Geometry.prototype.getAttributeValues = function (attr, obj) {
522
- var params = [];
523
- var scales = attr.scales;
524
- for (var index = 0, length_1 = scales.length; index < length_1; index++) {
525
- var scale = scales[index];
526
- var field = scale.field;
527
- if (scale.isIdentity) {
528
- params.push(scale.values);
529
- }
530
- else {
531
- params.push(obj[field]);
532
- }
533
- }
534
- return attr.mapping.apply(attr, params);
535
- };
536
- /**
537
- * 获取对应的 adjust 实例
538
- * @param adjustType
539
- * @returns
540
- */
541
- Geometry.prototype.getAdjust = function (adjustType) {
542
- return this.adjusts[adjustType];
543
- };
544
- /**
545
- * 获得 coordinate 实例
546
- * @returns
547
- */
548
- Geometry.prototype.getCoordinate = function () {
549
- return this.coordinate;
550
- };
551
- Geometry.prototype.getData = function () {
552
- return this.data;
553
- };
554
- /**
555
- * 获取 shape 对应的 marker 样式。
556
- * @param shapeName shape 具体名字
557
- * @param cfg marker 信息
558
- * @returns
559
- */
560
- Geometry.prototype.getShapeMarker = function (shapeName, cfg) {
561
- var shapeFactory = this.getShapeFactory();
562
- return shapeFactory.getMarker(shapeName, cfg);
563
- };
564
- /**
565
- * 根据一定的规则查找 Geometry 的 Elements。
566
- *
567
- * ```typescript
568
- * getElementsBy((element) => {
569
- * const data = element.getData();
570
- *
571
- * return data.a === 'a';
572
- * });
573
- * ```
574
- *
575
- * @param condition 定义查找规则的回调函数。
576
- * @returns
577
- */
578
- Geometry.prototype.getElementsBy = function (condition) {
579
- return this.elements.filter(function (element) { return condition(element); });
580
- };
581
- /**
582
- * 获取 Geometry 的所有 Elements。
583
- *
584
- * ```typescript
585
- * getElements();
586
- * ```
587
- */
588
- Geometry.prototype.getElements = function () {
589
- return this.elements;
590
- };
591
- /**
592
- * 获取数据对应的唯一 id。
593
- * @param data Element 对应的绘制数据
594
- * @returns
595
- */
596
- Geometry.prototype.getElementId = function (data) {
597
- data = isArray(data) ? data[0] : data;
598
- var originData = data[FIELD_ORIGIN];
599
- // 如果用户声明了使用哪些字段作为 id 值
600
- if (this.idFields.length) {
601
- var elementId = originData[this.idFields[0]];
602
- for (var index = 1; index < this.idFields.length; index++) {
603
- elementId += '-' + originData[this.idFields[index]];
604
- }
605
- return elementId;
606
- }
607
- var type = this.type;
608
- var xScale = this.getXScale();
609
- var yScale = this.getYScale();
610
- var xField = xScale.field || 'x';
611
- var yField = yScale.field || 'y';
612
- var yVal = originData[yField];
613
- var xVal;
614
- if (xScale.type === 'identity') {
615
- xVal = xScale.values[0];
616
- }
617
- else {
618
- xVal = originData[xField];
619
- }
620
- var id;
621
- if (type === 'interval' || type === 'schema') {
622
- id = "".concat(xVal);
623
- }
624
- else if (type === 'line' || type === 'area' || type === 'path') {
625
- id = type;
626
- }
627
- else {
628
- id = "".concat(xVal, "-").concat(yVal);
629
- }
630
- var groupScales = this.groupScales;
631
- for (var index = 0, length_2 = groupScales.length; index < length_2; index++) {
632
- var groupScale = groupScales[index];
633
- var field = groupScale.field;
634
- id = "".concat(id, "-").concat(originData[field]);
635
- }
636
- // 用户在进行 dodge 类型的 adjust 调整的时候设置了 dodgeBy 属性
637
- var dodgeAdjust = this.getAdjust('dodge');
638
- if (dodgeAdjust) {
639
- var dodgeBy = dodgeAdjust.dodgeBy;
640
- if (dodgeBy) {
641
- id = "".concat(id, "-").concat(originData[dodgeBy]);
642
- }
643
- }
644
- if (this.getAdjust('jitter')) {
645
- id = "".concat(id, "-").concat(data.x, "-").concat(data.y);
646
- }
647
- return id;
648
- };
649
- /**
650
- * 获取所有需要创建 scale 的字段名称。
651
- */
652
- Geometry.prototype.getScaleFields = function () {
653
- var fields = [];
654
- var tmpMap = new Map();
655
- var _a = this, attributeOption = _a.attributeOption, labelOption = _a.labelOption, tooltipOption = _a.tooltipOption;
656
- // 获取图形属性上的 fields
657
- for (var attributeType in attributeOption) {
658
- if (attributeOption.hasOwnProperty(attributeType)) {
659
- var eachOpt = attributeOption[attributeType];
660
- if (eachOpt.fields) {
661
- uniq(eachOpt.fields, fields, tmpMap);
662
- }
663
- else if (eachOpt.values) {
664
- // 考虑 size(10), shape('circle') 等场景
665
- uniq(eachOpt.values, fields, tmpMap);
666
- }
667
- }
668
- }
669
- // 获取 label 上的字段
670
- if (labelOption && labelOption.fields) {
671
- uniq(labelOption.fields, fields, tmpMap);
672
- }
673
- // 获取 tooltip 上的字段
674
- if (isObject(tooltipOption) && tooltipOption.fields) {
675
- uniq(tooltipOption.fields, fields, tmpMap);
676
- }
677
- return fields;
678
- };
679
- /**
680
- * 显示或者隐藏 geometry。
681
- * @param visible
682
- */
683
- Geometry.prototype.changeVisible = function (visible) {
684
- _super.prototype.changeVisible.call(this, visible);
685
- var elements = this.elements;
686
- for (var index = 0, length_3 = elements.length; index < length_3; index++) {
687
- var element = elements[index];
688
- element.changeVisible(visible);
689
- }
690
- if (visible) {
691
- if (this.container) {
692
- this.container.show();
693
- }
694
- if (this.labelsContainer) {
695
- this.labelsContainer.show();
696
- }
697
- }
698
- else {
699
- if (this.container) {
700
- this.container.hide();
701
- }
702
- if (this.labelsContainer) {
703
- this.labelsContainer.hide();
704
- }
705
- }
706
- };
707
- /**
708
- * 获得所有的字段
709
- */
710
- Geometry.prototype.getFields = function () {
711
- var uniqMap = new Map();
712
- var fields = [];
713
- Object.values(this.attributeOption).forEach(function (cfg) {
714
- var fs = (cfg === null || cfg === void 0 ? void 0 : cfg.fields) || [];
715
- fs.forEach(function (f) {
716
- if (!uniqMap.has(f)) {
717
- fields.push(f);
718
- }
719
- uniqMap.set(f, true);
720
- });
721
- }, []);
722
- return fields;
723
- };
724
- /**
725
- * 获取当前配置中的所有分组 & 分类的字段。
726
- * @return fields string[]
727
- */
728
- Geometry.prototype.getGroupFields = function () {
729
- var groupFields = [];
730
- var tmpMap = new Map(); // 用于去重过滤
731
- for (var index = 0, length_4 = GROUP_ATTRS.length; index < length_4; index++) {
732
- var attributeName = GROUP_ATTRS[index];
733
- var cfg = this.attributeOption[attributeName];
734
- if (cfg && cfg.fields) {
735
- uniq(cfg.fields, groupFields, tmpMap);
736
- }
737
- }
738
- return groupFields;
739
- };
740
- /**
741
- * 获得图形的 x y 字段。
742
- */
743
- Geometry.prototype.getXYFields = function () {
744
- var _a = this.attributeOption.position.fields, x = _a[0], y = _a[1];
745
- return [x, y];
746
- };
747
- /**
748
- * x 字段
749
- * @returns
750
- */
751
- Geometry.prototype.getXField = function () {
752
- return get(this.getXYFields(), [0]);
753
- };
754
- /**
755
- * y 字段
756
- * @returns
757
- */
758
- Geometry.prototype.getYField = function () {
759
- return get(this.getXYFields(), [1]);
760
- };
761
- /**
762
- * 获取该 Geometry 下所有生成的 shapes。
763
- * @returns shapes
764
- */
765
- Geometry.prototype.getShapes = function () {
766
- return this.elements.map(function (element) { return element.shape; });
767
- };
768
- /**
769
- * 获取虚拟 Group。
770
- * @returns
771
- */
772
- Geometry.prototype.getOffscreenGroup = function () {
773
- if (!this.offscreenGroup) {
774
- var GroupCtor = this.container.getGroupBase(); // 获取分组的构造函数
775
- this.offscreenGroup = new GroupCtor({});
776
- }
777
- return this.offscreenGroup;
778
- };
779
- // 对数据进行排序
780
- Geometry.prototype.sort = function (mappingArray) {
781
- if (!this.hasSorted) {
782
- // 未发生过排序
783
- var xScale_1 = this.getXScale();
784
- var xField_1 = xScale_1.field;
785
- for (var index = 0; index < mappingArray.length; index++) {
786
- var itemArr = mappingArray[index];
787
- itemArr.sort(function (obj1, obj2) {
788
- return xScale_1.translate(obj1[FIELD_ORIGIN][xField_1]) - xScale_1.translate(obj2[FIELD_ORIGIN][xField_1]);
789
- });
790
- }
791
- }
792
- this.hasSorted = true;
793
- };
794
- /**
795
- * 调整度量范围。主要针对发生层叠以及一些特殊需求的 Geometry,比如 Interval 下的柱状图 Y 轴默认从 0 开始。
796
- */
797
- Geometry.prototype.adjustScale = function () {
798
- var yScale = this.getYScale();
799
- // 如果数据发生过 stack adjust,需要调整下 yScale 的数据范围
800
- if (yScale && this.getAdjust('stack')) {
801
- this.updateStackRange(yScale, this.beforeMappingData);
802
- }
803
- };
804
- /**
805
- * 获取当前 Geometry 对应的 Shape 工厂实例。
806
- */
807
- Geometry.prototype.getShapeFactory = function () {
808
- var shapeType = this.shapeType;
809
- if (!getShapeFactory(shapeType)) {
810
- return;
811
- }
812
- if (!this.shapeFactory) {
813
- this.shapeFactory = clone(getShapeFactory(shapeType)); // 防止多个 view 共享一个 shapeFactory 实例,导致 coordinate 被篡改
814
- }
815
- // 因为这里缓存了 shapeFactory,但是外部可能会变更 coordinate,导致无法重新设置到 shapeFactory 中
816
- this.shapeFactory.coordinate = this.coordinate;
817
- // theme 原因同上
818
- this.shapeFactory.theme = this.theme.geometries[shapeType] || {};
819
- return this.shapeFactory;
820
- };
821
- /**
822
- * 获取每个 Shape 对应的关键点数据。
823
- * @param obj 经过分组 -> 数字化 -> adjust 调整后的数据记录
824
- * @returns
825
- */
826
- Geometry.prototype.createShapePointsCfg = function (obj) {
827
- var xScale = this.getXScale();
828
- var yScale = this.getYScale();
829
- var x = this.normalizeValues(obj[xScale.field], xScale);
830
- var y; // 存在没有 y 的情况
831
- if (yScale) {
832
- y = this.normalizeValues(obj[yScale.field], yScale);
833
- }
834
- else {
835
- y = obj.y ? obj.y : 0.1;
836
- }
837
- return {
838
- x: x,
839
- y: y,
840
- y0: yScale ? yScale.scale(this.getYMinValue()) : undefined,
841
- };
842
- };
843
- /**
844
- * 创建 Element 实例。
845
- * @param mappingDatum Element 对应的绘制数据
846
- * @param [isUpdate] 是否处于更新阶段
847
- * @returns element 返回创建的 Element 实例
848
- */
849
- Geometry.prototype.createElement = function (mappingDatum, index, isUpdate) {
850
- if (isUpdate === void 0) { isUpdate = false; }
851
- var container = this.container;
852
- var shapeCfg = this.getDrawCfg(mappingDatum); // 获取绘制图形的配置信息
853
- var shapeFactory = this.getShapeFactory();
854
- var element = new Element({
855
- shapeFactory: shapeFactory,
856
- container: container,
857
- offscreenGroup: this.getOffscreenGroup(),
858
- elementIndex: index,
859
- });
860
- element.animate = this.animateOption;
861
- element.geometry = this;
862
- element.draw(shapeCfg, isUpdate); // 绘制
863
- return element;
864
- };
865
- /**
866
- * 获取每条数据对应的图形绘制数据。
867
- * @param mappingDatum 映射后的数据
868
- * @returns draw cfg
869
- */
870
- Geometry.prototype.getDrawCfg = function (mappingDatum) {
871
- var originData = mappingDatum[FIELD_ORIGIN]; // 原始数据
872
- var cfg = {
873
- mappingData: mappingDatum,
874
- data: originData,
875
- x: mappingDatum.x,
876
- y: mappingDatum.y,
877
- color: mappingDatum.color,
878
- size: mappingDatum.size,
879
- isInCircle: this.coordinate.isPolar,
880
- customInfo: this.customOption,
881
- };
882
- var shapeName = mappingDatum.shape;
883
- if (!shapeName && this.getShapeFactory()) {
884
- shapeName = this.getShapeFactory().defaultShapeType;
885
- }
886
- cfg.shape = shapeName;
887
- // 获取默认样式
888
- var theme = this.theme.geometries[this.shapeType];
889
- cfg.defaultStyle = get(theme, [shapeName, 'default'], {}).style;
890
- if (!cfg.defaultStyle && this.getShapeFactory()) {
891
- cfg.defaultStyle = this.getShapeFactory().getDefaultStyle(theme);
892
- }
893
- var styleOption = this.styleOption;
894
- if (styleOption) {
895
- cfg.style = this.getStyleCfg(styleOption, originData);
896
- }
897
- if (this.generatePoints) {
898
- cfg.points = mappingDatum.points;
899
- cfg.nextPoints = mappingDatum.nextPoints;
900
- }
901
- return cfg;
902
- };
903
- Geometry.prototype.updateElements = function (mappingDataArray, isUpdate) {
904
- if (isUpdate === void 0) { isUpdate = false; }
905
- var keyDatum = new Map();
906
- var keys = [];
907
- // 用来保持 diff 元素之后 added, updated 的相对顺序
908
- var keyIndex = new Map();
909
- var index = 0;
910
- // 获得更新数据所有的 keys
911
- // 将更新的数据用 key 索引
912
- for (var i = 0; i < mappingDataArray.length; i++) {
913
- var mappingData = mappingDataArray[i];
914
- for (var j = 0; j < mappingData.length; j++) {
915
- var mappingDatum = mappingData[j];
916
- var key = this.getElementId(mappingDatum);
917
- var finalKey = keyDatum.has(key) ? "".concat(key, "-").concat(i, "-").concat(j) : key;
918
- keys.push(finalKey);
919
- keyDatum.set(finalKey, mappingDatum);
920
- keyIndex.set(finalKey, index);
921
- index++;
922
- }
923
- }
924
- this.elements = new Array(index);
925
- var _a = diff(this.lastElementsMap, keys), added = _a.added, updated = _a.updated, removed = _a.removed;
926
- // 新建 element
927
- for (var _i = 0, added_1 = added; _i < added_1.length; _i++) {
928
- var key = added_1[_i];
929
- var mappingDatum = keyDatum.get(key);
930
- var i = keyIndex.get(key);
931
- var element = this.createElement(mappingDatum, i, isUpdate);
932
- this.elements[i] = element;
933
- this.elementsMap[key] = element;
934
- if (element.shape) {
935
- element.shape.set('zIndex', this.zIndexReversed ? this.elements.length - i : i);
936
- }
937
- }
938
- // 更新 element
939
- for (var _b = 0, updated_1 = updated; _b < updated_1.length; _b++) {
940
- var key = updated_1[_b];
941
- var element = this.lastElementsMap[key];
942
- var mappingDatum = keyDatum.get(key);
943
- var currentShapeCfg = this.getDrawCfg(mappingDatum);
944
- var preShapeCfg = element.getModel();
945
- var i = keyIndex.get(key);
946
- if (this.isCoordinateChanged || isModelChange(currentShapeCfg, preShapeCfg)) {
947
- element.animate = this.animateOption;
948
- // 通过绘制数据的变更来判断是否需要更新,因为用户有可能会修改图形属性映射
949
- element.update(currentShapeCfg); // 更新对应的 element
950
- }
951
- this.elements[i] = element;
952
- this.elementsMap[key] = element;
953
- if (element.shape) {
954
- element.shape.set('zIndex', this.zIndexReversed ? this.elements.length - i : i);
955
- }
956
- }
957
- // 全部 setZIndex 之后,再执行 sort
958
- if (this.container) {
959
- this.container.sort();
960
- }
961
- // 销毁被删除的 elements
962
- for (var _c = 0, removed_1 = removed; _c < removed_1.length; _c++) {
963
- var key = removed_1[_c];
964
- var element = this.lastElementsMap[key];
965
- // 更新动画配置,用户有可能在更新之前有对动画进行配置操作
966
- element.animate = this.animateOption;
967
- element.destroy();
968
- }
969
- };
970
- /**
971
- * 获取渲染的 label 类型。
972
- */
973
- Geometry.prototype.getLabelType = function () {
974
- var _a = this, labelOption = _a.labelOption, coordinate = _a.coordinate, type = _a.type;
975
- var coordinateType = coordinate.type, isTransposed = coordinate.isTransposed;
976
- var labelType = get(labelOption, ['cfg', 'type']);
977
- if (!labelType) {
978
- // 用户未定义,则进行默认的逻辑
979
- if (coordinateType === 'polar') {
980
- // 极坐标下使用通用的极坐标文本,转置则使用饼图
981
- labelType = isTransposed ? 'pie' : 'polar';
982
- }
983
- else if (coordinateType === 'theta') {
984
- // theta 坐标系下使用饼图文本
985
- labelType = 'pie';
986
- }
987
- else if (type === 'interval' || type === 'polygon') {
988
- labelType = 'interval';
989
- }
990
- else {
991
- labelType = 'base';
992
- }
993
- }
994
- return labelType;
995
- };
996
- /**
997
- * 获取 Y 轴上的最小值。
998
- */
999
- Geometry.prototype.getYMinValue = function () {
1000
- var yScale = this.getYScale();
1001
- var min = yScale.min, max = yScale.max;
1002
- var value;
1003
- if (min >= 0) {
1004
- value = min;
1005
- }
1006
- else if (max <= 0) {
1007
- // 当值全位于负区间时,需要保证 ymin 在区域内,不可为 0
1008
- value = max;
1009
- }
1010
- else {
1011
- value = 0;
1012
- }
1013
- return value;
1014
- };
1015
- // 创建图形属性相关的配置项
1016
- Geometry.prototype.createAttrOption = function (attrName, field, cfg) {
1017
- if (isNil(field) || isObject(field)) {
1018
- if (isObject(field) && isEqual(Object.keys(field), ['values'])) {
1019
- // shape({ values: [ 'funnel' ] })
1020
- set(this.attributeOption, attrName, {
1021
- fields: field.values,
1022
- });
1023
- }
1024
- else {
1025
- set(this.attributeOption, attrName, field);
1026
- }
1027
- }
1028
- else {
1029
- var attrCfg = {};
1030
- if (isNumber(field)) {
1031
- // size(3)
1032
- attrCfg.values = [field];
1033
- }
1034
- else {
1035
- attrCfg.fields = parseFields(field);
1036
- }
1037
- if (cfg) {
1038
- if (isFunction(cfg)) {
1039
- attrCfg.callback = cfg;
1040
- }
1041
- else {
1042
- attrCfg.values = cfg;
1043
- }
1044
- }
1045
- set(this.attributeOption, attrName, attrCfg);
1046
- }
1047
- };
1048
- Geometry.prototype.initAttributes = function () {
1049
- var _this = this;
1050
- var _a = this, attributes = _a.attributes, attributeOption = _a.attributeOption, theme = _a.theme, shapeType = _a.shapeType;
1051
- this.groupScales = [];
1052
- var tmpMap = {};
1053
- var _loop_1 = function (attrType) {
1054
- if (attributeOption.hasOwnProperty(attrType)) {
1055
- var option = attributeOption[attrType];
1056
- if (!option) {
1057
- return { value: void 0 };
1058
- }
1059
- var attrCfg = __assign({}, option);
1060
- var callback = attrCfg.callback, values = attrCfg.values, _b = attrCfg.fields, fields = _b === void 0 ? [] : _b;
1061
- // 获取每一个字段对应的 scale
1062
- var scales = fields.map(function (field) {
1063
- var scale = _this.scales[field];
1064
- if (!tmpMap[field] && GROUP_ATTRS.includes(attrType)) {
1065
- var inferedScaleType = inferScaleType(scale, get(_this.scaleDefs, field), attrType, _this.type);
1066
- if (inferedScaleType === 'cat') {
1067
- _this.groupScales.push(scale);
1068
- tmpMap[field] = true;
1069
- }
1070
- }
1071
- return scale;
1072
- });
1073
- attrCfg.scales = scales;
1074
- if (attrType !== 'position' && scales.length === 1 && scales[0].type === 'identity') {
1075
- // 用户在图形通道上声明了常量字段 color('red'), size(5)
1076
- attrCfg.values = scales[0].values;
1077
- }
1078
- else if (!callback && !values) {
1079
- // 用户没有指定任何规则,则使用默认的映射规则
1080
- if (attrType === 'size') {
1081
- attrCfg.values = theme.sizes;
1082
- }
1083
- else if (attrType === 'shape') {
1084
- attrCfg.values = theme.shapes[shapeType] || [];
1085
- }
1086
- else if (attrType === 'color') {
1087
- if (scales.length) {
1088
- // 根据数值个数使用对应的色板
1089
- attrCfg.values = scales[0].values.length <= 10 ? theme.colors10 : theme.colors20;
1090
- }
1091
- else {
1092
- attrCfg.values = theme.colors10;
1093
- }
1094
- }
1095
- }
1096
- var AttributeCtor = getAttributeClass(attrType);
1097
- attributes[attrType] = new AttributeCtor(attrCfg);
1098
- }
1099
- };
1100
- // 遍历每一个 attrOption,各自创建 Attribute 实例
1101
- for (var attrType in attributeOption) {
1102
- var state_1 = _loop_1(attrType);
1103
- if (typeof state_1 === "object")
1104
- return state_1.value;
1105
- }
1106
- };
1107
- // 处理数据:分组 -> 数字化 -> adjust 调整
1108
- Geometry.prototype.processData = function (data) {
1109
- this.hasSorted = false;
1110
- var scales = this.getAttribute('position').scales;
1111
- var categoryScales = scales.filter(function (scale) { return scale.isCategory; });
1112
- var groupedArray = this.groupData(data); // 数据分组
1113
- var beforeAdjust = [];
1114
- for (var i = 0, len = groupedArray.length; i < len; i++) {
1115
- var subData = groupedArray[i];
1116
- var arr = [];
1117
- for (var j = 0, subLen = subData.length; j < subLen; j++) {
1118
- var originData = subData[j];
1119
- var item = {};
1120
- // tslint:disable-next-line: forin
1121
- for (var k in originData) {
1122
- item[k] = originData[k];
1123
- }
1124
- item[FIELD_ORIGIN] = originData;
1125
- // 将分类数据翻译成数据, 仅对位置相关的度量进行数字化处理
1126
- for (var _i = 0, categoryScales_1 = categoryScales; _i < categoryScales_1.length; _i++) {
1127
- var scale = categoryScales_1[_i];
1128
- var field = scale.field;
1129
- item[field] = scale.translate(item[field]);
1130
- }
1131
- arr.push(item);
1132
- }
1133
- beforeAdjust.push(arr);
1134
- }
1135
- var dataArray = this.adjustData(beforeAdjust); // 进行 adjust 数据调整
1136
- this.beforeMappingData = dataArray;
1137
- return dataArray;
1138
- };
1139
- // 调整数据
1140
- Geometry.prototype.adjustData = function (dataArray) {
1141
- var adjustOption = this.adjustOption;
1142
- var _a = this, intervalPadding = _a.intervalPadding, dodgePadding = _a.dodgePadding, theme = _a.theme;
1143
- // 兼容theme配置
1144
- var maxColumnWidth = this.maxColumnWidth || theme.maxColumnWidth;
1145
- var minColumnWidth = this.minColumnWidth || theme.minColumnWidth;
1146
- var columnWidthRatio = this.columnWidthRatio || theme.columnWidthRatio;
1147
- var result = dataArray;
1148
- if (adjustOption) {
1149
- var xScale_2 = this.getXScale();
1150
- var yScale = this.getYScale();
1151
- var xField = xScale_2.field;
1152
- var yField = yScale ? yScale.field : null;
1153
- var xDimensionLength = getXDimensionLength(this.coordinate);
1154
- var groupNum = xScale_2.values.length;
1155
- // 传入size计算相关参数,默认宽度、最大最小宽度约束
1156
- var sizeAttr = this.getAttribute('size');
1157
- var defaultSize = void 0;
1158
- if (sizeAttr) {
1159
- defaultSize = sizeAttr.values[0];
1160
- }
1161
- for (var i = 0, len = adjustOption.length; i < len; i++) {
1162
- var adjust = adjustOption[i];
1163
- var adjustCfg = __assign({ xField: xField, yField: yField, intervalPadding: intervalPadding, dodgePadding: dodgePadding, xDimensionLength: xDimensionLength, groupNum: groupNum, defaultSize: defaultSize, maxColumnWidth: maxColumnWidth, minColumnWidth: minColumnWidth, columnWidthRatio: columnWidthRatio }, adjust);
1164
- var type = adjust.type;
1165
- if (type === 'dodge') {
1166
- var adjustNames = [];
1167
- if (xScale_2.isCategory || xScale_2.type === 'identity') {
1168
- adjustNames.push('x');
1169
- }
1170
- else if (!yScale) {
1171
- adjustNames.push('y');
1172
- }
1173
- else {
1174
- throw new Error('dodge is not support linear attribute, please use category attribute!');
1175
- }
1176
- adjustCfg.adjustNames = adjustNames;
1177
- // 每个分组内每条柱子的宽度占比,用户不可指定,用户需要通过 columnWidthRatio 指定
1178
- // 兼容theme配置
1179
- adjustCfg.dodgeRatio = columnWidthRatio;
1180
- }
1181
- else if (type === 'stack') {
1182
- var coordinate = this.coordinate;
1183
- if (!yScale) {
1184
- // 一维的情况下获取高度和默认size
1185
- adjustCfg.height = coordinate.getHeight();
1186
- var size = this.getDefaultValue('size') || 3;
1187
- adjustCfg.size = size;
1188
- }
1189
- // 不进行 transpose 时,用户又没有设置这个参数时,默认从上向下
1190
- if (!coordinate.isTransposed && isNil(adjustCfg.reverseOrder)) {
1191
- adjustCfg.reverseOrder = true;
1192
- }
1193
- }
1194
- var adjustCtor = getAdjustClass(type);
1195
- adjustCfg.dimValuesMap = {};
1196
- //生成dimValuesMap
1197
- if (xScale_2 && xScale_2.values) {
1198
- adjustCfg.dimValuesMap[xScale_2.field] = xScale_2.values.map(function (v) { return xScale_2.translate(v); });
1199
- }
1200
- var adjustInstance = new adjustCtor(adjustCfg);
1201
- result = adjustInstance.process(result);
1202
- this.adjusts[type] = adjustInstance;
1203
- }
1204
- }
1205
- return result;
1206
- };
1207
- // 对数据进行分组
1208
- Geometry.prototype.groupData = function (data) {
1209
- var groupScales = this.getGroupScales();
1210
- var scaleDefs = this.scaleDefs;
1211
- var appendConditions = {};
1212
- var groupFields = [];
1213
- for (var index = 0; index < groupScales.length; index++) {
1214
- var scale = groupScales[index];
1215
- var field = scale.field;
1216
- groupFields.push(field);
1217
- if (get(scaleDefs, [field, 'values'])) {
1218
- // 用户通过 view.scale() 接口指定了 values 属性
1219
- appendConditions[field] = scaleDefs[field].values;
1220
- }
1221
- }
1222
- return group(data, groupFields, appendConditions);
1223
- };
1224
- // 更新发生层叠后的数据对应的度量范围
1225
- Geometry.prototype.updateStackRange = function (scale, dataArray) {
1226
- var mergeArray = flatten(dataArray);
1227
- var field = scale.field;
1228
- var min = scale.min;
1229
- var max = scale.max;
1230
- for (var index = 0; index < mergeArray.length; index++) {
1231
- var obj = mergeArray[index];
1232
- var tmpMin = Math.min.apply(null, obj[field]);
1233
- var tmpMax = Math.max.apply(null, obj[field]);
1234
- if (tmpMin < min) {
1235
- min = tmpMin;
1236
- }
1237
- if (tmpMax > max) {
1238
- max = tmpMax;
1239
- }
1240
- }
1241
- var scaleDefs = this.scaleDefs;
1242
- var cfg = {};
1243
- if (min < scale.min && !get(scaleDefs, [field, 'min'])) {
1244
- // 用户如果在列定义中定义了 min,则以用户定义的为准
1245
- cfg.min = min;
1246
- }
1247
- if (max > scale.max && !get(scaleDefs, [field, 'max'])) {
1248
- // 用户如果在列定义中定义了 max
1249
- cfg.max = max;
1250
- }
1251
- scale.change(cfg);
1252
- };
1253
- // 将数据映射至图形空间前的操作:排序以及关键点的生成
1254
- Geometry.prototype.beforeMapping = function (beforeMappingData) {
1255
- // 当初加 clone 是因为 points 的引用关系,导致更新失败,可是现在貌似复现不出来了,所以暂时不进行 clone
1256
- // const source = clone(beforeMappingData);
1257
- var source = beforeMappingData;
1258
- if (this.sortable) {
1259
- this.sort(source);
1260
- }
1261
- if (this.generatePoints) {
1262
- // 需要生成关键点
1263
- for (var index = 0, length_5 = source.length; index < length_5; index++) {
1264
- var currentData = source[index];
1265
- this.generateShapePoints(currentData);
1266
- var nextData = source[index + 1];
1267
- if (nextData) {
1268
- this.generateShapePoints(nextData);
1269
- currentData[0].nextPoints = nextData[0].points;
1270
- }
1271
- }
1272
- }
1273
- return source;
1274
- };
1275
- // 生成 shape 的关键点
1276
- Geometry.prototype.generateShapePoints = function (data) {
1277
- var shapeFactory = this.getShapeFactory();
1278
- var shapeAttr = this.getAttribute('shape');
1279
- for (var index = 0; index < data.length; index++) {
1280
- var obj = data[index];
1281
- var cfg = this.createShapePointsCfg(obj);
1282
- var shape = shapeAttr ? this.getAttributeValues(shapeAttr, obj) : null;
1283
- var points = shapeFactory.getShapePoints(shape, cfg);
1284
- obj.points = points;
1285
- }
1286
- };
1287
- // 将数据归一化
1288
- Geometry.prototype.normalizeValues = function (values, scale) {
1289
- var rst = [];
1290
- if (isArray(values)) {
1291
- for (var index = 0; index < values.length; index++) {
1292
- var value = values[index];
1293
- rst.push(scale.scale(value));
1294
- }
1295
- }
1296
- else {
1297
- rst = scale.scale(values);
1298
- }
1299
- return rst;
1300
- };
1301
- // 将数据映射至图形空间
1302
- Geometry.prototype.mapping = function (data) {
1303
- var attributes = this.attributes;
1304
- var mappingData = [];
1305
- for (var index = 0; index < data.length; index++) {
1306
- var record = data[index];
1307
- var newRecord = {
1308
- _origin: record[FIELD_ORIGIN],
1309
- points: record.points,
1310
- nextPoints: record.nextPoints,
1311
- };
1312
- for (var k in attributes) {
1313
- if (attributes.hasOwnProperty(k)) {
1314
- var attr = attributes[k];
1315
- var names = attr.names;
1316
- var values = this.getAttributeValues(attr, record);
1317
- if (names.length > 1) {
1318
- // position 之类的生成多个字段的属性
1319
- for (var j = 0; j < values.length; j += 1) {
1320
- var val = values[j];
1321
- var name_1 = names[j];
1322
- newRecord[name_1] = isArray(val) && val.length === 1 ? val[0] : val; // 只有一个值时返回第一个属性值
1323
- }
1324
- }
1325
- else {
1326
- // values.length === 1 的判断是以下情况,获取用户设置的图形属性值
1327
- // shape('a', ['dot', 'dash']), color('a', ['red', 'yellow'])
1328
- newRecord[names[0]] = values.length === 1 ? values[0] : values;
1329
- }
1330
- }
1331
- }
1332
- this.convertPoint(newRecord); // 将 x、y 转换成画布坐标
1333
- mappingData.push(newRecord);
1334
- }
1335
- return mappingData;
1336
- };
1337
- // 将归一化的坐标值转换成画布坐标
1338
- Geometry.prototype.convertPoint = function (mappingRecord) {
1339
- var x = mappingRecord.x, y = mappingRecord.y;
1340
- var rstX;
1341
- var rstY;
1342
- var obj;
1343
- var coordinate = this.coordinate;
1344
- if (isArray(x) && isArray(y)) {
1345
- rstX = [];
1346
- rstY = [];
1347
- for (var i = 0, j = 0, xLen = x.length, yLen = y.length; i < xLen && j < yLen; i += 1, j += 1) {
1348
- obj = coordinate.convert({
1349
- x: x[i],
1350
- y: y[j],
1351
- });
1352
- rstX.push(obj.x);
1353
- rstY.push(obj.y);
1354
- }
1355
- }
1356
- else if (isArray(y)) {
1357
- rstY = [];
1358
- for (var index = 0; index < y.length; index++) {
1359
- var yVal = y[index];
1360
- obj = coordinate.convert({
1361
- x: x,
1362
- y: yVal,
1363
- });
1364
- if (rstX && rstX !== obj.x) {
1365
- if (!isArray(rstX)) {
1366
- rstX = [rstX];
1367
- }
1368
- rstX.push(obj.x);
1369
- }
1370
- else {
1371
- rstX = obj.x;
1372
- }
1373
- rstY.push(obj.y);
1374
- }
1375
- }
1376
- else if (isArray(x)) {
1377
- rstX = [];
1378
- for (var index = 0; index < x.length; index++) {
1379
- var xVal = x[index];
1380
- obj = coordinate.convert({
1381
- x: xVal,
1382
- y: y,
1383
- });
1384
- if (rstY && rstY !== obj.y) {
1385
- if (!isArray(rstY)) {
1386
- rstY = [rstY];
1387
- }
1388
- rstY.push(obj.y);
1389
- }
1390
- else {
1391
- rstY = obj.y;
1392
- }
1393
- rstX.push(obj.x);
1394
- }
1395
- }
1396
- else {
1397
- var point = coordinate.convert({
1398
- x: x,
1399
- y: y,
1400
- });
1401
- rstX = point.x;
1402
- rstY = point.y;
1403
- }
1404
- mappingRecord.x = rstX;
1405
- mappingRecord.y = rstY;
1406
- };
1407
- // 获取 style 配置
1408
- Geometry.prototype.getStyleCfg = function (styleOption, originData) {
1409
- var _a = styleOption.fields, fields = _a === void 0 ? [] : _a, callback = styleOption.callback, cfg = styleOption.cfg;
1410
- if (cfg) {
1411
- // 用户直接配置样式属性
1412
- return cfg;
1413
- }
1414
- var params = fields.map(function (field) {
1415
- return originData[field];
1416
- });
1417
- return callback.apply(void 0, params);
1418
- };
1419
- Geometry.prototype.setCfg = function (cfg) {
1420
- var _this = this;
1421
- var coordinate = cfg.coordinate, data = cfg.data, theme = cfg.theme, scaleDefs = cfg.scaleDefs;
1422
- if (coordinate) {
1423
- this.coordinate = coordinate;
1424
- }
1425
- if (data) {
1426
- this.data = data;
1427
- }
1428
- if (scaleDefs) {
1429
- this.scaleDefs = scaleDefs;
1430
- this.idFields = [];
1431
- each(scaleDefs, function (scaleDef, field) {
1432
- if (scaleDef && scaleDef.key) {
1433
- _this.idFields.push(field);
1434
- }
1435
- });
1436
- }
1437
- if (theme) {
1438
- this.theme = this.userTheme ? deepMix({}, theme, this.userTheme) : theme; // 支持 geometry 层级的主题设置
1439
- }
1440
- };
1441
- Geometry.prototype.renderLabels = function (mappingArray, isUpdate) {
1442
- if (isUpdate === void 0) { isUpdate = false; }
1443
- var geometryLabel = this.geometryLabel;
1444
- if (!geometryLabel) {
1445
- // 初次创建
1446
- var labelType = this.getLabelType();
1447
- var GeometryLabelsCtor = getGeometryLabel(labelType);
1448
- geometryLabel = new GeometryLabelsCtor(this);
1449
- this.geometryLabel = geometryLabel;
1450
- }
1451
- geometryLabel.render(mappingArray, isUpdate);
1452
- // 将 label 同 element 进行关联
1453
- var labelsMap = geometryLabel.labelsRenderer.shapesMap;
1454
- each(this.elementsMap, function (element, id) {
1455
- var labels = filterLabelsById(id, labelsMap); // element 实例同 label 进行绑定
1456
- if (labels.length) {
1457
- element.labelShape = labels;
1458
- for (var i = 0; i < labels.length; i++) {
1459
- var label = labels[i];
1460
- var labelChildren = label.getChildren();
1461
- for (var j = 0; j < labelChildren.length; j++) {
1462
- var child = labelChildren[j];
1463
- child.cfg.name = ['element', 'label'];
1464
- child.cfg.element = element;
1465
- }
1466
- }
1467
- }
1468
- });
1469
- };
1470
- /**
1471
- * 是否需要进行群组入场动画
1472
- * 规则:
1473
- * 1. 如果发生更新,则不进行
1474
- * 2. 如果用户关闭 geometry 动画,则不进行
1475
- * 3. 如果用户关闭了 appear 动画,则不进行
1476
- * 4. 如果用户配置了 appear.animation,则不进行
1477
- */
1478
- Geometry.prototype.canDoGroupAnimation = function (isUpdate) {
1479
- return (!isUpdate &&
1480
- this.animateOption &&
1481
- (get(this.animateOption, 'appear') === undefined ||
1482
- (get(this.animateOption, 'appear') && get(this.animateOption, ['appear', 'animation']) === undefined)));
1483
- };
1484
- return Geometry;
1485
- }(Base));
1486
- export default Geometry;
1487
- //# sourceMappingURL=base.js.map