@tabler/charts 0.0.1-alpha.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 (377) hide show
  1. package/README.md +33 -5
  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/{sweep-WSgn2etB.js → arc-B3V5IR0w.js} +3 -60
  14. package/dist/arc-B3V5IR0w.js.map +1 -0
  15. package/dist/{sweep-Duowaput.cjs → arc-CYhI62kO.cjs} +2 -71
  16. package/dist/arc-CYhI62kO.cjs.map +1 -0
  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-DaO4MQl4.d.ts → area-CJX9219z.d.cts} +3 -6
  22. package/dist/{area-BFvkc-ZM.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-DdsDxk3W.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-a0h9KC8A.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-BnUG1SGi.d.ts → candlestick-D0xKkdqd.d.ts} +3 -6
  48. package/dist/{candlestick-BKdPyorY.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-iJGxMz9z.d.ts → chart-QilhWP8Z.d.ts} +38 -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-Qa417fJo.d.cts → chart-kqFMEwDo.d.cts} +64 -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-plobgBC7.js → core-BKRQvPAT.js} +47 -46
  72. package/dist/core-BKRQvPAT.js.map +1 -0
  73. package/dist/{core-C7fPm6t7.cjs → core-DIOC61up.cjs} +47 -46
  74. package/dist/core-DIOC61up.cjs.map +1 -0
  75. package/dist/{core-CjgbhS_v.d.ts → core-DRUCk67j.d.ts} +6 -42
  76. package/dist/{core-CnGFKojH.d.cts → core-PAX5ogLk.d.cts} +24 -68
  77. package/dist/core.cjs +32 -26
  78. package/dist/core.d.cts +23 -20
  79. package/dist/core.d.ts +23 -20
  80. package/dist/core.js +27 -24
  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-Cu9jttC0.d.ts → gauge-0VJuAHWF.d.ts} +5 -8
  125. package/dist/{gauge-Cu_OFxBd.d.cts → gauge-BSist7My.d.cts} +5 -8
  126. package/dist/{gauge-CEfkWXSu.cjs → gauge-DXkjXNCD.cjs} +14 -14
  127. package/dist/gauge-DXkjXNCD.cjs.map +1 -0
  128. package/dist/{gauge-_ljQHrMN.js → gauge-ts0kqN1-.js} +10 -10
  129. package/dist/{gauge-_ljQHrMN.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-PhLPXIg1.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-BwS-y0c6.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 +54 -48
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +24 -26
  158. package/dist/index.d.ts +24 -26
  159. package/dist/index.js +45 -42
  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-CMDGH6q5.d.cts → line-DtSh7HQU.d.ts} +4 -7
  170. package/dist/{line-D5kb8e6w.d.ts → 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-CLCI7tUO.d.ts +66 -0
  207. package/dist/parliament-CgsVnWEe.d.cts +66 -0
  208. package/dist/parliament-Cru4IcuM.js +302 -0
  209. package/dist/parliament-Cru4IcuM.js.map +1 -0
  210. package/dist/parliament-x5hcFaQ3.cjs +307 -0
  211. package/dist/parliament-x5hcFaQ3.cjs.map +1 -0
  212. package/dist/parliament.cjs +3 -0
  213. package/dist/parliament.d.cts +3 -0
  214. package/dist/parliament.d.ts +3 -0
  215. package/dist/parliament.js +1 -0
  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-B8UlOZiq.d.ts → pie-BXg2gNpb.d.cts} +14 -8
  238. package/dist/{pie-C1Pa6W_l.cjs → pie-BpjvSPnz.cjs} +19 -22
  239. package/dist/pie-BpjvSPnz.cjs.map +1 -0
  240. package/dist/{pie-DnQQmxkk.d.cts → pie-CFptILSm.d.ts} +14 -8
  241. package/dist/{pie-RnMTQWMS.js → pie-CVsc-6qD.js} +13 -16
  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-pFI6fvOq.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-BB13CGmq.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-Bm518bqL.d.ts → sankey-D_v7KxnJ.d.ts} +4 -7
  272. package/dist/{sankey-B9JYnx7e.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-Bl7nasE6.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-DrJ8xYz4.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-BG13V4Pz.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-iWuXbKpd.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-BpRPlhs6.js +59 -0
  307. package/dist/sweep-BpRPlhs6.js.map +1 -0
  308. package/dist/sweep-Dnp6LDBz.cjs +70 -0
  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 +31 -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-C7fPm6t7.cjs.map +0 -1
  358. package/dist/core-plobgBC7.js.map +0 -1
  359. package/dist/gauge-CEfkWXSu.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/pie-C1Pa6W_l.cjs.map +0 -1
  367. package/dist/pie-RnMTQWMS.js.map +0 -1
  368. package/dist/sankey-B4PNKusJ.js.map +0 -1
  369. package/dist/sankey-Bacx4fVe.cjs.map +0 -1
  370. package/dist/scatter-DgMN9zRy.cjs.map +0 -1
  371. package/dist/scatter-kgtgR318.js.map +0 -1
  372. package/dist/sparkline-BQzt27Fr.js.map +0 -1
  373. package/dist/sparkline-BS9-hltA.cjs.map +0 -1
  374. package/dist/sweep-Duowaput.cjs.map +0 -1
  375. package/dist/sweep-WSgn2etB.js.map +0 -1
  376. package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
  377. package/dist/value-labels-IZIQPhfk.js.map +0 -1
@@ -1,6 +1,4 @@
1
- const require_vnode = require("./vnode-CkQ27Cxe.cjs");
2
- const require_tween = require("./tween-CIGBlryn.cjs");
3
- //#region src/shapes/arc.ts
1
+ // src/shapes/arc.ts
4
2
  /**
5
3
  * Annular sector paths with padding and rounded corners, ported from
6
4
  * d3-shape's `arc()` (ISC license, Mike Bostock) so geometry matches d3.
@@ -274,61 +272,6 @@ function arcPathStable(options) {
274
272
  }
275
273
  return `${d}Z`;
276
274
  }
277
- //#endregion
278
- //#region src/render/sweep.ts
279
- /**
280
- * Arcs that turn to their new angles: a transition of `d` moves each point
281
- * of a path along a straight line, which bends a slice out of its ring on
282
- * the way. A path that knows which arc it draws (the `arc` of its node, see
283
- * `arcNode`) is redrawn frame by frame instead, with the angles and radii
284
- * in between, so slices grow and shrink around the center. Timed by the
285
- * path's `transition-duration` (`--tc-duration`), with an ease-out curve.
286
- */
287
- /**
288
- * A path drawing this arc, which keeps the arc with it (radii, angles, pad
289
- * angle, corner radius): out of the markup, for the next render to sweep from.
290
- */
291
- function arcNode(name, arc) {
292
- const node = require_vnode.h("path", {
293
- class: name,
294
- d: arcPathStable(arc)
295
- });
296
- node.arc = [
297
- arc.innerRadius,
298
- arc.outerRadius,
299
- arc.startAngle,
300
- arc.endAngle,
301
- arc.padAngle ?? 0,
302
- arc.cornerRadius ?? 0
303
- ];
304
- return node;
305
- }
306
- /**
307
- * Take `el` from the arc of its last render, `prev`, to the arc of `next`.
308
- * Returns the attributes left for the caller to patch (all but `d`, set
309
- * here frame by frame), or nothing when there is no sweep: not an arc, the
310
- * same path, no arc to come from, or a chart without transitions.
311
- */
312
- function sweep(el, prev, next) {
313
- const { arc, attrs } = next;
314
- if (!arc || prev.attrs.d === attrs.d) return;
315
- const origin = require_tween.stop(el) ?? prev.arc;
316
- const duration = Number.parseFloat(getComputedStyle(el).transitionDuration) * 1e3;
317
- if (!origin || !(duration > 0)) return;
318
- require_tween.tween(el, origin, arc, duration, ([innerRadius, outerRadius, startAngle, endAngle, padAngle, cornerRadius]) => arcPathStable({
319
- innerRadius,
320
- outerRadius,
321
- startAngle,
322
- endAngle,
323
- padAngle,
324
- cornerRadius
325
- }), String(attrs.d));
326
- return {
327
- ...attrs,
328
- d: prev.attrs.d
329
- };
330
- }
331
- //#endregion
332
275
  Object.defineProperty(exports, "DEG", {
333
276
  enumerable: true,
334
277
  get: function() {
@@ -341,12 +284,6 @@ Object.defineProperty(exports, "arcCentroid", {
341
284
  return arcCentroid;
342
285
  }
343
286
  });
344
- Object.defineProperty(exports, "arcNode", {
345
- enumerable: true,
346
- get: function() {
347
- return arcNode;
348
- }
349
- });
350
287
  Object.defineProperty(exports, "arcPathStable", {
351
288
  enumerable: true,
352
289
  get: function() {
@@ -359,11 +296,5 @@ Object.defineProperty(exports, "padAngleForGap", {
359
296
  return padAngleForGap;
360
297
  }
361
298
  });
362
- Object.defineProperty(exports, "sweep", {
363
- enumerable: true,
364
- get: function() {
365
- return sweep;
366
- }
367
- });
368
299
 
369
- //# sourceMappingURL=sweep-Duowaput.cjs.map
300
+ //# sourceMappingURL=arc-CYhI62kO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arc-CYhI62kO.cjs","names":[],"sources":["../src/shapes/arc.ts"],"sourcesContent":["/**\n * Annular sector paths with padding and rounded corners, ported from\n * d3-shape's `arc()` (ISC license, Mike Bostock) so geometry matches d3.\n *\n * Angles are in radians, clockwise from 12 o'clock; paths are centered on\n * the origin (translate the group to place them).\n */\n\nconst EPSILON = 1e-12\nconst PI = Math.PI\nconst HALF_PI = PI / 2\nconst TAU = 2 * PI\n\n/** Degrees to radians. */\nexport const DEG: number = Math.PI / 180\n\n/** Room kept around pies and gauges for the halo of the hovered arc, in pixels. */\nexport const HALO = 8\n\n// Clamped like d3-shape's math helpers, so out-of-range inputs saturate instead of NaN.\nconst asin = (x: number): number => (x >= 1 ? HALF_PI : x <= -1 ? -HALF_PI : Math.asin(x))\nconst acos = (x: number): number => (x > 1 ? 0 : x < -1 ? PI : Math.acos(x))\n\nexport interface ArcOptions {\n innerRadius: number\n outerRadius: number\n startAngle: number\n endAngle: number\n /** Angle removed between adjacent arcs, split between both ends. Defaults to `0`. */\n padAngle?: number\n /** Radius the pad angle is measured at. Defaults to `sqrt(inner² + outer²)` like d3. */\n padRadius?: number\n /** Radius of the rounded corners, clamped to half the ring thickness. Defaults to `0`. */\n cornerRadius?: number\n /** Decimal places kept in the path data. Defaults to `2`. */\n precision?: number\n}\n\n/** Canvas-like path builder emitting SVG path data (after d3-path). */\nclass ArcPath {\n d = ''\n #x0: number | null = null\n #y0: number | null = null\n #x1: number | null = null\n #y1: number | null = null\n readonly #k: number\n\n constructor(precision: number) {\n this.#k = 10 ** Math.max(0, Math.min(12, Math.floor(precision)))\n }\n\n #n(value: number): string {\n const rounded = Math.round(value * this.#k) / this.#k\n return String(rounded === 0 ? 0 : rounded)\n }\n\n moveTo(x: number, y: number): void {\n this.#x0 = this.#x1 = x\n this.#y0 = this.#y1 = y\n this.d += `M${this.#n(x)},${this.#n(y)}`\n }\n\n lineTo(x: number, y: number): void {\n this.#x1 = x\n this.#y1 = y\n this.d += `L${this.#n(x)},${this.#n(y)}`\n }\n\n closePath(): void {\n if (this.#x1 !== null) {\n this.#x1 = this.#x0\n this.#y1 = this.#y0\n this.d += 'Z'\n }\n }\n\n arc(x: number, y: number, r: number, a0: number, a1: number, ccw: boolean): void {\n const dx = r * Math.cos(a0)\n const dy = r * Math.sin(a0)\n const x0 = x + dx\n const y0 = y + dy\n const cw = ccw ? 0 : 1\n let da = ccw ? a0 - a1 : a1 - a0\n\n if (this.#x1 === null || this.#y1 === null) {\n this.d += `M${this.#n(x0)},${this.#n(y0)}`\n this.#x0 = x0\n this.#y0 = y0\n } else if (Math.abs(this.#x1 - x0) > EPSILON || Math.abs(this.#y1 - y0) > EPSILON) {\n this.d += `L${this.#n(x0)},${this.#n(y0)}`\n }\n this.#x1 = x0\n this.#y1 = y0\n if (!r) return\n\n if (da < 0) da = (da % TAU) + TAU\n const rr = this.#n(r)\n if (da > TAU - EPSILON) {\n // A complete circle: two half arcs.\n this.d += `A${rr},${rr},0,1,${cw},${this.#n(x - dx)},${this.#n(y - dy)}`\n this.d += `A${rr},${rr},0,1,${cw},${this.#n(x0)},${this.#n(y0)}`\n } else if (da > EPSILON) {\n this.#x1 = x + r * Math.cos(a1)\n this.#y1 = y + r * Math.sin(a1)\n this.d += `A${rr},${rr},0,${da >= PI ? 1 : 0},${cw},${this.#n(this.#x1)},${this.#n(this.#y1)}`\n }\n }\n}\n\nfunction intersect(\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n x3: number,\n y3: number,\n): [number, number] | undefined {\n const x10 = x1 - x0\n const y10 = y1 - y0\n const x32 = x3 - x2\n const y32 = y3 - y2\n let t = y32 * x10 - x32 * y10\n if (t * t < EPSILON) return undefined\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t\n return [x0 + t * x10, y0 + t * y10]\n}\n\n/** Center and tangent points of a rounded corner between a radial edge and an arc. */\nfunction cornerTangents(\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n r1: number,\n rc: number,\n cw: boolean,\n) {\n const x01 = x0 - x1\n const y01 = y0 - y1\n const lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01)\n const ox = lo * y01\n const oy = -lo * x01\n const x11 = x0 + ox\n const y11 = y0 + oy\n const x10 = x1 + ox\n const y10 = y1 + oy\n const x00 = (x11 + x10) / 2\n const y00 = (y11 + y10) / 2\n const dx = x10 - x11\n const dy = y10 - y11\n const d2 = dx * dx + dy * dy\n const r = r1 - rc\n const D = x11 * y10 - x10 * y11\n const d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D))\n let cx0 = (D * dy - dx * d) / d2\n let cy0 = (-D * dx - dy * d) / d2\n const cx1 = (D * dy + dx * d) / d2\n const cy1 = (-D * dx + dy * d) / d2\n const dx0 = cx0 - x00\n const dy0 = cy0 - y00\n const dx1 = cx1 - x00\n const dy1 = cy1 - y00\n // Pick the intersection closest to the edge midpoint.\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) {\n cx0 = cx1\n cy0 = cy1\n }\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1),\n }\n}\n\n/**\n * Padded angles, clamped corner radii and edge points of a partial sector,\n * shared by both path generators so they agree exactly.\n */\nfunction sector(\n options: ArcOptions,\n r0: number,\n r1: number,\n a0: number,\n a1: number,\n da: number,\n cw: boolean,\n) {\n let a01 = a0\n let a11 = a1\n let a00 = a0\n let a10 = a1\n let da0 = da\n let da1 = da\n const ap = (options.padAngle ?? 0) / 2\n const rp = ap > EPSILON ? (options.padRadius ?? Math.sqrt(r0 * r0 + r1 * r1)) : 0\n const rc = Math.min(Math.abs(r1 - r0) / 2, options.cornerRadius ?? 0)\n let rc0 = rc\n let rc1 = rc\n\n // Apply padding: equal linear offsets at both radii keep the gap parallel.\n if (rp > EPSILON) {\n let p0 = asin((rp / r0) * Math.sin(ap))\n let p1 = asin((rp / r1) * Math.sin(ap))\n da0 -= p0 * 2\n if (da0 > EPSILON) {\n p0 *= cw ? 1 : -1\n a00 += p0\n a10 -= p0\n } else {\n da0 = 0\n a00 = a10 = (a0 + a1) / 2\n }\n da1 -= p1 * 2\n if (da1 > EPSILON) {\n p1 *= cw ? 1 : -1\n a01 += p1\n a11 -= p1\n } else {\n da1 = 0\n a01 = a11 = (a0 + a1) / 2\n }\n }\n\n const x01 = r1 * Math.cos(a01)\n const y01 = r1 * Math.sin(a01)\n const x10 = r0 * Math.cos(a10)\n const y10 = r0 * Math.sin(a10)\n const x11 = r1 * Math.cos(a11)\n const y11 = r1 * Math.sin(a11)\n const x00 = r0 * Math.cos(a00)\n const y00 = r0 * Math.sin(a00)\n\n // Restrict the corner radius for narrow sectors, where corners would overlap.\n if (rc > EPSILON && da < PI) {\n const oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)\n if (oc) {\n const ax = x01 - oc[0]\n const ay = y01 - oc[1]\n const bx = x11 - oc[0]\n const by = y11 - oc[1]\n const cos =\n (ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))\n const kc = 1 / Math.sin(acos(cos) / 2)\n const lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1])\n rc0 = Math.min(rc, (r0 - lc) / (kc - 1))\n rc1 = Math.min(rc, (r1 - lc) / (kc + 1))\n } else {\n rc0 = rc1 = 0\n }\n }\n return { a00, a01, a10, a11, da0, da1, rc, rc0, rc1, x01, y01, x10, y10, x11, y11, x00, y00 }\n}\n\n/** SVG path data of an annular sector (a pie slice when `innerRadius` is 0). */\nexport function arcPath(options: ArcOptions): string {\n const path = new ArcPath(options.precision ?? 2)\n let r0 = Math.max(0, options.innerRadius)\n let r1 = Math.max(0, options.outerRadius)\n if (r1 < r0) [r0, r1] = [r1, r0]\n const a0 = options.startAngle - HALF_PI\n const a1 = options.endAngle - HALF_PI\n const da = Math.abs(a1 - a0)\n const cw = a1 > a0\n\n if (!(r1 > EPSILON)) {\n path.moveTo(0, 0)\n } else if (da > TAU - EPSILON) {\n // A full ring (or disc).\n path.moveTo(r1 * Math.cos(a0), r1 * Math.sin(a0))\n path.arc(0, 0, r1, a0, a1, !cw)\n if (r0 > EPSILON) {\n path.moveTo(r0 * Math.cos(a1), r0 * Math.sin(a1))\n path.arc(0, 0, r0, a1, a0, cw)\n }\n } else {\n const g = sector(options, r0, r1, a0, a1, da, cw)\n const { a00, a01, a10, a11, da0, da1, rc, rc0, rc1, x01, y01, x10, y10 } = g\n\n // Outer ring.\n if (!(da1 > EPSILON)) {\n path.moveTo(x01, y01)\n } else if (rc1 > EPSILON) {\n const { x00, y00, x11, y11 } = g\n const t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw)\n const t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw)\n path.moveTo(t0.cx + t0.x01, t0.cy + t0.y01)\n if (rc1 < rc) {\n path.arc(t0.cx, t0.cy, rc1, Math.atan2(t0.y01, t0.x01), Math.atan2(t1.y01, t1.x01), !cw)\n } else {\n path.arc(t0.cx, t0.cy, rc1, Math.atan2(t0.y01, t0.x01), Math.atan2(t0.y11, t0.x11), !cw)\n path.arc(\n 0,\n 0,\n r1,\n Math.atan2(t0.cy + t0.y11, t0.cx + t0.x11),\n Math.atan2(t1.cy + t1.y11, t1.cx + t1.x11),\n !cw,\n )\n path.arc(t1.cx, t1.cy, rc1, Math.atan2(t1.y11, t1.x11), Math.atan2(t1.y01, t1.x01), !cw)\n }\n } else {\n path.moveTo(x01, y01)\n path.arc(0, 0, r1, a01, a11, !cw)\n }\n\n // Inner ring (or the center of a pie slice).\n if (!(r0 > EPSILON) || !(da0 > EPSILON)) {\n path.lineTo(x10, y10)\n } else if (rc0 > EPSILON) {\n const { x00, y00, x11, y11 } = g\n const t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw)\n const t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw)\n path.lineTo(t0.cx + t0.x01, t0.cy + t0.y01)\n if (rc0 < rc) {\n path.arc(t0.cx, t0.cy, rc0, Math.atan2(t0.y01, t0.x01), Math.atan2(t1.y01, t1.x01), !cw)\n } else {\n path.arc(t0.cx, t0.cy, rc0, Math.atan2(t0.y01, t0.x01), Math.atan2(t0.y11, t0.x11), !cw)\n path.arc(\n 0,\n 0,\n r0,\n Math.atan2(t0.cy + t0.y11, t0.cx + t0.x11),\n Math.atan2(t1.cy + t1.y11, t1.cx + t1.x11),\n cw,\n )\n path.arc(t1.cx, t1.cy, rc0, Math.atan2(t1.y11, t1.x11), Math.atan2(t1.y01, t1.x01), !cw)\n }\n } else {\n path.arc(0, 0, r0, a10, a00, cw)\n }\n }\n\n path.closePath()\n return path.d\n}\n\n/** Midpoint of an arc, e.g. to anchor a tooltip or label (like d3's `arc.centroid`). */\nexport function arcCentroid(options: ArcOptions): [number, number] {\n const r = (options.innerRadius + options.outerRadius) / 2\n const a = (options.startAngle + options.endAngle) / 2 - HALF_PI\n return [Math.cos(a) * r, Math.sin(a) * r]\n}\n\n/** Pad angle giving a constant `gap` (in pixels) between arcs of a ring. */\nexport function padAngleForGap(gap: number, innerRadius: number, outerRadius: number): number {\n const rp = Math.sqrt(innerRadius * innerRadius + outerRadius * outerRadius)\n return rp > 0 ? 2 * Math.asin(Math.min(1, gap / 2 / rp)) : 0\n}\n\n/** Angle of a point around the origin. */\nconst angleOf = (x: number, y: number): number => Math.atan2(y, x)\n\n/**\n * The same sector as {@link arcPath}, drawn with a fixed command structure:\n * every corner is always present (zero length when there is none) and each\n * ring is split into two half arcs, so the large-arc flag never flips.\n * Paths of different angles therefore keep their commands while an arc is\n * redrawn frame by frame, turning to its new angles (see `sweep`).\n */\nexport function arcPathStable(options: ArcOptions): string {\n const k = 10 ** Math.max(0, Math.min(12, Math.floor(options.precision ?? 2)))\n const n = (v: number): string => {\n const r = Math.round(v * k) / k\n return String(r === 0 ? 0 : r)\n }\n let d = ''\n const move = (x: number, y: number) => {\n d += `M${n(x)},${n(y)}`\n }\n const line = (x: number, y: number) => {\n d += `L${n(x)},${n(y)}`\n }\n const arc = (r: number, sweep: 0 | 1, x: number, y: number) => {\n d += `A${n(r)},${n(r)},0,0,${sweep},${n(x)},${n(y)}`\n }\n /** Two half arcs of radius `r` around the origin from angle `a0` to `a1`. */\n const ring = (r: number, a0: number, a1: number, ccw: boolean) => {\n let delta = ccw ? a0 - a1 : a1 - a0\n delta = ((delta % TAU) + TAU) % TAU\n if (delta < EPSILON && Math.abs(a1 - a0) > EPSILON) delta = TAU\n const mid = ccw ? a0 - delta / 2 : a0 + delta / 2\n const sweep: 0 | 1 = ccw ? 0 : 1\n arc(r, sweep, r * Math.cos(mid), r * Math.sin(mid))\n arc(r, sweep, r * Math.cos(a1), r * Math.sin(a1))\n }\n\n let r0 = Math.max(0, options.innerRadius)\n let r1 = Math.max(0, options.outerRadius)\n if (r1 < r0) [r0, r1] = [r1, r0]\n const a0 = options.startAngle - HALF_PI\n const a1 = options.endAngle - HALF_PI\n const da = Math.abs(a1 - a0)\n const cw = a1 > a0\n const outerSweep: 0 | 1 = cw ? 1 : 0\n\n if (!(r1 > EPSILON)) {\n // A point: eleven no-op commands at the origin.\n move(0, 0)\n for (let i = 0; i < 4; i++) arc(0, outerSweep, 0, 0)\n line(0, 0)\n for (let i = 0; i < 4; i++) arc(0, outerSweep, 0, 0)\n return `${d}Z`\n }\n\n if (da > TAU - EPSILON) {\n // A full ring (or disc): the seam between the two rings closes the path.\n const ox = r1 * Math.cos(a0)\n const oy = r1 * Math.sin(a0)\n move(ox, oy)\n arc(r1, outerSweep, ox, oy)\n ring(r1, a0, a0 + (cw ? TAU : -TAU) * (1 - 1e-9), !cw)\n arc(r1, outerSweep, ox, oy)\n const ix = r0 * Math.cos(a0)\n const iy = r0 * Math.sin(a0)\n line(ix, iy)\n arc(r0, outerSweep, ix, iy)\n if (r0 > EPSILON) ring(r0, a0, a0 + (cw ? -TAU : TAU) * (1 - 1e-9), cw)\n else for (let i = 0; i < 2; i++) arc(0, outerSweep, 0, 0)\n arc(r0, outerSweep, ix, iy)\n return `${d}Z`\n }\n\n const { a00, a01, a10, a11, da0, da1, rc, rc0, rc1, x01, y01, x10, y10, x11, y11, x00, y00 } =\n sector(options, r0, r1, a0, a1, da, cw)\n\n // Outer edge: corner, two ring halves, corner.\n if (da1 > EPSILON && rc1 > EPSILON) {\n const t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw)\n const t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw)\n move(t0.cx + t0.x01, t0.cy + t0.y01)\n if (rc1 < rc) {\n // Corners merged: one corner arc covers the edge, the rest is empty.\n const ex = t1.cx + t1.x01\n const ey = t1.cy + t1.y01\n arc(rc1, outerSweep, ex, ey)\n arc(r1, outerSweep, ex, ey)\n arc(r1, outerSweep, ex, ey)\n arc(rc1, outerSweep, ex, ey)\n } else {\n arc(rc1, outerSweep, t0.cx + t0.x11, t0.cy + t0.y11)\n ring(\n r1,\n angleOf(t0.cx + t0.x11, t0.cy + t0.y11),\n angleOf(t1.cx + t1.x11, t1.cy + t1.y11),\n !cw,\n )\n arc(rc1, outerSweep, t1.cx + t1.x01, t1.cy + t1.y01)\n }\n } else {\n move(x01, y01)\n arc(r1, outerSweep, x01, y01)\n if (da1 > EPSILON) ring(r1, a01, a11, !cw)\n else for (let i = 0; i < 2; i++) arc(r1, outerSweep, x01, y01)\n arc(r1, outerSweep, x11, y11)\n }\n\n // Inner edge (or the center of a pie slice): corner, two ring halves, corner.\n if (!(r0 > EPSILON) || !(da0 > EPSILON)) {\n line(x10, y10)\n for (let i = 0; i < 4; i++) arc(r0, outerSweep, x10, y10)\n } else if (rc0 > EPSILON) {\n const t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw)\n const t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw)\n line(t0.cx + t0.x01, t0.cy + t0.y01)\n if (rc0 < rc) {\n const ex = t1.cx + t1.x01\n const ey = t1.cy + t1.y01\n arc(rc0, outerSweep, ex, ey)\n arc(r0, outerSweep, ex, ey)\n arc(r0, outerSweep, ex, ey)\n arc(rc0, outerSweep, ex, ey)\n } else {\n arc(rc0, outerSweep, t0.cx + t0.x11, t0.cy + t0.y11)\n ring(r0, angleOf(t0.cx + t0.x11, t0.cy + t0.y11), angleOf(t1.cx + t1.x11, t1.cy + t1.y11), cw)\n arc(rc0, outerSweep, t1.cx + t1.x01, t1.cy + t1.y01)\n }\n } else {\n line(x10, y10)\n arc(r0, outerSweep, x10, y10)\n ring(r0, a10, a00, cw)\n arc(r0, outerSweep, x00, y00)\n }\n return `${d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G,GAAG,GAAG,EAAE;GAC7F,IAAI,KAAK,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,GAAG;EACrD;CACF,OAAO;EACL,KAAK,KAAK,GAAG;EACb,IAAI,IAAI,YAAY,KAAK,GAAG;EAC5B,KAAK,IAAI,KAAK,KAAK,EAAE;EACrB,IAAI,IAAI,YAAY,KAAK,GAAG;CAC9B;CACA,OAAO,GAAG,EAAE;AACd"}
@@ -1,7 +1,7 @@
1
- import { m as seriesTable, p as seriesLegend } from "./cartesian-Cr0AF0nG.js";
2
- import { r as cleanSeries, t as cleanData } from "./clean-o1vDEhFV.js";
3
- import { n as renderLines } from "./line-B3Ed6u7j.js";
4
- //#region src/charts/area.ts
1
+ import { m as seriesTable, p as seriesLegend } from "./cartesian-CI2x6N7N.js";
2
+ import { r as cleanSeries, t as cleanData } from "./clean-CkoQobGv.js";
3
+ import { n as renderLines } from "./line-DO66LtwH.js";
4
+ // src/charts/area.ts
5
5
  /**
6
6
  * Area chart: filled lines over category labels, with zero in the y domain
7
7
  * by default and a vertical fade (`fill: 'gradient'`).
@@ -20,7 +20,6 @@ const area = {
20
20
  legend: (options) => seriesLegend(options.data),
21
21
  table: (options, ctx, limit) => seriesTable(options, ctx, limit)
22
22
  };
23
- //#endregion
24
23
  export { area as t };
25
24
 
26
- //# sourceMappingURL=area-DQsLERhx.js.map
25
+ //# sourceMappingURL=area-0-L1bG9B.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"area-DQsLERhx.js","names":[],"sources":["../src/charts/area.ts"],"sourcesContent":["import type { ChartType } from '../chart.ts'\nimport { seriesLegend, seriesTable } from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { type LineOptions, renderLines } from './line.ts'\n\n/** Options of the area chart: line options with the fill always on. */\nexport type AreaOptions = Omit<LineOptions, 'area'>\n\n/**\n * Area chart: filled lines over category labels, with zero in the y domain\n * by default and a vertical fade (`fill: 'gradient'`).\n *\n * ```ts\n * new Chart('#el', {\n * type: area,\n * data: { labels: ['Jan', 'Feb', 'Mar'], series: [{ name: 'Sales', values: [3, 5, 4] }] },\n * })\n * ```\n */\nexport const area: ChartType<AreaOptions> = {\n name: 'area',\n clean: cleanData(cleanSeries),\n render: (options, ctx) => renderLines(options, ctx, true),\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAa,OAA+B;CAC1C,MAAM;CACN,OAAO,UAAU,WAAW;CAC5B,SAAS,SAAS,QAAQ,YAAY,SAAS,KAAK,IAAI;CACxD,SAAS,YAAY,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UAAU,YAAY,SAAS,KAAK,KAAK;AACjE"}
1
+ {"version":3,"file":"area-0-L1bG9B.js","names":[],"sources":["../src/charts/area.ts"],"sourcesContent":["import type { ChartType } from '../chart.ts'\nimport { seriesLegend, seriesTable } from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { type LineOptions, renderLines } from './line.ts'\n\n/** Options of the area chart: line options with the fill always on. */\nexport type AreaOptions = Omit<LineOptions, 'area'>\n\n/**\n * Area chart: filled lines over category labels, with zero in the y domain\n * by default and a vertical fade (`fill: 'gradient'`).\n *\n * ```ts\n * new Chart('#el', {\n * type: area,\n * data: { labels: ['Jan', 'Feb', 'Mar'], series: [{ name: 'Sales', values: [3, 5, 4] }] },\n * })\n * ```\n */\nexport const area: ChartType<AreaOptions> = {\n name: 'area',\n clean: cleanData(cleanSeries),\n render: (options, ctx) => renderLines(options, ctx, true),\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAa,OAA+B;CAC1C,MAAM;CACN,OAAO,UAAU,WAAW;CAC5B,SAAS,SAAS,QAAQ,YAAY,SAAS,KAAK,IAAI;CACxD,SAAS,YAAY,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UAAU,YAAY,SAAS,KAAK,KAAK;AACjE"}
@@ -1,7 +1,7 @@
1
- const require_cartesian = require("./cartesian-BoDfgBCV.cjs");
2
- const require_clean = require("./clean-Byl6kzf0.cjs");
3
- const require_line = require("./line-fQbtP_jL.cjs");
4
- //#region src/charts/area.ts
1
+ const require_cartesian = require("./cartesian-DV02PsBe.cjs");
2
+ const require_clean = require("./clean-Die2iCNc.cjs");
3
+ const require_line = require("./line-Dbt6KFRK.cjs");
4
+ // src/charts/area.ts
5
5
  /**
6
6
  * Area chart: filled lines over category labels, with zero in the y domain
7
7
  * by default and a vertical fade (`fill: 'gradient'`).
@@ -20,7 +20,6 @@ const area = {
20
20
  legend: (options) => require_cartesian.seriesLegend(options.data),
21
21
  table: (options, ctx, limit) => require_cartesian.seriesTable(options, ctx, limit)
22
22
  };
23
- //#endregion
24
23
  Object.defineProperty(exports, "area", {
25
24
  enumerable: true,
26
25
  get: function() {
@@ -28,4 +27,4 @@ Object.defineProperty(exports, "area", {
28
27
  }
29
28
  });
30
29
 
31
- //# sourceMappingURL=area-sHCE3pg5.cjs.map
30
+ //# sourceMappingURL=area-4eRs3c0K.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"area-sHCE3pg5.cjs","names":["cleanData","cleanSeries","renderLines","seriesLegend","seriesTable"],"sources":["../src/charts/area.ts"],"sourcesContent":["import type { ChartType } from '../chart.ts'\nimport { seriesLegend, seriesTable } from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { type LineOptions, renderLines } from './line.ts'\n\n/** Options of the area chart: line options with the fill always on. */\nexport type AreaOptions = Omit<LineOptions, 'area'>\n\n/**\n * Area chart: filled lines over category labels, with zero in the y domain\n * by default and a vertical fade (`fill: 'gradient'`).\n *\n * ```ts\n * new Chart('#el', {\n * type: area,\n * data: { labels: ['Jan', 'Feb', 'Mar'], series: [{ name: 'Sales', values: [3, 5, 4] }] },\n * })\n * ```\n */\nexport const area: ChartType<AreaOptions> = {\n name: 'area',\n clean: cleanData(cleanSeries),\n render: (options, ctx) => renderLines(options, ctx, true),\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAa,OAA+B;CAC1C,MAAM;CACN,OAAOA,cAAAA,UAAUC,cAAAA,WAAW;CAC5B,SAAS,SAAS,QAAQC,aAAAA,YAAY,SAAS,KAAK,IAAI;CACxD,SAAS,YAAYC,kBAAAA,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UAAUC,kBAAAA,YAAY,SAAS,KAAK,KAAK;AACjE"}
1
+ {"version":3,"file":"area-4eRs3c0K.cjs","names":["cleanData","cleanSeries","renderLines","seriesLegend","seriesTable"],"sources":["../src/charts/area.ts"],"sourcesContent":["import type { ChartType } from '../chart.ts'\nimport { seriesLegend, seriesTable } from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { type LineOptions, renderLines } from './line.ts'\n\n/** Options of the area chart: line options with the fill always on. */\nexport type AreaOptions = Omit<LineOptions, 'area'>\n\n/**\n * Area chart: filled lines over category labels, with zero in the y domain\n * by default and a vertical fade (`fill: 'gradient'`).\n *\n * ```ts\n * new Chart('#el', {\n * type: area,\n * data: { labels: ['Jan', 'Feb', 'Mar'], series: [{ name: 'Sales', values: [3, 5, 4] }] },\n * })\n * ```\n */\nexport const area: ChartType<AreaOptions> = {\n name: 'area',\n clean: cleanData(cleanSeries),\n render: (options, ctx) => renderLines(options, ctx, true),\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAa,OAA+B;CAC1C,MAAM;CACN,OAAOA,cAAAA,UAAUC,cAAAA,WAAW;CAC5B,SAAS,SAAS,QAAQC,aAAAA,YAAY,SAAS,KAAK,IAAI;CACxD,SAAS,YAAYC,kBAAAA,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UAAUC,kBAAAA,YAAY,SAAS,KAAK,KAAK;AACjE"}
@@ -1,6 +1,5 @@
1
- import { a as ChartType } from "./chart-iJGxMz9z.js";
2
- import { t as LineOptions } from "./line-D5kb8e6w.js";
3
- //#region src/charts/area.d.ts
1
+ import { a as ChartType } from "./chart-kqFMEwDo.cjs";
2
+ import { t as LineOptions } from "./line-_rNdeKmS.cjs";
4
3
  /** Options of the area chart: line options with the fill always on. */
5
4
  type AreaOptions = Omit<LineOptions, "area">;
6
5
  /**
@@ -15,6 +14,4 @@ type AreaOptions = Omit<LineOptions, "area">;
15
14
  * ```
16
15
  */
17
16
  declare const area: ChartType<AreaOptions>;
18
- //#endregion
19
- export { area as n, AreaOptions as t };
20
- //# sourceMappingURL=area-DaO4MQl4.d.ts.map
17
+ export { area as n, AreaOptions as t };
@@ -1,6 +1,5 @@
1
- import { a as ChartType } from "./chart-Qa417fJo.cjs";
2
- import { t as LineOptions } from "./line-CMDGH6q5.cjs";
3
- //#region src/charts/area.d.ts
1
+ import { a as ChartType } from "./chart-QilhWP8Z.js";
2
+ import { t as LineOptions } from "./line-DtSh7HQU.js";
4
3
  /** Options of the area chart: line options with the fill always on. */
5
4
  type AreaOptions = Omit<LineOptions, "area">;
6
5
  /**
@@ -15,6 +14,4 @@ type AreaOptions = Omit<LineOptions, "area">;
15
14
  * ```
16
15
  */
17
16
  declare const area: ChartType<AreaOptions>;
18
- //#endregion
19
- export { area as n, AreaOptions as t };
20
- //# sourceMappingURL=area-BFvkc-ZM.d.cts.map
17
+ export { area as n, AreaOptions as t };
package/dist/area.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_area = require("./area-sHCE3pg5.cjs");
2
+ const require_area = require("./area-4eRs3c0K.cjs");
3
3
  exports.area = require_area.area;
package/dist/area.d.cts CHANGED
@@ -1,2 +1,3 @@
1
- import { n as area, t as AreaOptions } from "./area-BFvkc-ZM.cjs";
1
+ /** Standalone entry: `import { area } from '@tabler/charts/area'`. */
2
+ import { n as area, t as AreaOptions } from "./area-CJX9219z.cjs";
2
3
  export { type AreaOptions, area };
package/dist/area.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- import { n as area, t as AreaOptions } from "./area-DaO4MQl4.js";
1
+ /** Standalone entry: `import { area } from '@tabler/charts/area'`. */
2
+ import { n as area, t as AreaOptions } from "./area-d11XePuw.js";
2
3
  export { type AreaOptions, area };
package/dist/area.js CHANGED
@@ -1,2 +1 @@
1
- import { t as area } from "./area-DQsLERhx.js";
2
- export { area };
1
+ export { t as area } from "./area-0-L1bG9B.js";
@@ -1,4 +1,3 @@
1
- //#region src/scales/band.d.ts
2
1
  /** Category identifier used by band and point scales. */
3
2
  type BandKey = string | number;
4
3
  interface BandScaleOptions {
@@ -45,6 +44,4 @@ declare function point(domain: readonly BandKey[], range: readonly [number, numb
45
44
  padding?: number;
46
45
  align?: number;
47
46
  }): BandScale;
48
- //#endregion
49
- export { point as a, band as i, BandScale as n, BandScaleOptions as r, BandKey as t };
50
- //# sourceMappingURL=band-DTcNDAFO.d.ts.map
47
+ export { point as a, band as i, BandScale as n, BandScaleOptions as r, BandKey as t };
@@ -1,4 +1,3 @@
1
- //#region src/scales/band.d.ts
2
1
  /** Category identifier used by band and point scales. */
3
2
  type BandKey = string | number;
4
3
  interface BandScaleOptions {
@@ -45,6 +44,4 @@ declare function point(domain: readonly BandKey[], range: readonly [number, numb
45
44
  padding?: number;
46
45
  align?: number;
47
46
  }): BandScale;
48
- //#endregion
49
- export { point as a, band as i, BandScale as n, BandScaleOptions as r, BandKey as t };
50
- //# sourceMappingURL=band-DTcNDAFO.d.cts.map
47
+ export { point as a, band as i, BandScale as n, BandScaleOptions as r, BandKey as t };
@@ -1,5 +1,5 @@
1
- import { a as round$1 } from "./layout-B3hiqVEw.js";
2
- //#region src/shapes/bar.ts
1
+ import { o as round$1 } from "./layout-DmrrLjwN.js";
2
+ // src/shapes/bar.ts
3
3
  /** Rounded for path data, without a `-0`. */
4
4
  const round = (value) => {
5
5
  const rounded = round$1(value);
@@ -50,7 +50,6 @@ function hbarPath(y, height, baseline, value, radius = 0) {
50
50
  const rr = round(r);
51
51
  return `M${b},${y0}L${edge},${y0}A${rr},${rr},0,0,${sweep},${v},${round(y + r)}L${v},${round(y + hgt - r)}A${rr},${rr},0,0,${sweep},${edge},${y1}L${b},${y1}Z`;
52
52
  }
53
- //#endregion
54
53
  export { hbarPath as n, barPath as t };
55
54
 
56
- //# sourceMappingURL=bar-DM16NUvV.js.map
55
+ //# sourceMappingURL=bar-B5n2oq9-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bar-DM16NUvV.js","names":["to2"],"sources":["../src/shapes/bar.ts"],"sourcesContent":["import { round as to2 } from '../layout.ts'\n\n/** Rounded for path data, without a `-0`. */\nconst round = (value: number): number => {\n const rounded = to2(value)\n return rounded === 0 ? 0 : rounded\n}\n\n/**\n * Path of a vertical bar from `baseline` to `value` (both y in pixels),\n * `x`…`x + width` wide. Only the data end is rounded, with `radius` clamped\n * to half the width and to the bar height; the baseline end stays square.\n * Works for bars growing up (value above baseline) and down (negative values).\n * Square corners are zero-radius arcs and every side is an `L`, so every\n * bar path, vertical or horizontal, has the same commands and CSS can\n * transition `d` between rounded and square (stacking) and between\n * orientations.\n */\nexport function barPath(\n x: number,\n width: number,\n baseline: number,\n value: number,\n radius = 0,\n): string {\n const w = Math.max(0, width)\n const height = Math.abs(baseline - value)\n const r = Math.max(0, Math.min(radius, w / 2, height))\n const x0 = round(x)\n const x1 = round(x + w)\n const b = round(baseline)\n const v = round(value)\n\n const up = value <= baseline\n const edge = round(up ? value + r : value - r)\n const sweep = up ? 1 : 0\n const rr = round(r)\n return (\n `M${x0},${b}L${x0},${edge}` +\n `A${rr},${rr},0,0,${sweep},${round(x + r)},${v}` +\n `L${round(x + w - r)},${v}` +\n `A${rr},${rr},0,0,${sweep},${x1},${edge}` +\n `L${x1},${b}Z`\n )\n}\n\n/**\n * Path of a horizontal bar from `baseline` to `value` (both x in pixels),\n * `y`…`y + height` tall. Only the data end is rounded, with `radius` clamped\n * to half the height and to the bar length; the baseline end stays square.\n * Works for bars growing right (positive values) and left (negative values).\n * Same commands as `barPath`, so a chart can morph between orientations.\n */\nexport function hbarPath(\n y: number,\n height: number,\n baseline: number,\n value: number,\n radius = 0,\n): string {\n const hgt = Math.max(0, height)\n const length = Math.abs(value - baseline)\n const r = Math.max(0, Math.min(radius, hgt / 2, length))\n const y0 = round(y)\n const y1 = round(y + hgt)\n const b = round(baseline)\n const v = round(value)\n\n const right = value >= baseline\n const edge = round(right ? value - r : value + r)\n const sweep = right ? 1 : 0\n const rr = round(r)\n return (\n `M${b},${y0}L${edge},${y0}` +\n `A${rr},${rr},0,0,${sweep},${v},${round(y + r)}` +\n `L${v},${round(y + hgt - r)}` +\n `A${rr},${rr},0,0,${sweep},${edge},${y1}` +\n `L${b},${y1}Z`\n )\n}\n"],"mappings":";;;AAGA,MAAM,SAAS,UAA0B;CACvC,MAAM,UAAUA,QAAI,KAAK;CACzB,OAAO,YAAY,IAAI,IAAI;AAC7B;;;;;;;;;;;AAYA,SAAgB,QACd,GACA,OACA,UACA,OACA,SAAS,GACD;CACR,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK;CAC3B,MAAM,SAAS,KAAK,IAAI,WAAW,KAAK;CACxC,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,QAAQ,IAAI,GAAG,MAAM,CAAC;CACrD,MAAM,KAAK,MAAM,CAAC;CAClB,MAAM,KAAK,MAAM,IAAI,CAAC;CACtB,MAAM,IAAI,MAAM,QAAQ;CACxB,MAAM,IAAI,MAAM,KAAK;CAErB,MAAM,KAAK,SAAS;CACpB,MAAM,OAAO,MAAM,KAAK,QAAQ,IAAI,QAAQ,CAAC;CAC7C,MAAM,QAAQ,KAAK,IAAI;CACvB,MAAM,KAAK,MAAM,CAAC;CAClB,OACE,IAAI,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,KAAA,GACjB,GAAG,GAAG,GAAG,OAAO,MAAM,GAAG,MAAM,IAAI,CAAC,EAAE,GAAG,EAAA,GACzC,MAAM,IAAI,IAAI,CAAC,EAAE,GAAG,EAAA,GACpB,GAAG,GAAG,GAAG,OAAO,MAAM,GAAG,GAAG,GAAG,KAAA,GAC/B,GAAG,GAAG,EAAE;AAEhB;;;;;;;;AASA,SAAgB,SACd,GACA,QACA,UACA,OACA,SAAS,GACD;CACR,MAAM,MAAM,KAAK,IAAI,GAAG,MAAM;CAC9B,MAAM,SAAS,KAAK,IAAI,QAAQ,QAAQ;CACxC,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,QAAQ,MAAM,GAAG,MAAM,CAAC;CACvD,MAAM,KAAK,MAAM,CAAC;CAClB,MAAM,KAAK,MAAM,IAAI,GAAG;CACxB,MAAM,IAAI,MAAM,QAAQ;CACxB,MAAM,IAAI,MAAM,KAAK;CAErB,MAAM,QAAQ,SAAS;CACvB,MAAM,OAAO,MAAM,QAAQ,QAAQ,IAAI,QAAQ,CAAC;CAChD,MAAM,QAAQ,QAAQ,IAAI;CAC1B,MAAM,KAAK,MAAM,CAAC;CAClB,OACE,IAAI,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,GAAA,GACnB,GAAG,GAAG,GAAG,OAAO,MAAM,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,EAAA,GACzC,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,EAAA,GACtB,GAAG,GAAG,GAAG,OAAO,MAAM,GAAG,KAAK,GAAG,GAAA,GACjC,EAAE,GAAG,GAAG;AAEhB"}
1
+ {"version":3,"file":"bar-B5n2oq9-.js","names":["to2"],"sources":["../src/shapes/bar.ts"],"sourcesContent":["import { round as to2 } from '../layout.ts'\n\n/** Rounded for path data, without a `-0`. */\nconst round = (value: number): number => {\n const rounded = to2(value)\n return rounded === 0 ? 0 : rounded\n}\n\n/**\n * Path of a vertical bar from `baseline` to `value` (both y in pixels),\n * `x`…`x + width` wide. Only the data end is rounded, with `radius` clamped\n * to half the width and to the bar height; the baseline end stays square.\n * Works for bars growing up (value above baseline) and down (negative values).\n * Square corners are zero-radius arcs and every side is an `L`, so every\n * bar path, vertical or horizontal, has the same commands and CSS can\n * transition `d` between rounded and square (stacking) and between\n * orientations.\n */\nexport function barPath(\n x: number,\n width: number,\n baseline: number,\n value: number,\n radius = 0,\n): string {\n const w = Math.max(0, width)\n const height = Math.abs(baseline - value)\n const r = Math.max(0, Math.min(radius, w / 2, height))\n const x0 = round(x)\n const x1 = round(x + w)\n const b = round(baseline)\n const v = round(value)\n\n const up = value <= baseline\n const edge = round(up ? value + r : value - r)\n const sweep = up ? 1 : 0\n const rr = round(r)\n return (\n `M${x0},${b}L${x0},${edge}` +\n `A${rr},${rr},0,0,${sweep},${round(x + r)},${v}` +\n `L${round(x + w - r)},${v}` +\n `A${rr},${rr},0,0,${sweep},${x1},${edge}` +\n `L${x1},${b}Z`\n )\n}\n\n/**\n * Path of a horizontal bar from `baseline` to `value` (both x in pixels),\n * `y`…`y + height` tall. Only the data end is rounded, with `radius` clamped\n * to half the height and to the bar length; the baseline end stays square.\n * Works for bars growing right (positive values) and left (negative values).\n * Same commands as `barPath`, so a chart can morph between orientations.\n */\nexport function hbarPath(\n y: number,\n height: number,\n baseline: number,\n value: number,\n radius = 0,\n): string {\n const hgt = Math.max(0, height)\n const length = Math.abs(value - baseline)\n const r = Math.max(0, Math.min(radius, hgt / 2, length))\n const y0 = round(y)\n const y1 = round(y + hgt)\n const b = round(baseline)\n const v = round(value)\n\n const right = value >= baseline\n const edge = round(right ? value - r : value + r)\n const sweep = right ? 1 : 0\n const rr = round(r)\n return (\n `M${b},${y0}L${edge},${y0}` +\n `A${rr},${rr},0,0,${sweep},${v},${round(y + r)}` +\n `L${v},${round(y + hgt - r)}` +\n `A${rr},${rr},0,0,${sweep},${edge},${y1}` +\n `L${b},${y1}Z`\n )\n}\n"],"mappings":";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AQ,SAAS;CACvB,MAAM,OAAO,MAAM,QAAQ,QAAQ,IAAI,QAAQ,CAAC;CAChD,MAAM,QAAQ,QAAQ,IAAI;CAC1B,MAAM,KAAK,MAAM,CAAC;CAClB,OACE,IAAI,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,GAAA,GACnB,GAAG,GAAG,GAAG,OAAO,MAAM,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,EAAA,GACzC,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,EAAA,GACtB,GAAG,GAAG,GAAG,OAAO,MAAM,GAAG,KAAK,GAAG,GAAA,GACjC,EAAE,GAAG,GAAG;AAEhB"}
@@ -1,7 +1,6 @@
1
- import { $ as CartesianOptions, a as ChartType } from "./chart-iJGxMz9z.js";
2
- import { t as Curve } from "./path-CwB28da0.js";
3
- import { t as StackMode } from "./stack-CpR6RGKd.js";
4
- //#region src/charts/bar.d.ts
1
+ import { a as ChartType, rt as CartesianOptions } from "./chart-kqFMEwDo.cjs";
2
+ import { t as Curve } from "./path-YeUiOfG8.cjs";
3
+ import { t as StackMode } from "./stack-Dagxq7l2.cjs";
5
4
  interface BarOptions extends CartesianOptions {
6
5
  /** Corner radius of the data end of each bar (or stack). Defaults to `4`. */
7
6
  radius?: number;
@@ -38,6 +37,4 @@ interface BarOptions extends CartesianOptions {
38
37
  * ```
39
38
  */
40
39
  declare const bar: ChartType<BarOptions>;
41
- //#endregion
42
- export { bar as n, BarOptions as t };
43
- //# sourceMappingURL=bar-DdsDxk3W.d.ts.map
40
+ export { bar as n, BarOptions as t };
@@ -1,11 +1,11 @@
1
- import { i as insets, n as estimateTextWidth, r as innerRect } from "./layout-B3hiqVEw.js";
2
- import { t as h } from "./vnode-tCWItoUH.js";
3
- import { E as bandTicks, O as thinTicks, T as axisSize, _ as valueAxis, a as labelFormatter, d as seriesAttrs, f as seriesKey, i as finishLayout, l as plottable, m as seriesTable, n as categoryInteraction, o as labelKey, p as seriesLegend, t as cartesianLayout, u as resolveLabels, x as band } from "./cartesian-Cr0AF0nG.js";
4
- import { n as feature } from "./features-wASyHGic.js";
5
- import { r as cleanSeries, t as cleanData } from "./clean-o1vDEhFV.js";
6
- import { n as stackSeries, t as stackBounds } from "./stack-DRbwTeF3.js";
7
- import { n as hbarPath, t as barPath } from "./bar-DM16NUvV.js";
8
- //#region src/charts/horizontal.ts
1
+ import { n as feature } from "./features-BMxkqCyS.js";
2
+ import { n as hbarPath, t as barPath } from "./bar-B5n2oq9-.js";
3
+ import { t as h } from "./vnode-_EMUqysL.js";
4
+ import { E as bandTicks, O as thinTicks, T as axisSize, _ as valueAxis, a as labelFormatter, d as seriesAttrs, f as seriesKey, i as finishLayout, l as plottable, m as seriesTable, n as categoryInteraction, o as labelKey, p as seriesLegend, t as cartesianLayout, u as resolveLabels, x as band } from "./cartesian-CI2x6N7N.js";
5
+ import { r as cleanSeries, t as cleanData } from "./clean-CkoQobGv.js";
6
+ import { a as mirrorSides, i as insets, n as estimateTextWidth, r as innerRect } from "./layout-DmrrLjwN.js";
7
+ import { n as stackSeries, t as stackBounds } from "./stack-2H2Gfs1Q.js";
8
+ // src/charts/horizontal.ts
9
9
  /**
10
10
  * Cartesian layout with categories along y (labels on the left) and values
11
11
  * along x (labels at the bottom), for horizontal bars. Only bar charts use
@@ -14,9 +14,9 @@ import { n as hbarPath, t as barPath } from "./bar-DM16NUvV.js";
14
14
  function horizontalLayout(options, ctx, layout) {
15
15
  const yOptions = options.y ?? {};
16
16
  const xOptions = options.x ?? {};
17
- const { fontSize, width, height } = ctx;
17
+ const { fontSize, width, height, rtl } = ctx;
18
18
  const overhang = layout.overhang ?? 0;
19
- const pad = insets(options.padding);
19
+ const pad = mirrorSides(insets(options.padding), rtl);
20
20
  const labels = resolveLabels(options.data);
21
21
  const format = labelFormatter(options, ctx);
22
22
  const value = valueAxis(options, ctx, layout, Math.round(width / 80));
@@ -29,19 +29,20 @@ function horizontalLayout(options, ctx, layout) {
29
29
  label: format(label, i)
30
30
  }));
31
31
  const edgeLabel = (tick) => showValues && tick ? Math.ceil(estimateTextWidth(tick.label, fontSize) / 2) : 0;
32
- const margins = {
32
+ const margins = mirrorSides({
33
33
  top: pad.top + Math.max(overhang, 4),
34
34
  right: pad.right + Math.max(edgeLabel(probeValues[probeValues.length - 1]), overhang, 8),
35
35
  bottom: pad.bottom + Math.max(showValues ? axisSize("bottom", probeValues, fontSize) : 0, overhang, 4),
36
36
  left: pad.left + Math.max(showCategories ? axisSize("left", probeCategories, fontSize) : 0, edgeLabel(probeValues[0]), overhang, 8)
37
- };
37
+ }, rtl);
38
38
  const area = innerRect(width, height, margins);
39
39
  const keys = labels.map(labelKey);
40
40
  const x = band(keys, [area.y, area.y + area.height], {
41
41
  paddingInner: layout.paddingInner ?? .3,
42
42
  paddingOuter: layout.paddingOuter ?? .15
43
43
  });
44
- const y = value.scale([area.x, area.x + area.width]);
44
+ const end = area.x + area.width;
45
+ const y = value.scale(rtl ? [end, area.x] : [area.x, end]);
45
46
  const yTicks = thinTicks(value.ticks(y), "bottom", fontSize);
46
47
  const xTicks = showCategories ? thinTicks(bandTicks(x, (_, i) => format(labels[i], i)), "left", fontSize) : [];
47
48
  return finishLayout(options, ctx, overhang, {
@@ -54,8 +55,7 @@ function horizontalLayout(options, ctx, layout) {
54
55
  yTicks
55
56
  }, keys);
56
57
  }
57
- //#endregion
58
- //#region src/charts/bar.ts
58
+ // src/charts/bar.ts
59
59
  /**
60
60
  * Bar chart: vertical bars per category, grouped side by side or stacked,
61
61
  * growing from zero (negative values grow down).
@@ -102,7 +102,8 @@ const bar = {
102
102
  const barWidth = Math.max(0, Math.min(maxBarWidth, (x.bandwidth - (stacks ? 0 : gap * (columns - 1))) / columns));
103
103
  const groupWidth = barWidth * columns + (stacks ? 0 : gap * (columns - 1));
104
104
  const offset = (x.bandwidth - groupWidth) / 2;
105
- const barLeft = (seriesIndex, i) => x.at(i) + offset + (stacks ? 0 : (slots.get(seriesIndex) ?? 0) * (barWidth + gap));
105
+ const slotAt = (slot) => x.range[1] < x.range[0] ? columns - 1 - slot : slot;
106
+ const barLeft = (seriesIndex, i) => x.at(i) + offset + (stacks ? 0 : slotAt(slots.get(seriesIndex) ?? 0) * (barWidth + gap));
106
107
  /** Data extent of a bar: from zero to the value, or its stacked segment. */
107
108
  const segment = (seriesIndex, i) => {
108
109
  if (stacks) return stacks[seriesIndex]?.[i] ?? null;
@@ -177,14 +178,14 @@ const bar = {
177
178
  });
178
179
  }
179
180
  const slot = Math.floor((across - (x.at(i) + offset) + gap / 2) / (barWidth + gap));
180
- const seriesIndex = order[slot];
181
+ const seriesIndex = order[slotAt(slot)];
181
182
  return seriesIndex !== void 0 && segment(seriesIndex, i) ? seriesIndex : void 0;
182
183
  }));
183
184
  const groups = series.map((s, index) => slots.has(index) && h("g", seriesAttrs(s, index), labels.map((label, i) => {
184
185
  const seg = segment(index, i);
185
186
  if (!seg) return null;
186
187
  const negative = seg.y1 < seg.y0;
187
- const away = (negative ? 1 : -1) * (horizontal ? -1 : 1);
188
+ const away = Math.sign(y(seg.y1) - y(seg.y0));
188
189
  const inner = seg.y0 === 0 ? 0 : away * gap;
189
190
  const rounded = !stacks || (negative ? outer[i]?.down : outer[i]?.up) === index;
190
191
  const draw = horizontal ? hbarPath : barPath;
@@ -232,7 +233,6 @@ const bar = {
232
233
  legend: (options) => seriesLegend(options.data),
233
234
  table: (options, ctx, limit) => seriesTable(options, ctx, limit)
234
235
  };
235
- //#endregion
236
236
  export { bar as t };
237
237
 
238
- //# sourceMappingURL=bar-jZEoao74.js.map
238
+ //# sourceMappingURL=bar-BNZ3GhIw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar-BNZ3GhIw.js","names":[],"sources":["../src/charts/horizontal.ts","../src/charts/bar.ts"],"sourcesContent":["import type { RenderContext } from '../chart.ts'\nimport { axisSize, bandTicks, type Tick, thinTicks } from '../components/axis.ts'\nimport { estimateTextWidth, innerRect, insets, mirrorSides } from '../layout.ts'\nimport { type BandKey, band } from '../scales/band.ts'\nimport {\n type CartesianLayout,\n type CartesianLayoutOptions,\n type CartesianOptions,\n EDGE,\n finishLayout,\n type Label,\n labelFormatter,\n labelKey,\n resolveLabels,\n TICK_SPACING_X,\n valueAxis,\n} from './cartesian.ts'\n\n/**\n * Cartesian layout with categories along y (labels on the left) and values\n * along x (labels at the bottom), for horizontal bars. Only bar charts use\n * it, so it lives outside `cartesianLayout()` and stays out of other bundles.\n */\nexport function horizontalLayout(\n options: CartesianOptions,\n ctx: RenderContext,\n layout: CartesianLayoutOptions,\n): CartesianLayout {\n const yOptions = options.y ?? {}\n const xOptions = options.x ?? {}\n const { fontSize, width, height, rtl } = ctx\n const overhang = layout.overhang ?? 0\n // Right to left, the sides are worked out as their mirror image, then swapped.\n const pad = mirrorSides(insets(options.padding), rtl)\n const labels = resolveLabels(options.data)\n const format = labelFormatter(options, ctx)\n const value = valueAxis(options, ctx, layout, Math.round(width / TICK_SPACING_X))\n const probeValues = value.probe\n const showValues = yOptions.show !== false\n const showCategories = xOptions.show !== false && labels.length > 0\n\n const probeCategories: Tick[] = labels.map((label, i) => ({\n value: labelKey(label),\n position: 0,\n label: format(label, i),\n }))\n const edgeLabel = (tick: Tick | undefined) =>\n showValues && tick ? Math.ceil(estimateTextWidth(tick.label, fontSize) / 2) : 0\n\n const margins = mirrorSides(\n {\n top: pad.top + Math.max(overhang, EDGE / 2),\n right: pad.right + Math.max(edgeLabel(probeValues[probeValues.length - 1]), overhang, EDGE),\n bottom:\n pad.bottom +\n Math.max(showValues ? axisSize('bottom', probeValues, fontSize) : 0, overhang, EDGE / 2),\n left:\n pad.left +\n Math.max(\n showCategories ? axisSize('left', probeCategories, fontSize) : 0,\n edgeLabel(probeValues[0]),\n overhang,\n EDGE,\n ),\n },\n rtl,\n )\n const area = innerRect(width, height, margins)\n\n const keys = labels.map(labelKey)\n const x = band(keys, [area.y, area.y + area.height], {\n paddingInner: layout.paddingInner ?? 0.3,\n paddingOuter: layout.paddingOuter ?? 0.15,\n })\n // Values grow away from the categories: to the left when those are on the right.\n const end = area.x + area.width\n const y = value.scale(rtl ? [end, area.x] : [area.x, end])\n const yTicks = thinTicks(value.ticks(y), 'bottom', fontSize)\n const xTicks = showCategories\n ? thinTicks(\n bandTicks(x, (_: BandKey, i) => format(labels[i] as Label, i)),\n 'left',\n fontSize,\n )\n : []\n\n // The value axis runs along x here, categories along y.\n return finishLayout(\n options,\n ctx,\n overhang,\n { area, labels, x, y, horizontal: true, xTicks, yTicks },\n keys,\n )\n}\n","import type { ChartType } from '../chart.ts'\nimport { feature } from '../features.ts'\nimport { barPath, hbarPath } from '../shapes/bar.ts'\nimport type { Curve, Point } from '../shapes/path.ts'\nimport { h } from '../vnode.ts'\nimport {\n type CartesianLayoutOptions,\n type CartesianOptions,\n cartesianLayout,\n categoryInteraction,\n labelKey,\n plottable,\n resolveLabels,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { horizontalLayout } from './horizontal.ts'\nimport { type Segment, type StackMode, stackBounds, stackSeries } from './stack.ts'\n\nexport interface BarOptions extends CartesianOptions {\n /** Corner radius of the data end of each bar (or stack). Defaults to `4`. */\n radius?: number\n /** Maximum bar thickness in pixels; leftover band space stays empty. Defaults to `24`. */\n maxBarWidth?: number\n /** Gap between bars of a group, or between stacked segments, in pixels. Defaults to `2`. */\n gap?: number\n /** Share of each category left empty between groups, `0…1`. Defaults to `0.3`. */\n groupPadding?: number\n /**\n * Stack series in one bar per category instead of side by side; `'percent'`\n * shows each category as 100%. Negative values stack down from zero.\n */\n stacked?: StackMode\n /**\n * `'horizontal'` lays categories out along y with bars growing right\n * (left for negative values). The `x` / `y` options keep describing the\n * category / value axis. Defaults to `'vertical'`.\n */\n orientation?: 'vertical' | 'horizontal'\n /** Interpolation of series drawn as lines (`series.type`). Defaults to `'monotone'`. */\n curve?: Curve\n}\n\n/**\n * Bar chart: vertical bars per category, grouped side by side or stacked,\n * growing from zero (negative values grow down).\n *\n * ```ts\n * new Chart('#el', {\n * type: bar,\n * data: { labels: ['Q1', 'Q2'], series: [{ name: '2025', values: [3, 5] }] },\n * stacked: true,\n * })\n * ```\n */\nexport const bar: ChartType<BarOptions> = {\n name: 'bar',\n clean: cleanData(cleanSeries),\n render(options, ctx) {\n const {\n radius = 4,\n maxBarWidth = 24,\n gap = 2,\n groupPadding = 0.3,\n stacked = false,\n orientation = 'vertical',\n curve = 'monotone',\n } = options\n const horizontal = orientation === 'horizontal'\n const { series } = options.data\n const count = resolveLabels(options.data).length\n // Series drawn as lines sit on top of the bars and stay out of the stacks.\n const isLine = (index: number) => (series[index]?.type ?? 'bar') !== 'bar'\n const lineKeys = series.filter((_, index) => isLine(index)).map(seriesKey)\n const stackHidden = lineKeys.length ? new Set([...ctx.hidden, ...lineKeys]) : ctx.hidden\n const stacks = stacked\n ? stackSeries(series, count, { percent: stacked === 'percent', hidden: stackHidden })\n : null\n\n const layoutOptions: CartesianLayoutOptions = {\n scale: 'band',\n zero: true,\n paddingInner: groupPadding,\n paddingOuter: groupPadding / 2,\n ...(stacks\n ? {\n values: [\n ...stackBounds(stacks),\n ...series.flatMap((s, index) => (isLine(index) ? s.values : [])),\n ],\n }\n : {}),\n ...(stacked === 'percent' ? { tickFormat: { style: 'percent' } } : {}),\n }\n const layout = horizontal\n ? horizontalLayout(options, ctx, layoutOptions)\n : cartesianLayout(options, ctx, layoutOptions)\n const { x, y, labels } = layout\n\n // Hidden series keep their color slot but give up their place in the group.\n const slots = new Map<number, number>()\n series.forEach((s, index) => {\n if (!ctx.hidden.has(seriesKey(s)) && !isLine(index)) slots.set(index, slots.size)\n })\n const order = [...slots.keys()]\n const columns = stacks ? 1 : Math.max(1, slots.size)\n\n const barWidth = Math.max(\n 0,\n Math.min(maxBarWidth, (x.bandwidth - (stacks ? 0 : gap * (columns - 1))) / columns),\n )\n const groupWidth = barWidth * columns + (stacks ? 0 : gap * (columns - 1))\n const offset = (x.bandwidth - groupWidth) / 2\n // Grouped bars follow the categories: from the right when those are reversed.\n const slotAt = (slot: number) => (x.range[1] < x.range[0] ? columns - 1 - slot : slot)\n const barLeft = (seriesIndex: number, i: number) =>\n x.at(i) + offset + (stacks ? 0 : slotAt(slots.get(seriesIndex) ?? 0) * (barWidth + gap))\n\n /** Data extent of a bar: from zero to the value, or its stacked segment. */\n const segment = (seriesIndex: number, i: number): Segment | null => {\n if (stacks) return stacks[seriesIndex]?.[i] ?? null\n const v = series[seriesIndex]?.values[i]\n return plottable(v, options.y) ? { y0: 0, y1: v } : null\n }\n\n // In a stack only the outermost segment of each sign gets rounded.\n const outer = labels.map((_, i) => {\n let up = -1\n let down = -1\n for (const index of order) {\n const seg = segment(index, i)\n if (!seg) continue\n if (seg.y1 > seg.y0) up = index\n else if (seg.y1 < seg.y0) down = index\n }\n return { up, down }\n })\n\n ctx.onHitTest(\n categoryInteraction(\n layout,\n options,\n ctx,\n (seriesIndex, i, v) => {\n if (isLine(seriesIndex)) {\n const across = x.at(i) + x.bandwidth / 2\n return horizontal ? { x: y(v), y: across } : { x: across, y: y(v) }\n }\n const left = barLeft(seriesIndex, i)\n const seg = segment(seriesIndex, i)\n const end = y(seg?.y1 ?? 0)\n const base = y(seg?.y0 ?? 0)\n // The bar's box, for value labels inside it.\n const lo = Math.min(end, base)\n const length = Math.abs(end - base)\n return horizontal\n ? {\n x: end,\n y: left + barWidth / 2,\n box: { x: lo, y: left, width: length, height: barWidth },\n }\n : {\n x: left + barWidth / 2,\n y: end,\n box: { x: left, y: lo, width: barWidth, height: length },\n }\n },\n (px, py, i) => {\n // Pointer position across the categories and along the values.\n const across = horizontal ? py : px\n const along = horizontal ? px : py\n if (stacks) {\n // The segment under the pointer, within the column (gaps included).\n const left = barLeft(0, i)\n if (across < left - gap / 2 || across > left + barWidth + gap / 2) return undefined\n return order.find((index) => {\n const seg = segment(index, i)\n if (!seg) return false\n const a = y(seg.y0)\n const b = y(seg.y1)\n return along >= Math.min(a, b) - gap / 2 && along <= Math.max(a, b) + gap / 2\n })\n }\n // The bar under the pointer, gaps included, so thin bars are easy to hit.\n const slot = Math.floor((across - (x.at(i) + offset) + gap / 2) / (barWidth + gap))\n const seriesIndex = order[slotAt(slot)]\n return seriesIndex !== undefined && segment(seriesIndex, i) ? seriesIndex : undefined\n },\n ),\n )\n\n const groups = series.map(\n (s, index) =>\n slots.has(index) &&\n h(\n 'g',\n seriesAttrs(s, index),\n labels.map((label, i) => {\n const seg = segment(index, i)\n if (!seg) return null\n const negative = seg.y1 < seg.y0\n // Leave a surface-colored gap where this segment sits on another one,\n // on the side it grows to (in pixels: up, right, or left when mirrored).\n const away = Math.sign(y(seg.y1) - y(seg.y0))\n const inner = seg.y0 === 0 ? 0 : away * gap\n const rounded = !stacks || (negative ? outer[i]?.down : outer[i]?.up) === index\n const draw = horizontal ? hbarPath : barPath\n return h('path', {\n key: labelKey(label),\n class: ['tc-bar', negative && 'tc-bar-negative', horizontal && 'tc-bar-horizontal'],\n d: draw(\n barLeft(index, i),\n barWidth,\n y(seg.y0) + inner,\n y(seg.y1),\n rounded ? radius : 0,\n ),\n })\n }),\n ),\n )\n\n // Lines through the band centers, drawn after (over) every bar. The path\n // generators come with the line module, so plain bar charts do not ship them.\n const paths = lineKeys.length ? feature('line') : null\n const baseline = y(Math.min(Math.max(0, y.domain[0]), y.domain[1]))\n const lines = series.map((s, index) => {\n if (!paths) return null\n if (!isLine(index) || ctx.hidden.has(seriesKey(s))) return null\n const points = labels.map((_, i): Point => {\n const v = s.values[i]\n if (!plottable(v, options.y)) return null\n const center = x.at(i) + x.bandwidth / 2\n return horizontal ? [y(v), center] : [center, y(v)]\n })\n // Areas need a vertical baseline; sideways they fall back to a line.\n const filled = s.type === 'area' && !horizontal\n return h(\n 'g',\n seriesAttrs(s, index),\n filled && h('path', { class: 'tc-area', d: paths.areaPath(points, baseline, { curve }) }),\n h('path', { class: 'tc-line', d: paths.linePath(points, { curve }) }),\n )\n })\n\n return [\n h('defs', { key: 'defs' }, layout.clip.def),\n layout.background,\n // Layers are keyed: an annotation band or a grid that comes and goes must not\n // shift the series list onto another node (that would recreate every series).\n h(\n 'g',\n { key: 'series', class: 'tc-series-list', 'clip-path': layout.clip.url },\n groups,\n lines,\n ),\n layout.foreground,\n ]\n },\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,SAAgB,iBACd,SACA,KACA,QACiB;CACjB,MAAM,WAAW,QAAQ,KAAK,CAAC;CAC/B,MAAM,WAAW,QAAQ,KAAK,CAAC;CAC/B,MAAM,EAAE,UAAU,OAAO,QAAQ,QAAQ;CACzC,MAAM,WAAW,OAAO,YAAY;CAEpC,MAAM,MAAM,YAAY,OAAO,QAAQ,OAAO,GAAG,GAAG;CACpD,MAAM,SAAS,cAAc,QAAQ,IAAI;CACzC,MAAM,SAAS,eAAe,SAAS,GAAG;CAC1C,MAAM,QAAQ,UAAU,SAAS,KAAK,QAAQ,KAAK,MAAM,QAAA,EAAsB,CAAC;CAChF,MAAM,cAAc,MAAM;CAC1B,MAAM,aAAa,SAAS,SAAS;CACrC,MAAM,iBAAiB,SAAS,SAAS,SAAS,OAAO,SAAS;CAElE,MAAM,kBAA0B,OAAO,KAAK,OAAO,OAAO;EACxD,OAAO,SAAS,KAAK;EACrB,UAAU;EACV,OAAO,OAAO,OAAO,CAAC;CACxB,EAAE;CACF,MAAM,aAAa,SACjB,cAAc,OAAO,KAAK,KAAK,kBAAkB,KAAK,OAAO,QAAQ,IAAI,CAAC,IAAI;CAEhF,MAAM,UAAU,YACd;EACE,KAAK,IAAI,MAAM,KAAK,IAAI,UAAA,CAAkB;EAC1C,OAAO,IAAI,QAAQ,KAAK,IAAI,UAAU,YAAY,YAAY,SAAS,EAAE,GAAG,UAAA,CAAc;EAC1F,QACE,IAAI,SACJ,KAAK,IAAI,aAAa,SAAS,UAAU,aAAa,QAAQ,IAAI,GAAG,UAAA,CAAkB;EACzF,MACE,I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,KAAK,GAAG;GAC1C,OAAO;GAGP,EACE,KACA;IAAE,KAAK;IAAU,OAAO;IAAkB,aAAa,OAAO,KAAK;GAAI,GACvE,QACA,KACF;GACA,OAAO;EACT;CACF;CACA,SAAS,YAAY,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UAAU,YAAY,SAAS,KAAK,KAAK;AACjE"}
@@ -1,11 +1,11 @@
1
- const require_layout = require("./layout-CtMBhNd9.cjs");
2
- const require_vnode = require("./vnode-CkQ27Cxe.cjs");
3
- const require_cartesian = require("./cartesian-BoDfgBCV.cjs");
4
- const require_features = require("./features-BclHgg2W.cjs");
5
- const require_clean = require("./clean-Byl6kzf0.cjs");
6
- const require_stack = require("./stack-DVhJWaki.cjs");
7
- const require_bar = require("./bar-DGuUN3nc.cjs");
8
- //#region src/charts/horizontal.ts
1
+ const require_features = require("./features-DCXEvoya.cjs");
2
+ const require_bar = require("./bar-LYIF8MEz.cjs");
3
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
4
+ const require_cartesian = require("./cartesian-DV02PsBe.cjs");
5
+ const require_clean = require("./clean-Die2iCNc.cjs");
6
+ const require_layout = require("./layout-JY2aR-yE.cjs");
7
+ const require_stack = require("./stack-BgPzoQmv.cjs");
8
+ // src/charts/horizontal.ts
9
9
  /**
10
10
  * Cartesian layout with categories along y (labels on the left) and values
11
11
  * along x (labels at the bottom), for horizontal bars. Only bar charts use
@@ -14,9 +14,9 @@ const require_bar = require("./bar-DGuUN3nc.cjs");
14
14
  function horizontalLayout(options, ctx, layout) {
15
15
  const yOptions = options.y ?? {};
16
16
  const xOptions = options.x ?? {};
17
- const { fontSize, width, height } = ctx;
17
+ const { fontSize, width, height, rtl } = ctx;
18
18
  const overhang = layout.overhang ?? 0;
19
- const pad = require_layout.insets(options.padding);
19
+ const pad = require_layout.mirrorSides(require_layout.insets(options.padding), rtl);
20
20
  const labels = require_cartesian.resolveLabels(options.data);
21
21
  const format = require_cartesian.labelFormatter(options, ctx);
22
22
  const value = require_cartesian.valueAxis(options, ctx, layout, Math.round(width / 80));
@@ -29,19 +29,20 @@ function horizontalLayout(options, ctx, layout) {
29
29
  label: format(label, i)
30
30
  }));
31
31
  const edgeLabel = (tick) => showValues && tick ? Math.ceil(require_layout.estimateTextWidth(tick.label, fontSize) / 2) : 0;
32
- const margins = {
32
+ const margins = require_layout.mirrorSides({
33
33
  top: pad.top + Math.max(overhang, 4),
34
34
  right: pad.right + Math.max(edgeLabel(probeValues[probeValues.length - 1]), overhang, 8),
35
35
  bottom: pad.bottom + Math.max(showValues ? require_cartesian.axisSize("bottom", probeValues, fontSize) : 0, overhang, 4),
36
36
  left: pad.left + Math.max(showCategories ? require_cartesian.axisSize("left", probeCategories, fontSize) : 0, edgeLabel(probeValues[0]), overhang, 8)
37
- };
37
+ }, rtl);
38
38
  const area = require_layout.innerRect(width, height, margins);
39
39
  const keys = labels.map(require_cartesian.labelKey);
40
40
  const x = require_cartesian.band(keys, [area.y, area.y + area.height], {
41
41
  paddingInner: layout.paddingInner ?? .3,
42
42
  paddingOuter: layout.paddingOuter ?? .15
43
43
  });
44
- const y = value.scale([area.x, area.x + area.width]);
44
+ const end = area.x + area.width;
45
+ const y = value.scale(rtl ? [end, area.x] : [area.x, end]);
45
46
  const yTicks = require_cartesian.thinTicks(value.ticks(y), "bottom", fontSize);
46
47
  const xTicks = showCategories ? require_cartesian.thinTicks(require_cartesian.bandTicks(x, (_, i) => format(labels[i], i)), "left", fontSize) : [];
47
48
  return require_cartesian.finishLayout(options, ctx, overhang, {
@@ -54,8 +55,7 @@ function horizontalLayout(options, ctx, layout) {
54
55
  yTicks
55
56
  }, keys);
56
57
  }
57
- //#endregion
58
- //#region src/charts/bar.ts
58
+ // src/charts/bar.ts
59
59
  /**
60
60
  * Bar chart: vertical bars per category, grouped side by side or stacked,
61
61
  * growing from zero (negative values grow down).
@@ -102,7 +102,8 @@ const bar = {
102
102
  const barWidth = Math.max(0, Math.min(maxBarWidth, (x.bandwidth - (stacks ? 0 : gap * (columns - 1))) / columns));
103
103
  const groupWidth = barWidth * columns + (stacks ? 0 : gap * (columns - 1));
104
104
  const offset = (x.bandwidth - groupWidth) / 2;
105
- const barLeft = (seriesIndex, i) => x.at(i) + offset + (stacks ? 0 : (slots.get(seriesIndex) ?? 0) * (barWidth + gap));
105
+ const slotAt = (slot) => x.range[1] < x.range[0] ? columns - 1 - slot : slot;
106
+ const barLeft = (seriesIndex, i) => x.at(i) + offset + (stacks ? 0 : slotAt(slots.get(seriesIndex) ?? 0) * (barWidth + gap));
106
107
  /** Data extent of a bar: from zero to the value, or its stacked segment. */
107
108
  const segment = (seriesIndex, i) => {
108
109
  if (stacks) return stacks[seriesIndex]?.[i] ?? null;
@@ -177,14 +178,14 @@ const bar = {
177
178
  });
178
179
  }
179
180
  const slot = Math.floor((across - (x.at(i) + offset) + gap / 2) / (barWidth + gap));
180
- const seriesIndex = order[slot];
181
+ const seriesIndex = order[slotAt(slot)];
181
182
  return seriesIndex !== void 0 && segment(seriesIndex, i) ? seriesIndex : void 0;
182
183
  }));
183
184
  const groups = series.map((s, index) => slots.has(index) && require_vnode.h("g", require_cartesian.seriesAttrs(s, index), labels.map((label, i) => {
184
185
  const seg = segment(index, i);
185
186
  if (!seg) return null;
186
187
  const negative = seg.y1 < seg.y0;
187
- const away = (negative ? 1 : -1) * (horizontal ? -1 : 1);
188
+ const away = Math.sign(y(seg.y1) - y(seg.y0));
188
189
  const inner = seg.y0 === 0 ? 0 : away * gap;
189
190
  const rounded = !stacks || (negative ? outer[i]?.down : outer[i]?.up) === index;
190
191
  const draw = horizontal ? require_bar.hbarPath : require_bar.barPath;
@@ -232,7 +233,6 @@ const bar = {
232
233
  legend: (options) => require_cartesian.seriesLegend(options.data),
233
234
  table: (options, ctx, limit) => require_cartesian.seriesTable(options, ctx, limit)
234
235
  };
235
- //#endregion
236
236
  Object.defineProperty(exports, "bar", {
237
237
  enumerable: true,
238
238
  get: function() {
@@ -240,4 +240,4 @@ Object.defineProperty(exports, "bar", {
240
240
  }
241
241
  });
242
242
 
243
- //# sourceMappingURL=bar-C-7zR2qp.cjs.map
243
+ //# sourceMappingURL=bar-Da6dE_nI.cjs.map