@tabler/charts 0.0.1-alpha.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/README.md +33 -5
  2. package/dist/{annotations-Bp7HwtF5.d.ts → annotations-B02GR_KU.d.ts} +3 -8
  3. package/dist/{annotations-lyt0I3HU.d.cts → annotations-CHafaGd4.d.cts} +3 -8
  4. package/dist/{annotations-BszTTjf9.js → annotations-D0YQ0IoA.js} +6 -7
  5. package/dist/{annotations-BszTTjf9.js.map → annotations-D0YQ0IoA.js.map} +1 -1
  6. package/dist/{annotations-DpETO8dE.cjs → annotations-DdRdeBUB.cjs} +6 -7
  7. package/dist/{annotations-DpETO8dE.cjs.map → annotations-DdRdeBUB.cjs.map} +1 -1
  8. package/dist/annotations.cjs +3 -5
  9. package/dist/annotations.cjs.map +1 -1
  10. package/dist/annotations.d.cts +2 -1
  11. package/dist/annotations.d.ts +2 -1
  12. package/dist/annotations.js +3 -4
  13. package/dist/{sweep-WSgn2etB.js → arc-B3V5IR0w.js} +3 -60
  14. package/dist/arc-B3V5IR0w.js.map +1 -0
  15. package/dist/{sweep-Duowaput.cjs → arc-CYhI62kO.cjs} +2 -71
  16. package/dist/arc-CYhI62kO.cjs.map +1 -0
  17. package/dist/{area-DQsLERhx.js → area-0-L1bG9B.js} +5 -6
  18. package/dist/{area-DQsLERhx.js.map → area-0-L1bG9B.js.map} +1 -1
  19. package/dist/{area-sHCE3pg5.cjs → area-4eRs3c0K.cjs} +5 -6
  20. package/dist/{area-sHCE3pg5.cjs.map → area-4eRs3c0K.cjs.map} +1 -1
  21. package/dist/{area-DaO4MQl4.d.ts → area-CJX9219z.d.cts} +3 -6
  22. package/dist/{area-BFvkc-ZM.d.cts → area-d11XePuw.d.ts} +3 -6
  23. package/dist/area.cjs +1 -1
  24. package/dist/area.d.cts +2 -1
  25. package/dist/area.d.ts +2 -1
  26. package/dist/area.js +1 -2
  27. package/dist/{band-DTcNDAFO.d.ts → band-CNKvdnTC.d.cts} +1 -4
  28. package/dist/{band-DTcNDAFO.d.cts → band-CNKvdnTC.d.ts} +1 -4
  29. package/dist/{bar-DM16NUvV.js → bar-B5n2oq9-.js} +3 -4
  30. package/dist/{bar-DM16NUvV.js.map → bar-B5n2oq9-.js.map} +1 -1
  31. package/dist/{bar-DdsDxk3W.d.ts → bar-BDLR4p9c.d.cts} +4 -7
  32. package/dist/{bar-jZEoao74.js → bar-BNZ3GhIw.js} +20 -20
  33. package/dist/bar-BNZ3GhIw.js.map +1 -0
  34. package/dist/{bar-C-7zR2qp.cjs → bar-Da6dE_nI.cjs} +20 -20
  35. package/dist/bar-Da6dE_nI.cjs.map +1 -0
  36. package/dist/{bar-DGuUN3nc.cjs → bar-LYIF8MEz.cjs} +3 -4
  37. package/dist/{bar-DGuUN3nc.cjs.map → bar-LYIF8MEz.cjs.map} +1 -1
  38. package/dist/{bar-a0h9KC8A.d.cts → bar-XwzM6Pb0.d.ts} +4 -7
  39. package/dist/bar.cjs +1 -1
  40. package/dist/bar.d.cts +2 -1
  41. package/dist/bar.d.ts +2 -1
  42. package/dist/bar.js +1 -2
  43. package/dist/{candlestick-DuXwAFID.js → candlestick-BHQkQfxH.js} +6 -7
  44. package/dist/{candlestick-DuXwAFID.js.map → candlestick-BHQkQfxH.js.map} +1 -1
  45. package/dist/{candlestick-B5r1w3kc.cjs → candlestick-CYCQXgky.cjs} +6 -7
  46. package/dist/{candlestick-B5r1w3kc.cjs.map → candlestick-CYCQXgky.cjs.map} +1 -1
  47. package/dist/{candlestick-BnUG1SGi.d.ts → candlestick-D0xKkdqd.d.ts} +3 -6
  48. package/dist/{candlestick-BKdPyorY.d.cts → candlestick-Dq7qp-F0.d.cts} +3 -6
  49. package/dist/candlestick.cjs +4 -5
  50. package/dist/candlestick.d.cts +1 -1
  51. package/dist/candlestick.d.ts +1 -1
  52. package/dist/candlestick.js +4 -6
  53. package/dist/{cartesian-Cr0AF0nG.js → cartesian-CI2x6N7N.js} +27 -27
  54. package/dist/cartesian-CI2x6N7N.js.map +1 -0
  55. package/dist/{cartesian-BoDfgBCV.cjs → cartesian-DV02PsBe.cjs} +27 -27
  56. package/dist/cartesian-DV02PsBe.cjs.map +1 -0
  57. package/dist/{chart-BF2CK9I_.js → chart-DWn9v6qw.js} +35 -24
  58. package/dist/chart-DWn9v6qw.js.map +1 -0
  59. package/dist/{chart-iJGxMz9z.d.ts → chart-QilhWP8Z.d.ts} +38 -49
  60. package/dist/{chart-CowF_lWY.cjs → chart-e2VqomCI.cjs} +35 -24
  61. package/dist/chart-e2VqomCI.cjs.map +1 -0
  62. package/dist/{chart-Qa417fJo.d.cts → chart-kqFMEwDo.d.cts} +64 -49
  63. package/dist/{circle-BQMuAfls.cjs → circle-Bwxy5j7B.cjs} +2 -3
  64. package/dist/{circle-BQMuAfls.cjs.map → circle-Bwxy5j7B.cjs.map} +1 -1
  65. package/dist/{circle-Z7YfCoCM.js → circle-YRDaOBpk.js} +2 -3
  66. package/dist/{circle-Z7YfCoCM.js.map → circle-YRDaOBpk.js.map} +1 -1
  67. package/dist/{clean-o1vDEhFV.js → clean-CkoQobGv.js} +3 -4
  68. package/dist/{clean-o1vDEhFV.js.map → clean-CkoQobGv.js.map} +1 -1
  69. package/dist/{clean-Byl6kzf0.cjs → clean-Die2iCNc.cjs} +8 -3
  70. package/dist/{clean-Byl6kzf0.cjs.map → clean-Die2iCNc.cjs.map} +1 -1
  71. package/dist/{core-plobgBC7.js → core-BKRQvPAT.js} +47 -46
  72. package/dist/core-BKRQvPAT.js.map +1 -0
  73. package/dist/{core-C7fPm6t7.cjs → core-DIOC61up.cjs} +47 -46
  74. package/dist/core-DIOC61up.cjs.map +1 -0
  75. package/dist/{core-CjgbhS_v.d.ts → core-DRUCk67j.d.ts} +6 -42
  76. package/dist/{core-CnGFKojH.d.cts → core-PAX5ogLk.d.cts} +24 -68
  77. package/dist/core.cjs +32 -26
  78. package/dist/core.d.cts +23 -20
  79. package/dist/core.d.ts +23 -20
  80. package/dist/core.js +27 -24
  81. package/dist/{dates-CG-FvioW.js → dates-C2RzY3rE.js} +4 -5
  82. package/dist/{dates-CG-FvioW.js.map → dates-C2RzY3rE.js.map} +1 -1
  83. package/dist/{dates-Btm7Zm6W.cjs → dates-DurEr9WT.cjs} +4 -5
  84. package/dist/{dates-Btm7Zm6W.cjs.map → dates-DurEr9WT.cjs.map} +1 -1
  85. package/dist/{decimate-tLhDk1ys.cjs → decimate-BS3x8g-f.cjs} +2 -3
  86. package/dist/{decimate-tLhDk1ys.cjs.map → decimate-BS3x8g-f.cjs.map} +1 -1
  87. package/dist/{decimate-BGg9XgF0.d.ts → decimate-BxxYBJJk.d.cts} +2 -5
  88. package/dist/{decimate-C87cl_Sp.js → decimate-CapfgiDY.js} +2 -3
  89. package/dist/{decimate-C87cl_Sp.js.map → decimate-CapfgiDY.js.map} +1 -1
  90. package/dist/{decimate-CNSpgGa5.d.cts → decimate-Du87fMLG.d.ts} +2 -5
  91. package/dist/decimate.cjs +3 -4
  92. package/dist/decimate.d.cts +1 -1
  93. package/dist/decimate.d.ts +1 -1
  94. package/dist/decimate.js +3 -4
  95. package/dist/{dom-vP3IcMak.js → dom-CuceR8gt.js} +4 -6
  96. package/dist/{dom-vP3IcMak.js.map → dom-CuceR8gt.js.map} +1 -1
  97. package/dist/{dom-CLF868Qs.cjs → dom-D_g13XWY.cjs} +4 -6
  98. package/dist/{dom-CLF868Qs.cjs.map → dom-D_g13XWY.cjs.map} +1 -1
  99. package/dist/{export-chart-9w8t3rjZ.js → export-chart-83UYH48t.js} +3 -4
  100. package/dist/{export-chart-9w8t3rjZ.js.map → export-chart-83UYH48t.js.map} +1 -1
  101. package/dist/{export-chart-BhhYgksr.cjs → export-chart-mYgEfK-L.cjs} +3 -4
  102. package/dist/{export-chart-BhhYgksr.cjs.map → export-chart-mYgEfK-L.cjs.map} +1 -1
  103. package/dist/export.cjs +3 -5
  104. package/dist/export.cjs.map +1 -1
  105. package/dist/export.d.cts +8 -1
  106. package/dist/export.d.ts +8 -1
  107. package/dist/export.js +3 -4
  108. package/dist/{extent-BAMZo0Nq.js → extent-DOV8rs-6.js} +2 -3
  109. package/dist/{extent-BAMZo0Nq.js.map → extent-DOV8rs-6.js.map} +1 -1
  110. package/dist/{extent-DsFWvAHJ.cjs → extent-DuYDcvM9.cjs} +2 -3
  111. package/dist/{extent-DsFWvAHJ.cjs.map → extent-DuYDcvM9.cjs.map} +1 -1
  112. package/dist/{fade-Cs74puQS.cjs → fade-DVTkhrFU.cjs} +4 -6
  113. package/dist/{fade-Cs74puQS.cjs.map → fade-DVTkhrFU.cjs.map} +1 -1
  114. package/dist/{fade-D3NxH5Qg.js → fade-GGxcBdss.js} +4 -6
  115. package/dist/{fade-D3NxH5Qg.js.map → fade-GGxcBdss.js.map} +1 -1
  116. package/dist/{features-wASyHGic.js → features-BMxkqCyS.js} +2 -3
  117. package/dist/{features-wASyHGic.js.map → features-BMxkqCyS.js.map} +1 -1
  118. package/dist/{features-BclHgg2W.cjs → features-DCXEvoya.cjs} +2 -3
  119. package/dist/{features-BclHgg2W.cjs.map → features-DCXEvoya.cjs.map} +1 -1
  120. package/dist/{format-B0yKXBTH.cjs → format-CAE5ruy6.cjs} +2 -3
  121. package/dist/{format-B0yKXBTH.cjs.map → format-CAE5ruy6.cjs.map} +1 -1
  122. package/dist/{format-lStwuc1L.js → format-it1kepFG.js} +2 -3
  123. package/dist/{format-lStwuc1L.js.map → format-it1kepFG.js.map} +1 -1
  124. package/dist/{gauge-Cu9jttC0.d.ts → gauge-0VJuAHWF.d.ts} +5 -8
  125. package/dist/{gauge-Cu_OFxBd.d.cts → gauge-BSist7My.d.cts} +5 -8
  126. package/dist/{gauge-CEfkWXSu.cjs → gauge-DXkjXNCD.cjs} +14 -14
  127. package/dist/gauge-DXkjXNCD.cjs.map +1 -0
  128. package/dist/{gauge-_ljQHrMN.js → gauge-ts0kqN1-.js} +10 -10
  129. package/dist/{gauge-_ljQHrMN.js.map → gauge-ts0kqN1-.js.map} +1 -1
  130. package/dist/gauge.cjs +1 -1
  131. package/dist/gauge.d.cts +2 -1
  132. package/dist/gauge.d.ts +2 -1
  133. package/dist/gauge.js +1 -2
  134. package/dist/{heatmap-DSZ2bVIa.js → heatmap-19BGJTKF.js} +20 -22
  135. package/dist/heatmap-19BGJTKF.js.map +1 -0
  136. package/dist/{heatmap-PhLPXIg1.d.ts → heatmap-59lmClj9.d.ts} +4 -7
  137. package/dist/{heatmap-BK18EBgJ.cjs → heatmap-CXhlrLTl.cjs} +20 -22
  138. package/dist/heatmap-CXhlrLTl.cjs.map +1 -0
  139. package/dist/{heatmap-BwS-y0c6.d.cts → heatmap-Dp_oyEe0.d.cts} +4 -7
  140. package/dist/heatmap.cjs +1 -1
  141. package/dist/heatmap.d.cts +2 -1
  142. package/dist/heatmap.d.ts +2 -1
  143. package/dist/heatmap.js +1 -2
  144. package/dist/{hydrate-CzfxLfTv.d.ts → hydrate-BtAZf_5K.d.cts} +2 -5
  145. package/dist/{hydrate-CxwTXDqO.cjs → hydrate-CmN1k8Mo.cjs} +3 -4
  146. package/dist/hydrate-CmN1k8Mo.cjs.map +1 -0
  147. package/dist/{hydrate-DDNIHYv_.js → hydrate-OA6R2_Pn.js} +3 -4
  148. package/dist/{hydrate-DDNIHYv_.js.map → hydrate-OA6R2_Pn.js.map} +1 -1
  149. package/dist/{hydrate-CTTmQy0x.d.cts → hydrate-OjM1pIUG.d.ts} +2 -5
  150. package/dist/hydrate.cjs +3 -4
  151. package/dist/hydrate.cjs.map +1 -1
  152. package/dist/hydrate.d.cts +1 -1
  153. package/dist/hydrate.d.ts +1 -1
  154. package/dist/hydrate.js +3 -4
  155. package/dist/index.cjs +54 -48
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +24 -26
  158. package/dist/index.d.ts +24 -26
  159. package/dist/index.js +45 -42
  160. package/dist/index.js.map +1 -1
  161. package/dist/{layout-B3hiqVEw.js → layout-DmrrLjwN.js} +9 -4
  162. package/dist/layout-DmrrLjwN.js.map +1 -0
  163. package/dist/{layout-CtMBhNd9.cjs → layout-JY2aR-yE.cjs} +14 -3
  164. package/dist/layout-JY2aR-yE.cjs.map +1 -0
  165. package/dist/{line-B3Ed6u7j.js → line-DO66LtwH.js} +9 -10
  166. package/dist/{line-B3Ed6u7j.js.map → line-DO66LtwH.js.map} +1 -1
  167. package/dist/{line-fQbtP_jL.cjs → line-Dbt6KFRK.cjs} +9 -10
  168. package/dist/{line-fQbtP_jL.cjs.map → line-Dbt6KFRK.cjs.map} +1 -1
  169. package/dist/{line-CMDGH6q5.d.cts → line-DtSh7HQU.d.ts} +4 -7
  170. package/dist/{line-D5kb8e6w.d.ts → line-_rNdeKmS.d.cts} +5 -7
  171. package/dist/line.cjs +4 -5
  172. package/dist/line.cjs.map +1 -1
  173. package/dist/line.d.cts +1 -1
  174. package/dist/line.d.ts +1 -1
  175. package/dist/line.js +4 -6
  176. package/dist/{log-CaofN3-n.d.ts → log-CI41TmcU.d.cts} +1 -6
  177. package/dist/{log-CaofN3-n.d.cts → log-CI41TmcU.d.ts} +1 -6
  178. package/dist/{log-axis-83rSpvL5.cjs → log-axis-DdRNyAq8.cjs} +6 -8
  179. package/dist/{log-axis-83rSpvL5.cjs.map → log-axis-DdRNyAq8.cjs.map} +1 -1
  180. package/dist/{log-axis-B_uvvOFc.js → log-axis-DhthtHFk.js} +6 -8
  181. package/dist/{log-axis-B_uvvOFc.js.map → log-axis-DhthtHFk.js.map} +1 -1
  182. package/dist/log.cjs +3 -5
  183. package/dist/log.cjs.map +1 -1
  184. package/dist/log.d.cts +1 -1
  185. package/dist/log.d.ts +1 -1
  186. package/dist/log.js +3 -4
  187. package/dist/{morph-CqYDu1bY.cjs → morph-9_LJL0ra.cjs} +4 -5
  188. package/dist/morph-9_LJL0ra.cjs.map +1 -0
  189. package/dist/{morph-BMxz3X2b.d.ts → morph-Dh7gJkV4.d.cts} +1 -4
  190. package/dist/{morph-BMxz3X2b.d.cts → morph-Dh7gJkV4.d.ts} +1 -4
  191. package/dist/{morph-Bgg-24l8.js → morph-DnRxuwR-.js} +4 -5
  192. package/dist/{morph-Bgg-24l8.js.map → morph-DnRxuwR-.js.map} +1 -1
  193. package/dist/morph.cjs +3 -4
  194. package/dist/morph.cjs.map +1 -1
  195. package/dist/morph.d.cts +1 -1
  196. package/dist/morph.d.ts +1 -1
  197. package/dist/morph.js +3 -4
  198. package/dist/{named-BWWb5LQJ.cjs → named-BBASc8dW.cjs} +2 -3
  199. package/dist/{named-BWWb5LQJ.cjs.map → named-BBASc8dW.cjs.map} +1 -1
  200. package/dist/{named-DE15TOgh.js → named-BOiBah6I.js} +2 -3
  201. package/dist/{named-DE15TOgh.js.map → named-BOiBah6I.js.map} +1 -1
  202. package/dist/others-DWdK7vKp.cjs +60 -0
  203. package/dist/others-DWdK7vKp.cjs.map +1 -0
  204. package/dist/others-J7NCAMA0.js +49 -0
  205. package/dist/others-J7NCAMA0.js.map +1 -0
  206. package/dist/parliament-CLCI7tUO.d.ts +66 -0
  207. package/dist/parliament-CgsVnWEe.d.cts +66 -0
  208. package/dist/parliament-Cru4IcuM.js +302 -0
  209. package/dist/parliament-Cru4IcuM.js.map +1 -0
  210. package/dist/parliament-x5hcFaQ3.cjs +307 -0
  211. package/dist/parliament-x5hcFaQ3.cjs.map +1 -0
  212. package/dist/parliament.cjs +3 -0
  213. package/dist/parliament.d.cts +3 -0
  214. package/dist/parliament.d.ts +3 -0
  215. package/dist/parliament.js +1 -0
  216. package/dist/{path-CwB28da0.d.ts → path-YeUiOfG8.d.cts} +1 -4
  217. package/dist/{path-CwB28da0.d.cts → path-YeUiOfG8.d.ts} +1 -4
  218. package/dist/{patterns-DtgcnA8o.js → patterns-CufKZYhm.js} +4 -5
  219. package/dist/{patterns-DtgcnA8o.js.map → patterns-CufKZYhm.js.map} +1 -1
  220. package/dist/{patterns-LfcQAWCy.cjs → patterns-D3-wQagb.cjs} +4 -5
  221. package/dist/{patterns-LfcQAWCy.cjs.map → patterns-D3-wQagb.cjs.map} +1 -1
  222. package/dist/patterns.cjs +3 -5
  223. package/dist/patterns.cjs.map +1 -1
  224. package/dist/patterns.d.cts +5 -1
  225. package/dist/patterns.d.ts +5 -1
  226. package/dist/patterns.js +3 -4
  227. package/dist/percentage-bar-B6tNOqNn.js +157 -0
  228. package/dist/percentage-bar-B6tNOqNn.js.map +1 -0
  229. package/dist/percentage-bar-nhTeakD_.d.ts +62 -0
  230. package/dist/percentage-bar-tepMr7Hd.d.cts +62 -0
  231. package/dist/percentage-bar-ybNS3goo.cjs +162 -0
  232. package/dist/percentage-bar-ybNS3goo.cjs.map +1 -0
  233. package/dist/percentage-bar.cjs +3 -0
  234. package/dist/percentage-bar.d.cts +3 -0
  235. package/dist/percentage-bar.d.ts +3 -0
  236. package/dist/percentage-bar.js +1 -0
  237. package/dist/{pie-B8UlOZiq.d.ts → pie-BXg2gNpb.d.cts} +14 -8
  238. package/dist/{pie-C1Pa6W_l.cjs → pie-BpjvSPnz.cjs} +19 -22
  239. package/dist/pie-BpjvSPnz.cjs.map +1 -0
  240. package/dist/{pie-DnQQmxkk.d.cts → pie-CFptILSm.d.ts} +14 -8
  241. package/dist/{pie-RnMTQWMS.js → pie-CVsc-6qD.js} +13 -16
  242. package/dist/pie-CVsc-6qD.js.map +1 -0
  243. package/dist/pie.cjs +1 -1
  244. package/dist/pie.d.cts +2 -1
  245. package/dist/pie.d.ts +2 -1
  246. package/dist/pie.js +1 -2
  247. package/dist/{point-shapes-CGl4dugc.cjs → point-shapes--_gmdTyK.cjs} +3 -4
  248. package/dist/{point-shapes-CGl4dugc.cjs.map → point-shapes--_gmdTyK.cjs.map} +1 -1
  249. package/dist/{point-shapes-DI84NNpI.js → point-shapes-DD2Ektzm.js} +3 -4
  250. package/dist/{point-shapes-DI84NNpI.js.map → point-shapes-DD2Ektzm.js.map} +1 -1
  251. package/dist/point-shapes.cjs +3 -4
  252. package/dist/point-shapes.d.cts +5 -1
  253. package/dist/point-shapes.d.ts +5 -1
  254. package/dist/point-shapes.js +3 -4
  255. package/dist/{radar-pFI6fvOq.d.ts → radar-BC9Skgpj.d.ts} +4 -7
  256. package/dist/{radar-CYPab_I4.js → radar-BR-mumDd.js} +7 -8
  257. package/dist/{radar-CYPab_I4.js.map → radar-BR-mumDd.js.map} +1 -1
  258. package/dist/{radar-BB13CGmq.d.cts → radar-D1-lItDy.d.cts} +4 -7
  259. package/dist/{radar-CoGUNNSb.cjs → radar-HPDrIdzc.cjs} +7 -8
  260. package/dist/{radar-CoGUNNSb.cjs.map → radar-HPDrIdzc.cjs.map} +1 -1
  261. package/dist/radar.cjs +1 -1
  262. package/dist/radar.d.cts +2 -1
  263. package/dist/radar.d.ts +2 -1
  264. package/dist/radar.js +1 -2
  265. package/dist/rect-D6VhynBM.cjs +16 -0
  266. package/dist/rect-D6VhynBM.cjs.map +1 -0
  267. package/dist/rect-DSVmUZrD.js +11 -0
  268. package/dist/rect-DSVmUZrD.js.map +1 -0
  269. package/dist/{sankey-B4PNKusJ.js → sankey-D6JeZfK5.js} +33 -29
  270. package/dist/sankey-D6JeZfK5.js.map +1 -0
  271. package/dist/{sankey-Bm518bqL.d.ts → sankey-D_v7KxnJ.d.ts} +4 -7
  272. package/dist/{sankey-B9JYnx7e.d.cts → sankey-Dk7jUt8x.d.cts} +4 -7
  273. package/dist/{sankey-Bacx4fVe.cjs → sankey-fCoo1cpz.cjs} +33 -29
  274. package/dist/sankey-fCoo1cpz.cjs.map +1 -0
  275. package/dist/sankey.cjs +1 -1
  276. package/dist/sankey.d.cts +2 -1
  277. package/dist/sankey.d.ts +2 -1
  278. package/dist/sankey.js +1 -2
  279. package/dist/{scatter-kgtgR318.js → scatter-C0TWjFpW.js} +21 -18
  280. package/dist/scatter-C0TWjFpW.js.map +1 -0
  281. package/dist/{scatter-Bl7nasE6.d.ts → scatter-CXEsioOJ.d.ts} +8 -9
  282. package/dist/{scatter-DgMN9zRy.cjs → scatter-DVqB_fP9.cjs} +21 -18
  283. package/dist/scatter-DVqB_fP9.cjs.map +1 -0
  284. package/dist/{scatter-DrJ8xYz4.d.cts → scatter-DZeEIfyo.d.cts} +8 -9
  285. package/dist/scatter.cjs +1 -1
  286. package/dist/scatter.d.cts +2 -1
  287. package/dist/scatter.d.ts +2 -1
  288. package/dist/scatter.js +1 -2
  289. package/dist/{sparkline-BS9-hltA.cjs → sparkline-B39NA0Mi.cjs} +14 -13
  290. package/dist/sparkline-B39NA0Mi.cjs.map +1 -0
  291. package/dist/{sparkline-BG13V4Pz.d.cts → sparkline-DAP6jtzw.d.cts} +5 -8
  292. package/dist/{sparkline-BQzt27Fr.js → sparkline-XO_TqCNP.js} +14 -13
  293. package/dist/sparkline-XO_TqCNP.js.map +1 -0
  294. package/dist/{sparkline-iWuXbKpd.d.ts → sparkline-cbvRkWqS.d.ts} +5 -8
  295. package/dist/sparkline.cjs +1 -1
  296. package/dist/sparkline.d.cts +2 -1
  297. package/dist/sparkline.d.ts +2 -1
  298. package/dist/sparkline.js +1 -2
  299. package/dist/{stack-DRbwTeF3.js → stack-2H2Gfs1Q.js} +3 -4
  300. package/dist/{stack-DRbwTeF3.js.map → stack-2H2Gfs1Q.js.map} +1 -1
  301. package/dist/{stack-DVhJWaki.cjs → stack-BgPzoQmv.cjs} +3 -4
  302. package/dist/{stack-DVhJWaki.cjs.map → stack-BgPzoQmv.cjs.map} +1 -1
  303. package/dist/{stack-CpR6RGKd.d.ts → stack-DR0eQTsB.d.ts} +1 -4
  304. package/dist/{stack-CpR6RGKd.d.cts → stack-Dagxq7l2.d.cts} +2 -4
  305. package/dist/style.css +1 -1
  306. package/dist/sweep-BpRPlhs6.js +59 -0
  307. package/dist/sweep-BpRPlhs6.js.map +1 -0
  308. package/dist/sweep-Dnp6LDBz.cjs +70 -0
  309. package/dist/sweep-Dnp6LDBz.cjs.map +1 -0
  310. package/dist/{time-CNVnt-B2.d.cts → time-B4oxWHQI.d.cts} +2 -7
  311. package/dist/{time-CHjiY9Q4.d.ts → time-DRIDgv2a.d.ts} +2 -7
  312. package/dist/{time-axis-VSX34_Tb.cjs → time-axis-BjZ1bYTK.cjs} +9 -10
  313. package/dist/{time-axis-VSX34_Tb.cjs.map → time-axis-BjZ1bYTK.cjs.map} +1 -1
  314. package/dist/{time-axis-Bc9eHX1r.js → time-axis-FLONo54E.js} +9 -10
  315. package/dist/{time-axis-Bc9eHX1r.js.map → time-axis-FLONo54E.js.map} +1 -1
  316. package/dist/time.cjs +4 -6
  317. package/dist/time.cjs.map +1 -1
  318. package/dist/time.d.cts +1 -1
  319. package/dist/time.d.ts +1 -1
  320. package/dist/time.js +4 -5
  321. package/dist/treemap-BAkhmVQc.d.cts +55 -0
  322. package/dist/treemap-BNpxFBao.d.ts +55 -0
  323. package/dist/treemap-BWpEUlDh.cjs +303 -0
  324. package/dist/treemap-BWpEUlDh.cjs.map +1 -0
  325. package/dist/treemap-CQdavQ9u.js +298 -0
  326. package/dist/treemap-CQdavQ9u.js.map +1 -0
  327. package/dist/treemap.cjs +3 -0
  328. package/dist/treemap.d.cts +3 -0
  329. package/dist/treemap.d.ts +3 -0
  330. package/dist/treemap.js +1 -0
  331. package/dist/{tween-BCYd0RTY.js → tween-BdQqUmmv.js} +2 -3
  332. package/dist/{tween-BCYd0RTY.js.map → tween-BdQqUmmv.js.map} +1 -1
  333. package/dist/{tween-CIGBlryn.cjs → tween-c3aOmfKE.cjs} +2 -3
  334. package/dist/{tween-CIGBlryn.cjs.map → tween-c3aOmfKE.cjs.map} +1 -1
  335. package/dist/{value-labels-IZIQPhfk.js → value-labels-BBuSi4i0.js} +7 -7
  336. package/dist/value-labels-BBuSi4i0.js.map +1 -0
  337. package/dist/{value-labels-B0WJoJ7x.cjs → value-labels-BV9keAuL.cjs} +7 -7
  338. package/dist/value-labels-BV9keAuL.cjs.map +1 -0
  339. package/dist/value-labels.cjs +3 -5
  340. package/dist/value-labels.cjs.map +1 -1
  341. package/dist/value-labels.d.cts +5 -1
  342. package/dist/value-labels.d.ts +5 -1
  343. package/dist/value-labels.js +3 -4
  344. package/dist/{vnode-CkQ27Cxe.cjs → vnode-ClAiw28x.cjs} +2 -3
  345. package/dist/{vnode-CkQ27Cxe.cjs.map → vnode-ClAiw28x.cjs.map} +1 -1
  346. package/dist/{vnode-BUflsBsa.d.ts → vnode-Du2cC8Fm.d.cts} +1 -4
  347. package/dist/{vnode-BUflsBsa.d.cts → vnode-Du2cC8Fm.d.ts} +1 -4
  348. package/dist/{vnode-tCWItoUH.js → vnode-_EMUqysL.js} +2 -3
  349. package/dist/{vnode-tCWItoUH.js.map → vnode-_EMUqysL.js.map} +1 -1
  350. package/package.json +31 -1
  351. package/dist/bar-C-7zR2qp.cjs.map +0 -1
  352. package/dist/bar-jZEoao74.js.map +0 -1
  353. package/dist/cartesian-BoDfgBCV.cjs.map +0 -1
  354. package/dist/cartesian-Cr0AF0nG.js.map +0 -1
  355. package/dist/chart-BF2CK9I_.js.map +0 -1
  356. package/dist/chart-CowF_lWY.cjs.map +0 -1
  357. package/dist/core-C7fPm6t7.cjs.map +0 -1
  358. package/dist/core-plobgBC7.js.map +0 -1
  359. package/dist/gauge-CEfkWXSu.cjs.map +0 -1
  360. package/dist/heatmap-BK18EBgJ.cjs.map +0 -1
  361. package/dist/heatmap-DSZ2bVIa.js.map +0 -1
  362. package/dist/hydrate-CxwTXDqO.cjs.map +0 -1
  363. package/dist/layout-B3hiqVEw.js.map +0 -1
  364. package/dist/layout-CtMBhNd9.cjs.map +0 -1
  365. package/dist/morph-CqYDu1bY.cjs.map +0 -1
  366. package/dist/pie-C1Pa6W_l.cjs.map +0 -1
  367. package/dist/pie-RnMTQWMS.js.map +0 -1
  368. package/dist/sankey-B4PNKusJ.js.map +0 -1
  369. package/dist/sankey-Bacx4fVe.cjs.map +0 -1
  370. package/dist/scatter-DgMN9zRy.cjs.map +0 -1
  371. package/dist/scatter-kgtgR318.js.map +0 -1
  372. package/dist/sparkline-BQzt27Fr.js.map +0 -1
  373. package/dist/sparkline-BS9-hltA.cjs.map +0 -1
  374. package/dist/sweep-Duowaput.cjs.map +0 -1
  375. package/dist/sweep-WSgn2etB.js.map +0 -1
  376. package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
  377. package/dist/value-labels-IZIQPhfk.js.map +0 -1
@@ -0,0 +1,55 @@
1
+ import { a as ChartType } from "./chart-kqFMEwDo.cjs";
2
+ import { c as NumberFormat } from "./time-B4oxWHQI.cjs";
3
+ import { a as InsetsInput } from "./annotations-CHafaGd4.cjs";
4
+ import { a as ClassValue } from "./vnode-Du2cC8Fm.cjs";
5
+ /** A tile of a treemap, or a group of them. */
6
+ interface TreemapNode {
7
+ name: string;
8
+ /** Size of the tile; a negative value is zero. A group is as large as its `children`. */
9
+ value?: number;
10
+ /** Tiles (or groups) inside this one; they share its color. */
11
+ children?: readonly TreemapNode[];
12
+ /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */
13
+ id?: string;
14
+ /**
15
+ * Custom color; overrides the palette slot via `--tc-series-color`.
16
+ * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
17
+ */
18
+ color?: string;
19
+ /** Extra classes on the group (top level) or the tile. */
20
+ class?: ClassValue;
21
+ /** Start hidden (top level; toggle it back from the legend). */
22
+ hidden?: boolean;
23
+ }
24
+ interface TreemapOptions {
25
+ /** Tiles, or groups of tiles; each top-level entry takes a palette color and a legend entry. */
26
+ data: readonly TreemapNode[];
27
+ /** Space between tiles in pixels. Defaults to `2`. */
28
+ gap?: number;
29
+ /** Corner radius of the tiles. Defaults to `3`. */
30
+ radius?: number;
31
+ /** Names (and values, where they fit) written in the tiles. Defaults to `true`. */
32
+ labels?: boolean;
33
+ /** Format of the values (tiles, tooltip, table). */
34
+ format?: NumberFormat;
35
+ /** Extra space around the chart, in pixels. */
36
+ padding?: InsetsInput;
37
+ }
38
+ /**
39
+ * Treemap: parts of a whole as tiles, each as large as its value, laid out
40
+ * as close to squares as they go with the largest in the top left corner.
41
+ * Entries with `children` are groups: their tiles stay together and share
42
+ * the group's color.
43
+ *
44
+ * ```ts
45
+ * new Chart('#el', {
46
+ * type: treemap,
47
+ * data: [
48
+ * { name: 'Search', value: 42 },
49
+ * { name: 'Social', children: [{ name: 'Video', value: 18 }, { name: 'Posts', value: 9 }] },
50
+ * ],
51
+ * })
52
+ * ```
53
+ */
54
+ declare const treemap: ChartType<TreemapOptions>;
55
+ export { TreemapOptions as n, treemap as r, TreemapNode as t };
@@ -0,0 +1,55 @@
1
+ import { a as ChartType } from "./chart-QilhWP8Z.js";
2
+ import { c as NumberFormat } from "./time-DRIDgv2a.js";
3
+ import { a as InsetsInput } from "./annotations-B02GR_KU.js";
4
+ import { a as ClassValue } from "./vnode-Du2cC8Fm.js";
5
+ /** A tile of a treemap, or a group of them. */
6
+ interface TreemapNode {
7
+ name: string;
8
+ /** Size of the tile; a negative value is zero. A group is as large as its `children`. */
9
+ value?: number;
10
+ /** Tiles (or groups) inside this one; they share its color. */
11
+ children?: readonly TreemapNode[];
12
+ /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */
13
+ id?: string;
14
+ /**
15
+ * Custom color; overrides the palette slot via `--tc-series-color`.
16
+ * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
17
+ */
18
+ color?: string;
19
+ /** Extra classes on the group (top level) or the tile. */
20
+ class?: ClassValue;
21
+ /** Start hidden (top level; toggle it back from the legend). */
22
+ hidden?: boolean;
23
+ }
24
+ interface TreemapOptions {
25
+ /** Tiles, or groups of tiles; each top-level entry takes a palette color and a legend entry. */
26
+ data: readonly TreemapNode[];
27
+ /** Space between tiles in pixels. Defaults to `2`. */
28
+ gap?: number;
29
+ /** Corner radius of the tiles. Defaults to `3`. */
30
+ radius?: number;
31
+ /** Names (and values, where they fit) written in the tiles. Defaults to `true`. */
32
+ labels?: boolean;
33
+ /** Format of the values (tiles, tooltip, table). */
34
+ format?: NumberFormat;
35
+ /** Extra space around the chart, in pixels. */
36
+ padding?: InsetsInput;
37
+ }
38
+ /**
39
+ * Treemap: parts of a whole as tiles, each as large as its value, laid out
40
+ * as close to squares as they go with the largest in the top left corner.
41
+ * Entries with `children` are groups: their tiles stay together and share
42
+ * the group's color.
43
+ *
44
+ * ```ts
45
+ * new Chart('#el', {
46
+ * type: treemap,
47
+ * data: [
48
+ * { name: 'Search', value: 42 },
49
+ * { name: 'Social', children: [{ name: 'Video', value: 18 }, { name: 'Posts', value: 9 }] },
50
+ * ],
51
+ * })
52
+ * ```
53
+ */
54
+ declare const treemap: ChartType<TreemapOptions>;
55
+ export { TreemapOptions as n, treemap as r, TreemapNode as t };
@@ -0,0 +1,303 @@
1
+ const require_format = require("./format-CAE5ruy6.cjs");
2
+ const require_layout = require("./layout-JY2aR-yE.cjs");
3
+ const require_rect = require("./rect-D6VhynBM.cjs");
4
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
5
+ const require_clean = require("./clean-Die2iCNc.cjs");
6
+ const require_named = require("./named-BBASc8dW.cjs");
7
+ // src/charts/treemap.ts
8
+ /** Levels of nesting read from the data, and the most nodes: enough for any chart, few enough to draw. */
9
+ const MAX_DEPTH = 8;
10
+ const MAX_NODES = 5e3;
11
+ /** Space between a tile's edge and its text. */
12
+ const INSET = 6;
13
+ function sized(nodes) {
14
+ return nodes.map((node) => {
15
+ if (node.children?.length) {
16
+ const children = sized(node.children);
17
+ return {
18
+ node,
19
+ children,
20
+ value: children.reduce((sum, child) => sum + child.value, 0)
21
+ };
22
+ }
23
+ return {
24
+ node,
25
+ value: Math.max(0, node.value ?? 0)
26
+ };
27
+ });
28
+ }
29
+ /** The top-level entries with their sizes and color slots, without the hidden ones. */
30
+ function visible(options, hidden) {
31
+ return sized(options.data).map((entry, index) => ({
32
+ entry,
33
+ index
34
+ })).filter(({ entry }) => !hidden.has(require_named.keyOf(entry.node)));
35
+ }
36
+ /**
37
+ * Squarified layout (Bruls, Huizing, van Wijk): `items`, largest first, fill
38
+ * the rectangle in rows along its shorter side, each row closed as soon as
39
+ * another item would make its tiles less square.
40
+ */
41
+ function squarify(items, x, y, w, hgt, place) {
42
+ const sorted = items.filter((item) => item.value > 0).sort((a, b) => b.value - a.value);
43
+ let left = sorted.reduce((sum, item) => sum + item.value, 0);
44
+ let i = 0;
45
+ while (i < sorted.length && w > 0 && hgt > 0) {
46
+ const short = Math.min(w, hgt);
47
+ const k = w * hgt / left;
48
+ const largest = sorted[i].value;
49
+ let sum = 0;
50
+ let best = Number.POSITIVE_INFINITY;
51
+ let j = i;
52
+ for (; j < sorted.length; j++) {
53
+ const next = sum + sorted[j].value;
54
+ const t2 = (next * k / short) ** 2;
55
+ const worst = Math.max(t2 / (sorted[j].value * k), largest * k / t2);
56
+ if (worst > best) break;
57
+ best = worst;
58
+ sum = next;
59
+ }
60
+ const thickness = sum * k / short;
61
+ let offset = 0;
62
+ for (; i < j; i++) {
63
+ const item = sorted[i];
64
+ const length = item.value * k / thickness;
65
+ if (w >= hgt) place(item, x, y + offset, thickness, length);
66
+ else place(item, x + offset, y, length, thickness);
67
+ offset += length;
68
+ }
69
+ if (w >= hgt) {
70
+ x += thickness;
71
+ w -= thickness;
72
+ } else {
73
+ y += thickness;
74
+ hgt -= thickness;
75
+ }
76
+ left -= sum;
77
+ }
78
+ }
79
+ /**
80
+ * The tiles of `items` in a rectangle, groups laid out inside their own.
81
+ * The gap is cut from the tiles after they are placed, so it does not change
82
+ * their arrangement: half of it on every side (a whole one between any two
83
+ * neighbors), none at the edge of the chart. `edges` are the half gaps of
84
+ * the rectangle itself.
85
+ */
86
+ function layout(items, x, y, w, hgt, gap, out, edges, top, slots) {
87
+ squarify(items, x, y, w, hgt, (item, tx, ty, tw, th) => {
88
+ const index = top?.index ?? slots?.[items.indexOf(item)];
89
+ const key = top ? `${top.key}/${require_named.keyOf(item.node)}` : require_named.keyOf(item.node);
90
+ const trail = top?.trail ?? [];
91
+ const near = .01;
92
+ const sides = [
93
+ tx - x < near ? edges[0] : 1,
94
+ ty - y < near ? edges[1] : 1,
95
+ x + w - tx - tw < near ? edges[2] : 1,
96
+ y + hgt - ty - th < near ? edges[3] : 1
97
+ ];
98
+ if (item.children) layout(item.children, tx, ty, tw, th, gap, out, sides, {
99
+ index,
100
+ key,
101
+ trail: [...trail, item.node.name]
102
+ });
103
+ else {
104
+ const half = gap / 2;
105
+ out.push({
106
+ node: item.node,
107
+ key,
108
+ top: index,
109
+ trail,
110
+ value: item.value,
111
+ x: tx + sides[0] * half,
112
+ y: ty + sides[1] * half,
113
+ width: Math.max(0, tw - (sides[0] + sides[2]) * half),
114
+ height: Math.max(0, th - (sides[1] + sides[3]) * half)
115
+ });
116
+ }
117
+ });
118
+ }
119
+ /** `text` cut to `width` pixels with an ellipsis, or `''` when not even a few letters fit. */
120
+ function fit(text, width, fontSize) {
121
+ if (require_layout.estimateTextWidth(text, fontSize) <= width) return text;
122
+ const chars = [...text];
123
+ while (chars.length > 2) {
124
+ chars.pop();
125
+ const cut = `${chars.join("").trimEnd()}…`;
126
+ if (require_layout.estimateTextWidth(cut, fontSize) <= width) return cut;
127
+ }
128
+ return "";
129
+ }
130
+ function renderTreemap(options, ctx) {
131
+ const { width, height, fontSize, locale } = ctx;
132
+ const gap = Math.max(0, options.gap ?? 2);
133
+ const radius = Math.max(0, options.radius ?? 3);
134
+ const area = require_layout.innerRect(width, height, require_layout.insets(options.padding, 0));
135
+ const entries = visible(options, ctx.hidden);
136
+ const total = entries.reduce((sum, { entry }) => sum + entry.value, 0);
137
+ const tiles = [];
138
+ layout(entries.map(({ entry }) => entry), area.x, area.y, area.width, area.height, gap, tiles, [
139
+ 0,
140
+ 0,
141
+ 0,
142
+ 0
143
+ ], void 0, entries.map(({ index }) => index));
144
+ const value = require_format.formatNumber(options.format, locale);
145
+ const share = require_format.getNumberFormat(locale, {
146
+ style: "percent",
147
+ maximumFractionDigits: 1
148
+ });
149
+ const hitFor = (tile, index) => {
150
+ const x = tile.x + tile.width / 2;
151
+ const item = {
152
+ name: tile.node.name,
153
+ seriesIndex: tile.top,
154
+ value: tile.value,
155
+ text: `${value(tile.value)} (${share.format(total > 0 ? tile.value / total : 0)})`,
156
+ x,
157
+ y: tile.y + tile.height / 2
158
+ };
159
+ const color = tile.node.color ?? options.data[tile.top]?.color;
160
+ if (color) item.color = color;
161
+ return {
162
+ index,
163
+ label: [...tile.trail, tile.node.name].join(" › "),
164
+ title: tile.trail.join(" › "),
165
+ x,
166
+ area,
167
+ items: [item],
168
+ seriesIndex: tile.top,
169
+ mark: {
170
+ d: require_rect.rectPath(tile.x + 1, tile.y + 1, tile.width - 2, tile.height - 2, radius - 1),
171
+ x: 0,
172
+ y: 0
173
+ }
174
+ };
175
+ };
176
+ const interaction = {
177
+ count: tiles.length,
178
+ hitIndex: (index) => {
179
+ const tile = tiles[index];
180
+ return tile ? hitFor(tile, index) : null;
181
+ },
182
+ hitTest(px, py) {
183
+ const index = tiles.findIndex((tile) => px >= tile.x - gap / 2 && px <= tile.x + tile.width + gap / 2 && py >= tile.y - gap / 2 && py <= tile.y + tile.height + gap / 2);
184
+ return index < 0 ? null : hitFor(tiles[index], index);
185
+ }
186
+ };
187
+ ctx.onHitTest(interaction);
188
+ const groups = entries.map(({ entry, index }) => require_vnode.h("g", require_named.groupAttrs(entry.node, index), tiles.filter((tile) => tile.top === index).map((tile) => require_vnode.h("rect", {
189
+ key: tile.key,
190
+ class: ["tc-tile", tile.trail.length > 0 && tile.node.class],
191
+ x: require_layout.round(tile.x),
192
+ y: require_layout.round(tile.y),
193
+ width: require_layout.round(tile.width),
194
+ height: require_layout.round(tile.height),
195
+ rx: require_layout.round(Math.min(radius, tile.width / 2, tile.height / 2)),
196
+ style: tile.trail.length > 0 ? { "--tc-series-color": tile.node.color } : void 0
197
+ }))));
198
+ const line = fontSize * 1.3;
199
+ const labels = options.labels !== false && tiles.flatMap((tile) => {
200
+ const room = tile.width - 12;
201
+ const name = tile.height >= line + INSET ? fit(tile.node.name, room, fontSize) : "";
202
+ if (!name) return [];
203
+ const text = value(tile.value);
204
+ const x = require_layout.round(tile.x + INSET);
205
+ const y = tile.y + INSET + fontSize * .85;
206
+ return [require_vnode.h("text", {
207
+ key: tile.key,
208
+ class: "tc-treemap-label",
209
+ x,
210
+ y: require_layout.round(y)
211
+ }, name), tile.height >= line * 2 + INSET * 1.5 && require_layout.estimateTextWidth(text, fontSize) <= room && require_vnode.h("text", {
212
+ key: `${tile.key}/value`,
213
+ class: "tc-treemap-label tc-treemap-value",
214
+ x,
215
+ y: require_layout.round(y + line)
216
+ }, text)];
217
+ });
218
+ return [require_vnode.h("g", { class: "tc-treemap-tiles" }, groups), labels && require_vnode.h("g", {
219
+ class: "tc-treemap-labels",
220
+ "aria-hidden": "true"
221
+ }, labels)];
222
+ }
223
+ function treemapTable(options, ctx, limit) {
224
+ const entries = visible(options, ctx.hidden);
225
+ const total = entries.reduce((sum, { entry }) => sum + entry.value, 0);
226
+ const value = require_format.formatNumber(options.format, ctx.locale);
227
+ const share = require_format.getNumberFormat(ctx.locale, {
228
+ style: "percent",
229
+ maximumFractionDigits: 1
230
+ });
231
+ const rows = [];
232
+ const walk = (items, trail) => {
233
+ for (const item of items) {
234
+ const path = [...trail, item.node.name];
235
+ if (item.children) walk(item.children, path);
236
+ else rows.push([
237
+ path.join(" › "),
238
+ value(item.value),
239
+ share.format(total > 0 ? item.value / total : 0)
240
+ ]);
241
+ }
242
+ };
243
+ walk(entries.map(({ entry }) => entry), []);
244
+ const table = {
245
+ columns: [
246
+ "",
247
+ "Value",
248
+ "Share"
249
+ ],
250
+ rows
251
+ };
252
+ if (rows.length > limit) {
253
+ table.rows = rows.slice(0, limit);
254
+ table.total = rows.length;
255
+ }
256
+ return table;
257
+ }
258
+ /** Nodes with text for names and finite values, at most `MAX_DEPTH` deep and `MAX_NODES` in all. */
259
+ function cleanNodes(data, depth = 0, budget = { left: MAX_NODES }) {
260
+ const nodes = [];
261
+ for (const r of require_clean.list(data)) {
262
+ if (!require_clean.isRecord(r) || budget.left <= 0) continue;
263
+ budget.left--;
264
+ const children = depth < MAX_DEPTH && Array.isArray(r.children) ? cleanNodes(r.children, depth + 1, budget) : void 0;
265
+ nodes.push({
266
+ ...require_clean.named(r),
267
+ value: require_clean.finite(r.value) ?? 0,
268
+ children
269
+ });
270
+ }
271
+ return nodes;
272
+ }
273
+ /**
274
+ * Treemap: parts of a whole as tiles, each as large as its value, laid out
275
+ * as close to squares as they go with the largest in the top left corner.
276
+ * Entries with `children` are groups: their tiles stay together and share
277
+ * the group's color.
278
+ *
279
+ * ```ts
280
+ * new Chart('#el', {
281
+ * type: treemap,
282
+ * data: [
283
+ * { name: 'Search', value: 42 },
284
+ * { name: 'Social', children: [{ name: 'Video', value: 18 }, { name: 'Posts', value: 9 }] },
285
+ * ],
286
+ * })
287
+ * ```
288
+ */
289
+ const treemap = {
290
+ name: "treemap",
291
+ clean: require_clean.cleanData((data) => cleanNodes(data)),
292
+ render: renderTreemap,
293
+ legend: (options) => require_named.legendItems(options.data),
294
+ table: treemapTable
295
+ };
296
+ Object.defineProperty(exports, "treemap", {
297
+ enumerable: true,
298
+ get: function() {
299
+ return treemap;
300
+ }
301
+ });
302
+
303
+ //# sourceMappingURL=treemap-BWpEUlDh.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treemap-BWpEUlDh.cjs","names":["keyOf","estimateTextWidth","innerRect","insets","formatNumber","getNumberFormat","rectPath","h","groupAttrs","round","list","isRecord","named","finite","cleanData","legendItems"],"sources":["../src/charts/treemap.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext } from '../chart.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { estimateTextWidth, type InsetsInput, innerRect, insets, round } from '../layout.ts'\nimport { rectPath } from '../shapes/rect.ts'\nimport { type ChildInput, type ClassValue, h } from '../vnode.ts'\nimport { cleanData, finite, isRecord, list, named } from './clean.ts'\nimport { groupAttrs, keyOf, legendItems } from './named.ts'\n\n/** A tile of a treemap, or a group of them. */\nexport interface TreemapNode {\n name: string\n /** Size of the tile; a negative value is zero. A group is as large as its `children`. */\n value?: number\n /** Tiles (or groups) inside this one; they share its color. */\n children?: readonly TreemapNode[]\n /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the group (top level) or the tile. */\n class?: ClassValue\n /** Start hidden (top level; toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface TreemapOptions {\n /** Tiles, or groups of tiles; each top-level entry takes a palette color and a legend entry. */\n data: readonly TreemapNode[]\n /** Space between tiles in pixels. Defaults to `2`. */\n gap?: number\n /** Corner radius of the tiles. Defaults to `3`. */\n radius?: number\n /** Names (and values, where they fit) written in the tiles. Defaults to `true`. */\n labels?: boolean\n /** Format of the values (tiles, tooltip, table). */\n format?: NumberFormat\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** Levels of nesting read from the data, and the most nodes: enough for any chart, few enough to draw. */\nconst MAX_DEPTH = 8\nconst MAX_NODES = 5000\n\n/** Space between a tile's edge and its text. */\nconst INSET = 6\n\n/** A node with its size worked out. */\ninterface Sized {\n node: TreemapNode\n value: number\n children?: Sized[]\n}\n\ninterface Tile {\n node: TreemapNode\n key: string\n /** Position of the top-level ancestor in `data` (the color slot). */\n top: number\n /** Names of the ancestors, outermost first. */\n trail: readonly string[]\n value: number\n x: number\n y: number\n width: number\n height: number\n}\n\nfunction sized(nodes: readonly TreemapNode[]): Sized[] {\n return nodes.map((node) => {\n if (node.children?.length) {\n const children = sized(node.children)\n return { node, children, value: children.reduce((sum, child) => sum + child.value, 0) }\n }\n return { node, value: Math.max(0, node.value ?? 0) }\n })\n}\n\n/** The top-level entries with their sizes and color slots, without the hidden ones. */\nfunction visible(options: TreemapOptions, hidden: ReadonlySet<string>) {\n return sized(options.data)\n .map((entry, index) => ({ entry, index }))\n .filter(({ entry }) => !hidden.has(keyOf(entry.node)))\n}\n\n/**\n * Squarified layout (Bruls, Huizing, van Wijk): `items`, largest first, fill\n * the rectangle in rows along its shorter side, each row closed as soon as\n * another item would make its tiles less square.\n */\nfunction squarify(\n items: readonly Sized[],\n x: number,\n y: number,\n w: number,\n hgt: number,\n place: (item: Sized, x: number, y: number, w: number, hgt: number) => void,\n): void {\n const sorted = items.filter((item) => item.value > 0).sort((a, b) => b.value - a.value)\n let left = sorted.reduce((sum, item) => sum + item.value, 0)\n let i = 0\n while (i < sorted.length && w > 0 && hgt > 0) {\n const short = Math.min(w, hgt)\n // Pixels of area per unit of value in what is left of the rectangle.\n const k = (w * hgt) / left\n const largest = (sorted[i] as Sized).value\n let sum = 0\n let best = Number.POSITIVE_INFINITY\n let j = i\n for (; j < sorted.length; j++) {\n const next = sum + (sorted[j] as Sized).value\n // Thickness of the row squared: its worst tile is the largest or the smallest.\n const t2 = ((next * k) / short) ** 2\n const worst = Math.max(t2 / ((sorted[j] as Sized).value * k), (largest * k) / t2)\n if (worst > best) break\n best = worst\n sum = next\n }\n const thickness = (sum * k) / short\n let offset = 0\n for (; i < j; i++) {\n const item = sorted[i] as Sized\n const length = (item.value * k) / thickness\n if (w >= hgt) place(item, x, y + offset, thickness, length)\n else place(item, x + offset, y, length, thickness)\n offset += length\n }\n if (w >= hgt) {\n x += thickness\n w -= thickness\n } else {\n y += thickness\n hgt -= thickness\n }\n left -= sum\n }\n}\n\n/** Half gaps left around a tile on its left, top, right and bottom side. */\ntype Edges = readonly [number, number, number, number]\n\n/**\n * The tiles of `items` in a rectangle, groups laid out inside their own.\n * The gap is cut from the tiles after they are placed, so it does not change\n * their arrangement: half of it on every side (a whole one between any two\n * neighbors), none at the edge of the chart. `edges` are the half gaps of\n * the rectangle itself.\n */\nfunction layout(\n items: readonly Sized[],\n x: number,\n y: number,\n w: number,\n hgt: number,\n gap: number,\n out: Tile[],\n edges: Edges,\n top?: { index: number; key: string; trail: readonly string[] },\n slots?: readonly number[],\n): void {\n squarify(items, x, y, w, hgt, (item, tx, ty, tw, th) => {\n const index = top?.index ?? (slots?.[items.indexOf(item)] as number)\n const key = top ? `${top.key}/${keyOf(item.node)}` : keyOf(item.node)\n const trail = top?.trail ?? []\n // A side on the border of the rectangle takes its half gap (none at the chart's edge), the others one.\n const near = 0.01\n const sides: Edges = [\n tx - x < near ? edges[0] : 1,\n ty - y < near ? edges[1] : 1,\n x + w - tx - tw < near ? edges[2] : 1,\n y + hgt - ty - th < near ? edges[3] : 1,\n ]\n if (item.children) {\n layout(item.children, tx, ty, tw, th, gap, out, sides, {\n index,\n key,\n trail: [...trail, item.node.name],\n })\n } else {\n const half = gap / 2\n out.push({\n node: item.node,\n key,\n top: index,\n trail,\n value: item.value,\n x: tx + sides[0] * half,\n y: ty + sides[1] * half,\n width: Math.max(0, tw - (sides[0] + sides[2]) * half),\n height: Math.max(0, th - (sides[1] + sides[3]) * half),\n })\n }\n })\n}\n\n/** `text` cut to `width` pixels with an ellipsis, or `''` when not even a few letters fit. */\nfunction fit(text: string, width: number, fontSize: number): string {\n if (estimateTextWidth(text, fontSize) <= width) return text\n const chars = [...text]\n while (chars.length > 2) {\n chars.pop()\n const cut = `${chars.join('').trimEnd()}…`\n if (estimateTextWidth(cut, fontSize) <= width) return cut\n }\n return ''\n}\n\nfunction renderTreemap(options: TreemapOptions, ctx: RenderContext): ChildInput {\n const { width, height, fontSize, locale } = ctx\n const gap = Math.max(0, options.gap ?? 2)\n const radius = Math.max(0, options.radius ?? 3)\n const area = innerRect(width, height, insets(options.padding, 0))\n const entries = visible(options, ctx.hidden)\n const total = entries.reduce((sum, { entry }) => sum + entry.value, 0)\n\n const tiles: Tile[] = []\n layout(\n entries.map(({ entry }) => entry),\n area.x,\n area.y,\n area.width,\n area.height,\n gap,\n tiles,\n [0, 0, 0, 0],\n undefined,\n entries.map(({ index }) => index),\n )\n\n const value = formatNumber(options.format, locale)\n const share = getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 })\n const hitFor = (tile: Tile, index: number): Hit => {\n const x = tile.x + tile.width / 2\n const item: HitItem = {\n name: tile.node.name,\n seriesIndex: tile.top,\n value: tile.value,\n text: `${value(tile.value)} (${share.format(total > 0 ? tile.value / total : 0)})`,\n x,\n y: tile.y + tile.height / 2,\n }\n const color = tile.node.color ?? options.data[tile.top]?.color\n if (color) item.color = color\n return {\n index,\n label: [...tile.trail, tile.node.name].join(' › '),\n title: tile.trail.join(' › '),\n x,\n area,\n items: [item],\n seriesIndex: tile.top,\n // A ring just inside the hovered tile.\n mark: {\n d: rectPath(tile.x + 1, tile.y + 1, tile.width - 2, tile.height - 2, radius - 1),\n x: 0,\n y: 0,\n },\n }\n }\n\n const interaction: Interaction = {\n count: tiles.length,\n hitIndex: (index) => {\n const tile = tiles[index]\n return tile ? hitFor(tile, index) : null\n },\n hitTest(px, py) {\n const index = tiles.findIndex(\n (tile) =>\n px >= tile.x - gap / 2 &&\n px <= tile.x + tile.width + gap / 2 &&\n py >= tile.y - gap / 2 &&\n py <= tile.y + tile.height + gap / 2,\n )\n return index < 0 ? null : hitFor(tiles[index] as Tile, index)\n },\n }\n ctx.onHitTest(interaction)\n\n const groups = entries.map(({ entry, index }) =>\n h(\n 'g',\n groupAttrs(entry.node, index),\n tiles\n .filter((tile) => tile.top === index)\n .map((tile) =>\n h('rect', {\n key: tile.key,\n class: ['tc-tile', tile.trail.length > 0 && tile.node.class],\n x: round(tile.x),\n y: round(tile.y),\n width: round(tile.width),\n height: round(tile.height),\n rx: round(Math.min(radius, tile.width / 2, tile.height / 2)),\n // A tile inside a group may have a color of its own.\n style: tile.trail.length > 0 ? { '--tc-series-color': tile.node.color } : undefined,\n }),\n ),\n ),\n )\n\n // Names where a few letters fit, values below where there is a second line.\n const line = fontSize * 1.3\n const labels =\n options.labels !== false &&\n tiles.flatMap((tile) => {\n const room = tile.width - INSET * 2\n const name = tile.height >= line + INSET ? fit(tile.node.name, room, fontSize) : ''\n if (!name) return []\n const text = value(tile.value)\n const x = round(tile.x + INSET)\n const y = tile.y + INSET + fontSize * 0.85\n return [\n h('text', { key: tile.key, class: 'tc-treemap-label', x, y: round(y) }, name),\n tile.height >= line * 2 + INSET * 1.5 &&\n estimateTextWidth(text, fontSize) <= room &&\n h(\n 'text',\n {\n key: `${tile.key}/value`,\n class: 'tc-treemap-label tc-treemap-value',\n x,\n y: round(y + line),\n },\n text,\n ),\n ]\n })\n\n return [\n h('g', { class: 'tc-treemap-tiles' }, groups),\n labels && h('g', { class: 'tc-treemap-labels', 'aria-hidden': 'true' }, labels),\n ]\n}\n\nfunction treemapTable(options: TreemapOptions, ctx: RenderContext, limit: number): DataTable {\n const entries = visible(options, ctx.hidden)\n const total = entries.reduce((sum, { entry }) => sum + entry.value, 0)\n const value = formatNumber(options.format, ctx.locale)\n const share = getNumberFormat(ctx.locale, { style: 'percent', maximumFractionDigits: 1 })\n const rows: string[][] = []\n const walk = (items: readonly Sized[], trail: readonly string[]) => {\n for (const item of items) {\n const path = [...trail, item.node.name]\n if (item.children) walk(item.children, path)\n else {\n rows.push([\n path.join(' › '),\n value(item.value),\n share.format(total > 0 ? item.value / total : 0),\n ])\n }\n }\n }\n walk(\n entries.map(({ entry }) => entry),\n [],\n )\n const table: DataTable = { columns: ['', 'Value', 'Share'], rows }\n if (rows.length > limit) {\n table.rows = rows.slice(0, limit)\n table.total = rows.length\n }\n return table\n}\n\n/** Nodes with text for names and finite values, at most `MAX_DEPTH` deep and `MAX_NODES` in all. */\nfunction cleanNodes(data: unknown, depth = 0, budget = { left: MAX_NODES }): TreemapNode[] {\n const nodes: TreemapNode[] = []\n for (const r of list(data)) {\n if (!isRecord(r) || budget.left <= 0) continue\n budget.left--\n const children =\n depth < MAX_DEPTH && Array.isArray(r.children)\n ? cleanNodes(r.children, depth + 1, budget)\n : undefined\n nodes.push({ ...named(r), value: finite(r.value) ?? 0, children } as unknown as TreemapNode)\n }\n return nodes\n}\n\n/**\n * Treemap: parts of a whole as tiles, each as large as its value, laid out\n * as close to squares as they go with the largest in the top left corner.\n * Entries with `children` are groups: their tiles stay together and share\n * the group's color.\n *\n * ```ts\n * new Chart('#el', {\n * type: treemap,\n * data: [\n * { name: 'Search', value: 42 },\n * { name: 'Social', children: [{ name: 'Video', value: 18 }, { name: 'Posts', value: 9 }] },\n * ],\n * })\n * ```\n */\nexport const treemap: ChartType<TreemapOptions> = {\n name: 'treemap',\n clean: cleanData((data) => cleanNodes(data)),\n render: renderTreemap,\n legend: (options) => legendItems(options.data),\n table: treemapTable,\n}\n"],"mappings":";;;;;;;;AA8CA,MAAM,YAAY;AAClB,MAAM,YAAY;;AAGlB,MAAM,QAAQ;AAuBd,SAAS,MAAM,OAAwC;CACrD,OAAO,MAAM,KAAK,SAAS;EACzB,IAAI,KAAK,UAAU,QAAQ;GACzB,MAAM,WAAW,MAAM,KAAK,QAAQ;GACpC,OAAO;IAAE;IAAM;IAAU,OAAO,SAAS,QAAQ,KAAK,UAAU,MAAM,MAAM,OAAO,CAAC;GAAE;EACxF;EACA,OAAO;GAAE;GAAM,OAAO,KAAK,IAAI,GAAG,KAAK,SAAS,CAAC;EAAE;CACrD,CAAC;AACH;;AAGA,SAAS,QAAQ,SAAyB,QAA6B;CACrE,OAAO,MAAM,QAAQ,IAAI,CAAC,CACvB,KAAK,OAAO,WAAW;EAAE;EAAO;CAAM,EAAE,CAAC,CACzC,QAAQ,EAAE,YAAY,CAAC,OAAO,IAAIA,cAAAA,MAAM,MAAM,IAAI,CAAC,CAAC;AACzD;;;;;;AAOA,SAAS,SACP,OACA,GACA,GACA,GACA,KACA,OACM;CACN,MAAM,SAAS,MAAM,QAAQ,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK;CACtF,IAAI,OAAO,OAAO,QAAQ,KAAK,SAAS,MAAM,KAAK,OAAO,CAAC;CAC3D,IAAI,IAAI;CACR,OAAO,IAAI,OAAO,UAAU,IAAI,KAAK,MAAM,GAAG;EAC5C,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