@tabler/charts 0.2.0 → 0.3.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 (364) hide show
  1. package/README.md +74 -4
  2. package/dist/{annotations-D0YQ0IoA.js → annotations-BQ8l-qHs.js} +3 -3
  3. package/dist/{annotations-D0YQ0IoA.js.map → annotations-BQ8l-qHs.js.map} +1 -1
  4. package/dist/{annotations-DdRdeBUB.cjs → annotations-CpCWA29b.cjs} +3 -3
  5. package/dist/{annotations-DdRdeBUB.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
  6. package/dist/annotations.cjs +2 -2
  7. package/dist/annotations.js +2 -2
  8. package/dist/{area-d11XePuw.d.ts → area-DEFQm_SQ.d.ts} +2 -2
  9. package/dist/{area-4eRs3c0K.cjs → area-DYdQ_sMV.cjs} +3 -3
  10. package/dist/{area-4eRs3c0K.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
  11. package/dist/{area-0-L1bG9B.js → area-WdtfqvhX.js} +3 -3
  12. package/dist/{area-0-L1bG9B.js.map → area-WdtfqvhX.js.map} +1 -1
  13. package/dist/{area-CJX9219z.d.cts → area-h_FvieFb.d.cts} +2 -2
  14. package/dist/area.cjs +1 -1
  15. package/dist/area.d.cts +1 -1
  16. package/dist/area.d.ts +1 -1
  17. package/dist/area.js +1 -1
  18. package/dist/axis-MMaVoSWB.js +235 -0
  19. package/dist/axis-MMaVoSWB.js.map +1 -0
  20. package/dist/axis-YfAerNBA.cjs +300 -0
  21. package/dist/axis-YfAerNBA.cjs.map +1 -0
  22. package/dist/{bar-BNZ3GhIw.js → bar-BOcRcArc.js} +74 -56
  23. package/dist/bar-BOcRcArc.js.map +1 -0
  24. package/dist/{bar-Da6dE_nI.cjs → bar-CVkOJ7WA.cjs} +76 -58
  25. package/dist/bar-CVkOJ7WA.cjs.map +1 -0
  26. package/dist/{bar-B5n2oq9-.js → bar-CgpC2EpX.js} +2 -2
  27. package/dist/{bar-B5n2oq9-.js.map → bar-CgpC2EpX.js.map} +1 -1
  28. package/dist/{bar-XwzM6Pb0.d.ts → bar-D9B_arKf.d.ts} +1 -1
  29. package/dist/{bar-BDLR4p9c.d.cts → bar-DZCQ-kyf.d.cts} +2 -2
  30. package/dist/{bar-LYIF8MEz.cjs → bar-wVykm1us.cjs} +2 -2
  31. package/dist/{bar-LYIF8MEz.cjs.map → bar-wVykm1us.cjs.map} +1 -1
  32. package/dist/bar.cjs +1 -1
  33. package/dist/bar.d.cts +1 -1
  34. package/dist/bar.d.ts +1 -1
  35. package/dist/bar.js +1 -1
  36. package/dist/calendar-BSvO8nRb.d.cts +106 -0
  37. package/dist/calendar-BXgIX5H1.js +502 -0
  38. package/dist/calendar-BXgIX5H1.js.map +1 -0
  39. package/dist/calendar-Bq3vFzPl.d.ts +106 -0
  40. package/dist/calendar-DAFXjV99.cjs +507 -0
  41. package/dist/calendar-DAFXjV99.cjs.map +1 -0
  42. package/dist/calendar.cjs +3 -0
  43. package/dist/calendar.d.cts +3 -0
  44. package/dist/calendar.d.ts +3 -0
  45. package/dist/calendar.js +1 -0
  46. package/dist/{candlestick-D0xKkdqd.d.ts → candlestick-B3WcLzph.d.ts} +1 -1
  47. package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-BcomxeVG.d.cts} +1 -1
  48. package/dist/{candlestick-BHQkQfxH.js → candlestick-BtT9glp9.js} +16 -14
  49. package/dist/{candlestick-BHQkQfxH.js.map → candlestick-BtT9glp9.js.map} +1 -1
  50. package/dist/{candlestick-CYCQXgky.cjs → candlestick-CSmRuZ4v.cjs} +16 -14
  51. package/dist/{candlestick-CYCQXgky.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
  52. package/dist/candlestick.cjs +3 -3
  53. package/dist/candlestick.d.cts +1 -1
  54. package/dist/candlestick.d.ts +1 -1
  55. package/dist/candlestick.js +3 -3
  56. package/dist/{cartesian-CI2x6N7N.js → cartesian-BrPqb5Qn.js} +122 -248
  57. package/dist/cartesian-BrPqb5Qn.js.map +1 -0
  58. package/dist/{cartesian-DV02PsBe.cjs → cartesian-DRSXHxWe.cjs} +146 -308
  59. package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
  60. package/dist/{chart-DWn9v6qw.js → chart-B6TTY4Kr.js} +94 -62
  61. package/dist/chart-B6TTY4Kr.js.map +1 -0
  62. package/dist/{chart-QilhWP8Z.d.ts → chart-CYrrUCi3.d.ts} +193 -56
  63. package/dist/{chart-kqFMEwDo.d.cts → chart-CbPzP5Dp.d.cts} +193 -56
  64. package/dist/{chart-e2VqomCI.cjs → chart-D_lyOy-M.cjs} +106 -68
  65. package/dist/chart-D_lyOy-M.cjs.map +1 -0
  66. package/dist/{core-PAX5ogLk.d.cts → core-9BnLEW4K.d.cts} +24 -20
  67. package/dist/{core-DRUCk67j.d.ts → core-C3qEppSm.d.ts} +7 -6
  68. package/dist/{core-BKRQvPAT.js → core-CQ0FaJ4G.js} +112 -65
  69. package/dist/core-CQ0FaJ4G.js.map +1 -0
  70. package/dist/{core-DIOC61up.cjs → core-D2PSked3.cjs} +113 -66
  71. package/dist/core-D2PSked3.cjs.map +1 -0
  72. package/dist/core.cjs +41 -31
  73. package/dist/core.d.cts +20 -17
  74. package/dist/core.d.ts +20 -17
  75. package/dist/core.js +27 -23
  76. package/dist/{dates-C2RzY3rE.js → dates-DLe2Ww64.js} +2 -2
  77. package/dist/{dates-C2RzY3rE.js.map → dates-DLe2Ww64.js.map} +1 -1
  78. package/dist/{dates-DurEr9WT.cjs → dates-DerXTb1J.cjs} +2 -2
  79. package/dist/{dates-DurEr9WT.cjs.map → dates-DerXTb1J.cjs.map} +1 -1
  80. package/dist/decimate.cjs +1 -1
  81. package/dist/decimate.js +1 -1
  82. package/dist/{dom-D_g13XWY.cjs → dom-C33zvtPo.cjs} +3 -7
  83. package/dist/dom-C33zvtPo.cjs.map +1 -0
  84. package/dist/{dom-CuceR8gt.js → dom-CTse6Rvd.js} +3 -7
  85. package/dist/dom-CTse6Rvd.js.map +1 -0
  86. package/dist/{export-chart-mYgEfK-L.cjs → export-chart-CPtXmZvi.cjs} +17 -12
  87. package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
  88. package/dist/{export-chart-83UYH48t.js → export-chart-DoeiAyR2.js} +17 -12
  89. package/dist/export-chart-DoeiAyR2.js.map +1 -0
  90. package/dist/export.cjs +2 -2
  91. package/dist/export.d.cts +1 -1
  92. package/dist/export.d.ts +1 -1
  93. package/dist/export.js +2 -2
  94. package/dist/{fade-GGxcBdss.js → fade-CDrQjnDz.js} +56 -78
  95. package/dist/fade-CDrQjnDz.js.map +1 -0
  96. package/dist/{fade-DVTkhrFU.cjs → fade-CRqcKMWY.cjs} +56 -78
  97. package/dist/fade-CRqcKMWY.cjs.map +1 -0
  98. package/dist/{features-BMxkqCyS.js → features-B55rwpQC.js} +4 -2
  99. package/dist/features-B55rwpQC.js.map +1 -0
  100. package/dist/{features-DCXEvoya.cjs → features-DEDP5CEQ.cjs} +9 -1
  101. package/dist/features-DEDP5CEQ.cjs.map +1 -0
  102. package/dist/fit-BPyPRnsK.js +16 -0
  103. package/dist/fit-BPyPRnsK.js.map +1 -0
  104. package/dist/fit-D4MIIQQz.cjs +21 -0
  105. package/dist/fit-D4MIIQQz.cjs.map +1 -0
  106. package/dist/funnel-BdcfUkb5.d.ts +50 -0
  107. package/dist/funnel-CFEEulw_.cjs +244 -0
  108. package/dist/funnel-CFEEulw_.cjs.map +1 -0
  109. package/dist/funnel-CYCv8cq2.js +239 -0
  110. package/dist/funnel-CYCv8cq2.js.map +1 -0
  111. package/dist/funnel-CarOh8w_.d.cts +50 -0
  112. package/dist/funnel.cjs +3 -0
  113. package/dist/funnel.d.cts +3 -0
  114. package/dist/funnel.d.ts +3 -0
  115. package/dist/funnel.js +1 -0
  116. package/dist/{gauge-DXkjXNCD.cjs → gauge-6HfDcLMJ.cjs} +28 -28
  117. package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
  118. package/dist/{gauge-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
  119. package/dist/gauge-DiTk5aWO.js.map +1 -0
  120. package/dist/{gauge-BSist7My.d.cts → gauge-Ds9k1UV2.d.cts} +1 -1
  121. package/dist/{gauge-0VJuAHWF.d.ts → gauge-Zy25jfps.d.ts} +1 -1
  122. package/dist/gauge.cjs +1 -1
  123. package/dist/gauge.d.cts +1 -1
  124. package/dist/gauge.d.ts +1 -1
  125. package/dist/gauge.js +1 -1
  126. package/dist/{heatmap-19BGJTKF.js → heatmap-C1v8bwpq.js} +35 -33
  127. package/dist/heatmap-C1v8bwpq.js.map +1 -0
  128. package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-CJ-0dfhJ.d.cts} +1 -1
  129. package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dcc_bsoQ.cjs} +39 -37
  130. package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
  131. package/dist/{heatmap-59lmClj9.d.ts → heatmap-Jp5sHRTo.d.ts} +1 -1
  132. package/dist/heatmap.cjs +1 -1
  133. package/dist/heatmap.d.cts +1 -1
  134. package/dist/heatmap.d.ts +1 -1
  135. package/dist/heatmap.js +1 -1
  136. package/dist/{hydrate-OA6R2_Pn.js → hydrate-BB3MlR36.js} +2 -2
  137. package/dist/{hydrate-OA6R2_Pn.js.map → hydrate-BB3MlR36.js.map} +1 -1
  138. package/dist/{hydrate-CmN1k8Mo.cjs → hydrate-m0I5m6ue.cjs} +2 -2
  139. package/dist/{hydrate-CmN1k8Mo.cjs.map → hydrate-m0I5m6ue.cjs.map} +1 -1
  140. package/dist/hydrate.cjs +2 -2
  141. package/dist/hydrate.js +2 -2
  142. package/dist/index.cjs +55 -42
  143. package/dist/index.cjs.map +1 -1
  144. package/dist/index.d.cts +21 -18
  145. package/dist/index.d.ts +21 -18
  146. package/dist/index.js +41 -34
  147. package/dist/index.js.map +1 -1
  148. package/dist/interaction-DXYSjgnP.cjs +32 -0
  149. package/dist/interaction-DXYSjgnP.cjs.map +1 -0
  150. package/dist/interaction-En1KlwFO.js +21 -0
  151. package/dist/interaction-En1KlwFO.js.map +1 -0
  152. package/dist/{layout-JY2aR-yE.cjs → layout-Cfg9x1k2.cjs} +32 -1
  153. package/dist/layout-Cfg9x1k2.cjs.map +1 -0
  154. package/dist/{layout-DmrrLjwN.js → layout-DqAte3H8.js} +27 -2
  155. package/dist/layout-DqAte3H8.js.map +1 -0
  156. package/dist/{line-DtSh7HQU.d.ts → line-Bpr5uVLQ.d.ts} +1 -1
  157. package/dist/{line-DO66LtwH.js → line-CxR4tg1Q.js} +46 -34
  158. package/dist/line-CxR4tg1Q.js.map +1 -0
  159. package/dist/{line-Dbt6KFRK.cjs → line-YiCuhVMI.cjs} +46 -34
  160. package/dist/line-YiCuhVMI.cjs.map +1 -0
  161. package/dist/{line-_rNdeKmS.d.cts → line-vyWO030v.d.cts} +2 -3
  162. package/dist/line.cjs +3 -3
  163. package/dist/line.d.cts +1 -1
  164. package/dist/line.d.ts +1 -1
  165. package/dist/line.js +3 -3
  166. package/dist/log.cjs +1 -1
  167. package/dist/log.js +1 -1
  168. package/dist/map-49FcfdmJ.d.cts +156 -0
  169. package/dist/map-BMC61J-P.d.ts +156 -0
  170. package/dist/map-BqrZ80vT.cjs +818 -0
  171. package/dist/map-BqrZ80vT.cjs.map +1 -0
  172. package/dist/map-C15NC7kW.js +807 -0
  173. package/dist/map-C15NC7kW.js.map +1 -0
  174. package/dist/map.cjs +4 -0
  175. package/dist/map.d.cts +3 -0
  176. package/dist/map.d.ts +3 -0
  177. package/dist/map.js +1 -0
  178. package/dist/maps/world.cjs +875 -0
  179. package/dist/maps/world.cjs.map +1 -0
  180. package/dist/maps/world.d.cts +2 -0
  181. package/dist/maps/world.d.ts +2 -0
  182. package/dist/maps/world.js +874 -0
  183. package/dist/maps/world.js.map +1 -0
  184. package/dist/{morph-9_LJL0ra.cjs → morph-3I1Nf_tR.cjs} +2 -2
  185. package/dist/{morph-9_LJL0ra.cjs.map → morph-3I1Nf_tR.cjs.map} +1 -1
  186. package/dist/{morph-DnRxuwR-.js → morph-GfBab-b3.js} +2 -2
  187. package/dist/{morph-DnRxuwR-.js.map → morph-GfBab-b3.js.map} +1 -1
  188. package/dist/morph.cjs +2 -2
  189. package/dist/morph.js +2 -2
  190. package/dist/{others-J7NCAMA0.js → others-DBIGE6jr.js} +11 -3
  191. package/dist/others-DBIGE6jr.js.map +1 -0
  192. package/dist/others-DBO4Kjwl.d.ts +29 -0
  193. package/dist/{others-DWdK7vKp.cjs → others-WfjCsjqT.cjs} +14 -6
  194. package/dist/others-WfjCsjqT.cjs.map +1 -0
  195. package/dist/others-ls5eKtZ4.d.cts +31 -0
  196. package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
  197. package/dist/parliament-BKN6ikBJ.js.map +1 -0
  198. package/dist/{parliament-CgsVnWEe.d.cts → parliament-C7V8UJj1.d.cts} +1 -1
  199. package/dist/{parliament-CLCI7tUO.d.ts → parliament-Cz9n_DoK.d.ts} +1 -1
  200. package/dist/{parliament-x5hcFaQ3.cjs → parliament-DhxAaIZ3.cjs} +30 -29
  201. package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
  202. package/dist/parliament.cjs +1 -1
  203. package/dist/parliament.d.cts +1 -1
  204. package/dist/parliament.d.ts +1 -1
  205. package/dist/parliament.js +1 -1
  206. package/dist/{patterns-CufKZYhm.js → patterns-BMUINoka.js} +2 -2
  207. package/dist/{patterns-CufKZYhm.js.map → patterns-BMUINoka.js.map} +1 -1
  208. package/dist/{patterns-D3-wQagb.cjs → patterns-Dw7OMD_2.cjs} +2 -2
  209. package/dist/{patterns-D3-wQagb.cjs.map → patterns-Dw7OMD_2.cjs.map} +1 -1
  210. package/dist/patterns.cjs +2 -2
  211. package/dist/patterns.d.cts +1 -1
  212. package/dist/patterns.d.ts +1 -1
  213. package/dist/patterns.js +2 -2
  214. package/dist/{percentage-bar-ybNS3goo.cjs → percentage-bar-BChkTRoz.cjs} +37 -35
  215. package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
  216. package/dist/{percentage-bar-B6tNOqNn.js → percentage-bar-CaInxrL8.js} +37 -35
  217. package/dist/percentage-bar-CaInxrL8.js.map +1 -0
  218. package/dist/{percentage-bar-tepMr7Hd.d.cts → percentage-bar-R1--2grK.d.cts} +10 -14
  219. package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-cSeiLdwU.d.ts} +10 -14
  220. package/dist/percentage-bar.cjs +1 -1
  221. package/dist/percentage-bar.d.cts +1 -1
  222. package/dist/percentage-bar.d.ts +1 -1
  223. package/dist/percentage-bar.js +1 -1
  224. package/dist/{pie-CFptILSm.d.ts → pie-BQQkvy1N.d.ts} +7 -13
  225. package/dist/{pie-CVsc-6qD.js → pie-Bd8wyrtY.js} +45 -44
  226. package/dist/pie-Bd8wyrtY.js.map +1 -0
  227. package/dist/{pie-BpjvSPnz.cjs → pie-BseZlCgP.cjs} +45 -44
  228. package/dist/pie-BseZlCgP.cjs.map +1 -0
  229. package/dist/{pie-BXg2gNpb.d.cts → pie-vD5-g8je.d.cts} +7 -13
  230. package/dist/pie.cjs +1 -1
  231. package/dist/pie.d.cts +1 -1
  232. package/dist/pie.d.ts +1 -1
  233. package/dist/pie.js +1 -1
  234. package/dist/{point-shapes--_gmdTyK.cjs → point-shapes-BRawRM78.cjs} +23 -22
  235. package/dist/point-shapes-BRawRM78.cjs.map +1 -0
  236. package/dist/{point-shapes-DD2Ektzm.js → point-shapes-DI6GhcI7.js} +18 -23
  237. package/dist/point-shapes-DI6GhcI7.js.map +1 -0
  238. package/dist/point-shapes.cjs +6 -4
  239. package/dist/point-shapes.cjs.map +1 -1
  240. package/dist/point-shapes.d.cts +2 -2
  241. package/dist/point-shapes.d.ts +2 -2
  242. package/dist/point-shapes.js +7 -5
  243. package/dist/point-shapes.js.map +1 -1
  244. package/dist/{radar-D1-lItDy.d.cts → radar-7I6hsY_h.d.cts} +1 -1
  245. package/dist/{radar-BR-mumDd.js → radar-D6XqkFWQ.js} +21 -22
  246. package/dist/radar-D6XqkFWQ.js.map +1 -0
  247. package/dist/{radar-HPDrIdzc.cjs → radar-DjISDnSf.cjs} +22 -23
  248. package/dist/radar-DjISDnSf.cjs.map +1 -0
  249. package/dist/{radar-BC9Skgpj.d.ts → radar-vLxilcr4.d.ts} +1 -1
  250. package/dist/radar.cjs +1 -1
  251. package/dist/radar.d.cts +1 -1
  252. package/dist/radar.d.ts +1 -1
  253. package/dist/radar.js +1 -1
  254. package/dist/{rect-DSVmUZrD.js → rect-CZTNvMlf.js} +2 -2
  255. package/dist/{rect-DSVmUZrD.js.map → rect-CZTNvMlf.js.map} +1 -1
  256. package/dist/{rect-D6VhynBM.cjs → rect-DPr9QRxl.cjs} +2 -2
  257. package/dist/{rect-D6VhynBM.cjs.map → rect-DPr9QRxl.cjs.map} +1 -1
  258. package/dist/{sankey-fCoo1cpz.cjs → sankey-0CSp_Er9.cjs} +72 -71
  259. package/dist/sankey-0CSp_Er9.cjs.map +1 -0
  260. package/dist/{sankey-D_v7KxnJ.d.ts → sankey-7As41Fo4.d.ts} +1 -1
  261. package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
  262. package/dist/sankey-Dp4CuLVe.js.map +1 -0
  263. package/dist/{sankey-Dk7jUt8x.d.cts → sankey-DqiuxUx7.d.cts} +1 -1
  264. package/dist/sankey.cjs +1 -1
  265. package/dist/sankey.d.cts +1 -1
  266. package/dist/sankey.d.ts +1 -1
  267. package/dist/sankey.js +1 -1
  268. package/dist/{scatter-CXEsioOJ.d.ts → scatter-BXkXGgM_.d.ts} +7 -1
  269. package/dist/{scatter-DVqB_fP9.cjs → scatter-Bwkblr4L.cjs} +40 -38
  270. package/dist/scatter-Bwkblr4L.cjs.map +1 -0
  271. package/dist/{scatter-C0TWjFpW.js → scatter-DCMAtt5L.js} +38 -36
  272. package/dist/scatter-DCMAtt5L.js.map +1 -0
  273. package/dist/{scatter-DZeEIfyo.d.cts → scatter-DL0zAV09.d.cts} +7 -1
  274. package/dist/scatter.cjs +1 -1
  275. package/dist/scatter.d.cts +1 -1
  276. package/dist/scatter.d.ts +1 -1
  277. package/dist/scatter.js +1 -1
  278. package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-BElUSd0r.d.ts} +1 -1
  279. package/dist/{sparkline-B39NA0Mi.cjs → sparkline-BMSuEPHP.cjs} +13 -15
  280. package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
  281. package/dist/{sparkline-XO_TqCNP.js → sparkline-NDmq90kP.js} +13 -15
  282. package/dist/sparkline-NDmq90kP.js.map +1 -0
  283. package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-RYly7bR0.d.cts} +1 -1
  284. package/dist/sparkline.cjs +1 -1
  285. package/dist/sparkline.d.cts +1 -1
  286. package/dist/sparkline.d.ts +1 -1
  287. package/dist/sparkline.js +1 -1
  288. package/dist/{stack-BgPzoQmv.cjs → stack-BO4624CY.cjs} +2 -2
  289. package/dist/{stack-BgPzoQmv.cjs.map → stack-BO4624CY.cjs.map} +1 -1
  290. package/dist/{stack-Dagxq7l2.d.cts → stack-BTWYIwLO.d.cts} +1 -1
  291. package/dist/{stack-2H2Gfs1Q.js → stack-jVKvg2x_.js} +2 -2
  292. package/dist/{stack-2H2Gfs1Q.js.map → stack-jVKvg2x_.js.map} +1 -1
  293. package/dist/style.css +1 -1
  294. package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-B3VekUfX.cjs} +4 -3
  295. package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
  296. package/dist/{time-axis-FLONo54E.js → time-axis-CLjqOakA.js} +3 -2
  297. package/dist/{time-axis-FLONo54E.js.map → time-axis-CLjqOakA.js.map} +1 -1
  298. package/dist/time.cjs +3 -3
  299. package/dist/time.js +3 -3
  300. package/dist/{treemap-BAkhmVQc.d.cts → treemap-25vHO_UK.d.cts} +12 -2
  301. package/dist/{treemap-BNpxFBao.d.ts → treemap-BCXUbixd.d.ts} +12 -2
  302. package/dist/{treemap-CQdavQ9u.js → treemap-C4glsx-g.js} +20 -25
  303. package/dist/treemap-C4glsx-g.js.map +1 -0
  304. package/dist/{treemap-BWpEUlDh.cjs → treemap-CZk8kKFD.cjs} +21 -26
  305. package/dist/treemap-CZk8kKFD.cjs.map +1 -0
  306. package/dist/treemap.cjs +1 -1
  307. package/dist/treemap.d.cts +1 -1
  308. package/dist/treemap.d.ts +1 -1
  309. package/dist/treemap.js +1 -1
  310. package/dist/{value-labels-BBuSi4i0.js → value-labels-C7GrhOXJ.js} +25 -5
  311. package/dist/value-labels-C7GrhOXJ.js.map +1 -0
  312. package/dist/{value-labels-BV9keAuL.cjs → value-labels-DzaKIWKp.cjs} +25 -5
  313. package/dist/value-labels-DzaKIWKp.cjs.map +1 -0
  314. package/dist/value-labels.cjs +2 -2
  315. package/dist/value-labels.d.cts +1 -1
  316. package/dist/value-labels.d.ts +1 -1
  317. package/dist/value-labels.js +2 -2
  318. package/package.json +93 -233
  319. package/dist/bar-BNZ3GhIw.js.map +0 -1
  320. package/dist/bar-Da6dE_nI.cjs.map +0 -1
  321. package/dist/cartesian-CI2x6N7N.js.map +0 -1
  322. package/dist/cartesian-DV02PsBe.cjs.map +0 -1
  323. package/dist/chart-DWn9v6qw.js.map +0 -1
  324. package/dist/chart-e2VqomCI.cjs.map +0 -1
  325. package/dist/core-BKRQvPAT.js.map +0 -1
  326. package/dist/core-DIOC61up.cjs.map +0 -1
  327. package/dist/dom-CuceR8gt.js.map +0 -1
  328. package/dist/dom-D_g13XWY.cjs.map +0 -1
  329. package/dist/export-chart-83UYH48t.js.map +0 -1
  330. package/dist/export-chart-mYgEfK-L.cjs.map +0 -1
  331. package/dist/fade-DVTkhrFU.cjs.map +0 -1
  332. package/dist/fade-GGxcBdss.js.map +0 -1
  333. package/dist/features-BMxkqCyS.js.map +0 -1
  334. package/dist/features-DCXEvoya.cjs.map +0 -1
  335. package/dist/gauge-DXkjXNCD.cjs.map +0 -1
  336. package/dist/gauge-ts0kqN1-.js.map +0 -1
  337. package/dist/heatmap-19BGJTKF.js.map +0 -1
  338. package/dist/heatmap-CXhlrLTl.cjs.map +0 -1
  339. package/dist/layout-DmrrLjwN.js.map +0 -1
  340. package/dist/layout-JY2aR-yE.cjs.map +0 -1
  341. package/dist/line-DO66LtwH.js.map +0 -1
  342. package/dist/line-Dbt6KFRK.cjs.map +0 -1
  343. package/dist/others-DWdK7vKp.cjs.map +0 -1
  344. package/dist/others-J7NCAMA0.js.map +0 -1
  345. package/dist/parliament-Cru4IcuM.js.map +0 -1
  346. package/dist/parliament-x5hcFaQ3.cjs.map +0 -1
  347. package/dist/percentage-bar-B6tNOqNn.js.map +0 -1
  348. package/dist/percentage-bar-ybNS3goo.cjs.map +0 -1
  349. package/dist/pie-BpjvSPnz.cjs.map +0 -1
  350. package/dist/pie-CVsc-6qD.js.map +0 -1
  351. package/dist/point-shapes--_gmdTyK.cjs.map +0 -1
  352. package/dist/point-shapes-DD2Ektzm.js.map +0 -1
  353. package/dist/radar-BR-mumDd.js.map +0 -1
  354. package/dist/radar-HPDrIdzc.cjs.map +0 -1
  355. package/dist/sankey-D6JeZfK5.js.map +0 -1
  356. package/dist/sankey-fCoo1cpz.cjs.map +0 -1
  357. package/dist/scatter-C0TWjFpW.js.map +0 -1
  358. package/dist/scatter-DVqB_fP9.cjs.map +0 -1
  359. package/dist/sparkline-B39NA0Mi.cjs.map +0 -1
  360. package/dist/sparkline-XO_TqCNP.js.map +0 -1
  361. package/dist/treemap-BWpEUlDh.cjs.map +0 -1
  362. package/dist/treemap-CQdavQ9u.js.map +0 -1
  363. package/dist/value-labels-BBuSi4i0.js.map +0 -1
  364. package/dist/value-labels-BV9keAuL.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { a as ChartType, rt as CartesianOptions } from "./chart-kqFMEwDo.cjs";
1
+ import { o as ChartType, ut as CartesianOptions } from "./chart-CbPzP5Dp.cjs";
2
2
  import { t as Curve } from "./path-YeUiOfG8.cjs";
3
- import { t as StackMode } from "./stack-Dagxq7l2.cjs";
3
+ import { t as StackMode } from "./stack-BTWYIwLO.cjs";
4
4
  interface BarOptions extends CartesianOptions {
5
5
  /** Corner radius of the data end of each bar (or stack). Defaults to `4`. */
6
6
  radius?: number;
@@ -1,4 +1,4 @@
1
- const require_layout = require("./layout-JY2aR-yE.cjs");
1
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
2
2
  // src/shapes/bar.ts
3
3
  /** Rounded for path data, without a `-0`. */
4
4
  const round = (value) => {
@@ -63,4 +63,4 @@ Object.defineProperty(exports, "hbarPath", {
63
63
  }
64
64
  });
65
65
 
66
- //# sourceMappingURL=bar-LYIF8MEz.cjs.map
66
+ //# sourceMappingURL=bar-wVykm1us.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bar-LYIF8MEz.cjs","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,eAAAA,MAAI,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-wVykm1us.cjs","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,eAAAA,MAAI,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"}
package/dist/bar.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_bar = require("./bar-Da6dE_nI.cjs");
2
+ const require_bar = require("./bar-CVkOJ7WA.cjs");
3
3
  exports.bar = require_bar.bar;
package/dist/bar.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Standalone entry: `import { bar } from '@tabler/charts/bar'`. */
2
- import { n as bar, t as BarOptions } from "./bar-BDLR4p9c.cjs";
2
+ import { n as bar, t as BarOptions } from "./bar-DZCQ-kyf.cjs";
3
3
  export { type BarOptions, bar };
package/dist/bar.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Standalone entry: `import { bar } from '@tabler/charts/bar'`. */
2
- import { n as bar, t as BarOptions } from "./bar-XwzM6Pb0.js";
2
+ import { n as bar, t as BarOptions } from "./bar-D9B_arKf.js";
3
3
  export { type BarOptions, bar };
package/dist/bar.js CHANGED
@@ -1 +1 @@
1
- export { t as bar } from "./bar-BNZ3GhIw.js";
1
+ export { t as bar } from "./bar-BOcRcArc.js";
@@ -0,0 +1,106 @@
1
+ import { o as ChartType } from "./chart-CbPzP5Dp.cjs";
2
+ import { c as NumberFormat, o as DateFormat } from "./time-B4oxWHQI.cjs";
3
+ import { a as InsetsInput } from "./annotations-CHafaGd4.cjs";
4
+ import { a as ClassValue } from "./vnode-Du2cC8Fm.cjs";
5
+ /** One day's value. Several entries on the same day add up. */
6
+ interface CalendarEntry {
7
+ /** The day: a `Date`, a timestamp, or anything `new Date()` reads (`'2026-10-26'`). */
8
+ date: Date | string | number;
9
+ /** `null` leaves the day empty (drawn faded, like a day without data). */
10
+ value: number | null;
11
+ }
12
+ /** A kind of activity (commits, reviews …), with its own legend entry. */
13
+ interface CalendarSeries {
14
+ name: string;
15
+ values: readonly CalendarEntry[];
16
+ /** Stable identity for keyed updates. Defaults to `name`. */
17
+ id?: string;
18
+ /**
19
+ * Custom color of the legend and tooltip swatch. Values that could inject
20
+ * CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
21
+ */
22
+ color?: string;
23
+ /** Extra classes on the legend entry. */
24
+ class?: ClassValue;
25
+ /** Start hidden (toggle it back from the legend). */
26
+ hidden?: boolean;
27
+ }
28
+ interface CalendarData {
29
+ series: readonly CalendarSeries[];
30
+ }
31
+ interface CalendarOptions {
32
+ /** Days and their values, as one list or as several series that add up (the legend filters them). */
33
+ data: CalendarData | readonly CalendarEntry[];
34
+ /** First day shown (at most ten years before `to`). Defaults to the first day in the data, or the start of the `weeks` window. */
35
+ from?: Date | string | number;
36
+ /** Last day shown. Defaults to the last day in the data. */
37
+ to?: Date | string | number;
38
+ /** Number of week columns ending with the week of `to`, when `from` is not set (e.g. `12`). */
39
+ weeks?: number;
40
+ /** First day of the week: `0` Sunday … `6` Saturday. Defaults to `1` (Monday). */
41
+ weekStart?: number;
42
+ /** Read the dates in UTC instead of local time. */
43
+ utc?: boolean;
44
+ /** Value shown as empty. Defaults to the smaller of `0` and the data minimum. */
45
+ min?: number;
46
+ /** Value shown with the full color. Defaults to the data maximum. */
47
+ max?: number;
48
+ /** Number of shades between empty and the full color (the steps of the scale). Defaults to `4`. */
49
+ levels?: number;
50
+ /**
51
+ * A scale through two or more colors (any CSS color, including
52
+ * `var(--tc-…)`) from `min` to `max` in `levels` steps, instead of one hue.
53
+ * `'diverging'` is two hues around a neutral middle, for values with a sign
54
+ * (changes, balances): the middle sits on `mid`, `0` by default, and the
55
+ * two ends are equally far from it unless `min` or `max` is set.
56
+ * Values that could inject CSS are ignored, as for series colors.
57
+ */
58
+ colors?: "diverging" | readonly string[];
59
+ /** Value placed on the middle color of `colors`. Defaults to `0` for `'diverging'`, else halfway. */
60
+ mid?: number;
61
+ /** Space between cells in pixels, drawn as surface. Defaults to `2`. */
62
+ gap?: number;
63
+ /** Corner radius of the cells. Defaults to `2`. */
64
+ radius?: number;
65
+ /** Format of the values (tooltip, table). */
66
+ format?: NumberFormat;
67
+ /** Format of the day in the tooltip and the table. Defaults to e.g. "Oct 26, 2026". */
68
+ dateFormat?: DateFormat;
69
+ /** Month names above the columns where a month begins. */
70
+ x?: {
71
+ show?: boolean;
72
+ format?: (date: Date) => string;
73
+ };
74
+ /** Weekday names on the left. */
75
+ y?: {
76
+ show?: boolean;
77
+ format?: (date: Date) => string;
78
+ };
79
+ /**
80
+ * The low-to-high scale below the grid: `false` hides it, an object names
81
+ * its ends (defaults `'Less'` and `'More'`; with `colors`, the values at the ends).
82
+ */
83
+ scale?: boolean | {
84
+ low?: string;
85
+ high?: string;
86
+ };
87
+ /** Extra space around the grid, in pixels. */
88
+ padding?: InsetsInput;
89
+ }
90
+ /**
91
+ * Calendar: a contribution-style heatmap of days, one column per week and
92
+ * one row per weekday, shaded in `levels` steps of one hue by the day's
93
+ * value (`--tc-heat-color`), with month and weekday names and a low-to-high
94
+ * scale; `colors` shades through a scale of colors instead, `'diverging'`
95
+ * for values with a sign. Several series add up per day and the legend filters them.
96
+ *
97
+ * ```ts
98
+ * new Chart('#el', {
99
+ * type: calendar,
100
+ * data: [{ date: '2026-10-26', value: 3 }, { date: '2026-10-27', value: 0 }],
101
+ * weeks: 12,
102
+ * })
103
+ * ```
104
+ */
105
+ declare const calendar: ChartType<CalendarOptions>;
106
+ export { calendar as a, CalendarSeries as i, CalendarEntry as n, CalendarOptions as r, CalendarData as t };
@@ -0,0 +1,502 @@
1
+ import { n as axisSize, s as thinTicks, t as axis } from "./axis-MMaVoSWB.js";
2
+ import { r as formatNumber, t as formatDate } from "./format-it1kepFG.js";
3
+ import { i as insets, n as estimateTextWidth, r as innerRect, s as round, t as LINE_HEIGHT } from "./layout-DqAte3H8.js";
4
+ import { t as rectPath } from "./rect-CZTNvMlf.js";
5
+ import { t as h } from "./vnode-_EMUqysL.js";
6
+ import { a as isRecord, c as named, i as finite, t as cleanData, u as records } from "./clean-CkoQobGv.js";
7
+ import { n as keyOf, r as legendItems } from "./named-BOiBah6I.js";
8
+ // src/charts/calendar.ts
9
+ const DAY = 864e5;
10
+ /** `colors: 'diverging'`: two hues around a neutral middle. */
11
+ const DIVERGING = [
12
+ "var(--tc-color-1)",
13
+ "var(--tc-grid-color)",
14
+ "var(--tc-color-8)"
15
+ ];
16
+ const MONDAY = 1;
17
+ /** Most days drawn (ten years): a range from junk dates stays finite. */
18
+ const MAX_DAYS = 3660;
19
+ /** A timestamp from a date value, or `null` for anything that is not a date. */
20
+ const stamp = (v) => typeof v === "string" || typeof v === "number" || v instanceof Date ? finite(new Date(v).getTime()) : null;
21
+ /** Days since the epoch of the calendar day `ms` falls in, in UTC or local time. */
22
+ const dayOf = (ms, utc) => {
23
+ const d = new Date(ms);
24
+ return Math.floor((utc ? ms : Date.UTC(d.getFullYear(), d.getMonth(), d.getDate())) / DAY);
25
+ };
26
+ /** The calendar day as a date at UTC midnight (format it with `timeZone: 'UTC'`). */
27
+ const dateOf = (day) => /* @__PURE__ */ new Date(day * DAY);
28
+ /** Weekday of a day number, `0` Sunday … `6` Saturday (day 0 was a Thursday). */
29
+ const weekday = (day) => ((day + 4) % 7 + 7) % 7;
30
+ /** Series of the data, which may be one plain list of entries. */
31
+ const seriesOf = (data) => Array.isArray(data) ? [{
32
+ name: "",
33
+ values: data
34
+ }] : data.series;
35
+ /** Series with their entries as `[day, value]`, every date valid. */
36
+ const cleanCalendar = (data) => {
37
+ const d = Array.isArray(data) ? { series: [{
38
+ name: "",
39
+ values: data
40
+ }] } : isRecord(data) ? data : {};
41
+ return {
42
+ ...d,
43
+ series: records(d.series, (s) => ({
44
+ ...named(s),
45
+ values: records(s.values, (e) => ({
46
+ date: stamp(e.date),
47
+ value: finite(e.value)
48
+ })).filter((e) => e.date !== null)
49
+ }))
50
+ };
51
+ };
52
+ /**
53
+ * The days drawn: `from` … `to`, else the data (every series, so hiding one
54
+ * keeps the grid). More than a year (and than 53 weeks) is split into bands
55
+ * of twelve months from the first month, so a fiscal year from April is one band.
56
+ */
57
+ function rangeOf(options) {
58
+ const utc = options.utc === true;
59
+ const weekStart = (Math.floor(finite(options.weekStart) ?? MONDAY) % 7 + 7) % 7;
60
+ const row = (day) => (weekday(day) - weekStart + 7) % 7;
61
+ let first = Number.POSITIVE_INFINITY;
62
+ let last = Number.NEGATIVE_INFINITY;
63
+ for (const s of seriesOf(options.data)) for (const e of s.values) {
64
+ const ms = stamp(e.date);
65
+ if (ms === null) continue;
66
+ const day = dayOf(ms, utc);
67
+ if (day < first) first = day;
68
+ if (day > last) last = day;
69
+ }
70
+ const toMs = stamp(options.to);
71
+ const fromMs = stamp(options.from);
72
+ const to = toMs !== null ? dayOf(toMs, utc) : last;
73
+ const weeks = finite(options.weeks);
74
+ let from = fromMs !== null ? dayOf(fromMs, utc) : weeks !== null && weeks > 0 && Number.isFinite(to) ? to - row(to) - (Math.min(MAX_DAYS / 7, Math.floor(weeks)) - 1) * 7 : first;
75
+ if (to - from >= MAX_DAYS) from = to - MAX_DAYS + 1;
76
+ const count = Number.isFinite(from) && Number.isFinite(to) && to >= from ? to - from + 1 : 0;
77
+ const bands = [];
78
+ if (count) {
79
+ const d = dateOf(from);
80
+ const y = d.getUTCFullYear();
81
+ const m = d.getUTCMonth();
82
+ /** The first day of the month `months` after the range's first month. */
83
+ const monthStart = (months) => Math.floor(Date.UTC(y, m + months, 1) / DAY);
84
+ const single = to < Math.floor(Date.UTC(y + 1, m, d.getUTCDate()) / DAY) || to + (6 - row(to)) - (from - row(from)) < 371;
85
+ for (let start = from, k = 1; start <= to; k++) {
86
+ const end = single ? to : Math.min(to, monthStart(k * 12) - 1);
87
+ const gridStart = start - row(start);
88
+ bands.push({
89
+ start,
90
+ end,
91
+ gridStart,
92
+ columns: (end + (6 - row(end)) - gridStart + 1) / 7
93
+ });
94
+ start = end + 1;
95
+ }
96
+ }
97
+ return {
98
+ from,
99
+ count,
100
+ bands,
101
+ columns: bands.reduce((max, band) => Math.max(max, band.columns), 0),
102
+ weekStart,
103
+ row
104
+ };
105
+ }
106
+ /** Space between two bands, in pixels. */
107
+ const BAND_GAP = 10;
108
+ function renderCalendar(options, ctx) {
109
+ const { width, height, fontSize, locale } = ctx;
110
+ const { radius = 2, utc = false } = options;
111
+ const levels = Math.min(64, Math.max(1, Math.floor(finite(options.levels) ?? 4)));
112
+ const series = seriesOf(options.data);
113
+ const visible = series.filter((s) => !ctx.hidden.has(keyOf(s)));
114
+ const value = formatNumber(options.format, locale);
115
+ const dates = { timeZone: "UTC" };
116
+ const title = formatDate(options.dateFormat ?? {
117
+ year: "numeric",
118
+ month: "short",
119
+ day: "numeric",
120
+ ...dates
121
+ }, locale);
122
+ const month = options.x?.format ?? formatDate({
123
+ month: "short",
124
+ ...dates
125
+ }, locale);
126
+ const dayName = options.y?.format ?? formatDate({
127
+ weekday: "short",
128
+ ...dates
129
+ }, locale);
130
+ const year = formatDate({
131
+ year: "numeric",
132
+ ...dates
133
+ }, locale);
134
+ const shortYear = formatDate({
135
+ year: "2-digit",
136
+ ...dates
137
+ }, locale);
138
+ const totals = /* @__PURE__ */ new Map();
139
+ const byDay = visible.map((s) => {
140
+ const days = /* @__PURE__ */ new Map();
141
+ for (const e of s.values) {
142
+ const ms = stamp(e.date);
143
+ if (ms === null) continue;
144
+ const day = dayOf(ms, utc);
145
+ const v = finite(e.value);
146
+ days.set(day, v === null ? days.get(day) ?? null : (days.get(day) ?? 0) + v);
147
+ totals.set(day, v === null ? totals.get(day) ?? null : (totals.get(day) ?? 0) + v);
148
+ }
149
+ return days;
150
+ });
151
+ const { from, count, bands, columns, weekStart, row } = rangeOf(options);
152
+ let dataMin = 0;
153
+ let dataMax = 0;
154
+ for (const v of totals.values()) {
155
+ if (v === null) continue;
156
+ if (v < dataMin) dataMin = v;
157
+ if (v > dataMax) dataMax = v;
158
+ }
159
+ let lo = finite(options.min) ?? dataMin;
160
+ let hi = Math.max(finite(options.max) ?? dataMax, lo);
161
+ const diverging = options.colors === "diverging";
162
+ const stops = diverging ? DIVERGING : Array.isArray(options.colors) && options.colors.length >= 2 ? options.colors : void 0;
163
+ const mid = finite(options.mid) ?? (diverging ? 0 : null);
164
+ if (diverging && mid !== null) {
165
+ const reach = Math.max(hi - mid, mid - lo);
166
+ if (finite(options.min) === null) lo = mid - reach;
167
+ if (finite(options.max) === null) hi = mid + reach;
168
+ }
169
+ /** Position of a value on the scale, 0…1 (through `mid` when it lies inside). */
170
+ const position = (v) => {
171
+ const t = stops && mid !== null && lo < mid && mid < hi ? v <= mid ? (v - lo) / (mid - lo) * .5 : .5 + (v - mid) / (hi - mid) * .5 : hi > lo ? (v - lo) / (hi - lo) : v > lo ? 1 : 0;
172
+ return Math.min(1, Math.max(0, t));
173
+ };
174
+ const level = (v) => stops ? Math.round(position(v) * levels) : v <= lo ? 0 : Math.min(levels, Math.ceil(position(v) * levels) || levels);
175
+ const shade = (step) => {
176
+ if (!stops) return `--tc-heat:${round(step / levels * 100)}%`;
177
+ const at = step / levels * (stops.length - 1);
178
+ const k = Math.min(stops.length - 2, Math.floor(at));
179
+ const u = round((at - k) * 100);
180
+ return { "--tc-cell-fill": u <= 0 ? stops[k] : u >= 100 ? stops[k + 1] : `color-mix(in oklab,${stops[k + 1]} ${u}%,${stops[k]})` };
181
+ };
182
+ const pad = insets(options.padding, 0);
183
+ const showX = options.x?.show !== false && count > 0;
184
+ const showY = options.y?.show !== false && count > 0;
185
+ const scale = options.scale !== false && count > 0;
186
+ const scaleText = typeof options.scale === "object" ? options.scale : {};
187
+ const low = scaleText.low ?? (stops ? value(lo) : "Less");
188
+ const high = scaleText.high ?? (stops ? value(hi) : "More");
189
+ const rowLabels = Array.from({ length: 7 }, (_, r) => dayName(dateOf(3 + (weekStart + r) % 7)));
190
+ const left = showY ? axisSize("left", rowLabels.map((label, r) => ({
191
+ value: r,
192
+ position: 0,
193
+ label
194
+ })), fontSize) : 0;
195
+ const top = showX ? axisSize("top", [{
196
+ value: 0,
197
+ position: 0,
198
+ label: "M"
199
+ }], fontSize) : 0;
200
+ const multi = bands.length > 1;
201
+ const bandLabels = bands.map((band) => {
202
+ const a = dateOf(band.start);
203
+ const b = dateOf(band.end);
204
+ return a.getUTCFullYear() === b.getUTCFullYear() ? year(a) : `${year(a)}–${shortYear(b)}`;
205
+ });
206
+ const named = multi && showX;
207
+ const yearWidth = named ? Math.ceil(bandLabels.reduce((max, l) => Math.max(max, estimateTextWidth(l, fontSize)), 0)) + 8 : 0;
208
+ const scaleHeight = scale ? Math.ceil(fontSize * LINE_HEIGHT) + 6 : 0;
209
+ const area = innerRect(width, height, {
210
+ top: pad.top,
211
+ right: pad.right,
212
+ bottom: pad.bottom + scaleHeight,
213
+ left: pad.left + Math.max(left, yearWidth)
214
+ });
215
+ const n = bands.length;
216
+ const room = area.height - n * top - (n - 1) * BAND_GAP;
217
+ const step = columns ? Math.max(0, Math.min(area.width / columns, room / (7 * n))) : 0;
218
+ const gap = Math.max(0, Math.min(finite(options.gap) ?? 2, step / 4));
219
+ const cell = Math.max(0, step - gap);
220
+ /** Top of the cells of band `k`, below its month names. */
221
+ const bandY = (k) => area.y + k * (top + step * 7 + BAND_GAP) + top;
222
+ const cellX = (c) => area.x + c * step + gap / 2;
223
+ const grid = {
224
+ x: area.x,
225
+ y: area.y,
226
+ width: step * columns,
227
+ height: n ? bandY(n - 1) + step * 7 - area.y : 0
228
+ };
229
+ /** Band, column and row of a day of the range. */
230
+ const place = (day) => {
231
+ const k = Math.max(0, bands.findIndex((band) => day <= band.end));
232
+ const c = Math.floor((day - bands[k].gridStart) / 7);
233
+ return {
234
+ x: cellX(c),
235
+ y: bandY(k) + row(day) * step + gap / 2
236
+ };
237
+ };
238
+ const hitAt = (i, seriesIndex) => {
239
+ if (i < 0 || i >= count) return null;
240
+ const day = from + i;
241
+ const at = place(day);
242
+ const x = at.x + cell / 2;
243
+ const y = at.y + cell / 2;
244
+ const box = {
245
+ x: at.x,
246
+ y: at.y,
247
+ width: cell,
248
+ height: cell
249
+ };
250
+ const items = visible.map((s, k) => {
251
+ const v = byDay[k]?.get(day) ?? null;
252
+ return {
253
+ name: s.name,
254
+ seriesIndex: series.indexOf(s),
255
+ value: v,
256
+ text: v === null ? "–" : value(v),
257
+ x,
258
+ y,
259
+ box,
260
+ color: s.color
261
+ };
262
+ });
263
+ return {
264
+ index: i,
265
+ label: dateOf(day).toISOString().slice(0, 10),
266
+ title: title(dateOf(day)),
267
+ x,
268
+ area: grid,
269
+ items,
270
+ seriesIndex,
271
+ highlight: {
272
+ kind: "halo",
273
+ d: rectPath(box.x - 2, box.y - 2, cell + 4, cell + 4, radius + 2)
274
+ }
275
+ };
276
+ };
277
+ const interaction = {
278
+ count,
279
+ rows: 7,
280
+ hitIndex: hitAt,
281
+ hitTest(px, py) {
282
+ if (!step || px < grid.x) return null;
283
+ const c = Math.floor((px - grid.x) / step);
284
+ for (let k = 0; k < n; k++) {
285
+ const band = bands[k];
286
+ const r = Math.floor((py - bandY(k)) / step);
287
+ if (py < bandY(k) || r > 6 || c >= band.columns) continue;
288
+ const day = band.gridStart + c * 7 + r;
289
+ return day < band.start || day > band.end ? null : hitAt(day - from);
290
+ }
291
+ return null;
292
+ }
293
+ };
294
+ const cells = [];
295
+ for (let day = from; day < from + count; day++) {
296
+ const v = totals.get(day) ?? null;
297
+ const at = place(day);
298
+ cells.push(h("rect", {
299
+ key: day,
300
+ class: ["tc-cell", v === null && "tc-cell-empty"],
301
+ x: round(at.x),
302
+ y: round(at.y),
303
+ width: round(cell),
304
+ height: round(cell),
305
+ rx: round(Math.min(radius, cell / 2)),
306
+ style: v === null ? void 0 : shade(level(v))
307
+ }));
308
+ }
309
+ const axes = bands.map((band, k) => {
310
+ const months = [];
311
+ for (let c = 0; c < band.columns; c++) {
312
+ const start = Math.max(band.start, band.gridStart + c * 7);
313
+ const m = dateOf(start).getUTCMonth();
314
+ if (c === 0 || m !== dateOf(Math.max(band.start, start - 7)).getUTCMonth()) months.push({
315
+ value: start,
316
+ position: area.x + c * step + step / 2,
317
+ label: month(dateOf(start))
318
+ });
319
+ }
320
+ const weekdays = rowLabels.map((label, r) => ({
321
+ value: r,
322
+ position: bandY(k) + r * step + step / 2,
323
+ label
324
+ }));
325
+ const rect = {
326
+ x: area.x,
327
+ y: bandY(k),
328
+ width: step * band.columns,
329
+ height: step * 7
330
+ };
331
+ return h("g", {
332
+ key: `band-${band.start}`,
333
+ class: "tc-calendar-band"
334
+ }, showX && axis({
335
+ position: "top",
336
+ ticks: thinTicks(months, "top", fontSize),
337
+ area: rect
338
+ }), showY && axis({
339
+ position: "left",
340
+ ticks: thinTicks(weekdays, "left", fontSize),
341
+ area: rect
342
+ }), named && h("text", {
343
+ class: "tc-tick-label tc-calendar-year",
344
+ x: round(area.x - 8),
345
+ y: round(bandY(k) - 8),
346
+ "text-anchor": "end",
347
+ "aria-hidden": "true"
348
+ }, bandLabels[k]));
349
+ });
350
+ const swatch = Math.min(cell, fontSize);
351
+ const scaleY = grid.y + grid.height + 6 + swatch / 2;
352
+ const lowWidth = estimateTextWidth(low, fontSize);
353
+ const highWidth = estimateTextWidth(high, fontSize);
354
+ const swatches = levels + 1;
355
+ const scaleWidth = lowWidth + 6 + swatches * (swatch + gap) + 6 + highWidth;
356
+ const scaleX = Math.max(area.x, area.x + grid.width - scaleWidth);
357
+ return {
358
+ content: [
359
+ h("g", {
360
+ key: "cells",
361
+ class: "tc-calendar-cells"
362
+ }, cells),
363
+ axes,
364
+ scale && h("g", {
365
+ key: "scale",
366
+ class: "tc-calendar-scale",
367
+ "aria-hidden": "true"
368
+ }, h("text", {
369
+ class: "tc-tick-label",
370
+ x: round(scaleX),
371
+ y: round(scaleY),
372
+ dy: "0.32em"
373
+ }, low), Array.from({ length: swatches }, (_, k) => h("rect", {
374
+ key: k,
375
+ class: "tc-cell",
376
+ x: round(scaleX + lowWidth + 6 + k * (swatch + gap)),
377
+ y: round(scaleY - swatch / 2),
378
+ width: round(swatch),
379
+ height: round(swatch),
380
+ rx: round(Math.min(radius, swatch / 2)),
381
+ style: shade(k)
382
+ })), h("text", {
383
+ class: "tc-tick-label",
384
+ x: round(scaleX + lowWidth + 6 + swatches * (swatch + gap) + 6),
385
+ y: round(scaleY),
386
+ dy: "0.32em"
387
+ }, high))
388
+ ],
389
+ interaction
390
+ };
391
+ }
392
+ /**
393
+ * Size of the grid with its names and scale at the size of a contribution
394
+ * graph (13 pixel days, 12 pixel text): `fixed` is the part of the height
395
+ * that stays as the days shrink (the month names, the scale).
396
+ */
397
+ function naturalSize(options) {
398
+ const { bands, columns } = rangeOf(options);
399
+ const n = bands.length;
400
+ if (!n) return void 0;
401
+ const top = options.x?.show === false ? 0 : 23;
402
+ const left = options.y?.show === false ? 0 : 36;
403
+ const fixed = n * top + (n - 1) * BAND_GAP + (options.scale === false ? 0 : 21);
404
+ return {
405
+ left,
406
+ fixed,
407
+ rows: 7 * n,
408
+ columns,
409
+ width: left + columns * 13,
410
+ height: fixed + n * 7 * 13
411
+ };
412
+ }
413
+ /**
414
+ * Width to height of the chart, so a year is a low strip of small squares
415
+ * instead of filling a chart half as tall as wide.
416
+ */
417
+ function ratioOf(options) {
418
+ const size = naturalSize(options);
419
+ return size && Math.max(2, round(size.width / size.height));
420
+ }
421
+ /**
422
+ * Height for a width narrower than the contribution graph (a phone): the
423
+ * names and the scale keep their size there, so the ratio alone would leave
424
+ * the days no room. Your own `aspectRatio` is kept.
425
+ */
426
+ function heightOf(options, width) {
427
+ const size = naturalSize(options);
428
+ if (!size || options.aspectRatio !== options.autoRatio || width >= size.width) return void 0;
429
+ const days = Math.max(0, width - size.left) / size.columns * size.rows;
430
+ return Math.min(width / 2, size.fixed + days);
431
+ }
432
+ /** Legend: the series (kinds of activity), when the data has them. */
433
+ const calendarLegend = (options) => Array.isArray(options.data) ? [] : legendItems(seriesOf(options.data));
434
+ /** Table: one row per day of the range, one column per visible series. */
435
+ function calendarTable(options, ctx, limit) {
436
+ const series = seriesOf(options.data).filter((s) => !ctx.hidden.has(keyOf(s)));
437
+ const utc = options.utc === true;
438
+ const value = formatNumber(options.format, ctx.locale);
439
+ const title = formatDate(options.dateFormat ?? {
440
+ year: "numeric",
441
+ month: "short",
442
+ day: "numeric",
443
+ timeZone: "UTC"
444
+ }, ctx.locale);
445
+ const days = /* @__PURE__ */ new Map();
446
+ series.forEach((s, k) => {
447
+ for (const e of s.values) {
448
+ const ms = stamp(e.date);
449
+ if (ms === null) continue;
450
+ const day = dayOf(ms, utc);
451
+ const rowValues = days.get(day) ?? series.map(() => null);
452
+ const v = finite(e.value);
453
+ if (v !== null) rowValues[k] = (rowValues[k] ?? 0) + v;
454
+ days.set(day, rowValues);
455
+ }
456
+ });
457
+ const sorted = [...days.keys()].sort((a, b) => a - b);
458
+ return {
459
+ columns: ["", ...series.map((s) => s.name)],
460
+ total: sorted.length,
461
+ rows: sorted.slice(0, limit).map((day) => [title(dateOf(day)), ...(days.get(day) ?? []).map((v) => v === null ? "–" : value(v))])
462
+ };
463
+ }
464
+ /**
465
+ * Calendar: a contribution-style heatmap of days, one column per week and
466
+ * one row per weekday, shaded in `levels` steps of one hue by the day's
467
+ * value (`--tc-heat-color`), with month and weekday names and a low-to-high
468
+ * scale; `colors` shades through a scale of colors instead, `'diverging'`
469
+ * for values with a sign. Several series add up per day and the legend filters them.
470
+ *
471
+ * ```ts
472
+ * new Chart('#el', {
473
+ * type: calendar,
474
+ * data: [{ date: '2026-10-26', value: 3 }, { date: '2026-10-27', value: 0 }],
475
+ * weeks: 12,
476
+ * })
477
+ * ```
478
+ */
479
+ const calendar = {
480
+ name: "calendar",
481
+ clean: (options) => {
482
+ const config = cleanData(cleanCalendar)(options);
483
+ if (config.aspectRatio !== void 0 && config.aspectRatio !== config.autoRatio) return config;
484
+ const autoRatio = ratioOf(config);
485
+ return {
486
+ ...config,
487
+ aspectRatio: autoRatio,
488
+ autoRatio
489
+ };
490
+ },
491
+ render: renderCalendar,
492
+ height: heightOf,
493
+ legend: calendarLegend,
494
+ table: calendarTable,
495
+ valueLabels: {
496
+ marks: "cell",
497
+ format: (options) => options.format
498
+ }
499
+ };
500
+ export { calendar as t };
501
+
502
+ //# sourceMappingURL=calendar-BXgIX5H1.js.map