@primeui/chart-core 0.0.1-alpha.1 → 1.0.0-beta.1

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 (244) hide show
  1. package/dist/animations/index.d.mts +1 -1
  2. package/dist/animations/index.mjs +19 -18
  3. package/dist/{annotation.utils-Bm0lOO1o.d.mts → annotation.utils-D-7ijAWO.d.mts} +22 -1
  4. package/dist/cartesian/index.d.mts +3 -2
  5. package/dist/cartesian/index.mjs +96 -93
  6. package/dist/{chunk-WPFUV7K3.mjs → chunks/chunk-2LLTN7T4.mjs} +23 -14
  7. package/dist/{chunk-RO4N6YFS.mjs → chunks/chunk-2T226WJI.mjs} +31 -14
  8. package/dist/{chunk-A6ZQZFL2.mjs → chunks/chunk-3CUSPV47.mjs} +12 -9
  9. package/dist/{chunk-3FFJEX4A.mjs → chunks/chunk-3QQLETCJ.mjs} +13 -12
  10. package/dist/{chunk-JWFBOPM6.mjs → chunks/chunk-4N2XIMAB.mjs} +2 -2
  11. package/dist/{chunk-LVMDQ4OJ.mjs → chunks/chunk-4S3FOFCN.mjs} +2 -2
  12. package/dist/{chunk-XTVE4P3L.mjs → chunks/chunk-56MASQS2.mjs} +6 -2
  13. package/dist/{chunk-DTWTCFRG.mjs → chunks/chunk-5EQSFUBA.mjs} +41 -13
  14. package/dist/{chunk-KQIFO5I3.mjs → chunks/chunk-5QSTMSPW.mjs} +15 -10
  15. package/dist/{chunk-NKUYIWAP.mjs → chunks/chunk-6LUIVTNV.mjs} +6 -6
  16. package/dist/chunks/chunk-6MAO6I3E.mjs +6 -0
  17. package/dist/{chunk-WFVOQ2QZ.mjs → chunks/chunk-77K3DEKL.mjs} +2 -2
  18. package/dist/{chunk-4C6EVJ54.mjs → chunks/chunk-7I2SAKHL.mjs} +7 -44
  19. package/dist/{chunk-6HSEJLSR.mjs → chunks/chunk-7I2SNJ2X.mjs} +35 -18
  20. package/dist/{chunk-66T4MRC5.mjs → chunks/chunk-7IKKWWRT.mjs} +4 -6
  21. package/dist/{chunk-BKP26M4K.mjs → chunks/chunk-7LZWQVTL.mjs} +43 -24
  22. package/dist/{chunk-NHRK5KU2.mjs → chunks/chunk-A5YBHYIS.mjs} +25 -17
  23. package/dist/{chunk-ZT2Z7ERM.mjs → chunks/chunk-AC5EAWIP.mjs} +12 -9
  24. package/dist/{chunk-ZTL2FQEW.mjs → chunks/chunk-AETETRB4.mjs} +24 -9
  25. package/dist/{chunk-NPDZLYIF.mjs → chunks/chunk-AJ24XDEK.mjs} +2 -2
  26. package/dist/chunks/chunk-ARVMVGWS.mjs +40 -0
  27. package/dist/{chunk-3IYSJ2U7.mjs → chunks/chunk-AYEAEAOV.mjs} +10 -7
  28. package/dist/{chunk-M7B3JF43.mjs → chunks/chunk-AZPJMIZE.mjs} +4 -3
  29. package/dist/{chunk-O2X6FF45.mjs → chunks/chunk-BDCNBS6W.mjs} +194 -168
  30. package/dist/{chunk-55Y3WI6S.mjs → chunks/chunk-BR4PSSPU.mjs} +6 -6
  31. package/dist/{chunk-DN6AXQYZ.mjs → chunks/chunk-BYAAMQBN.mjs} +46 -41
  32. package/dist/{chunk-TA4MVAEX.mjs → chunks/chunk-CFA2SUBF.mjs} +32 -24
  33. package/dist/{chunk-WH3C3Y7P.mjs → chunks/chunk-CKQ4DNNJ.mjs} +7 -18
  34. package/dist/chunks/chunk-DIJFKY6H.mjs +21 -0
  35. package/dist/{chunk-AUF4CHDP.mjs → chunks/chunk-DJOHDKTP.mjs} +18 -11
  36. package/dist/{chunk-3Z62EUJN.mjs → chunks/chunk-DKWZKYHF.mjs} +5 -5
  37. package/dist/{chunk-PLSDU3C2.mjs → chunks/chunk-DOC4YOCD.mjs} +63 -37
  38. package/dist/{chunk-Y3L3D4GQ.mjs → chunks/chunk-DORUY7GR.mjs} +69 -34
  39. package/dist/chunks/chunk-DWBJKYLH.mjs +238 -0
  40. package/dist/{chunk-XQQCGFYB.mjs → chunks/chunk-EQLCJTM4.mjs} +1 -1
  41. package/dist/{chunk-VGLSBZDN.mjs → chunks/chunk-F2E2QCZM.mjs} +1 -1
  42. package/dist/{chunk-BZN2QHGP.mjs → chunks/chunk-F6AGZQDA.mjs} +4 -72
  43. package/dist/{chunk-ILUWFYGY.mjs → chunks/chunk-FNMLVZOA.mjs} +8 -8
  44. package/dist/{chunk-SXHVDJGF.mjs → chunks/chunk-FQAFGPW6.mjs} +6 -6
  45. package/dist/{chunk-N3TIT3OH.mjs → chunks/chunk-FSPE3M5E.mjs} +66 -43
  46. package/dist/{chunk-KNDZP446.mjs → chunks/chunk-FSWYYRPX.mjs} +5 -5
  47. package/dist/{chunk-KP2TWD4Z.mjs → chunks/chunk-FWNWV3H7.mjs} +1 -1
  48. package/dist/chunks/chunk-G3DIMENH.mjs +63 -0
  49. package/dist/{chunk-QQBXUDM4.mjs → chunks/chunk-G3DYNMWT.mjs} +20 -16
  50. package/dist/{chunk-J65DBT4R.mjs → chunks/chunk-GA6YZQYT.mjs} +3 -3
  51. package/dist/chunks/chunk-GAQLLQUM.mjs +20 -0
  52. package/dist/{chunk-TAHCOZHF.mjs → chunks/chunk-GN7VQCCH.mjs} +27 -30
  53. package/dist/{chunk-R6Y3R7EW.mjs → chunks/chunk-GOOBVFFH.mjs} +1 -1
  54. package/dist/chunks/chunk-GSW5OBEG.mjs +233 -0
  55. package/dist/{chunk-22ST6YPP.mjs → chunks/chunk-GTX6MLTG.mjs} +9 -9
  56. package/dist/{chunk-XUAASRXW.mjs → chunks/chunk-GWHRTGGC.mjs} +35 -27
  57. package/dist/{chunk-TQ6S34QZ.mjs → chunks/chunk-GXCLRRE5.mjs} +6 -6
  58. package/dist/{chunk-DP2IZNN3.mjs → chunks/chunk-HHBFQ6AI.mjs} +4 -3
  59. package/dist/{chunk-3OZLP4I4.mjs → chunks/chunk-HWT6UEYE.mjs} +14 -10
  60. package/dist/{chunk-X7T34OLW.mjs → chunks/chunk-I25SSZE3.mjs} +3 -3
  61. package/dist/{chunk-OGJ6IIBW.mjs → chunks/chunk-IFJPDARC.mjs} +21 -9
  62. package/dist/{chunk-CINXJIRR.mjs → chunks/chunk-ISU27QL2.mjs} +66 -6
  63. package/dist/{chunk-OXTFAWSK.mjs → chunks/chunk-J2WHJ73Y.mjs} +7 -2
  64. package/dist/{chunk-VN7CKCSE.mjs → chunks/chunk-JS47MSB2.mjs} +9 -1
  65. package/dist/{chunk-WYLILAOO.mjs → chunks/chunk-K44SD67H.mjs} +16 -7
  66. package/dist/{chunk-RQ3CKQOX.mjs → chunks/chunk-K7AGQTVK.mjs} +63 -3
  67. package/dist/{chunk-VVI3OBPJ.mjs → chunks/chunk-KCSMOAZO.mjs} +7 -9
  68. package/dist/{chunk-ARRGOEFX.mjs → chunks/chunk-L6GXEQOO.mjs} +7 -7
  69. package/dist/{chunk-7QQ6ETB4.mjs → chunks/chunk-LBNP5PJA.mjs} +14 -12
  70. package/dist/{chunk-AHYIS6EB.mjs → chunks/chunk-LC2ZEZWP.mjs} +7 -7
  71. package/dist/{chunk-WCG35U6M.mjs → chunks/chunk-LJ6BXF3H.mjs} +31 -23
  72. package/dist/{chunk-3WEMHXZI.mjs → chunks/chunk-LTQH3LQJ.mjs} +2 -8
  73. package/dist/{chunk-QWQ6HY4I.mjs → chunks/chunk-O4BTKF5R.mjs} +9 -8
  74. package/dist/{chunk-WY4AURRE.mjs → chunks/chunk-P2Q4DYOS.mjs} +240 -83
  75. package/dist/{chunk-KVDEROP6.mjs → chunks/chunk-P563L7WL.mjs} +1 -1
  76. package/dist/{chunk-SDBPQ5CF.mjs → chunks/chunk-PJLFNUOW.mjs} +45 -30
  77. package/dist/{chunk-MTGMXRNF.mjs → chunks/chunk-PSDRVQSK.mjs} +7 -7
  78. package/dist/{chunk-6STOLMCA.mjs → chunks/chunk-QCBESCLG.mjs} +13 -12
  79. package/dist/{chunk-PRDVPOZX.mjs → chunks/chunk-QIYJUZ7I.mjs} +7 -2
  80. package/dist/{chunk-UPRXABX5.mjs → chunks/chunk-RH3OQ2VX.mjs} +6 -6
  81. package/dist/{chunk-QS76E3TD.mjs → chunks/chunk-RI32WIDX.mjs} +2 -2
  82. package/dist/{chunk-OWW3K55O.mjs → chunks/chunk-RIAPS5AW.mjs} +49 -7
  83. package/dist/{chunk-ERVQB2VZ.mjs → chunks/chunk-RJ3ZOZTS.mjs} +4 -4
  84. package/dist/{chunk-WFTX4AQJ.mjs → chunks/chunk-RKNL7UWZ.mjs} +19 -7
  85. package/dist/chunks/chunk-RLS3GMJ6.mjs +8 -0
  86. package/dist/{chunk-WRULPWHD.mjs → chunks/chunk-RVTEIKW5.mjs} +5 -5
  87. package/dist/{chunk-FHTC2YDB.mjs → chunks/chunk-SVASYTK5.mjs} +70 -5
  88. package/dist/{chunk-ARB5T6MP.mjs → chunks/chunk-SWVOBJLG.mjs} +3 -100
  89. package/dist/{chunk-OHGCZZPZ.mjs → chunks/chunk-SY7LVXIW.mjs} +53 -27
  90. package/dist/{chunk-JGOVWSKH.mjs → chunks/chunk-TW3KLJVO.mjs} +37 -12
  91. package/dist/{chunk-RBLZRT5K.mjs → chunks/chunk-UF2TPGQB.mjs} +103 -15
  92. package/dist/{chunk-X4D7FKUS.mjs → chunks/chunk-UZWWYKL7.mjs} +2 -2
  93. package/dist/{chunk-LKC7MZKK.mjs → chunks/chunk-XECVYJE2.mjs} +16 -8
  94. package/dist/chunks/chunk-XMSAUIVL.mjs +1 -0
  95. package/dist/{chunk-J4RI2C2G.mjs → chunks/chunk-XPZTRMU2.mjs} +6 -6
  96. package/dist/{chunk-BABQKA6K.mjs → chunks/chunk-XXJRGDKE.mjs} +3 -3
  97. package/dist/{chunk-SALTGZFR.mjs → chunks/chunk-YVDVKLPR.mjs} +10 -9
  98. package/dist/circular/arc/index.mjs +3 -3
  99. package/dist/circular/index.d.mts +1 -1
  100. package/dist/circular/index.mjs +14 -13
  101. package/dist/controllers/index.mjs +113 -110
  102. package/dist/{datalabel.utils-CkjGeB8S.d.mts → datalabel.utils-CNRKHy7j.d.mts} +10 -1
  103. package/dist/{decimation.utils-CcvJVhI4.d.mts → decimation.utils-C0xpslz_.d.mts} +33 -2
  104. package/dist/geometry-BVWJedvw.d.mts +53 -0
  105. package/dist/index.d.mts +16 -17
  106. package/dist/index.mjs +113 -110
  107. package/dist/luminance-TvUgaQ91.d.mts +57 -0
  108. package/dist/orchestrator/index.d.mts +2 -2
  109. package/dist/orchestrator/index.mjs +36 -33
  110. package/dist/plugins/index.mjs +1 -1
  111. package/dist/{property-animations-D433wXzz.d.mts → property-animations-CI0zyp6V.d.mts} +6 -20
  112. package/dist/radial/index.mjs +40 -37
  113. package/dist/renderers/axis/index.mjs +9 -8
  114. package/dist/renderers/index.d.mts +8 -9
  115. package/dist/renderers/index.mjs +78 -75
  116. package/dist/renderers/navigator/index.d.mts +1 -1
  117. package/dist/renderers/navigator/index.mjs +10 -8
  118. package/dist/{ring.utils-DXvrxMkU.d.mts → ring.utils-aHt9Nqum.d.mts} +2 -7
  119. package/dist/{scale-KFv30jqZ.d.mts → scale-CFkPlyUe.d.mts} +2 -2
  120. package/dist/{scales-Drf8AIhL.d.mts → scales-BZzjlR4U.d.mts} +15 -1
  121. package/dist/series/bar/canvas/index.mjs +11 -10
  122. package/dist/series/bar/controller/index.d.mts +17 -0
  123. package/dist/series/bar/controller/index.mjs +47 -44
  124. package/dist/series/bar/controller-canvas/index.mjs +47 -44
  125. package/dist/series/bar/controller-svg/index.mjs +47 -44
  126. package/dist/series/bar/index.d.mts +2 -2
  127. package/dist/series/bar/index.mjs +16 -13
  128. package/dist/series/bar/svg/index.mjs +14 -11
  129. package/dist/series/candlestick/canvas/index.mjs +8 -8
  130. package/dist/series/candlestick/controller/index.d.mts +2 -0
  131. package/dist/series/candlestick/controller/index.mjs +43 -40
  132. package/dist/series/candlestick/controller-canvas/index.mjs +43 -40
  133. package/dist/series/candlestick/controller-svg/index.mjs +43 -40
  134. package/dist/series/candlestick/index.mjs +11 -10
  135. package/dist/series/candlestick/svg/index.mjs +8 -8
  136. package/dist/series/heatmap/canvas/index.mjs +9 -9
  137. package/dist/series/heatmap/controller/index.d.mts +9 -0
  138. package/dist/series/heatmap/controller/index.mjs +26 -23
  139. package/dist/series/heatmap/controller-canvas/index.mjs +26 -23
  140. package/dist/series/heatmap/controller-svg/index.mjs +26 -23
  141. package/dist/series/heatmap/index.mjs +14 -13
  142. package/dist/series/heatmap/svg/index.mjs +11 -10
  143. package/dist/series/line/canvas/index.mjs +9 -9
  144. package/dist/series/line/controller/index.d.mts +7 -0
  145. package/dist/series/line/controller/index.mjs +51 -47
  146. package/dist/series/line/controller-canvas/index.mjs +53 -49
  147. package/dist/series/line/controller-svg/index.mjs +53 -49
  148. package/dist/series/line/index.d.mts +1 -1
  149. package/dist/series/line/index.mjs +17 -13
  150. package/dist/series/line/svg/index.mjs +12 -9
  151. package/dist/series/pie/canvas/index.d.mts +12 -4
  152. package/dist/series/pie/canvas/index.mjs +15 -10
  153. package/dist/series/pie/controller/index.mjs +113 -110
  154. package/dist/series/pie/controller-canvas/index.mjs +113 -110
  155. package/dist/series/pie/controller-svg/index.mjs +113 -110
  156. package/dist/series/pie/index.d.mts +3 -56
  157. package/dist/series/pie/index.mjs +11 -15
  158. package/dist/series/pie/svg/index.d.mts +18 -4
  159. package/dist/series/pie/svg/index.mjs +10 -11
  160. package/dist/series/polar/canvas/index.mjs +7 -7
  161. package/dist/series/polar/controller/index.d.mts +9 -0
  162. package/dist/series/polar/controller/index.mjs +49 -46
  163. package/dist/series/polar/controller-canvas/index.mjs +50 -47
  164. package/dist/series/polar/controller-svg/index.mjs +50 -47
  165. package/dist/series/polar/index.mjs +19 -16
  166. package/dist/series/polar/svg/index.mjs +11 -8
  167. package/dist/series/radar/canvas/index.mjs +8 -8
  168. package/dist/series/radar/controller/index.d.mts +11 -0
  169. package/dist/series/radar/controller/index.mjs +46 -43
  170. package/dist/series/radar/controller-canvas/index.mjs +49 -46
  171. package/dist/series/radar/controller-svg/index.mjs +49 -46
  172. package/dist/series/radar/index.d.mts +2 -2
  173. package/dist/series/radar/index.mjs +16 -13
  174. package/dist/series/radar/svg/index.mjs +12 -9
  175. package/dist/series/scatter/canvas/index.mjs +13 -11
  176. package/dist/series/scatter/controller/index.mjs +48 -44
  177. package/dist/series/scatter/controller-canvas/index.mjs +50 -46
  178. package/dist/series/scatter/controller-svg/index.mjs +50 -46
  179. package/dist/series/scatter/index.d.mts +1 -1
  180. package/dist/series/scatter/index.mjs +18 -14
  181. package/dist/series/scatter/svg/index.mjs +16 -12
  182. package/dist/series/treemap/canvas/index.mjs +10 -10
  183. package/dist/series/treemap/controller/index.mjs +23 -20
  184. package/dist/series/treemap/controller-canvas/index.mjs +23 -20
  185. package/dist/series/treemap/controller-svg/index.mjs +23 -20
  186. package/dist/series/treemap/index.d.mts +17 -9
  187. package/dist/series/treemap/index.mjs +12 -12
  188. package/dist/series/treemap/svg/index.mjs +9 -9
  189. package/dist/{stacking-CChuAcLN.d.mts → stacking-Dz1OBhzm.d.mts} +1 -1
  190. package/dist/sync/index.mjs +6 -5
  191. package/dist/{tooltip.renderer-D5wpSlBa.d.mts → tooltip.renderer-DZfza6xV.d.mts} +3 -3
  192. package/dist/utils/color/index.d.mts +11 -53
  193. package/dist/utils/color/index.mjs +4 -4
  194. package/dist/utils/data/index.d.mts +2 -2
  195. package/dist/utils/data/index.mjs +7 -7
  196. package/dist/utils/export/index.mjs +6 -6
  197. package/dist/utils/index.d.mts +7 -7
  198. package/dist/utils/index.mjs +32 -29
  199. package/dist/utils/interaction/index.d.mts +1 -31
  200. package/dist/utils/interaction/index.mjs +12 -9
  201. package/dist/utils/layout/index.mjs +10 -10
  202. package/dist/utils/math/index.d.mts +1 -1
  203. package/dist/utils/math/index.mjs +1 -1
  204. package/dist/utils/render/index.mjs +3 -3
  205. package/dist/utils/specialized/index.d.mts +1 -1
  206. package/dist/utils/specialized/index.mjs +13 -15
  207. package/dist/utils/text/index.d.mts +1 -1
  208. package/dist/utils/text/index.mjs +9 -8
  209. package/dist/utils/theme/index.d.mts +6 -6
  210. package/dist/utils/theme/index.mjs +5 -5
  211. package/dist/utils/zoom/index.mjs +3 -3
  212. package/package.json +3 -3
  213. package/dist/canvas-D4vigq47.d.mts +0 -34
  214. package/dist/chunk-2QRS4YQ5.mjs +0 -18
  215. package/dist/chunk-53HW45JB.mjs +0 -102
  216. package/dist/chunk-B4FTADAZ.mjs +0 -561
  217. package/dist/chunk-IXOWSEHO.mjs +0 -114
  218. package/dist/chunk-VWF57TS3.mjs +0 -62
  219. package/dist/chunk-XIHBK5D3.mjs +0 -68
  220. package/dist/renderers/circular/index.d.mts +0 -13
  221. package/dist/renderers/circular/index.mjs +0 -13
  222. package/dist/{chunk-WA3OVISZ.mjs → chunks/chunk-4KQZXAHZ.mjs} +0 -0
  223. package/dist/{chunk-CHW4RKY3.mjs → chunks/chunk-576P5DBH.mjs} +0 -0
  224. package/dist/{chunk-EDAKJLNA.mjs → chunks/chunk-5WFF272M.mjs} +0 -0
  225. package/dist/{chunk-ADKLH73T.mjs → chunks/chunk-6XZ6U7GL.mjs} +0 -0
  226. package/dist/{chunk-2QK2KOBN.mjs → chunks/chunk-AOTUNMVD.mjs} +0 -0
  227. package/dist/{chunk-AGU3NG6D.mjs → chunks/chunk-AWMO5TS3.mjs} +0 -0
  228. package/dist/{chunk-SSLTFJ3U.mjs → chunks/chunk-BF7RP4A3.mjs} +132 -132
  229. /package/dist/{chunk-BETFQBM2.mjs → chunks/chunk-FML3QEEI.mjs} +0 -0
  230. /package/dist/{chunk-FFMT6OCO.mjs → chunks/chunk-FRVJH7ZG.mjs} +0 -0
  231. /package/dist/{chunk-HDFGCN2F.mjs → chunks/chunk-HBTCRORW.mjs} +0 -0
  232. /package/dist/{chunk-7CMVDIOU.mjs → chunks/chunk-HXDLOOCS.mjs} +0 -0
  233. /package/dist/{chunk-5JCI2DEB.mjs → chunks/chunk-JQVX6XFW.mjs} +0 -0
  234. /package/dist/{chunk-C36VWQ7A.mjs → chunks/chunk-KMKULH54.mjs} +0 -0
  235. /package/dist/{chunk-Q6PPVIHU.mjs → chunks/chunk-MT3OLVZC.mjs} +0 -0
  236. /package/dist/{chunk-WS64BZXT.mjs → chunks/chunk-OWVSSQZ4.mjs} +0 -0
  237. /package/dist/{chunk-EAMUNLRU.mjs → chunks/chunk-P2LG7GDM.mjs} +0 -0
  238. /package/dist/{chunk-IEGLX7VL.mjs → chunks/chunk-PXUXZADY.mjs} +0 -0
  239. /package/dist/{chunk-SANZPAJ4.mjs → chunks/chunk-SFUDXJKO.mjs} +0 -0
  240. /package/dist/{chunk-ZQFK6CAE.mjs → chunks/chunk-SJNUJM54.mjs} +0 -0
  241. /package/dist/{chunk-AP3UYWYT.mjs → chunks/chunk-SPU6BO3B.mjs} +0 -0
  242. /package/dist/{chunk-YBJ56XJS.mjs → chunks/chunk-T2UAEMHY.mjs} +0 -0
  243. /package/dist/{chunk-JO7VACY2.mjs → chunks/chunk-VADXCPQ4.mjs} +0 -0
  244. /package/dist/{chunk-FRST55HY.mjs → chunks/chunk-ZZCVDIU5.mjs} +0 -0
@@ -1,62 +0,0 @@
1
- import { computeSliceRenderStates } from './chunk-53HW45JB.mjs';
2
- import { drawCanvasArc, CLIP_PIXEL_MARGIN } from './chunk-LVMDQ4OJ.mjs';
3
- import { isGradientColor, remapStopsForDonut, createCanvasGradientFromColor } from './chunk-O2X6FF45.mjs';
4
- import { withCanvasState } from './chunk-SSLTFJ3U.mjs';
5
-
6
- // src/series/pie/canvas/index.ts
7
- function renderPieCanvas(props, layout, ctx, context) {
8
- const renderStates = computeSliceRenderStates(props, layout, context.theme);
9
- const { slices: sliceStates, center, outerRadius, innerRadius, isFullCircle: fullCircle } = renderStates;
10
- const borderJoinStyle = props.borderJoinStyle ?? "miter";
11
- const borderAlign = props.borderAlign ?? "inner";
12
- withCanvasState(ctx, () => {
13
- for (const state of sliceStates) {
14
- const { effectColor, effectBorderColor, effectBorderWidth, effectBorderDash, effectBorderDashOffset, opacity, offset, scale, arcConfig } = state;
15
- const { dx, dy } = offset;
16
- const cx = center.x + dx;
17
- const cy = center.y + dy;
18
- ctx.save();
19
- if (scale !== 1) {
20
- ctx.translate(cx, cy);
21
- ctx.scale(scale, scale);
22
- ctx.translate(-cx, -cy);
23
- }
24
- if (isGradientColor(effectColor)) {
25
- const gradientColor = innerRadius > 0 && effectColor.radialGradient ? { ...effectColor, stops: remapStopsForDonut(effectColor.stops, innerRadius / outerRadius) } : effectColor;
26
- ctx.fillStyle = createCanvasGradientFromColor(ctx, gradientColor, { x: cx, y: cy }, outerRadius);
27
- } else {
28
- ctx.fillStyle = effectColor;
29
- }
30
- ctx.globalAlpha = opacity;
31
- drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
32
- ctx.fill();
33
- if (effectBorderWidth > 0 && effectBorderColor !== "transparent") {
34
- ctx.strokeStyle = typeof effectBorderColor === "string" ? effectBorderColor : context.theme.borderColor;
35
- ctx.lineJoin = borderJoinStyle;
36
- if (effectBorderDash && effectBorderDash.length > 0) {
37
- ctx.setLineDash(effectBorderDash);
38
- ctx.lineDashOffset = effectBorderDashOffset;
39
- } else {
40
- ctx.setLineDash([]);
41
- }
42
- if (borderAlign === "inner") {
43
- ctx.save();
44
- const _angleDeltaCanvas = arcConfig.outerRadius > 0 ? CLIP_PIXEL_MARGIN / arcConfig.outerRadius * (180 / Math.PI) : 0;
45
- drawCanvasArc(ctx, cx, cy, { ...arcConfig, rotation: arcConfig.rotation - _angleDeltaCanvas, endAngle: arcConfig.endAngle + _angleDeltaCanvas }, fullCircle);
46
- ctx.clip();
47
- ctx.lineWidth = effectBorderWidth * 2;
48
- drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
49
- ctx.stroke();
50
- ctx.restore();
51
- } else {
52
- ctx.lineWidth = effectBorderWidth;
53
- drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
54
- ctx.stroke();
55
- }
56
- }
57
- ctx.restore();
58
- }
59
- });
60
- }
61
-
62
- export { renderPieCanvas };
@@ -1,68 +0,0 @@
1
- import { renderTreemapCanvas } from './chunk-55Y3WI6S.mjs';
2
- import { renderTreemapSvg } from './chunk-RO4N6YFS.mjs';
3
- import { calculateTreemapLayout } from './chunk-VVI3OBPJ.mjs';
4
- import { CHAR_WIDTH_RATIO } from './chunk-XTVE4P3L.mjs';
5
-
6
- // src/series/treemap/geometry.ts
7
- function hitTestTreemap(_x, _y, _props, layout) {
8
- for (const cell of layout.cells) {
9
- if (_x >= cell.x && _x <= cell.x + cell.width && _y >= cell.y && _y <= cell.y + cell.height) {
10
- return cell.index;
11
- }
12
- }
13
- return null;
14
- }
15
-
16
- // src/series/treemap/shared.ts
17
- var LABEL_TIERS = [
18
- { minArea: 25e3, minWidth: 100, minHeight: 60, fontSize: 16, secondaryFontSize: 12, showSecondary: true },
19
- { minArea: 1e4, minWidth: 70, minHeight: 45, fontSize: 14, secondaryFontSize: 10, showSecondary: true },
20
- { minArea: 4e3, minWidth: 50, minHeight: 35, fontSize: 12, secondaryFontSize: 9, showSecondary: true },
21
- { minArea: 1500, minWidth: 38, minHeight: 26, fontSize: 10, secondaryFontSize: 8, showSecondary: true },
22
- { minArea: 600, minWidth: 28, minHeight: 20, fontSize: 9, secondaryFontSize: 0, showSecondary: false },
23
- { minArea: 250, minWidth: 22, minHeight: 14, fontSize: 8, secondaryFontSize: 0, showSecondary: false }
24
- ];
25
- function getCellLabelInfo(cell, labelMinSize) {
26
- const area = cell.width * cell.height;
27
- const none = { fontSize: 0, secondaryFontSize: 0, showPrimary: false, showSecondary: false, cx: 0, cy: 0, primaryY: 0, secondaryY: 0 };
28
- const minSize = labelMinSize ?? 30;
29
- if (cell.width < minSize || cell.height < minSize) return none;
30
- for (const tier of LABEL_TIERS) {
31
- if (area >= tier.minArea && cell.width >= tier.minWidth && cell.height >= tier.minHeight) {
32
- const primaryTextWidth = cell.label.length * CHAR_WIDTH_RATIO * tier.fontSize;
33
- if (primaryTextWidth > cell.width - 8) {
34
- continue;
35
- }
36
- let showSec = tier.showSecondary && !!cell.secondaryLabel;
37
- if (showSec) {
38
- const secTextWidth = (cell.secondaryLabel?.length ?? 0) * CHAR_WIDTH_RATIO * tier.secondaryFontSize;
39
- if (secTextWidth > cell.width - 8) {
40
- showSec = false;
41
- }
42
- }
43
- const cx = cell.x + cell.width / 2;
44
- const cy = cell.y + cell.height / 2;
45
- return {
46
- fontSize: tier.fontSize,
47
- secondaryFontSize: tier.secondaryFontSize,
48
- showPrimary: true,
49
- showSecondary: showSec,
50
- cx,
51
- cy,
52
- primaryY: showSec ? cy - tier.fontSize * 0.4 : cy,
53
- secondaryY: cy + tier.fontSize * 0.6
54
- };
55
- }
56
- }
57
- return none;
58
- }
59
-
60
- // src/series/treemap/index.ts
61
- var treemapRenderer = {
62
- calculateLayout: calculateTreemapLayout,
63
- renderSvg: (props, layout, context) => renderTreemapSvg(props, layout, context),
64
- renderCanvas: (props, layout, ctx, context) => renderTreemapCanvas(props, layout, ctx, context),
65
- hitTest: hitTestTreemap
66
- };
67
-
68
- export { getCellLabelInfo, hitTestTreemap, treemapRenderer };
@@ -1,13 +0,0 @@
1
- export { d as applyGradientBrightness, b as buildPieSvgChildren, r as renderCanvasCustomContent, a as renderCanvasDataLabels, e as restoreGradientBrightness, u as updatePieCustomContent, c as updateSvgSlices } from '../../canvas-D4vigq47.mjs';
2
- import { RadialSliceState, SliceRenderInfo, SliceGeometry, SliceRenderContext } from '@primeui/chart-types';
3
-
4
- /** Build a SliceRenderContext from animation state + render info */
5
- declare function buildSliceRenderContext(slice: RadialSliceState, renderInfo: SliceRenderInfo, position: {
6
- x: number;
7
- y: number;
8
- }, geo: SliceGeometry, chartCenter?: {
9
- x: number;
10
- y: number;
11
- }, fontFamily?: string): SliceRenderContext<unknown>;
12
-
13
- export { buildSliceRenderContext };
@@ -1,13 +0,0 @@
1
- export { applyGradientBrightness, buildPieSvgChildren, buildSliceRenderContext, renderCanvasCustomContent, renderCanvasDataLabels, restoreGradientBrightness, updatePieCustomContent, updateSvgSlices } from '../../chunk-B4FTADAZ.mjs';
2
- import '../../chunk-4C6EVJ54.mjs';
3
- import '../../chunk-LVMDQ4OJ.mjs';
4
- import '../../chunk-VGLSBZDN.mjs';
5
- import '../../chunk-BZN2QHGP.mjs';
6
- import '../../chunk-7CMVDIOU.mjs';
7
- import '../../chunk-OXTFAWSK.mjs';
8
- import '../../chunk-XTVE4P3L.mjs';
9
- import '../../chunk-NKUYIWAP.mjs';
10
- import '../../chunk-QS76E3TD.mjs';
11
- import '../../chunk-O2X6FF45.mjs';
12
- import '../../chunk-SSLTFJ3U.mjs';
13
- import '../../chunk-RQ3CKQOX.mjs';
@@ -1,3 +1,135 @@
1
+ // src/utils/render/svg.utils.ts
2
+ function svgNode(tag, attributes, children) {
3
+ const attrs = {};
4
+ if (attributes) {
5
+ for (const k in attributes) {
6
+ const v = attributes[k];
7
+ if (v !== void 0) attrs[k] = String(v);
8
+ }
9
+ }
10
+ return { tag, attributes: attrs, children: children ? [...children] : [] };
11
+ }
12
+ function setAttr(node, key, value) {
13
+ node.attributes[key] = String(value);
14
+ return node;
15
+ }
16
+ function appendChild(parent, ...children) {
17
+ parent.children.push(...children);
18
+ return parent;
19
+ }
20
+ function prependChild(parent, child) {
21
+ parent.children.unshift(child);
22
+ return parent;
23
+ }
24
+ function addClass(node, cls) {
25
+ const existing = node.attributes["class"];
26
+ node.attributes["class"] = existing ? `${existing} ${cls}` : cls;
27
+ return node;
28
+ }
29
+ function svgClass(...parts) {
30
+ return parts.filter(Boolean).join(" ");
31
+ }
32
+ function createSvgGroup(transform, attributes) {
33
+ return svgNode("g", { ...attributes, ...transform ? { transform } : {} });
34
+ }
35
+ function createSvgPath(d, attributes) {
36
+ return svgNode("path", { d, ...attributes });
37
+ }
38
+ function createSvgText(x, y, content, attributes) {
39
+ const node = svgNode("text", { x, y, ...attributes });
40
+ if (content) node.children.push(content);
41
+ return node;
42
+ }
43
+ function createSvgRect(x, y, width, height, attributes) {
44
+ return svgNode("rect", {
45
+ x,
46
+ y,
47
+ width: Math.max(0, width),
48
+ height: Math.max(0, height),
49
+ ...attributes
50
+ });
51
+ }
52
+ function createSvgCircle(cx, cy, r, attributes) {
53
+ return svgNode("circle", { cx, cy, r, ...attributes });
54
+ }
55
+ function createSvgLine(x1, y1, x2, y2, attributes) {
56
+ return svgNode("line", { x1, y1, x2, y2, ...attributes });
57
+ }
58
+ function createSvgDefs() {
59
+ return svgNode("defs");
60
+ }
61
+ function createSvgLinearGradient(id, x1, y1, x2, y2, stops, options) {
62
+ const useAbsolute = options?.useAbsoluteCoords ?? false;
63
+ const gradient = svgNode("linearGradient", {
64
+ id,
65
+ x1: useAbsolute ? x1 : `${x1 * 100}%`,
66
+ y1: useAbsolute ? y1 : `${y1 * 100}%`,
67
+ x2: useAbsolute ? x2 : `${x2 * 100}%`,
68
+ y2: useAbsolute ? y2 : `${y2 * 100}%`,
69
+ ...useAbsolute && { gradientUnits: "userSpaceOnUse" }
70
+ });
71
+ for (const { offset, color, opacity } of stops) {
72
+ gradient.children.push(
73
+ svgNode("stop", {
74
+ offset: `${offset * 100}%`,
75
+ "stop-color": color,
76
+ ...opacity !== void 0 && { "stop-opacity": opacity }
77
+ })
78
+ );
79
+ }
80
+ return gradient;
81
+ }
82
+ function createSvgRadialGradient(id, cx, cy, r, stops, options) {
83
+ const useAbsolute = options?.useAbsoluteCoords ?? false;
84
+ const gradient = svgNode("radialGradient", {
85
+ id,
86
+ cx: useAbsolute ? cx : `${cx * 100}%`,
87
+ cy: useAbsolute ? cy : `${cy * 100}%`,
88
+ r: useAbsolute ? r : `${r * 100}%`,
89
+ ...useAbsolute && { gradientUnits: "userSpaceOnUse" }
90
+ });
91
+ for (const { offset, color, opacity } of stops) {
92
+ gradient.children.push(
93
+ svgNode("stop", {
94
+ offset: `${offset * 100}%`,
95
+ "stop-color": color,
96
+ ...opacity !== void 0 && { "stop-opacity": opacity }
97
+ })
98
+ );
99
+ }
100
+ return gradient;
101
+ }
102
+ var SVG_NS = "http://www.w3.org/2000/svg";
103
+ var browserSvgElementFactory = {
104
+ createElement(tag) {
105
+ return document.createElementNS(SVG_NS, tag);
106
+ }
107
+ };
108
+ var activeSvgElementFactory = browserSvgElementFactory;
109
+ function setSvgElementFactory(factory) {
110
+ activeSvgElementFactory = factory ?? browserSvgElementFactory;
111
+ }
112
+ function createSvgElement(tag) {
113
+ return activeSvgElementFactory.createElement(tag);
114
+ }
115
+ function materializeSvgNode(node) {
116
+ const el = activeSvgElementFactory.createElement(node.tag);
117
+ for (const key in node.attributes) {
118
+ el.setAttribute(key, node.attributes[key]);
119
+ }
120
+ for (const child of node.children) {
121
+ if (typeof child === "string") {
122
+ el.textContent = child;
123
+ } else {
124
+ el.appendChild(materializeSvgNode(child));
125
+ }
126
+ }
127
+ return el;
128
+ }
129
+ function materializeSvgGroup(node) {
130
+ return materializeSvgNode(node);
131
+ }
132
+
1
133
  // src/utils/color/parse.ts
2
134
  function parseHexColor(hex) {
3
135
  let h = hex.replace("#", "");
@@ -229,136 +361,4 @@ function createCanvasRadialGradient(ctx, cx, cy, innerRadius, outerRadius, stops
229
361
  return gradient;
230
362
  }
231
363
 
232
- // src/utils/render/svg.utils.ts
233
- function svgNode(tag, attributes, children) {
234
- const attrs = {};
235
- if (attributes) {
236
- for (const k in attributes) {
237
- const v = attributes[k];
238
- if (v !== void 0) attrs[k] = String(v);
239
- }
240
- }
241
- return { tag, attributes: attrs, children: children ? [...children] : [] };
242
- }
243
- function setAttr(node, key, value) {
244
- node.attributes[key] = String(value);
245
- return node;
246
- }
247
- function appendChild(parent, ...children) {
248
- parent.children.push(...children);
249
- return parent;
250
- }
251
- function prependChild(parent, child) {
252
- parent.children.unshift(child);
253
- return parent;
254
- }
255
- function addClass(node, cls) {
256
- const existing = node.attributes["class"];
257
- node.attributes["class"] = existing ? `${existing} ${cls}` : cls;
258
- return node;
259
- }
260
- function svgClass(...parts) {
261
- return parts.filter(Boolean).join(" ");
262
- }
263
- function createSvgGroup(transform, attributes) {
264
- return svgNode("g", { ...attributes, ...transform ? { transform } : {} });
265
- }
266
- function createSvgPath(d, attributes) {
267
- return svgNode("path", { d, ...attributes });
268
- }
269
- function createSvgText(x, y, content, attributes) {
270
- const node = svgNode("text", { x, y, ...attributes });
271
- if (content) node.children.push(content);
272
- return node;
273
- }
274
- function createSvgRect(x, y, width, height, attributes) {
275
- return svgNode("rect", {
276
- x,
277
- y,
278
- width: Math.max(0, width),
279
- height: Math.max(0, height),
280
- ...attributes
281
- });
282
- }
283
- function createSvgCircle(cx, cy, r, attributes) {
284
- return svgNode("circle", { cx, cy, r, ...attributes });
285
- }
286
- function createSvgLine(x1, y1, x2, y2, attributes) {
287
- return svgNode("line", { x1, y1, x2, y2, ...attributes });
288
- }
289
- function createSvgDefs() {
290
- return svgNode("defs");
291
- }
292
- function createSvgLinearGradient(id, x1, y1, x2, y2, stops, options) {
293
- const useAbsolute = options?.useAbsoluteCoords ?? false;
294
- const gradient = svgNode("linearGradient", {
295
- id,
296
- x1: useAbsolute ? x1 : `${x1 * 100}%`,
297
- y1: useAbsolute ? y1 : `${y1 * 100}%`,
298
- x2: useAbsolute ? x2 : `${x2 * 100}%`,
299
- y2: useAbsolute ? y2 : `${y2 * 100}%`,
300
- ...useAbsolute && { gradientUnits: "userSpaceOnUse" }
301
- });
302
- for (const { offset, color, opacity } of stops) {
303
- gradient.children.push(
304
- svgNode("stop", {
305
- offset: `${offset * 100}%`,
306
- "stop-color": color,
307
- ...opacity !== void 0 && { "stop-opacity": opacity }
308
- })
309
- );
310
- }
311
- return gradient;
312
- }
313
- function createSvgRadialGradient(id, cx, cy, r, stops, options) {
314
- const useAbsolute = options?.useAbsoluteCoords ?? false;
315
- const gradient = svgNode("radialGradient", {
316
- id,
317
- cx: useAbsolute ? cx : `${cx * 100}%`,
318
- cy: useAbsolute ? cy : `${cy * 100}%`,
319
- r: useAbsolute ? r : `${r * 100}%`,
320
- ...useAbsolute && { gradientUnits: "userSpaceOnUse" }
321
- });
322
- for (const { offset, color, opacity } of stops) {
323
- gradient.children.push(
324
- svgNode("stop", {
325
- offset: `${offset * 100}%`,
326
- "stop-color": color,
327
- ...opacity !== void 0 && { "stop-opacity": opacity }
328
- })
329
- );
330
- }
331
- return gradient;
332
- }
333
- var SVG_NS = "http://www.w3.org/2000/svg";
334
- var browserSvgElementFactory = {
335
- createElement(tag) {
336
- return document.createElementNS(SVG_NS, tag);
337
- }
338
- };
339
- var activeSvgElementFactory = browserSvgElementFactory;
340
- function setSvgElementFactory(factory) {
341
- activeSvgElementFactory = factory ?? browserSvgElementFactory;
342
- }
343
- function createSvgElement(tag) {
344
- return activeSvgElementFactory.createElement(tag);
345
- }
346
- function materializeSvgNode(node) {
347
- const el = activeSvgElementFactory.createElement(node.tag);
348
- for (const key in node.attributes) {
349
- el.setAttribute(key, node.attributes[key]);
350
- }
351
- for (const child of node.children) {
352
- if (typeof child === "string") {
353
- el.textContent = child;
354
- } else {
355
- el.appendChild(materializeSvgNode(child));
356
- }
357
- }
358
- return el;
359
- }
360
- function materializeSvgGroup(node) {
361
- return materializeSvgNode(node);
362
- }
363
-
364
364
  export { addClass, adjustBrightness, appendChild, brightenGradientStops, configureCanvasHiDPI, createCanvasLinearGradient, createCanvasRadialGradient, createSvgCircle, createSvgDefs, createSvgElement, createSvgGroup, createSvgLine, createSvgLinearGradient, createSvgPath, createSvgRadialGradient, createSvgRect, createSvgText, getDevicePixelRatio, hexToRgbString, hexToRgba, materializeSvgGroup, materializeSvgNode, parseColorToRGB, parseColorToRGBA, parseHexColor, prependChild, readCssNumber, setAttr, setColorParser, setSvgElementFactory, svgClass, svgNode, withCanvasState };