@visactor/vrender-components 0.15.0-alpha.5 → 0.15.0

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 (381) hide show
  1. package/cjs/axis/animate/group-fade.js.map +1 -1
  2. package/cjs/axis/animate/group-transition.js.map +1 -1
  3. package/cjs/axis/animate/index.js.map +1 -1
  4. package/cjs/axis/base.js.map +1 -1
  5. package/cjs/axis/circle.js.map +1 -1
  6. package/cjs/axis/config.js.map +1 -1
  7. package/cjs/axis/constant.js.map +1 -1
  8. package/cjs/axis/grid/base.js.map +1 -1
  9. package/cjs/axis/grid/circle.js.map +1 -1
  10. package/cjs/axis/grid/index.js.map +1 -1
  11. package/cjs/axis/grid/line.js.map +1 -1
  12. package/cjs/axis/grid/type.js.map +1 -1
  13. package/cjs/axis/index.js.map +1 -1
  14. package/cjs/axis/line.js +50 -1
  15. package/cjs/axis/line.js.map +1 -1
  16. package/cjs/axis/mixin/circle.js.map +1 -1
  17. package/cjs/axis/mixin/line.js.map +1 -1
  18. package/cjs/axis/overlap/auto-hide.js.map +1 -1
  19. package/cjs/axis/overlap/auto-limit.js.map +1 -1
  20. package/cjs/axis/overlap/auto-rotate.js +2 -2
  21. package/cjs/axis/overlap/auto-rotate.js.map +1 -1
  22. package/cjs/axis/type.d.ts +1 -0
  23. package/cjs/axis/type.js.map +1 -1
  24. package/cjs/brush/brush.d.ts +1 -0
  25. package/cjs/brush/brush.js +5 -0
  26. package/cjs/brush/brush.js.map +1 -1
  27. package/cjs/brush/config.js.map +1 -1
  28. package/cjs/brush/index.js.map +1 -1
  29. package/cjs/brush/type.js.map +1 -1
  30. package/cjs/constant.js.map +1 -1
  31. package/cjs/core/base.d.ts +2 -1
  32. package/cjs/core/base.js +4 -2
  33. package/cjs/core/base.js.map +1 -1
  34. package/cjs/core/type.js.map +1 -1
  35. package/cjs/crosshair/base.js.map +1 -1
  36. package/cjs/crosshair/circle.js.map +1 -1
  37. package/cjs/crosshair/index.js.map +1 -1
  38. package/cjs/crosshair/line.js.map +1 -1
  39. package/cjs/crosshair/polygon.js.map +1 -1
  40. package/cjs/crosshair/rect.js.map +1 -1
  41. package/cjs/crosshair/sector.js.map +1 -1
  42. package/cjs/crosshair/type.js.map +1 -1
  43. package/cjs/data-zoom/config.js.map +1 -1
  44. package/cjs/data-zoom/data-zoom.js.map +1 -1
  45. package/cjs/data-zoom/index.js.map +1 -1
  46. package/cjs/data-zoom/type.js.map +1 -1
  47. package/cjs/index.d.ts +1 -1
  48. package/cjs/index.js +1 -1
  49. package/cjs/index.js.map +1 -1
  50. package/cjs/indicator/config.js.map +1 -1
  51. package/cjs/indicator/index.js.map +1 -1
  52. package/cjs/indicator/indicator.js.map +1 -1
  53. package/cjs/indicator/type.js.map +1 -1
  54. package/cjs/interface.js.map +1 -1
  55. package/cjs/jsx/component-type.js.map +1 -1
  56. package/cjs/jsx/index.js.map +1 -1
  57. package/cjs/label/animate/animate.js.map +1 -1
  58. package/cjs/label/animate/index.js.map +1 -1
  59. package/cjs/label/arc.d.ts +7 -3
  60. package/cjs/label/arc.js +66 -10
  61. package/cjs/label/arc.js.map +1 -1
  62. package/cjs/label/base.d.ts +12 -9
  63. package/cjs/label/base.js +123 -137
  64. package/cjs/label/base.js.map +1 -1
  65. package/cjs/label/dataLabel.js +4 -4
  66. package/cjs/label/dataLabel.js.map +1 -1
  67. package/cjs/label/index.js.map +1 -1
  68. package/cjs/label/line.js.map +1 -1
  69. package/cjs/label/overlap/bitmap.js.map +1 -1
  70. package/cjs/label/overlap/index.js.map +1 -1
  71. package/cjs/label/overlap/place.d.ts +2 -2
  72. package/cjs/label/overlap/place.js +15 -8
  73. package/cjs/label/overlap/place.js.map +1 -1
  74. package/cjs/label/overlap/scaler.js.map +1 -1
  75. package/cjs/label/polygon.d.ts +12 -0
  76. package/cjs/label/polygon.js +35 -0
  77. package/cjs/label/polygon.js.map +1 -0
  78. package/cjs/label/rect.js.map +1 -1
  79. package/cjs/label/symbol.js.map +1 -1
  80. package/cjs/label/type.d.ts +9 -5
  81. package/cjs/label/type.js.map +1 -1
  82. package/cjs/label/util.js.map +1 -1
  83. package/cjs/legend/base.js.map +1 -1
  84. package/cjs/legend/color/color.js.map +1 -1
  85. package/cjs/legend/color/index.js.map +1 -1
  86. package/cjs/legend/color/type.js.map +1 -1
  87. package/cjs/legend/constant.js.map +1 -1
  88. package/cjs/legend/discrete/discrete.js +28 -27
  89. package/cjs/legend/discrete/discrete.js.map +1 -1
  90. package/cjs/legend/discrete/index.js.map +1 -1
  91. package/cjs/legend/discrete/type.js.map +1 -1
  92. package/cjs/legend/index.js.map +1 -1
  93. package/cjs/legend/size/index.js.map +1 -1
  94. package/cjs/legend/size/size.js.map +1 -1
  95. package/cjs/legend/size/type.js.map +1 -1
  96. package/cjs/legend/type.js.map +1 -1
  97. package/cjs/link-path/index.js +1 -2
  98. package/cjs/link-path/index.js.map +1 -1
  99. package/cjs/link-path/link-path.js +2 -1
  100. package/cjs/link-path/link-path.js.map +1 -1
  101. package/cjs/link-path/type.js.map +1 -1
  102. package/cjs/marker/area.js.map +1 -1
  103. package/cjs/marker/base.js.map +1 -1
  104. package/cjs/marker/config.js.map +1 -1
  105. package/cjs/marker/index.js.map +1 -1
  106. package/cjs/marker/line.js.map +1 -1
  107. package/cjs/marker/point.js +1 -1
  108. package/cjs/marker/point.js.map +1 -1
  109. package/cjs/marker/type.js.map +1 -1
  110. package/cjs/pager/index.js.map +1 -1
  111. package/cjs/pager/pager.js +4 -2
  112. package/cjs/pager/pager.js.map +1 -1
  113. package/cjs/pager/type.js.map +1 -1
  114. package/cjs/player/base-player.d.ts +9 -1
  115. package/cjs/player/base-player.js +25 -22
  116. package/cjs/player/base-player.js.map +1 -1
  117. package/cjs/player/constant.d.ts +1 -0
  118. package/cjs/player/constant.js +1 -0
  119. package/cjs/player/constant.js.map +1 -1
  120. package/cjs/player/continuous-player.js +6 -6
  121. package/cjs/player/continuous-player.js.map +1 -1
  122. package/cjs/player/controller/assets/index.js.map +1 -1
  123. package/cjs/player/controller/constant.js.map +1 -1
  124. package/cjs/player/controller/controller.d.ts +2 -2
  125. package/cjs/player/controller/controller.js +15 -7
  126. package/cjs/player/controller/controller.js.map +1 -1
  127. package/cjs/player/controller/icon/icon.js.map +1 -1
  128. package/cjs/player/controller/icon/index.js.map +1 -1
  129. package/cjs/player/controller/icon/type.js.map +1 -1
  130. package/cjs/player/controller/index.js.map +1 -1
  131. package/cjs/player/controller/type.d.ts +14 -6
  132. package/cjs/player/controller/type.js.map +1 -1
  133. package/cjs/player/discrete-player.js +11 -11
  134. package/cjs/player/discrete-player.js.map +1 -1
  135. package/cjs/player/index.js.map +1 -1
  136. package/cjs/player/type/base.js.map +1 -1
  137. package/cjs/player/type/continuous-player.d.ts +2 -2
  138. package/cjs/player/type/continuous-player.js.map +1 -1
  139. package/cjs/player/type/direction.js.map +1 -1
  140. package/cjs/player/type/discrete-player.js.map +1 -1
  141. package/cjs/player/type/event.d.ts +12 -6
  142. package/cjs/player/type/event.js +5 -3
  143. package/cjs/player/type/event.js.map +1 -1
  144. package/cjs/player/type/index.js.map +1 -1
  145. package/cjs/player/type/layout.d.ts +5 -2
  146. package/cjs/player/type/layout.js.map +1 -1
  147. package/cjs/player/utils.js.map +1 -1
  148. package/cjs/poptip/contribution.js +3 -1
  149. package/cjs/poptip/contribution.js.map +1 -1
  150. package/cjs/poptip/index.js.map +1 -1
  151. package/cjs/poptip/poptip-plugin.js.map +1 -1
  152. package/cjs/poptip/poptip.js +30 -11
  153. package/cjs/poptip/poptip.js.map +1 -1
  154. package/cjs/poptip/register.d.ts +1 -1
  155. package/cjs/poptip/register.js +8 -6
  156. package/cjs/poptip/register.js.map +1 -1
  157. package/cjs/poptip/theme.js.map +1 -1
  158. package/cjs/poptip/type.d.ts +3 -0
  159. package/cjs/poptip/type.js.map +1 -1
  160. package/cjs/scrollbar/index.js.map +1 -1
  161. package/cjs/scrollbar/scrollbar.js.map +1 -1
  162. package/cjs/scrollbar/type.js.map +1 -1
  163. package/cjs/segment/index.js.map +1 -1
  164. package/cjs/segment/segment.js.map +1 -1
  165. package/cjs/segment/type.js.map +1 -1
  166. package/cjs/slider/constant.js.map +1 -1
  167. package/cjs/slider/index.js.map +1 -1
  168. package/cjs/slider/slider.js.map +1 -1
  169. package/cjs/slider/type.js.map +1 -1
  170. package/cjs/tag/index.js.map +1 -1
  171. package/cjs/tag/tag.js.map +1 -1
  172. package/cjs/tag/type.js.map +1 -1
  173. package/cjs/title/index.js.map +1 -1
  174. package/cjs/title/title.js.map +1 -1
  175. package/cjs/title/type.js.map +1 -1
  176. package/cjs/tooltip/config.js.map +1 -1
  177. package/cjs/tooltip/index.js.map +1 -1
  178. package/cjs/tooltip/tooltip.js.map +1 -1
  179. package/cjs/tooltip/type.js.map +1 -1
  180. package/cjs/tooltip/util.js.map +1 -1
  181. package/cjs/util/align.js.map +1 -1
  182. package/cjs/util/common.js.map +1 -1
  183. package/cjs/util/index.js.map +1 -1
  184. package/cjs/util/labelSmartInvert.d.ts +1 -0
  185. package/cjs/util/labelSmartInvert.js +20 -2
  186. package/cjs/util/labelSmartInvert.js.map +1 -1
  187. package/cjs/util/matrix.js.map +1 -1
  188. package/cjs/util/text.js +3 -3
  189. package/cjs/util/text.js.map +1 -1
  190. package/dist/index.js +500 -304
  191. package/dist/index.min.js +1 -1
  192. package/es/axis/animate/group-fade.js.map +1 -1
  193. package/es/axis/animate/group-transition.js.map +1 -1
  194. package/es/axis/animate/index.js.map +1 -1
  195. package/es/axis/base.js.map +1 -1
  196. package/es/axis/circle.js.map +1 -1
  197. package/es/axis/config.js.map +1 -1
  198. package/es/axis/constant.js.map +1 -1
  199. package/es/axis/grid/base.js.map +1 -1
  200. package/es/axis/grid/circle.js.map +1 -1
  201. package/es/axis/grid/index.js.map +1 -1
  202. package/es/axis/grid/line.js.map +1 -1
  203. package/es/axis/grid/type.js.map +1 -1
  204. package/es/axis/index.js.map +1 -1
  205. package/es/axis/line.js +50 -2
  206. package/es/axis/line.js.map +1 -1
  207. package/es/axis/mixin/circle.js.map +1 -1
  208. package/es/axis/mixin/line.js.map +1 -1
  209. package/es/axis/overlap/auto-hide.js.map +1 -1
  210. package/es/axis/overlap/auto-limit.js.map +1 -1
  211. package/es/axis/overlap/auto-rotate.js +2 -2
  212. package/es/axis/overlap/auto-rotate.js.map +1 -1
  213. package/es/axis/type.d.ts +1 -0
  214. package/es/axis/type.js.map +1 -1
  215. package/es/brush/brush.d.ts +1 -0
  216. package/es/brush/brush.js +5 -0
  217. package/es/brush/brush.js.map +1 -1
  218. package/es/brush/config.js.map +1 -1
  219. package/es/brush/index.js.map +1 -1
  220. package/es/brush/type.js.map +1 -1
  221. package/es/constant.js.map +1 -1
  222. package/es/core/base.d.ts +2 -1
  223. package/es/core/base.js +3 -3
  224. package/es/core/base.js.map +1 -1
  225. package/es/core/type.js.map +1 -1
  226. package/es/crosshair/base.js.map +1 -1
  227. package/es/crosshair/circle.js.map +1 -1
  228. package/es/crosshair/index.js.map +1 -1
  229. package/es/crosshair/line.js.map +1 -1
  230. package/es/crosshair/polygon.js.map +1 -1
  231. package/es/crosshair/rect.js.map +1 -1
  232. package/es/crosshair/sector.js.map +1 -1
  233. package/es/crosshair/type.js.map +1 -1
  234. package/es/data-zoom/config.js.map +1 -1
  235. package/es/data-zoom/data-zoom.js.map +1 -1
  236. package/es/data-zoom/index.js.map +1 -1
  237. package/es/data-zoom/type.js.map +1 -1
  238. package/es/index.d.ts +1 -1
  239. package/es/index.js +1 -1
  240. package/es/index.js.map +1 -1
  241. package/es/indicator/config.js.map +1 -1
  242. package/es/indicator/index.js.map +1 -1
  243. package/es/indicator/indicator.js.map +1 -1
  244. package/es/indicator/type.js.map +1 -1
  245. package/es/interface.js.map +1 -1
  246. package/es/jsx/component-type.js.map +1 -1
  247. package/es/jsx/index.js.map +1 -1
  248. package/es/label/animate/animate.js.map +1 -1
  249. package/es/label/animate/index.js.map +1 -1
  250. package/es/label/arc.d.ts +7 -3
  251. package/es/label/arc.js +66 -9
  252. package/es/label/arc.js.map +1 -1
  253. package/es/label/base.d.ts +12 -9
  254. package/es/label/base.js +124 -135
  255. package/es/label/base.js.map +1 -1
  256. package/es/label/dataLabel.js +5 -3
  257. package/es/label/dataLabel.js.map +1 -1
  258. package/es/label/index.js.map +1 -1
  259. package/es/label/line.js.map +1 -1
  260. package/es/label/overlap/bitmap.js.map +1 -1
  261. package/es/label/overlap/index.js.map +1 -1
  262. package/es/label/overlap/place.d.ts +2 -2
  263. package/es/label/overlap/place.js +15 -8
  264. package/es/label/overlap/place.js.map +1 -1
  265. package/es/label/overlap/scaler.js.map +1 -1
  266. package/es/label/polygon.d.ts +12 -0
  267. package/es/label/polygon.js +31 -0
  268. package/es/label/polygon.js.map +1 -0
  269. package/es/label/rect.js.map +1 -1
  270. package/es/label/symbol.js.map +1 -1
  271. package/es/label/type.d.ts +9 -5
  272. package/es/label/type.js.map +1 -1
  273. package/es/label/util.js.map +1 -1
  274. package/es/legend/base.js.map +1 -1
  275. package/es/legend/color/color.js.map +1 -1
  276. package/es/legend/color/index.js.map +1 -1
  277. package/es/legend/color/type.js.map +1 -1
  278. package/es/legend/constant.js.map +1 -1
  279. package/es/legend/discrete/discrete.js +26 -25
  280. package/es/legend/discrete/discrete.js.map +1 -1
  281. package/es/legend/discrete/index.js.map +1 -1
  282. package/es/legend/discrete/type.js.map +1 -1
  283. package/es/legend/index.js.map +1 -1
  284. package/es/legend/size/index.js.map +1 -1
  285. package/es/legend/size/size.js.map +1 -1
  286. package/es/legend/size/type.js.map +1 -1
  287. package/es/legend/type.js.map +1 -1
  288. package/es/link-path/index.js +1 -2
  289. package/es/link-path/index.js.map +1 -1
  290. package/es/link-path/link-path.js +2 -1
  291. package/es/link-path/link-path.js.map +1 -1
  292. package/es/link-path/type.js.map +1 -1
  293. package/es/marker/area.js.map +1 -1
  294. package/es/marker/base.js.map +1 -1
  295. package/es/marker/config.js.map +1 -1
  296. package/es/marker/index.js.map +1 -1
  297. package/es/marker/line.js.map +1 -1
  298. package/es/marker/point.js +1 -1
  299. package/es/marker/point.js.map +1 -1
  300. package/es/marker/type.js.map +1 -1
  301. package/es/pager/index.js.map +1 -1
  302. package/es/pager/pager.js +4 -2
  303. package/es/pager/pager.js.map +1 -1
  304. package/es/pager/type.js.map +1 -1
  305. package/es/player/base-player.d.ts +9 -1
  306. package/es/player/base-player.js +25 -22
  307. package/es/player/base-player.js.map +1 -1
  308. package/es/player/constant.d.ts +1 -0
  309. package/es/player/constant.js +1 -0
  310. package/es/player/constant.js.map +1 -1
  311. package/es/player/continuous-player.js +6 -6
  312. package/es/player/continuous-player.js.map +1 -1
  313. package/es/player/controller/assets/index.js.map +1 -1
  314. package/es/player/controller/constant.js.map +1 -1
  315. package/es/player/controller/controller.d.ts +2 -2
  316. package/es/player/controller/controller.js +15 -7
  317. package/es/player/controller/controller.js.map +1 -1
  318. package/es/player/controller/icon/icon.js.map +1 -1
  319. package/es/player/controller/icon/index.js.map +1 -1
  320. package/es/player/controller/icon/type.js.map +1 -1
  321. package/es/player/controller/index.js.map +1 -1
  322. package/es/player/controller/type.d.ts +14 -6
  323. package/es/player/controller/type.js.map +1 -1
  324. package/es/player/discrete-player.js +10 -10
  325. package/es/player/discrete-player.js.map +1 -1
  326. package/es/player/index.js.map +1 -1
  327. package/es/player/type/base.js.map +1 -1
  328. package/es/player/type/continuous-player.d.ts +2 -2
  329. package/es/player/type/continuous-player.js.map +1 -1
  330. package/es/player/type/direction.js.map +1 -1
  331. package/es/player/type/discrete-player.js.map +1 -1
  332. package/es/player/type/event.d.ts +12 -6
  333. package/es/player/type/event.js +5 -3
  334. package/es/player/type/event.js.map +1 -1
  335. package/es/player/type/index.js.map +1 -1
  336. package/es/player/type/layout.d.ts +5 -2
  337. package/es/player/type/layout.js.map +1 -1
  338. package/es/player/utils.js.map +1 -1
  339. package/es/poptip/contribution.js +3 -1
  340. package/es/poptip/contribution.js.map +1 -1
  341. package/es/poptip/index.js.map +1 -1
  342. package/es/poptip/poptip-plugin.js.map +1 -1
  343. package/es/poptip/poptip.js +31 -9
  344. package/es/poptip/poptip.js.map +1 -1
  345. package/es/poptip/register.d.ts +1 -1
  346. package/es/poptip/register.js +7 -6
  347. package/es/poptip/register.js.map +1 -1
  348. package/es/poptip/theme.js.map +1 -1
  349. package/es/poptip/type.d.ts +3 -0
  350. package/es/poptip/type.js.map +1 -1
  351. package/es/scrollbar/index.js.map +1 -1
  352. package/es/scrollbar/scrollbar.js.map +1 -1
  353. package/es/scrollbar/type.js.map +1 -1
  354. package/es/segment/index.js.map +1 -1
  355. package/es/segment/segment.js.map +1 -1
  356. package/es/segment/type.js.map +1 -1
  357. package/es/slider/constant.js.map +1 -1
  358. package/es/slider/index.js.map +1 -1
  359. package/es/slider/slider.js.map +1 -1
  360. package/es/slider/type.js.map +1 -1
  361. package/es/tag/index.js.map +1 -1
  362. package/es/tag/tag.js.map +1 -1
  363. package/es/tag/type.js.map +1 -1
  364. package/es/title/index.js.map +1 -1
  365. package/es/title/title.js.map +1 -1
  366. package/es/title/type.js.map +1 -1
  367. package/es/tooltip/config.js.map +1 -1
  368. package/es/tooltip/index.js.map +1 -1
  369. package/es/tooltip/tooltip.js.map +1 -1
  370. package/es/tooltip/type.js.map +1 -1
  371. package/es/tooltip/util.js.map +1 -1
  372. package/es/util/align.js.map +1 -1
  373. package/es/util/common.js.map +1 -1
  374. package/es/util/index.js.map +1 -1
  375. package/es/util/labelSmartInvert.d.ts +1 -0
  376. package/es/util/labelSmartInvert.js +17 -0
  377. package/es/util/labelSmartInvert.js.map +1 -1
  378. package/es/util/matrix.js.map +1 -1
  379. package/es/util/text.js +3 -3
  380. package/es/util/text.js.map +1 -1
  381. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["data-zoom/type.ts"],"names":[],"mappings":"","file":"type.js","sourcesContent":["import type {\n IAreaGraphicAttribute,\n ICurveType,\n IGroupGraphicAttribute,\n ILineGraphicAttribute,\n IRectGraphicAttribute,\n ISymbolGraphicAttribute\n} from '@visactor/vrender';\nimport type { IPointLike } from '@visactor/vutils';\nimport type { OrientType } from '../interface';\nimport type { TagAttributes } from '../tag';\n\nexport interface DataZoomAttributes extends IGroupGraphicAttribute {\n /**\n * DataZoom位置\n */\n position: IPointLike;\n /**\n * DataZoom 尺寸\n */\n size: {\n width: number;\n height: number;\n };\n /**\n * DataZoom方向\n * @default 'bottom'\n */\n orient?: OrientType;\n\n /**\n * 起点配置(比例):范围[0, 1]\n * @default 0\n */\n start?: number;\n\n /**\n * 终点配置(比例):范围[0, 1]\n * @default 1\n */\n end?: number;\n\n /**\n * 背景样式\n */\n backgroundStyle?: IRectGraphicAttribute;\n\n /**\n * 起点手柄样式\n */\n startHandlerStyle?: ISymbolGraphicAttribute;\n\n /**\n * 中间手柄样式\n */\n middleHandlerStyle?: {\n /**\n * 是否显示\n * @default false\n */\n visible?: boolean;\n /**\n * 中间手柄的中间symbol样式\n */\n icon?: ISymbolGraphicAttribute;\n /**\n * 中间手柄的背景rect样式\n */\n background?: {\n style?: IRectGraphicAttribute;\n size?: number;\n };\n };\n\n /**\n * 终点手柄样式\n */\n endHandlerStyle?: ISymbolGraphicAttribute;\n\n /**\n * 起点文字样式\n */\n startTextStyle?: {\n formatMethod?: (text: string | number) => (string | number) | (string | number)[];\n } & Partial<TagAttributes>;\n\n /**\n * 终点文字样式\n */\n endTextStyle?: {\n formatMethod?: (text: string | number) => (string | number) | (string | number)[];\n } & Partial<TagAttributes>;\n\n /**\n * 选中背景样式\n */\n selectedBackgroundStyle?: IRectGraphicAttribute;\n\n /**\n * 拖拽进行中的选中背景样式\n */\n dragMaskStyle?: IRectGraphicAttribute;\n\n /**\n * 背景图表样式\n */\n backgroundChartStyle?: {\n line?: {\n visible?: boolean;\n } & ILineGraphicAttribute;\n area?: {\n /**\n * @default true\n */\n visible?: boolean;\n curveType?: ICurveType;\n } & Omit<IAreaGraphicAttribute, 'curveType'>;\n };\n\n /**\n * 选中的背景图表样式\n */\n selectedBackgroundChartStyle?: {\n line?: {\n /**\n * @default true\n */\n visible?: boolean;\n } & ILineGraphicAttribute;\n area?: {\n /**\n * @default true\n */\n visible?: boolean;\n curveType?: ICurveType;\n } & Omit<IAreaGraphicAttribute, 'curveType'>;\n };\n\n /**\n * 是否显示startText和endText\n * @default 'auto' 鼠标hover在选中区域时才显示startText和endText\n */\n showDetail?: 'auto' | boolean;\n\n /**\n * 是否开启框选, 如果不开启则支持selectedBackground拖拽(框选和拖拽两者互斥)\n * @default true\n */\n brushSelect?: boolean;\n\n /**\n * todo: 是否锁定选择区域(或叫做数据窗口)的大小\n */\n zoomLock?: boolean;\n\n /**\n * 绘制背景图表的数据 & 映射函数\n */\n previewData?: any[];\n previewCallbackX?: (datum: any) => number;\n previewCallbackY?: (datum: any) => number;\n previewCallbackX1?: (datum: any) => number;\n previewCallbackY1?: (datum: any) => number;\n updateStateCallback?: (start: number, end: number) => any;\n}\n"]}
1
+ {"version":3,"sources":["../src/data-zoom/type.ts"],"names":[],"mappings":"","file":"type.js","sourcesContent":["import type {\n IAreaGraphicAttribute,\n ICurveType,\n IGroupGraphicAttribute,\n ILineGraphicAttribute,\n IRectGraphicAttribute,\n ISymbolGraphicAttribute\n} from '@visactor/vrender';\nimport type { IPointLike } from '@visactor/vutils';\nimport type { OrientType } from '../interface';\nimport type { TagAttributes } from '../tag';\n\nexport interface DataZoomAttributes extends IGroupGraphicAttribute {\n /**\n * DataZoom位置\n */\n position: IPointLike;\n /**\n * DataZoom 尺寸\n */\n size: {\n width: number;\n height: number;\n };\n /**\n * DataZoom方向\n * @default 'bottom'\n */\n orient?: OrientType;\n\n /**\n * 起点配置(比例):范围[0, 1]\n * @default 0\n */\n start?: number;\n\n /**\n * 终点配置(比例):范围[0, 1]\n * @default 1\n */\n end?: number;\n\n /**\n * 背景样式\n */\n backgroundStyle?: IRectGraphicAttribute;\n\n /**\n * 起点手柄样式\n */\n startHandlerStyle?: ISymbolGraphicAttribute;\n\n /**\n * 中间手柄样式\n */\n middleHandlerStyle?: {\n /**\n * 是否显示\n * @default false\n */\n visible?: boolean;\n /**\n * 中间手柄的中间symbol样式\n */\n icon?: ISymbolGraphicAttribute;\n /**\n * 中间手柄的背景rect样式\n */\n background?: {\n style?: IRectGraphicAttribute;\n size?: number;\n };\n };\n\n /**\n * 终点手柄样式\n */\n endHandlerStyle?: ISymbolGraphicAttribute;\n\n /**\n * 起点文字样式\n */\n startTextStyle?: {\n formatMethod?: (text: string | number) => (string | number) | (string | number)[];\n } & Partial<TagAttributes>;\n\n /**\n * 终点文字样式\n */\n endTextStyle?: {\n formatMethod?: (text: string | number) => (string | number) | (string | number)[];\n } & Partial<TagAttributes>;\n\n /**\n * 选中背景样式\n */\n selectedBackgroundStyle?: IRectGraphicAttribute;\n\n /**\n * 拖拽进行中的选中背景样式\n */\n dragMaskStyle?: IRectGraphicAttribute;\n\n /**\n * 背景图表样式\n */\n backgroundChartStyle?: {\n line?: {\n visible?: boolean;\n } & ILineGraphicAttribute;\n area?: {\n /**\n * @default true\n */\n visible?: boolean;\n curveType?: ICurveType;\n } & Omit<IAreaGraphicAttribute, 'curveType'>;\n };\n\n /**\n * 选中的背景图表样式\n */\n selectedBackgroundChartStyle?: {\n line?: {\n /**\n * @default true\n */\n visible?: boolean;\n } & ILineGraphicAttribute;\n area?: {\n /**\n * @default true\n */\n visible?: boolean;\n curveType?: ICurveType;\n } & Omit<IAreaGraphicAttribute, 'curveType'>;\n };\n\n /**\n * 是否显示startText和endText\n * @default 'auto' 鼠标hover在选中区域时才显示startText和endText\n */\n showDetail?: 'auto' | boolean;\n\n /**\n * 是否开启框选, 如果不开启则支持selectedBackground拖拽(框选和拖拽两者互斥)\n * @default true\n */\n brushSelect?: boolean;\n\n /**\n * todo: 是否锁定选择区域(或叫做数据窗口)的大小\n */\n zoomLock?: boolean;\n\n /**\n * 绘制背景图表的数据 & 映射函数\n */\n previewData?: any[];\n previewCallbackX?: (datum: any) => number;\n previewCallbackY?: (datum: any) => number;\n previewCallbackX1?: (datum: any) => number;\n previewCallbackY1?: (datum: any) => number;\n updateStateCallback?: (start: number, end: number) => any;\n}\n"]}
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.15.0-alpha.5";
1
+ export declare const version = "0.15.0";
2
2
  export * from './core/base';
3
3
  export * from './scrollbar';
4
4
  export * from './tag';
package/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
17
17
 
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
- }), exports.version = void 0, exports.version = "0.15.0-alpha.5", __exportStar(require("./core/base"), exports),
20
+ }), exports.version = void 0, exports.version = "0.15.0", __exportStar(require("./core/base"), exports),
21
21
  __exportStar(require("./scrollbar"), exports), __exportStar(require("./tag"), exports),
22
22
  __exportStar(require("./poptip"), exports), __exportStar(require("./crosshair"), exports),
23
23
  __exportStar(require("./label"), exports), __exportStar(require("./axis"), exports),
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.15.0-alpha.5\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.15.0\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["indicator/config.ts"],"names":[],"mappings":";;;AACa,QAAA,uBAAuB,GAAiC;IACnE,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC","file":"config.js","sourcesContent":["import { IndicatorAttributes } from './type';\nexport const DEFAULT_INDICATOR_THEME: Partial<IndicatorAttributes> = {\n title: {\n style: {\n text: '',\n fontSize: 20,\n fill: 'black',\n fontWeight: 'normal',\n fillOpacity: 1,\n textBaseline: 'top',\n textAlign: 'center'\n }\n },\n content: {\n style: {\n text: '',\n fontSize: 16,\n fill: 'black',\n fontWeight: 'normal',\n fillOpacity: 1,\n textBaseline: 'top',\n textAlign: 'center'\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/indicator/config.ts"],"names":[],"mappings":";;;AACa,QAAA,uBAAuB,GAAiC;IACnE,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC","file":"config.js","sourcesContent":["import { IndicatorAttributes } from './type';\nexport const DEFAULT_INDICATOR_THEME: Partial<IndicatorAttributes> = {\n title: {\n style: {\n text: '',\n fontSize: 20,\n fill: 'black',\n fontWeight: 'normal',\n fillOpacity: 1,\n textBaseline: 'top',\n textAlign: 'center'\n }\n },\n content: {\n style: {\n text: '',\n fontSize: 16,\n fill: 'black',\n fontWeight: 'normal',\n fillOpacity: 1,\n textBaseline: 'top',\n textAlign: 'center'\n }\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["indicator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yCAAuB","file":"index.js","sourcesContent":["export * from './indicator';\nexport * from './type';\n"]}
1
+ {"version":3,"sources":["../src/indicator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yCAAuB","file":"index.js","sourcesContent":["export * from './indicator';\nexport * from './type';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["indicator/indicator.ts"],"names":[],"mappings":";;;AAIA,6CAA6E;AAC7E,uCAAiD;AACjD,kCAA0C;AAE1C,qCAAmD;AAEnD,MAAa,SAAU,SAAQ,wBAAgD;IAA/E;;QACE,SAAI,GAAG,WAAW,CAAC;IA0HrB,CAAC;IArHW,MAAM;;QACd,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAgC,CAAC;QAEvG,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;QAE7D,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,CAAW,CAAC;QAG5G,IAAI,OAAO,KAAK,IAAI,EAAE;YACpB,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO;SACR;QAED,IAAI,IAAA,gBAAO,EAAC,KAAK,CAAC,EAAE;YAClB,IAAI,KAAK,CAAC,OAAO,KAAK,KAAK,EAAE;g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AC,MAAA,iBAAiB,CAAC,UAAU,mCAAI,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;YAC5E,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAA,MAAA,iBAAiB,CAAC,KAAK,0CAAE,QAAQ,mCAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;YAC/E,aAAa,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACjD,aAAa,CAAC,YAAY,CACxB,YAAY,EACZ,IAAA,gBAAO,EAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAC5F,CAAC;SACH;IACH,CAAC;CACF;AA3HD,8BA2HC","file":"indicator.js","sourcesContent":["/**\n * @description 指标卡组件\n */\nimport { IGroup, INode, IText } from '@visactor/vrender';\nimport { merge, isValid, array, isValidNumber, get } from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport { measureTextSize } from '../util';\nimport { IndicatorAttributes, IndicatorItemSpec } from './type';\nimport { DEFAULT_INDICATOR_THEME } from './config';\n\nexport class Indicator extends AbstractComponent<Required<IndicatorAttributes>> {\n name = 'indicator';\n\n private _title?: IText;\n private _content?: IText | IText[];\n\n protected render() {\n const { visible, title, content, size, limitRatio = Infinity } = this.attribute as IndicatorAttributes;\n\n const limit = Math.min(size.width, size.height) * limitRatio;\n\n const group = this.createOrUpdateChild('indicator-container', { x: 0, y: 0, zIndex: 1 }, 'group') as IGroup;\n\n // 指标卡全部隐藏\n if (visible !== true) {\n group && group.hideAll();\n return;\n }\n\n if (isValid(title)) {\n if (title.visible !== false) {\n const titleStyle = merge({}, get(DEFAULT_INDICATOR_THEME, 'title.style'), title.style);\n this._title = group.createOrUpdateChild(\n 'indicator-title',\n {\n ...titleStyle,\n /**\n * 加入以下逻辑:如果没有声明lineHeight,默认 lineHeight 等于 fontSize\n * 因为如果不声明 vrender 底层会默认给文本加上 2px 的高度,会影响布局计算\n * 注意:在autoFit改变fontsize时,lineHeight也要同步修改\n */\n lineHeight: isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize,\n visible: title.visible,\n x: 0,\n y: 0\n },\n 'text'\n ) as IText;\n\n // auto-fit\n if (title.autoFit && isValidNumber(limit)) {\n this._setAutoFit(limit, this._title, title);\n }\n\n //auto-limit\n if (title.autoLimit && isValidNumber(limitRatio)) {\n this._title.setAttribute('maxLineWidth', limit);\n }\n } else {\n /**\n * indicator部分隐藏\n * 例如title隐藏了,content还保留。直接设置visible:false 计算group.AABBounts是错的,影响上下居中。\n * 这里把隐藏的nodes删除后,group.AABBounts计算才正确。\n */\n const titleNode = group.find(node => node.name === 'indicator-title', false);\n titleNode && group.removeChild(titleNode as INode);\n this._title = undefined;\n }\n }\n\n const titleHeight = this._title ? this._title.AABBBounds.height() : 0;\n\n if (isValid(content)) {\n const titleSpace = this._title ? (title?.space ? title.space : 0) : 0;\n const contents: IndicatorItemSpec[] = array(content);\n const contentComponents: IText[] = [];\n let lastContentHeight = 0;\n contents.forEach((contentItem, i) => {\n if (contentItem.visible !== false) {\n const contentStyle = merge({}, get(DEFAULT_INDICATOR_THEME, 'content.style'), contentItem.style);\n const contentComponent = group.createOrUpdateChild(\n 'indicator-content-' + i,\n {\n ...contentStyle,\n lineHeight: isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize,\n visible: contentItem.visible,\n x: 0,\n y: titleHeight + titleSpace + lastContentHeight\n },\n 'text'\n ) as IText;\n\n // auto-fit\n if (contentItem.autoFit && isValidNumber(limit)) {\n this._setAutoFit(limit, contentComponent, contentItem);\n }\n\n //auto-limit\n if (contentItem.autoLimit && isValidNumber(limitRatio)) {\n contentComponent.setAttribute('maxLineWidth', limit);\n }\n\n contentComponents.push(contentComponent);\n const contentSpace = contentItem?.space ? contentItem.space : 0;\n lastContentHeight += contentComponent.AABBBounds.height() + contentSpace;\n } else {\n /**\n * indicator部分隐藏\n */\n const contentItemNode = group.find(node => node.name === 'indicator-content-' + i, false);\n contentItemNode && group.removeChild(contentItemNode as INode);\n }\n });\n this._content = contentComponents;\n }\n\n const totalHeight = group?.AABBBounds.height() ?? 0;\n group.setAttribute('y', size.height / 2 - totalHeight / 2);\n group.setAttribute('x', size.width / 2);\n }\n\n private _setAutoFit(limit: number, indicatorItem: IText, indicatorItemSpec: IndicatorItemSpec) {\n const originWidth = measureTextSize(indicatorItemSpec.style?.text ?? '', indicatorItemSpec.style ?? {}).width;\n if (originWidth > 0) {\n const ratio = (limit * (indicatorItemSpec.fitPercent ?? 0.5)) / originWidth;\n const fontSize = Math.floor((indicatorItemSpec.style?.fontSize ?? 20) * ratio);\n indicatorItem.setAttribute('fontSize', fontSize);\n indicatorItem.setAttribute(\n 'lineHeight',\n isValid(indicatorItemSpec.style.lineHeight) ? indicatorItemSpec.style.lineHeight : fontSize\n );\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/indicator/indicator.ts"],"names":[],"mappings":";;;AAIA,6CAA6E;AAC7E,uCAAiD;AACjD,kCAA0C;AAE1C,qCAAmD;AAEnD,MAAa,SAAU,SAAQ,wBAAgD;IAA/E;;QACE,SAAI,GAAG,WAAW,CAAC;IA0HrB,CAAC;IArHW,MAAM;;QACd,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAgC,CAAC;QAEvG,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;QAE7D,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,CAAW,CAAC;QAG5G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iB,CAAC,KAAK,0CAAE,IAAI,mCAAI,EAAE,EAAE,MAAA,iBAAiB,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,KAAK,CAAC;QAC9G,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,MAAA,iBAAiB,CAAC,UAAU,mCAAI,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;YAC5E,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAA,MAAA,iBAAiB,CAAC,KAAK,0CAAE,QAAQ,mCAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;YAC/E,aAAa,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACjD,aAAa,CAAC,YAAY,CACxB,YAAY,EACZ,IAAA,gBAAO,EAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAC5F,CAAC;SACH;IACH,CAAC;CACF;AA3HD,8BA2HC","file":"indicator.js","sourcesContent":["/**\n * @description 指标卡组件\n */\nimport { IGroup, INode, IText } from '@visactor/vrender';\nimport { merge, isValid, array, isValidNumber, get } from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport { measureTextSize } from '../util';\nimport { IndicatorAttributes, IndicatorItemSpec } from './type';\nimport { DEFAULT_INDICATOR_THEME } from './config';\n\nexport class Indicator extends AbstractComponent<Required<IndicatorAttributes>> {\n name = 'indicator';\n\n private _title?: IText;\n private _content?: IText | IText[];\n\n protected render() {\n const { visible, title, content, size, limitRatio = Infinity } = this.attribute as IndicatorAttributes;\n\n const limit = Math.min(size.width, size.height) * limitRatio;\n\n const group = this.createOrUpdateChild('indicator-container', { x: 0, y: 0, zIndex: 1 }, 'group') as IGroup;\n\n // 指标卡全部隐藏\n if (visible !== true) {\n group && group.hideAll();\n return;\n }\n\n if (isValid(title)) {\n if (title.visible !== false) {\n const titleStyle = merge({}, get(DEFAULT_INDICATOR_THEME, 'title.style'), title.style);\n this._title = group.createOrUpdateChild(\n 'indicator-title',\n {\n ...titleStyle,\n /**\n * 加入以下逻辑:如果没有声明lineHeight,默认 lineHeight 等于 fontSize\n * 因为如果不声明 vrender 底层会默认给文本加上 2px 的高度,会影响布局计算\n * 注意:在autoFit改变fontsize时,lineHeight也要同步修改\n */\n lineHeight: isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize,\n visible: title.visible,\n x: 0,\n y: 0\n },\n 'text'\n ) as IText;\n\n // auto-fit\n if (title.autoFit && isValidNumber(limit)) {\n this._setAutoFit(limit, this._title, title);\n }\n\n //auto-limit\n if (title.autoLimit && isValidNumber(limitRatio)) {\n this._title.setAttribute('maxLineWidth', limit);\n }\n } else {\n /**\n * indicator部分隐藏\n * 例如title隐藏了,content还保留。直接设置visible:false 计算group.AABBounts是错的,影响上下居中。\n * 这里把隐藏的nodes删除后,group.AABBounts计算才正确。\n */\n const titleNode = group.find(node => node.name === 'indicator-title', false);\n titleNode && group.removeChild(titleNode as INode);\n this._title = undefined;\n }\n }\n\n const titleHeight = this._title ? this._title.AABBBounds.height() : 0;\n\n if (isValid(content)) {\n const titleSpace = this._title ? (title?.space ? title.space : 0) : 0;\n const contents: IndicatorItemSpec[] = array(content);\n const contentComponents: IText[] = [];\n let lastContentHeight = 0;\n contents.forEach((contentItem, i) => {\n if (contentItem.visible !== false) {\n const contentStyle = merge({}, get(DEFAULT_INDICATOR_THEME, 'content.style'), contentItem.style);\n const contentComponent = group.createOrUpdateChild(\n 'indicator-content-' + i,\n {\n ...contentStyle,\n lineHeight: isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize,\n visible: contentItem.visible,\n x: 0,\n y: titleHeight + titleSpace + lastContentHeight\n },\n 'text'\n ) as IText;\n\n // auto-fit\n if (contentItem.autoFit && isValidNumber(limit)) {\n this._setAutoFit(limit, contentComponent, contentItem);\n }\n\n //auto-limit\n if (contentItem.autoLimit && isValidNumber(limitRatio)) {\n contentComponent.setAttribute('maxLineWidth', limit);\n }\n\n contentComponents.push(contentComponent);\n const contentSpace = contentItem?.space ? contentItem.space : 0;\n lastContentHeight += contentComponent.AABBBounds.height() + contentSpace;\n } else {\n /**\n * indicator部分隐藏\n */\n const contentItemNode = group.find(node => node.name === 'indicator-content-' + i, false);\n contentItemNode && group.removeChild(contentItemNode as INode);\n }\n });\n this._content = contentComponents;\n }\n\n const totalHeight = group?.AABBBounds.height() ?? 0;\n group.setAttribute('y', size.height / 2 - totalHeight / 2);\n group.setAttribute('x', size.width / 2);\n }\n\n private _setAutoFit(limit: number, indicatorItem: IText, indicatorItemSpec: IndicatorItemSpec) {\n const originWidth = measureTextSize(indicatorItemSpec.style?.text ?? '', indicatorItemSpec.style ?? {}).width;\n if (originWidth > 0) {\n const ratio = (limit * (indicatorItemSpec.fitPercent ?? 0.5)) / originWidth;\n const fontSize = Math.floor((indicatorItemSpec.style?.fontSize ?? 20) * ratio);\n indicatorItem.setAttribute('fontSize', fontSize);\n indicatorItem.setAttribute(\n 'lineHeight',\n isValid(indicatorItemSpec.style.lineHeight) ? indicatorItemSpec.style.lineHeight : fontSize\n );\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["indicator/type.ts"],"names":[],"mappings":"","file":"type.js","sourcesContent":["import type { IGroupGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender';\n\nexport interface IndicatorAttributes extends IGroupGraphicAttribute {\n /**\n * 是否显示指标卡组件\n * @default true\n */\n visible?: boolean;\n /**\n * 内容尺寸\n */\n size: { width: number; height: number };\n /**\n * 指标卡 x 方向偏移\n * @default 0\n */\n dx?: number;\n /**\n * 指标卡 y 方向偏移\n * @default 0\n */\n dy?: number;\n /**\n * 指标卡宽度占内容区域的最大比值(从0到1)\n */\n limitRatio?: number;\n /**\n * 指标卡标题文字配置\n */\n title?: IndicatorItemSpec;\n /**\n * 指标卡内容文字配置\n */\n content?: IndicatorItemSpec[] | IndicatorItemSpec;\n}\n\nexport interface IndicatorItemSpec {\n /**\n * 是否显示当前项\n * @default true\n */\n visible?: boolean;\n /**\n * title.space: title 和 content 之间的间距\n * contentItem.space: content 之间的间距\n */\n space?: number;\n /**\n * 是否自适应文字空间进行缩略\n * 按照原字体大小,根据空间大小缩略文字\n * @default false\n */\n autoLimit?: boolean;\n /**\n * 是否自适应文字空间缩放文字大小\n * 不缩略文字,改变字体大小以适应空间\n * @default false\n */\n autoFit?: boolean;\n /**\n * 自适应文字宽度与可用空间的比例\n * @default 0.5\n */\n fitPercent?: number;\n /**\n * 文字样式\n */\n style?: ITextGraphicAttribute;\n}\n"]}
1
+ {"version":3,"sources":["../src/indicator/type.ts"],"names":[],"mappings":"","file":"type.js","sourcesContent":["import type { IGroupGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender';\n\nexport interface IndicatorAttributes extends IGroupGraphicAttribute {\n /**\n * 是否显示指标卡组件\n * @default true\n */\n visible?: boolean;\n /**\n * 内容尺寸\n */\n size: { width: number; height: number };\n /**\n * 指标卡 x 方向偏移\n * @default 0\n */\n dx?: number;\n /**\n * 指标卡 y 方向偏移\n * @default 0\n */\n dy?: number;\n /**\n * 指标卡宽度占内容区域的最大比值(从0到1)\n */\n limitRatio?: number;\n /**\n * 指标卡标题文字配置\n */\n title?: IndicatorItemSpec;\n /**\n * 指标卡内容文字配置\n */\n content?: IndicatorItemSpec[] | IndicatorItemSpec;\n}\n\nexport interface IndicatorItemSpec {\n /**\n * 是否显示当前项\n * @default true\n */\n visible?: boolean;\n /**\n * title.space: title 和 content 之间的间距\n * contentItem.space: content 之间的间距\n */\n space?: number;\n /**\n * 是否自适应文字空间进行缩略\n * 按照原字体大小,根据空间大小缩略文字\n * @default false\n */\n autoLimit?: boolean;\n /**\n * 是否自适应文字空间缩放文字大小\n * 不缩略文字,改变字体大小以适应空间\n * @default false\n */\n autoFit?: boolean;\n /**\n * 自适应文字宽度与可用空间的比例\n * @default 0.5\n */\n fitPercent?: number;\n /**\n * 文字样式\n */\n style?: ITextGraphicAttribute;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import { IRectGraphicAttribute } from '@visactor/vrender';\n\nexport type Direction = 'horizontal' | 'vertical';\n\nexport type OrientType = 'top' | 'right' | 'bottom' | 'left';\n\nexport type BackgroundAttributes = {\n /**\n * 是否绘制背景层\n */\n visible: boolean;\n} & Partial<IRectGraphicAttribute>;\n"]}
1
+ {"version":3,"sources":["../src/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import { IRectGraphicAttribute } from '@visactor/vrender';\n\nexport type Direction = 'horizontal' | 'vertical';\n\nexport type OrientType = 'top' | 'right' | 'bottom' | 'left';\n\nexport type BackgroundAttributes = {\n /**\n * 是否绘制背景层\n */\n visible: boolean;\n} & Partial<IRectGraphicAttribute>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["jsx/component-type.ts"],"names":[],"mappings":";;;AAEA,gCAA6B;AAE7B,SAAgB,IAAI,CAAC,MAAgD;IACnE,OAAO,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,oBAEC","file":"component-type.js","sourcesContent":["import type { IDefaultGraphicParamsType } from '@visactor/vrender';\nimport type { TagAttributes } from '../tag';\nimport { Tag } from '../tag';\n\nexport function VTag(params: IDefaultGraphicParamsType<TagAttributes>) {\n return new Tag(params ? params.attribute : {});\n}\n"]}
1
+ {"version":3,"sources":["../src/jsx/component-type.ts"],"names":[],"mappings":";;;AAEA,gCAA6B;AAE7B,SAAgB,IAAI,CAAC,MAAgD;IACnE,OAAO,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,oBAEC","file":"component-type.js","sourcesContent":["import type { IDefaultGraphicParamsType } from '@visactor/vrender';\nimport type { TagAttributes } from '../tag';\nimport { Tag } from '../tag';\n\nexport function VTag(params: IDefaultGraphicParamsType<TagAttributes>) {\n return new Tag(params ? params.attribute : {});\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["jsx/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC","file":"index.js","sourcesContent":["export * from './component-type';\n"]}
1
+ {"version":3,"sources":["../src/jsx/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC","file":"index.js","sourcesContent":["export * from './component-type';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["label/animate/animate.ts"],"names":[],"mappings":";;;AAGA,MAAM,MAAM,GAAG,CAAC,gBAAuC,EAAE,EAAE,EAAE;;IAC3D,OAAO;QACL,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,CAAC;SACjB;QACD,EAAE,EAAE;YACF,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,CAAC;YACnC,WAAW,EAAE,MAAA,aAAa,CAAC,WAAW,mCAAI,CAAC;YAC3C,aAAa,EAAE,MAAA,aAAa,CAAC,aAAa,mCAAI,CAAC;SAChD;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,gBAAuC,EAAE,EAAE,EAAE;;IAC5D,OAAO;QACL,IAAI,EAAE;YACJ,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,CAAC;YACnC,WAAW,EAAE,MAAA,aAAa,CAAC,WAAW,mCAAI,CAAC;YAC3C,aAAa,EAAE,MAAA,aAAa,CAAC,aAAa,mCAAI,CAAC;SAChD;QACD,EAAE,EAAE;YACF,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,CAAC;SACjB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAE7C,SAAgB,sBAAsB,CACpC,aAAoC,EACpC,IAA0B;;IAK1B,OAAO,MAAA,MAAA,gBAAgB,CAAC,IAAI,CAAC,iEAAG,aAAa,CAAC,mCAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACzE,CAAC;AARD,wDAQC;AAEY,QAAA,qBAAqB,GAAoB;IACpD,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,QAAsB;CAC/B,CAAC","file":"animate.js","sourcesContent":["import { EasingType, ITextGraphicAttribute } from '@visactor/vrender';\nimport { ILabelAnimation } from '../type';\n\nconst fadeIn = (textAttribute: ITextGraphicAttribute = {}) => {\n return {\n from: {\n opacity: 0,\n fillOpacity: 0,\n strokeOpacity: 0\n },\n to: {\n opacity: textAttribute.opacity ?? 1,\n fillOpacity: textAttribute.fillOpacity ?? 1,\n strokeOpacity: textAttribute.strokeOpacity ?? 1\n }\n };\n};\n\nconst fadeOut = (textAttribute: ITextGraphicAttribute = {}) => {\n return {\n from: {\n opacity: textAttribute.opacity ?? 1,\n fillOpacity: textAttribute.fillOpacity ?? 1,\n strokeOpacity: textAttribute.strokeOpacity ?? 1\n },\n to: {\n opacity: 0,\n fillOpacity: 0,\n strokeOpacity: 0\n }\n };\n};\n\nconst animationEffects = { fadeIn, fadeOut };\n\nexport function getAnimationAttributes(\n textAttribute: ITextGraphicAttribute,\n type: 'fadeIn' | 'fadeOut'\n): {\n from: any;\n to: any;\n} {\n return animationEffects[type]?.(textAttribute) ?? { from: {}, to: {} };\n}\n\nexport const DefaultLabelAnimation: ILabelAnimation = {\n mode: 'same-time',\n duration: 300,\n easing: 'linear' as EasingType\n};\n"]}
1
+ {"version":3,"sources":["../src/label/animate/animate.ts"],"names":[],"mappings":";;;AAGA,MAAM,MAAM,GAAG,CAAC,gBAAuC,EAAE,EAAE,EAAE;;IAC3D,OAAO;QACL,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,CAAC;SACjB;QACD,EAAE,EAAE;YACF,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,CAAC;YACnC,WAAW,EAAE,MAAA,aAAa,CAAC,WAAW,mCAAI,CAAC;YAC3C,aAAa,EAAE,MAAA,aAAa,CAAC,aAAa,mCAAI,CAAC;SAChD;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,gBAAuC,EAAE,EAAE,EAAE;;IAC5D,OAAO;QACL,IAAI,EAAE;YACJ,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,CAAC;YACnC,WAAW,EAAE,MAAA,aAAa,CAAC,WAAW,mCAAI,CAAC;YAC3C,aAAa,EAAE,MAAA,aAAa,CAAC,aAAa,mCAAI,CAAC;SAChD;QACD,EAAE,EAAE;YACF,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,CAAC;SACjB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAE7C,SAAgB,sBAAsB,CACpC,aAAoC,EACpC,IAA0B;;IAK1B,OAAO,MAAA,MAAA,gBAAgB,CAAC,IAAI,CAAC,iEAAG,aAAa,CAAC,mCAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACzE,CAAC;AARD,wDAQC;AAEY,QAAA,qBAAqB,GAAoB;IACpD,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,QAAsB;CAC/B,CAAC","file":"animate.js","sourcesContent":["import { EasingType, ITextGraphicAttribute } from '@visactor/vrender';\nimport { ILabelAnimation } from '../type';\n\nconst fadeIn = (textAttribute: ITextGraphicAttribute = {}) => {\n return {\n from: {\n opacity: 0,\n fillOpacity: 0,\n strokeOpacity: 0\n },\n to: {\n opacity: textAttribute.opacity ?? 1,\n fillOpacity: textAttribute.fillOpacity ?? 1,\n strokeOpacity: textAttribute.strokeOpacity ?? 1\n }\n };\n};\n\nconst fadeOut = (textAttribute: ITextGraphicAttribute = {}) => {\n return {\n from: {\n opacity: textAttribute.opacity ?? 1,\n fillOpacity: textAttribute.fillOpacity ?? 1,\n strokeOpacity: textAttribute.strokeOpacity ?? 1\n },\n to: {\n opacity: 0,\n fillOpacity: 0,\n strokeOpacity: 0\n }\n };\n};\n\nconst animationEffects = { fadeIn, fadeOut };\n\nexport function getAnimationAttributes(\n textAttribute: ITextGraphicAttribute,\n type: 'fadeIn' | 'fadeOut'\n): {\n from: any;\n to: any;\n} {\n return animationEffects[type]?.(textAttribute) ?? { from: {}, to: {} };\n}\n\nexport const DefaultLabelAnimation: ILabelAnimation = {\n mode: 'same-time',\n duration: 300,\n easing: 'linear' as EasingType\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["label/animate/index.ts"],"names":[],"mappings":"","file":"index.js","sourcesContent":[""]}
1
+ {"version":3,"sources":["../src/label/animate/index.ts"],"names":[],"mappings":"","file":"index.js","sourcesContent":[""]}
@@ -1,7 +1,7 @@
1
- import type { IBoundsLike } from '@visactor/vutils';
1
+ import type { IAABBBounds, IBoundsLike } from '@visactor/vutils';
2
2
  import { LabelBase } from './base';
3
- import type { ArcLabelAttrs, IPoint, Quadrant, BaseLabelAttrs } from './type';
4
- import type { IText, IGraphic } from '@visactor/vrender';
3
+ import type { ArcLabelAttrs, IPoint, Quadrant, BaseLabelAttrs, LabelItem, IArcLabelLineSpec } from './type';
4
+ import { type IText, type IGraphic, type ILine } from '@visactor/vrender';
5
5
  export declare class ArcInfo {
6
6
  key: string;
7
7
  refDatum: any;
@@ -20,6 +20,7 @@ export declare class ArcInfo {
20
20
  pointA: IPoint;
21
21
  pointB: IPoint;
22
22
  pointC: IPoint;
23
+ labelLine: IArcLabelLineSpec;
23
24
  quadrant: Quadrant;
24
25
  radian: number;
25
26
  middleAngle: number;
@@ -40,6 +41,7 @@ export declare class ArcLabel extends LabelBase<ArcLabelAttrs> {
40
41
  x: number;
41
42
  y: number;
42
43
  } | undefined;
44
+ protected _layout(data?: LabelItem[]): IText[];
43
45
  protected layoutArcLabels(position: BaseLabelAttrs['position'], attribute: any, currentMarks?: IGraphic[], data?: any, textBoundsArray?: any, ellipsisWidth?: number): ArcInfo[];
44
46
  private _layoutInsideLabels;
45
47
  private _layoutOutsideLabels;
@@ -59,8 +61,10 @@ export declare class ArcLabel extends LabelBase<ArcLabelAttrs> {
59
61
  private _restoreY;
60
62
  private _checkYRange;
61
63
  private _coverLabels;
64
+ protected _labelLine(text: IText): ILine;
62
65
  protected computeRadius(r: number, width?: number, height?: number, centerOffset?: number, k?: number): number;
63
66
  protected computeLayoutRadius(width: number, height: number): number;
67
+ protected _canPlaceInside(textBound: IBoundsLike, shapeBound: IAABBBounds): boolean;
64
68
  private computeLayoutOuterRadius;
65
69
  private computeDatumRadius;
66
70
  }
package/cjs/label/arc.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.ArcLabel = exports.ArcInfo = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), base_1 = require("./base"), util_1 = require("./util");
7
+ const vutils_1 = require("@visactor/vutils"), base_1 = require("./base"), vrender_1 = require("@visactor/vrender"), util_1 = require("./util");
8
8
 
9
9
  class ArcInfo {
10
10
  constructor(refDatum, center, outerCenter, quadrant, radian, middleAngle) {
@@ -43,19 +43,40 @@ class ArcLabel extends base_1.LabelBase {
43
43
  y: 0
44
44
  };
45
45
  }
46
+ _layout(data = []) {
47
+ const labels = super._layout(data), textBoundsArray = labels.map((label => this.getGraphicBounds(label))), ellipsisLabelAttribute = Object.assign(Object.assign({}, this.attribute.textStyle), {
48
+ text: "..."
49
+ }), ellipsisText = this._createLabelText(ellipsisLabelAttribute), ellipsisTextBounds = this.getGraphicBounds(ellipsisText), ellipsisWidth = ellipsisTextBounds.x2 - ellipsisTextBounds.x1, arcs = this.layoutArcLabels(this.attribute.position, this.attribute, Array.from(this._idToGraphic.values()), data, textBoundsArray, ellipsisWidth);
50
+ for (let i = 0; i < data.length; i++) {
51
+ const textData = data[i], basedArc = arcs.find((arc => arc.refDatum.id === textData.id)), labelAttribute = {
52
+ visible: basedArc.labelVisible,
53
+ x: basedArc.labelPosition.x,
54
+ y: basedArc.labelPosition.y,
55
+ angle: basedArc.angle,
56
+ maxLineWidth: basedArc.labelLimit,
57
+ points: (null == basedArc ? void 0 : basedArc.pointA) && (null == basedArc ? void 0 : basedArc.pointB) && (null == basedArc ? void 0 : basedArc.pointC) ? [ basedArc.pointA, basedArc.pointB, basedArc.pointC ] : void 0,
58
+ line: null == basedArc ? void 0 : basedArc.labelLine
59
+ };
60
+ labels[i].setAttributes(labelAttribute);
61
+ }
62
+ return labels;
63
+ }
46
64
  layoutArcLabels(position, attribute, currentMarks, data, textBoundsArray, ellipsisWidth) {
47
65
  var _a;
48
66
  this._arcLeft.clear(), this._arcRight.clear(), this._ellipsisWidth = ellipsisWidth;
49
- const {width: width, height: height} = attribute, centerOffset = null !== (_a = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _a ? _a : 0;
50
- currentMarks.forEach(((currentMark, index) => {
67
+ const centerOffset = null !== (_a = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _a ? _a : 0;
68
+ let maxRadius = 0;
69
+ currentMarks.forEach((currentMarks => {
70
+ currentMarks.attribute.outerRadius > maxRadius && (maxRadius = currentMarks.attribute.outerRadius);
71
+ })), currentMarks.forEach(((currentMark, index) => {
51
72
  var _a, _b;
52
- const graphicAttribute = currentMark.attribute, radiusRatio = this.computeLayoutOuterRadius(graphicAttribute.outerRadius, width, height), radius = this.computeRadius(radiusRatio, width, height, centerOffset), center = {
73
+ const graphicAttribute = currentMark.attribute, center = {
53
74
  x: null !== (_a = null == graphicAttribute ? void 0 : graphicAttribute.x) && void 0 !== _a ? _a : 0,
54
75
  y: null !== (_b = null == graphicAttribute ? void 0 : graphicAttribute.y) && void 0 !== _b ? _b : 0
55
76
  }, item = data[index], textBounds = textBoundsArray[index], arcMiddleAngle = (graphicAttribute.startAngle + graphicAttribute.endAngle) / 2, intervalAngle = graphicAttribute.endAngle - graphicAttribute.startAngle, arcQuadrant = (0,
56
77
  util_1.computeQuadrant)(graphicAttribute.endAngle - intervalAngle / 2), arcMiddle = (0,
57
78
  util_1.circlePoint)(center.x, center.y, graphicAttribute.outerRadius, arcMiddleAngle), outerArcMiddle = (0,
58
- util_1.circlePoint)(center.x, center.y, radius + attribute.line.line1MinLength, arcMiddleAngle), arc = new ArcInfo(item, arcMiddle, outerArcMiddle, arcQuadrant, intervalAngle, arcMiddleAngle);
79
+ util_1.circlePoint)(center.x, center.y, maxRadius + attribute.line.line1MinLength, arcMiddleAngle), arc = new ArcInfo(item, arcMiddle, outerArcMiddle, arcQuadrant, intervalAngle, arcMiddleAngle);
59
80
  arc.pointA = (0, util_1.circlePoint)(center.x, center.y, this.computeDatumRadius(2 * center.x, 2 * center.y, graphicAttribute.outerRadius, centerOffset), arc.middleAngle),
60
81
  arc.labelSize = {
61
82
  width: textBounds.x2 - textBounds.x1,
@@ -131,13 +152,19 @@ class ArcLabel extends base_1.LabelBase {
131
152
  var _a, _b;
132
153
  arc.labelVisible && ((0, vutils_1.isLess)(arc.pointB.x, line2MinLength + spaceWidth) || (0,
133
154
  vutils_1.isGreater)(arc.pointB.x, width - line2MinLength - spaceWidth)) && (arc.labelVisible = !1),
134
- arc.angle = null !== (_b = null === (_a = null == attribute ? void 0 : attribute.textStyle) || void 0 === _a ? void 0 : _a.angle) && void 0 !== _b ? _b : 0;
155
+ arc.angle = null !== (_b = null === (_a = null == attribute ? void 0 : attribute.textStyle) || void 0 === _a ? void 0 : _a.angle) && void 0 !== _b ? _b : 0,
156
+ arc.labelLine = Object.assign({}, null == attribute ? void 0 : attribute.line);
135
157
  })), arcs;
136
158
  }
137
159
  _computeX(arc, attribute, currentMarks) {
138
160
  var _a, _b, _c, _d, _e, _f;
139
161
  const center_x = null !== (_b = null === (_a = currentMarks[0].attribute) || void 0 === _a ? void 0 : _a.x) && void 0 !== _b ? _b : 0, centerOffset = (_d = null === (_c = currentMarks[0].attribute) || void 0 === _c ? void 0 : _c.y,
140
- null !== (_e = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _e ? _e : 0), plotLayout_width = 2 * center_x, radiusRatio = this.computeLayoutOuterRadius(currentMarks[0].attribute.outerRadius, attribute.width, attribute.height), line1MinLength = attribute.line.line1MinLength, line2MinLength = attribute.line.line2MinLength, labelLayoutAlign = null === (_f = attribute.layout) || void 0 === _f ? void 0 : _f.align, spaceWidth = attribute.spaceWidth, {labelPosition: labelPosition, quadrant: quadrant, pointB: pointB} = arc;
162
+ null !== (_e = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _e ? _e : 0), plotLayout_width = 2 * center_x;
163
+ let maxRadius = 0;
164
+ currentMarks.forEach((currentMark => {
165
+ currentMark.attribute.outerRadius > maxRadius && (maxRadius = currentMark.attribute.outerRadius);
166
+ }));
167
+ const radiusRatio = this.computeLayoutOuterRadius(maxRadius, attribute.width, attribute.height), line1MinLength = attribute.line.line1MinLength, line2MinLength = attribute.line.line2MinLength, labelLayoutAlign = null === (_f = attribute.layout) || void 0 === _f ? void 0 : _f.align, spaceWidth = attribute.spaceWidth, {labelPosition: labelPosition, quadrant: quadrant, pointB: pointB} = arc;
141
168
  (0, vutils_1.isValidNumber)(pointB.x * pointB.y) || (arc.pointC = {
142
169
  x: NaN,
143
170
  y: NaN
@@ -283,7 +310,12 @@ class ArcLabel extends base_1.LabelBase {
283
310
  }
284
311
  _computePointB(arc, r, attribute, currentMarks) {
285
312
  var _a, _b, _c, _d, _e;
286
- const labelConfig = attribute, radiusRatio = this.computeLayoutOuterRadius(currentMarks[0].attribute.outerRadius, attribute.width, attribute.height), line1MinLength = labelConfig.line.line1MinLength;
313
+ const labelConfig = attribute;
314
+ let maxRadius = 0;
315
+ currentMarks.forEach((currentMark => {
316
+ currentMark.attribute.outerRadius > maxRadius && (maxRadius = currentMark.attribute.outerRadius);
317
+ }));
318
+ const radiusRatio = this.computeLayoutOuterRadius(maxRadius, attribute.width, attribute.height), line1MinLength = labelConfig.line.line1MinLength;
287
319
  if ("none" === labelConfig.layout.strategy) arc.pointB = {
288
320
  x: arc.outerCenter.x,
289
321
  y: arc.outerCenter.y
@@ -309,7 +341,12 @@ class ArcLabel extends base_1.LabelBase {
309
341
  const plotRect = {
310
342
  width: 2 * (null !== (_b = null === (_a = currentMarks[0].attribute) || void 0 === _a ? void 0 : _a.x) && void 0 !== _b ? _b : 0),
311
343
  height: 2 * (null !== (_d = null === (_c = currentMarks[0].attribute) || void 0 === _c ? void 0 : _c.y) && void 0 !== _d ? _d : 0)
312
- }, radiusRatio = this.computeLayoutOuterRadius(currentMarks[0].attribute.outerRadius, attribute.width, attribute.height), line1MinLength = attribute.line.line1MinLength, {width: width, height: height} = plotRect, centerOffset = null !== (_e = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _e ? _e : 0, radius = this.computeRadius(radiusRatio, attribute.width, attribute.height, centerOffset), r = this._computeLayoutRadius(height / 2, attribute, currentMarks), cx = Math.abs(arc.center.x - width / 2), cy = arc.center.y - height / 2;
344
+ };
345
+ let maxRadius = 0;
346
+ currentMarks.forEach((currentMark => {
347
+ currentMark.attribute.outerRadius > maxRadius && (maxRadius = currentMark.attribute.outerRadius);
348
+ }));
349
+ const radiusRatio = this.computeLayoutOuterRadius(maxRadius, attribute.width, attribute.height), line1MinLength = attribute.line.line1MinLength, {width: width, height: height} = plotRect, centerOffset = null !== (_e = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _e ? _e : 0, radius = this.computeRadius(radiusRatio, attribute.width, attribute.height, centerOffset), r = this._computeLayoutRadius(height / 2, attribute, currentMarks), cx = Math.abs(arc.center.x - width / 2), cy = arc.center.y - height / 2;
313
350
  let a, b, c;
314
351
  if ((0, vutils_1.isNumberClose)(width / 2, cx)) a = 0, b = 1, c = -cy; else if ((0,
315
352
  vutils_1.isNumberClose)(height / 2, cy)) a = 1, b = 0, c = -cx; else {
@@ -326,7 +363,12 @@ class ArcLabel extends base_1.LabelBase {
326
363
  }
327
364
  _computeLayoutRadius(halfYLength, attribute, currentMarks) {
328
365
  var _a;
329
- const labelConfig = attribute, layoutArcGap = labelConfig.layoutArcGap, line1MinLength = labelConfig.line.line1MinLength, radiusRatio = this.computeLayoutOuterRadius(currentMarks[0].attribute.outerRadius, attribute.width, attribute.height), centerOffset = null !== (_a = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _a ? _a : 0, outerR = this.computeRadius(radiusRatio, attribute.width, attribute.height, centerOffset) + line1MinLength, a = outerR - layoutArcGap;
366
+ const labelConfig = attribute, layoutArcGap = labelConfig.layoutArcGap, line1MinLength = labelConfig.line.line1MinLength;
367
+ let maxRadius = 0;
368
+ currentMarks.forEach((currentMark => {
369
+ currentMark.attribute.outerRadius > maxRadius && (maxRadius = currentMark.attribute.outerRadius);
370
+ }));
371
+ const radiusRatio = this.computeLayoutOuterRadius(maxRadius, attribute.width, attribute.height), centerOffset = null !== (_a = null == attribute ? void 0 : attribute.centerOffset) && void 0 !== _a ? _a : 0, outerR = this.computeRadius(radiusRatio, attribute.width, attribute.height, centerOffset) + line1MinLength, a = outerR - layoutArcGap;
330
372
  return Math.max((a ** 2 + halfYLength ** 2) / (2 * a), outerR);
331
373
  }
332
374
  _findNeighborIndex(arcs, priorityArc) {
@@ -371,6 +413,17 @@ class ArcLabel extends base_1.LabelBase {
371
413
  (0, util_1.checkBoundsOverlap)(lastBounds, bounds) ? arcs[i].labelVisible = !1 : lastBounds = bounds;
372
414
  }
373
415
  }
416
+ _labelLine(text) {
417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
418
+ return (null === (_a = text.attribute) || void 0 === _a ? void 0 : _a.points) ? (0,
419
+ vrender_1.createLine)({
420
+ visible: null === (_g = null !== (_e = (null === (_c = null === (_b = text.attribute) || void 0 === _b ? void 0 : _b.line) || void 0 === _c ? void 0 : _c.visible) && (null === (_d = text.attribute) || void 0 === _d ? void 0 : _d.visible)) && void 0 !== _e ? _e : null === (_f = text.attribute) || void 0 === _f ? void 0 : _f.visible) || void 0 === _g || _g,
421
+ stroke: null !== (_l = null === (_k = null === (_j = null === (_h = text.attribute) || void 0 === _h ? void 0 : _h.line) || void 0 === _j ? void 0 : _j.style) || void 0 === _k ? void 0 : _k.stroke) && void 0 !== _l ? _l : null === (_m = text.attribute) || void 0 === _m ? void 0 : _m.fill,
422
+ lineWidth: null !== (_r = null === (_q = null === (_p = null === (_o = text.attribute) || void 0 === _o ? void 0 : _o.line) || void 0 === _p ? void 0 : _p.style) || void 0 === _q ? void 0 : _q.lineWidth) && void 0 !== _r ? _r : 1,
423
+ points: null === (_s = text.attribute) || void 0 === _s ? void 0 : _s.points,
424
+ curveType: (null === (_u = null === (_t = text.attribute) || void 0 === _t ? void 0 : _t.line) || void 0 === _u ? void 0 : _u.smooth) ? "basis" : null
425
+ }) : void 0;
426
+ }
374
427
  computeRadius(r, width, height, centerOffset, k) {
375
428
  var _a;
376
429
  return null !== (_a = this.computeLayoutRadius(width || 0, height || 0) * r * ((0,
@@ -379,6 +432,9 @@ class ArcLabel extends base_1.LabelBase {
379
432
  computeLayoutRadius(width, height) {
380
433
  return Math.min(width / 2, height / 2);
381
434
  }
435
+ _canPlaceInside(textBound, shapeBound) {
436
+ return "inside" === this.attribute.position;
437
+ }
382
438
  computeLayoutOuterRadius(r, width, height) {
383
439
  return r / (Math.min(width, height) / 2);
384
440
  }