@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,141 @@
1
+ import { __assign, __extends } from "tslib";
2
+ import { deepMix, each, filter, get } from '@antv/util';
3
+ import { DIRECTION } from '../constant';
4
+ import { getFactTitleConfig } from '../util/facet';
5
+ import { Facet } from './facet';
6
+ /**
7
+ * @ignore
8
+ * 矩阵分面
9
+ */
10
+ var Rect = /** @class */ (function (_super) {
11
+ __extends(Rect, _super);
12
+ function Rect() {
13
+ return _super !== null && _super.apply(this, arguments) || this;
14
+ }
15
+ Rect.prototype.afterEachView = function (view, facet) {
16
+ this.processAxis(view, facet);
17
+ };
18
+ Rect.prototype.beforeEachView = function (view, facet) {
19
+ // do nothing
20
+ };
21
+ Rect.prototype.getDefaultCfg = function () {
22
+ return deepMix({}, _super.prototype.getDefaultCfg.call(this), {
23
+ type: 'rect',
24
+ columnTitle: __assign({}, _super.prototype.getDefaultTitleCfg.call(this)),
25
+ rowTitle: __assign({}, _super.prototype.getDefaultTitleCfg.call(this)),
26
+ });
27
+ };
28
+ Rect.prototype.render = function () {
29
+ _super.prototype.render.call(this);
30
+ if (this.cfg.showTitle) {
31
+ this.renderTitle();
32
+ }
33
+ };
34
+ /**
35
+ * 生成矩阵分面的分面数据
36
+ * @param data
37
+ */
38
+ Rect.prototype.generateFacets = function (data) {
39
+ var _this = this;
40
+ var _a = this.cfg.fields, columnField = _a[0], rowField = _a[1];
41
+ var rst = [];
42
+ var columnValuesLength = 1;
43
+ var rowValuesLength = 1;
44
+ var columnValues = [''];
45
+ var rowValues = [''];
46
+ if (columnField) {
47
+ columnValues = this.getFieldValues(data, columnField);
48
+ columnValuesLength = columnValues.length;
49
+ }
50
+ if (rowField) {
51
+ rowValues = this.getFieldValues(data, rowField);
52
+ rowValuesLength = rowValues.length;
53
+ }
54
+ // 获取每个维度对应的数据配置片段
55
+ columnValues.forEach(function (xVal, xIndex) {
56
+ rowValues.forEach(function (yVal, yIndex) {
57
+ var conditions = [
58
+ { field: columnField, value: xVal, values: columnValues },
59
+ { field: rowField, value: yVal, values: rowValues },
60
+ ];
61
+ var facetData = filter(data, _this.getFacetDataFilter(conditions));
62
+ var facet = {
63
+ type: _this.cfg.type,
64
+ data: facetData,
65
+ region: _this.getRegion(rowValuesLength, columnValuesLength, xIndex, yIndex),
66
+ columnValue: xVal,
67
+ rowValue: yVal,
68
+ columnField: columnField,
69
+ rowField: rowField,
70
+ columnIndex: xIndex,
71
+ rowIndex: yIndex,
72
+ columnValuesLength: columnValuesLength,
73
+ rowValuesLength: rowValuesLength,
74
+ };
75
+ rst.push(facet);
76
+ });
77
+ });
78
+ return rst;
79
+ };
80
+ Rect.prototype.renderTitle = function () {
81
+ var _this = this;
82
+ each(this.facets, function (facet, facetIndex) {
83
+ var columnIndex = facet.columnIndex, rowIndex = facet.rowIndex, columnValuesLength = facet.columnValuesLength, columnValue = facet.columnValue, rowValue = facet.rowValue, view = facet.view;
84
+ // top
85
+ if (rowIndex === 0) {
86
+ var formatter = get(_this.cfg.columnTitle, 'formatter');
87
+ var config = deepMix({
88
+ position: ['50%', '0%'],
89
+ content: formatter ? formatter(columnValue) : columnValue,
90
+ }, getFactTitleConfig(DIRECTION.TOP), _this.cfg.columnTitle);
91
+ view.annotation().text(config);
92
+ }
93
+ // right
94
+ if (columnIndex === columnValuesLength - 1) {
95
+ var formatter = get(_this.cfg.rowTitle, 'formatter');
96
+ var config = deepMix({
97
+ position: ['100%', '50%'],
98
+ content: formatter ? formatter(rowValue) : rowValue,
99
+ }, getFactTitleConfig(DIRECTION.RIGHT), _this.cfg.rowTitle);
100
+ view.annotation().text(config);
101
+ }
102
+ });
103
+ };
104
+ /**
105
+ * 设置 x 坐标轴的文本、title 是否显示
106
+ * @param x
107
+ * @param axes
108
+ * @param option
109
+ * @param facet
110
+ */
111
+ Rect.prototype.getXAxisOption = function (x, axes, option, facet) {
112
+ // 非最后一行
113
+ if (facet.rowIndex !== facet.rowValuesLength - 1) {
114
+ return __assign(__assign({}, option), { title: null, label: null });
115
+ }
116
+ else if (facet.columnIndex !== Math.floor((facet.columnValuesLength - 1) / 2)) {
117
+ // 不是中间列
118
+ return __assign(__assign({}, option), { title: null });
119
+ }
120
+ return option;
121
+ };
122
+ /**
123
+ * 设置 y 坐标轴的文本、title 是否显示
124
+ * @param y
125
+ * @param axes
126
+ * @param option
127
+ * @param facet
128
+ */
129
+ Rect.prototype.getYAxisOption = function (y, axes, option, facet) {
130
+ if (facet.columnIndex !== 0) {
131
+ return __assign(__assign({}, option), { title: null, label: null });
132
+ }
133
+ else if (facet.rowIndex !== Math.floor((facet.rowValuesLength - 1) / 2)) {
134
+ return __assign(__assign({}, option), { title: null });
135
+ }
136
+ return option;
137
+ };
138
+ return Rect;
139
+ }(Facet));
140
+ export default Rect;
141
+ //# sourceMappingURL=rect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect.js","sourceRoot":"","sources":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AAI,CAAC,GAAG,CAAC,QAAQ,CAClB,CAAC;gBAEF,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAChC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACO,6BAAc,GAAxB,UAAyB,CAAS,EAAE,IAAS,EAAE,MAAe,EAAE,KAAe;QAC7E,QAAQ;QACR,IAAI,KAAK,CAAC,QAAQ,KAAK,KAAK,CAAC,eAAe,GAAG,CAAC,EAAE;YAChD,6BACK,MAAM,KACT,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,IAAI,IACX;SACH;aAAM,IAAI,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,kBAAkB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/E,QAAQ;YACR,6BACK,MAAM,KACT,KAAK,EAAE,IAAI,IACX;SACH;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACO,6BAAc,GAAxB,UAAyB,CAAS,EAAE,IAAS,EAAE,MAAe,EAAE,KAAe;QAC7E,IAAI,KAAK,CAAC,WAAW,KAAK,CAAC,EAAE;YAC3B,6BACK,MAAM,KACT,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,IAAI,IACX;SACH;aAAM,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;YACzE,6BACK,MAAM,KACT,KAAK,EAAE,IAAI,IACX;SACH;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,WAAC;AAAD,CAAC,AApKD,CAAkC,KAAK,GAoKtC","sourcesContent":["import { deepMix, each, filter, get } from '@antv/util';\nimport { DIRECTION } from '../constant';\nimport { AxisCfg, Datum, RectCfg, RectData } from '../interface';\n\nimport View from '../chart/view';\nimport { getFactTitleConfig } from '../util/facet';\nimport { Facet } from './facet';\n\n/**\n * @ignore\n * 矩阵分面\n */\nexport default class Rect extends Facet<RectCfg, RectData> {\n protected afterEachView(view: View, facet: RectData) {\n this.processAxis(view, facet);\n }\n\n protected beforeEachView(view: View, facet: RectData) {\n // do nothing\n }\n\n protected getDefaultCfg() {\n return deepMix({}, super.getDefaultCfg(), {\n type: 'rect',\n columnTitle: {\n ...super.getDefaultTitleCfg(),\n },\n rowTitle: {\n ...super.getDefaultTitleCfg(),\n },\n });\n }\n\n public render() {\n super.render();\n\n if (this.cfg.showTitle) {\n this.renderTitle();\n }\n }\n\n /**\n * 生成矩阵分面的分面数据\n * @param data\n */\n protected generateFacets(data: Datum[]): RectData[] {\n const [columnField, rowField] = this.cfg.fields;\n\n const rst = [];\n let columnValuesLength = 1;\n let rowValuesLength = 1;\n\n let columnValues: string[] = [''];\n let rowValues: string[] = [''];\n\n if (columnField) {\n columnValues = this.getFieldValues(data, columnField);\n columnValuesLength = columnValues.length;\n }\n if (rowField) {\n rowValues = this.getFieldValues(data, rowField);\n rowValuesLength = rowValues.length;\n }\n\n // 获取每个维度对应的数据配置片段\n columnValues.forEach((xVal, xIndex) => {\n rowValues.forEach((yVal, yIndex) => {\n const conditions = [\n { field: columnField, value: xVal, values: columnValues },\n { field: rowField, value: yVal, values: rowValues },\n ];\n const facetData = filter(data, this.getFacetDataFilter(conditions));\n\n const facet: RectData = {\n type: this.cfg.type,\n data: facetData,\n region: this.getRegion(rowValuesLength, columnValuesLength, xIndex, yIndex),\n\n columnValue: xVal,\n rowValue: yVal,\n columnField,\n rowField,\n columnIndex: xIndex,\n rowIndex: yIndex,\n columnValuesLength,\n rowValuesLength,\n };\n rst.push(facet);\n });\n });\n\n return rst;\n }\n\n private renderTitle(): void {\n each(this.facets, (facet: RectData, facetIndex: number) => {\n const { columnIndex, rowIndex, columnValuesLength, columnValue, rowValue, view } = facet;\n\n // top\n if (rowIndex === 0) {\n const formatter = get(this.cfg.columnTitle, 'formatter');\n const config = deepMix(\n {\n position: ['50%', '0%'] as [string, string],\n content: formatter ? formatter(columnValue) : columnValue,\n },\n getFactTitleConfig(DIRECTION.TOP),\n this.cfg.columnTitle\n );\n\n view.annotation().text(config);\n }\n // right\n if (columnIndex === columnValuesLength - 1) {\n const formatter = get(this.cfg.rowTitle, 'formatter');\n const config = deepMix(\n {\n position: ['100%', '50%'] as [string, string],\n content: formatter ? formatter(rowValue) : rowValue,\n },\n getFactTitleConfig(DIRECTION.RIGHT),\n this.cfg.rowTitle\n );\n\n view.annotation().text(config);\n }\n });\n }\n\n /**\n * 设置 x 坐标轴的文本、title 是否显示\n * @param x\n * @param axes\n * @param option\n * @param facet\n */\n protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: RectData): object {\n // 非最后一行\n if (facet.rowIndex !== facet.rowValuesLength - 1) {\n return {\n ...option,\n title: null,\n label: null,\n };\n } else if (facet.columnIndex !== Math.floor((facet.columnValuesLength - 1) / 2)) {\n // 不是中间列\n return {\n ...option,\n title: null,\n };\n }\n return option;\n }\n\n /**\n * 设置 y 坐标轴的文本、title 是否显示\n * @param y\n * @param axes\n * @param option\n * @param facet\n */\n protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: RectData): object {\n if (facet.columnIndex !== 0) {\n return {\n ...option,\n title: null,\n label: null,\n };\n } else if (facet.rowIndex !== Math.floor((facet.rowValuesLength - 1) / 2)) {\n return {\n ...option,\n title: null,\n };\n }\n return option;\n }\n}\n"]}
@@ -0,0 +1,40 @@
1
+ import View from '../chart/view';
2
+ import { AxisCfg, Datum, TreeCfg, TreeData } from '../interface';
3
+ import { Facet } from './facet';
4
+ /**
5
+ * @ignore
6
+ * Tree Facet
7
+ */
8
+ export default class Tree extends Facet<TreeCfg, TreeData> {
9
+ protected afterEachView(view: View, facet: TreeData): void;
10
+ protected beforeEachView(view: View, facet: TreeData): void;
11
+ init(): void;
12
+ protected getDefaultCfg(): any;
13
+ protected generateFacets(data: Datum[]): TreeData[];
14
+ private setRegion;
15
+ protected getRegion(rows: number, cols: number, xIndex: number, yIndex: number): {
16
+ start: {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ end: {
21
+ x: number;
22
+ y: number;
23
+ };
24
+ };
25
+ private forceColIndex;
26
+ private getFacetsByLevel;
27
+ private getRegionIndex;
28
+ private isLeaf;
29
+ private getRows;
30
+ private getChildFacets;
31
+ render(): void;
32
+ private afterChartRender;
33
+ private renderTitle;
34
+ private drawLines;
35
+ private addFacetLines;
36
+ private getPath;
37
+ private drawLine;
38
+ protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: TreeData): object;
39
+ protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: TreeData): object;
40
+ }
@@ -0,0 +1,288 @@
1
+ import { __assign, __extends } from "tslib";
2
+ /**
3
+ * Create By Bruce Too
4
+ * On 2020-02-10
5
+ */
6
+ import { assign, deepMix, each, get } from '@antv/util';
7
+ import { DIRECTION, VIEW_LIFE_CIRCLE } from '../constant';
8
+ import { getFactTitleConfig } from '../util/facet';
9
+ import { Facet } from './facet';
10
+ /**
11
+ * @ignore
12
+ * Tree Facet
13
+ */
14
+ var Tree = /** @class */ (function (_super) {
15
+ __extends(Tree, _super);
16
+ function Tree() {
17
+ var _this = _super !== null && _super.apply(this, arguments) || this;
18
+ _this.afterChartRender = function () {
19
+ if (_this.facets && _this.cfg.line) {
20
+ _this.container.clear();
21
+ _this.drawLines(_this.facets);
22
+ }
23
+ };
24
+ return _this;
25
+ }
26
+ Tree.prototype.afterEachView = function (view, facet) {
27
+ this.processAxis(view, facet);
28
+ };
29
+ Tree.prototype.beforeEachView = function (view, facet) { };
30
+ Tree.prototype.init = function () {
31
+ _super.prototype.init.call(this);
32
+ this.view.on(VIEW_LIFE_CIRCLE.AFTER_RENDER, this.afterChartRender);
33
+ };
34
+ Tree.prototype.getDefaultCfg = function () {
35
+ return deepMix({}, _super.prototype.getDefaultCfg.call(this), {
36
+ type: 'tree',
37
+ line: {
38
+ style: {
39
+ lineWidth: 1,
40
+ stroke: '#ddd',
41
+ },
42
+ smooth: false,
43
+ },
44
+ showTitle: true,
45
+ title: _super.prototype.getDefaultTitleCfg.call(this),
46
+ });
47
+ };
48
+ Tree.prototype.generateFacets = function (data) {
49
+ var fields = this.cfg.fields;
50
+ if (!fields.length) {
51
+ throw new Error('Please specify for the fields for rootFacet!');
52
+ }
53
+ var rst = [];
54
+ var rootFacet = {
55
+ type: this.cfg.type,
56
+ data: data,
57
+ region: null,
58
+ rowValuesLength: this.getRows(),
59
+ columnValuesLength: 1,
60
+ rowIndex: 0,
61
+ columnIndex: 0,
62
+ rowField: '',
63
+ columnField: '',
64
+ rowValue: '',
65
+ columnValue: '',
66
+ };
67
+ rst.push(rootFacet);
68
+ rootFacet.children = this.getChildFacets(data, 1, rst);
69
+ this.setRegion(rst);
70
+ return rst;
71
+ };
72
+ Tree.prototype.setRegion = function (facets) {
73
+ var _this = this;
74
+ this.forceColIndex(facets);
75
+ facets.forEach(function (facet) {
76
+ // @ts-ignore 允许调整
77
+ facet.region = _this.getRegion(facet.rowValuesLength, facet.columnValuesLength, facet.columnIndex, facet.rowIndex);
78
+ });
79
+ };
80
+ Tree.prototype.getRegion = function (rows, cols, xIndex, yIndex) {
81
+ var xWidth = 1 / cols; // x轴方向的每个分面的偏移
82
+ var yWidth = 1 / rows; // y轴方向的每个分面的偏移
83
+ var start = {
84
+ x: xWidth * xIndex,
85
+ y: yWidth * yIndex,
86
+ };
87
+ var end = {
88
+ x: start.x + xWidth,
89
+ y: start.y + (yWidth * 2) / 3, // 预留1/3的空隙,方便添加连接线
90
+ };
91
+ return {
92
+ start: start,
93
+ end: end,
94
+ };
95
+ };
96
+ Tree.prototype.forceColIndex = function (facets) {
97
+ var _this = this;
98
+ var leafs = [];
99
+ var index = 0;
100
+ facets.forEach(function (facet) {
101
+ if (_this.isLeaf(facet)) {
102
+ leafs.push(facet);
103
+ // @ts-ignore 允许调整
104
+ facet.columnIndex = index;
105
+ index++;
106
+ }
107
+ });
108
+ leafs.forEach(function (facet) {
109
+ // @ts-ignore
110
+ facet.columnValuesLength = leafs.length;
111
+ });
112
+ var maxLevel = this.cfg.fields.length;
113
+ for (var i = maxLevel - 1; i >= 0; i--) {
114
+ var levelFacets = this.getFacetsByLevel(facets, i);
115
+ // var yIndex = maxLevel - i;
116
+ for (var _i = 0, levelFacets_1 = levelFacets; _i < levelFacets_1.length; _i++) {
117
+ var facet = levelFacets_1[_i];
118
+ if (!this.isLeaf(facet)) {
119
+ facet.originColIndex = facet.columnIndex;
120
+ // @ts-ignore
121
+ facet.columnIndex = this.getRegionIndex(facet.children);
122
+ // @ts-ignore
123
+ facet.columnValuesLength = leafs.length;
124
+ }
125
+ }
126
+ }
127
+ };
128
+ // get facet use level
129
+ Tree.prototype.getFacetsByLevel = function (facets, level) {
130
+ var rst = [];
131
+ facets.forEach(function (facet) {
132
+ if (facet.rowIndex === level) {
133
+ rst.push(facet);
134
+ }
135
+ });
136
+ return rst;
137
+ };
138
+ // if the facet has children , make it's column index in the middle of it's children
139
+ Tree.prototype.getRegionIndex = function (children) {
140
+ var first = children[0];
141
+ var last = children[children.length - 1];
142
+ return (last.columnIndex - first.columnIndex) / 2 + first.columnIndex;
143
+ };
144
+ // is a leaf without children
145
+ Tree.prototype.isLeaf = function (facet) {
146
+ return !facet.children || !facet.children.length;
147
+ };
148
+ Tree.prototype.getRows = function () {
149
+ return this.cfg.fields.length + 1;
150
+ };
151
+ // get child
152
+ Tree.prototype.getChildFacets = function (data, level, arr) {
153
+ var _this = this;
154
+ // [ 'grade', 'class' ]
155
+ var fields = this.cfg.fields;
156
+ var length = fields.length;
157
+ if (length < level) {
158
+ return;
159
+ }
160
+ var rst = [];
161
+ // get fist level except root node
162
+ var field = fields[level - 1];
163
+ // get field value
164
+ var values = this.getFieldValues(data, field);
165
+ values.forEach(function (value, index) {
166
+ var conditions = [{ field: field, value: value, values: values }];
167
+ var subData = data.filter(_this.getFacetDataFilter(conditions));
168
+ if (subData.length) {
169
+ var facet = {
170
+ type: _this.cfg.type,
171
+ data: subData,
172
+ region: null,
173
+ columnValue: value,
174
+ rowValue: '',
175
+ columnField: field,
176
+ rowField: '',
177
+ columnIndex: index,
178
+ rowValuesLength: _this.getRows(),
179
+ columnValuesLength: 1,
180
+ rowIndex: level,
181
+ children: _this.getChildFacets(subData, level + 1, arr),
182
+ };
183
+ rst.push(facet);
184
+ arr.push(facet);
185
+ }
186
+ });
187
+ return rst;
188
+ };
189
+ Tree.prototype.render = function () {
190
+ _super.prototype.render.call(this);
191
+ if (this.cfg.showTitle) {
192
+ this.renderTitle();
193
+ }
194
+ };
195
+ Tree.prototype.renderTitle = function () {
196
+ var _this = this;
197
+ each(this.facets, function (facet) {
198
+ var columnValue = facet.columnValue, view = facet.view;
199
+ var formatter = get(_this.cfg.title, 'formatter');
200
+ var config = deepMix({
201
+ position: ['50%', '0%'],
202
+ content: formatter ? formatter(columnValue) : columnValue,
203
+ }, getFactTitleConfig(DIRECTION.TOP), _this.cfg.title);
204
+ view.annotation().text(config);
205
+ });
206
+ };
207
+ Tree.prototype.drawLines = function (facets) {
208
+ var _this = this;
209
+ facets.forEach(function (facet) {
210
+ if (!_this.isLeaf(facet)) {
211
+ var children = facet.children;
212
+ _this.addFacetLines(facet, children);
213
+ }
214
+ });
215
+ };
216
+ // add lines with it's children
217
+ Tree.prototype.addFacetLines = function (facet, children) {
218
+ var _this = this;
219
+ var view = facet.view;
220
+ var region = view.coordinateBBox;
221
+ // top, right, bottom, left
222
+ var start = {
223
+ x: region.x + region.width / 2,
224
+ y: region.y + region.height,
225
+ };
226
+ children.forEach(function (subFacet) {
227
+ var subRegion = subFacet.view.coordinateBBox;
228
+ var end = {
229
+ x: subRegion.bl.x + (subRegion.tr.x - subRegion.bl.x) / 2,
230
+ y: subRegion.tr.y,
231
+ };
232
+ var middle1 = {
233
+ x: start.x,
234
+ y: start.y + (end.y - start.y) / 2,
235
+ };
236
+ var middle2 = {
237
+ x: end.x,
238
+ y: middle1.y,
239
+ };
240
+ _this.drawLine([start, middle1, middle2, end]);
241
+ });
242
+ };
243
+ Tree.prototype.getPath = function (points) {
244
+ var path = [];
245
+ var smooth = this.cfg.line.smooth;
246
+ if (smooth) {
247
+ path.push(['M', points[0].x, points[0].y]);
248
+ path.push(['C', points[1].x, points[1].y, points[2].x, points[2].y, points[3].x, points[3].y]);
249
+ }
250
+ else {
251
+ points.forEach(function (point, index) {
252
+ if (index === 0) {
253
+ path.push(['M', point.x, point.y]);
254
+ }
255
+ else {
256
+ path.push(['L', point.x, point.y]);
257
+ }
258
+ });
259
+ }
260
+ return path;
261
+ };
262
+ // draw line width points
263
+ Tree.prototype.drawLine = function (points) {
264
+ var path = this.getPath(points);
265
+ var line = this.cfg.line.style;
266
+ this.container.addShape('path', {
267
+ attrs: assign({
268
+ // @ts-ignore
269
+ path: path,
270
+ }, line),
271
+ });
272
+ };
273
+ Tree.prototype.getXAxisOption = function (x, axes, option, facet) {
274
+ if (facet.rowIndex !== facet.rowValuesLength - 1) {
275
+ return __assign(__assign({}, option), { title: null, label: null });
276
+ }
277
+ return option;
278
+ };
279
+ Tree.prototype.getYAxisOption = function (y, axes, option, facet) {
280
+ if (facet.originColIndex !== 0 && facet.columnIndex !== 0) {
281
+ return __assign(__assign({}, option), { title: null, label: null });
282
+ }
283
+ return option;
284
+ };
285
+ return Tree;
286
+ }(Facet));
287
+ export default Tree;
288
+ //# sourceMappingURL=tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/facet/tree.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;GAG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AM,CAAC;IAChB,CAAC;IAES,6BAAc,GAAxB,UAAyB,CAAS,EAAE,IAAS,EAAE,MAAe,EAAE,KAAe;QAC7E,IAAI,KAAK,CAAC,cAAc,KAAK,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,CAAC,EAAE;YACzD,6BACK,MAAM,KACT,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,IAAI,IACX;SACH;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,WAAC;AAAD,CAAC,AA7SD,CAAkC,KAAK,GA6StC","sourcesContent":["/**\n * Create By Bruce Too\n * On 2020-02-10\n */\nimport { assign, deepMix, each, get } from '@antv/util';\nimport View from '../chart/view';\nimport { DIRECTION, VIEW_LIFE_CIRCLE } from '../constant';\nimport { AxisCfg, Condition, Datum, TreeCfg, TreeData } from '../interface';\nimport { getFactTitleConfig } from '../util/facet';\nimport { Facet } from './facet';\n\n/**\n * @ignore\n * Tree Facet\n */\nexport default class Tree extends Facet<TreeCfg, TreeData> {\n protected afterEachView(view: View, facet: TreeData) {\n this.processAxis(view, facet);\n }\n\n protected beforeEachView(view: View, facet: TreeData) {}\n\n public init() {\n super.init();\n this.view.on(VIEW_LIFE_CIRCLE.AFTER_RENDER, this.afterChartRender);\n }\n\n protected getDefaultCfg() {\n return deepMix({}, super.getDefaultCfg(), {\n type: 'tree',\n line: {\n style: {\n lineWidth: 1,\n stroke: '#ddd',\n },\n smooth: false,\n },\n showTitle: true,\n title: super.getDefaultTitleCfg(),\n });\n }\n\n protected generateFacets(data: Datum[]): TreeData[] {\n const fields = this.cfg.fields;\n if (!fields.length) {\n throw new Error('Please specify for the fields for rootFacet!');\n }\n const rst = [];\n const rootFacet: TreeData = {\n type: this.cfg.type,\n data,\n region: null,\n rowValuesLength: this.getRows(),\n columnValuesLength: 1,\n rowIndex: 0,\n columnIndex: 0,\n rowField: '',\n columnField: '',\n rowValue: '',\n columnValue: '',\n };\n rst.push(rootFacet);\n rootFacet.children = this.getChildFacets(data, 1, rst);\n this.setRegion(rst);\n return rst;\n }\n\n private setRegion(facets: TreeData[]) {\n this.forceColIndex(facets);\n facets.forEach((facet) => {\n // @ts-ignore 允许调整\n facet.region = this.getRegion(facet.rowValuesLength, facet.columnValuesLength, facet.columnIndex, facet.rowIndex);\n });\n }\n\n protected getRegion(rows: number, cols: number, xIndex: number, yIndex: number) {\n const xWidth = 1 / cols; // x轴方向的每个分面的偏移\n const yWidth = 1 / rows; // y轴方向的每个分面的偏移\n\n const start = {\n x: xWidth * xIndex,\n y: yWidth * yIndex,\n };\n\n const end = {\n x: start.x + xWidth,\n y: start.y + (yWidth * 2) / 3, // 预留1/3的空隙,方便添加连接线\n };\n return {\n start,\n end,\n };\n }\n\n private forceColIndex(facets: TreeData[]) {\n const leafs: TreeData[] = [];\n let index = 0;\n facets.forEach((facet) => {\n if (this.isLeaf(facet)) {\n leafs.push(facet);\n // @ts-ignore 允许调整\n facet.columnIndex = index;\n index++;\n }\n });\n\n leafs.forEach((facet) => {\n // @ts-ignore\n facet.columnValuesLength = leafs.length;\n });\n const maxLevel = this.cfg.fields.length;\n for (let i = maxLevel - 1; i >= 0; i--) {\n const levelFacets = this.getFacetsByLevel(facets, i);\n // var yIndex = maxLevel - i;\n for (const facet of levelFacets) {\n if (!this.isLeaf(facet)) {\n facet.originColIndex = facet.columnIndex;\n // @ts-ignore\n facet.columnIndex = this.getRegionIndex(facet.children);\n // @ts-ignore\n facet.columnValuesLength = leafs.length;\n }\n }\n }\n }\n\n // get facet use level\n private getFacetsByLevel(facets: TreeData[], level: number) {\n const rst: TreeData[] = [];\n facets.forEach((facet) => {\n if (facet.rowIndex === level) {\n rst.push(facet);\n }\n });\n return rst;\n }\n\n // if the facet has children , make it's column index in the middle of it's children\n private getRegionIndex(children: TreeData[]) {\n const first = children[0];\n const last = children[children.length - 1];\n return (last.columnIndex - first.columnIndex) / 2 + first.columnIndex;\n }\n\n // is a leaf without children\n private isLeaf(facet: TreeData) {\n return !facet.children || !facet.children.length;\n }\n\n private getRows() {\n return this.cfg.fields.length + 1;\n }\n\n // get child\n private getChildFacets(data: Datum[], level: number, arr: TreeData[]) {\n // [ 'grade', 'class' ]\n const fields = this.cfg.fields;\n const length = fields.length;\n if (length < level) {\n return;\n }\n const rst = [];\n // get fist level except root node\n const field = fields[level - 1];\n // get field value\n const values = this.getFieldValues(data, field);\n values.forEach((value, index) => {\n const conditions = [{ field, value, values } as Condition];\n const subData = data.filter(this.getFacetDataFilter(conditions));\n if (subData.length) {\n const facet: TreeData = {\n type: this.cfg.type,\n data: subData,\n region: null,\n columnValue: value,\n rowValue: '',\n columnField: field,\n rowField: '',\n columnIndex: index,\n rowValuesLength: this.getRows(),\n columnValuesLength: 1,\n rowIndex: level,\n children: this.getChildFacets(subData, level + 1, arr),\n };\n rst.push(facet);\n arr.push(facet);\n }\n });\n return rst;\n }\n\n public render() {\n super.render();\n if (this.cfg.showTitle) {\n this.renderTitle();\n }\n }\n\n private afterChartRender = () => {\n if (this.facets && this.cfg.line) {\n this.container.clear();\n this.drawLines(this.facets);\n }\n };\n\n private renderTitle() {\n each(this.facets, (facet: TreeData) => {\n const { columnValue, view } = facet;\n const formatter = get(this.cfg.title, 'formatter');\n\n const config = deepMix(\n {\n position: ['50%', '0%'] as [string, string],\n content: formatter ? formatter(columnValue) : columnValue,\n },\n getFactTitleConfig(DIRECTION.TOP),\n this.cfg.title\n );\n\n view.annotation().text(config);\n });\n }\n\n private drawLines(facets: TreeData[]) {\n facets.forEach((facet) => {\n if (!this.isLeaf(facet)) {\n const children = facet.children;\n this.addFacetLines(facet, children);\n }\n });\n }\n\n // add lines with it's children\n private addFacetLines(facet: TreeData, children: TreeData[]) {\n const view = facet.view;\n const region = view.coordinateBBox;\n // top, right, bottom, left\n const start = {\n x: region.x + region.width / 2,\n y: region.y + region.height,\n };\n\n children.forEach((subFacet) => {\n const subRegion = subFacet.view.coordinateBBox;\n const end = {\n x: subRegion.bl.x + (subRegion.tr.x - subRegion.bl.x) / 2,\n y: subRegion.tr.y,\n };\n\n const middle1 = {\n x: start.x,\n y: start.y + (end.y - start.y) / 2,\n };\n const middle2 = {\n x: end.x,\n y: middle1.y,\n };\n this.drawLine([start, middle1, middle2, end]);\n });\n }\n\n private getPath(points) {\n const path = [];\n const smooth = this.cfg.line.smooth;\n if (smooth) {\n path.push(['M', points[0].x, points[0].y]);\n path.push(['C', points[1].x, points[1].y, points[2].x, points[2].y, points[3].x, points[3].y]);\n } else {\n points.forEach((point, index) => {\n if (index === 0) {\n path.push(['M', point.x, point.y]);\n } else {\n path.push(['L', point.x, point.y]);\n }\n });\n }\n\n return path;\n }\n\n // draw line width points\n private drawLine(points) {\n const path = this.getPath(points);\n const line = this.cfg.line.style;\n this.container.addShape('path', {\n attrs: assign(\n {\n // @ts-ignore\n path,\n },\n line\n ),\n });\n }\n\n protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: TreeData): object {\n if (facet.rowIndex !== facet.rowValuesLength - 1) {\n return {\n ...option,\n title: null,\n label: null,\n };\n }\n return option;\n }\n\n protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: TreeData): object {\n if (facet.originColIndex !== 0 && facet.columnIndex !== 0) {\n return {\n ...option,\n title: null,\n label: null,\n };\n }\n return option;\n }\n}\n"]}
@@ -0,0 +1,46 @@
1
+ import { MappingDatum } from '../interface';
2
+ import Path, { PathCfg } from './path';
3
+ import './shape/area';
4
+ /** Area 几何标记构造函数参数 */
5
+ export interface AreaCfg extends PathCfg {
6
+ /**
7
+ * 面积图是否从 0 基准线开始填充。
8
+ * 1. 默认值为 `true`,表现如下:
9
+ * ![image](https://gw.alipayobjects.com/zos/rmsportal/ZQqwUCczalrKqGgagOVp.png)
10
+ * 2. 当值为 `false` 时,表现如下:
11
+ * ![image](https://gw.alipayobjects.com/zos/rmsportal/yPswkaXvUpCYOdhocGwB.png)
12
+ */
13
+ startOnZero?: boolean;
14
+ }
15
+ /**
16
+ * Area 几何标记类。
17
+ * 常用于绘制面积图。
18
+ */
19
+ export default class Area extends Path {
20
+ readonly type: string;
21
+ readonly shapeType: string;
22
+ /** 生成图形关键点 */
23
+ readonly generatePoints: boolean;
24
+ /**
25
+ * 面积图是否从 0 基准线开始填充。
26
+ * 1. 默认值为 `true`,表现如下:
27
+ * ![image](https://gw.alipayobjects.com/zos/rmsportal/ZQqwUCczalrKqGgagOVp.png)
28
+ * 2. 当值为 `false` 时,表现如下:
29
+ * ![image](https://gw.alipayobjects.com/zos/rmsportal/yPswkaXvUpCYOdhocGwB.png)
30
+ */
31
+ readonly startOnZero: boolean;
32
+ constructor(cfg: AreaCfg);
33
+ /**
34
+ * 获取图形绘制的关键点以及数据
35
+ * @param mappingData 映射后的数据
36
+ */
37
+ protected getPointsAndData(mappingData: MappingDatum[]): {
38
+ points: any[];
39
+ data: any[];
40
+ };
41
+ /**
42
+ * 获取 Y 轴上的最小值
43
+ * @returns y 字段最小值
44
+ */
45
+ protected getYMinValue(): number;
46
+ }
@@ -0,0 +1,62 @@
1
+ import { __extends } from "tslib";
2
+ import { FIELD_ORIGIN } from '../constant';
3
+ import Path from './path';
4
+ import './shape/area';
5
+ /**
6
+ * Area 几何标记类。
7
+ * 常用于绘制面积图。
8
+ */
9
+ var Area = /** @class */ (function (_super) {
10
+ __extends(Area, _super);
11
+ function Area(cfg) {
12
+ var _this = _super.call(this, cfg) || this;
13
+ _this.type = 'area';
14
+ _this.shapeType = 'area';
15
+ /** 生成图形关键点 */
16
+ _this.generatePoints = true;
17
+ /**
18
+ * 面积图是否从 0 基准线开始填充。
19
+ * 1. 默认值为 `true`,表现如下:
20
+ * ![image](https://gw.alipayobjects.com/zos/rmsportal/ZQqwUCczalrKqGgagOVp.png)
21
+ * 2. 当值为 `false` 时,表现如下:
22
+ * ![image](https://gw.alipayobjects.com/zos/rmsportal/yPswkaXvUpCYOdhocGwB.png)
23
+ */
24
+ _this.startOnZero = true;
25
+ var _a = cfg.startOnZero, startOnZero = _a === void 0 ? true : _a, _b = cfg.sortable, sortable = _b === void 0 ? false : _b, _c = cfg.showSinglePoint, showSinglePoint = _c === void 0 ? false : _c;
26
+ _this.startOnZero = startOnZero; // 默认为 true
27
+ _this.sortable = sortable; // 关闭默认的 X 轴数据排序
28
+ _this.showSinglePoint = showSinglePoint;
29
+ return _this;
30
+ }
31
+ /**
32
+ * 获取图形绘制的关键点以及数据
33
+ * @param mappingData 映射后的数据
34
+ */
35
+ Area.prototype.getPointsAndData = function (mappingData) {
36
+ var points = [];
37
+ var data = [];
38
+ for (var i = 0, len = mappingData.length; i < len; i++) {
39
+ var obj = mappingData[i];
40
+ points.push(obj.points);
41
+ data.push(obj[FIELD_ORIGIN]);
42
+ }
43
+ return {
44
+ points: points,
45
+ data: data,
46
+ };
47
+ };
48
+ /**
49
+ * 获取 Y 轴上的最小值
50
+ * @returns y 字段最小值
51
+ */
52
+ Area.prototype.getYMinValue = function () {
53
+ if (this.startOnZero) {
54
+ return _super.prototype.getYMinValue.call(this);
55
+ }
56
+ var yScale = this.getYScale();
57
+ return yScale.min;
58
+ };
59
+ return Area;
60
+ }(Path));
61
+ export default Area;
62
+ //# sourceMappingURL=area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area.js","sourceRoot":"","sources":["../../src/geometry/area.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,IAAiB,MAAM,QAAQ,CAAC;AACvC,OAAO,cAAc,CAAC;AActB;;;GAGG;AACH;IAAkC,wBAAI;IAcpC,cAAY,GAAY;QAAxB,YACE,kBAAM,GAAG,CAAC,SAMX;QApBe,UAAI,GAAW,MAAM,CAAC;QACtB,eAAS,GAAW,MAAM,CAAC;QAC3C,cAAc;QACE,oBAAc,GAAY,IAAI,CAAC;QAC/C;;;;;;WAMG;QACa,iBAAW,GAAY,IAAI,CAAC;QAKlC,IAAA,KAAkE,GAAG,YAAnD,EAAlB,WAAW,mBAAG,IAAI,KAAA,EAAE,KAA8C,GAAG,SAAjC,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAAE,KAA4B,GAAG,gBAAR,EAAvB,eAAe,mBAAG,KAAK,KAAA,CAAS;QAC9E,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC,WAAW;QAC3C,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,gBAAgB;QAC1C,KAAI,CAAC,eAAe,GAAG,eAAe,CAAC;;IACzC,CAAC;IAED;;;OAGG;IACO,+BAAgB,GAA1B,UAA2B,WAA2B;QACpD,IAAM,MAAM,GAAG,EAAE,CAAC;QAClB,IAAM,IAAI,GAAG,EAAE,CAAC;QAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YACtD,IAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;SAC9B;QAED,OAAO;YACL,MAAM,QAAA;YACN,IAAI,MAAA;SACL,CAAC;IACJ,CAAC;IAED;;;OAGG;IACO,2BAAY,GAAtB;QACE,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,OAAO,iBAAM,YAAY,WAAE,CAAC;SAC7B;QACD,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,GAAG,CAAC;IACpB,CAAC;IACH,WAAC;AAAD,CAAC,AAtDD,CAAkC,IAAI,GAsDrC","sourcesContent":["import { FIELD_ORIGIN } from '../constant';\nimport { MappingDatum } from '../interface';\nimport Path, { PathCfg } from './path';\nimport './shape/area';\n\n/** Area 几何标记构造函数参数 */\nexport interface AreaCfg extends PathCfg {\n /**\n * 面积图是否从 0 基准线开始填充。\n * 1. 默认值为 `true`,表现如下:\n * ![image](https://gw.alipayobjects.com/zos/rmsportal/ZQqwUCczalrKqGgagOVp.png)\n * 2. 当值为 `false` 时,表现如下:\n * ![image](https://gw.alipayobjects.com/zos/rmsportal/yPswkaXvUpCYOdhocGwB.png)\n */\n startOnZero?: boolean;\n}\n\n/**\n * Area 几何标记类。\n * 常用于绘制面积图。\n */\nexport default class Area extends Path {\n public readonly type: string = 'area';\n public readonly shapeType: string = 'area';\n /** 生成图形关键点 */\n public readonly generatePoints: boolean = true;\n /**\n * 面积图是否从 0 基准线开始填充。\n * 1. 默认值为 `true`,表现如下:\n * ![image](https://gw.alipayobjects.com/zos/rmsportal/ZQqwUCczalrKqGgagOVp.png)\n * 2. 当值为 `false` 时,表现如下:\n * ![image](https://gw.alipayobjects.com/zos/rmsportal/yPswkaXvUpCYOdhocGwB.png)\n */\n public readonly startOnZero: boolean = true;\n\n constructor(cfg: AreaCfg) {\n super(cfg);\n\n const { startOnZero = true, sortable = false, showSinglePoint = false } = cfg;\n this.startOnZero = startOnZero; // 默认为 true\n this.sortable = sortable; // 关闭默认的 X 轴数据排序\n this.showSinglePoint = showSinglePoint;\n }\n\n /**\n * 获取图形绘制的关键点以及数据\n * @param mappingData 映射后的数据\n */\n protected getPointsAndData(mappingData: MappingDatum[]) {\n const points = [];\n const data = [];\n\n for (let i = 0, len = mappingData.length; i < len; i++) {\n const obj = mappingData[i];\n points.push(obj.points);\n data.push(obj[FIELD_ORIGIN]);\n }\n\n return {\n points,\n data,\n };\n }\n\n /**\n * 获取 Y 轴上的最小值\n * @returns y 字段最小值\n */\n protected getYMinValue(): number {\n if (this.startOnZero) {\n return super.getYMinValue();\n }\n const yScale = this.getYScale();\n return yScale.min;\n }\n}\n"]}