@antv/g2 4.1.43 → 4.1.44

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 (1336) hide show
  1. package/dist/g2.min.js +44 -0
  2. package/dist/g2.min.js.map +1 -0
  3. package/esm/animate/animation/fade.d.ts +21 -0
  4. package/esm/animate/animation/fade.js +42 -0
  5. package/esm/animate/animation/fade.js.map +1 -0
  6. package/esm/animate/animation/grow-in.d.ts +30 -0
  7. package/esm/animate/animation/grow-in.js +38 -0
  8. package/esm/animate/animation/grow-in.js.map +1 -0
  9. package/esm/animate/animation/index.d.ts +16 -0
  10. package/esm/animate/animation/index.js +17 -0
  11. package/esm/animate/animation/index.js.map +1 -0
  12. package/esm/animate/animation/path-in.d.ts +12 -0
  13. package/esm/animate/animation/path-in.js +21 -0
  14. package/esm/animate/animation/path-in.js.map +1 -0
  15. package/esm/animate/animation/position-update.d.ts +11 -0
  16. package/esm/animate/animation/position-update.js +24 -0
  17. package/esm/animate/animation/position-update.js.map +1 -0
  18. package/esm/animate/animation/scale-in.d.ts +19 -0
  19. package/esm/animate/animation/scale-in.js +60 -0
  20. package/esm/animate/animation/scale-in.js.map +1 -0
  21. package/esm/animate/animation/sector-path-update.d.ts +11 -0
  22. package/esm/animate/animation/sector-path-update.js +131 -0
  23. package/esm/animate/animation/sector-path-update.js.map +1 -0
  24. package/esm/animate/animation/util.d.ts +19 -0
  25. package/esm/animate/animation/util.js +88 -0
  26. package/esm/animate/animation/util.js.map +1 -0
  27. package/esm/animate/animation/wave-in.d.ts +13 -0
  28. package/esm/animate/animation/wave-in.js +26 -0
  29. package/esm/animate/animation/wave-in.js.map +1 -0
  30. package/esm/animate/animation/zoom.d.ts +21 -0
  31. package/esm/animate/animation/zoom.js +66 -0
  32. package/esm/animate/animation/zoom.js.map +1 -0
  33. package/esm/animate/index.d.ts +48 -0
  34. package/esm/animate/index.js +249 -0
  35. package/esm/animate/index.js.map +1 -0
  36. package/esm/animate/interface.d.ts +12 -0
  37. package/esm/animate/interface.js +2 -0
  38. package/esm/animate/interface.js.map +1 -0
  39. package/esm/api.d.ts +2 -0
  40. package/esm/api.js +3 -0
  41. package/esm/api.js.map +1 -0
  42. package/esm/base.d.ts +33 -0
  43. package/esm/base.js +55 -0
  44. package/esm/base.js.map +1 -0
  45. package/esm/chart/chart.d.ts +61 -0
  46. package/esm/chart/chart.js +157 -0
  47. package/esm/chart/chart.js.map +1 -0
  48. package/esm/chart/controller/annotation.d.ts +162 -0
  49. package/esm/chart/controller/annotation.js +581 -0
  50. package/esm/chart/controller/annotation.js.map +1 -0
  51. package/esm/chart/controller/axis.d.ts +93 -0
  52. package/esm/chart/controller/axis.js +578 -0
  53. package/esm/chart/controller/axis.js.map +1 -0
  54. package/esm/chart/controller/base.d.ts +64 -0
  55. package/esm/chart/controller/base.js +62 -0
  56. package/esm/chart/controller/base.js.map +1 -0
  57. package/esm/chart/controller/coordinate.d.ts +74 -0
  58. package/esm/chart/controller/coordinate.js +145 -0
  59. package/esm/chart/controller/coordinate.js.map +1 -0
  60. package/esm/chart/controller/gesture.d.ts +37 -0
  61. package/esm/chart/controller/gesture.js +258 -0
  62. package/esm/chart/controller/gesture.js.map +1 -0
  63. package/esm/chart/controller/index.d.ts +25 -0
  64. package/esm/chart/controller/index.js +34 -0
  65. package/esm/chart/controller/index.js.map +1 -0
  66. package/esm/chart/controller/legend.d.ts +106 -0
  67. package/esm/chart/controller/legend.js +484 -0
  68. package/esm/chart/controller/legend.js.map +1 -0
  69. package/esm/chart/controller/scrollbar.d.ts +64 -0
  70. package/esm/chart/controller/scrollbar.js +316 -0
  71. package/esm/chart/controller/scrollbar.js.map +1 -0
  72. package/esm/chart/controller/slider.d.ts +88 -0
  73. package/esm/chart/controller/slider.js +296 -0
  74. package/esm/chart/controller/slider.js.map +1 -0
  75. package/esm/chart/controller/tooltip.d.ts +68 -0
  76. package/esm/chart/controller/tooltip.js +644 -0
  77. package/esm/chart/controller/tooltip.js.map +1 -0
  78. package/esm/chart/event.d.ts +47 -0
  79. package/esm/chart/event.js +91 -0
  80. package/esm/chart/event.js.map +1 -0
  81. package/esm/chart/index.d.ts +4 -0
  82. package/esm/chart/index.js +5 -0
  83. package/esm/chart/index.js.map +1 -0
  84. package/esm/chart/layout/auto.d.ts +8 -0
  85. package/esm/chart/layout/auto.js +64 -0
  86. package/esm/chart/layout/auto.js.map +1 -0
  87. package/esm/chart/layout/constraint/bounds.d.ts +32 -0
  88. package/esm/chart/layout/constraint/bounds.js +30 -0
  89. package/esm/chart/layout/constraint/bounds.js.map +1 -0
  90. package/esm/chart/layout/constraint/constraint.d.ts +31 -0
  91. package/esm/chart/layout/constraint/constraint.js +81 -0
  92. package/esm/chart/layout/constraint/constraint.js.map +1 -0
  93. package/esm/chart/layout/constraint/gauss.d.ts +11 -0
  94. package/esm/chart/layout/constraint/gauss.js +63 -0
  95. package/esm/chart/layout/constraint/gauss.js.map +1 -0
  96. package/esm/chart/layout/constraint/index.d.ts +5 -0
  97. package/esm/chart/layout/constraint/index.js +30 -0
  98. package/esm/chart/layout/constraint/index.js.map +1 -0
  99. package/esm/chart/layout/constraint/solver.d.ts +40 -0
  100. package/esm/chart/layout/constraint/solver.js +77 -0
  101. package/esm/chart/layout/constraint/solver.js.map +1 -0
  102. package/esm/chart/layout/constraint/types.d.ts +21 -0
  103. package/esm/chart/layout/constraint/types.js +13 -0
  104. package/esm/chart/layout/constraint/types.js.map +1 -0
  105. package/esm/chart/layout/constraint/variable.d.ts +24 -0
  106. package/esm/chart/layout/constraint/variable.js +28 -0
  107. package/esm/chart/layout/constraint/variable.js.map +1 -0
  108. package/esm/chart/layout/index.d.ts +15 -0
  109. package/esm/chart/layout/index.js +26 -0
  110. package/esm/chart/layout/index.js.map +1 -0
  111. package/esm/chart/layout/padding-cal.d.ts +53 -0
  112. package/esm/chart/layout/padding-cal.js +108 -0
  113. package/esm/chart/layout/padding-cal.js.map +1 -0
  114. package/esm/chart/util/scale-pool.d.ts +57 -0
  115. package/esm/chart/util/scale-pool.js +212 -0
  116. package/esm/chart/util/scale-pool.js.map +1 -0
  117. package/esm/chart/util/sync-view-padding.d.ts +9 -0
  118. package/esm/chart/util/sync-view-padding.js +14 -0
  119. package/esm/chart/util/sync-view-padding.js.map +1 -0
  120. package/esm/chart/view.d.ts +747 -0
  121. package/esm/chart/view.js +1633 -0
  122. package/esm/chart/view.js.map +1 -0
  123. package/esm/component/labels.d.ts +47 -0
  124. package/esm/component/labels.js +274 -0
  125. package/esm/component/labels.js.map +1 -0
  126. package/esm/component/update-label.d.ts +21 -0
  127. package/esm/component/update-label.js +57 -0
  128. package/esm/component/update-label.js.map +1 -0
  129. package/esm/constant.d.ts +122 -0
  130. package/esm/constant.js +134 -0
  131. package/esm/constant.js.map +1 -0
  132. package/esm/core.d.ts +46 -0
  133. package/esm/core.js +60 -0
  134. package/esm/core.js.map +1 -0
  135. package/esm/dependents.d.ts +21 -0
  136. package/esm/dependents.js +33 -0
  137. package/esm/dependents.js.map +1 -0
  138. package/esm/engine/index.d.ts +13 -0
  139. package/esm/engine/index.js +22 -0
  140. package/esm/engine/index.js.map +1 -0
  141. package/esm/facet/circle.d.ts +36 -0
  142. package/esm/facet/circle.js +119 -0
  143. package/esm/facet/circle.js.map +1 -0
  144. package/esm/facet/facet.d.ts +165 -0
  145. package/esm/facet/facet.js +291 -0
  146. package/esm/facet/facet.js.map +1 -0
  147. package/esm/facet/index.d.ts +13 -0
  148. package/esm/facet/index.js +22 -0
  149. package/esm/facet/index.js.map +1 -0
  150. package/esm/facet/list.d.ts +46 -0
  151. package/esm/facet/list.js +134 -0
  152. package/esm/facet/list.js.map +1 -0
  153. package/esm/facet/matrix.d.ts +34 -0
  154. package/esm/facet/matrix.js +119 -0
  155. package/esm/facet/matrix.js.map +1 -0
  156. package/esm/facet/mirror.d.ts +31 -0
  157. package/esm/facet/mirror.js +144 -0
  158. package/esm/facet/mirror.js.map +1 -0
  159. package/esm/facet/rect.d.ts +35 -0
  160. package/esm/facet/rect.js +141 -0
  161. package/esm/facet/rect.js.map +1 -0
  162. package/esm/facet/tree.d.ts +40 -0
  163. package/esm/facet/tree.js +288 -0
  164. package/esm/facet/tree.js.map +1 -0
  165. package/esm/geometry/area.d.ts +46 -0
  166. package/esm/geometry/area.js +62 -0
  167. package/esm/geometry/area.js.map +1 -0
  168. package/esm/geometry/base.d.ts +793 -0
  169. package/esm/geometry/base.js +1487 -0
  170. package/esm/geometry/base.js.map +1 -0
  171. package/esm/geometry/edge.d.ts +15 -0
  172. package/esm/geometry/edge.js +24 -0
  173. package/esm/geometry/edge.js.map +1 -0
  174. package/esm/geometry/element/index.d.ts +127 -0
  175. package/esm/geometry/element/index.js +436 -0
  176. package/esm/geometry/element/index.js.map +1 -0
  177. package/esm/geometry/heatmap.d.ts +31 -0
  178. package/esm/geometry/heatmap.js +190 -0
  179. package/esm/geometry/heatmap.js.map +1 -0
  180. package/esm/geometry/interval.d.ts +41 -0
  181. package/esm/geometry/interval.js +98 -0
  182. package/esm/geometry/interval.js.map +1 -0
  183. package/esm/geometry/label/base.d.ts +76 -0
  184. package/esm/geometry/label/base.js +404 -0
  185. package/esm/geometry/label/base.js.map +1 -0
  186. package/esm/geometry/label/index.d.ts +38 -0
  187. package/esm/geometry/label/index.js +35 -0
  188. package/esm/geometry/label/index.js.map +1 -0
  189. package/esm/geometry/label/interface.d.ts +50 -0
  190. package/esm/geometry/label/interface.js +2 -0
  191. package/esm/geometry/label/interface.js.map +1 -0
  192. package/esm/geometry/label/interval.d.ts +27 -0
  193. package/esm/geometry/label/interval.js +146 -0
  194. package/esm/geometry/label/interval.js.map +1 -0
  195. package/esm/geometry/label/layout/adjust-color.d.ts +3 -0
  196. package/esm/geometry/label/layout/adjust-color.js +36 -0
  197. package/esm/geometry/label/layout/adjust-color.js.map +1 -0
  198. package/esm/geometry/label/layout/hide-overlap.d.ts +8 -0
  199. package/esm/geometry/label/layout/hide-overlap.js +29 -0
  200. package/esm/geometry/label/layout/hide-overlap.js.map +1 -0
  201. package/esm/geometry/label/layout/interval/adjust-position.d.ts +9 -0
  202. package/esm/geometry/label/layout/interval/adjust-position.js +61 -0
  203. package/esm/geometry/label/layout/interval/adjust-position.js.map +1 -0
  204. package/esm/geometry/label/layout/interval/hide-overlap.d.ts +9 -0
  205. package/esm/geometry/label/layout/interval/hide-overlap.js +78 -0
  206. package/esm/geometry/label/layout/interval/hide-overlap.js.map +1 -0
  207. package/esm/geometry/label/layout/limit-in-canvas.d.ts +9 -0
  208. package/esm/geometry/label/layout/limit-in-canvas.js +44 -0
  209. package/esm/geometry/label/layout/limit-in-canvas.js.map +1 -0
  210. package/esm/geometry/label/layout/limit-in-plot.d.ts +18 -0
  211. package/esm/geometry/label/layout/limit-in-plot.js +75 -0
  212. package/esm/geometry/label/layout/limit-in-plot.js.map +1 -0
  213. package/esm/geometry/label/layout/limit-in-shape.d.ts +7 -0
  214. package/esm/geometry/label/layout/limit-in-shape.js +18 -0
  215. package/esm/geometry/label/layout/limit-in-shape.js.map +1 -0
  216. package/esm/geometry/label/layout/overlap.d.ts +15 -0
  217. package/esm/geometry/label/layout/overlap.js +223 -0
  218. package/esm/geometry/label/layout/overlap.js.map +1 -0
  219. package/esm/geometry/label/layout/path/adjust-position.d.ts +17 -0
  220. package/esm/geometry/label/layout/path/adjust-position.js +94 -0
  221. package/esm/geometry/label/layout/path/adjust-position.js.map +1 -0
  222. package/esm/geometry/label/layout/pie/distribute.d.ts +3 -0
  223. package/esm/geometry/label/layout/pie/distribute.js +185 -0
  224. package/esm/geometry/label/layout/pie/distribute.js.map +1 -0
  225. package/esm/geometry/label/layout/pie/outer.d.ts +6 -0
  226. package/esm/geometry/label/layout/pie/outer.js +207 -0
  227. package/esm/geometry/label/layout/pie/outer.js.map +1 -0
  228. package/esm/geometry/label/layout/pie/spider.d.ts +7 -0
  229. package/esm/geometry/label/layout/pie/spider.js +181 -0
  230. package/esm/geometry/label/layout/pie/spider.js.map +1 -0
  231. package/esm/geometry/label/layout/pie/util.d.ts +10 -0
  232. package/esm/geometry/label/layout/pie/util.js +73 -0
  233. package/esm/geometry/label/layout/pie/util.js.map +1 -0
  234. package/esm/geometry/label/layout/point/adjust-position.d.ts +17 -0
  235. package/esm/geometry/label/layout/point/adjust-position.js +94 -0
  236. package/esm/geometry/label/layout/point/adjust-position.js.map +1 -0
  237. package/esm/geometry/label/pie.d.ts +22 -0
  238. package/esm/geometry/label/pie.js +95 -0
  239. package/esm/geometry/label/pie.js.map +1 -0
  240. package/esm/geometry/label/polar.d.ts +64 -0
  241. package/esm/geometry/label/polar.js +221 -0
  242. package/esm/geometry/label/polar.js.map +1 -0
  243. package/esm/geometry/label/util/index.d.ts +26 -0
  244. package/esm/geometry/label/util/index.js +61 -0
  245. package/esm/geometry/label/util/index.js.map +1 -0
  246. package/esm/geometry/line.d.ts +11 -0
  247. package/esm/geometry/line.js +21 -0
  248. package/esm/geometry/line.js.map +1 -0
  249. package/esm/geometry/path.d.ts +40 -0
  250. package/esm/geometry/path.js +122 -0
  251. package/esm/geometry/path.js.map +1 -0
  252. package/esm/geometry/point.d.ts +19 -0
  253. package/esm/geometry/point.js +30 -0
  254. package/esm/geometry/point.js.map +1 -0
  255. package/esm/geometry/polygon.d.ts +19 -0
  256. package/esm/geometry/polygon.js +62 -0
  257. package/esm/geometry/polygon.js.map +1 -0
  258. package/esm/geometry/schema.d.ts +18 -0
  259. package/esm/geometry/schema.js +48 -0
  260. package/esm/geometry/schema.js.map +1 -0
  261. package/esm/geometry/shape/area/index.d.ts +2 -0
  262. package/esm/geometry/shape/area/index.js +44 -0
  263. package/esm/geometry/shape/area/index.js.map +1 -0
  264. package/esm/geometry/shape/area/line.d.ts +1 -0
  265. package/esm/geometry/shape/area/line.js +31 -0
  266. package/esm/geometry/shape/area/line.js.map +1 -0
  267. package/esm/geometry/shape/area/smooth-line.d.ts +1 -0
  268. package/esm/geometry/shape/area/smooth-line.js +30 -0
  269. package/esm/geometry/shape/area/smooth-line.js.map +1 -0
  270. package/esm/geometry/shape/area/smooth.d.ts +1 -0
  271. package/esm/geometry/shape/area/smooth.js +31 -0
  272. package/esm/geometry/shape/area/smooth.js.map +1 -0
  273. package/esm/geometry/shape/area/util.d.ts +22 -0
  274. package/esm/geometry/shape/area/util.js +88 -0
  275. package/esm/geometry/shape/area/util.js.map +1 -0
  276. package/esm/geometry/shape/base.d.ts +22 -0
  277. package/esm/geometry/shape/base.js +162 -0
  278. package/esm/geometry/shape/base.js.map +1 -0
  279. package/esm/geometry/shape/constant.d.ts +4 -0
  280. package/esm/geometry/shape/constant.js +5 -0
  281. package/esm/geometry/shape/constant.js.map +1 -0
  282. package/esm/geometry/shape/edge/arc.d.ts +1 -0
  283. package/esm/geometry/shape/edge/arc.js +84 -0
  284. package/esm/geometry/shape/edge/arc.js.map +1 -0
  285. package/esm/geometry/shape/edge/index.d.ts +2 -0
  286. package/esm/geometry/shape/edge/index.js +31 -0
  287. package/esm/geometry/shape/edge/index.js.map +1 -0
  288. package/esm/geometry/shape/edge/smooth.d.ts +1 -0
  289. package/esm/geometry/shape/edge/smooth.js +30 -0
  290. package/esm/geometry/shape/edge/smooth.js.map +1 -0
  291. package/esm/geometry/shape/edge/util.d.ts +17 -0
  292. package/esm/geometry/shape/edge/util.js +32 -0
  293. package/esm/geometry/shape/edge/util.js.map +1 -0
  294. package/esm/geometry/shape/edge/vhv.d.ts +1 -0
  295. package/esm/geometry/shape/edge/vhv.js +42 -0
  296. package/esm/geometry/shape/edge/vhv.js.map +1 -0
  297. package/esm/geometry/shape/interval/funnel.d.ts +1 -0
  298. package/esm/geometry/shape/interval/funnel.js +31 -0
  299. package/esm/geometry/shape/interval/funnel.js.map +1 -0
  300. package/esm/geometry/shape/interval/hollow-rect.d.ts +1 -0
  301. package/esm/geometry/shape/interval/hollow-rect.js +51 -0
  302. package/esm/geometry/shape/interval/hollow-rect.js.map +1 -0
  303. package/esm/geometry/shape/interval/index.d.ts +3 -0
  304. package/esm/geometry/shape/interval/index.js +63 -0
  305. package/esm/geometry/shape/interval/index.js.map +1 -0
  306. package/esm/geometry/shape/interval/line.d.ts +1 -0
  307. package/esm/geometry/shape/interval/line.js +54 -0
  308. package/esm/geometry/shape/interval/line.js.map +1 -0
  309. package/esm/geometry/shape/interval/pyramid.d.ts +1 -0
  310. package/esm/geometry/shape/interval/pyramid.js +31 -0
  311. package/esm/geometry/shape/interval/pyramid.js.map +1 -0
  312. package/esm/geometry/shape/interval/tick.d.ts +1 -0
  313. package/esm/geometry/shape/interval/tick.js +77 -0
  314. package/esm/geometry/shape/interval/tick.js.map +1 -0
  315. package/esm/geometry/shape/interval/util.d.ts +55 -0
  316. package/esm/geometry/shape/interval/util.js +311 -0
  317. package/esm/geometry/shape/interval/util.js.map +1 -0
  318. package/esm/geometry/shape/line/index.d.ts +8 -0
  319. package/esm/geometry/shape/line/index.js +105 -0
  320. package/esm/geometry/shape/line/index.js.map +1 -0
  321. package/esm/geometry/shape/line/step.d.ts +1 -0
  322. package/esm/geometry/shape/line/step.js +84 -0
  323. package/esm/geometry/shape/line/step.js.map +1 -0
  324. package/esm/geometry/shape/line/util.d.ts +16 -0
  325. package/esm/geometry/shape/line/util.js +83 -0
  326. package/esm/geometry/shape/line/util.js.map +1 -0
  327. package/esm/geometry/shape/point/hollow.d.ts +1 -0
  328. package/esm/geometry/shape/point/hollow.js +24 -0
  329. package/esm/geometry/shape/point/hollow.js.map +1 -0
  330. package/esm/geometry/shape/point/image.d.ts +1 -0
  331. package/esm/geometry/shape/point/image.js +48 -0
  332. package/esm/geometry/shape/point/image.js.map +1 -0
  333. package/esm/geometry/shape/point/index.d.ts +2 -0
  334. package/esm/geometry/shape/point/index.js +32 -0
  335. package/esm/geometry/shape/point/index.js.map +1 -0
  336. package/esm/geometry/shape/point/solid.d.ts +1 -0
  337. package/esm/geometry/shape/point/solid.js +23 -0
  338. package/esm/geometry/shape/point/solid.js.map +1 -0
  339. package/esm/geometry/shape/point/util.d.ts +15 -0
  340. package/esm/geometry/shape/point/util.js +39 -0
  341. package/esm/geometry/shape/point/util.js.map +1 -0
  342. package/esm/geometry/shape/polygon/index.d.ts +2 -0
  343. package/esm/geometry/shape/polygon/index.js +65 -0
  344. package/esm/geometry/shape/polygon/index.js.map +1 -0
  345. package/esm/geometry/shape/polygon/square.d.ts +1 -0
  346. package/esm/geometry/shape/polygon/square.js +44 -0
  347. package/esm/geometry/shape/polygon/square.js.map +1 -0
  348. package/esm/geometry/shape/schema/box.d.ts +1 -0
  349. package/esm/geometry/shape/schema/box.js +142 -0
  350. package/esm/geometry/shape/schema/box.js.map +1 -0
  351. package/esm/geometry/shape/schema/candle.d.ts +1 -0
  352. package/esm/geometry/shape/schema/candle.js +80 -0
  353. package/esm/geometry/shape/schema/candle.js.map +1 -0
  354. package/esm/geometry/shape/schema/index.d.ts +2 -0
  355. package/esm/geometry/shape/schema/index.js +6 -0
  356. package/esm/geometry/shape/schema/index.js.map +1 -0
  357. package/esm/geometry/shape/util/get-path-points.d.ts +38 -0
  358. package/esm/geometry/shape/util/get-path-points.js +131 -0
  359. package/esm/geometry/shape/util/get-path-points.js.map +1 -0
  360. package/esm/geometry/shape/util/get-style.d.ts +18 -0
  361. package/esm/geometry/shape/util/get-style.js +47 -0
  362. package/esm/geometry/shape/util/get-style.js.map +1 -0
  363. package/esm/geometry/shape/util/path.d.ts +32 -0
  364. package/esm/geometry/shape/util/path.js +311 -0
  365. package/esm/geometry/shape/util/path.js.map +1 -0
  366. package/esm/geometry/shape/util/split-points.d.ts +13 -0
  367. package/esm/geometry/shape/util/split-points.js +24 -0
  368. package/esm/geometry/shape/util/split-points.js.map +1 -0
  369. package/esm/geometry/shape/violin/hollow.d.ts +1 -0
  370. package/esm/geometry/shape/violin/hollow.js +51 -0
  371. package/esm/geometry/shape/violin/hollow.js.map +1 -0
  372. package/esm/geometry/shape/violin/index.d.ts +2 -0
  373. package/esm/geometry/shape/violin/index.js +60 -0
  374. package/esm/geometry/shape/violin/index.js.map +1 -0
  375. package/esm/geometry/shape/violin/smooth.d.ts +1 -0
  376. package/esm/geometry/shape/violin/smooth.js +28 -0
  377. package/esm/geometry/shape/violin/smooth.js.map +1 -0
  378. package/esm/geometry/util/diff.d.ts +11 -0
  379. package/esm/geometry/util/diff.js +30 -0
  380. package/esm/geometry/util/diff.js.map +1 -0
  381. package/esm/geometry/util/get-shape-type.d.ts +8 -0
  382. package/esm/geometry/util/get-shape-type.js +16 -0
  383. package/esm/geometry/util/get-shape-type.js.map +1 -0
  384. package/esm/geometry/util/group-data.d.ts +3 -0
  385. package/esm/geometry/util/group-data.js +31 -0
  386. package/esm/geometry/util/group-data.js.map +1 -0
  387. package/esm/geometry/util/is-model-change.d.ts +9 -0
  388. package/esm/geometry/util/is-model-change.js +14 -0
  389. package/esm/geometry/util/is-model-change.js.map +1 -0
  390. package/esm/geometry/util/parse-fields.d.ts +2 -0
  391. package/esm/geometry/util/parse-fields.js +9 -0
  392. package/esm/geometry/util/parse-fields.js.map +1 -0
  393. package/esm/geometry/util/shape-size.d.ts +2 -0
  394. package/esm/geometry/util/shape-size.js +124 -0
  395. package/esm/geometry/util/shape-size.js.map +1 -0
  396. package/esm/geometry/violin.d.ts +25 -0
  397. package/esm/geometry/violin.js +67 -0
  398. package/esm/geometry/violin.js.map +1 -0
  399. package/esm/index.d.ts +107 -0
  400. package/esm/index.js +581 -0
  401. package/esm/index.js.map +1 -0
  402. package/esm/interaction/action/active-region.d.ts +33 -0
  403. package/esm/interaction/action/active-region.js +198 -0
  404. package/esm/interaction/action/active-region.js.map +1 -0
  405. package/esm/interaction/action/base.d.ts +29 -0
  406. package/esm/interaction/action/base.js +36 -0
  407. package/esm/interaction/action/base.js.map +1 -0
  408. package/esm/interaction/action/callback.d.ts +17 -0
  409. package/esm/interaction/action/callback.js +27 -0
  410. package/esm/interaction/action/callback.js.map +1 -0
  411. package/esm/interaction/action/component/list-active.d.ts +14 -0
  412. package/esm/interaction/action/component/list-active.js +24 -0
  413. package/esm/interaction/action/component/list-active.js.map +1 -0
  414. package/esm/interaction/action/component/list-checked.d.ts +30 -0
  415. package/esm/interaction/action/component/list-checked.js +82 -0
  416. package/esm/interaction/action/component/list-checked.js.map +1 -0
  417. package/esm/interaction/action/component/list-focus.d.ts +5 -0
  418. package/esm/interaction/action/component/list-focus.js +55 -0
  419. package/esm/interaction/action/component/list-focus.js.map +1 -0
  420. package/esm/interaction/action/component/list-highlight-util.d.ts +7 -0
  421. package/esm/interaction/action/component/list-highlight-util.js +20 -0
  422. package/esm/interaction/action/component/list-highlight-util.js.map +1 -0
  423. package/esm/interaction/action/component/list-highlight.d.ts +20 -0
  424. package/esm/interaction/action/component/list-highlight.js +97 -0
  425. package/esm/interaction/action/component/list-highlight.js.map +1 -0
  426. package/esm/interaction/action/component/list-radio.d.ts +24 -0
  427. package/esm/interaction/action/component/list-radio.js +116 -0
  428. package/esm/interaction/action/component/list-radio.js.map +1 -0
  429. package/esm/interaction/action/component/list-selected.d.ts +10 -0
  430. package/esm/interaction/action/component/list-selected.js +20 -0
  431. package/esm/interaction/action/component/list-selected.js.map +1 -0
  432. package/esm/interaction/action/component/list-state.d.ts +46 -0
  433. package/esm/interaction/action/component/list-state.js +167 -0
  434. package/esm/interaction/action/component/list-state.js.map +1 -0
  435. package/esm/interaction/action/component/list-unchecked.d.ts +13 -0
  436. package/esm/interaction/action/component/list-unchecked.js +23 -0
  437. package/esm/interaction/action/component/list-unchecked.js.map +1 -0
  438. package/esm/interaction/action/component/tooltip/ellipsis-text.d.ts +25 -0
  439. package/esm/interaction/action/component/tooltip/ellipsis-text.js +93 -0
  440. package/esm/interaction/action/component/tooltip/ellipsis-text.js.map +1 -0
  441. package/esm/interaction/action/component/tooltip/geometry.d.ts +24 -0
  442. package/esm/interaction/action/component/tooltip/geometry.js +71 -0
  443. package/esm/interaction/action/component/tooltip/geometry.js.map +1 -0
  444. package/esm/interaction/action/component/tooltip/sibling.d.ts +21 -0
  445. package/esm/interaction/action/component/tooltip/sibling.js +39 -0
  446. package/esm/interaction/action/component/tooltip/sibling.js.map +1 -0
  447. package/esm/interaction/action/cursor.d.ts +69 -0
  448. package/esm/interaction/action/cursor.js +113 -0
  449. package/esm/interaction/action/cursor.js.map +1 -0
  450. package/esm/interaction/action/data/filter.d.ts +13 -0
  451. package/esm/interaction/action/data/filter.js +66 -0
  452. package/esm/interaction/action/data/filter.js.map +1 -0
  453. package/esm/interaction/action/data/range-filter.d.ts +56 -0
  454. package/esm/interaction/action/data/range-filter.js +163 -0
  455. package/esm/interaction/action/data/range-filter.js.map +1 -0
  456. package/esm/interaction/action/data/sibling-filter.d.ts +22 -0
  457. package/esm/interaction/action/data/sibling-filter.js +39 -0
  458. package/esm/interaction/action/data/sibling-filter.js.map +1 -0
  459. package/esm/interaction/action/element/active.d.ts +14 -0
  460. package/esm/interaction/action/element/active.js +24 -0
  461. package/esm/interaction/action/element/active.js.map +1 -0
  462. package/esm/interaction/action/element/filter.d.ts +20 -0
  463. package/esm/interaction/action/element/filter.js +89 -0
  464. package/esm/interaction/action/element/filter.js.map +1 -0
  465. package/esm/interaction/action/element/highlight-by-color.d.ts +10 -0
  466. package/esm/interaction/action/element/highlight-by-color.js +30 -0
  467. package/esm/interaction/action/element/highlight-by-color.js.map +1 -0
  468. package/esm/interaction/action/element/highlight-by-x.d.ts +15 -0
  469. package/esm/interaction/action/element/highlight-by-x.js +51 -0
  470. package/esm/interaction/action/element/highlight-by-x.js.map +1 -0
  471. package/esm/interaction/action/element/highlight-util.d.ts +18 -0
  472. package/esm/interaction/action/element/highlight-util.js +45 -0
  473. package/esm/interaction/action/element/highlight-util.js.map +1 -0
  474. package/esm/interaction/action/element/highlight.d.ts +21 -0
  475. package/esm/interaction/action/element/highlight.js +93 -0
  476. package/esm/interaction/action/element/highlight.js.map +1 -0
  477. package/esm/interaction/action/element/link-by-color.d.ts +51 -0
  478. package/esm/interaction/action/element/link-by-color.js +156 -0
  479. package/esm/interaction/action/element/link-by-color.js.map +1 -0
  480. package/esm/interaction/action/element/range-active.d.ts +13 -0
  481. package/esm/interaction/action/element/range-active.js +23 -0
  482. package/esm/interaction/action/element/range-active.js.map +1 -0
  483. package/esm/interaction/action/element/range-highlight.d.ts +27 -0
  484. package/esm/interaction/action/element/range-highlight.js +54 -0
  485. package/esm/interaction/action/element/range-highlight.js.map +1 -0
  486. package/esm/interaction/action/element/range-selected.d.ts +13 -0
  487. package/esm/interaction/action/element/range-selected.js +23 -0
  488. package/esm/interaction/action/element/range-selected.js.map +1 -0
  489. package/esm/interaction/action/element/range-state.d.ts +38 -0
  490. package/esm/interaction/action/element/range-state.js +164 -0
  491. package/esm/interaction/action/element/range-state.js.map +1 -0
  492. package/esm/interaction/action/element/selected.d.ts +14 -0
  493. package/esm/interaction/action/element/selected.js +24 -0
  494. package/esm/interaction/action/element/selected.js.map +1 -0
  495. package/esm/interaction/action/element/sibling-filter.d.ts +19 -0
  496. package/esm/interaction/action/element/sibling-filter.js +93 -0
  497. package/esm/interaction/action/element/sibling-filter.js.map +1 -0
  498. package/esm/interaction/action/element/single-active.d.ts +13 -0
  499. package/esm/interaction/action/element/single-active.js +23 -0
  500. package/esm/interaction/action/element/single-active.js.map +1 -0
  501. package/esm/interaction/action/element/single-highlight.d.ts +16 -0
  502. package/esm/interaction/action/element/single-highlight.js +35 -0
  503. package/esm/interaction/action/element/single-highlight.js.map +1 -0
  504. package/esm/interaction/action/element/single-selected.d.ts +13 -0
  505. package/esm/interaction/action/element/single-selected.js +23 -0
  506. package/esm/interaction/action/element/single-selected.js.map +1 -0
  507. package/esm/interaction/action/element/single-state.d.ts +18 -0
  508. package/esm/interaction/action/element/single-state.js +53 -0
  509. package/esm/interaction/action/element/single-state.js.map +1 -0
  510. package/esm/interaction/action/element/state-base.d.ts +39 -0
  511. package/esm/interaction/action/element/state-base.js +59 -0
  512. package/esm/interaction/action/element/state-base.js.map +1 -0
  513. package/esm/interaction/action/element/state.d.ts +28 -0
  514. package/esm/interaction/action/element/state.js +99 -0
  515. package/esm/interaction/action/element/state.js.map +1 -0
  516. package/esm/interaction/action/index.d.ts +2 -0
  517. package/esm/interaction/action/index.js +3 -0
  518. package/esm/interaction/action/index.js.map +1 -0
  519. package/esm/interaction/action/mask/base.d.ts +62 -0
  520. package/esm/interaction/action/mask/base.js +169 -0
  521. package/esm/interaction/action/mask/base.js.map +1 -0
  522. package/esm/interaction/action/mask/circle.d.ts +14 -0
  523. package/esm/interaction/action/mask/circle.js +37 -0
  524. package/esm/interaction/action/mask/circle.js.map +1 -0
  525. package/esm/interaction/action/mask/dim-rect.d.ts +11 -0
  526. package/esm/interaction/action/mask/dim-rect.js +62 -0
  527. package/esm/interaction/action/mask/dim-rect.js.map +1 -0
  528. package/esm/interaction/action/mask/path.d.ts +16 -0
  529. package/esm/interaction/action/mask/path.js +44 -0
  530. package/esm/interaction/action/mask/path.js.map +1 -0
  531. package/esm/interaction/action/mask/rect.d.ts +17 -0
  532. package/esm/interaction/action/mask/rect.js +39 -0
  533. package/esm/interaction/action/mask/rect.js.map +1 -0
  534. package/esm/interaction/action/mask/smooth-path.d.ts +9 -0
  535. package/esm/interaction/action/mask/smooth-path.js +21 -0
  536. package/esm/interaction/action/mask/smooth-path.js.map +1 -0
  537. package/esm/interaction/action/register.d.ts +36 -0
  538. package/esm/interaction/action/register.js +60 -0
  539. package/esm/interaction/action/register.js.map +1 -0
  540. package/esm/interaction/action/util.d.ts +140 -0
  541. package/esm/interaction/action/util.js +361 -0
  542. package/esm/interaction/action/util.js.map +1 -0
  543. package/esm/interaction/action/view/button.d.ts +25 -0
  544. package/esm/interaction/action/view/button.js +116 -0
  545. package/esm/interaction/action/view/button.js.map +1 -0
  546. package/esm/interaction/action/view/drag.d.ts +24 -0
  547. package/esm/interaction/action/view/drag.js +73 -0
  548. package/esm/interaction/action/view/drag.js.map +1 -0
  549. package/esm/interaction/action/view/mousewheel-scroll.d.ts +5 -0
  550. package/esm/interaction/action/view/mousewheel-scroll.js +35 -0
  551. package/esm/interaction/action/view/mousewheel-scroll.js.map +1 -0
  552. package/esm/interaction/action/view/move.d.ts +28 -0
  553. package/esm/interaction/action/view/move.js +80 -0
  554. package/esm/interaction/action/view/move.js.map +1 -0
  555. package/esm/interaction/action/view/scale-transform.d.ts +18 -0
  556. package/esm/interaction/action/view/scale-transform.js +51 -0
  557. package/esm/interaction/action/view/scale-transform.js.map +1 -0
  558. package/esm/interaction/action/view/scale-translate.d.ts +30 -0
  559. package/esm/interaction/action/view/scale-translate.js +112 -0
  560. package/esm/interaction/action/view/scale-translate.js.map +1 -0
  561. package/esm/interaction/action/view/scale-zoom.d.ts +20 -0
  562. package/esm/interaction/action/view/scale-zoom.js +83 -0
  563. package/esm/interaction/action/view/scale-zoom.js.map +1 -0
  564. package/esm/interaction/context.d.ts +65 -0
  565. package/esm/interaction/context.js +142 -0
  566. package/esm/interaction/context.js.map +1 -0
  567. package/esm/interaction/grammar-interaction.d.ts +158 -0
  568. package/esm/interaction/grammar-interaction.js +285 -0
  569. package/esm/interaction/grammar-interaction.js.map +1 -0
  570. package/esm/interaction/index.d.ts +25 -0
  571. package/esm/interaction/index.js +43 -0
  572. package/esm/interaction/index.js.map +1 -0
  573. package/esm/interaction/interaction.d.ts +29 -0
  574. package/esm/interaction/interaction.js +32 -0
  575. package/esm/interaction/interaction.js.map +1 -0
  576. package/esm/interface.d.ts +2264 -0
  577. package/esm/interface.js +2 -0
  578. package/esm/interface.js.map +1 -0
  579. package/esm/theme/index.d.ts +12 -0
  580. package/esm/theme/index.js +23 -0
  581. package/esm/theme/index.js.map +1 -0
  582. package/esm/theme/style-sheet/dark.d.ts +825 -0
  583. package/esm/theme/style-sheet/dark.js +496 -0
  584. package/esm/theme/style-sheet/dark.js.map +1 -0
  585. package/esm/theme/style-sheet/light.d.ts +817 -0
  586. package/esm/theme/style-sheet/light.js +492 -0
  587. package/esm/theme/style-sheet/light.js.map +1 -0
  588. package/esm/theme/util/create-by-style-sheet.d.ts +6 -0
  589. package/esm/theme/util/create-by-style-sheet.js +1422 -0
  590. package/esm/theme/util/create-by-style-sheet.js.map +1 -0
  591. package/esm/theme/util/create-theme.d.ts +6 -0
  592. package/esm/theme/util/create-theme.js +12 -0
  593. package/esm/theme/util/create-theme.js.map +1 -0
  594. package/esm/theme/util/index.d.ts +1 -0
  595. package/esm/theme/util/index.js +2 -0
  596. package/esm/theme/util/index.js.map +1 -0
  597. package/esm/util/annotation.d.ts +7 -0
  598. package/esm/util/annotation.js +39 -0
  599. package/esm/util/annotation.js.map +1 -0
  600. package/esm/util/attr.d.ts +10 -0
  601. package/esm/util/attr.js +25 -0
  602. package/esm/util/attr.js.map +1 -0
  603. package/esm/util/axis.d.ts +100 -0
  604. package/esm/util/axis.js +236 -0
  605. package/esm/util/axis.js.map +1 -0
  606. package/esm/util/bbox.d.ts +105 -0
  607. package/esm/util/bbox.js +282 -0
  608. package/esm/util/bbox.js.map +1 -0
  609. package/esm/util/collision-detect.d.ts +16 -0
  610. package/esm/util/collision-detect.js +127 -0
  611. package/esm/util/collision-detect.js.map +1 -0
  612. package/esm/util/color.d.ts +1 -0
  613. package/esm/util/color.js +18 -0
  614. package/esm/util/color.js.map +1 -0
  615. package/esm/util/context.d.ts +4 -0
  616. package/esm/util/context.js +11 -0
  617. package/esm/util/context.js.map +1 -0
  618. package/esm/util/coordinate.d.ts +86 -0
  619. package/esm/util/coordinate.js +147 -0
  620. package/esm/util/coordinate.js.map +1 -0
  621. package/esm/util/direction.d.ts +19 -0
  622. package/esm/util/direction.js +120 -0
  623. package/esm/util/direction.js.map +1 -0
  624. package/esm/util/dom.d.ts +19 -0
  625. package/esm/util/dom.js +61 -0
  626. package/esm/util/dom.js.map +1 -0
  627. package/esm/util/event.d.ts +8 -0
  628. package/esm/util/event.js +14 -0
  629. package/esm/util/event.js.map +1 -0
  630. package/esm/util/facet.d.ts +16 -0
  631. package/esm/util/facet.js +43 -0
  632. package/esm/util/facet.js.map +1 -0
  633. package/esm/util/graphics.d.ts +58 -0
  634. package/esm/util/graphics.js +203 -0
  635. package/esm/util/graphics.js.map +1 -0
  636. package/esm/util/grid.d.ts +36 -0
  637. package/esm/util/grid.js +118 -0
  638. package/esm/util/grid.js.map +1 -0
  639. package/esm/util/helper.d.ts +34 -0
  640. package/esm/util/helper.js +72 -0
  641. package/esm/util/helper.js.map +1 -0
  642. package/esm/util/legend.d.ts +45 -0
  643. package/esm/util/legend.js +145 -0
  644. package/esm/util/legend.js.map +1 -0
  645. package/esm/util/marker.d.ts +10 -0
  646. package/esm/util/marker.js +58 -0
  647. package/esm/util/marker.js.map +1 -0
  648. package/esm/util/padding.d.ts +14 -0
  649. package/esm/util/padding.js +40 -0
  650. package/esm/util/padding.js.map +1 -0
  651. package/esm/util/scale.d.ts +42 -0
  652. package/esm/util/scale.js +128 -0
  653. package/esm/util/scale.js.map +1 -0
  654. package/esm/util/stat.d.ts +10 -0
  655. package/esm/util/stat.js +36 -0
  656. package/esm/util/stat.js.map +1 -0
  657. package/esm/util/text.d.ts +23 -0
  658. package/esm/util/text.js +84 -0
  659. package/esm/util/text.js.map +1 -0
  660. package/esm/util/tooltip.d.ts +26 -0
  661. package/esm/util/tooltip.js +419 -0
  662. package/esm/util/tooltip.js.map +1 -0
  663. package/esm/util/transform.d.ts +33 -0
  664. package/esm/util/transform.js +61 -0
  665. package/esm/util/transform.js.map +1 -0
  666. package/esm/util/types.d.ts +6 -0
  667. package/esm/util/types.js +2 -0
  668. package/esm/util/types.js.map +1 -0
  669. package/lib/animate/animation/fade.d.ts +21 -0
  670. package/lib/animate/animation/fade.js +47 -0
  671. package/lib/animate/animation/fade.js.map +1 -0
  672. package/lib/animate/animation/grow-in.d.ts +30 -0
  673. package/lib/animate/animation/grow-in.js +44 -0
  674. package/lib/animate/animation/grow-in.js.map +1 -0
  675. package/lib/animate/animation/index.d.ts +16 -0
  676. package/lib/animate/animation/index.js +22 -0
  677. package/lib/animate/animation/index.js.map +1 -0
  678. package/lib/animate/animation/path-in.d.ts +12 -0
  679. package/lib/animate/animation/path-in.js +25 -0
  680. package/lib/animate/animation/path-in.js.map +1 -0
  681. package/lib/animate/animation/position-update.d.ts +11 -0
  682. package/lib/animate/animation/position-update.js +28 -0
  683. package/lib/animate/animation/position-update.js.map +1 -0
  684. package/lib/animate/animation/scale-in.d.ts +19 -0
  685. package/lib/animate/animation/scale-in.js +65 -0
  686. package/lib/animate/animation/scale-in.js.map +1 -0
  687. package/lib/animate/animation/sector-path-update.d.ts +11 -0
  688. package/lib/animate/animation/sector-path-update.js +135 -0
  689. package/lib/animate/animation/sector-path-update.js.map +1 -0
  690. package/lib/animate/animation/util.d.ts +19 -0
  691. package/lib/animate/animation/util.js +93 -0
  692. package/lib/animate/animation/util.js.map +1 -0
  693. package/lib/animate/animation/wave-in.d.ts +13 -0
  694. package/lib/animate/animation/wave-in.js +30 -0
  695. package/lib/animate/animation/wave-in.js.map +1 -0
  696. package/lib/animate/animation/zoom.d.ts +21 -0
  697. package/lib/animate/animation/zoom.js +71 -0
  698. package/lib/animate/animation/zoom.js.map +1 -0
  699. package/lib/animate/index.d.ts +48 -0
  700. package/lib/animate/index.js +255 -0
  701. package/lib/animate/index.js.map +1 -0
  702. package/lib/animate/interface.d.ts +12 -0
  703. package/lib/animate/interface.js +3 -0
  704. package/lib/animate/interface.js.map +1 -0
  705. package/lib/api.d.ts +2 -0
  706. package/lib/api.js +7 -0
  707. package/lib/api.js.map +1 -0
  708. package/lib/base.d.ts +33 -0
  709. package/lib/base.js +57 -0
  710. package/lib/base.js.map +1 -0
  711. package/lib/chart/chart.d.ts +61 -0
  712. package/lib/chart/chart.js +159 -0
  713. package/lib/chart/chart.js.map +1 -0
  714. package/lib/chart/controller/annotation.d.ts +162 -0
  715. package/lib/chart/controller/annotation.js +583 -0
  716. package/lib/chart/controller/annotation.js.map +1 -0
  717. package/lib/chart/controller/axis.d.ts +93 -0
  718. package/lib/chart/controller/axis.js +580 -0
  719. package/lib/chart/controller/axis.js.map +1 -0
  720. package/lib/chart/controller/base.d.ts +64 -0
  721. package/lib/chart/controller/base.js +65 -0
  722. package/lib/chart/controller/base.js.map +1 -0
  723. package/lib/chart/controller/coordinate.d.ts +74 -0
  724. package/lib/chart/controller/coordinate.js +147 -0
  725. package/lib/chart/controller/coordinate.js.map +1 -0
  726. package/lib/chart/controller/gesture.d.ts +37 -0
  727. package/lib/chart/controller/gesture.js +260 -0
  728. package/lib/chart/controller/gesture.js.map +1 -0
  729. package/lib/chart/controller/index.d.ts +25 -0
  730. package/lib/chart/controller/index.js +41 -0
  731. package/lib/chart/controller/index.js.map +1 -0
  732. package/lib/chart/controller/legend.d.ts +106 -0
  733. package/lib/chart/controller/legend.js +486 -0
  734. package/lib/chart/controller/legend.js.map +1 -0
  735. package/lib/chart/controller/scrollbar.d.ts +64 -0
  736. package/lib/chart/controller/scrollbar.js +318 -0
  737. package/lib/chart/controller/scrollbar.js.map +1 -0
  738. package/lib/chart/controller/slider.d.ts +88 -0
  739. package/lib/chart/controller/slider.js +298 -0
  740. package/lib/chart/controller/slider.js.map +1 -0
  741. package/lib/chart/controller/tooltip.d.ts +68 -0
  742. package/lib/chart/controller/tooltip.js +646 -0
  743. package/lib/chart/controller/tooltip.js.map +1 -0
  744. package/lib/chart/event.d.ts +47 -0
  745. package/lib/chart/event.js +93 -0
  746. package/lib/chart/event.js.map +1 -0
  747. package/lib/chart/index.d.ts +4 -0
  748. package/lib/chart/index.js +16 -0
  749. package/lib/chart/index.js.map +1 -0
  750. package/lib/chart/layout/auto.d.ts +8 -0
  751. package/lib/chart/layout/auto.js +68 -0
  752. package/lib/chart/layout/auto.js.map +1 -0
  753. package/lib/chart/layout/constraint/bounds.d.ts +32 -0
  754. package/lib/chart/layout/constraint/bounds.js +33 -0
  755. package/lib/chart/layout/constraint/bounds.js.map +1 -0
  756. package/lib/chart/layout/constraint/constraint.d.ts +31 -0
  757. package/lib/chart/layout/constraint/constraint.js +84 -0
  758. package/lib/chart/layout/constraint/constraint.js.map +1 -0
  759. package/lib/chart/layout/constraint/gauss.d.ts +11 -0
  760. package/lib/chart/layout/constraint/gauss.js +68 -0
  761. package/lib/chart/layout/constraint/gauss.js.map +1 -0
  762. package/lib/chart/layout/constraint/index.d.ts +5 -0
  763. package/lib/chart/layout/constraint/index.js +38 -0
  764. package/lib/chart/layout/constraint/index.js.map +1 -0
  765. package/lib/chart/layout/constraint/solver.d.ts +40 -0
  766. package/lib/chart/layout/constraint/solver.js +80 -0
  767. package/lib/chart/layout/constraint/solver.js.map +1 -0
  768. package/lib/chart/layout/constraint/types.d.ts +21 -0
  769. package/lib/chart/layout/constraint/types.js +16 -0
  770. package/lib/chart/layout/constraint/types.js.map +1 -0
  771. package/lib/chart/layout/constraint/variable.d.ts +24 -0
  772. package/lib/chart/layout/constraint/variable.js +31 -0
  773. package/lib/chart/layout/constraint/variable.js.map +1 -0
  774. package/lib/chart/layout/index.d.ts +15 -0
  775. package/lib/chart/layout/index.js +29 -0
  776. package/lib/chart/layout/index.js.map +1 -0
  777. package/lib/chart/layout/padding-cal.d.ts +53 -0
  778. package/lib/chart/layout/padding-cal.js +111 -0
  779. package/lib/chart/layout/padding-cal.js.map +1 -0
  780. package/lib/chart/util/scale-pool.d.ts +57 -0
  781. package/lib/chart/util/scale-pool.js +215 -0
  782. package/lib/chart/util/scale-pool.js.map +1 -0
  783. package/lib/chart/util/sync-view-padding.d.ts +9 -0
  784. package/lib/chart/util/sync-view-padding.js +18 -0
  785. package/lib/chart/util/sync-view-padding.js.map +1 -0
  786. package/lib/chart/view.d.ts +747 -0
  787. package/lib/chart/view.js +1637 -0
  788. package/lib/chart/view.js.map +1 -0
  789. package/lib/component/labels.d.ts +47 -0
  790. package/lib/component/labels.js +276 -0
  791. package/lib/component/labels.js.map +1 -0
  792. package/lib/component/update-label.d.ts +21 -0
  793. package/lib/component/update-label.js +61 -0
  794. package/lib/component/update-label.js.map +1 -0
  795. package/lib/constant.d.ts +122 -0
  796. package/lib/constant.js +137 -0
  797. package/lib/constant.js.map +1 -0
  798. package/lib/core.d.ts +46 -0
  799. package/lib/core.js +101 -0
  800. package/lib/core.js.map +1 -0
  801. package/lib/dependents.d.ts +21 -0
  802. package/lib/dependents.js +55 -0
  803. package/lib/dependents.js.map +1 -0
  804. package/lib/engine/index.d.ts +13 -0
  805. package/lib/engine/index.js +27 -0
  806. package/lib/engine/index.js.map +1 -0
  807. package/lib/facet/circle.d.ts +36 -0
  808. package/lib/facet/circle.js +121 -0
  809. package/lib/facet/circle.js.map +1 -0
  810. package/lib/facet/facet.d.ts +165 -0
  811. package/lib/facet/facet.js +294 -0
  812. package/lib/facet/facet.js.map +1 -0
  813. package/lib/facet/index.d.ts +13 -0
  814. package/lib/facet/index.js +28 -0
  815. package/lib/facet/index.js.map +1 -0
  816. package/lib/facet/list.d.ts +46 -0
  817. package/lib/facet/list.js +136 -0
  818. package/lib/facet/list.js.map +1 -0
  819. package/lib/facet/matrix.d.ts +34 -0
  820. package/lib/facet/matrix.js +121 -0
  821. package/lib/facet/matrix.js.map +1 -0
  822. package/lib/facet/mirror.d.ts +31 -0
  823. package/lib/facet/mirror.js +146 -0
  824. package/lib/facet/mirror.js.map +1 -0
  825. package/lib/facet/rect.d.ts +35 -0
  826. package/lib/facet/rect.js +143 -0
  827. package/lib/facet/rect.js.map +1 -0
  828. package/lib/facet/tree.d.ts +40 -0
  829. package/lib/facet/tree.js +290 -0
  830. package/lib/facet/tree.js.map +1 -0
  831. package/lib/geometry/area.d.ts +46 -0
  832. package/lib/geometry/area.js +64 -0
  833. package/lib/geometry/area.js.map +1 -0
  834. package/lib/geometry/base.d.ts +793 -0
  835. package/lib/geometry/base.js +1489 -0
  836. package/lib/geometry/base.js.map +1 -0
  837. package/lib/geometry/edge.d.ts +15 -0
  838. package/lib/geometry/edge.js +26 -0
  839. package/lib/geometry/edge.js.map +1 -0
  840. package/lib/geometry/element/index.d.ts +127 -0
  841. package/lib/geometry/element/index.js +438 -0
  842. package/lib/geometry/element/index.js.map +1 -0
  843. package/lib/geometry/heatmap.d.ts +31 -0
  844. package/lib/geometry/heatmap.js +192 -0
  845. package/lib/geometry/heatmap.js.map +1 -0
  846. package/lib/geometry/interval.d.ts +41 -0
  847. package/lib/geometry/interval.js +100 -0
  848. package/lib/geometry/interval.js.map +1 -0
  849. package/lib/geometry/label/base.d.ts +76 -0
  850. package/lib/geometry/label/base.js +406 -0
  851. package/lib/geometry/label/base.js.map +1 -0
  852. package/lib/geometry/label/index.d.ts +38 -0
  853. package/lib/geometry/label/index.js +42 -0
  854. package/lib/geometry/label/index.js.map +1 -0
  855. package/lib/geometry/label/interface.d.ts +50 -0
  856. package/lib/geometry/label/interface.js +3 -0
  857. package/lib/geometry/label/interface.js.map +1 -0
  858. package/lib/geometry/label/interval.d.ts +27 -0
  859. package/lib/geometry/label/interval.js +148 -0
  860. package/lib/geometry/label/interval.js.map +1 -0
  861. package/lib/geometry/label/layout/adjust-color.d.ts +3 -0
  862. package/lib/geometry/label/layout/adjust-color.js +40 -0
  863. package/lib/geometry/label/layout/adjust-color.js.map +1 -0
  864. package/lib/geometry/label/layout/hide-overlap.d.ts +8 -0
  865. package/lib/geometry/label/layout/hide-overlap.js +33 -0
  866. package/lib/geometry/label/layout/hide-overlap.js.map +1 -0
  867. package/lib/geometry/label/layout/interval/adjust-position.d.ts +9 -0
  868. package/lib/geometry/label/layout/interval/adjust-position.js +65 -0
  869. package/lib/geometry/label/layout/interval/adjust-position.js.map +1 -0
  870. package/lib/geometry/label/layout/interval/hide-overlap.d.ts +9 -0
  871. package/lib/geometry/label/layout/interval/hide-overlap.js +82 -0
  872. package/lib/geometry/label/layout/interval/hide-overlap.js.map +1 -0
  873. package/lib/geometry/label/layout/limit-in-canvas.d.ts +9 -0
  874. package/lib/geometry/label/layout/limit-in-canvas.js +48 -0
  875. package/lib/geometry/label/layout/limit-in-canvas.js.map +1 -0
  876. package/lib/geometry/label/layout/limit-in-plot.d.ts +18 -0
  877. package/lib/geometry/label/layout/limit-in-plot.js +79 -0
  878. package/lib/geometry/label/layout/limit-in-plot.js.map +1 -0
  879. package/lib/geometry/label/layout/limit-in-shape.d.ts +7 -0
  880. package/lib/geometry/label/layout/limit-in-shape.js +22 -0
  881. package/lib/geometry/label/layout/limit-in-shape.js.map +1 -0
  882. package/lib/geometry/label/layout/overlap.d.ts +15 -0
  883. package/lib/geometry/label/layout/overlap.js +228 -0
  884. package/lib/geometry/label/layout/overlap.js.map +1 -0
  885. package/lib/geometry/label/layout/path/adjust-position.d.ts +17 -0
  886. package/lib/geometry/label/layout/path/adjust-position.js +98 -0
  887. package/lib/geometry/label/layout/path/adjust-position.js.map +1 -0
  888. package/lib/geometry/label/layout/pie/distribute.d.ts +3 -0
  889. package/lib/geometry/label/layout/pie/distribute.js +189 -0
  890. package/lib/geometry/label/layout/pie/distribute.js.map +1 -0
  891. package/lib/geometry/label/layout/pie/outer.d.ts +6 -0
  892. package/lib/geometry/label/layout/pie/outer.js +211 -0
  893. package/lib/geometry/label/layout/pie/outer.js.map +1 -0
  894. package/lib/geometry/label/layout/pie/spider.d.ts +7 -0
  895. package/lib/geometry/label/layout/pie/spider.js +185 -0
  896. package/lib/geometry/label/layout/pie/spider.js.map +1 -0
  897. package/lib/geometry/label/layout/pie/util.d.ts +10 -0
  898. package/lib/geometry/label/layout/pie/util.js +77 -0
  899. package/lib/geometry/label/layout/pie/util.js.map +1 -0
  900. package/lib/geometry/label/layout/point/adjust-position.d.ts +17 -0
  901. package/lib/geometry/label/layout/point/adjust-position.js +98 -0
  902. package/lib/geometry/label/layout/point/adjust-position.js.map +1 -0
  903. package/lib/geometry/label/pie.d.ts +22 -0
  904. package/lib/geometry/label/pie.js +97 -0
  905. package/lib/geometry/label/pie.js.map +1 -0
  906. package/lib/geometry/label/polar.d.ts +64 -0
  907. package/lib/geometry/label/polar.js +223 -0
  908. package/lib/geometry/label/polar.js.map +1 -0
  909. package/lib/geometry/label/util/index.d.ts +26 -0
  910. package/lib/geometry/label/util/index.js +68 -0
  911. package/lib/geometry/label/util/index.js.map +1 -0
  912. package/lib/geometry/line.d.ts +11 -0
  913. package/lib/geometry/line.js +23 -0
  914. package/lib/geometry/line.js.map +1 -0
  915. package/lib/geometry/path.d.ts +40 -0
  916. package/lib/geometry/path.js +124 -0
  917. package/lib/geometry/path.js.map +1 -0
  918. package/lib/geometry/point.d.ts +19 -0
  919. package/lib/geometry/point.js +32 -0
  920. package/lib/geometry/point.js.map +1 -0
  921. package/lib/geometry/polygon.d.ts +19 -0
  922. package/lib/geometry/polygon.js +64 -0
  923. package/lib/geometry/polygon.js.map +1 -0
  924. package/lib/geometry/schema.d.ts +18 -0
  925. package/lib/geometry/schema.js +50 -0
  926. package/lib/geometry/schema.js.map +1 -0
  927. package/lib/geometry/shape/area/index.d.ts +2 -0
  928. package/lib/geometry/shape/area/index.js +46 -0
  929. package/lib/geometry/shape/area/index.js.map +1 -0
  930. package/lib/geometry/shape/area/line.d.ts +1 -0
  931. package/lib/geometry/shape/area/line.js +33 -0
  932. package/lib/geometry/shape/area/line.js.map +1 -0
  933. package/lib/geometry/shape/area/smooth-line.d.ts +1 -0
  934. package/lib/geometry/shape/area/smooth-line.js +32 -0
  935. package/lib/geometry/shape/area/smooth-line.js.map +1 -0
  936. package/lib/geometry/shape/area/smooth.d.ts +1 -0
  937. package/lib/geometry/shape/area/smooth.js +33 -0
  938. package/lib/geometry/shape/area/smooth.js.map +1 -0
  939. package/lib/geometry/shape/area/util.d.ts +22 -0
  940. package/lib/geometry/shape/area/util.js +93 -0
  941. package/lib/geometry/shape/area/util.js.map +1 -0
  942. package/lib/geometry/shape/base.d.ts +22 -0
  943. package/lib/geometry/shape/base.js +168 -0
  944. package/lib/geometry/shape/base.js.map +1 -0
  945. package/lib/geometry/shape/constant.d.ts +4 -0
  946. package/lib/geometry/shape/constant.js +8 -0
  947. package/lib/geometry/shape/constant.js.map +1 -0
  948. package/lib/geometry/shape/edge/arc.d.ts +1 -0
  949. package/lib/geometry/shape/edge/arc.js +86 -0
  950. package/lib/geometry/shape/edge/arc.js.map +1 -0
  951. package/lib/geometry/shape/edge/index.d.ts +2 -0
  952. package/lib/geometry/shape/edge/index.js +33 -0
  953. package/lib/geometry/shape/edge/index.js.map +1 -0
  954. package/lib/geometry/shape/edge/smooth.d.ts +1 -0
  955. package/lib/geometry/shape/edge/smooth.js +32 -0
  956. package/lib/geometry/shape/edge/smooth.js.map +1 -0
  957. package/lib/geometry/shape/edge/util.d.ts +17 -0
  958. package/lib/geometry/shape/edge/util.js +37 -0
  959. package/lib/geometry/shape/edge/util.js.map +1 -0
  960. package/lib/geometry/shape/edge/vhv.d.ts +1 -0
  961. package/lib/geometry/shape/edge/vhv.js +44 -0
  962. package/lib/geometry/shape/edge/vhv.js.map +1 -0
  963. package/lib/geometry/shape/interval/funnel.d.ts +1 -0
  964. package/lib/geometry/shape/interval/funnel.js +33 -0
  965. package/lib/geometry/shape/interval/funnel.js.map +1 -0
  966. package/lib/geometry/shape/interval/hollow-rect.d.ts +1 -0
  967. package/lib/geometry/shape/interval/hollow-rect.js +53 -0
  968. package/lib/geometry/shape/interval/hollow-rect.js.map +1 -0
  969. package/lib/geometry/shape/interval/index.d.ts +3 -0
  970. package/lib/geometry/shape/interval/index.js +65 -0
  971. package/lib/geometry/shape/interval/index.js.map +1 -0
  972. package/lib/geometry/shape/interval/line.d.ts +1 -0
  973. package/lib/geometry/shape/interval/line.js +56 -0
  974. package/lib/geometry/shape/interval/line.js.map +1 -0
  975. package/lib/geometry/shape/interval/pyramid.d.ts +1 -0
  976. package/lib/geometry/shape/interval/pyramid.js +33 -0
  977. package/lib/geometry/shape/interval/pyramid.js.map +1 -0
  978. package/lib/geometry/shape/interval/tick.d.ts +1 -0
  979. package/lib/geometry/shape/interval/tick.js +79 -0
  980. package/lib/geometry/shape/interval/tick.js.map +1 -0
  981. package/lib/geometry/shape/interval/util.d.ts +55 -0
  982. package/lib/geometry/shape/interval/util.js +321 -0
  983. package/lib/geometry/shape/interval/util.js.map +1 -0
  984. package/lib/geometry/shape/line/index.d.ts +8 -0
  985. package/lib/geometry/shape/line/index.js +109 -0
  986. package/lib/geometry/shape/line/index.js.map +1 -0
  987. package/lib/geometry/shape/line/step.d.ts +1 -0
  988. package/lib/geometry/shape/line/step.js +86 -0
  989. package/lib/geometry/shape/line/step.js.map +1 -0
  990. package/lib/geometry/shape/line/util.d.ts +16 -0
  991. package/lib/geometry/shape/line/util.js +87 -0
  992. package/lib/geometry/shape/line/util.js.map +1 -0
  993. package/lib/geometry/shape/point/hollow.d.ts +1 -0
  994. package/lib/geometry/shape/point/hollow.js +26 -0
  995. package/lib/geometry/shape/point/hollow.js.map +1 -0
  996. package/lib/geometry/shape/point/image.d.ts +1 -0
  997. package/lib/geometry/shape/point/image.js +50 -0
  998. package/lib/geometry/shape/point/image.js.map +1 -0
  999. package/lib/geometry/shape/point/index.d.ts +2 -0
  1000. package/lib/geometry/shape/point/index.js +34 -0
  1001. package/lib/geometry/shape/point/index.js.map +1 -0
  1002. package/lib/geometry/shape/point/solid.d.ts +1 -0
  1003. package/lib/geometry/shape/point/solid.js +25 -0
  1004. package/lib/geometry/shape/point/solid.js.map +1 -0
  1005. package/lib/geometry/shape/point/util.d.ts +15 -0
  1006. package/lib/geometry/shape/point/util.js +43 -0
  1007. package/lib/geometry/shape/point/util.js.map +1 -0
  1008. package/lib/geometry/shape/polygon/index.d.ts +2 -0
  1009. package/lib/geometry/shape/polygon/index.js +67 -0
  1010. package/lib/geometry/shape/polygon/index.js.map +1 -0
  1011. package/lib/geometry/shape/polygon/square.d.ts +1 -0
  1012. package/lib/geometry/shape/polygon/square.js +46 -0
  1013. package/lib/geometry/shape/polygon/square.js.map +1 -0
  1014. package/lib/geometry/shape/schema/box.d.ts +1 -0
  1015. package/lib/geometry/shape/schema/box.js +144 -0
  1016. package/lib/geometry/shape/schema/box.js.map +1 -0
  1017. package/lib/geometry/shape/schema/candle.d.ts +1 -0
  1018. package/lib/geometry/shape/schema/candle.js +82 -0
  1019. package/lib/geometry/shape/schema/candle.js.map +1 -0
  1020. package/lib/geometry/shape/schema/index.d.ts +2 -0
  1021. package/lib/geometry/shape/schema/index.js +8 -0
  1022. package/lib/geometry/shape/schema/index.js.map +1 -0
  1023. package/lib/geometry/shape/util/get-path-points.d.ts +38 -0
  1024. package/lib/geometry/shape/util/get-path-points.js +137 -0
  1025. package/lib/geometry/shape/util/get-path-points.js.map +1 -0
  1026. package/lib/geometry/shape/util/get-style.d.ts +18 -0
  1027. package/lib/geometry/shape/util/get-style.js +52 -0
  1028. package/lib/geometry/shape/util/get-style.js.map +1 -0
  1029. package/lib/geometry/shape/util/path.d.ts +32 -0
  1030. package/lib/geometry/shape/util/path.js +320 -0
  1031. package/lib/geometry/shape/util/path.js.map +1 -0
  1032. package/lib/geometry/shape/util/split-points.d.ts +13 -0
  1033. package/lib/geometry/shape/util/split-points.js +28 -0
  1034. package/lib/geometry/shape/util/split-points.js.map +1 -0
  1035. package/lib/geometry/shape/violin/hollow.d.ts +1 -0
  1036. package/lib/geometry/shape/violin/hollow.js +53 -0
  1037. package/lib/geometry/shape/violin/hollow.js.map +1 -0
  1038. package/lib/geometry/shape/violin/index.d.ts +2 -0
  1039. package/lib/geometry/shape/violin/index.js +62 -0
  1040. package/lib/geometry/shape/violin/index.js.map +1 -0
  1041. package/lib/geometry/shape/violin/smooth.d.ts +1 -0
  1042. package/lib/geometry/shape/violin/smooth.js +30 -0
  1043. package/lib/geometry/shape/violin/smooth.js.map +1 -0
  1044. package/lib/geometry/util/diff.d.ts +11 -0
  1045. package/lib/geometry/util/diff.js +34 -0
  1046. package/lib/geometry/util/diff.js.map +1 -0
  1047. package/lib/geometry/util/get-shape-type.d.ts +8 -0
  1048. package/lib/geometry/util/get-shape-type.js +20 -0
  1049. package/lib/geometry/util/get-shape-type.js.map +1 -0
  1050. package/lib/geometry/util/group-data.d.ts +3 -0
  1051. package/lib/geometry/util/group-data.js +35 -0
  1052. package/lib/geometry/util/group-data.js.map +1 -0
  1053. package/lib/geometry/util/is-model-change.d.ts +9 -0
  1054. package/lib/geometry/util/is-model-change.js +18 -0
  1055. package/lib/geometry/util/is-model-change.js.map +1 -0
  1056. package/lib/geometry/util/parse-fields.d.ts +2 -0
  1057. package/lib/geometry/util/parse-fields.js +13 -0
  1058. package/lib/geometry/util/parse-fields.js.map +1 -0
  1059. package/lib/geometry/util/shape-size.d.ts +2 -0
  1060. package/lib/geometry/util/shape-size.js +128 -0
  1061. package/lib/geometry/util/shape-size.js.map +1 -0
  1062. package/lib/geometry/violin.d.ts +25 -0
  1063. package/lib/geometry/violin.js +69 -0
  1064. package/lib/geometry/violin.js.map +1 -0
  1065. package/lib/index.d.ts +107 -0
  1066. package/lib/index.js +586 -0
  1067. package/lib/index.js.map +1 -0
  1068. package/lib/interaction/action/active-region.d.ts +33 -0
  1069. package/lib/interaction/action/active-region.js +202 -0
  1070. package/lib/interaction/action/active-region.js.map +1 -0
  1071. package/lib/interaction/action/base.d.ts +29 -0
  1072. package/lib/interaction/action/base.js +38 -0
  1073. package/lib/interaction/action/base.js.map +1 -0
  1074. package/lib/interaction/action/callback.d.ts +17 -0
  1075. package/lib/interaction/action/callback.js +29 -0
  1076. package/lib/interaction/action/callback.js.map +1 -0
  1077. package/lib/interaction/action/component/list-active.d.ts +14 -0
  1078. package/lib/interaction/action/component/list-active.js +26 -0
  1079. package/lib/interaction/action/component/list-active.js.map +1 -0
  1080. package/lib/interaction/action/component/list-checked.d.ts +30 -0
  1081. package/lib/interaction/action/component/list-checked.js +84 -0
  1082. package/lib/interaction/action/component/list-checked.js.map +1 -0
  1083. package/lib/interaction/action/component/list-focus.d.ts +5 -0
  1084. package/lib/interaction/action/component/list-focus.js +57 -0
  1085. package/lib/interaction/action/component/list-focus.js.map +1 -0
  1086. package/lib/interaction/action/component/list-highlight-util.d.ts +7 -0
  1087. package/lib/interaction/action/component/list-highlight-util.js +24 -0
  1088. package/lib/interaction/action/component/list-highlight-util.js.map +1 -0
  1089. package/lib/interaction/action/component/list-highlight.d.ts +20 -0
  1090. package/lib/interaction/action/component/list-highlight.js +99 -0
  1091. package/lib/interaction/action/component/list-highlight.js.map +1 -0
  1092. package/lib/interaction/action/component/list-radio.d.ts +24 -0
  1093. package/lib/interaction/action/component/list-radio.js +118 -0
  1094. package/lib/interaction/action/component/list-radio.js.map +1 -0
  1095. package/lib/interaction/action/component/list-selected.d.ts +10 -0
  1096. package/lib/interaction/action/component/list-selected.js +22 -0
  1097. package/lib/interaction/action/component/list-selected.js.map +1 -0
  1098. package/lib/interaction/action/component/list-state.d.ts +46 -0
  1099. package/lib/interaction/action/component/list-state.js +169 -0
  1100. package/lib/interaction/action/component/list-state.js.map +1 -0
  1101. package/lib/interaction/action/component/list-unchecked.d.ts +13 -0
  1102. package/lib/interaction/action/component/list-unchecked.js +25 -0
  1103. package/lib/interaction/action/component/list-unchecked.js.map +1 -0
  1104. package/lib/interaction/action/component/tooltip/ellipsis-text.d.ts +25 -0
  1105. package/lib/interaction/action/component/tooltip/ellipsis-text.js +95 -0
  1106. package/lib/interaction/action/component/tooltip/ellipsis-text.js.map +1 -0
  1107. package/lib/interaction/action/component/tooltip/geometry.d.ts +24 -0
  1108. package/lib/interaction/action/component/tooltip/geometry.js +73 -0
  1109. package/lib/interaction/action/component/tooltip/geometry.js.map +1 -0
  1110. package/lib/interaction/action/component/tooltip/sibling.d.ts +21 -0
  1111. package/lib/interaction/action/component/tooltip/sibling.js +41 -0
  1112. package/lib/interaction/action/component/tooltip/sibling.js.map +1 -0
  1113. package/lib/interaction/action/cursor.d.ts +69 -0
  1114. package/lib/interaction/action/cursor.js +115 -0
  1115. package/lib/interaction/action/cursor.js.map +1 -0
  1116. package/lib/interaction/action/data/filter.d.ts +13 -0
  1117. package/lib/interaction/action/data/filter.js +68 -0
  1118. package/lib/interaction/action/data/filter.js.map +1 -0
  1119. package/lib/interaction/action/data/range-filter.d.ts +56 -0
  1120. package/lib/interaction/action/data/range-filter.js +166 -0
  1121. package/lib/interaction/action/data/range-filter.js.map +1 -0
  1122. package/lib/interaction/action/data/sibling-filter.d.ts +22 -0
  1123. package/lib/interaction/action/data/sibling-filter.js +41 -0
  1124. package/lib/interaction/action/data/sibling-filter.js.map +1 -0
  1125. package/lib/interaction/action/element/active.d.ts +14 -0
  1126. package/lib/interaction/action/element/active.js +26 -0
  1127. package/lib/interaction/action/element/active.js.map +1 -0
  1128. package/lib/interaction/action/element/filter.d.ts +20 -0
  1129. package/lib/interaction/action/element/filter.js +91 -0
  1130. package/lib/interaction/action/element/filter.js.map +1 -0
  1131. package/lib/interaction/action/element/highlight-by-color.d.ts +10 -0
  1132. package/lib/interaction/action/element/highlight-by-color.js +32 -0
  1133. package/lib/interaction/action/element/highlight-by-color.js.map +1 -0
  1134. package/lib/interaction/action/element/highlight-by-x.d.ts +15 -0
  1135. package/lib/interaction/action/element/highlight-by-x.js +53 -0
  1136. package/lib/interaction/action/element/highlight-by-x.js.map +1 -0
  1137. package/lib/interaction/action/element/highlight-util.d.ts +18 -0
  1138. package/lib/interaction/action/element/highlight-util.js +50 -0
  1139. package/lib/interaction/action/element/highlight-util.js.map +1 -0
  1140. package/lib/interaction/action/element/highlight.d.ts +21 -0
  1141. package/lib/interaction/action/element/highlight.js +96 -0
  1142. package/lib/interaction/action/element/highlight.js.map +1 -0
  1143. package/lib/interaction/action/element/link-by-color.d.ts +51 -0
  1144. package/lib/interaction/action/element/link-by-color.js +158 -0
  1145. package/lib/interaction/action/element/link-by-color.js.map +1 -0
  1146. package/lib/interaction/action/element/range-active.d.ts +13 -0
  1147. package/lib/interaction/action/element/range-active.js +25 -0
  1148. package/lib/interaction/action/element/range-active.js.map +1 -0
  1149. package/lib/interaction/action/element/range-highlight.d.ts +27 -0
  1150. package/lib/interaction/action/element/range-highlight.js +57 -0
  1151. package/lib/interaction/action/element/range-highlight.js.map +1 -0
  1152. package/lib/interaction/action/element/range-selected.d.ts +13 -0
  1153. package/lib/interaction/action/element/range-selected.js +25 -0
  1154. package/lib/interaction/action/element/range-selected.js.map +1 -0
  1155. package/lib/interaction/action/element/range-state.d.ts +38 -0
  1156. package/lib/interaction/action/element/range-state.js +166 -0
  1157. package/lib/interaction/action/element/range-state.js.map +1 -0
  1158. package/lib/interaction/action/element/selected.d.ts +14 -0
  1159. package/lib/interaction/action/element/selected.js +26 -0
  1160. package/lib/interaction/action/element/selected.js.map +1 -0
  1161. package/lib/interaction/action/element/sibling-filter.d.ts +19 -0
  1162. package/lib/interaction/action/element/sibling-filter.js +95 -0
  1163. package/lib/interaction/action/element/sibling-filter.js.map +1 -0
  1164. package/lib/interaction/action/element/single-active.d.ts +13 -0
  1165. package/lib/interaction/action/element/single-active.js +25 -0
  1166. package/lib/interaction/action/element/single-active.js.map +1 -0
  1167. package/lib/interaction/action/element/single-highlight.d.ts +16 -0
  1168. package/lib/interaction/action/element/single-highlight.js +37 -0
  1169. package/lib/interaction/action/element/single-highlight.js.map +1 -0
  1170. package/lib/interaction/action/element/single-selected.d.ts +13 -0
  1171. package/lib/interaction/action/element/single-selected.js +25 -0
  1172. package/lib/interaction/action/element/single-selected.js.map +1 -0
  1173. package/lib/interaction/action/element/single-state.d.ts +18 -0
  1174. package/lib/interaction/action/element/single-state.js +55 -0
  1175. package/lib/interaction/action/element/single-state.js.map +1 -0
  1176. package/lib/interaction/action/element/state-base.d.ts +39 -0
  1177. package/lib/interaction/action/element/state-base.js +61 -0
  1178. package/lib/interaction/action/element/state-base.js.map +1 -0
  1179. package/lib/interaction/action/element/state.d.ts +28 -0
  1180. package/lib/interaction/action/element/state.js +101 -0
  1181. package/lib/interaction/action/element/state.js.map +1 -0
  1182. package/lib/interaction/action/index.d.ts +2 -0
  1183. package/lib/interaction/action/index.js +13 -0
  1184. package/lib/interaction/action/index.js.map +1 -0
  1185. package/lib/interaction/action/mask/base.d.ts +62 -0
  1186. package/lib/interaction/action/mask/base.js +171 -0
  1187. package/lib/interaction/action/mask/base.js.map +1 -0
  1188. package/lib/interaction/action/mask/circle.d.ts +14 -0
  1189. package/lib/interaction/action/mask/circle.js +39 -0
  1190. package/lib/interaction/action/mask/circle.js.map +1 -0
  1191. package/lib/interaction/action/mask/dim-rect.d.ts +11 -0
  1192. package/lib/interaction/action/mask/dim-rect.js +64 -0
  1193. package/lib/interaction/action/mask/dim-rect.js.map +1 -0
  1194. package/lib/interaction/action/mask/path.d.ts +16 -0
  1195. package/lib/interaction/action/mask/path.js +46 -0
  1196. package/lib/interaction/action/mask/path.js.map +1 -0
  1197. package/lib/interaction/action/mask/rect.d.ts +17 -0
  1198. package/lib/interaction/action/mask/rect.js +41 -0
  1199. package/lib/interaction/action/mask/rect.js.map +1 -0
  1200. package/lib/interaction/action/mask/smooth-path.d.ts +9 -0
  1201. package/lib/interaction/action/mask/smooth-path.js +23 -0
  1202. package/lib/interaction/action/mask/smooth-path.js.map +1 -0
  1203. package/lib/interaction/action/register.d.ts +36 -0
  1204. package/lib/interaction/action/register.js +69 -0
  1205. package/lib/interaction/action/register.js.map +1 -0
  1206. package/lib/interaction/action/util.d.ts +140 -0
  1207. package/lib/interaction/action/util.js +387 -0
  1208. package/lib/interaction/action/util.js.map +1 -0
  1209. package/lib/interaction/action/view/button.d.ts +25 -0
  1210. package/lib/interaction/action/view/button.js +118 -0
  1211. package/lib/interaction/action/view/button.js.map +1 -0
  1212. package/lib/interaction/action/view/drag.d.ts +24 -0
  1213. package/lib/interaction/action/view/drag.js +75 -0
  1214. package/lib/interaction/action/view/drag.js.map +1 -0
  1215. package/lib/interaction/action/view/mousewheel-scroll.d.ts +5 -0
  1216. package/lib/interaction/action/view/mousewheel-scroll.js +37 -0
  1217. package/lib/interaction/action/view/mousewheel-scroll.js.map +1 -0
  1218. package/lib/interaction/action/view/move.d.ts +28 -0
  1219. package/lib/interaction/action/view/move.js +82 -0
  1220. package/lib/interaction/action/view/move.js.map +1 -0
  1221. package/lib/interaction/action/view/scale-transform.d.ts +18 -0
  1222. package/lib/interaction/action/view/scale-transform.js +53 -0
  1223. package/lib/interaction/action/view/scale-transform.js.map +1 -0
  1224. package/lib/interaction/action/view/scale-translate.d.ts +30 -0
  1225. package/lib/interaction/action/view/scale-translate.js +114 -0
  1226. package/lib/interaction/action/view/scale-translate.js.map +1 -0
  1227. package/lib/interaction/action/view/scale-zoom.d.ts +20 -0
  1228. package/lib/interaction/action/view/scale-zoom.js +85 -0
  1229. package/lib/interaction/action/view/scale-zoom.js.map +1 -0
  1230. package/lib/interaction/context.d.ts +65 -0
  1231. package/lib/interaction/context.js +144 -0
  1232. package/lib/interaction/context.js.map +1 -0
  1233. package/lib/interaction/grammar-interaction.d.ts +158 -0
  1234. package/lib/interaction/grammar-interaction.js +289 -0
  1235. package/lib/interaction/grammar-interaction.js.map +1 -0
  1236. package/lib/interaction/index.d.ts +25 -0
  1237. package/lib/interaction/index.js +54 -0
  1238. package/lib/interaction/index.js.map +1 -0
  1239. package/lib/interaction/interaction.d.ts +29 -0
  1240. package/lib/interaction/interaction.js +34 -0
  1241. package/lib/interaction/interaction.js.map +1 -0
  1242. package/lib/interface.d.ts +2264 -0
  1243. package/lib/interface.js +3 -0
  1244. package/lib/interface.js.map +1 -0
  1245. package/lib/theme/index.d.ts +12 -0
  1246. package/lib/theme/index.js +28 -0
  1247. package/lib/theme/index.js.map +1 -0
  1248. package/lib/theme/style-sheet/dark.d.ts +825 -0
  1249. package/lib/theme/style-sheet/dark.js +500 -0
  1250. package/lib/theme/style-sheet/dark.js.map +1 -0
  1251. package/lib/theme/style-sheet/light.d.ts +817 -0
  1252. package/lib/theme/style-sheet/light.js +496 -0
  1253. package/lib/theme/style-sheet/light.js.map +1 -0
  1254. package/lib/theme/util/create-by-style-sheet.d.ts +6 -0
  1255. package/lib/theme/util/create-by-style-sheet.js +1426 -0
  1256. package/lib/theme/util/create-by-style-sheet.js.map +1 -0
  1257. package/lib/theme/util/create-theme.d.ts +6 -0
  1258. package/lib/theme/util/create-theme.js +16 -0
  1259. package/lib/theme/util/create-theme.js.map +1 -0
  1260. package/lib/theme/util/index.d.ts +1 -0
  1261. package/lib/theme/util/index.js +6 -0
  1262. package/lib/theme/util/index.js.map +1 -0
  1263. package/lib/util/annotation.d.ts +7 -0
  1264. package/lib/util/annotation.js +43 -0
  1265. package/lib/util/annotation.js.map +1 -0
  1266. package/lib/util/attr.d.ts +10 -0
  1267. package/lib/util/attr.js +29 -0
  1268. package/lib/util/attr.js.map +1 -0
  1269. package/lib/util/axis.d.ts +100 -0
  1270. package/lib/util/axis.js +251 -0
  1271. package/lib/util/axis.js.map +1 -0
  1272. package/lib/util/bbox.d.ts +105 -0
  1273. package/lib/util/bbox.js +287 -0
  1274. package/lib/util/bbox.js.map +1 -0
  1275. package/lib/util/collision-detect.d.ts +16 -0
  1276. package/lib/util/collision-detect.js +132 -0
  1277. package/lib/util/collision-detect.js.map +1 -0
  1278. package/lib/util/color.d.ts +1 -0
  1279. package/lib/util/color.js +23 -0
  1280. package/lib/util/color.js.map +1 -0
  1281. package/lib/util/context.d.ts +4 -0
  1282. package/lib/util/context.js +15 -0
  1283. package/lib/util/context.js.map +1 -0
  1284. package/lib/util/coordinate.d.ts +86 -0
  1285. package/lib/util/coordinate.js +157 -0
  1286. package/lib/util/coordinate.js.map +1 -0
  1287. package/lib/util/direction.d.ts +19 -0
  1288. package/lib/util/direction.js +125 -0
  1289. package/lib/util/direction.js.map +1 -0
  1290. package/lib/util/dom.d.ts +19 -0
  1291. package/lib/util/dom.js +68 -0
  1292. package/lib/util/dom.js.map +1 -0
  1293. package/lib/util/event.d.ts +8 -0
  1294. package/lib/util/event.js +18 -0
  1295. package/lib/util/event.js.map +1 -0
  1296. package/lib/util/facet.d.ts +16 -0
  1297. package/lib/util/facet.js +48 -0
  1298. package/lib/util/facet.js.map +1 -0
  1299. package/lib/util/graphics.d.ts +58 -0
  1300. package/lib/util/graphics.js +212 -0
  1301. package/lib/util/graphics.js.map +1 -0
  1302. package/lib/util/grid.d.ts +36 -0
  1303. package/lib/util/grid.js +125 -0
  1304. package/lib/util/grid.js.map +1 -0
  1305. package/lib/util/helper.d.ts +34 -0
  1306. package/lib/util/helper.js +79 -0
  1307. package/lib/util/helper.js.map +1 -0
  1308. package/lib/util/legend.d.ts +45 -0
  1309. package/lib/util/legend.js +152 -0
  1310. package/lib/util/legend.js.map +1 -0
  1311. package/lib/util/marker.d.ts +10 -0
  1312. package/lib/util/marker.js +61 -0
  1313. package/lib/util/marker.js.map +1 -0
  1314. package/lib/util/padding.d.ts +14 -0
  1315. package/lib/util/padding.js +45 -0
  1316. package/lib/util/padding.js.map +1 -0
  1317. package/lib/util/scale.d.ts +42 -0
  1318. package/lib/util/scale.js +137 -0
  1319. package/lib/util/scale.js.map +1 -0
  1320. package/lib/util/stat.d.ts +10 -0
  1321. package/lib/util/stat.js +41 -0
  1322. package/lib/util/stat.js.map +1 -0
  1323. package/lib/util/text.d.ts +23 -0
  1324. package/lib/util/text.js +88 -0
  1325. package/lib/util/text.js.map +1 -0
  1326. package/lib/util/tooltip.d.ts +26 -0
  1327. package/lib/util/tooltip.js +426 -0
  1328. package/lib/util/tooltip.js.map +1 -0
  1329. package/lib/util/transform.d.ts +33 -0
  1330. package/lib/util/transform.js +69 -0
  1331. package/lib/util/transform.js.map +1 -0
  1332. package/lib/util/types.d.ts +6 -0
  1333. package/lib/util/types.js +3 -0
  1334. package/lib/util/types.js.map +1 -0
  1335. package/package.json +4 -3
  1336. package/src/core.ts +1 -1
@@ -0,0 +1,84 @@
1
+ import { __spreadArray } from "tslib";
2
+ import { isString, memoize, values, toString } from '@antv/util';
3
+ import { getCanvasContext } from './context';
4
+ /**
5
+ * 计算文本在画布中的宽度
6
+ */
7
+ export var measureTextWidth = memoize(function (text, font) {
8
+ if (font === void 0) { font = {}; }
9
+ var fontSize = font.fontSize, fontFamily = font.fontFamily, fontWeight = font.fontWeight, fontStyle = font.fontStyle, fontVariant = font.fontVariant;
10
+ var ctx = getCanvasContext();
11
+ ctx.font = [fontStyle, fontVariant, fontWeight, "".concat(fontSize, "px"), fontFamily].join(' ');
12
+ return ctx.measureText(isString(text) ? text : '').width;
13
+ }, function (text, font) {
14
+ if (font === void 0) { font = {}; }
15
+ return __spreadArray([text], values(font), true).join('');
16
+ });
17
+ /**
18
+ * 获取文本的 ... 文本。
19
+ * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):
20
+ * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串
21
+ * 2. 然后对最后这个字符串二分计算
22
+ * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等
23
+ * @param maxWidth
24
+ * @param font
25
+ */
26
+ export var getEllipsisText = function (text, maxWidth, font) {
27
+ var STEP = 16; // 每次 16,调参工程师
28
+ var DOT_WIDTH = measureTextWidth('...', font);
29
+ var leftText;
30
+ if (!isString(text)) {
31
+ leftText = toString(text);
32
+ }
33
+ else {
34
+ leftText = text;
35
+ }
36
+ var leftWidth = maxWidth;
37
+ var r = []; // 最终的分段字符串
38
+ var currentText;
39
+ var currentWidth;
40
+ if (measureTextWidth(text, font) <= maxWidth) {
41
+ return text;
42
+ }
43
+ // 首先通过 step 计算,找出最大的未超出长度的
44
+ while (true) {
45
+ // 更新字符串
46
+ currentText = leftText.substr(0, STEP);
47
+ // 计算宽度
48
+ currentWidth = measureTextWidth(currentText, font);
49
+ // 超出剩余宽度,则停止
50
+ if (currentWidth + DOT_WIDTH > leftWidth) {
51
+ if (currentWidth > leftWidth) {
52
+ break;
53
+ }
54
+ }
55
+ r.push(currentText);
56
+ // 没有超出,则计算剩余宽度
57
+ leftWidth -= currentWidth;
58
+ leftText = leftText.substr(STEP);
59
+ // 字符串整体没有超出
60
+ if (!leftText) {
61
+ return r.join('');
62
+ }
63
+ }
64
+ // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)
65
+ while (true) {
66
+ // 更新字符串
67
+ currentText = leftText.substr(0, 1);
68
+ // 计算宽度
69
+ currentWidth = measureTextWidth(currentText, font);
70
+ // 超出剩余宽度,则停止
71
+ if (currentWidth + DOT_WIDTH > leftWidth) {
72
+ break;
73
+ }
74
+ r.push(currentText);
75
+ // 没有超出,则计算剩余宽度
76
+ leftWidth -= currentWidth;
77
+ leftText = leftText.substr(1);
78
+ if (!leftText) {
79
+ return r.join('');
80
+ }
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,CAAC;QAEnD,aAAa;QACb,IAAI,YAAY,GAAG,SAAS,GAAG,SAAS,EAAE;YACxC,MAAM;SACP;QAED,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpB,eAAe;QACf,SAAS,IAAI,YAAY,CAAC;QAC1B,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAE9B,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACnB;KACF;IAED,OAAO,UAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,QAAK,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["import { isString, memoize, values, toString } from '@antv/util';\nimport * as CSS from 'csstype';\nimport { getCanvasContext } from './context';\n\ntype FontFace = CSS.Properties;\n\ntype Font = Pick<FontFace, 'fontFamily' | 'fontWeight' | 'fontStyle' | 'fontVariant'> & {\n fontSize?: number;\n};\n\n/**\n * 计算文本在画布中的宽度\n */\nexport const measureTextWidth = memoize(\n (text: any, font: Font = {}): number => {\n const { fontSize, fontFamily, fontWeight, fontStyle, fontVariant } = font;\n const ctx = getCanvasContext();\n ctx!.font = [fontStyle, fontVariant, fontWeight, `${fontSize}px`, fontFamily].join(' ');\n return ctx!.measureText(isString(text) ? text : '').width;\n },\n (text: any, font: Font = {}) => [text, ...values(font)].join('')\n);\n\n/**\n * 获取文本的 ... 文本。\n * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):\n * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串\n * 2. 然后对最后这个字符串二分计算\n * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等\n * @param maxWidth\n * @param font\n */\nexport const getEllipsisText = (text: any, maxWidth: number, font?: Font) => {\n const STEP = 16; // 每次 16,调参工程师\n const DOT_WIDTH = measureTextWidth('...', font);\n\n let leftText;\n\n if (!isString(text)) {\n leftText = toString(text);\n } else {\n leftText = text;\n }\n\n let leftWidth = maxWidth;\n\n const r = []; // 最终的分段字符串\n let currentText;\n let currentWidth;\n\n if (measureTextWidth(text, font) <= maxWidth) {\n return text;\n }\n\n // 首先通过 step 计算,找出最大的未超出长度的\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, STEP);\n\n // 计算宽度\n currentWidth = measureTextWidth(currentText, font);\n\n // 超出剩余宽度,则停止\n if (currentWidth + DOT_WIDTH > leftWidth) {\n if (currentWidth > leftWidth) {\n break;\n }\n }\n\n r.push(currentText);\n\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(STEP);\n\n // 字符串整体没有超出\n if (!leftText) {\n return r.join('');\n }\n }\n\n // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, 1);\n\n // 计算宽度\n currentWidth = measureTextWidth(currentText, font);\n\n // 超出剩余宽度,则停止\n if (currentWidth + DOT_WIDTH > leftWidth) {\n break;\n }\n\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(1);\n\n if (!leftText) {\n return r.join('');\n }\n }\n\n return `${r.join('')}...`;\n};\n"]}
@@ -0,0 +1,26 @@
1
+ import { View } from '../chart';
2
+ import Geometry from '../geometry/base';
3
+ import { MappingDatum, Point, TooltipCfg, TooltipTitle } from '../interface';
4
+ /**
5
+ * @ignore
6
+ * Finds data from geometry by point
7
+ * @param point canvas point
8
+ * @param data an item of geometry.dataArray
9
+ * @param geometry
10
+ * @returns
11
+ */
12
+ export declare function findDataByPoint(point: Point, data: MappingDatum[], geometry: Geometry): any;
13
+ /**
14
+ * @ignore
15
+ * Gets tooltip items
16
+ * @param data
17
+ * @param geometry
18
+ * @param [title]
19
+ * @returns
20
+ */
21
+ export declare function getTooltipItems(data: MappingDatum, geometry: Geometry, title?: TooltipTitle, showNil?: boolean): any[];
22
+ /**
23
+ * 不进行递归查找
24
+ */
25
+ export declare function findItemsFromView(view: View, point: Point, tooltipCfg: TooltipCfg): any[];
26
+ export declare function findItemsFromViewRecurisive(view: View, point: Point, tooltipCfg: TooltipCfg): any[];
@@ -0,0 +1,419 @@
1
+ import { __assign } from "tslib";
2
+ import { contains, filter, find, isArray, isEmpty, isFunction, isNil, isNumberEqual, isObject, memoize, get, values, } from '@antv/util';
3
+ import { FIELD_ORIGIN, GROUP_ATTRS } from '../constant';
4
+ import { getName, inferScaleType } from './scale';
5
+ function snapEqual(v1, v2, scale) {
6
+ var value1 = scale.translate(v1);
7
+ var value2 = scale.translate(v2);
8
+ return isNumberEqual(value1, value2);
9
+ }
10
+ function getXValueByPoint(point, geometry) {
11
+ var coordinate = geometry.coordinate;
12
+ var xScale = geometry.getXScale();
13
+ var range = xScale.range;
14
+ var rangeMax = range[range.length - 1];
15
+ var rangeMin = range[0];
16
+ var invertPoint = coordinate.invert(point);
17
+ var xValue = invertPoint.x;
18
+ if (coordinate.isPolar && xValue > (1 + rangeMax) / 2) {
19
+ xValue = rangeMin; // 极坐标下,scale 的 range 被做过特殊处理
20
+ }
21
+ return xScale.translate(xScale.invert(xValue));
22
+ }
23
+ function filterYValue(data, point, geometry) {
24
+ var coordinate = geometry.coordinate;
25
+ var yScale = geometry.getYScale();
26
+ var yField = yScale.field;
27
+ var invertPoint = coordinate.invert(point);
28
+ var yValue = yScale.invert(invertPoint.y);
29
+ var result = find(data, function (obj) {
30
+ var originData = obj[FIELD_ORIGIN];
31
+ return originData[yField][0] <= yValue && originData[yField][1] >= yValue;
32
+ });
33
+ return result || data[data.length - 1];
34
+ }
35
+ var getXDistance = memoize(function (scale) {
36
+ if (scale.isCategory) {
37
+ return 1;
38
+ }
39
+ var scaleValues = scale.values; // values 是无序的
40
+ var length = scaleValues.length;
41
+ var min = scale.translate(scaleValues[0]);
42
+ var max = min;
43
+ for (var index = 0; index < length; index++) {
44
+ var value = scaleValues[index];
45
+ // 时间类型需要 translate
46
+ var numericValue = scale.translate(value);
47
+ if (numericValue < min) {
48
+ min = numericValue;
49
+ }
50
+ if (numericValue > max) {
51
+ max = numericValue;
52
+ }
53
+ }
54
+ return (max - min) / (length - 1);
55
+ });
56
+ /**
57
+ * 获得 tooltip 的 title
58
+ * @param originData
59
+ * @param geometry
60
+ * @param title
61
+ */
62
+ function getTooltipTitle(originData, geometry, title) {
63
+ var positionAttr = geometry.getAttribute('position');
64
+ var fields = positionAttr.getFields();
65
+ var scales = geometry.scales;
66
+ var titleField = isFunction(title) || !title ? fields[0] : title;
67
+ var titleScale = scales[titleField];
68
+ // 如果创建了该字段对应的 scale,则通过 scale.getText() 方式取值,因为用户可能对数据进行了格式化
69
+ // 如果没有对应的 scale,则从原始数据中取值,如果原始数据中仍不存在,则直接放回 title 值
70
+ var tooltipTitle = titleScale ? titleScale.getText(originData[titleField]) : originData[titleField] || titleField;
71
+ return isFunction(title) ? title(tooltipTitle, originData) : tooltipTitle;
72
+ }
73
+ function getAttributesForLegend(geometry) {
74
+ var attributes = values(geometry.attributes);
75
+ return filter(attributes, function (attribute) { return contains(GROUP_ATTRS, attribute.type); });
76
+ }
77
+ function getTooltipValueScale(geometry) {
78
+ var attributes = getAttributesForLegend(geometry);
79
+ var scale;
80
+ for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
81
+ var attribute = attributes_1[_i];
82
+ var tmpScale = attribute.getScale(attribute.type);
83
+ if (tmpScale && tmpScale.isLinear) {
84
+ var tmpScaleDef = get(geometry.scaleDefs, tmpScale.field);
85
+ var inferedScaleType = inferScaleType(tmpScale, tmpScaleDef, attribute.type, geometry.type);
86
+ if (inferedScaleType !== 'cat') {
87
+ // 如果指定字段是非 position 的,同时是连续的
88
+ scale = tmpScale;
89
+ break;
90
+ }
91
+ }
92
+ }
93
+ var xScale = geometry.getXScale();
94
+ var yScale = geometry.getYScale();
95
+ return scale || yScale || xScale;
96
+ }
97
+ function getTooltipValue(originData, valueScale) {
98
+ var field = valueScale.field;
99
+ var value = originData[field];
100
+ if (isArray(value)) {
101
+ var texts = value.map(function (eachValue) {
102
+ return valueScale.getText(eachValue);
103
+ });
104
+ return texts.join('-');
105
+ }
106
+ return valueScale.getText(value);
107
+ }
108
+ // 根据原始数据获取 tooltip item 中 name 值
109
+ function getTooltipName(originData, geometry) {
110
+ var nameScale;
111
+ var groupScales = geometry.getGroupScales();
112
+ if (groupScales.length) {
113
+ // 如果存在分组类型,取第一个分组类型
114
+ nameScale = groupScales[0];
115
+ }
116
+ if (nameScale) {
117
+ var field = nameScale.field;
118
+ return nameScale.getText(originData[field]);
119
+ }
120
+ var valueScale = getTooltipValueScale(geometry);
121
+ return getName(valueScale);
122
+ }
123
+ /**
124
+ * @ignore
125
+ * Finds data from geometry by point
126
+ * @param point canvas point
127
+ * @param data an item of geometry.dataArray
128
+ * @param geometry
129
+ * @returns
130
+ */
131
+ export function findDataByPoint(point, data, geometry) {
132
+ if (data.length === 0) {
133
+ return null;
134
+ }
135
+ var geometryType = geometry.type;
136
+ var xScale = geometry.getXScale();
137
+ var yScale = geometry.getYScale();
138
+ var xField = xScale.field;
139
+ var yField = yScale.field;
140
+ var rst = null;
141
+ // 热力图采用最小逼近策略查找 point 击中的数据
142
+ if (geometryType === 'heatmap' || geometryType === 'point') {
143
+ // 将 point 画布坐标转换为原始数据值
144
+ var coordinate = geometry.coordinate;
145
+ var invertPoint = coordinate.invert(point); // 转换成归一化的数据
146
+ var x = xScale.invert(invertPoint.x); // 转换为原始值
147
+ var y = yScale.invert(invertPoint.y); // 转换为原始值
148
+ var min = Infinity;
149
+ for (var index = 0; index < data.length; index++) {
150
+ var obj = data[index];
151
+ var originData = obj[FIELD_ORIGIN];
152
+ var range = Math.pow((originData[xField] - x), 2) + Math.pow((originData[yField] - y), 2);
153
+ if (range < min) {
154
+ min = range;
155
+ rst = obj;
156
+ }
157
+ }
158
+ return rst;
159
+ }
160
+ // 其他 Geometry 类型按照 x 字段数据进行查找
161
+ var first = data[0];
162
+ var last = data[data.length - 1];
163
+ var xValue = getXValueByPoint(point, geometry);
164
+ var firstXValue = first[FIELD_ORIGIN][xField];
165
+ var firstYValue = first[FIELD_ORIGIN][yField];
166
+ var lastXValue = last[FIELD_ORIGIN][xField];
167
+ var isYArray = yScale.isLinear && isArray(firstYValue); // 考虑 x 维度相同,y 是数组区间的情况
168
+ // 如果 x 的值是数组
169
+ if (isArray(firstXValue)) {
170
+ for (var index = 0; index < data.length; index++) {
171
+ var record = data[index];
172
+ var originData = record[FIELD_ORIGIN];
173
+ // xValue 在 originData[xField] 的数值区间内
174
+ if (xScale.translate(originData[xField][0]) <= xValue && xScale.translate(originData[xField][1]) >= xValue) {
175
+ if (isYArray) {
176
+ // 层叠直方图场景,x 和 y 都是数组区间
177
+ if (!isArray(rst)) {
178
+ rst = [];
179
+ }
180
+ rst.push(record);
181
+ }
182
+ else {
183
+ rst = record;
184
+ break;
185
+ }
186
+ }
187
+ }
188
+ if (isArray(rst)) {
189
+ rst = filterYValue(rst, point, geometry);
190
+ }
191
+ }
192
+ else {
193
+ var next = void 0;
194
+ if (!xScale.isLinear && xScale.type !== 'timeCat') {
195
+ // x 轴对应的数据为非线性以及非时间类型的数据采用遍历查找
196
+ for (var index = 0; index < data.length; index++) {
197
+ var record = data[index];
198
+ var originData = record[FIELD_ORIGIN];
199
+ if (snapEqual(originData[xField], xValue, xScale)) {
200
+ if (isYArray) {
201
+ if (!isArray(rst)) {
202
+ rst = [];
203
+ }
204
+ rst.push(record);
205
+ }
206
+ else {
207
+ rst = record;
208
+ break;
209
+ }
210
+ }
211
+ else if (xScale.translate(originData[xField]) <= xValue) {
212
+ last = record;
213
+ next = data[index + 1];
214
+ }
215
+ }
216
+ if (isArray(rst)) {
217
+ rst = filterYValue(rst, point, geometry);
218
+ }
219
+ }
220
+ else {
221
+ // x 轴对应的数据为线性以及时间类型,进行二分查找,性能更好
222
+ if ((xValue > xScale.translate(lastXValue) || xValue < xScale.translate(firstXValue)) &&
223
+ (xValue > xScale.max || xValue < xScale.min)) {
224
+ // 不在数据范围内
225
+ return null;
226
+ }
227
+ var firstIdx = 0;
228
+ var lastIdx = data.length - 1;
229
+ var middleIdx = void 0;
230
+ while (firstIdx <= lastIdx) {
231
+ middleIdx = Math.floor((firstIdx + lastIdx) / 2);
232
+ var item = data[middleIdx][FIELD_ORIGIN][xField];
233
+ if (snapEqual(item, xValue, xScale)) {
234
+ return data[middleIdx];
235
+ }
236
+ if (xScale.translate(item) <= xScale.translate(xValue)) {
237
+ firstIdx = middleIdx + 1;
238
+ last = data[middleIdx];
239
+ next = data[middleIdx + 1];
240
+ }
241
+ else {
242
+ if (lastIdx === 0) {
243
+ last = data[0];
244
+ }
245
+ lastIdx = middleIdx - 1;
246
+ }
247
+ }
248
+ }
249
+ if (last && next) {
250
+ // 计算最逼近的
251
+ if (Math.abs(xScale.translate(last[FIELD_ORIGIN][xField]) - xValue) >
252
+ Math.abs(xScale.translate(next[FIELD_ORIGIN][xField]) - xValue)) {
253
+ last = next;
254
+ }
255
+ }
256
+ }
257
+ var distance = getXDistance(geometry.getXScale()); // 每个分类间的平均间距
258
+ if (!rst && Math.abs(xScale.translate(last[FIELD_ORIGIN][xField]) - xValue) <= distance / 2) {
259
+ rst = last;
260
+ }
261
+ return rst;
262
+ }
263
+ /**
264
+ * @ignore
265
+ * Gets tooltip items
266
+ * @param data
267
+ * @param geometry
268
+ * @param [title]
269
+ * @returns
270
+ */
271
+ export function getTooltipItems(data, geometry, title, showNil) {
272
+ if (title === void 0) { title = ''; }
273
+ if (showNil === void 0) { showNil = false; }
274
+ var originData = data[FIELD_ORIGIN];
275
+ var tooltipTitle = getTooltipTitle(originData, geometry, title);
276
+ var tooltipOption = geometry.tooltipOption;
277
+ var defaultColor = geometry.theme.defaultColor;
278
+ var items = [];
279
+ var name;
280
+ var value;
281
+ function addItem(itemName, itemValue) {
282
+ if (showNil || (!isNil(itemValue) && itemValue !== '')) {
283
+ // 值为 null的时候,忽视
284
+ var item = {
285
+ title: tooltipTitle,
286
+ data: originData,
287
+ mappingData: data,
288
+ name: itemName,
289
+ value: itemValue,
290
+ color: data.color || defaultColor,
291
+ marker: true,
292
+ };
293
+ items.push(item);
294
+ }
295
+ }
296
+ if (isObject(tooltipOption)) {
297
+ var fields = tooltipOption.fields, callback = tooltipOption.callback;
298
+ if (callback) {
299
+ // 用户定义了回调函数
300
+ var callbackParams = fields.map(function (field) {
301
+ return data[FIELD_ORIGIN][field];
302
+ });
303
+ var cfg = callback.apply(void 0, callbackParams);
304
+ var itemCfg = __assign({ data: data[FIELD_ORIGIN], mappingData: data, title: tooltipTitle, color: data.color || defaultColor, marker: true }, cfg);
305
+ items.push(itemCfg);
306
+ }
307
+ else {
308
+ var scales = geometry.scales;
309
+ for (var _i = 0, fields_1 = fields; _i < fields_1.length; _i++) {
310
+ var field = fields_1[_i];
311
+ if (!isNil(originData[field])) {
312
+ // 字段数据为null, undefined 时不显示
313
+ var scale = scales[field];
314
+ name = getName(scale);
315
+ value = scale.getText(originData[field]);
316
+ addItem(name, value);
317
+ }
318
+ }
319
+ }
320
+ }
321
+ else {
322
+ var valueScale = getTooltipValueScale(geometry);
323
+ // 字段数据为null ,undefined时不显示
324
+ value = getTooltipValue(originData, valueScale);
325
+ name = getTooltipName(originData, geometry);
326
+ addItem(name, value);
327
+ }
328
+ return items;
329
+ }
330
+ function getTooltipItemsByFindData(geometry, point, title, tooltipCfg) {
331
+ var showNil = tooltipCfg.showNil;
332
+ var result = [];
333
+ var dataArray = geometry.dataArray;
334
+ if (!isEmpty(dataArray)) {
335
+ geometry.sort(dataArray); // 先进行排序,便于 tooltip 查找
336
+ for (var _i = 0, dataArray_1 = dataArray; _i < dataArray_1.length; _i++) {
337
+ var data = dataArray_1[_i];
338
+ var record = findDataByPoint(point, data, geometry);
339
+ if (record) {
340
+ var elementId = geometry.getElementId(record);
341
+ var element = geometry.elementsMap[elementId];
342
+ if (geometry.type === 'heatmap' || element.visible) {
343
+ // Heatmap 没有 Element
344
+ // 如果图形元素隐藏了,怎不再 tooltip 上展示相关数据
345
+ var items = getTooltipItems(record, geometry, title, showNil);
346
+ if (items.length) {
347
+ result.push(items);
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ return result;
354
+ }
355
+ function getTooltipItemsByHitShape(geometry, point, title, tooltipCfg) {
356
+ var showNil = tooltipCfg.showNil;
357
+ var result = [];
358
+ var container = geometry.container;
359
+ var shape = container.getShape(point.x, point.y);
360
+ if (shape && shape.get('visible') && shape.get('origin')) {
361
+ var mappingData = shape.get('origin').mappingData;
362
+ var items = getTooltipItems(mappingData, geometry, title, showNil);
363
+ if (items.length) {
364
+ result.push(items);
365
+ }
366
+ }
367
+ return result;
368
+ }
369
+ /**
370
+ * 不进行递归查找
371
+ */
372
+ export function findItemsFromView(view, point, tooltipCfg) {
373
+ var result = [];
374
+ // 先从 view 本身查找
375
+ var geometries = view.geometries;
376
+ var shared = tooltipCfg.shared, title = tooltipCfg.title, reversed = tooltipCfg.reversed;
377
+ for (var _i = 0, geometries_1 = geometries; _i < geometries_1.length; _i++) {
378
+ var geometry = geometries_1[_i];
379
+ if (geometry.visible && geometry.tooltipOption !== false) {
380
+ // geometry 可见同时未关闭 tooltip
381
+ var geometryType = geometry.type;
382
+ var tooltipItems = void 0;
383
+ if (['point', 'edge', 'polygon'].includes(geometryType)) {
384
+ // 始终通过图形拾取
385
+ tooltipItems = getTooltipItemsByHitShape(geometry, point, title, tooltipCfg);
386
+ }
387
+ else if (['area', 'line', 'path', 'heatmap'].includes(geometryType)) {
388
+ // 如果是 'area', 'line', 'path',始终通过数据查找方法查找 tooltip
389
+ tooltipItems = getTooltipItemsByFindData(geometry, point, title, tooltipCfg);
390
+ }
391
+ else {
392
+ if (shared !== false) {
393
+ tooltipItems = getTooltipItemsByFindData(geometry, point, title, tooltipCfg);
394
+ }
395
+ else {
396
+ tooltipItems = getTooltipItemsByHitShape(geometry, point, title, tooltipCfg);
397
+ }
398
+ }
399
+ if (tooltipItems.length) {
400
+ if (reversed) {
401
+ tooltipItems.reverse();
402
+ }
403
+ // geometry 有可能会有多个 item,因为用户可以设置 geometry.tooltip('x*y*z')
404
+ result.push(tooltipItems);
405
+ }
406
+ }
407
+ }
408
+ return result;
409
+ }
410
+ export function findItemsFromViewRecurisive(view, point, tooltipCfg) {
411
+ var result = findItemsFromView(view, point, tooltipCfg);
412
+ // 递归查找,并合并结果
413
+ for (var _i = 0, _a = view.views; _i < _a.length; _i++) {
414
+ var childView = _a[_i];
415
+ result = result.concat(findItemsFromView(childView, point, tooltipCfg));
416
+ }
417
+ return result;
418
+ }
419
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/util/tooltip.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,KAAK,EACL,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,EACH,MAAM,GACP,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIxD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAElD,SAAS,SAAS,CAAC,EAAO,EAAE,EAAO,EAAE,KAAY;IAC/C,IAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACnC,IAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAEnC,OAAO,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAY,EAAE,QAAkB;IACxD,IAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACvC,IAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACpC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,IAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,MAA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AV,KAAA,IAAI,CAAC,KAAK,EAAV,cAAU,EAAV,IAAU,EAAE;QAA/B,IAAM,SAAS,SAAA;QAClB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;KACzE;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n contains,\n filter,\n find,\n isArray,\n isEmpty,\n isFunction,\n isNil,\n isNumberEqual,\n isObject,\n memoize,\n get,\n values,\n} from '@antv/util';\nimport { View } from '../chart';\nimport { FIELD_ORIGIN, GROUP_ATTRS } from '../constant';\nimport { Attribute, Scale } from '../dependents';\nimport Geometry from '../geometry/base';\nimport { Data, Datum, MappingDatum, Point, TooltipCfg, TooltipTitle } from '../interface';\nimport { getName, inferScaleType } from './scale';\n\nfunction snapEqual(v1: any, v2: any, scale: Scale) {\n const value1 = scale.translate(v1);\n const value2 = scale.translate(v2);\n\n return isNumberEqual(value1, value2);\n}\n\nfunction getXValueByPoint(point: Point, geometry: Geometry): number {\n const coordinate = geometry.coordinate;\n const xScale = geometry.getXScale();\n const range = xScale.range;\n const rangeMax = range[range.length - 1];\n const rangeMin = range[0];\n\n const invertPoint = coordinate.invert(point);\n\n let xValue = invertPoint.x;\n if (coordinate.isPolar && xValue > (1 + rangeMax) / 2) {\n xValue = rangeMin; // 极坐标下,scale 的 range 被做过特殊处理\n }\n return xScale.translate(xScale.invert(xValue));\n}\n\nfunction filterYValue(data: Data, point: Point, geometry: Geometry) {\n const coordinate = geometry.coordinate;\n const yScale = geometry.getYScale();\n const yField = yScale.field;\n const invertPoint = coordinate.invert(point);\n const yValue = yScale.invert(invertPoint.y);\n\n const result = find(data, (obj: Datum) => {\n const originData = obj[FIELD_ORIGIN];\n return originData[yField][0] <= yValue && originData[yField][1] >= yValue;\n });\n return result || data[data.length - 1];\n}\n\nconst getXDistance = memoize((scale: Scale) => {\n if (scale.isCategory) {\n return 1;\n }\n const scaleValues = scale.values; // values 是无序的\n const length = scaleValues.length;\n let min = scale.translate(scaleValues[0]);\n let max = min;\n\n for (let index = 0; index < length; index++) {\n const value = scaleValues[index];\n // 时间类型需要 translate\n const numericValue = scale.translate(value);\n if (numericValue < min) {\n min = numericValue;\n }\n if (numericValue > max) {\n max = numericValue;\n }\n }\n return (max - min) / (length - 1);\n});\n\n/**\n * 获得 tooltip 的 title\n * @param originData\n * @param geometry\n * @param title\n */\nfunction getTooltipTitle(originData: Datum, geometry: Geometry, title: TooltipTitle): string {\n const positionAttr = geometry.getAttribute('position');\n const fields = positionAttr.getFields();\n const scales = geometry.scales;\n\n const titleField = isFunction(title) || !title ? fields[0] : title;\n const titleScale = scales[titleField];\n\n // 如果创建了该字段对应的 scale,则通过 scale.getText() 方式取值,因为用户可能对数据进行了格式化\n // 如果没有对应的 scale,则从原始数据中取值,如果原始数据中仍不存在,则直接放回 title 值\n const tooltipTitle = titleScale ? titleScale.getText(originData[titleField]) : originData[titleField] || titleField;\n\n return isFunction(title) ? title(tooltipTitle, originData) : tooltipTitle;\n}\n\nfunction getAttributesForLegend(geometry: Geometry) {\n const attributes = values(geometry.attributes);\n return filter(attributes, (attribute: Attribute) => contains(GROUP_ATTRS, attribute.type));\n}\n\nfunction getTooltipValueScale(geometry: Geometry) {\n const attributes = getAttributesForLegend(geometry);\n let scale;\n for (const attribute of attributes) {\n const tmpScale = attribute.getScale(attribute.type);\n if (tmpScale && tmpScale.isLinear) {\n const tmpScaleDef = get(geometry.scaleDefs, tmpScale.field);\n const inferedScaleType = inferScaleType(tmpScale, tmpScaleDef, attribute.type, geometry.type);\n if (inferedScaleType !== 'cat') {\n // 如果指定字段是非 position 的,同时是连续的\n scale = tmpScale;\n break;\n }\n }\n }\n\n const xScale = geometry.getXScale();\n const yScale = geometry.getYScale();\n\n return scale || yScale || xScale;\n}\n\nfunction getTooltipValue(originData: Datum, valueScale: Scale) {\n const field = valueScale.field;\n const value = originData[field];\n\n if (isArray(value)) {\n const texts = value.map((eachValue) => {\n return valueScale.getText(eachValue);\n });\n return texts.join('-');\n }\n return valueScale.getText(value);\n}\n\n// 根据原始数据获取 tooltip item 中 name 值\nfunction getTooltipName(originData: Datum, geometry: Geometry) {\n let nameScale: Scale;\n const groupScales = geometry.getGroupScales();\n if (groupScales.length) {\n // 如果存在分组类型,取第一个分组类型\n nameScale = groupScales[0];\n }\n if (nameScale) {\n const field = nameScale.field;\n return nameScale.getText(originData[field]);\n }\n\n const valueScale = getTooltipValueScale(geometry);\n return getName(valueScale);\n}\n\n/**\n * @ignore\n * Finds data from geometry by point\n * @param point canvas point\n * @param data an item of geometry.dataArray\n * @param geometry\n * @returns\n */\nexport function findDataByPoint(point: Point, data: MappingDatum[], geometry: Geometry) {\n if (data.length === 0) {\n return null;\n }\n\n const geometryType = geometry.type;\n const xScale = geometry.getXScale();\n const yScale = geometry.getYScale();\n\n const xField = xScale.field;\n const yField = yScale.field;\n\n let rst = null;\n\n // 热力图采用最小逼近策略查找 point 击中的数据\n if (geometryType === 'heatmap' || geometryType === 'point') {\n // 将 point 画布坐标转换为原始数据值\n const coordinate = geometry.coordinate;\n const invertPoint = coordinate.invert(point); // 转换成归一化的数据\n const x = xScale.invert(invertPoint.x); // 转换为原始值\n const y = yScale.invert(invertPoint.y); // 转换为原始值\n\n let min = Infinity;\n for (let index = 0; index < data.length; index++) {\n const obj = data[index];\n const originData = obj[FIELD_ORIGIN];\n const range = (originData[xField] - x) ** 2 + (originData[yField] - y) ** 2;\n if (range < min) {\n min = range;\n rst = obj;\n }\n }\n\n return rst;\n }\n\n // 其他 Geometry 类型按照 x 字段数据进行查找\n const first = data[0];\n let last = data[data.length - 1];\n const xValue = getXValueByPoint(point, geometry);\n const firstXValue = first[FIELD_ORIGIN][xField];\n const firstYValue = first[FIELD_ORIGIN][yField];\n const lastXValue = last[FIELD_ORIGIN][xField];\n const isYArray = yScale.isLinear && isArray(firstYValue); // 考虑 x 维度相同,y 是数组区间的情况\n\n // 如果 x 的值是数组\n if (isArray(firstXValue)) {\n for (let index = 0; index < data.length; index++) {\n const record = data[index];\n const originData = record[FIELD_ORIGIN];\n // xValue 在 originData[xField] 的数值区间内\n if (xScale.translate(originData[xField][0]) <= xValue && xScale.translate(originData[xField][1]) >= xValue) {\n if (isYArray) {\n // 层叠直方图场景,x 和 y 都是数组区间\n if (!isArray(rst)) {\n rst = [];\n }\n rst.push(record);\n } else {\n rst = record;\n break;\n }\n }\n }\n if (isArray(rst)) {\n rst = filterYValue(rst, point, geometry);\n }\n } else {\n let next;\n if (!xScale.isLinear && xScale.type !== 'timeCat') {\n // x 轴对应的数据为非线性以及非时间类型的数据采用遍历查找\n for (let index = 0; index < data.length; index++) {\n const record = data[index];\n const originData = record[FIELD_ORIGIN];\n if (snapEqual(originData[xField], xValue, xScale)) {\n if (isYArray) {\n if (!isArray(rst)) {\n rst = [];\n }\n rst.push(record);\n } else {\n rst = record;\n break;\n }\n } else if (xScale.translate(originData[xField]) <= xValue) {\n last = record;\n next = data[index + 1];\n }\n }\n\n if (isArray(rst)) {\n rst = filterYValue(rst, point, geometry);\n }\n } else {\n // x 轴对应的数据为线性以及时间类型,进行二分查找,性能更好\n if (\n (xValue > xScale.translate(lastXValue) || xValue < xScale.translate(firstXValue)) &&\n (xValue > xScale.max || xValue < xScale.min)\n ) {\n // 不在数据范围内\n return null;\n }\n\n let firstIdx = 0;\n let lastIdx = data.length - 1;\n let middleIdx;\n while (firstIdx <= lastIdx) {\n middleIdx = Math.floor((firstIdx + lastIdx) / 2);\n const item = data[middleIdx][FIELD_ORIGIN][xField];\n if (snapEqual(item, xValue, xScale)) {\n return data[middleIdx];\n }\n\n if (xScale.translate(item) <= xScale.translate(xValue)) {\n firstIdx = middleIdx + 1;\n last = data[middleIdx];\n next = data[middleIdx + 1];\n } else {\n if (lastIdx === 0) {\n last = data[0];\n }\n lastIdx = middleIdx - 1;\n }\n }\n }\n\n if (last && next) {\n // 计算最逼近的\n if (\n Math.abs(xScale.translate(last[FIELD_ORIGIN][xField]) - xValue) >\n Math.abs(xScale.translate(next[FIELD_ORIGIN][xField]) - xValue)\n ) {\n last = next;\n }\n }\n }\n\n const distance = getXDistance(geometry.getXScale()); // 每个分类间的平均间距\n if (!rst && Math.abs(xScale.translate(last[FIELD_ORIGIN][xField]) - xValue) <= distance / 2) {\n rst = last;\n }\n\n return rst;\n}\n\n/**\n * @ignore\n * Gets tooltip items\n * @param data\n * @param geometry\n * @param [title]\n * @returns\n */\nexport function getTooltipItems(\n data: MappingDatum,\n geometry: Geometry,\n title: TooltipTitle = '',\n showNil: boolean = false\n) {\n const originData = data[FIELD_ORIGIN];\n const tooltipTitle = getTooltipTitle(originData, geometry, title);\n const tooltipOption = geometry.tooltipOption;\n const { defaultColor } = geometry.theme;\n const items = [];\n let name;\n let value;\n\n function addItem(itemName, itemValue) {\n if (showNil || (!isNil(itemValue) && itemValue !== '')) {\n // 值为 null的时候,忽视\n const item = {\n title: tooltipTitle,\n data: originData, // 原始数据\n mappingData: data, // 映射后的数据\n name: itemName,\n value: itemValue,\n color: data.color || defaultColor,\n marker: true,\n };\n\n items.push(item);\n }\n }\n\n if (isObject(tooltipOption)) {\n const { fields, callback } = tooltipOption;\n if (callback) {\n // 用户定义了回调函数\n const callbackParams = fields.map((field: string) => {\n return data[FIELD_ORIGIN][field];\n });\n const cfg = callback(...callbackParams);\n const itemCfg = {\n data: data[FIELD_ORIGIN], // 原始数据\n mappingData: data, // 映射后的数据\n title: tooltipTitle,\n color: data.color || defaultColor,\n marker: true, // 默认展示 marker\n ...cfg,\n };\n\n items.push(itemCfg);\n } else {\n const scales = geometry.scales;\n for (const field of fields) {\n if (!isNil(originData[field])) {\n // 字段数据为null, undefined 时不显示\n const scale = scales[field];\n name = getName(scale);\n value = scale.getText(originData[field]);\n addItem(name, value);\n }\n }\n }\n } else {\n const valueScale = getTooltipValueScale(geometry);\n // 字段数据为null ,undefined时不显示\n value = getTooltipValue(originData, valueScale);\n name = getTooltipName(originData, geometry);\n addItem(name, value);\n }\n return items;\n}\n\nfunction getTooltipItemsByFindData(geometry: Geometry, point, title, tooltipCfg: TooltipCfg) {\n const { showNil } = tooltipCfg;\n const result = [];\n const dataArray = geometry.dataArray;\n if (!isEmpty(dataArray)) {\n geometry.sort(dataArray); // 先进行排序,便于 tooltip 查找\n for (const data of dataArray) {\n const record = findDataByPoint(point, data, geometry);\n if (record) {\n const elementId = geometry.getElementId(record);\n const element = geometry.elementsMap[elementId];\n if (geometry.type === 'heatmap' || element.visible) {\n // Heatmap 没有 Element\n // 如果图形元素隐藏了,怎不再 tooltip 上展示相关数据\n const items = getTooltipItems(record, geometry, title, showNil);\n if (items.length) {\n result.push(items);\n }\n }\n }\n }\n }\n\n return result;\n}\n\nfunction getTooltipItemsByHitShape(geometry, point, title, tooltipCfg: TooltipCfg) {\n const { showNil } = tooltipCfg;\n const result = [];\n const container = geometry.container;\n const shape = container.getShape(point.x, point.y);\n if (shape && shape.get('visible') && shape.get('origin')) {\n const mappingData = shape.get('origin').mappingData;\n const items = getTooltipItems(mappingData, geometry, title, showNil);\n if (items.length) {\n result.push(items);\n }\n }\n\n return result;\n}\n\n/**\n * 不进行递归查找\n */\nexport function findItemsFromView(view: View, point: Point, tooltipCfg: TooltipCfg) {\n const result = [];\n // 先从 view 本身查找\n const geometries = view.geometries;\n const { shared, title, reversed } = tooltipCfg;\n for (const geometry of geometries) {\n if (geometry.visible && geometry.tooltipOption !== false) {\n // geometry 可见同时未关闭 tooltip\n const geometryType = geometry.type;\n let tooltipItems;\n if (['point', 'edge', 'polygon'].includes(geometryType)) {\n // 始终通过图形拾取\n tooltipItems = getTooltipItemsByHitShape(geometry, point, title, tooltipCfg);\n } else if (['area', 'line', 'path', 'heatmap'].includes(geometryType)) {\n // 如果是 'area', 'line', 'path',始终通过数据查找方法查找 tooltip\n tooltipItems = getTooltipItemsByFindData(geometry, point, title, tooltipCfg);\n } else {\n if (shared !== false) {\n tooltipItems = getTooltipItemsByFindData(geometry, point, title, tooltipCfg);\n } else {\n tooltipItems = getTooltipItemsByHitShape(geometry, point, title, tooltipCfg);\n }\n }\n if (tooltipItems.length) {\n if (reversed) {\n tooltipItems.reverse();\n }\n // geometry 有可能会有多个 item,因为用户可以设置 geometry.tooltip('x*y*z')\n result.push(tooltipItems);\n }\n }\n }\n\n return result;\n}\n\nexport function findItemsFromViewRecurisive(view: View, point: Point, tooltipCfg: TooltipCfg) {\n let result = findItemsFromView(view, point, tooltipCfg);\n\n // 递归查找,并合并结果\n for (const childView of view.views) {\n result = result.concat(findItemsFromView(childView, point, tooltipCfg));\n }\n\n return result;\n}\n"]}
@@ -0,0 +1,33 @@
1
+ import { IElement, IGroup, IShape } from '../dependents';
2
+ declare const transform: (m: number[], actions: any[][]) => number[];
3
+ export { transform };
4
+ /**
5
+ * 对元素进行平移操作。
6
+ * @param element 进行变换的元素
7
+ * @param x x 方向位移
8
+ * @param y y 方向位移
9
+ */
10
+ export declare function translate(element: IGroup | IShape, x: number, y: number): void;
11
+ /**
12
+ * 获取元素旋转矩阵 (以元素的左上角为旋转点)
13
+ * @param element 进行变换的元素
14
+ * @param rotateRadian 旋转弧度
15
+ */
16
+ export declare function getRotateMatrix(element: IElement, rotateRadian: number): number[];
17
+ /**
18
+ * 对元素进行旋转操作。
19
+ * @param element 进行变换的元素
20
+ * @param rotateRadian 旋转弧度
21
+ */
22
+ export declare function rotate(element: IGroup | IShape, rotateRadian: number): void;
23
+ /**
24
+ * 获取元矩阵。
25
+ * @returns identity matrix
26
+ */
27
+ export declare function getIdentityMatrix(): number[];
28
+ /**
29
+ * 围绕图形中心点进行缩放
30
+ * @param element 进行缩放的图形元素
31
+ * @param ratio 缩放比例
32
+ */
33
+ export declare function zoom(element: IGroup | IShape, ratio: number): void;