@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
@@ -0,0 +1,507 @@
1
+ const require_axis = require("./axis-YfAerNBA.cjs");
2
+ const require_format = require("./format-CAE5ruy6.cjs");
3
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
4
+ const require_rect = require("./rect-DPr9QRxl.cjs");
5
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
6
+ const require_clean = require("./clean-Die2iCNc.cjs");
7
+ const require_named = require("./named-BBASc8dW.cjs");
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 ? require_clean.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
+ }] } : require_clean.isRecord(data) ? data : {};
41
+ return {
42
+ ...d,
43
+ series: require_clean.records(d.series, (s) => ({
44
+ ...require_clean.named(s),
45
+ values: require_clean.records(s.values, (e) => ({
46
+ date: stamp(e.date),
47
+ value: require_clean.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(require_clean.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 = require_clean.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(require_clean.finite(options.levels) ?? 4)));
112
+ const series = seriesOf(options.data);
113
+ const visible = series.filter((s) => !ctx.hidden.has(require_named.keyOf(s)));
114
+ const value = require_format.formatNumber(options.format, locale);
115
+ const dates = { timeZone: "UTC" };
116
+ const title = require_format.formatDate(options.dateFormat ?? {
117
+ year: "numeric",
118
+ month: "short",
119
+ day: "numeric",
120
+ ...dates
121
+ }, locale);
122
+ const month = options.x?.format ?? require_format.formatDate({
123
+ month: "short",
124
+ ...dates
125
+ }, locale);
126
+ const dayName = options.y?.format ?? require_format.formatDate({
127
+ weekday: "short",
128
+ ...dates
129
+ }, locale);
130
+ const year = require_format.formatDate({
131
+ year: "numeric",
132
+ ...dates
133
+ }, locale);
134
+ const shortYear = require_format.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 = require_clean.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 = require_clean.finite(options.min) ?? dataMin;
160
+ let hi = Math.max(require_clean.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 = require_clean.finite(options.mid) ?? (diverging ? 0 : null);
164
+ if (diverging && mid !== null) {
165
+ const reach = Math.max(hi - mid, mid - lo);
166
+ if (require_clean.finite(options.min) === null) lo = mid - reach;
167
+ if (require_clean.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:${require_layout.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 = require_layout.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 = require_layout.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 ? require_axis.axisSize("left", rowLabels.map((label, r) => ({
191
+ value: r,
192
+ position: 0,
193
+ label
194
+ })), fontSize) : 0;
195
+ const top = showX ? require_axis.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, require_layout.estimateTextWidth(l, fontSize)), 0)) + 8 : 0;
208
+ const scaleHeight = scale ? Math.ceil(fontSize * require_layout.LINE_HEIGHT) + 6 : 0;
209
+ const area = require_layout.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(require_clean.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: require_rect.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(require_vnode.h("rect", {
299
+ key: day,
300
+ class: ["tc-cell", v === null && "tc-cell-empty"],
301
+ x: require_layout.round(at.x),
302
+ y: require_layout.round(at.y),
303
+ width: require_layout.round(cell),
304
+ height: require_layout.round(cell),
305
+ rx: require_layout.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 require_vnode.h("g", {
332
+ key: `band-${band.start}`,
333
+ class: "tc-calendar-band"
334
+ }, showX && require_axis.axis({
335
+ position: "top",
336
+ ticks: require_axis.thinTicks(months, "top", fontSize),
337
+ area: rect
338
+ }), showY && require_axis.axis({
339
+ position: "left",
340
+ ticks: require_axis.thinTicks(weekdays, "left", fontSize),
341
+ area: rect
342
+ }), named && require_vnode.h("text", {
343
+ class: "tc-tick-label tc-calendar-year",
344
+ x: require_layout.round(area.x - 8),
345
+ y: require_layout.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 = require_layout.estimateTextWidth(low, fontSize);
353
+ const highWidth = require_layout.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
+ require_vnode.h("g", {
360
+ key: "cells",
361
+ class: "tc-calendar-cells"
362
+ }, cells),
363
+ axes,
364
+ scale && require_vnode.h("g", {
365
+ key: "scale",
366
+ class: "tc-calendar-scale",
367
+ "aria-hidden": "true"
368
+ }, require_vnode.h("text", {
369
+ class: "tc-tick-label",
370
+ x: require_layout.round(scaleX),
371
+ y: require_layout.round(scaleY),
372
+ dy: "0.32em"
373
+ }, low), Array.from({ length: swatches }, (_, k) => require_vnode.h("rect", {
374
+ key: k,
375
+ class: "tc-cell",
376
+ x: require_layout.round(scaleX + lowWidth + 6 + k * (swatch + gap)),
377
+ y: require_layout.round(scaleY - swatch / 2),
378
+ width: require_layout.round(swatch),
379
+ height: require_layout.round(swatch),
380
+ rx: require_layout.round(Math.min(radius, swatch / 2)),
381
+ style: shade(k)
382
+ })), require_vnode.h("text", {
383
+ class: "tc-tick-label",
384
+ x: require_layout.round(scaleX + lowWidth + 6 + swatches * (swatch + gap) + 6),
385
+ y: require_layout.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, require_layout.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) ? [] : require_named.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(require_named.keyOf(s)));
437
+ const utc = options.utc === true;
438
+ const value = require_format.formatNumber(options.format, ctx.locale);
439
+ const title = require_format.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 = require_clean.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 = require_clean.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
+ Object.defineProperty(exports, "calendar", {
501
+ enumerable: true,
502
+ get: function() {
503
+ return calendar;
504
+ }
505
+ });
506
+
507
+ //# sourceMappingURL=calendar-DAFXjV99.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-DAFXjV99.cjs","names":["finite","isRecord","records","named","keyOf","formatNumber","formatDate","round","insets","axisSize","estimateTextWidth","LINE_HEIGHT","innerRect","rectPath","h","axis","thinTicks","legendItems","cleanData"],"sources":["../src/charts/calendar.ts"],"sourcesContent":["import type { ChartType, DataTable, LegendItem, RenderContext } from '../chart.ts'\nimport { axis, axisSize, type Tick, thinTicks } from '../components/axis.ts'\nimport { type DateFormat, formatDate, formatNumber, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport {\n estimateTextWidth,\n type InsetsInput,\n innerRect,\n insets,\n LINE_HEIGHT,\n round,\n} from '../layout.ts'\nimport { rectPath } from '../shapes/rect.ts'\nimport { type ClassValue, h, type StyleValue, type VNode } from '../vnode.ts'\nimport { cleanData, finite, isRecord, named, records } from './clean.ts'\nimport { keyOf, legendItems } from './named.ts'\n\n/** One day's value. Several entries on the same day add up. */\nexport interface CalendarEntry {\n /** The day: a `Date`, a timestamp, or anything `new Date()` reads (`'2026-10-26'`). */\n date: Date | string | number\n /** `null` leaves the day empty (drawn faded, like a day without data). */\n value: number | null\n}\n\n/** A kind of activity (commits, reviews …), with its own legend entry. */\nexport interface CalendarSeries {\n name: string\n values: readonly CalendarEntry[]\n /** Stable identity for keyed updates. Defaults to `name`. */\n id?: string\n /**\n * Custom color of the legend and tooltip swatch. Values that could inject\n * CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the legend entry. */\n class?: ClassValue\n /** Start hidden (toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface CalendarData {\n series: readonly CalendarSeries[]\n}\n\nexport interface CalendarOptions {\n /** Days and their values, as one list or as several series that add up (the legend filters them). */\n data: CalendarData | readonly CalendarEntry[]\n /** First day shown (at most ten years before `to`). Defaults to the first day in the data, or the start of the `weeks` window. */\n from?: Date | string | number\n /** Last day shown. Defaults to the last day in the data. */\n to?: Date | string | number\n /** Number of week columns ending with the week of `to`, when `from` is not set (e.g. `12`). */\n weeks?: number\n /** First day of the week: `0` Sunday … `6` Saturday. Defaults to `1` (Monday). */\n weekStart?: number\n /** Read the dates in UTC instead of local time. */\n utc?: boolean\n /** Value shown as empty. Defaults to the smaller of `0` and the data minimum. */\n min?: number\n /** Value shown with the full color. Defaults to the data maximum. */\n max?: number\n /** Number of shades between empty and the full color (the steps of the scale). Defaults to `4`. */\n levels?: number\n /**\n * A scale through two or more colors (any CSS color, including\n * `var(--tc-…)`) from `min` to `max` in `levels` steps, instead of one hue.\n * `'diverging'` is two hues around a neutral middle, for values with a sign\n * (changes, balances): the middle sits on `mid`, `0` by default, and the\n * two ends are equally far from it unless `min` or `max` is set.\n * Values that could inject CSS are ignored, as for series colors.\n */\n colors?: 'diverging' | readonly string[]\n /** Value placed on the middle color of `colors`. Defaults to `0` for `'diverging'`, else halfway. */\n mid?: number\n /** Space between cells in pixels, drawn as surface. Defaults to `2`. */\n gap?: number\n /** Corner radius of the cells. Defaults to `2`. */\n radius?: number\n /** Format of the values (tooltip, table). */\n format?: NumberFormat\n /** Format of the day in the tooltip and the table. Defaults to e.g. \"Oct 26, 2026\". */\n dateFormat?: DateFormat\n /** Month names above the columns where a month begins. */\n x?: { show?: boolean; format?: (date: Date) => string }\n /** Weekday names on the left. */\n y?: { show?: boolean; format?: (date: Date) => string }\n /**\n * The low-to-high scale below the grid: `false` hides it, an object names\n * its ends (defaults `'Less'` and `'More'`; with `colors`, the values at the ends).\n */\n scale?: boolean | { low?: string; high?: string }\n /** Extra space around the grid, in pixels. */\n padding?: InsetsInput\n}\n\nconst DAY = 86_400_000\n/** `colors: 'diverging'`: two hues around a neutral middle. */\nconst DIVERGING = ['var(--tc-color-1)', 'var(--tc-grid-color)', 'var(--tc-color-8)']\nconst MONDAY = 1\n/** Most days drawn (ten years): a range from junk dates stays finite. */\nconst MAX_DAYS = 3660\n\n/** A timestamp from a date value, or `null` for anything that is not a date. */\nconst stamp = (v: unknown): number | null =>\n typeof v === 'string' || typeof v === 'number' || v instanceof Date\n ? finite(new Date(v as string | number | Date).getTime())\n : null\n\n/** Days since the epoch of the calendar day `ms` falls in, in UTC or local time. */\nconst dayOf = (ms: number, utc: boolean): number => {\n const d = new Date(ms)\n return Math.floor((utc ? ms : Date.UTC(d.getFullYear(), d.getMonth(), d.getDate())) / DAY)\n}\n\n/** The calendar day as a date at UTC midnight (format it with `timeZone: 'UTC'`). */\nconst dateOf = (day: number): Date => new Date(day * DAY)\n\n/** Weekday of a day number, `0` Sunday … `6` Saturday (day 0 was a Thursday). */\nconst weekday = (day: number): number => (((day + 4) % 7) + 7) % 7\n\n/** Series of the data, which may be one plain list of entries. */\nconst seriesOf = (data: CalendarOptions['data']): readonly CalendarSeries[] =>\n Array.isArray(data)\n ? [{ name: '', values: data as readonly CalendarEntry[] }]\n : (data as CalendarData).series\n\n/** Series with their entries as `[day, value]`, every date valid. */\nconst cleanCalendar = (data: unknown): unknown => {\n const d = Array.isArray(data)\n ? { series: [{ name: '', values: data }] }\n : isRecord(data)\n ? data\n : {}\n return {\n ...d,\n series: records(d.series, (s) => ({\n ...named(s),\n values: records(s.values, (e) => ({ date: stamp(e.date), value: finite(e.value) })).filter(\n (e) => e.date !== null,\n ),\n })),\n }\n}\n\n/** A stretch of the range drawn as one grid of weeks: the whole range, or twelve months of it. */\ninterface Band {\n /** First and last day drawn. */\n start: number\n end: number\n /** The day in the top left corner: the start of `start`'s week. */\n gridStart: number\n columns: number\n}\n\ninterface Range {\n /** First day drawn, and how many days from it. */\n from: number\n count: number\n bands: Band[]\n /** Columns of the widest band. */\n columns: number\n /** First day of the week, `0` Sunday … `6` Saturday. */\n weekStart: number\n /** Row of a day: its weekday counted from `weekStart`. */\n row(day: number): number\n}\n\n/**\n * The days drawn: `from` … `to`, else the data (every series, so hiding one\n * keeps the grid). More than a year (and than 53 weeks) is split into bands\n * of twelve months from the first month, so a fiscal year from April is one band.\n */\nfunction rangeOf(options: CalendarOptions): Range {\n const utc = options.utc === true\n const weekStart = ((Math.floor(finite(options.weekStart) ?? MONDAY) % 7) + 7) % 7\n const row = (day: number) => (weekday(day) - weekStart + 7) % 7\n let first = Number.POSITIVE_INFINITY\n let last = Number.NEGATIVE_INFINITY\n for (const s of seriesOf(options.data))\n for (const e of s.values) {\n const ms = stamp(e.date)\n if (ms === null) continue\n const day = dayOf(ms, utc)\n if (day < first) first = day\n if (day > last) last = day\n }\n const toMs = stamp(options.to)\n const fromMs = stamp(options.from)\n const to = toMs !== null ? dayOf(toMs, utc) : last\n const weeks = finite(options.weeks)\n let from =\n fromMs !== null\n ? dayOf(fromMs, utc)\n : weeks !== null && weeks > 0 && Number.isFinite(to)\n ? to - row(to) - (Math.min(MAX_DAYS / 7, Math.floor(weeks)) - 1) * 7\n : first\n if (to - from >= MAX_DAYS) from = to - MAX_DAYS + 1\n const count = Number.isFinite(from) && Number.isFinite(to) && to >= from ? to - from + 1 : 0\n const bands: Band[] = []\n if (count) {\n const d = dateOf(from)\n const y = d.getUTCFullYear()\n const m = d.getUTCMonth()\n /** The first day of the month `months` after the range's first month. */\n const monthStart = (months: number) => Math.floor(Date.UTC(y, m + months, 1) / DAY)\n // A year or less (up to the same date a year on) is one band, and so are\n // 53 weeks: the last year of a contribution graph.\n const single =\n to < Math.floor(Date.UTC(y + 1, m, d.getUTCDate()) / DAY) ||\n to + (6 - row(to)) - (from - row(from)) < 53 * 7\n for (let start = from, k = 1; start <= to; k++) {\n const end = single ? to : Math.min(to, monthStart(k * 12) - 1)\n const gridStart = start - row(start)\n bands.push({ start, end, gridStart, columns: (end + (6 - row(end)) - gridStart + 1) / 7 })\n start = end + 1\n }\n }\n return {\n from,\n count,\n bands,\n columns: bands.reduce((max, band) => Math.max(max, band.columns), 0),\n weekStart,\n row,\n }\n}\n\n/** Space between two bands, in pixels. */\nconst BAND_GAP = 10\n\nfunction renderCalendar(options: CalendarOptions, ctx: RenderContext) {\n const { width, height, fontSize, locale } = ctx\n const { radius = 2, utc = false } = options\n const levels = Math.min(64, Math.max(1, Math.floor(finite(options.levels) ?? 4)))\n const series = seriesOf(options.data)\n const visible = series.filter((s) => !ctx.hidden.has(keyOf(s)))\n const value = formatNumber(options.format, locale)\n const dates = { timeZone: 'UTC' as const }\n const title = formatDate(\n options.dateFormat ?? { year: 'numeric', month: 'short', day: 'numeric', ...dates },\n locale,\n )\n const month = options.x?.format ?? formatDate({ month: 'short', ...dates }, locale)\n const dayName = options.y?.format ?? formatDate({ weekday: 'short', ...dates }, locale)\n const year = formatDate({ year: 'numeric', ...dates }, locale)\n const shortYear = formatDate({ year: '2-digit', ...dates }, locale)\n\n // Values by day, per series and in total (the shade), over the visible series.\n const totals = new Map<number, number | null>()\n const byDay = visible.map((s) => {\n const days = new Map<number, number | null>()\n for (const e of s.values) {\n const ms = stamp(e.date)\n if (ms === null) continue\n const day = dayOf(ms, utc)\n const v = finite(e.value)\n days.set(day, v === null ? (days.get(day) ?? null) : (days.get(day) ?? 0) + v)\n totals.set(day, v === null ? (totals.get(day) ?? null) : (totals.get(day) ?? 0) + v)\n }\n return days\n })\n\n const { from, count, bands, columns, weekStart, row } = rangeOf(options)\n\n // Shades: `levels` steps from empty (at or below `min`) to the full color (at `max`).\n let dataMin = 0\n let dataMax = 0\n for (const v of totals.values()) {\n if (v === null) continue\n if (v < dataMin) dataMin = v\n if (v > dataMax) dataMax = v\n }\n let lo = finite(options.min) ?? dataMin\n let hi = Math.max(finite(options.max) ?? dataMax, lo)\n // A color scale instead of one hue: `levels` steps through its colors.\n const diverging = options.colors === 'diverging'\n const stops = diverging\n ? DIVERGING\n : Array.isArray(options.colors) && options.colors.length >= 2\n ? (options.colors as readonly string[])\n : undefined\n const mid = finite(options.mid) ?? (diverging ? 0 : null)\n if (diverging && mid !== null) {\n // The ends are equally far from the middle, so both hues mean the same distance.\n const reach = Math.max(hi - mid, mid - lo)\n if (finite(options.min) === null) lo = mid - reach\n if (finite(options.max) === null) hi = mid + reach\n }\n /** Position of a value on the scale, 0…1 (through `mid` when it lies inside). */\n const position = (v: number) => {\n const t =\n stops && mid !== null && lo < mid && mid < hi\n ? v <= mid\n ? ((v - lo) / (mid - lo)) * 0.5\n : 0.5 + ((v - mid) / (hi - mid)) * 0.5\n : hi > lo\n ? (v - lo) / (hi - lo)\n : v > lo\n ? 1\n : 0\n return Math.min(1, Math.max(0, t))\n }\n const level = (v: number) =>\n stops\n ? Math.round(position(v) * levels)\n : v <= lo\n ? 0\n : Math.min(levels, Math.ceil(position(v) * levels) || levels)\n const shade = (step: number): StyleValue => {\n if (!stops) return `--tc-heat:${round((step / levels) * 100)}%`\n const at = (step / levels) * (stops.length - 1)\n const k = Math.min(stops.length - 2, Math.floor(at))\n const u = round((at - k) * 100)\n return {\n '--tc-cell-fill':\n u <= 0\n ? stops[k]\n : u >= 100\n ? stops[k + 1]\n : `color-mix(in oklab,${stops[k + 1]} ${u}%,${stops[k]})`,\n }\n }\n\n // Margins: weekday names on the left, months on top, the scale below.\n const pad = insets(options.padding, 0)\n const showX = options.x?.show !== false && count > 0\n const showY = options.y?.show !== false && count > 0\n const scale = options.scale !== false && count > 0\n const scaleText = typeof options.scale === 'object' ? options.scale : {}\n const low = scaleText.low ?? (stops ? value(lo) : 'Less')\n const high = scaleText.high ?? (stops ? value(hi) : 'More')\n // Day 3 (4 January 1970) was a Sunday: the row's weekday, on a date of that weekday.\n const rowLabels = Array.from({ length: 7 }, (_, r) => dayName(dateOf(3 + ((weekStart + r) % 7))))\n const left = showY\n ? axisSize(\n 'left',\n rowLabels.map((label, r) => ({ value: r, position: 0, label })),\n fontSize,\n )\n : 0\n const top = showX ? axisSize('top', [{ value: 0, position: 0, label: 'M' }], fontSize) : 0\n // Bands are named by their years, in the corner over the weekday names.\n const multi = bands.length > 1\n const bandLabels = bands.map((band) => {\n const a = dateOf(band.start)\n const b = dateOf(band.end)\n return a.getUTCFullYear() === b.getUTCFullYear() ? year(a) : `${year(a)}–${shortYear(b)}`\n })\n const named = multi && showX\n const yearWidth = named\n ? Math.ceil(bandLabels.reduce((max, l) => Math.max(max, estimateTextWidth(l, fontSize)), 0)) + 8\n : 0\n const scaleHeight = scale ? Math.ceil(fontSize * LINE_HEIGHT) + 6 : 0\n const area = innerRect(width, height, {\n top: pad.top,\n right: pad.right,\n bottom: pad.bottom + scaleHeight,\n left: pad.left + Math.max(left, yearWidth),\n })\n // Square cells, as large as the columns and the seven rows of every band allow.\n const n = bands.length\n const room = area.height - n * top - (n - 1) * BAND_GAP\n const step = columns ? Math.max(0, Math.min(area.width / columns, room / (7 * n))) : 0\n // (On a phone the days are a few pixels: the gap is at most a quarter of one.)\n const gap = Math.max(0, Math.min(finite(options.gap) ?? 2, step / 4))\n const cell = Math.max(0, step - gap)\n /** Top of the cells of band `k`, below its month names. */\n const bandY = (k: number) => area.y + k * (top + step * 7 + BAND_GAP) + top\n const cellX = (c: number) => area.x + c * step + gap / 2\n const grid = {\n x: area.x,\n y: area.y,\n width: step * columns,\n height: n ? bandY(n - 1) + step * 7 - area.y : 0,\n }\n /** Band, column and row of a day of the range. */\n const place = (day: number) => {\n const k = Math.max(\n 0,\n bands.findIndex((band) => day <= band.end),\n )\n const c = Math.floor((day - (bands[k] as Band).gridStart) / 7)\n return { x: cellX(c), y: bandY(k) + row(day) * step + gap / 2 }\n }\n\n const hitAt = (i: number, seriesIndex?: number): Hit | null => {\n if (i < 0 || i >= count) return null\n const day = from + i\n const at = place(day)\n const x = at.x + cell / 2\n const y = at.y + cell / 2\n const box = { x: at.x, y: at.y, width: cell, height: cell }\n const items: HitItem[] = visible.map((s, k) => {\n const v = byDay[k]?.get(day) ?? null\n return {\n name: s.name,\n seriesIndex: series.indexOf(s),\n value: v,\n text: v === null ? '–' : value(v),\n x,\n y,\n box,\n color: s.color,\n }\n })\n return {\n index: i,\n label: dateOf(day).toISOString().slice(0, 10),\n title: title(dateOf(day)),\n x,\n area: grid,\n items,\n seriesIndex,\n highlight: {\n kind: 'halo',\n d: rectPath(box.x - 2, box.y - 2, cell + 4, cell + 4, radius + 2),\n },\n }\n }\n\n const interaction: Interaction = {\n count,\n // Arrow keys walk the grid: left and right by a week, up and down by a day.\n rows: 7,\n hitIndex: hitAt,\n hitTest(px, py) {\n if (!step || px < grid.x) return null\n const c = Math.floor((px - grid.x) / step)\n for (let k = 0; k < n; k++) {\n const band = bands[k] as Band\n const r = Math.floor((py - bandY(k)) / step)\n if (py < bandY(k) || r > 6 || c >= band.columns) continue\n const day = band.gridStart + c * 7 + r\n return day < band.start || day > band.end ? null : hitAt(day - from)\n }\n return null\n },\n }\n\n const cells: VNode[] = []\n for (let day = from; day < from + count; day++) {\n const v = totals.get(day) ?? null\n const at = place(day)\n cells.push(\n h('rect', {\n key: day,\n class: ['tc-cell', v === null && 'tc-cell-empty'],\n x: round(at.x),\n y: round(at.y),\n width: round(cell),\n height: round(cell),\n rx: round(Math.min(radius, cell / 2)),\n style: v === null ? undefined : shade(level(v)),\n }),\n )\n }\n\n // A month is named over the first column whose week starts in it (the\n // first column by the band's first day, which may be later in its week).\n const axes = bands.map((band, k) => {\n const months: Tick[] = []\n for (let c = 0; c < band.columns; c++) {\n const start = Math.max(band.start, band.gridStart + c * 7)\n const m = dateOf(start).getUTCMonth()\n if (c === 0 || m !== dateOf(Math.max(band.start, start - 7)).getUTCMonth()) {\n months.push({\n value: start,\n position: area.x + c * step + step / 2,\n label: month(dateOf(start)),\n })\n }\n }\n const weekdays: Tick[] = rowLabels.map((label, r) => ({\n value: r,\n position: bandY(k) + r * step + step / 2,\n label,\n }))\n const rect = { x: area.x, y: bandY(k), width: step * band.columns, height: step * 7 }\n return h(\n 'g',\n { key: `band-${band.start}`, class: 'tc-calendar-band' },\n showX && axis({ position: 'top', ticks: thinTicks(months, 'top', fontSize), area: rect }),\n showY && axis({ position: 'left', ticks: thinTicks(weekdays, 'left', fontSize), area: rect }),\n named &&\n h(\n 'text',\n {\n class: 'tc-tick-label tc-calendar-year',\n x: round(area.x - 8),\n y: round(bandY(k) - 8),\n 'text-anchor': 'end',\n 'aria-hidden': 'true',\n },\n bandLabels[k],\n ),\n )\n })\n\n // The scale, right-aligned below the grid: \"Less\", one swatch per shade, \"More\".\n const swatch = Math.min(cell, fontSize)\n const scaleY = grid.y + grid.height + 6 + swatch / 2\n const lowWidth = estimateTextWidth(low, fontSize)\n const highWidth = estimateTextWidth(high, fontSize)\n const swatches = levels + 1\n const scaleWidth = lowWidth + 6 + swatches * (swatch + gap) + 6 + highWidth\n const scaleX = Math.max(area.x, area.x + grid.width - scaleWidth)\n\n const content = [\n h('g', { key: 'cells', class: 'tc-calendar-cells' }, cells),\n axes,\n scale &&\n h(\n 'g',\n { key: 'scale', class: 'tc-calendar-scale', 'aria-hidden': 'true' },\n h(\n 'text',\n { class: 'tc-tick-label', x: round(scaleX), y: round(scaleY), dy: '0.32em' },\n low,\n ),\n Array.from({ length: swatches }, (_, k) =>\n h('rect', {\n key: k,\n class: 'tc-cell',\n x: round(scaleX + lowWidth + 6 + k * (swatch + gap)),\n y: round(scaleY - swatch / 2),\n width: round(swatch),\n height: round(swatch),\n rx: round(Math.min(radius, swatch / 2)),\n style: shade(k),\n }),\n ),\n h(\n 'text',\n {\n class: 'tc-tick-label',\n x: round(scaleX + lowWidth + 6 + swatches * (swatch + gap) + 6),\n y: round(scaleY),\n dy: '0.32em',\n },\n high,\n ),\n ),\n ]\n return { content, interaction }\n}\n\n/**\n * Size of the grid with its names and scale at the size of a contribution\n * graph (13 pixel days, 12 pixel text): `fixed` is the part of the height\n * that stays as the days shrink (the month names, the scale).\n */\nfunction naturalSize(options: CalendarOptions) {\n const { bands, columns } = rangeOf(options)\n const n = bands.length\n if (!n) return undefined\n const top = options.x?.show === false ? 0 : 23\n const left = options.y?.show === false ? 0 : 36\n const fixed = n * top + (n - 1) * BAND_GAP + (options.scale === false ? 0 : 21)\n return {\n left,\n fixed,\n rows: 7 * n,\n columns,\n width: left + columns * 13,\n height: fixed + n * 7 * 13,\n }\n}\n\n/**\n * Width to height of the chart, so a year is a low strip of small squares\n * instead of filling a chart half as tall as wide.\n */\nfunction ratioOf(options: CalendarOptions): number | undefined {\n const size = naturalSize(options)\n // (A few weeks alone would be taller than wide: not below the usual 2.)\n return size && Math.max(2, round(size.width / size.height))\n}\n\n/**\n * Height for a width narrower than the contribution graph (a phone): the\n * names and the scale keep their size there, so the ratio alone would leave\n * the days no room. Your own `aspectRatio` is kept.\n */\nfunction heightOf(\n options: CalendarOptions & { aspectRatio?: number; autoRatio?: number },\n width: number,\n): number | undefined {\n const size = naturalSize(options)\n if (!size || options.aspectRatio !== options.autoRatio || width >= size.width) return undefined\n const days = (Math.max(0, width - size.left) / size.columns) * size.rows\n // (Not taller than the usual half of the width, which a few weeks alone get.)\n return Math.min(width / 2, size.fixed + days)\n}\n\n/** Legend: the series (kinds of activity), when the data has them. */\nconst calendarLegend = (options: CalendarOptions): LegendItem[] =>\n Array.isArray(options.data) ? [] : legendItems(seriesOf(options.data))\n\n/** Table: one row per day of the range, one column per visible series. */\nfunction calendarTable(options: CalendarOptions, ctx: RenderContext, limit: number): DataTable {\n const series = seriesOf(options.data).filter((s) => !ctx.hidden.has(keyOf(s)))\n const utc = options.utc === true\n const value = formatNumber(options.format, ctx.locale)\n const title = formatDate(\n options.dateFormat ?? { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' },\n ctx.locale,\n )\n // Every day with an entry, in order (the grid's blank days say nothing).\n const days = new Map<number, (number | null)[]>()\n series.forEach((s, k) => {\n for (const e of s.values) {\n const ms = stamp(e.date)\n if (ms === null) continue\n const day = dayOf(ms, utc)\n const rowValues = days.get(day) ?? series.map(() => null)\n const v = finite(e.value)\n if (v !== null) rowValues[k] = (rowValues[k] ?? 0) + v\n days.set(day, rowValues)\n }\n })\n const sorted = [...days.keys()].sort((a, b) => a - b)\n return {\n columns: ['', ...series.map((s) => s.name)],\n total: sorted.length,\n rows: sorted\n .slice(0, limit)\n .map((day) => [\n title(dateOf(day)),\n ...(days.get(day) ?? []).map((v) => (v === null ? '–' : value(v))),\n ]),\n }\n}\n\n/**\n * Calendar: a contribution-style heatmap of days, one column per week and\n * one row per weekday, shaded in `levels` steps of one hue by the day's\n * value (`--tc-heat-color`), with month and weekday names and a low-to-high\n * scale; `colors` shades through a scale of colors instead, `'diverging'`\n * for values with a sign. Several series add up per day and the legend filters them.\n *\n * ```ts\n * new Chart('#el', {\n * type: calendar,\n * data: [{ date: '2026-10-26', value: 3 }, { date: '2026-10-27', value: 0 }],\n * weeks: 12,\n * })\n * ```\n */\nexport const calendar: ChartType<CalendarOptions> = {\n name: 'calendar',\n // (The options come with the whole config: its proportions are defaulted here.)\n clean: (options) => {\n const config = cleanData(cleanCalendar)(options) as CalendarOptions & {\n aspectRatio?: number\n autoRatio?: number\n }\n // The ratio set here follows the range; one of your own is kept.\n if (config.aspectRatio !== undefined && config.aspectRatio !== config.autoRatio) return config\n const autoRatio = ratioOf(config)\n return { ...config, aspectRatio: autoRatio, autoRatio }\n },\n render: renderCalendar,\n height: heightOf,\n legend: calendarL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OAAO,MAAM,MAAM,CAAC,CAAE,CACnE,CAAC;CACL;AACF;;;;;;;;;;;;;;;;AAiBA,MAAa,WAAuC;CAClD,MAAM;CAEN,QAAQ,YAAY;EAClB,MAAM,SAASkB,cAAAA,UAAU,aAAa,CAAC,CAAC,OAAO;EAK/C,IAAI,OAAO,gBAAgB,KAAA,KAAa,OAAO,gBAAgB,OAAO,WAAW,OAAO;EACxF,MAAM,YAAY,QAAQ,MAAM;EAChC,OAAO;GAAE,GAAG;GAAQ,aAAa;GAAW;EAAU;CACxD;CACA,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,aAAa;EAAE,OAAO;EAAQ,SAAS,YAAY,QAAQ;CAAO;AACpE"}
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_calendar = require("./calendar-DAFXjV99.cjs");
3
+ exports.calendar = require_calendar.calendar;
@@ -0,0 +1,3 @@
1
+ /** Standalone entry: `import { calendar } from '@tabler/charts/calendar'`. */
2
+ import { a as calendar, i as CalendarSeries, n as CalendarEntry, r as CalendarOptions, t as CalendarData } from "./calendar-BSvO8nRb.cjs";
3
+ export { type CalendarData, type CalendarEntry, type CalendarOptions, type CalendarSeries, calendar };
@@ -0,0 +1,3 @@
1
+ /** Standalone entry: `import { calendar } from '@tabler/charts/calendar'`. */
2
+ import { a as calendar, i as CalendarSeries, n as CalendarEntry, r as CalendarOptions, t as CalendarData } from "./calendar-Bq3vFzPl.js";
3
+ export { type CalendarData, type CalendarEntry, type CalendarOptions, type CalendarSeries, calendar };
@@ -0,0 +1 @@
1
+ export { t as calendar } from "./calendar-BXgIX5H1.js";
@@ -1,4 +1,4 @@
1
- import { a as ChartType, et as CategoryAxisOptions, rt as ValueAxisOptions, tt as Label } from "./chart-QilhWP8Z.js";
1
+ import { ct as Label, o as ChartType, st as CategoryAxisOptions, ut as ValueAxisOptions } from "./chart-CYrrUCi3.js";
2
2
  import { a as InsetsInput, t as Annotation } from "./annotations-B02GR_KU.js";
3
3
  /** One period: where the price opened, its range and where it closed. */
4
4
  interface Candle {
@@ -1,4 +1,4 @@
1
- import { a as ChartType, at as Label, it as CategoryAxisOptions, st as ValueAxisOptions } from "./chart-kqFMEwDo.cjs";
1
+ import { dt as CategoryAxisOptions, ft as Label, mt as ValueAxisOptions, o as ChartType } from "./chart-CbPzP5Dp.cjs";
2
2
  import { a as InsetsInput, t as Annotation } from "./annotations-CHafaGd4.cjs";
3
3
  /** One period: where the price opened, its range and where it closed. */
4
4
  interface Candle {