@tabler/charts 0.1.0 → 0.2.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 (378) hide show
  1. package/README.md +19 -1
  2. package/dist/{annotations-Bp7HwtF5.d.ts → annotations-B02GR_KU.d.ts} +3 -8
  3. package/dist/{annotations-lyt0I3HU.d.cts → annotations-CHafaGd4.d.cts} +3 -8
  4. package/dist/{annotations-BszTTjf9.js → annotations-D0YQ0IoA.js} +6 -7
  5. package/dist/{annotations-BszTTjf9.js.map → annotations-D0YQ0IoA.js.map} +1 -1
  6. package/dist/{annotations-DpETO8dE.cjs → annotations-DdRdeBUB.cjs} +6 -7
  7. package/dist/{annotations-DpETO8dE.cjs.map → annotations-DdRdeBUB.cjs.map} +1 -1
  8. package/dist/annotations.cjs +3 -5
  9. package/dist/annotations.cjs.map +1 -1
  10. package/dist/annotations.d.cts +2 -1
  11. package/dist/annotations.d.ts +2 -1
  12. package/dist/annotations.js +3 -4
  13. package/dist/{arc-a1tRTEw7.js → arc-B3V5IR0w.js} +2 -3
  14. package/dist/{arc-a1tRTEw7.js.map → arc-B3V5IR0w.js.map} +1 -1
  15. package/dist/{arc-BXpLrt9b.cjs → arc-CYhI62kO.cjs} +2 -3
  16. package/dist/{arc-BXpLrt9b.cjs.map → arc-CYhI62kO.cjs.map} +1 -1
  17. package/dist/{area-DQsLERhx.js → area-0-L1bG9B.js} +5 -6
  18. package/dist/{area-DQsLERhx.js.map → area-0-L1bG9B.js.map} +1 -1
  19. package/dist/{area-sHCE3pg5.cjs → area-4eRs3c0K.cjs} +5 -6
  20. package/dist/{area-sHCE3pg5.cjs.map → area-4eRs3c0K.cjs.map} +1 -1
  21. package/dist/{area-CF__HOwL.d.ts → area-CJX9219z.d.cts} +3 -6
  22. package/dist/{area-DIxaAbYZ.d.cts → area-d11XePuw.d.ts} +3 -6
  23. package/dist/area.cjs +1 -1
  24. package/dist/area.d.cts +2 -1
  25. package/dist/area.d.ts +2 -1
  26. package/dist/area.js +1 -2
  27. package/dist/{band-DTcNDAFO.d.ts → band-CNKvdnTC.d.cts} +1 -4
  28. package/dist/{band-DTcNDAFO.d.cts → band-CNKvdnTC.d.ts} +1 -4
  29. package/dist/{bar-DM16NUvV.js → bar-B5n2oq9-.js} +3 -4
  30. package/dist/{bar-DM16NUvV.js.map → bar-B5n2oq9-.js.map} +1 -1
  31. package/dist/{bar-BBM8RhoL.d.ts → bar-BDLR4p9c.d.cts} +4 -7
  32. package/dist/{bar-jZEoao74.js → bar-BNZ3GhIw.js} +20 -20
  33. package/dist/bar-BNZ3GhIw.js.map +1 -0
  34. package/dist/{bar-C-7zR2qp.cjs → bar-Da6dE_nI.cjs} +20 -20
  35. package/dist/bar-Da6dE_nI.cjs.map +1 -0
  36. package/dist/{bar-DGuUN3nc.cjs → bar-LYIF8MEz.cjs} +3 -4
  37. package/dist/{bar-DGuUN3nc.cjs.map → bar-LYIF8MEz.cjs.map} +1 -1
  38. package/dist/{bar-CRKLDg98.d.cts → bar-XwzM6Pb0.d.ts} +4 -7
  39. package/dist/bar.cjs +1 -1
  40. package/dist/bar.d.cts +2 -1
  41. package/dist/bar.d.ts +2 -1
  42. package/dist/bar.js +1 -2
  43. package/dist/{candlestick-DuXwAFID.js → candlestick-BHQkQfxH.js} +6 -7
  44. package/dist/{candlestick-DuXwAFID.js.map → candlestick-BHQkQfxH.js.map} +1 -1
  45. package/dist/{candlestick-B5r1w3kc.cjs → candlestick-CYCQXgky.cjs} +6 -7
  46. package/dist/{candlestick-B5r1w3kc.cjs.map → candlestick-CYCQXgky.cjs.map} +1 -1
  47. package/dist/{candlestick-D_vV0_XZ.d.ts → candlestick-D0xKkdqd.d.ts} +3 -6
  48. package/dist/{candlestick-__pXl_pV.d.cts → candlestick-Dq7qp-F0.d.cts} +3 -6
  49. package/dist/candlestick.cjs +4 -5
  50. package/dist/candlestick.d.cts +1 -1
  51. package/dist/candlestick.d.ts +1 -1
  52. package/dist/candlestick.js +4 -6
  53. package/dist/{cartesian-Cr0AF0nG.js → cartesian-CI2x6N7N.js} +27 -27
  54. package/dist/cartesian-CI2x6N7N.js.map +1 -0
  55. package/dist/{cartesian-BoDfgBCV.cjs → cartesian-DV02PsBe.cjs} +27 -27
  56. package/dist/cartesian-DV02PsBe.cjs.map +1 -0
  57. package/dist/{chart-BF2CK9I_.js → chart-DWn9v6qw.js} +35 -24
  58. package/dist/chart-DWn9v6qw.js.map +1 -0
  59. package/dist/{chart-DyN7bcx8.d.ts → chart-QilhWP8Z.d.ts} +32 -49
  60. package/dist/{chart-CowF_lWY.cjs → chart-e2VqomCI.cjs} +35 -24
  61. package/dist/chart-e2VqomCI.cjs.map +1 -0
  62. package/dist/{chart-D7ooEFnk.d.cts → chart-kqFMEwDo.d.cts} +58 -49
  63. package/dist/{circle-BQMuAfls.cjs → circle-Bwxy5j7B.cjs} +2 -3
  64. package/dist/{circle-BQMuAfls.cjs.map → circle-Bwxy5j7B.cjs.map} +1 -1
  65. package/dist/{circle-Z7YfCoCM.js → circle-YRDaOBpk.js} +2 -3
  66. package/dist/{circle-Z7YfCoCM.js.map → circle-YRDaOBpk.js.map} +1 -1
  67. package/dist/{clean-o1vDEhFV.js → clean-CkoQobGv.js} +3 -4
  68. package/dist/{clean-o1vDEhFV.js.map → clean-CkoQobGv.js.map} +1 -1
  69. package/dist/{clean-Byl6kzf0.cjs → clean-Die2iCNc.cjs} +8 -3
  70. package/dist/{clean-Byl6kzf0.cjs.map → clean-Die2iCNc.cjs.map} +1 -1
  71. package/dist/{core-CegR_j55.js → core-BKRQvPAT.js} +33 -41
  72. package/dist/core-BKRQvPAT.js.map +1 -0
  73. package/dist/{core-RzS9IQO5.cjs → core-DIOC61up.cjs} +33 -41
  74. package/dist/core-DIOC61up.cjs.map +1 -0
  75. package/dist/{core-DcbemzGf.d.ts → core-DRUCk67j.d.ts} +4 -41
  76. package/dist/{core-D1vO1LrC.d.cts → core-PAX5ogLk.d.cts} +22 -67
  77. package/dist/core.cjs +28 -24
  78. package/dist/core.d.cts +23 -21
  79. package/dist/core.d.ts +23 -21
  80. package/dist/core.js +27 -25
  81. package/dist/{dates-CG-FvioW.js → dates-C2RzY3rE.js} +4 -5
  82. package/dist/{dates-CG-FvioW.js.map → dates-C2RzY3rE.js.map} +1 -1
  83. package/dist/{dates-Btm7Zm6W.cjs → dates-DurEr9WT.cjs} +4 -5
  84. package/dist/{dates-Btm7Zm6W.cjs.map → dates-DurEr9WT.cjs.map} +1 -1
  85. package/dist/{decimate-tLhDk1ys.cjs → decimate-BS3x8g-f.cjs} +2 -3
  86. package/dist/{decimate-tLhDk1ys.cjs.map → decimate-BS3x8g-f.cjs.map} +1 -1
  87. package/dist/{decimate-BGg9XgF0.d.ts → decimate-BxxYBJJk.d.cts} +2 -5
  88. package/dist/{decimate-C87cl_Sp.js → decimate-CapfgiDY.js} +2 -3
  89. package/dist/{decimate-C87cl_Sp.js.map → decimate-CapfgiDY.js.map} +1 -1
  90. package/dist/{decimate-CNSpgGa5.d.cts → decimate-Du87fMLG.d.ts} +2 -5
  91. package/dist/decimate.cjs +3 -4
  92. package/dist/decimate.d.cts +1 -1
  93. package/dist/decimate.d.ts +1 -1
  94. package/dist/decimate.js +3 -4
  95. package/dist/{dom-vP3IcMak.js → dom-CuceR8gt.js} +4 -6
  96. package/dist/{dom-vP3IcMak.js.map → dom-CuceR8gt.js.map} +1 -1
  97. package/dist/{dom-CLF868Qs.cjs → dom-D_g13XWY.cjs} +4 -6
  98. package/dist/{dom-CLF868Qs.cjs.map → dom-D_g13XWY.cjs.map} +1 -1
  99. package/dist/{export-chart-9w8t3rjZ.js → export-chart-83UYH48t.js} +3 -4
  100. package/dist/{export-chart-9w8t3rjZ.js.map → export-chart-83UYH48t.js.map} +1 -1
  101. package/dist/{export-chart-BhhYgksr.cjs → export-chart-mYgEfK-L.cjs} +3 -4
  102. package/dist/{export-chart-BhhYgksr.cjs.map → export-chart-mYgEfK-L.cjs.map} +1 -1
  103. package/dist/export.cjs +3 -5
  104. package/dist/export.cjs.map +1 -1
  105. package/dist/export.d.cts +8 -1
  106. package/dist/export.d.ts +8 -1
  107. package/dist/export.js +3 -4
  108. package/dist/{extent-BAMZo0Nq.js → extent-DOV8rs-6.js} +2 -3
  109. package/dist/{extent-BAMZo0Nq.js.map → extent-DOV8rs-6.js.map} +1 -1
  110. package/dist/{extent-DsFWvAHJ.cjs → extent-DuYDcvM9.cjs} +2 -3
  111. package/dist/{extent-DsFWvAHJ.cjs.map → extent-DuYDcvM9.cjs.map} +1 -1
  112. package/dist/{fade-Cs74puQS.cjs → fade-DVTkhrFU.cjs} +4 -6
  113. package/dist/{fade-Cs74puQS.cjs.map → fade-DVTkhrFU.cjs.map} +1 -1
  114. package/dist/{fade-D3NxH5Qg.js → fade-GGxcBdss.js} +4 -6
  115. package/dist/{fade-D3NxH5Qg.js.map → fade-GGxcBdss.js.map} +1 -1
  116. package/dist/{features-wASyHGic.js → features-BMxkqCyS.js} +2 -3
  117. package/dist/{features-wASyHGic.js.map → features-BMxkqCyS.js.map} +1 -1
  118. package/dist/{features-BclHgg2W.cjs → features-DCXEvoya.cjs} +2 -3
  119. package/dist/{features-BclHgg2W.cjs.map → features-DCXEvoya.cjs.map} +1 -1
  120. package/dist/{format-B0yKXBTH.cjs → format-CAE5ruy6.cjs} +2 -3
  121. package/dist/{format-B0yKXBTH.cjs.map → format-CAE5ruy6.cjs.map} +1 -1
  122. package/dist/{format-lStwuc1L.js → format-it1kepFG.js} +2 -3
  123. package/dist/{format-lStwuc1L.js.map → format-it1kepFG.js.map} +1 -1
  124. package/dist/{gauge-zpia05t2.d.ts → gauge-0VJuAHWF.d.ts} +5 -8
  125. package/dist/{gauge-DP_EB2z3.d.cts → gauge-BSist7My.d.cts} +5 -8
  126. package/dist/{gauge-D-FYhuds.cjs → gauge-DXkjXNCD.cjs} +10 -11
  127. package/dist/gauge-DXkjXNCD.cjs.map +1 -0
  128. package/dist/{gauge-Dh423FHh.js → gauge-ts0kqN1-.js} +10 -11
  129. package/dist/{gauge-Dh423FHh.js.map → gauge-ts0kqN1-.js.map} +1 -1
  130. package/dist/gauge.cjs +1 -1
  131. package/dist/gauge.d.cts +2 -1
  132. package/dist/gauge.d.ts +2 -1
  133. package/dist/gauge.js +1 -2
  134. package/dist/{heatmap-DSZ2bVIa.js → heatmap-19BGJTKF.js} +20 -22
  135. package/dist/heatmap-19BGJTKF.js.map +1 -0
  136. package/dist/{heatmap-BectCEeE.d.ts → heatmap-59lmClj9.d.ts} +4 -7
  137. package/dist/{heatmap-BK18EBgJ.cjs → heatmap-CXhlrLTl.cjs} +20 -22
  138. package/dist/heatmap-CXhlrLTl.cjs.map +1 -0
  139. package/dist/{heatmap-CCso6m61.d.cts → heatmap-Dp_oyEe0.d.cts} +4 -7
  140. package/dist/heatmap.cjs +1 -1
  141. package/dist/heatmap.d.cts +2 -1
  142. package/dist/heatmap.d.ts +2 -1
  143. package/dist/heatmap.js +1 -2
  144. package/dist/{hydrate-CzfxLfTv.d.ts → hydrate-BtAZf_5K.d.cts} +2 -5
  145. package/dist/{hydrate-CxwTXDqO.cjs → hydrate-CmN1k8Mo.cjs} +3 -4
  146. package/dist/hydrate-CmN1k8Mo.cjs.map +1 -0
  147. package/dist/{hydrate-DDNIHYv_.js → hydrate-OA6R2_Pn.js} +3 -4
  148. package/dist/{hydrate-DDNIHYv_.js.map → hydrate-OA6R2_Pn.js.map} +1 -1
  149. package/dist/{hydrate-CTTmQy0x.d.cts → hydrate-OjM1pIUG.d.ts} +2 -5
  150. package/dist/hydrate.cjs +3 -4
  151. package/dist/hydrate.cjs.map +1 -1
  152. package/dist/hydrate.d.cts +1 -1
  153. package/dist/hydrate.d.ts +1 -1
  154. package/dist/hydrate.js +3 -4
  155. package/dist/index.cjs +49 -46
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +24 -27
  158. package/dist/index.d.ts +24 -27
  159. package/dist/index.js +44 -43
  160. package/dist/index.js.map +1 -1
  161. package/dist/{layout-B3hiqVEw.js → layout-DmrrLjwN.js} +9 -4
  162. package/dist/layout-DmrrLjwN.js.map +1 -0
  163. package/dist/{layout-CtMBhNd9.cjs → layout-JY2aR-yE.cjs} +14 -3
  164. package/dist/layout-JY2aR-yE.cjs.map +1 -0
  165. package/dist/{line-B3Ed6u7j.js → line-DO66LtwH.js} +9 -10
  166. package/dist/{line-B3Ed6u7j.js.map → line-DO66LtwH.js.map} +1 -1
  167. package/dist/{line-fQbtP_jL.cjs → line-Dbt6KFRK.cjs} +9 -10
  168. package/dist/{line-fQbtP_jL.cjs.map → line-Dbt6KFRK.cjs.map} +1 -1
  169. package/dist/{line-CN4uZ9ZX.d.ts → line-DtSh7HQU.d.ts} +4 -7
  170. package/dist/{line-W7VD_qs1.d.cts → line-_rNdeKmS.d.cts} +5 -7
  171. package/dist/line.cjs +4 -5
  172. package/dist/line.cjs.map +1 -1
  173. package/dist/line.d.cts +1 -1
  174. package/dist/line.d.ts +1 -1
  175. package/dist/line.js +4 -6
  176. package/dist/{log-CaofN3-n.d.ts → log-CI41TmcU.d.cts} +1 -6
  177. package/dist/{log-CaofN3-n.d.cts → log-CI41TmcU.d.ts} +1 -6
  178. package/dist/{log-axis-83rSpvL5.cjs → log-axis-DdRNyAq8.cjs} +6 -8
  179. package/dist/{log-axis-83rSpvL5.cjs.map → log-axis-DdRNyAq8.cjs.map} +1 -1
  180. package/dist/{log-axis-B_uvvOFc.js → log-axis-DhthtHFk.js} +6 -8
  181. package/dist/{log-axis-B_uvvOFc.js.map → log-axis-DhthtHFk.js.map} +1 -1
  182. package/dist/log.cjs +3 -5
  183. package/dist/log.cjs.map +1 -1
  184. package/dist/log.d.cts +1 -1
  185. package/dist/log.d.ts +1 -1
  186. package/dist/log.js +3 -4
  187. package/dist/{morph-CqYDu1bY.cjs → morph-9_LJL0ra.cjs} +4 -5
  188. package/dist/morph-9_LJL0ra.cjs.map +1 -0
  189. package/dist/{morph-BMxz3X2b.d.ts → morph-Dh7gJkV4.d.cts} +1 -4
  190. package/dist/{morph-BMxz3X2b.d.cts → morph-Dh7gJkV4.d.ts} +1 -4
  191. package/dist/{morph-Bgg-24l8.js → morph-DnRxuwR-.js} +4 -5
  192. package/dist/{morph-Bgg-24l8.js.map → morph-DnRxuwR-.js.map} +1 -1
  193. package/dist/morph.cjs +3 -4
  194. package/dist/morph.cjs.map +1 -1
  195. package/dist/morph.d.cts +1 -1
  196. package/dist/morph.d.ts +1 -1
  197. package/dist/morph.js +3 -4
  198. package/dist/{named-BWWb5LQJ.cjs → named-BBASc8dW.cjs} +2 -3
  199. package/dist/{named-BWWb5LQJ.cjs.map → named-BBASc8dW.cjs.map} +1 -1
  200. package/dist/{named-DE15TOgh.js → named-BOiBah6I.js} +2 -3
  201. package/dist/{named-DE15TOgh.js.map → named-BOiBah6I.js.map} +1 -1
  202. package/dist/others-DWdK7vKp.cjs +60 -0
  203. package/dist/others-DWdK7vKp.cjs.map +1 -0
  204. package/dist/others-J7NCAMA0.js +49 -0
  205. package/dist/others-J7NCAMA0.js.map +1 -0
  206. package/dist/{parliament-1Zv2Xh0D.d.ts → parliament-CLCI7tUO.d.ts} +5 -8
  207. package/dist/{parliament-DdrLVZwt.d.cts → parliament-CgsVnWEe.d.cts} +5 -8
  208. package/dist/{parliament-Dw0sOERi.js → parliament-Cru4IcuM.js} +8 -9
  209. package/dist/parliament-Cru4IcuM.js.map +1 -0
  210. package/dist/{parliament-CpWnoEvG.cjs → parliament-x5hcFaQ3.cjs} +8 -9
  211. package/dist/parliament-x5hcFaQ3.cjs.map +1 -0
  212. package/dist/parliament.cjs +1 -1
  213. package/dist/parliament.d.cts +2 -1
  214. package/dist/parliament.d.ts +2 -1
  215. package/dist/parliament.js +1 -2
  216. package/dist/{path-CwB28da0.d.ts → path-YeUiOfG8.d.cts} +1 -4
  217. package/dist/{path-CwB28da0.d.cts → path-YeUiOfG8.d.ts} +1 -4
  218. package/dist/{patterns-DtgcnA8o.js → patterns-CufKZYhm.js} +4 -5
  219. package/dist/{patterns-DtgcnA8o.js.map → patterns-CufKZYhm.js.map} +1 -1
  220. package/dist/{patterns-LfcQAWCy.cjs → patterns-D3-wQagb.cjs} +4 -5
  221. package/dist/{patterns-LfcQAWCy.cjs.map → patterns-D3-wQagb.cjs.map} +1 -1
  222. package/dist/patterns.cjs +3 -5
  223. package/dist/patterns.cjs.map +1 -1
  224. package/dist/patterns.d.cts +5 -1
  225. package/dist/patterns.d.ts +5 -1
  226. package/dist/patterns.js +3 -4
  227. package/dist/percentage-bar-B6tNOqNn.js +157 -0
  228. package/dist/percentage-bar-B6tNOqNn.js.map +1 -0
  229. package/dist/percentage-bar-nhTeakD_.d.ts +62 -0
  230. package/dist/percentage-bar-tepMr7Hd.d.cts +62 -0
  231. package/dist/percentage-bar-ybNS3goo.cjs +162 -0
  232. package/dist/percentage-bar-ybNS3goo.cjs.map +1 -0
  233. package/dist/percentage-bar.cjs +3 -0
  234. package/dist/percentage-bar.d.cts +3 -0
  235. package/dist/percentage-bar.d.ts +3 -0
  236. package/dist/percentage-bar.js +1 -0
  237. package/dist/{pie-5z1fDdKO.d.ts → pie-BXg2gNpb.d.cts} +14 -8
  238. package/dist/{pie-BxTZt6Go.cjs → pie-BpjvSPnz.cjs} +13 -17
  239. package/dist/pie-BpjvSPnz.cjs.map +1 -0
  240. package/dist/{pie-BF9yI5mE.d.cts → pie-CFptILSm.d.ts} +14 -8
  241. package/dist/{pie-DzUXDTcn.js → pie-CVsc-6qD.js} +13 -17
  242. package/dist/pie-CVsc-6qD.js.map +1 -0
  243. package/dist/pie.cjs +1 -1
  244. package/dist/pie.d.cts +2 -1
  245. package/dist/pie.d.ts +2 -1
  246. package/dist/pie.js +1 -2
  247. package/dist/{point-shapes-CGl4dugc.cjs → point-shapes--_gmdTyK.cjs} +3 -4
  248. package/dist/{point-shapes-CGl4dugc.cjs.map → point-shapes--_gmdTyK.cjs.map} +1 -1
  249. package/dist/{point-shapes-DI84NNpI.js → point-shapes-DD2Ektzm.js} +3 -4
  250. package/dist/{point-shapes-DI84NNpI.js.map → point-shapes-DD2Ektzm.js.map} +1 -1
  251. package/dist/point-shapes.cjs +3 -4
  252. package/dist/point-shapes.d.cts +5 -1
  253. package/dist/point-shapes.d.ts +5 -1
  254. package/dist/point-shapes.js +3 -4
  255. package/dist/{radar-1-EryihA.d.ts → radar-BC9Skgpj.d.ts} +4 -7
  256. package/dist/{radar-CYPab_I4.js → radar-BR-mumDd.js} +7 -8
  257. package/dist/{radar-CYPab_I4.js.map → radar-BR-mumDd.js.map} +1 -1
  258. package/dist/{radar-DBW4O0Vt.d.cts → radar-D1-lItDy.d.cts} +4 -7
  259. package/dist/{radar-CoGUNNSb.cjs → radar-HPDrIdzc.cjs} +7 -8
  260. package/dist/{radar-CoGUNNSb.cjs.map → radar-HPDrIdzc.cjs.map} +1 -1
  261. package/dist/radar.cjs +1 -1
  262. package/dist/radar.d.cts +2 -1
  263. package/dist/radar.d.ts +2 -1
  264. package/dist/radar.js +1 -2
  265. package/dist/rect-D6VhynBM.cjs +16 -0
  266. package/dist/rect-D6VhynBM.cjs.map +1 -0
  267. package/dist/rect-DSVmUZrD.js +11 -0
  268. package/dist/rect-DSVmUZrD.js.map +1 -0
  269. package/dist/{sankey-B4PNKusJ.js → sankey-D6JeZfK5.js} +33 -29
  270. package/dist/sankey-D6JeZfK5.js.map +1 -0
  271. package/dist/{sankey-OV_WoPrl.d.ts → sankey-D_v7KxnJ.d.ts} +4 -7
  272. package/dist/{sankey-DuGI3Qc5.d.cts → sankey-Dk7jUt8x.d.cts} +4 -7
  273. package/dist/{sankey-Bacx4fVe.cjs → sankey-fCoo1cpz.cjs} +33 -29
  274. package/dist/sankey-fCoo1cpz.cjs.map +1 -0
  275. package/dist/sankey.cjs +1 -1
  276. package/dist/sankey.d.cts +2 -1
  277. package/dist/sankey.d.ts +2 -1
  278. package/dist/sankey.js +1 -2
  279. package/dist/{scatter-kgtgR318.js → scatter-C0TWjFpW.js} +21 -18
  280. package/dist/scatter-C0TWjFpW.js.map +1 -0
  281. package/dist/{scatter-BqzgJqdX.d.ts → scatter-CXEsioOJ.d.ts} +8 -9
  282. package/dist/{scatter-DgMN9zRy.cjs → scatter-DVqB_fP9.cjs} +21 -18
  283. package/dist/scatter-DVqB_fP9.cjs.map +1 -0
  284. package/dist/{scatter-DbxLyZX0.d.cts → scatter-DZeEIfyo.d.cts} +8 -9
  285. package/dist/scatter.cjs +1 -1
  286. package/dist/scatter.d.cts +2 -1
  287. package/dist/scatter.d.ts +2 -1
  288. package/dist/scatter.js +1 -2
  289. package/dist/{sparkline-BS9-hltA.cjs → sparkline-B39NA0Mi.cjs} +14 -13
  290. package/dist/sparkline-B39NA0Mi.cjs.map +1 -0
  291. package/dist/{sparkline-CWlJDKyh.d.cts → sparkline-DAP6jtzw.d.cts} +5 -8
  292. package/dist/{sparkline-BQzt27Fr.js → sparkline-XO_TqCNP.js} +14 -13
  293. package/dist/sparkline-XO_TqCNP.js.map +1 -0
  294. package/dist/{sparkline-BfyO_oNM.d.ts → sparkline-cbvRkWqS.d.ts} +5 -8
  295. package/dist/sparkline.cjs +1 -1
  296. package/dist/sparkline.d.cts +2 -1
  297. package/dist/sparkline.d.ts +2 -1
  298. package/dist/sparkline.js +1 -2
  299. package/dist/{stack-DRbwTeF3.js → stack-2H2Gfs1Q.js} +3 -4
  300. package/dist/{stack-DRbwTeF3.js.map → stack-2H2Gfs1Q.js.map} +1 -1
  301. package/dist/{stack-DVhJWaki.cjs → stack-BgPzoQmv.cjs} +3 -4
  302. package/dist/{stack-DVhJWaki.cjs.map → stack-BgPzoQmv.cjs.map} +1 -1
  303. package/dist/{stack-CpR6RGKd.d.ts → stack-DR0eQTsB.d.ts} +1 -4
  304. package/dist/{stack-CpR6RGKd.d.cts → stack-Dagxq7l2.d.cts} +2 -4
  305. package/dist/style.css +1 -1
  306. package/dist/{sweep-CbfR7--d.js → sweep-BpRPlhs6.js} +5 -6
  307. package/dist/{sweep-CbfR7--d.js.map → sweep-BpRPlhs6.js.map} +1 -1
  308. package/dist/{sweep-DaTEDDuC.cjs → sweep-Dnp6LDBz.cjs} +5 -6
  309. package/dist/sweep-Dnp6LDBz.cjs.map +1 -0
  310. package/dist/{time-CNVnt-B2.d.cts → time-B4oxWHQI.d.cts} +2 -7
  311. package/dist/{time-CHjiY9Q4.d.ts → time-DRIDgv2a.d.ts} +2 -7
  312. package/dist/{time-axis-VSX34_Tb.cjs → time-axis-BjZ1bYTK.cjs} +9 -10
  313. package/dist/{time-axis-VSX34_Tb.cjs.map → time-axis-BjZ1bYTK.cjs.map} +1 -1
  314. package/dist/{time-axis-Bc9eHX1r.js → time-axis-FLONo54E.js} +9 -10
  315. package/dist/{time-axis-Bc9eHX1r.js.map → time-axis-FLONo54E.js.map} +1 -1
  316. package/dist/time.cjs +4 -6
  317. package/dist/time.cjs.map +1 -1
  318. package/dist/time.d.cts +1 -1
  319. package/dist/time.d.ts +1 -1
  320. package/dist/time.js +4 -5
  321. package/dist/treemap-BAkhmVQc.d.cts +55 -0
  322. package/dist/treemap-BNpxFBao.d.ts +55 -0
  323. package/dist/treemap-BWpEUlDh.cjs +303 -0
  324. package/dist/treemap-BWpEUlDh.cjs.map +1 -0
  325. package/dist/treemap-CQdavQ9u.js +298 -0
  326. package/dist/treemap-CQdavQ9u.js.map +1 -0
  327. package/dist/treemap.cjs +3 -0
  328. package/dist/treemap.d.cts +3 -0
  329. package/dist/treemap.d.ts +3 -0
  330. package/dist/treemap.js +1 -0
  331. package/dist/{tween-BCYd0RTY.js → tween-BdQqUmmv.js} +2 -3
  332. package/dist/{tween-BCYd0RTY.js.map → tween-BdQqUmmv.js.map} +1 -1
  333. package/dist/{tween-CIGBlryn.cjs → tween-c3aOmfKE.cjs} +2 -3
  334. package/dist/{tween-CIGBlryn.cjs.map → tween-c3aOmfKE.cjs.map} +1 -1
  335. package/dist/{value-labels-IZIQPhfk.js → value-labels-BBuSi4i0.js} +7 -7
  336. package/dist/value-labels-BBuSi4i0.js.map +1 -0
  337. package/dist/{value-labels-B0WJoJ7x.cjs → value-labels-BV9keAuL.cjs} +7 -7
  338. package/dist/value-labels-BV9keAuL.cjs.map +1 -0
  339. package/dist/value-labels.cjs +3 -5
  340. package/dist/value-labels.cjs.map +1 -1
  341. package/dist/value-labels.d.cts +5 -1
  342. package/dist/value-labels.d.ts +5 -1
  343. package/dist/value-labels.js +3 -4
  344. package/dist/{vnode-CkQ27Cxe.cjs → vnode-ClAiw28x.cjs} +2 -3
  345. package/dist/{vnode-CkQ27Cxe.cjs.map → vnode-ClAiw28x.cjs.map} +1 -1
  346. package/dist/{vnode-BUflsBsa.d.ts → vnode-Du2cC8Fm.d.cts} +1 -4
  347. package/dist/{vnode-BUflsBsa.d.cts → vnode-Du2cC8Fm.d.ts} +1 -4
  348. package/dist/{vnode-tCWItoUH.js → vnode-_EMUqysL.js} +2 -3
  349. package/dist/{vnode-tCWItoUH.js.map → vnode-_EMUqysL.js.map} +1 -1
  350. package/package.json +21 -1
  351. package/dist/bar-C-7zR2qp.cjs.map +0 -1
  352. package/dist/bar-jZEoao74.js.map +0 -1
  353. package/dist/cartesian-BoDfgBCV.cjs.map +0 -1
  354. package/dist/cartesian-Cr0AF0nG.js.map +0 -1
  355. package/dist/chart-BF2CK9I_.js.map +0 -1
  356. package/dist/chart-CowF_lWY.cjs.map +0 -1
  357. package/dist/core-CegR_j55.js.map +0 -1
  358. package/dist/core-RzS9IQO5.cjs.map +0 -1
  359. package/dist/gauge-D-FYhuds.cjs.map +0 -1
  360. package/dist/heatmap-BK18EBgJ.cjs.map +0 -1
  361. package/dist/heatmap-DSZ2bVIa.js.map +0 -1
  362. package/dist/hydrate-CxwTXDqO.cjs.map +0 -1
  363. package/dist/layout-B3hiqVEw.js.map +0 -1
  364. package/dist/layout-CtMBhNd9.cjs.map +0 -1
  365. package/dist/morph-CqYDu1bY.cjs.map +0 -1
  366. package/dist/parliament-CpWnoEvG.cjs.map +0 -1
  367. package/dist/parliament-Dw0sOERi.js.map +0 -1
  368. package/dist/pie-BxTZt6Go.cjs.map +0 -1
  369. package/dist/pie-DzUXDTcn.js.map +0 -1
  370. package/dist/sankey-B4PNKusJ.js.map +0 -1
  371. package/dist/sankey-Bacx4fVe.cjs.map +0 -1
  372. package/dist/scatter-DgMN9zRy.cjs.map +0 -1
  373. package/dist/scatter-kgtgR318.js.map +0 -1
  374. package/dist/sparkline-BQzt27Fr.js.map +0 -1
  375. package/dist/sparkline-BS9-hltA.cjs.map +0 -1
  376. package/dist/sweep-DaTEDDuC.cjs.map +0 -1
  377. package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
  378. package/dist/value-labels-IZIQPhfk.js.map +0 -1
@@ -1,8 +1,7 @@
1
- import { a as InsetsInput } from "./annotations-lyt0I3HU.cjs";
2
- import { a as ClassValue } from "./vnode-BUflsBsa.cjs";
3
- import { a as ChartType } from "./chart-D7ooEFnk.cjs";
4
- import { c as NumberFormat } from "./time-CNVnt-B2.cjs";
5
- //#region src/charts/pie.d.ts
1
+ import { a as ChartType } from "./chart-QilhWP8Z.js";
2
+ import { c as NumberFormat } from "./time-DRIDgv2a.js";
3
+ import { a as InsetsInput } from "./annotations-B02GR_KU.js";
4
+ import { a as ClassValue } from "./vnode-Du2cC8Fm.js";
6
5
  /** One slice of a pie or donut. */
7
6
  interface PieSlice {
8
7
  name: string;
@@ -22,6 +21,15 @@ interface PieSlice {
22
21
  }
23
22
  interface PieOptions {
24
23
  data: readonly PieSlice[];
24
+ /**
25
+ * The most slices drawn, the one for the rest included: with more entries
26
+ * than that, the largest `maxSlices - 1` keep a slice of their own and the
27
+ * others share one, named by `othersLabel`, after them. Defaults to `9`
28
+ * (the eight palette colors and the rest); `0` never groups.
29
+ */
30
+ maxSlices?: number;
31
+ /** Name of the slice that groups the rest. Defaults to `'Others'`. */
32
+ othersLabel?: string;
25
33
  /** Hole size relative to the radius, `0…0.95`. Defaults to `0` (`0.62` for `donut`). */
26
34
  innerRadius?: number;
27
35
  /** Gap between slices in pixels, drawn as surface. Defaults to `2`. */
@@ -53,6 +61,4 @@ interface PieOptions {
53
61
  declare const pie: ChartType<PieOptions>;
54
62
  /** Donut chart: a pie with a hole showing the total (or your own `center`). */
55
63
  declare const donut: ChartType<PieOptions>;
56
- //#endregion
57
- export { pie as i, PieSlice as n, donut as r, PieOptions as t };
58
- //# sourceMappingURL=pie-BF9yI5mE.d.cts.map
64
+ export { pie as i, PieSlice as n, donut as r, PieOptions as t };
@@ -1,19 +1,16 @@
1
- import { i as insets, r as innerRect } from "./layout-B3hiqVEw.js";
2
- import { t as h } from "./vnode-tCWItoUH.js";
3
- import { o as getNumberFormat, r as formatNumber } from "./format-lStwuc1L.js";
4
- import { r as features } from "./features-wASyHGic.js";
5
- import { n as cleanItems, t as cleanData } from "./clean-o1vDEhFV.js";
6
- import { n as keyOf, r as legendItems, t as groupAttrs } from "./named-DE15TOgh.js";
7
- import { i as padAngleForGap, n as arcCentroid, r as arcPathStable, t as DEG } from "./arc-a1tRTEw7.js";
8
- import { n as sweep, t as arcNode } from "./sweep-CbfR7--d.js";
9
- //#region src/charts/pie.ts
1
+ import { r as features } from "./features-BMxkqCyS.js";
2
+ import { o as getNumberFormat, r as formatNumber } from "./format-it1kepFG.js";
3
+ import { i as insets, r as innerRect } from "./layout-DmrrLjwN.js";
4
+ import { n as sweep, t as arcNode } from "./sweep-BpRPlhs6.js";
5
+ import { i as padAngleForGap, n as arcCentroid, r as arcPathStable, t as DEG } from "./arc-B3V5IR0w.js";
6
+ import { t as h } from "./vnode-_EMUqysL.js";
7
+ import { n as cleanItems, t as cleanData } from "./clean-CkoQobGv.js";
8
+ import { n as keyOf, t as groupAttrs } from "./named-BOiBah6I.js";
9
+ import { n as groupSlices, t as groupLegend } from "./others-J7NCAMA0.js";
10
+ // src/charts/pie.ts
10
11
  /** Angles of the visible slices, clockwise from `startAngle`. */
11
12
  function layoutSlices(options, hidden) {
12
- const visible = options.data.map((data, index) => ({
13
- data,
14
- index,
15
- value: Math.max(0, data.value || 0)
16
- })).filter((slice) => !hidden.has(keyOf(slice.data)));
13
+ const visible = groupSlices(options.data, options.maxSlices, options.othersLabel).filter((slice) => !hidden.has(keyOf(slice.data)));
17
14
  const total = visible.reduce((sum, slice) => sum + slice.value, 0);
18
15
  let angle = (options.startAngle ?? 0) * DEG;
19
16
  return {
@@ -174,7 +171,7 @@ function pieType(name, defaults) {
174
171
  features.sweep = sweep;
175
172
  return renderPie(options, ctx, defaults);
176
173
  },
177
- legend: (options) => legendItems(options.data),
174
+ legend: (options) => groupLegend(groupSlices(options.data, options.maxSlices, options.othersLabel)),
178
175
  table: pieTable,
179
176
  valueLabels: { marks: "slice" }
180
177
  };
@@ -195,7 +192,6 @@ const donut = pieType("donut", {
195
192
  inner: .62,
196
193
  corner: 4
197
194
  });
198
- //#endregion
199
195
  export { pie as n, donut as t };
200
196
 
201
- //# sourceMappingURL=pie-DzUXDTcn.js.map
197
+ //# sourceMappingURL=pie-CVsc-6qD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pie-CVsc-6qD.js","names":[],"sources":["../src/charts/pie.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext } from '../chart.ts'\nimport { features } from '../features.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { type InsetsInput, innerRect, insets } from '../layout.ts'\nimport { arcNode, sweep } from '../render/sweep.ts'\nimport { arcCentroid, arcPathStable, DEG, HALO, padAngleForGap } from '../shapes/arc.ts'\nimport { type ChildInput, type ClassValue, h } from '../vnode.ts'\nimport { cleanData, cleanItems } from './clean.ts'\nimport { groupAttrs, keyOf } from './named.ts'\nimport { groupLegend, groupSlices } from './others.ts'\n\n/** One slice of a pie or donut. */\nexport interface PieSlice {\n name: string\n /** Non-negative value; negative values count as zero. */\n value: number\n /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the slice group. */\n class?: ClassValue\n /** Start hidden (toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface PieOptions {\n data: readonly PieSlice[]\n /**\n * The most slices drawn, the one for the rest included: with more entries\n * than that, the largest `maxSlices - 1` keep a slice of their own and the\n * others share one, named by `othersLabel`, after them. Defaults to `9`\n * (the eight palette colors and the rest); `0` never groups.\n */\n maxSlices?: number\n /** Name of the slice that groups the rest. Defaults to `'Others'`. */\n othersLabel?: string\n /** Hole size relative to the radius, `0…0.95`. Defaults to `0` (`0.62` for `donut`). */\n innerRadius?: number\n /** Gap between slices in pixels, drawn as surface. Defaults to `2`. */\n gap?: number\n /** Corner radius of the slices. Defaults to `0` (`4` for `donut`). */\n cornerRadius?: number\n /** Where the first slice starts, in degrees clockwise from 12 o'clock. Defaults to `0`. */\n startAngle?: number\n /** Format of the values (tooltip, table, donut total). */\n format?: NumberFormat\n /**\n * Text in the donut hole: the total by default; `false` hides it, or give\n * your own `value` / `label`.\n */\n center?: false | { value?: string; label?: string }\n /** Extra space around the pie, in pixels. */\n padding?: InsetsInput\n}\n\ninterface Slice {\n data: PieSlice\n index: number\n value: number\n startAngle: number\n endAngle: number\n}\n\n/** Angles of the visible slices, clockwise from `startAngle`. */\nfunction layoutSlices(\n options: PieOptions,\n hidden: ReadonlySet<string>,\n): { slices: Slice[]; total: number } {\n const visible = groupSlices(options.data, options.maxSlices, options.othersLabel).filter(\n (slice) => !hidden.has(keyOf(slice.data)),\n )\n const total = visible.reduce((sum, slice) => sum + slice.value, 0)\n let angle = (options.startAngle ?? 0) * DEG\n const slices = visible.map((slice) => {\n const sweep = total > 0 ? (slice.value / total) * Math.PI * 2 : 0\n const out: Slice = { ...slice, startAngle: angle, endAngle: angle + sweep }\n angle += sweep\n return out\n })\n return { slices, total }\n}\n\nfunction renderPie(\n options: PieOptions,\n ctx: RenderContext,\n defaults: { inner: number; corner: number },\n) {\n const { width, height, locale } = ctx\n const gap = options.gap ?? 2\n const area = innerRect(width, height, insets(options.padding, 0))\n const outer = Math.max(0, Math.min(area.width, area.height) / 2 - HALO)\n const ratio = Math.min(0.95, Math.max(0, options.innerRadius ?? defaults.inner))\n const inner = outer * ratio\n const cornerRadius = options.cornerRadius ?? defaults.corner\n const cx = area.x + area.width / 2\n const cy = area.y + area.height / 2\n const { slices, total } = layoutSlices(options, ctx.hidden)\n const drawn = slices.filter((slice) => slice.value > 0)\n // A single slice is a full ring: no gap to cut.\n // Rings get a pad angle, which keeps a constant gap width along the whole\n // edge. In a full pie every slice meets at the center, so a pad angle would\n // widen into a wedge: the gap is a surface-colored stroke instead.\n const strokeGap = inner === 0 && drawn.length > 1 ? gap : 0\n const padAngle = inner > 0 && drawn.length > 1 ? padAngleForGap(gap, inner, outer) : 0\n const value = formatNumber(options.format, locale)\n const share = getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 })\n\n const geometry = (slice: Slice, r0 = inner, r1 = outer) => ({\n innerRadius: r0,\n outerRadius: r1,\n startAngle: slice.startAngle,\n endAngle: slice.endAngle,\n padAngle,\n cornerRadius,\n })\n\n const hitFor = (slice: Slice, position: number): Hit => {\n const [x, y] = arcCentroid(geometry(slice))\n const item: HitItem = {\n name: slice.data.name,\n seriesIndex: slice.index,\n value: slice.value,\n text: `${value(slice.value)} (${share.format(total > 0 ? slice.value / total : 0)})`,\n x: cx + x,\n y: cy + y,\n }\n if (slice.data.color) item.color = slice.data.color\n return {\n index: position,\n label: slice.data.name,\n title: '',\n x: cx + x,\n area: { x: cx - outer, y: cy - outer, width: outer * 2, height: outer * 2 },\n items: [item],\n seriesIndex: slice.index,\n // A thin halo just outside the slice.\n mark: {\n d: arcPathStable({ ...geometry(slice, outer + 2, outer + 6), cornerRadius: 2 }),\n x: cx,\n y: cy,\n },\n }\n }\n\n const interaction: Interaction = {\n count: drawn.length,\n hitIndex: (position) => {\n const slice = drawn[position]\n return slice ? hitFor(slice, position) : null\n },\n hitTest(px, py) {\n const dx = px - cx\n const dy = py - cy\n const r = Math.hypot(dx, dy)\n if (r < inner - 2 || r > outer + HALO) return null\n const start = (options.startAngle ?? 0) * DEG\n const turn = Math.PI * 2\n // Clockwise angle from 12 o'clock, normalized into [start, start + turn).\n let angle = Math.atan2(dx, -dy)\n angle = start + ((((angle - start) % turn) + turn) % turn)\n const position = drawn.findIndex((s) => angle >= s.startAngle && angle < s.endAngle)\n return position === -1 ? null : hitFor(drawn[position] as Slice, position)\n },\n }\n ctx.onHitTest(interaction)\n\n const groups = slices.map((slice) =>\n h(\n 'g',\n groupAttrs(slice.data, slice.index),\n // The path keeps its arc, so new data sweeps slices around the center\n // (see `sweep`). An empty slice keeps its path, a line with no area in\n // the gap between its neighbors, to grow from there.\n arcNode('tc-slice', geometry(slice)),\n ),\n )\n\n const center = options.center\n const showCenter = inner > 0 && center !== false\n const centerValue = showCenter ? (center?.value ?? value(total)) : ''\n const centerLabel = showCenter ? center?.label : undefined\n\n return [\n h(\n 'g',\n { class: 'tc-pie', style: `transform:translate(${cx}px,${cy}px)` },\n total === 0 &&\n h('path', {\n class: 'tc-pie-track',\n d: arcPathStable({\n innerRadius: inner,\n outerRadius: outer,\n startAngle: 0,\n endAngle: Math.PI * 2,\n }),\n }),\n h(\n 'g',\n {\n class: 'tc-pie-slices',\n style: strokeGap > 0 ? `--tc-pie-gap:${strokeGap}px` : undefined,\n },\n groups,\n ),\n ),\n showCenter &&\n h(\n 'g',\n { class: 'tc-pie-center', 'aria-hidden': 'true' },\n h(\n 'text',\n {\n class: 'tc-pie-value',\n x: cx,\n y: cy,\n dy: centerLabel ? '0' : '0.35em',\n 'text-anchor': 'middle',\n },\n centerValue,\n ),\n centerLabel &&\n h(\n 'text',\n { class: 'tc-pie-label', x: cx, y: cy, dy: '1.6em', 'text-anchor': 'middle' },\n centerLabel,\n ),\n ),\n ]\n}\n\nfunction pieTable(options: PieOptions, ctx: RenderContext): DataTable {\n const { slices, total } = layoutSlices(options, ctx.hidden)\n const value = formatNumber(options.format, ctx.locale)\n const share = getNumberFormat(ctx.locale, { style: 'percent', maximumFractionDigits: 1 })\n return {\n columns: ['', 'Value', 'Share'],\n rows: slices.map((slice) => [\n slice.data.name,\n value(slice.value),\n share.format(total > 0 ? slice.value / total : 0),\n ]),\n }\n}\n\nfunction pieType(name: string, defaults: { inner: number; corner: number }): ChartType<PieOptions> {\n return {\n name,\n clean: cleanData(cleanItems),\n render: (options, ctx): ChildInput => {\n // Set here, not as the module loads: a module with side effects would\n // stay in every bundle that imports another chart type next to it.\n features.sweep = sweep\n return renderPie(options, ctx, defaults)\n },\n legend: (options) =>\n groupLegend(groupSlices(options.data, options.maxSlices, options.othersLabel)),\n table: pieTable,\n valueLabels: { marks: 'slice' },\n }\n}\n\n/**\n * Pie chart: parts of a whole as slices, in data order, clockwise from the top.\n *\n * ```ts\n * new Chart('#el', { type: pie, data: [{ name: 'Direct', value: 42 }, { name: 'Search', value: 31 }] })\n * ```\n */\nexport const pie: ChartType<PieOptions> = pieType('pie', { inner: 0, corner: 0 })\n\n/** Donut chart: a pie with a hole showing the total (or your own `center`). */\nexport const donut: ChartType<PieOptions> = pieType('donut', { inner: 0.62, corner: 4 })\n"],"mappings":";;;;;;;;;;;AAsEA,SAAS,aACP,SACA,QACoC;CACpC,MAAM,UAAU,YAAY,QAAQ,MAAM,QAAQ,WAAW,QAAQ,WAAW,CAAC,CAAC,QAC/E,UAAU,CAAC,OAAO,IAAI,MAAM,MAAM,IAAI,CAAC,CAC1C;CACA,MAAM,QAAQ,QAAQ,QAAQ,KAAK,UAAU,MAAM,MAAM,OAAO,CAAC;CACjE,IAAI,SAAS,QAAQ,cAAc,KAAK;CAOxC,OAAO;EAAE,QANM,QAAQ,KAAK,UAAU;GACpC,MAAM,QAAQ,QAAQ,IAAK,MAAM,QAAQ,QAAS,KAAK,KAAK,IAAI;GAChE,MAAM,MAAa;IAAE,GAAG;IAAO,YAAY;IAAO,UAAU,QAAQ;GAAM;GAC1E,SAAS;GACT,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AO;EACL;EACA,OAAO,UAAU,UAAU;EAC3B,SAAS,SAAS,QAAoB;GAGpC,SAAS,QAAQ;GACjB,OAAO,UAAU,SAAS,KAAK,QAAQ;EACzC;EACA,SAAS,YACP,YAAY,YAAY,QAAQ,MAAM,QAAQ,WAAW,QAAQ,WAAW,CAAC;EAC/E,OAAO;EACP,aAAa,EAAE,OAAO,QAAQ;CAChC;AACF;;;;;;;;AASA,MAAa,MAA6B,QAAQ,OAAO;CAAE,OAAO;CAAG,QAAQ;AAAE,CAAC;;AAGhF,MAAa,QAA+B,QAAQ,SAAS;CAAE,OAAO;CAAM,QAAQ;AAAE,CAAC"}
package/dist/pie.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_pie = require("./pie-BxTZt6Go.cjs");
2
+ const require_pie = require("./pie-BpjvSPnz.cjs");
3
3
  exports.donut = require_pie.donut;
4
4
  exports.pie = require_pie.pie;
package/dist/pie.d.cts CHANGED
@@ -1,2 +1,3 @@
1
- import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-BF9yI5mE.cjs";
1
+ /** Standalone entry: `import { pie, donut } from '@tabler/charts/pie'`. */
2
+ import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-BXg2gNpb.cjs";
2
3
  export { type PieOptions, type PieSlice, donut, pie };
package/dist/pie.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-5z1fDdKO.js";
1
+ /** Standalone entry: `import { pie, donut } from '@tabler/charts/pie'`. */
2
+ import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-CFptILSm.js";
2
3
  export { type PieOptions, type PieSlice, donut, pie };
package/dist/pie.js CHANGED
@@ -1,2 +1 @@
1
- import { n as pie, t as donut } from "./pie-DzUXDTcn.js";
2
- export { donut, pie };
1
+ export { t as donut, n as pie } from "./pie-CVsc-6qD.js";
@@ -1,5 +1,5 @@
1
- const require_layout = require("./layout-CtMBhNd9.cjs");
2
- //#region src/charts/point-shapes.ts
1
+ const require_layout = require("./layout-JY2aR-yE.cjs");
2
+ // src/charts/point-shapes.ts
3
3
  /**
4
4
  * Outlines by color slot (0-based), as x, y pairs in units of the radius,
5
5
  * sized so the shapes weigh about the same as the circle of slot 0 (and of
@@ -149,7 +149,6 @@ function reshape(child, slot) {
149
149
  }
150
150
  /** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */
151
151
  const shapesStep = (config, content) => config.shapes ?? config.patterns === true ? reshape(content, -1) : content;
152
- //#endregion
153
152
  Object.defineProperty(exports, "markerPath", {
154
153
  enumerable: true,
155
154
  get: function() {
@@ -163,4 +162,4 @@ Object.defineProperty(exports, "shapesStep", {
163
162
  }
164
163
  });
165
164
 
166
- //# sourceMappingURL=point-shapes-CGl4dugc.cjs.map
165
+ //# sourceMappingURL=point-shapes--_gmdTyK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"point-shapes-CGl4dugc.cjs","names":["round"],"sources":["../src/charts/point-shapes.ts"],"sourcesContent":["/**\n * Marker shapes, so the points of series do not depend on color alone\n * (color vision deficiency, grayscale print): one shape per color slot,\n * for line, radar and scatter points and the active points of the hover.\n * On with `shapes: true`, and with `patterns: true` unless `shapes` says\n * otherwise. Legend and tooltip swatches take the same shapes in CSS.\n */\nimport type { PostStep } from '../features.ts'\nimport { round } from '../layout.ts'\nimport type { Child, ChildInput, VNode } from '../vnode.ts'\n\n/**\n * Outlines by color slot (0-based), as x, y pairs in units of the radius,\n * sized so the shapes weigh about the same as the circle of slot 0 (and of\n * slots 9 and up).\n */\nconst SHAPES: readonly (readonly number[])[] = [\n [],\n // Square.\n [-0.9, -0.9, 0.9, -0.9, 0.9, 0.9, -0.9, 0.9],\n // Triangle.\n [0, -1.3, 1.2, 0.9, -1.2, 0.9],\n // Diamond.\n [0, -1.3, 1.3, 0, 0, 1.3, -1.3, 0],\n // Triangle, pointing down.\n [-1.2, -0.9, 1.2, -0.9, 0, 1.3],\n // Plus.\n [\n -0.4, -1.2, 0.4, -1.2, 0.4, -0.4, 1.2, -0.4, 1.2, 0.4, 0.4, 0.4, 0.4, 1.2, -0.4, 1.2, -0.4, 0.4,\n -1.2, 0.4, -1.2, -0.4, -0.4, -0.4,\n ],\n // Cross.\n [\n -0.7, -1.2, 0, -0.5, 0.7, -1.2, 1.2, -0.7, 0.5, 0, 1.2, 0.7, 0.7, 1.2, 0, 0.5, -0.7, 1.2, -1.2,\n 0.7, -0.5, 0, -1.2, -0.7,\n ],\n // Star.\n [\n 0, -1.4, 0.32, -0.44, 1.33, -0.43, 0.52, 0.17, 0.82, 1.13, 0, 0.55, -0.82, 1.13, -0.52, 0.17,\n -1.33, -0.43, -0.32, -0.44,\n ],\n]\n\n/** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */\nexport function markerPath(slot: number, x: number, y: number, r: number): string {\n const shape = SHAPES[slot] ?? []\n if (!shape.length) {\n return `M${round(x - r)},${round(y)}a${r},${r},0,1,0,${2 * r},0a${r},${r},0,1,0,${-2 * r},0Z`\n }\n let d = ''\n for (let i = 0; i < shape.length; i += 2) {\n d += `${i ? 'L' : 'M'}${round(x + (shape[i] as number) * r)},${round(y + (shape[i + 1] as number) * r)}`\n }\n return `${d}Z`\n}\n\n/** The content with the point circles of each series group (`.tc-series-N`) in its slot's shape. */\nfunction reshape(child: ChildInput, slot: number): ChildInput {\n if (Array.isArray(child)) return child.map((c) => reshape(c, slot))\n if (!child || typeof child !== 'object') return child\n const { attrs } = child\n const cls = String(attrs.class ?? '')\n const group = /\\btc-series-(\\d+)\\b/.exec(cls)\n if (\n child.tag === 'circle' &&\n slot >= 0 &&\n /\\btc-point\\b/.test(cls) &&\n !/\\btc-bubble\\b/.test(cls)\n ) {\n const shaped: VNode = {\n tag: 'path',\n attrs: {\n class: `${cls} tc-marker`,\n d: markerPath(slot, +(attrs.cx ?? 0), +(attrs.cy ?? 0), +(attrs.r ?? 0)),\n },\n children: [],\n key: child.key,\n }\n return shaped\n }\n return {\n ...child,\n children: child.children.map((c) => reshape(c, group ? Number(group[1]) - 1 : slot) as Child),\n }\n}\n\n/** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */\nexport const shapesStep: PostStep = (config, content) =>\n (config.shapes ?? config.patterns === true) ? reshape(content, -1) : content\n"],"mappings":";;;;;;;AAgBA,MAAM,SAAyC;CAC7C,CAAC;CAED;EAAC;EAAM;EAAM;EAAK;EAAM;EAAK;EAAK;EAAM;CAAG;CAE3C;EAAC;EAAG;EAAM;EAAK;EAAK;EAAM;CAAG;CAE7B;EAAC;EAAG;EAAM;EAAK;EAAG;EAAG;EAAK;EAAM;CAAC;CAEjC;EAAC;EAAM;EAAM;EAAK;EAAM;EAAG;CAAG;CAE9B;EACE;EAAM;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAM;EAAK;EAAM;EAC5F;EAAM;EAAK;EAAM;EAAM;EAAM;CAC/B;CAEA;EACE;EAAM;EAAM;EAAG;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAG;EAAK;EAAK;EAAK;EAAK;EAAG;EAAK;EAAM;EAAK;EAC1F;EAAK;EAAM;EAAG;EAAM;CACtB;CAEA;EACE;EAAG;EAAM;EAAM;EAAO;EAAM;EAAO;EAAM;EAAM;EAAM;EAAM;EAAG;EAAM;EAAO;EAAM;EAAO;EACxF;EAAO;EAAO;EAAO;CACvB;AACF;;AAGA,SAAgB,WAAW,MAAc,GAAW,GAAW,GAAmB;CAChF,MAAM,QAAQ,OAAO,SAAS,CAAC;CAC/B,IAAI,CAAC,MAAM,QACT,OAAO,IAAIA,eAAAA,MAAM,IAAI,CAAC,EAAE,GAAGA,eAAAA,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE;CAE3F,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GACrC,KAAK,GAAG,IAAI,MAAM,MAAMA,eAAAA,MAAM,IAAK,MAAM,KAAgB,CAAC,EAAE,GAAGA,eAAAA,MAAM,IAAK,MAAM,IAAI,KAAgB,CAAC;CAEvG,OAAO,GAAG,EAAE;AACd;;AAGA,SAAS,QAAQ,OAAmB,MAA0B;CAC5D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,KAAK,MAAM,QAAQ,GAAG,IAAI,CAAC;CAClE,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO;CAChD,MAAM,EAAE,UAAU;CAClB,MAAM,MAAM,OAAO,MAAM,SAAS,EAAE;CACpC,MAAM,QAAQ,sBAAsB,KAAK,GAAG;CAC5C,IACE,MAAM,QAAQ,YACd,QAAQ,KACR,eAAe,KAAK,GAAG,KACvB,CAAC,gBAAgB,KAAK,GAAG,GAWzB,OAAO;EARL,KAAK;EACL,OAAO;GACL,OAAO,GAAG,IAAI;GACd,GAAG,WAAW,MAAM,EAAE,MAAM,MAAM,IAAI,EAAE,MAAM,MAAM,IAAI,EAAE,MAAM,KAAK,EAAE;EACzE;EACA,UAAU,CAAC;EACX,KAAK,MAAM;CAED;CAEd,OAAO;EACL,GAAG;EACH,UAAU,MAAM,SAAS,KAAK,MAAM,QAAQ,GAAG,QAAQ,OAAO,MAAM,EAAE,IAAI,IAAI,IAAI,CAAU;CAC9F;AACF;;AAGA,MAAa,cAAwB,QAAQ,YAC1C,OAAO,UAAU,OAAO,aAAa,OAAQ,QAAQ,SAAS,EAAE,IAAI"}
1
+ {"version":3,"file":"point-shapes--_gmdTyK.cjs","names":["round"],"sources":["../src/charts/point-shapes.ts"],"sourcesContent":["/**\n * Marker shapes, so the points of series do not depend on color alone\n * (color vision deficiency, grayscale print): one shape per color slot,\n * for line, radar and scatter points and the active points of the hover.\n * On with `shapes: true`, and with `patterns: true` unless `shapes` says\n * otherwise. Legend and tooltip swatches take the same shapes in CSS.\n */\nimport type { PostStep } from '../features.ts'\nimport { round } from '../layout.ts'\nimport type { Child, ChildInput, VNode } from '../vnode.ts'\n\n/**\n * Outlines by color slot (0-based), as x, y pairs in units of the radius,\n * sized so the shapes weigh about the same as the circle of slot 0 (and of\n * slots 9 and up).\n */\nconst SHAPES: readonly (readonly number[])[] = [\n [],\n // Square.\n [-0.9, -0.9, 0.9, -0.9, 0.9, 0.9, -0.9, 0.9],\n // Triangle.\n [0, -1.3, 1.2, 0.9, -1.2, 0.9],\n // Diamond.\n [0, -1.3, 1.3, 0, 0, 1.3, -1.3, 0],\n // Triangle, pointing down.\n [-1.2, -0.9, 1.2, -0.9, 0, 1.3],\n // Plus.\n [\n -0.4, -1.2, 0.4, -1.2, 0.4, -0.4, 1.2, -0.4, 1.2, 0.4, 0.4, 0.4, 0.4, 1.2, -0.4, 1.2, -0.4, 0.4,\n -1.2, 0.4, -1.2, -0.4, -0.4, -0.4,\n ],\n // Cross.\n [\n -0.7, -1.2, 0, -0.5, 0.7, -1.2, 1.2, -0.7, 0.5, 0, 1.2, 0.7, 0.7, 1.2, 0, 0.5, -0.7, 1.2, -1.2,\n 0.7, -0.5, 0, -1.2, -0.7,\n ],\n // Star.\n [\n 0, -1.4, 0.32, -0.44, 1.33, -0.43, 0.52, 0.17, 0.82, 1.13, 0, 0.55, -0.82, 1.13, -0.52, 0.17,\n -1.33, -0.43, -0.32, -0.44,\n ],\n]\n\n/** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */\nexport function markerPath(slot: number, x: number, y: number, r: number): string {\n const shape = SHAPES[slot] ?? []\n if (!shape.length) {\n return `M${round(x - r)},${round(y)}a${r},${r},0,1,0,${2 * r},0a${r},${r},0,1,0,${-2 * r},0Z`\n }\n let d = ''\n for (let i = 0; i < shape.length; i += 2) {\n d += `${i ? 'L' : 'M'}${round(x + (shape[i] as number) * r)},${round(y + (shape[i + 1] as number) * r)}`\n }\n return `${d}Z`\n}\n\n/** The content with the point circles of each series group (`.tc-series-N`) in its slot's shape. */\nfunction reshape(child: ChildInput, slot: number): ChildInput {\n if (Array.isArray(child)) return child.map((c) => reshape(c, slot))\n if (!child || typeof child !== 'object') return child\n const { attrs } = child\n const cls = String(attrs.class ?? '')\n const group = /\\btc-series-(\\d+)\\b/.exec(cls)\n if (\n child.tag === 'circle' &&\n slot >= 0 &&\n /\\btc-point\\b/.test(cls) &&\n !/\\btc-bubble\\b/.test(cls)\n ) {\n const shaped: VNode = {\n tag: 'path',\n attrs: {\n class: `${cls} tc-marker`,\n d: markerPath(slot, +(attrs.cx ?? 0), +(attrs.cy ?? 0), +(attrs.r ?? 0)),\n },\n children: [],\n key: child.key,\n }\n return shaped\n }\n return {\n ...child,\n children: child.children.map((c) => reshape(c, group ? Number(group[1]) - 1 : slot) as Child),\n }\n}\n\n/** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */\nexport const shapesStep: PostStep = (config, content) =>\n (config.shapes ?? config.patterns === true) ? reshape(content, -1) : content\n"],"mappings":";;;;;;;AAgBA,MAAM,SAAyC;CAC7C,CAAC;CAED;EAAC;EAAM;EAAM;EAAK;EAAM;EAAK;EAAK;EAAM;CAAG;CAE3C;EAAC;EAAG;EAAM;EAAK;EAAK;EAAM;CAAG;CAE7B;EAAC;EAAG;EAAM;EAAK;EAAG;EAAG;EAAK;EAAM;CAAC;CAEjC;EAAC;EAAM;EAAM;EAAK;EAAM;EAAG;CAAG;CAE9B;EACE;EAAM;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAM;EAAK;EAAM;EAC5F;EAAM;EAAK;EAAM;EAAM;EAAM;CAC/B;CAEA;EACE;EAAM;EAAM;EAAG;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAG;EAAK;EAAK;EAAK;EAAK;EAAG;EAAK;EAAM;EAAK;EAC1F;EAAK;EAAM;EAAG;EAAM;CACtB;CAEA;EACE;EAAG;EAAM;EAAM;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AAK,MAAM,QAAQ,GAAG,QAAQ,OAAO,MAAM,EAAE,IAAI,IAAI,IAAI,CAAU;CAC9F;AACF;;AAGA,MAAa,cAAwB,QAAQ,YAC1C,OAAO,UAAU,OAAO,aAAa,OAAQ,QAAQ,SAAS,EAAE,IAAI"}
@@ -1,5 +1,5 @@
1
- import { a as round } from "./layout-B3hiqVEw.js";
2
- //#region src/charts/point-shapes.ts
1
+ import { o as round } from "./layout-DmrrLjwN.js";
2
+ // src/charts/point-shapes.ts
3
3
  /**
4
4
  * Outlines by color slot (0-based), as x, y pairs in units of the radius,
5
5
  * sized so the shapes weigh about the same as the circle of slot 0 (and of
@@ -149,7 +149,6 @@ function reshape(child, slot) {
149
149
  }
150
150
  /** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */
151
151
  const shapesStep = (config, content) => config.shapes ?? config.patterns === true ? reshape(content, -1) : content;
152
- //#endregion
153
152
  export { shapesStep as n, markerPath as t };
154
153
 
155
- //# sourceMappingURL=point-shapes-DI84NNpI.js.map
154
+ //# sourceMappingURL=point-shapes-DD2Ektzm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"point-shapes-DI84NNpI.js","names":[],"sources":["../src/charts/point-shapes.ts"],"sourcesContent":["/**\n * Marker shapes, so the points of series do not depend on color alone\n * (color vision deficiency, grayscale print): one shape per color slot,\n * for line, radar and scatter points and the active points of the hover.\n * On with `shapes: true`, and with `patterns: true` unless `shapes` says\n * otherwise. Legend and tooltip swatches take the same shapes in CSS.\n */\nimport type { PostStep } from '../features.ts'\nimport { round } from '../layout.ts'\nimport type { Child, ChildInput, VNode } from '../vnode.ts'\n\n/**\n * Outlines by color slot (0-based), as x, y pairs in units of the radius,\n * sized so the shapes weigh about the same as the circle of slot 0 (and of\n * slots 9 and up).\n */\nconst SHAPES: readonly (readonly number[])[] = [\n [],\n // Square.\n [-0.9, -0.9, 0.9, -0.9, 0.9, 0.9, -0.9, 0.9],\n // Triangle.\n [0, -1.3, 1.2, 0.9, -1.2, 0.9],\n // Diamond.\n [0, -1.3, 1.3, 0, 0, 1.3, -1.3, 0],\n // Triangle, pointing down.\n [-1.2, -0.9, 1.2, -0.9, 0, 1.3],\n // Plus.\n [\n -0.4, -1.2, 0.4, -1.2, 0.4, -0.4, 1.2, -0.4, 1.2, 0.4, 0.4, 0.4, 0.4, 1.2, -0.4, 1.2, -0.4, 0.4,\n -1.2, 0.4, -1.2, -0.4, -0.4, -0.4,\n ],\n // Cross.\n [\n -0.7, -1.2, 0, -0.5, 0.7, -1.2, 1.2, -0.7, 0.5, 0, 1.2, 0.7, 0.7, 1.2, 0, 0.5, -0.7, 1.2, -1.2,\n 0.7, -0.5, 0, -1.2, -0.7,\n ],\n // Star.\n [\n 0, -1.4, 0.32, -0.44, 1.33, -0.43, 0.52, 0.17, 0.82, 1.13, 0, 0.55, -0.82, 1.13, -0.52, 0.17,\n -1.33, -0.43, -0.32, -0.44,\n ],\n]\n\n/** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */\nexport function markerPath(slot: number, x: number, y: number, r: number): string {\n const shape = SHAPES[slot] ?? []\n if (!shape.length) {\n return `M${round(x - r)},${round(y)}a${r},${r},0,1,0,${2 * r},0a${r},${r},0,1,0,${-2 * r},0Z`\n }\n let d = ''\n for (let i = 0; i < shape.length; i += 2) {\n d += `${i ? 'L' : 'M'}${round(x + (shape[i] as number) * r)},${round(y + (shape[i + 1] as number) * r)}`\n }\n return `${d}Z`\n}\n\n/** The content with the point circles of each series group (`.tc-series-N`) in its slot's shape. */\nfunction reshape(child: ChildInput, slot: number): ChildInput {\n if (Array.isArray(child)) return child.map((c) => reshape(c, slot))\n if (!child || typeof child !== 'object') return child\n const { attrs } = child\n const cls = String(attrs.class ?? '')\n const group = /\\btc-series-(\\d+)\\b/.exec(cls)\n if (\n child.tag === 'circle' &&\n slot >= 0 &&\n /\\btc-point\\b/.test(cls) &&\n !/\\btc-bubble\\b/.test(cls)\n ) {\n const shaped: VNode = {\n tag: 'path',\n attrs: {\n class: `${cls} tc-marker`,\n d: markerPath(slot, +(attrs.cx ?? 0), +(attrs.cy ?? 0), +(attrs.r ?? 0)),\n },\n children: [],\n key: child.key,\n }\n return shaped\n }\n return {\n ...child,\n children: child.children.map((c) => reshape(c, group ? Number(group[1]) - 1 : slot) as Child),\n }\n}\n\n/** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */\nexport const shapesStep: PostStep = (config, content) =>\n (config.shapes ?? config.patterns === true) ? reshape(content, -1) : content\n"],"mappings":";;;;;;;AAgBA,MAAM,SAAyC;CAC7C,CAAC;CAED;EAAC;EAAM;EAAM;EAAK;EAAM;EAAK;EAAK;EAAM;CAAG;CAE3C;EAAC;EAAG;EAAM;EAAK;EAAK;EAAM;CAAG;CAE7B;EAAC;EAAG;EAAM;EAAK;EAAG;EAAG;EAAK;EAAM;CAAC;CAEjC;EAAC;EAAM;EAAM;EAAK;EAAM;EAAG;CAAG;CAE9B;EACE;EAAM;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAM;EAAK;EAAM;EAC5F;EAAM;EAAK;EAAM;EAAM;EAAM;CAC/B;CAEA;EACE;EAAM;EAAM;EAAG;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAG;EAAK;EAAK;EAAK;EAAK;EAAG;EAAK;EAAM;EAAK;EAC1F;EAAK;EAAM;EAAG;EAAM;CACtB;CAEA;EACE;EAAG;EAAM;EAAM;EAAO;EAAM;EAAO;EAAM;EAAM;EAAM;EAAM;EAAG;EAAM;EAAO;EAAM;EAAO;EACxF;EAAO;EAAO;EAAO;CACvB;AACF;;AAGA,SAAgB,WAAW,MAAc,GAAW,GAAW,GAAmB;CAChF,MAAM,QAAQ,OAAO,SAAS,CAAC;CAC/B,IAAI,CAAC,MAAM,QACT,OAAO,IAAI,MAAM,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE;CAE3F,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GACrC,KAAK,GAAG,IAAI,MAAM,MAAM,MAAM,IAAK,MAAM,KAAgB,CAAC,EAAE,GAAG,MAAM,IAAK,MAAM,IAAI,KAAgB,CAAC;CAEvG,OAAO,GAAG,EAAE;AACd;;AAGA,SAAS,QAAQ,OAAmB,MAA0B;CAC5D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,KAAK,MAAM,QAAQ,GAAG,IAAI,CAAC;CAClE,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO;CAChD,MAAM,EAAE,UAAU;CAClB,MAAM,MAAM,OAAO,MAAM,SAAS,EAAE;CACpC,MAAM,QAAQ,sBAAsB,KAAK,GAAG;CAC5C,IACE,MAAM,QAAQ,YACd,QAAQ,KACR,eAAe,KAAK,GAAG,KACvB,CAAC,gBAAgB,KAAK,GAAG,GAWzB,OAAO;EARL,KAAK;EACL,OAAO;GACL,OAAO,GAAG,IAAI;GACd,GAAG,WAAW,MAAM,EAAE,MAAM,MAAM,IAAI,EAAE,MAAM,MAAM,IAAI,EAAE,MAAM,KAAK,EAAE;EACzE;EACA,UAAU,CAAC;EACX,KAAK,MAAM;CAED;CAEd,OAAO;EACL,GAAG;EACH,UAAU,MAAM,SAAS,KAAK,MAAM,QAAQ,GAAG,QAAQ,OAAO,MAAM,EAAE,IAAI,IAAI,IAAI,CAAU;CAC9F;AACF;;AAGA,MAAa,cAAwB,QAAQ,YAC1C,OAAO,UAAU,OAAO,aAAa,OAAQ,QAAQ,SAAS,EAAE,IAAI"}
1
+ {"version":3,"file":"point-shapes-DD2Ektzm.js","names":[],"sources":["../src/charts/point-shapes.ts"],"sourcesContent":["/**\n * Marker shapes, so the points of series do not depend on color alone\n * (color vision deficiency, grayscale print): one shape per color slot,\n * for line, radar and scatter points and the active points of the hover.\n * On with `shapes: true`, and with `patterns: true` unless `shapes` says\n * otherwise. Legend and tooltip swatches take the same shapes in CSS.\n */\nimport type { PostStep } from '../features.ts'\nimport { round } from '../layout.ts'\nimport type { Child, ChildInput, VNode } from '../vnode.ts'\n\n/**\n * Outlines by color slot (0-based), as x, y pairs in units of the radius,\n * sized so the shapes weigh about the same as the circle of slot 0 (and of\n * slots 9 and up).\n */\nconst SHAPES: readonly (readonly number[])[] = [\n [],\n // Square.\n [-0.9, -0.9, 0.9, -0.9, 0.9, 0.9, -0.9, 0.9],\n // Triangle.\n [0, -1.3, 1.2, 0.9, -1.2, 0.9],\n // Diamond.\n [0, -1.3, 1.3, 0, 0, 1.3, -1.3, 0],\n // Triangle, pointing down.\n [-1.2, -0.9, 1.2, -0.9, 0, 1.3],\n // Plus.\n [\n -0.4, -1.2, 0.4, -1.2, 0.4, -0.4, 1.2, -0.4, 1.2, 0.4, 0.4, 0.4, 0.4, 1.2, -0.4, 1.2, -0.4, 0.4,\n -1.2, 0.4, -1.2, -0.4, -0.4, -0.4,\n ],\n // Cross.\n [\n -0.7, -1.2, 0, -0.5, 0.7, -1.2, 1.2, -0.7, 0.5, 0, 1.2, 0.7, 0.7, 1.2, 0, 0.5, -0.7, 1.2, -1.2,\n 0.7, -0.5, 0, -1.2, -0.7,\n ],\n // Star.\n [\n 0, -1.4, 0.32, -0.44, 1.33, -0.43, 0.52, 0.17, 0.82, 1.13, 0, 0.55, -0.82, 1.13, -0.52, 0.17,\n -1.33, -0.43, -0.32, -0.44,\n ],\n]\n\n/** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */\nexport function markerPath(slot: number, x: number, y: number, r: number): string {\n const shape = SHAPES[slot] ?? []\n if (!shape.length) {\n return `M${round(x - r)},${round(y)}a${r},${r},0,1,0,${2 * r},0a${r},${r},0,1,0,${-2 * r},0Z`\n }\n let d = ''\n for (let i = 0; i < shape.length; i += 2) {\n d += `${i ? 'L' : 'M'}${round(x + (shape[i] as number) * r)},${round(y + (shape[i + 1] as number) * r)}`\n }\n return `${d}Z`\n}\n\n/** The content with the point circles of each series group (`.tc-series-N`) in its slot's shape. */\nfunction reshape(child: ChildInput, slot: number): ChildInput {\n if (Array.isArray(child)) return child.map((c) => reshape(c, slot))\n if (!child || typeof child !== 'object') return child\n const { attrs } = child\n const cls = String(attrs.class ?? '')\n const group = /\\btc-series-(\\d+)\\b/.exec(cls)\n if (\n child.tag === 'circle' &&\n slot >= 0 &&\n /\\btc-point\\b/.test(cls) &&\n !/\\btc-bubble\\b/.test(cls)\n ) {\n const shaped: VNode = {\n tag: 'path',\n attrs: {\n class: `${cls} tc-marker`,\n d: markerPath(slot, +(attrs.cx ?? 0), +(attrs.cy ?? 0), +(attrs.r ?? 0)),\n },\n children: [],\n key: child.key,\n }\n return shaped\n }\n return {\n ...child,\n children: child.children.map((c) => reshape(c, group ? Number(group[1]) - 1 : slot) as Child),\n }\n}\n\n/** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */\nexport const shapesStep: PostStep = (config, content) =>\n (config.shapes ?? config.patterns === true) ? reshape(content, -1) : content\n"],"mappings":";;;;;;;AAgBA,MAAM,SAAyC;CAC7C,CAAC;CAED;EAAC;EAAM;EAAM;EAAK;EAAM;EAAK;EAAK;EAAM;CAAG;CAE3C;EAAC;EAAG;EAAM;EAAK;EAAK;EAAM;CAAG;CAE7B;EAAC;EAAG;EAAM;EAAK;EAAG;EAAG;EAAK;EAAM;CAAC;CAEjC;EAAC;EAAM;EAAM;EAAK;EAAM;EAAG;CAAG;CAE9B;EACE;EAAM;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAM;EAAK;EAAM;EAC5F;EAAM;EAAK;EAAM;EAAM;EAAM;CAC/B;CAEA;EACE;EAAM;EAAM;EAAG;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAG;EAAK;EAAK;EAAK;EAAK;EAAG;EAAK;EAAM;EAAK;EAC1F;EAAK;EA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AU,MAAM,SAAS,KAAK,MAAM,QAAQ,GAAG,QAAQ,OAAO,MAAM,EAAE,IAAI,IAAI,IAAI,CAAU;CAC9F;AACF;;AAGA,MAAa,cAAwB,QAAQ,YAC1C,OAAO,UAAU,OAAO,aAAa,OAAQ,QAAQ,SAAS,EAAE,IAAI"}
@@ -1,14 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_features = require("./features-BclHgg2W.cjs");
3
- const require_point_shapes = require("./point-shapes-CGl4dugc.cjs");
4
- //#region src/point-shapes.ts
2
+ const require_point_shapes = require("./point-shapes--_gmdTyK.cjs");
3
+ const require_features = require("./features-DCXEvoya.cjs");
4
+ // src/point-shapes.ts
5
5
  /**
6
6
  * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
7
7
  * (a point shape per series) on the core.
8
8
  */
9
9
  require_features.register({ "point-shapes": require_point_shapes.markerPath });
10
10
  require_features.addPost(require_point_shapes.shapesStep);
11
- //#endregion
12
11
  exports.markerPath = require_point_shapes.markerPath;
13
12
  exports.shapesStep = require_point_shapes.shapesStep;
14
13
 
@@ -1,2 +1,6 @@
1
- import { U as markerPath, W as shapesStep } from "./chart-D7ooEFnk.cjs";
1
+ /**
2
+ * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
3
+ * (a point shape per series) on the core.
4
+ */
5
+ import { J as shapesStep, q as markerPath } from "./chart-kqFMEwDo.cjs";
2
6
  export { markerPath, shapesStep };
@@ -1,2 +1,6 @@
1
- import { U as markerPath, W as shapesStep } from "./chart-DyN7bcx8.js";
1
+ /**
2
+ * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
3
+ * (a point shape per series) on the core.
4
+ */
5
+ import { U as markerPath, W as shapesStep } from "./chart-QilhWP8Z.js";
2
6
  export { markerPath, shapesStep };
@@ -1,13 +1,12 @@
1
- import { i as register, t as addPost } from "./features-wASyHGic.js";
2
- import { n as shapesStep, t as markerPath } from "./point-shapes-DI84NNpI.js";
3
- //#region src/point-shapes.ts
1
+ import { n as shapesStep, t as markerPath } from "./point-shapes-DD2Ektzm.js";
2
+ import { i as register, t as addPost } from "./features-BMxkqCyS.js";
3
+ // src/point-shapes.ts
4
4
  /**
5
5
  * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
6
6
  * (a point shape per series) on the core.
7
7
  */
8
8
  register({ "point-shapes": markerPath });
9
9
  addPost(shapesStep);
10
- //#endregion
11
10
  export { markerPath, shapesStep };
12
11
 
13
12
  //# sourceMappingURL=point-shapes.js.map
@@ -1,7 +1,6 @@
1
- import { a as InsetsInput } from "./annotations-Bp7HwtF5.js";
2
- import { Q as CartesianData, a as ChartType, tt as Label } from "./chart-DyN7bcx8.js";
3
- import { c as NumberFormat } from "./time-CHjiY9Q4.js";
4
- //#region src/charts/radar.d.ts
1
+ import { Q as CartesianData, a as ChartType, tt as Label } from "./chart-QilhWP8Z.js";
2
+ import { c as NumberFormat } from "./time-DRIDgv2a.js";
3
+ import { a as InsetsInput } from "./annotations-B02GR_KU.js";
5
4
  /** Options for the radial value axis. */
6
5
  interface RadialAxisOptions {
7
6
  /** Render the value labels along the first spoke. Defaults to `true`. */
@@ -55,6 +54,4 @@ interface RadarOptions {
55
54
  * ```
56
55
  */
57
56
  declare const radar: ChartType<RadarOptions>;
58
- //#endregion
59
- export { RadialAxisOptions as n, radar as r, RadarOptions as t };
60
- //# sourceMappingURL=radar-1-EryihA.d.ts.map
57
+ export { RadialAxisOptions as n, radar as r, RadarOptions as t };
@@ -1,9 +1,9 @@
1
- import { a as round, i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-B3hiqVEw.js";
2
- import { t as h } from "./vnode-tCWItoUH.js";
3
- import { n as formatDetail } from "./format-lStwuc1L.js";
4
- import { D as linearTicks, b as linear, d as seriesAttrs, f as seriesKey, h as tickCount, m as seriesTable, o as labelKey, p as seriesLegend, r as domainOf, u as resolveLabels } from "./cartesian-Cr0AF0nG.js";
5
- import { r as cleanSeries, t as cleanData } from "./clean-o1vDEhFV.js";
6
- //#region src/charts/radar.ts
1
+ import { D as linearTicks, b as linear, d as seriesAttrs, f as seriesKey, h as tickCount, m as seriesTable, o as labelKey, p as seriesLegend, r as domainOf, u as resolveLabels } from "./cartesian-CI2x6N7N.js";
2
+ import { n as formatDetail } from "./format-it1kepFG.js";
3
+ import { i as insets, n as estimateTextWidth, o as round, r as innerRect, t as LINE_HEIGHT } from "./layout-DmrrLjwN.js";
4
+ import { t as h } from "./vnode-_EMUqysL.js";
5
+ import { r as cleanSeries, t as cleanData } from "./clean-CkoQobGv.js";
6
+ // src/charts/radar.ts
7
7
  /** Space between the outer ring and the spoke labels. */
8
8
  const LABEL_GAP = 8;
9
9
  /** Pixels around the outer ring that still count as hovering it. */
@@ -279,7 +279,6 @@ const radar = {
279
279
  ...options.format ? { x: { format: options.format } } : {}
280
280
  }, ctx, limit)
281
281
  };
282
- //#endregion
283
282
  export { radar as t };
284
283
 
285
- //# sourceMappingURL=radar-CYPab_I4.js.map
284
+ //# sourceMappingURL=radar-BR-mumDd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radar-CYPab_I4.js","names":[],"sources":["../src/charts/radar.ts"],"sourcesContent":["import type { ChartType, RenderContext } from '../chart.ts'\nimport { linearTicks } from '../components/axis.ts'\nimport { formatDetail, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport {\n estimateTextWidth,\n type InsetsInput,\n innerRect,\n insets,\n LINE_HEIGHT,\n round,\n} from '../layout.ts'\nimport { linear } from '../scales/linear.ts'\nimport { type ChildInput, h } from '../vnode.ts'\nimport {\n type CartesianData,\n domainOf,\n type Label,\n labelKey,\n resolveLabels,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n tickCount,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\n\n/** Options for the radial value axis. */\nexport interface RadialAxisOptions {\n /** Render the value labels along the first spoke. Defaults to `true`. */\n show?: boolean\n /** Value at the center. Defaults to `0` (or the data minimum when it is negative). */\n min?: number\n /** Value at the outer ring. Defaults to the niced data maximum. */\n max?: number\n /** Extend the domain to round values. Defaults to `true`. */\n nice?: boolean\n /** Approximate number of rings. Defaults to one per ~40px of radius. */\n ticks?: number\n format?: NumberFormat\n}\n\nexport interface RadarOptions {\n /** One spoke per label, one polygon per series. */\n data: CartesianData\n /** The radial value axis. */\n r?: RadialAxisOptions\n /** Format of the spoke labels (axis, tooltips and the table). */\n format?: (label: Label, index: number) => string\n /** Shape of the rings. Defaults to `'polygon'`. */\n grid?: 'polygon' | 'circle'\n /** Fill each polygon. Defaults to `true`. */\n fill?: boolean\n /** Draw a dot on every value. Defaults to `false`. */\n points?: boolean\n /** Dot radius in pixels. Defaults to `4`. */\n pointRadius?: number\n /**\n * Widest spoke label, in pixels: a longer one wraps at its spaces onto up\n * to three lines. Defaults to a quarter of the chart's width.\n */\n labelWidth?: number\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** Space between the outer ring and the spoke labels. */\nconst LABEL_GAP = 8\n/** Pixels around the outer ring that still count as hovering it. */\nconst HOVER_SLOP = 8\n\n/** Smallest radius, as a share of the space, however long the labels. */\nconst MIN_RADIUS = 0.5\n/** Most lines a wrapped spoke label takes. */\nconst MAX_LINES = 3\n\n/** `text`, cut short with an ellipsis to fit `width` pixels. */\nfunction truncate(text: string, width: number, fontSize: number): string {\n if (estimateTextWidth(text, fontSize) <= width) return text\n let end = text.length\n while (end > 0 && estimateTextWidth(`${text.slice(0, end)}…`, fontSize) > width) end--\n return end > 0 ? `${text.slice(0, end).trimEnd()}…` : ''\n}\n\n/**\n * `text` split at its spaces into lines no wider than `width` pixels (a word\n * wider than that gets a line of its own), at most `MAX_LINES` of them: what\n * is left joins the last line.\n */\nfunction wrap(text: string, width: number, fontSize: number): string[] {\n const lines: string[] = []\n let line = ''\n for (const word of text.split(' ')) {\n const next = line ? `${line} ${word}` : word\n if (!line || estimateTextWidth(next, fontSize) <= width) line = next\n else {\n lines.push(line)\n line = word\n }\n }\n lines.push(line)\n if (lines.length > MAX_LINES)\n lines.splice(MAX_LINES - 1, lines.length, lines.slice(MAX_LINES - 1).join(' '))\n return lines\n}\n\n/** Text anchor of a spoke label on the side its spoke points to. */\nconst side = (sin: number): -1 | 0 | 1 => (sin > 0.1 ? 1 : sin < -0.1 ? -1 : 0)\n\n/**\n * The largest radius at which every spoke label still fits in `area`:\n * labels sit beyond the outer ring, on the side their spoke points to.\n */\nfunction fitRadius(\n area: { width: number; height: number },\n angles: readonly number[],\n labels: readonly (readonly string[])[],\n fontSize: number,\n): number {\n let radius = Math.min(area.width, area.height) / 2\n angles.forEach((angle, i) => {\n const sin = Math.sin(angle)\n const cos = Math.cos(angle)\n const lines = labels[i] ?? []\n const w = Math.max(0, ...lines.map((line) => estimateTextWidth(line, fontSize)))\n const height = blockHeight(lines.length, fontSize)\n const s = side(sin)\n // Horizontal: the label runs outwards from the spoke end (or is centered on it).\n const across = s === 0 ? w / 2 : w + LABEL_GAP\n if (Math.abs(sin) > 1e-6) radius = Math.min(radius, (area.width / 2 - across) / Math.abs(sin))\n // Vertical: the lines of text above the top spokes, below the bottom ones,\n // centered on the ones at the sides.\n if (Math.abs(cos) > 1e-6) {\n const along = (s === 0 ? height + LABEL_GAP : height / 2) / Math.abs(cos)\n radius = Math.min(radius, area.height / 2 / Math.abs(cos) - along)\n }\n })\n return Math.max(0, radius)\n}\n\n/** Height of `lines` lines of text, in pixels. */\nconst blockHeight = (lines: number, fontSize: number) =>\n fontSize * (1 + Math.max(0, lines - 1) * LINE_HEIGHT)\n\nfunction renderRadar(options: RadarOptions, ctx: RenderContext): ChildInput {\n const { width, height, fontSize, locale } = ctx\n const axis = options.r ?? {}\n const { fill = true, points = false, pointRadius = 4 } = options\n const series = options.data.series\n const labels = resolveLabels(options.data)\n const n = labels.length\n const visible = series.filter((s) => !ctx.hidden.has(seriesKey(s)))\n const formatLabel = options.format ?? ((label: Label) => String(label))\n const formatValue = formatDetail(axis.format, locale)\n\n const pad = insets(options.padding)\n const area = innerRect(width, height, {\n top: pad.top + LABEL_GAP,\n right: pad.right + LABEL_GAP,\n bottom: pad.bottom + LABEL_GAP,\n left: pad.left + LABEL_GAP,\n })\n const cx = area.x + area.width / 2\n const cy = area.y + area.height / 2\n const angles = labels.map((_, i) => (i / Math.max(1, n)) * Math.PI * 2)\n const texts = labels.map((label, i) => formatLabel(label, i))\n // Long labels wrap onto a few lines, then the radius fits them, but never\n // shrinks below a share of the space: lines that still do not fit are cut\n // short (the tooltip and the table keep the labels whole).\n const labelWidth = options.labelWidth ?? area.width / 4\n const wrapped = texts.map((text) => wrap(text, labelWidth, fontSize))\n const radius = Math.max(\n fitRadius(area, angles, wrapped, fontSize),\n (Math.min(area.width, area.height) / 2) * MIN_RADIUS,\n )\n const shown = wrapped.map((lines, i) => {\n const sin = Math.sin(angles[i] as number)\n const room = side(sin) === 0 ? area.width : area.width / 2 - radius * Math.abs(sin) - LABEL_GAP\n return lines.map((line) => truncate(line, room, fontSize))\n })\n\n const count = tickCount(axis, Math.max(2, Math.round(radius / 40)))\n const values = visible.flatMap((s) => s.values)\n const domain = domainOf(values, axis, true, count)\n const scale = linear(domain, [0, radius], { clamp: true })\n const ticks = linearTicks(scale, { count, format: axis.format, locale })\n\n /** Point at `r` pixels from the center along spoke `i`. */\n const at = (i: number, r: number): [number, number] => [\n cx + r * Math.sin(angles[i] as number),\n cy - r * Math.cos(angles[i] as number),\n ]\n /** A closed path through one radius per spoke (the same commands for any values). */\n const polygon = (radii: readonly number[]) =>\n `${radii.map((r, i) => `${i ? 'L' : 'M'}${at(i, r).map(round).join(',')}`).join('')}Z`\n const ring = (r: number) =>\n options.grid === 'circle'\n ? `M${round(cx)},${round(cy - r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy + r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy - r)}Z`\n : polygon(labels.map(() => r))\n /** Pixel radius of a value; missing values sit at the center. */\n const radiusOf = (v: number | null | undefined) =>\n v != null && Number.isFinite(v) ? scale(v) : 0\n\n const hitAt = (index: number): Hit => {\n const items: HitItem[] = []\n series.forEach((s, seriesIndex) => {\n if (ctx.hidden.has(seriesKey(s))) return\n const raw = s.values[index]\n const value = raw != null && Number.isFinite(raw) ? raw : null\n const [x, y] = at(index, radiusOf(value))\n const item: HitItem = {\n name: s.name,\n seriesIndex,\n value,\n text: value === null ? '–' : formatValue(value),\n x,\n y: value === null ? null : y,\n }\n if (s.color) item.color = s.color\n items.push(item)\n })\n const [x2, y2] = at(index, radius)\n return {\n index,\n label: labelKey(labels[index] as Label),\n title: texts[index] as string,\n x: x2,\n area: { x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 },\n items,\n guide: { x1: cx, y1: cy, x2, y2 },\n }\n }\n\n const interaction: Interaction = {\n count: n,\n hitTest(px, py) {\n if (n === 0 || Math.hypot(px - cx, py - cy) > radius + HOVER_SLOP) return null\n // The nearest spoke by angle, clockwise from 12 o'clock.\n const angle = Math.atan2(px - cx, cy - py)\n const turn = (angle < 0 ? angle + Math.PI * 2 : angle) / (Math.PI * 2)\n return hitAt(Math.round(turn * n) % n)\n },\n hitIndex(index, seriesIndex) {\n if (index < 0 || index >= n) return null\n const hit = hitAt(index)\n if (seriesIndex !== undefined && hit.items.some((item) => item.seriesIndex === seriesIndex)) {\n hit.seriesIndex = seriesIndex\n }\n return hit\n },\n }\n ctx.onHitTest(interaction)\n\n const grid = h(\n 'g',\n { key: 'grid', class: 'tc-radar-grid', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h('path', { key: tick.value, class: 'tc-radar-ring', d: ring(tick.position) }),\n ),\n labels.map((label, i) => {\n const [x2, y2] = at(i, radius)\n return h('line', {\n key: labelKey(label),\n class: 'tc-radar-spoke',\n x1: round(cx),\n y1: round(cy),\n x2: round(x2),\n y2: round(y2),\n })\n }),\n )\n\n const groups = series.map((s, index) => {\n if (ctx.hidden.has(seriesKey(s))) return null\n const d = polygon(labels.map((_, i) => radiusOf(s.values[i])))\n return h(\n 'g',\n seriesAttrs(s, index),\n fill && h('path', { class: 'tc-area', d }),\n h('path', { class: 'tc-line', d }),\n points &&\n h(\n 'g',\n { class: 'tc-points' },\n labels.map((label, i) => {\n const v = s.values[i]\n if (v == null || !Number.isFinite(v)) return null\n const [x, y] = at(i, scale(v))\n return h('circle', {\n key: labelKey(label),\n class: 'tc-point',\n cx: round(x),\n cy: round(y),\n r: pointRadius,\n })\n }),\n ),\n )\n })\n\n const spokeLabels = h(\n 'g',\n { key: 'labels', class: 'tc-radar-labels', 'aria-hidden': 'true' },\n labels.map((label, i) => {\n const angle = angles[i] as number\n const s = side(Math.sin(angle))\n const cos = Math.cos(angle)\n const [x, y] = at(i, radius + LABEL_GAP)\n const [first = '', ...rest] = shown[i] ?? []\n // Above the top spokes, below the bottom ones, centered on the sides:\n // the first line moves up to leave room for the ones under it.\n const up = rest.length * LINE_HEIGHT\n const dy = s !== 0 ? `${round(0.35 - up / 2)}em` : cos > 0 ? `${round(-up)}em` : '0.71em'\n return h(\n 'text',\n {\n key: labelKey(label),\n class: 'tc-tick-label tc-radar-label',\n x: round(x),\n y: round(y),\n 'text-anchor': s > 0 ? 'start' : s < 0 ? 'end' : 'middle',\n dy,\n },\n first,\n rest.map((line, j) => h('tspan', { key: j, x: round(x), dy: `${LINE_HEIGHT}em` }, line)),\n )\n }),\n )\n\n const valueLabels =\n axis.show !== false &&\n h(\n 'g',\n { key: 'values', class: 'tc-radar-values', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h(\n 'text',\n {\n key: tick.value,\n class: 'tc-tick-label tc-radar-value',\n x: round(cx + 4),\n y: round(cy - tick.position),\n dy: '0.35em',\n },\n tick.label,\n ),\n ),\n )\n\n return [\n grid,\n // Series grow from the center: the transform origin is set here, in pixels.\n h(\n 'g',\n {\n key: 'series',\n class: 'tc-series-list tc-radar-series',\n style: `transform-origin:${round(cx)}px ${round(cy)}px`,\n },\n groups,\n ),\n spokeLabels,\n valueLabels,\n ]\n}\n\n/**\n * Radar (spider) chart: one spoke per label, the values of each series\n * joined into a polygon around the center. Good for comparing a few series\n * over the same handful of measures.\n *\n * ```ts\n * new Chart('#el', {\n * type: radar,\n * data: {\n * labels: ['Speed', 'Range', 'Comfort', 'Price', 'Safety'],\n * series: [{ name: 'Model A', values: [80, 60, 70, 40, 90] }],\n * },\n * })\n * ```\n */\nexport const radar: ChartType<RadarOptions> = {\n name: 'radar',\n clean: cleanData(cleanSeries),\n render: renderRadar,\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) =>\n seriesTable(\n {\n data: options.data,\n ...(options.r?.format ? { y: { format: options.r.format } } : {}),\n ...(options.format ? { x: { format: options.format } } : {}),\n },\n ctx,\n limit,\n ),\n}\n"],"mappings":";;;;;;;AAoEA,MAAM,YAAY;;AAElB,MAAM,aAAa;;AAGnB,MAAM,aAAa;;AAEnB,MAAM,YAAY;;AAGlB,SAAS,SAAS,MAAc,OAAe,UAA0B;CACvE,IAAI,kBAAkB,MAAM,QAAQ,KAAK,OAAO,OAAO;CACvD,IAAI,MAAM,KAAK;CACf,OAAO,MAAM,KAAK,kBAAkB,GAAG,KAAK,MAAM,GAAG,GAAG,EAAE,IAAI,QAAQ,IAAI,OAAO;CACjF,OAAO,MAAM,IAAI,GAAG,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;AACxD;;;;;;AAOA,SAAS,KAAK,MAAc,OAAe,UAA4B;CACrE,MAAM,QAAkB,CAAC;CACzB,IAAI,OAAO;CACX,KAAK,MAAM,QAAQ,KAAK,MAAM,GAAG,GAAG;EAClC,MAAM,OAAO,OAAO,GAAG,KAAK,GAAG,SAAS;EACxC,IAAI,CAAC,QAAQ,kBAAkB,MAAM,QAAQ,KAAK,OAAO,OAAO;OAC3D;GACH,MAAM,KAAK,IAAI;GACf,OAAO;EACT;CACF;C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;;;;;;;;;;;;;AAiBA,MAAa,QAAiC;CAC5C,MAAM;CACN,OAAO,UAAU,WAAW;CAC5B,QAAQ;CACR,SAAS,YAAY,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UACpB,YACE;EACE,MAAM,QAAQ;EACd,GAAI,QAAQ,GAAG,SAAS,EAAE,GAAG,EAAE,QAAQ,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;EAC/D,GAAI,QAAQ,SAAS,EAAE,GAAG,EAAE,QAAQ,QAAQ,OAAO,EAAE,IAAI,CAAC;CAC5D,GACA,KACA,KACF;AACJ"}
1
+ {"version":3,"file":"radar-BR-mumDd.js","names":[],"sources":["../src/charts/radar.ts"],"sourcesContent":["import type { ChartType, RenderContext } from '../chart.ts'\nimport { linearTicks } from '../components/axis.ts'\nimport { formatDetail, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport {\n estimateTextWidth,\n type InsetsInput,\n innerRect,\n insets,\n LINE_HEIGHT,\n round,\n} from '../layout.ts'\nimport { linear } from '../scales/linear.ts'\nimport { type ChildInput, h } from '../vnode.ts'\nimport {\n type CartesianData,\n domainOf,\n type Label,\n labelKey,\n resolveLabels,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n tickCount,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\n\n/** Options for the radial value axis. */\nexport interface RadialAxisOptions {\n /** Render the value labels along the first spoke. Defaults to `true`. */\n show?: boolean\n /** Value at the center. Defaults to `0` (or the data minimum when it is negative). */\n min?: number\n /** Value at the outer ring. Defaults to the niced data maximum. */\n max?: number\n /** Extend the domain to round values. Defaults to `true`. */\n nice?: boolean\n /** Approximate number of rings. Defaults to one per ~40px of radius. */\n ticks?: number\n format?: NumberFormat\n}\n\nexport interface RadarOptions {\n /** One spoke per label, one polygon per series. */\n data: CartesianData\n /** The radial value axis. */\n r?: RadialAxisOptions\n /** Format of the spoke labels (axis, tooltips and the table). */\n format?: (label: Label, index: number) => string\n /** Shape of the rings. Defaults to `'polygon'`. */\n grid?: 'polygon' | 'circle'\n /** Fill each polygon. Defaults to `true`. */\n fill?: boolean\n /** Draw a dot on every value. Defaults to `false`. */\n points?: boolean\n /** Dot radius in pixels. Defaults to `4`. */\n pointRadius?: number\n /**\n * Widest spoke label, in pixels: a longer one wraps at its spaces onto up\n * to three lines. Defaults to a quarter of the chart's width.\n */\n labelWidth?: number\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** Space between the outer ring and the spoke labels. */\nconst LABEL_GAP = 8\n/** Pixels around the outer ring that still count as hovering it. */\nconst HOVER_SLOP = 8\n\n/** Smallest radius, as a share of the space, however long the labels. */\nconst MIN_RADIUS = 0.5\n/** Most lines a wrapped spoke label takes. */\nconst MAX_LINES = 3\n\n/** `text`, cut short with an ellipsis to fit `width` pixels. */\nfunction truncate(text: string, width: number, fontSize: number): string {\n if (estimateTextWidth(text, fontSize) <= width) return text\n let end = text.length\n while (end > 0 && estimateTextWidth(`${text.slice(0, end)}…`, fontSize) > width) end--\n return end > 0 ? `${text.slice(0, end).trimEnd()}…` : ''\n}\n\n/**\n * `text` split at its spaces into lines no wider than `width` pixels (a word\n * wider than that gets a line of its own), at most `MAX_LINES` of them: what\n * is left joins the last line.\n */\nfunction wrap(text: string, width: number, fontSize: number): string[] {\n const lines: string[] = []\n let line = ''\n for (const word of text.split(' ')) {\n const next = line ? `${line} ${word}` : word\n if (!line || estimateTextWidth(next, fontSize) <= width) line = next\n else {\n lines.push(line)\n line = word\n }\n }\n lines.push(line)\n if (lines.length > MAX_LINES)\n lines.splice(MAX_LINES - 1, lines.length, lines.slice(MAX_LINES - 1).join(' '))\n return lines\n}\n\n/** Text anchor of a spoke label on the side its spoke points to. */\nconst side = (sin: number): -1 | 0 | 1 => (sin > 0.1 ? 1 : sin < -0.1 ? -1 : 0)\n\n/**\n * The largest radius at which every spoke label still fits in `area`:\n * labels sit beyond the outer ring, on the side their spoke points to.\n */\nfunction fitRadius(\n area: { width: number; height: number },\n angles: readonly number[],\n labels: readonly (readonly string[])[],\n fontSize: number,\n): number {\n let radius = Math.min(area.width, area.height) / 2\n angles.forEach((angle, i) => {\n const sin = Math.sin(angle)\n const cos = Math.cos(angle)\n const lines = labels[i] ?? []\n const w = Math.max(0, ...lines.map((line) => estimateTextWidth(line, fontSize)))\n const height = blockHeight(lines.length, fontSize)\n const s = side(sin)\n // Horizontal: the label runs outwards from the spoke end (or is centered on it).\n const across = s === 0 ? w / 2 : w + LABEL_GAP\n if (Math.abs(sin) > 1e-6) radius = Math.min(radius, (area.width / 2 - across) / Math.abs(sin))\n // Vertical: the lines of text above the top spokes, below the bottom ones,\n // centered on the ones at the sides.\n if (Math.abs(cos) > 1e-6) {\n const along = (s === 0 ? height + LABEL_GAP : height / 2) / Math.abs(cos)\n radius = Math.min(radius, area.height / 2 / Math.abs(cos) - along)\n }\n })\n return Math.max(0, radius)\n}\n\n/** Height of `lines` lines of text, in pixels. */\nconst blockHeight = (lines: number, fontSize: number) =>\n fontSize * (1 + Math.max(0, lines - 1) * LINE_HEIGHT)\n\nfunction renderRadar(options: RadarOptions, ctx: RenderContext): ChildInput {\n const { width, height, fontSize, locale } = ctx\n const axis = options.r ?? {}\n const { fill = true, points = false, pointRadius = 4 } = options\n const series = options.data.series\n const labels = resolveLabels(options.data)\n const n = labels.length\n const visible = series.filter((s) => !ctx.hidden.has(seriesKey(s)))\n const formatLabel = options.format ?? ((label: Label) => String(label))\n const formatValue = formatDetail(axis.format, locale)\n\n const pad = insets(options.padding)\n const area = innerRect(width, height, {\n top: pad.top + LABEL_GAP,\n right: pad.right + LABEL_GAP,\n bottom: pad.bottom + LABEL_GAP,\n left: pad.left + LABEL_GAP,\n })\n const cx = area.x + area.width / 2\n const cy = area.y + area.height / 2\n const angles = labels.map((_, i) => (i / Math.max(1, n)) * Math.PI * 2)\n const texts = labels.map((label, i) => formatLabel(label, i))\n // Long labels wrap onto a few lines, then the radius fits them, but never\n // shrinks below a share of the space: lines that still do not fit are cut\n // short (the tooltip and the table keep the labels whole).\n const labelWidth = options.labelWidth ?? area.width / 4\n const wrapped = texts.map((text) => wrap(text, labelWidth, fontSize))\n const radius = Math.max(\n fitRadius(area, angles, wrapped, fontSize),\n (Math.min(area.width, area.height) / 2) * MIN_RADIUS,\n )\n const shown = wrapped.map((lines, i) => {\n const sin = Math.sin(angles[i] as number)\n const room = side(sin) === 0 ? area.width : area.width / 2 - radius * Math.abs(sin) - LABEL_GAP\n return lines.map((line) => truncate(line, room, fontSize))\n })\n\n const count = tickCount(axis, Math.max(2, Math.round(radius / 40)))\n const values = visible.flatMap((s) => s.values)\n const domain = domainOf(values, axis, true, count)\n const scale = linear(domain, [0, radius], { clamp: true })\n const ticks = linearTicks(scale, { count, format: axis.format, locale })\n\n /** Point at `r` pixels from the center along spoke `i`. */\n const at = (i: number, r: number): [number, number] => [\n cx + r * Math.sin(angles[i] as number),\n cy - r * Math.cos(angles[i] as number),\n ]\n /** A closed path through one radius per spoke (the same commands for any values). */\n const polygon = (radii: readonly number[]) =>\n `${radii.map((r, i) => `${i ? 'L' : 'M'}${at(i, r).map(round).join(',')}`).join('')}Z`\n const ring = (r: number) =>\n options.grid === 'circle'\n ? `M${round(cx)},${round(cy - r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy + r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy - r)}Z`\n : polygon(labels.map(() => r))\n /** Pixel radius of a value; missing values sit at the center. */\n const radiusOf = (v: number | null | undefined) =>\n v != null && Number.isFinite(v) ? scale(v) : 0\n\n const hitAt = (index: number): Hit => {\n const items: HitItem[] = []\n series.forEach((s, seriesIndex) => {\n if (ctx.hidden.has(seriesKey(s))) return\n const raw = s.values[index]\n const value = raw != null && Number.isFinite(raw) ? raw : null\n const [x, y] = at(index, radiusOf(value))\n const item: HitItem = {\n name: s.name,\n seriesIndex,\n value,\n text: value === null ? '–' : formatValue(value),\n x,\n y: value === null ? null : y,\n }\n if (s.color) item.color = s.color\n items.push(item)\n })\n const [x2, y2] = at(index, radius)\n return {\n index,\n label: labelKey(labels[index] as Label),\n title: texts[index] as string,\n x: x2,\n area: { x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 },\n items,\n guide: { x1: cx, y1: cy, x2, y2 },\n }\n }\n\n const interaction: Interaction = {\n count: n,\n hitTest(px, py) {\n if (n === 0 || Math.hypot(px - cx, py - cy) > radius + HOVER_SLOP) return null\n // The nearest spoke by angle, clockwise from 12 o'clock.\n const angle = Math.atan2(px - cx, cy - py)\n const turn = (angle < 0 ? angle + Math.PI * 2 : angle) / (Math.PI * 2)\n return hitAt(Math.round(turn * n) % n)\n },\n hitIndex(index, seriesIndex) {\n if (index < 0 || index >= n) return null\n const hit = hitAt(index)\n if (seriesIndex !== undefined && hit.items.some((item) => item.seriesIndex === seriesIndex)) {\n hit.seriesIndex = seriesIndex\n }\n return hit\n },\n }\n ctx.onHitTest(interaction)\n\n const grid = h(\n 'g',\n { key: 'grid', class: 'tc-radar-grid', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h('path', { key: tick.value, class: 'tc-radar-ring', d: ring(tick.position) }),\n ),\n labels.map((label, i) => {\n const [x2, y2] = at(i, radius)\n return h('line', {\n key: labelKey(label),\n class: 'tc-radar-spoke',\n x1: round(cx),\n y1: round(cy),\n x2: round(x2),\n y2: round(y2),\n })\n }),\n )\n\n const groups = series.map((s, index) => {\n if (ctx.hidden.has(seriesKey(s))) return null\n const d = polygon(labels.map((_, i) => radiusOf(s.values[i])))\n return h(\n 'g',\n seriesAttrs(s, index),\n fill && h('path', { class: 'tc-area', d }),\n h('path', { class: 'tc-line', d }),\n points &&\n h(\n 'g',\n { class: 'tc-points' },\n labels.map((label, i) => {\n const v = s.values[i]\n if (v == null || !Number.isFinite(v)) return null\n const [x, y] = at(i, scale(v))\n return h('circle', {\n key: labelKey(label),\n class: 'tc-point',\n cx: round(x),\n cy: round(y),\n r: pointRadius,\n })\n }),\n ),\n )\n })\n\n const spokeLabels = h(\n 'g',\n { key: 'labels', class: 'tc-radar-labels', 'aria-hidden': 'true' },\n labels.map((label, i) => {\n const angle = angles[i] as number\n const s = side(Math.sin(angle))\n const cos = Math.cos(angle)\n const [x, y] = at(i, radius + LABEL_GAP)\n const [first = '', ...rest] = shown[i] ?? []\n // Above the top spokes, below the bottom ones, centered on the sides:\n // the first line moves up to leave room for the ones under it.\n const up = rest.length * LINE_HEIGHT\n const dy = s !== 0 ? `${round(0.35 - up / 2)}em` : cos > 0 ? `${round(-up)}em` : '0.71em'\n return h(\n 'text',\n {\n key: labelKey(label),\n class: 'tc-tick-label tc-radar-label',\n x: round(x),\n y: round(y),\n 'text-anchor': s > 0 ? 'start' : s < 0 ? 'end' : 'middle',\n dy,\n },\n first,\n rest.map((line, j) => h('tspan', { key: j, x: round(x), dy: `${LINE_HEIGHT}em` }, line)),\n )\n }),\n )\n\n const valueLabels =\n axis.show !== false &&\n h(\n 'g',\n { key: 'values', class: 'tc-radar-values', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h(\n 'text',\n {\n key: tick.value,\n class: 'tc-tick-label tc-radar-value',\n x: round(cx + 4),\n y: round(cy - tick.position),\n dy: '0.35em',\n },\n tick.label,\n ),\n ),\n )\n\n return [\n grid,\n // Series grow from the center: the transform origin is set here, in pixels.\n h(\n 'g',\n {\n key: 'series',\n class: 'tc-series-list tc-radar-series',\n style: `transform-origin:${round(cx)}px ${round(cy)}px`,\n },\n groups,\n ),\n spokeLabels,\n valueLabels,\n ]\n}\n\n/**\n * Radar (spider) chart: one spoke per label, the values of each series\n * joined into a polygon around the center. Good for comparing a few series\n * over the same handful of measures.\n *\n * ```ts\n * new Chart('#el', {\n * type: radar,\n * data: {\n * labels: ['Speed', 'Range', 'Comfort', 'Price', 'Safety'],\n * series: [{ name: 'Model A', values: [80, 60, 70, 40, 90] }],\n * },\n * })\n * ```\n */\nexport const radar: ChartType<RadarOptions> = {\n name: 'radar',\n clean: cleanData(cleanSeries),\n render: renderRadar,\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) =>\n seriesTable(\n {\n data: options.data,\n ...(options.r?.format ? { y: { format: options.r.format } } : {}),\n ...(options.format ? { x: { format: options.format } } : {}),\n },\n ctx,\n limit,\n ),\n}\n"],"mappings":";;;;;;;AAoEA,MAAM,YAAY;;AAElB,MAAM,aAAa;;AAGnB,MAAM,aAAa;;AAEnB,MAAM,YAAY;;AAGlB,SAAS,SAAS,MAAc,OAAe,UAA0B;CACvE,IAAI,kBAAkB,MAAM,QAAQ,KAAK,OAAO,OAAO;CACvD,IAAI,MAAM,KAAK;CACf,OAAO,MAAM,KAAK,kBAAkB,GAAG,KAAK,MAAM,GAAG,GAAG,EAAE,IAAI,QAAQ,IAAI,OAAO;CACjF,OAAO,MAAM,IAAI,GAAG,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;AACxD;;;;;;AAOA,SAAS,KAAK,MAAc,OAAe,UAA4B;CACrE,MAAM,QAAkB,CAAC;CACzB,IAAI,OAAO;CACX,KAAK,MAAM,QAAQ,KAAK,MAAM,GAAG,GAAG;EAClC,MAAM,OAAO,OAAO,GAAG,KAAK,GAAG,SAAS;EACxC,IAAI,CAAC,QAAQ,kBAAkB,MAAM,QAAQ,KAAK,OAAO,OAAO;OAC3D;GACH,MAAM,KAAK,IAAI;GACf,OAAO;EACT;CACF;CACA,MAAM,KAAK,IAAI;CACf,IAAI,MAAM,SAAS,WACjB,MAAM,OAAO,GAAe,MAAM,QAAQ,MAAM,MAAM,CAAa,CAAC,CAAC,KAAK,GAAG,CAAC;CAChF,OAAO;AACT;;AAGA,MAAM,QAAQ,QAA6B,MAAM,KAAM,IAAI,MAAM,MAAO,KAAK;;;;;AAM7E,SAAS,UACP,MACA,QACA,QACA,UACQ;CACR,IAAI,SAAS,KAAK,IAAI,KAAK,OAAO,KAAK,MA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GAAG,EAAE,QAAQ,QAAQ,OAAO,EAAE,IAAI,CAAC;CAC5D,GACA,KACA,KACF;AACJ"}
@@ -1,7 +1,6 @@
1
- import { a as InsetsInput } from "./annotations-lyt0I3HU.cjs";
2
- import { Q as CartesianData, a as ChartType, tt as Label } from "./chart-D7ooEFnk.cjs";
3
- import { c as NumberFormat } from "./time-CNVnt-B2.cjs";
4
- //#region src/charts/radar.d.ts
1
+ import { a as ChartType, at as Label, nt as CartesianData } from "./chart-kqFMEwDo.cjs";
2
+ import { c as NumberFormat } from "./time-B4oxWHQI.cjs";
3
+ import { a as InsetsInput } from "./annotations-CHafaGd4.cjs";
5
4
  /** Options for the radial value axis. */
6
5
  interface RadialAxisOptions {
7
6
  /** Render the value labels along the first spoke. Defaults to `true`. */
@@ -55,6 +54,4 @@ interface RadarOptions {
55
54
  * ```
56
55
  */
57
56
  declare const radar: ChartType<RadarOptions>;
58
- //#endregion
59
- export { RadialAxisOptions as n, radar as r, RadarOptions as t };
60
- //# sourceMappingURL=radar-DBW4O0Vt.d.cts.map
57
+ export { RadialAxisOptions as n, radar as r, RadarOptions as t };
@@ -1,9 +1,9 @@
1
- const require_layout = require("./layout-CtMBhNd9.cjs");
2
- const require_vnode = require("./vnode-CkQ27Cxe.cjs");
3
- const require_format = require("./format-B0yKXBTH.cjs");
4
- const require_cartesian = require("./cartesian-BoDfgBCV.cjs");
5
- const require_clean = require("./clean-Byl6kzf0.cjs");
6
- //#region src/charts/radar.ts
1
+ const require_cartesian = require("./cartesian-DV02PsBe.cjs");
2
+ const require_format = require("./format-CAE5ruy6.cjs");
3
+ const require_layout = require("./layout-JY2aR-yE.cjs");
4
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
5
+ const require_clean = require("./clean-Die2iCNc.cjs");
6
+ // src/charts/radar.ts
7
7
  /** Space between the outer ring and the spoke labels. */
8
8
  const LABEL_GAP = 8;
9
9
  /** Pixels around the outer ring that still count as hovering it. */
@@ -279,7 +279,6 @@ const radar = {
279
279
  ...options.format ? { x: { format: options.format } } : {}
280
280
  }, ctx, limit)
281
281
  };
282
- //#endregion
283
282
  Object.defineProperty(exports, "radar", {
284
283
  enumerable: true,
285
284
  get: function() {
@@ -287,4 +286,4 @@ Object.defineProperty(exports, "radar", {
287
286
  }
288
287
  });
289
288
 
290
- //# sourceMappingURL=radar-CoGUNNSb.cjs.map
289
+ //# sourceMappingURL=radar-HPDrIdzc.cjs.map