@tabler/charts 0.2.0 → 0.4.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 (420) hide show
  1. package/README.md +165 -17
  2. package/dist/{annotations-DdRdeBUB.cjs → annotations--m-HzMBM.cjs} +87 -11
  3. package/dist/annotations--m-HzMBM.cjs.map +1 -0
  4. package/dist/{annotations-B02GR_KU.d.ts → annotations-CCDUC1lW.d.ts} +16 -30
  5. package/dist/{annotations-CHafaGd4.d.cts → annotations-CqZM1z9R.d.cts} +16 -30
  6. package/dist/{annotations-D0YQ0IoA.js → annotations-DGITy6th.js} +87 -11
  7. package/dist/annotations-DGITy6th.js.map +1 -0
  8. package/dist/annotations.cjs +2 -2
  9. package/dist/annotations.d.cts +1 -1
  10. package/dist/annotations.d.ts +1 -1
  11. package/dist/annotations.js +2 -2
  12. package/dist/{area-0-L1bG9B.js → area-BN0uE9R0.js} +4 -3
  13. package/dist/area-BN0uE9R0.js.map +1 -0
  14. package/dist/{area-CJX9219z.d.cts → area-D6LNLk3r.d.cts} +2 -2
  15. package/dist/{area-d11XePuw.d.ts → area-DEFL-Yun.d.ts} +2 -2
  16. package/dist/{area-4eRs3c0K.cjs → area-D_N8b4Ng.cjs} +4 -3
  17. package/dist/area-D_N8b4Ng.cjs.map +1 -0
  18. package/dist/area.cjs +1 -1
  19. package/dist/area.d.cts +1 -1
  20. package/dist/area.d.ts +1 -1
  21. package/dist/area.js +1 -1
  22. package/dist/axis-BzBkkC5X.cjs +305 -0
  23. package/dist/axis-BzBkkC5X.cjs.map +1 -0
  24. package/dist/axis-C5obgdJt.js +240 -0
  25. package/dist/axis-C5obgdJt.js.map +1 -0
  26. package/dist/{bar-Da6dE_nI.cjs → bar-BrmfXugT.cjs} +77 -58
  27. package/dist/bar-BrmfXugT.cjs.map +1 -0
  28. package/dist/{bar-XwzM6Pb0.d.ts → bar-Bs_rPqgR.d.ts} +1 -1
  29. package/dist/{bar-BDLR4p9c.d.cts → bar-CEt8YRxf.d.cts} +2 -2
  30. package/dist/{bar-B5n2oq9-.js → bar-CgpC2EpX.js} +2 -2
  31. package/dist/{bar-B5n2oq9-.js.map → bar-CgpC2EpX.js.map} +1 -1
  32. package/dist/{bar-BNZ3GhIw.js → bar-D_KKd2fL.js} +75 -56
  33. package/dist/bar-D_KKd2fL.js.map +1 -0
  34. package/dist/{bar-LYIF8MEz.cjs → bar-wVykm1us.cjs} +2 -2
  35. package/dist/{bar-LYIF8MEz.cjs.map → bar-wVykm1us.cjs.map} +1 -1
  36. package/dist/bar.cjs +1 -1
  37. package/dist/bar.d.cts +1 -1
  38. package/dist/bar.d.ts +1 -1
  39. package/dist/bar.js +1 -1
  40. package/dist/calendar-B7843sQu.d.cts +106 -0
  41. package/dist/calendar-BG_q_NC_.cjs +507 -0
  42. package/dist/calendar-BG_q_NC_.cjs.map +1 -0
  43. package/dist/calendar-CF3gfDQk.js +502 -0
  44. package/dist/calendar-CF3gfDQk.js.map +1 -0
  45. package/dist/calendar-D10_ki1S.d.ts +106 -0
  46. package/dist/calendar.cjs +3 -0
  47. package/dist/calendar.d.cts +3 -0
  48. package/dist/calendar.d.ts +3 -0
  49. package/dist/calendar.js +1 -0
  50. package/dist/{candlestick-BHQkQfxH.js → candlestick-B1onjo1o.js} +17 -14
  51. package/dist/candlestick-B1onjo1o.js.map +1 -0
  52. package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-B7YXUVVh.d.cts} +4 -3
  53. package/dist/{candlestick-CYCQXgky.cjs → candlestick-BwrFKak_.cjs} +17 -14
  54. package/dist/candlestick-BwrFKak_.cjs.map +1 -0
  55. package/dist/{candlestick-D0xKkdqd.d.ts → candlestick-XpqJvarq.d.ts} +4 -3
  56. package/dist/candlestick.cjs +3 -3
  57. package/dist/candlestick.d.cts +1 -1
  58. package/dist/candlestick.d.ts +1 -1
  59. package/dist/candlestick.js +3 -3
  60. package/dist/{cartesian-DV02PsBe.cjs → cartesian-B9CrasFJ.cjs} +190 -310
  61. package/dist/cartesian-B9CrasFJ.cjs.map +1 -0
  62. package/dist/{cartesian-CI2x6N7N.js → cartesian-COglz544.js} +161 -251
  63. package/dist/cartesian-COglz544.js.map +1 -0
  64. package/dist/{chart-DWn9v6qw.js → chart-B97FBRCd.js} +114 -72
  65. package/dist/chart-B97FBRCd.js.map +1 -0
  66. package/dist/{chart-QilhWP8Z.d.ts → chart-CE9EVbfV.d.ts} +427 -112
  67. package/dist/{chart-kqFMEwDo.d.cts → chart-Dz4geQZy.d.cts} +427 -112
  68. package/dist/{chart-e2VqomCI.cjs → chart-GUmmjJ7S.cjs} +132 -78
  69. package/dist/chart-GUmmjJ7S.cjs.map +1 -0
  70. package/dist/{core-BKRQvPAT.js → core-7fgM3su0.js} +188 -73
  71. package/dist/core-7fgM3su0.js.map +1 -0
  72. package/dist/{core-DRUCk67j.d.ts → core-BUQzLsRJ.d.ts} +26 -10
  73. package/dist/{core-DIOC61up.cjs → core-BZTrsPxc.cjs} +200 -73
  74. package/dist/core-BZTrsPxc.cjs.map +1 -0
  75. package/dist/{core-PAX5ogLk.d.cts → core-Ck5uHcW8.d.cts} +45 -24
  76. package/dist/core.cjs +45 -31
  77. package/dist/core.d.cts +23 -18
  78. package/dist/core.d.ts +23 -18
  79. package/dist/core.js +28 -23
  80. package/dist/{dates-DurEr9WT.cjs → dates-0YNY49KQ.cjs} +2 -2
  81. package/dist/{dates-DurEr9WT.cjs.map → dates-0YNY49KQ.cjs.map} +1 -1
  82. package/dist/{dates-C2RzY3rE.js → dates-CKDRgpin.js} +2 -2
  83. package/dist/{dates-C2RzY3rE.js.map → dates-CKDRgpin.js.map} +1 -1
  84. package/dist/decimate.cjs +1 -1
  85. package/dist/decimate.js +1 -1
  86. package/dist/{dom-D_g13XWY.cjs → dom-C33zvtPo.cjs} +3 -7
  87. package/dist/dom-C33zvtPo.cjs.map +1 -0
  88. package/dist/{dom-CuceR8gt.js → dom-CTse6Rvd.js} +3 -7
  89. package/dist/dom-CTse6Rvd.js.map +1 -0
  90. package/dist/end-labels-B3oRvjxw.js +114 -0
  91. package/dist/end-labels-B3oRvjxw.js.map +1 -0
  92. package/dist/end-labels-CS-fnpp-.cjs +119 -0
  93. package/dist/end-labels-CS-fnpp-.cjs.map +1 -0
  94. package/dist/end-labels.cjs +11 -0
  95. package/dist/end-labels.cjs.map +1 -0
  96. package/dist/end-labels.d.cts +6 -0
  97. package/dist/end-labels.d.ts +6 -0
  98. package/dist/end-labels.js +11 -0
  99. package/dist/end-labels.js.map +1 -0
  100. package/dist/{export-chart-83UYH48t.js → export-chart-BOH_nfcH.js} +92 -15
  101. package/dist/export-chart-BOH_nfcH.js.map +1 -0
  102. package/dist/{export-chart-mYgEfK-L.cjs → export-chart-Be4T9J3m.cjs} +97 -14
  103. package/dist/export-chart-Be4T9J3m.cjs.map +1 -0
  104. package/dist/export.cjs +5 -3
  105. package/dist/export.cjs.map +1 -1
  106. package/dist/export.d.cts +4 -3
  107. package/dist/export.d.ts +4 -3
  108. package/dist/export.js +5 -4
  109. package/dist/export.js.map +1 -1
  110. package/dist/{fade-GGxcBdss.js → fade-CDrQjnDz.js} +56 -78
  111. package/dist/fade-CDrQjnDz.js.map +1 -0
  112. package/dist/{fade-DVTkhrFU.cjs → fade-CRqcKMWY.cjs} +56 -78
  113. package/dist/fade-CRqcKMWY.cjs.map +1 -0
  114. package/dist/{features-BMxkqCyS.js → features-B55rwpQC.js} +4 -2
  115. package/dist/features-B55rwpQC.js.map +1 -0
  116. package/dist/{features-DCXEvoya.cjs → features-DEDP5CEQ.cjs} +9 -1
  117. package/dist/features-DEDP5CEQ.cjs.map +1 -0
  118. package/dist/fit-BPyPRnsK.js +16 -0
  119. package/dist/fit-BPyPRnsK.js.map +1 -0
  120. package/dist/fit-D4MIIQQz.cjs +21 -0
  121. package/dist/fit-D4MIIQQz.cjs.map +1 -0
  122. package/dist/funnel-B9ridzNx.d.cts +50 -0
  123. package/dist/funnel-CFEEulw_.cjs +244 -0
  124. package/dist/funnel-CFEEulw_.cjs.map +1 -0
  125. package/dist/funnel-CYCv8cq2.js +239 -0
  126. package/dist/funnel-CYCv8cq2.js.map +1 -0
  127. package/dist/funnel-FogM8flk.d.ts +50 -0
  128. package/dist/funnel.cjs +3 -0
  129. package/dist/funnel.d.cts +3 -0
  130. package/dist/funnel.d.ts +3 -0
  131. package/dist/funnel.js +1 -0
  132. package/dist/{gauge-DXkjXNCD.cjs → gauge-6HfDcLMJ.cjs} +28 -28
  133. package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
  134. package/dist/{gauge-BSist7My.d.cts → gauge-BScJ7U6O.d.cts} +2 -2
  135. package/dist/{gauge-0VJuAHWF.d.ts → gauge-D78oq1Lx.d.ts} +2 -2
  136. package/dist/{gauge-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
  137. package/dist/gauge-DiTk5aWO.js.map +1 -0
  138. package/dist/gauge.cjs +1 -1
  139. package/dist/gauge.d.cts +1 -1
  140. package/dist/gauge.d.ts +1 -1
  141. package/dist/gauge.js +1 -1
  142. package/dist/heat-Bsqq4zw9.js +38 -0
  143. package/dist/heat-Bsqq4zw9.js.map +1 -0
  144. package/dist/heat-DYsivvDq.cjs +49 -0
  145. package/dist/heat-DYsivvDq.cjs.map +1 -0
  146. package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dyzrd4Fd.cjs} +39 -37
  147. package/dist/heatmap-Dyzrd4Fd.cjs.map +1 -0
  148. package/dist/{heatmap-19BGJTKF.js → heatmap-J7fxG7MM.js} +35 -33
  149. package/dist/heatmap-J7fxG7MM.js.map +1 -0
  150. package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-Jvwo7iFW.d.cts} +2 -2
  151. package/dist/{heatmap-59lmClj9.d.ts → heatmap-mFCnP6aB.d.ts} +2 -2
  152. package/dist/heatmap.cjs +1 -1
  153. package/dist/heatmap.d.cts +1 -1
  154. package/dist/heatmap.d.ts +1 -1
  155. package/dist/heatmap.js +1 -1
  156. package/dist/{hydrate-OA6R2_Pn.js → hydrate-BB3MlR36.js} +2 -2
  157. package/dist/{hydrate-OA6R2_Pn.js.map → hydrate-BB3MlR36.js.map} +1 -1
  158. package/dist/{hydrate-CmN1k8Mo.cjs → hydrate-m0I5m6ue.cjs} +2 -2
  159. package/dist/{hydrate-CmN1k8Mo.cjs.map → hydrate-m0I5m6ue.cjs.map} +1 -1
  160. package/dist/hydrate.cjs +2 -2
  161. package/dist/hydrate.js +2 -2
  162. package/dist/index.cjs +69 -45
  163. package/dist/index.cjs.map +1 -1
  164. package/dist/index.d.cts +24 -19
  165. package/dist/index.d.ts +24 -19
  166. package/dist/index.js +51 -37
  167. package/dist/index.js.map +1 -1
  168. package/dist/interaction-DXYSjgnP.cjs +32 -0
  169. package/dist/interaction-DXYSjgnP.cjs.map +1 -0
  170. package/dist/interaction-En1KlwFO.js +21 -0
  171. package/dist/interaction-En1KlwFO.js.map +1 -0
  172. package/dist/layout-CYerDebD.d.cts +29 -0
  173. package/dist/layout-CYerDebD.d.ts +29 -0
  174. package/dist/{layout-JY2aR-yE.cjs → layout-Cfg9x1k2.cjs} +32 -1
  175. package/dist/layout-Cfg9x1k2.cjs.map +1 -0
  176. package/dist/{layout-DmrrLjwN.js → layout-DqAte3H8.js} +27 -2
  177. package/dist/layout-DqAte3H8.js.map +1 -0
  178. package/dist/{line-DO66LtwH.js → line-CXH0L10d.js} +84 -37
  179. package/dist/line-CXH0L10d.js.map +1 -0
  180. package/dist/{line-_rNdeKmS.d.cts → line-Cu9ctpbv.d.cts} +9 -3
  181. package/dist/{line-Dbt6KFRK.cjs → line-DHbYCQy4.cjs} +84 -37
  182. package/dist/line-DHbYCQy4.cjs.map +1 -0
  183. package/dist/{line-DtSh7HQU.d.ts → line-TkzA7wMK.d.ts} +8 -1
  184. package/dist/line.cjs +3 -3
  185. package/dist/line.d.cts +1 -1
  186. package/dist/line.d.ts +1 -1
  187. package/dist/line.js +3 -3
  188. package/dist/log.cjs +1 -1
  189. package/dist/log.js +1 -1
  190. package/dist/map-BirylCmT.d.cts +156 -0
  191. package/dist/map-CYp6x-uS.js +784 -0
  192. package/dist/map-CYp6x-uS.js.map +1 -0
  193. package/dist/map-ChwSgooH.cjs +795 -0
  194. package/dist/map-ChwSgooH.cjs.map +1 -0
  195. package/dist/map-DNqog2Xs.d.ts +156 -0
  196. package/dist/map.cjs +4 -0
  197. package/dist/map.d.cts +3 -0
  198. package/dist/map.d.ts +3 -0
  199. package/dist/map.js +1 -0
  200. package/dist/maps/world.cjs +875 -0
  201. package/dist/maps/world.cjs.map +1 -0
  202. package/dist/maps/world.d.cts +2 -0
  203. package/dist/maps/world.d.ts +2 -0
  204. package/dist/maps/world.js +874 -0
  205. package/dist/maps/world.js.map +1 -0
  206. package/dist/{morph-9_LJL0ra.cjs → morph-3I1Nf_tR.cjs} +2 -2
  207. package/dist/{morph-9_LJL0ra.cjs.map → morph-3I1Nf_tR.cjs.map} +1 -1
  208. package/dist/{morph-DnRxuwR-.js → morph-GfBab-b3.js} +2 -2
  209. package/dist/{morph-DnRxuwR-.js.map → morph-GfBab-b3.js.map} +1 -1
  210. package/dist/morph.cjs +2 -2
  211. package/dist/morph.js +2 -2
  212. package/dist/others-CuNdpvjd.d.cts +31 -0
  213. package/dist/{others-J7NCAMA0.js → others-DBIGE6jr.js} +11 -3
  214. package/dist/others-DBIGE6jr.js.map +1 -0
  215. package/dist/others-DBO4Kjwl.d.ts +29 -0
  216. package/dist/{others-DWdK7vKp.cjs → others-WfjCsjqT.cjs} +14 -6
  217. package/dist/others-WfjCsjqT.cjs.map +1 -0
  218. package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
  219. package/dist/parliament-BKN6ikBJ.js.map +1 -0
  220. package/dist/{parliament-CLCI7tUO.d.ts → parliament-CHdf13XU.d.ts} +2 -2
  221. package/dist/{parliament-CgsVnWEe.d.cts → parliament-CsYgh4N2.d.cts} +2 -2
  222. package/dist/{parliament-x5hcFaQ3.cjs → parliament-DhxAaIZ3.cjs} +30 -29
  223. package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
  224. package/dist/parliament.cjs +1 -1
  225. package/dist/parliament.d.cts +1 -1
  226. package/dist/parliament.d.ts +1 -1
  227. package/dist/parliament.js +1 -1
  228. package/dist/{patterns-D3-wQagb.cjs → patterns-BPN1c9qe.cjs} +2 -2
  229. package/dist/{patterns-D3-wQagb.cjs.map → patterns-BPN1c9qe.cjs.map} +1 -1
  230. package/dist/{patterns-CufKZYhm.js → patterns-CVrLrJXg.js} +2 -2
  231. package/dist/{patterns-CufKZYhm.js.map → patterns-CVrLrJXg.js.map} +1 -1
  232. package/dist/patterns.cjs +2 -2
  233. package/dist/patterns.d.cts +1 -1
  234. package/dist/patterns.d.ts +1 -1
  235. package/dist/patterns.js +2 -2
  236. package/dist/{percentage-bar-ybNS3goo.cjs → percentage-bar-BChkTRoz.cjs} +37 -35
  237. package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
  238. package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-CSAbzDOn.d.ts} +11 -15
  239. package/dist/{percentage-bar-B6tNOqNn.js → percentage-bar-CaInxrL8.js} +37 -35
  240. package/dist/percentage-bar-CaInxrL8.js.map +1 -0
  241. package/dist/{percentage-bar-tepMr7Hd.d.cts → percentage-bar-UZHCRvlK.d.cts} +11 -15
  242. package/dist/percentage-bar.cjs +1 -1
  243. package/dist/percentage-bar.d.cts +1 -1
  244. package/dist/percentage-bar.d.ts +1 -1
  245. package/dist/percentage-bar.js +1 -1
  246. package/dist/{pie-BXg2gNpb.d.cts → pie-AFedsDcF.d.cts} +17 -14
  247. package/dist/{pie-CVsc-6qD.js → pie-Ch6Bx0ih.js} +68 -52
  248. package/dist/pie-Ch6Bx0ih.js.map +1 -0
  249. package/dist/{pie-BpjvSPnz.cjs → pie-Cll1OrVZ.cjs} +68 -52
  250. package/dist/pie-Cll1OrVZ.cjs.map +1 -0
  251. package/dist/{pie-CFptILSm.d.ts → pie-Cn2H3pz8.d.ts} +17 -14
  252. package/dist/pie.cjs +1 -1
  253. package/dist/pie.d.cts +1 -1
  254. package/dist/pie.d.ts +1 -1
  255. package/dist/pie.js +1 -1
  256. package/dist/{point-shapes--_gmdTyK.cjs → point-shapes-BRawRM78.cjs} +23 -22
  257. package/dist/point-shapes-BRawRM78.cjs.map +1 -0
  258. package/dist/{point-shapes-DD2Ektzm.js → point-shapes-DI6GhcI7.js} +18 -23
  259. package/dist/point-shapes-DI6GhcI7.js.map +1 -0
  260. package/dist/point-shapes.cjs +6 -4
  261. package/dist/point-shapes.cjs.map +1 -1
  262. package/dist/point-shapes.d.cts +2 -2
  263. package/dist/point-shapes.d.ts +2 -2
  264. package/dist/point-shapes.js +7 -5
  265. package/dist/point-shapes.js.map +1 -1
  266. package/dist/{radar-BR-mumDd.js → radar-Bg-IiIWB.js} +21 -22
  267. package/dist/radar-Bg-IiIWB.js.map +1 -0
  268. package/dist/{radar-BC9Skgpj.d.ts → radar-DEer2jjd.d.ts} +2 -2
  269. package/dist/{radar-D1-lItDy.d.cts → radar-DxmjXhMc.d.cts} +2 -2
  270. package/dist/{radar-HPDrIdzc.cjs → radar-wDyX17S3.cjs} +22 -23
  271. package/dist/radar-wDyX17S3.cjs.map +1 -0
  272. package/dist/radar.cjs +1 -1
  273. package/dist/radar.d.cts +1 -1
  274. package/dist/radar.d.ts +1 -1
  275. package/dist/radar.js +1 -1
  276. package/dist/range-bar-BnKjJP89.cjs +348 -0
  277. package/dist/range-bar-BnKjJP89.cjs.map +1 -0
  278. package/dist/range-bar-C4cRaaQE.d.ts +123 -0
  279. package/dist/range-bar-D32dIQOY.d.cts +123 -0
  280. package/dist/range-bar-Dx6ce0J1.js +343 -0
  281. package/dist/range-bar-Dx6ce0J1.js.map +1 -0
  282. package/dist/range-bar.cjs +3 -0
  283. package/dist/range-bar.d.cts +3 -0
  284. package/dist/range-bar.d.ts +3 -0
  285. package/dist/range-bar.js +1 -0
  286. package/dist/{rect-DSVmUZrD.js → rect-CZTNvMlf.js} +2 -2
  287. package/dist/{rect-DSVmUZrD.js.map → rect-CZTNvMlf.js.map} +1 -1
  288. package/dist/{rect-D6VhynBM.cjs → rect-DPr9QRxl.cjs} +2 -2
  289. package/dist/{rect-D6VhynBM.cjs.map → rect-DPr9QRxl.cjs.map} +1 -1
  290. package/dist/{sankey-fCoo1cpz.cjs → sankey-0CSp_Er9.cjs} +72 -71
  291. package/dist/sankey-0CSp_Er9.cjs.map +1 -0
  292. package/dist/{sankey-Dk7jUt8x.d.cts → sankey-D-8ATwBT.d.cts} +2 -2
  293. package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
  294. package/dist/sankey-Dp4CuLVe.js.map +1 -0
  295. package/dist/{sankey-D_v7KxnJ.d.ts → sankey-DpYJsOI4.d.ts} +2 -2
  296. package/dist/sankey.cjs +1 -1
  297. package/dist/sankey.d.cts +1 -1
  298. package/dist/sankey.d.ts +1 -1
  299. package/dist/sankey.js +1 -1
  300. package/dist/{scatter-C0TWjFpW.js → scatter-0Z7K_YUz.js} +94 -46
  301. package/dist/scatter-0Z7K_YUz.js.map +1 -0
  302. package/dist/{scatter-CXEsioOJ.d.ts → scatter-BAL5K9_4.d.ts} +28 -9
  303. package/dist/{scatter-DZeEIfyo.d.cts → scatter-BUGbnRzM.d.cts} +28 -9
  304. package/dist/{scatter-DVqB_fP9.cjs → scatter-CZ8do3Up.cjs} +95 -47
  305. package/dist/scatter-CZ8do3Up.cjs.map +1 -0
  306. package/dist/scatter.cjs +1 -1
  307. package/dist/scatter.d.cts +2 -2
  308. package/dist/scatter.d.ts +2 -2
  309. package/dist/scatter.js +1 -1
  310. package/dist/slice-labels-1TBq7p3q.d.cts +28 -0
  311. package/dist/slice-labels-C9ucsBVW.js +88 -0
  312. package/dist/slice-labels-C9ucsBVW.js.map +1 -0
  313. package/dist/slice-labels-CbFiy46l.cjs +93 -0
  314. package/dist/slice-labels-CbFiy46l.cjs.map +1 -0
  315. package/dist/slice-labels-Cm5CyV7B.d.ts +28 -0
  316. package/dist/slice-labels.cjs +11 -0
  317. package/dist/slice-labels.cjs.map +1 -0
  318. package/dist/slice-labels.d.cts +6 -0
  319. package/dist/slice-labels.d.ts +6 -0
  320. package/dist/slice-labels.js +11 -0
  321. package/dist/slice-labels.js.map +1 -0
  322. package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-CtoBJe-a.d.ts} +2 -2
  323. package/dist/{sparkline-B39NA0Mi.cjs → sparkline-DjR-V6BI.cjs} +13 -15
  324. package/dist/sparkline-DjR-V6BI.cjs.map +1 -0
  325. package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-DwHJfeZz.d.cts} +2 -2
  326. package/dist/{sparkline-XO_TqCNP.js → sparkline-_dxwtdli.js} +13 -15
  327. package/dist/sparkline-_dxwtdli.js.map +1 -0
  328. package/dist/sparkline.cjs +1 -1
  329. package/dist/sparkline.d.cts +1 -1
  330. package/dist/sparkline.d.ts +1 -1
  331. package/dist/sparkline.js +1 -1
  332. package/dist/{stack-Dagxq7l2.d.cts → stack-CcmyALx0.d.cts} +1 -1
  333. package/dist/{stack-2H2Gfs1Q.js → stack-CyVlS7Fr.js} +2 -2
  334. package/dist/{stack-2H2Gfs1Q.js.map → stack-CyVlS7Fr.js.map} +1 -1
  335. package/dist/{stack-BgPzoQmv.cjs → stack-DBhmYNat.cjs} +2 -2
  336. package/dist/{stack-BgPzoQmv.cjs.map → stack-DBhmYNat.cjs.map} +1 -1
  337. package/dist/style.css +1 -1
  338. package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-CVKjQKSS.cjs} +4 -3
  339. package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-CVKjQKSS.cjs.map} +1 -1
  340. package/dist/{time-axis-FLONo54E.js → time-axis-CkmbAw4Z.js} +3 -2
  341. package/dist/{time-axis-FLONo54E.js.map → time-axis-CkmbAw4Z.js.map} +1 -1
  342. package/dist/time.cjs +3 -3
  343. package/dist/time.js +3 -3
  344. package/dist/{treemap-BAkhmVQc.d.cts → treemap-C2maqerU.d.cts} +37 -5
  345. package/dist/{treemap-BNpxFBao.d.ts → treemap-D_zbubo3.d.ts} +37 -5
  346. package/dist/{treemap-BWpEUlDh.cjs → treemap-PulGXZv0.cjs} +58 -33
  347. package/dist/treemap-PulGXZv0.cjs.map +1 -0
  348. package/dist/{treemap-CQdavQ9u.js → treemap-lbYxb-7h.js} +57 -32
  349. package/dist/treemap-lbYxb-7h.js.map +1 -0
  350. package/dist/treemap.cjs +1 -1
  351. package/dist/treemap.d.cts +1 -1
  352. package/dist/treemap.d.ts +1 -1
  353. package/dist/treemap.js +1 -1
  354. package/dist/{value-labels-BBuSi4i0.js → value-labels-B0VeheyE.js} +29 -8
  355. package/dist/value-labels-B0VeheyE.js.map +1 -0
  356. package/dist/{value-labels-BV9keAuL.cjs → value-labels-Dcyk3GIY.cjs} +29 -8
  357. package/dist/value-labels-Dcyk3GIY.cjs.map +1 -0
  358. package/dist/value-labels.cjs +2 -2
  359. package/dist/value-labels.d.cts +1 -1
  360. package/dist/value-labels.d.ts +1 -1
  361. package/dist/value-labels.js +2 -2
  362. package/dist/zoom.cjs +810 -0
  363. package/dist/zoom.cjs.map +1 -0
  364. package/dist/zoom.d.cts +34 -0
  365. package/dist/zoom.d.ts +34 -0
  366. package/dist/zoom.js +806 -0
  367. package/dist/zoom.js.map +1 -0
  368. package/package.json +120 -235
  369. package/dist/annotations-D0YQ0IoA.js.map +0 -1
  370. package/dist/annotations-DdRdeBUB.cjs.map +0 -1
  371. package/dist/area-0-L1bG9B.js.map +0 -1
  372. package/dist/area-4eRs3c0K.cjs.map +0 -1
  373. package/dist/bar-BNZ3GhIw.js.map +0 -1
  374. package/dist/bar-Da6dE_nI.cjs.map +0 -1
  375. package/dist/candlestick-BHQkQfxH.js.map +0 -1
  376. package/dist/candlestick-CYCQXgky.cjs.map +0 -1
  377. package/dist/cartesian-CI2x6N7N.js.map +0 -1
  378. package/dist/cartesian-DV02PsBe.cjs.map +0 -1
  379. package/dist/chart-DWn9v6qw.js.map +0 -1
  380. package/dist/chart-e2VqomCI.cjs.map +0 -1
  381. package/dist/core-BKRQvPAT.js.map +0 -1
  382. package/dist/core-DIOC61up.cjs.map +0 -1
  383. package/dist/dom-CuceR8gt.js.map +0 -1
  384. package/dist/dom-D_g13XWY.cjs.map +0 -1
  385. package/dist/export-chart-83UYH48t.js.map +0 -1
  386. package/dist/export-chart-mYgEfK-L.cjs.map +0 -1
  387. package/dist/fade-DVTkhrFU.cjs.map +0 -1
  388. package/dist/fade-GGxcBdss.js.map +0 -1
  389. package/dist/features-BMxkqCyS.js.map +0 -1
  390. package/dist/features-DCXEvoya.cjs.map +0 -1
  391. package/dist/gauge-DXkjXNCD.cjs.map +0 -1
  392. package/dist/gauge-ts0kqN1-.js.map +0 -1
  393. package/dist/heatmap-19BGJTKF.js.map +0 -1
  394. package/dist/heatmap-CXhlrLTl.cjs.map +0 -1
  395. package/dist/layout-DmrrLjwN.js.map +0 -1
  396. package/dist/layout-JY2aR-yE.cjs.map +0 -1
  397. package/dist/line-DO66LtwH.js.map +0 -1
  398. package/dist/line-Dbt6KFRK.cjs.map +0 -1
  399. package/dist/others-DWdK7vKp.cjs.map +0 -1
  400. package/dist/others-J7NCAMA0.js.map +0 -1
  401. package/dist/parliament-Cru4IcuM.js.map +0 -1
  402. package/dist/parliament-x5hcFaQ3.cjs.map +0 -1
  403. package/dist/percentage-bar-B6tNOqNn.js.map +0 -1
  404. package/dist/percentage-bar-ybNS3goo.cjs.map +0 -1
  405. package/dist/pie-BpjvSPnz.cjs.map +0 -1
  406. package/dist/pie-CVsc-6qD.js.map +0 -1
  407. package/dist/point-shapes--_gmdTyK.cjs.map +0 -1
  408. package/dist/point-shapes-DD2Ektzm.js.map +0 -1
  409. package/dist/radar-BR-mumDd.js.map +0 -1
  410. package/dist/radar-HPDrIdzc.cjs.map +0 -1
  411. package/dist/sankey-D6JeZfK5.js.map +0 -1
  412. package/dist/sankey-fCoo1cpz.cjs.map +0 -1
  413. package/dist/scatter-C0TWjFpW.js.map +0 -1
  414. package/dist/scatter-DVqB_fP9.cjs.map +0 -1
  415. package/dist/sparkline-B39NA0Mi.cjs.map +0 -1
  416. package/dist/sparkline-XO_TqCNP.js.map +0 -1
  417. package/dist/treemap-BWpEUlDh.cjs.map +0 -1
  418. package/dist/treemap-CQdavQ9u.js.map +0 -1
  419. package/dist/value-labels-BBuSi4i0.js.map +0 -1
  420. package/dist/value-labels-BV9keAuL.cjs.map +0 -1
package/dist/core.js CHANGED
@@ -1,27 +1,32 @@
1
- import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-DmrrLjwN.js";
1
+ import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-DqAte3H8.js";
2
2
  import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-_EMUqysL.js";
3
3
  import { a as getDateFormat, i as formatTicks, n as formatDetail, o as getNumberFormat, r as formatNumber, s as stepPrecision, t as formatDate } from "./format-it1kepFG.js";
4
- import { A as tickIncrement, C as grid, D as linearTicks, E as bandTicks, M as ticks, O as thinTicks, S as point, T as axisSize, b as linear, f as seriesKey, j as tickStep, k as niceDomain, m as seriesTable, n as categoryInteraction, p as seriesLegend, r as domainOf, w as axis, x as band } from "./cartesian-CI2x6N7N.js";
5
- import { i as register, n as feature, r as features } from "./features-BMxkqCyS.js";
4
+ import { a as bandTicks, c as niceDomain, d as ticks, l as tickIncrement, n as axisSize, o as linearTicks, s as thinTicks, t as axis, u as tickStep } from "./axis-C5obgdJt.js";
5
+ import { D as grid, E as point, T as band, _ as seriesTable, h as seriesLegend, m as seriesKey, n as categoryInteraction, r as domainOf, w as linear } from "./cartesian-COglz544.js";
6
+ import { i as register, n as feature, r as features } from "./features-B55rwpQC.js";
6
7
  import { t as extent } from "./extent-DOV8rs-6.js";
7
- import { _ as defaultHidden, a as chartToString, c as resolveSize, g as renderToString, h as escapeText, i as chartLabel, l as cancel, m as escapeAttr, n as buildChart, o as renderContext, p as schedule, r as chartEvents, s as resolveLegend, t as Chart, u as flush, v as legendContent } from "./chart-DWn9v6qw.js";
8
- import { a as render } from "./dom-CuceR8gt.js";
9
- import { n as areaPath, r as linePath } from "./fade-GGxcBdss.js";
10
- import { _ as download, a as placeTooltip, c as sync, d as describeHit, f as tableContent, g as hoverUnderlay, h as hoverOverlay, i as hitAnchor, l as legend, m as pointer, n as defaultPlugins, o as tooltipContent, p as highlight, r as tooltip, s as dataTable, t as VERSION, u as keyboard } from "./core-BKRQvPAT.js";
11
- import { t as line } from "./line-DO66LtwH.js";
12
- import { t as area } from "./area-0-L1bG9B.js";
13
- import { n as hbarPath, t as barPath } from "./bar-B5n2oq9-.js";
14
- import { t as bar } from "./bar-BNZ3GhIw.js";
15
- import { t as candlestick } from "./candlestick-BHQkQfxH.js";
8
+ import { _ as escapeAttr, a as chartModel, b as defaultHidden, c as renderChart, d as resolveSize, f as cancel, g as schedule, i as chartLabel, l as renderContext, n as buildChart, o as chartToString, p as flush, r as chartEvents, t as Chart, u as resolveLegend, v as escapeText, x as legendContent, y as renderToString } from "./chart-B97FBRCd.js";
9
+ import { a as render } from "./dom-CTse6Rvd.js";
10
+ import { n as areaPath, r as linePath } from "./fade-CDrQjnDz.js";
11
+ import { _ as hoverUnderlay, a as hitAnchor, c as dataTable, d as keyboard, f as describeHit, g as hoverOverlay, h as pointer, i as tooltip, l as sync, m as highlight, n as defaultPlugins, o as placeTooltip, p as tableContent, r as zoom, s as tooltipContent, t as VERSION, u as legend, v as hoverValue, y as download } from "./core-7fgM3su0.js";
12
+ import { t as line } from "./line-CXH0L10d.js";
13
+ import { t as area } from "./area-BN0uE9R0.js";
14
+ import { n as hbarPath, t as barPath } from "./bar-CgpC2EpX.js";
15
+ import { t as bar } from "./bar-D_KKd2fL.js";
16
+ import { t as calendar } from "./calendar-CF3gfDQk.js";
17
+ import { t as candlestick } from "./candlestick-B1onjo1o.js";
18
+ import { t as funnel } from "./funnel-CYCv8cq2.js";
16
19
  import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-B3V5IR0w.js";
17
- import { t as gauge } from "./gauge-ts0kqN1-.js";
18
- import { t as heatmap } from "./heatmap-19BGJTKF.js";
19
- import { t as parliament } from "./parliament-Cru4IcuM.js";
20
- import { t as percentageBar } from "./percentage-bar-B6tNOqNn.js";
21
- import { n as pie, t as donut } from "./pie-CVsc-6qD.js";
22
- import { t as radar } from "./radar-BR-mumDd.js";
23
- import { t as sankey } from "./sankey-D6JeZfK5.js";
24
- import { t as scatter } from "./scatter-C0TWjFpW.js";
25
- import { t as sparkline } from "./sparkline-XO_TqCNP.js";
26
- import { t as treemap } from "./treemap-CQdavQ9u.js";
27
- export { Chart, LINE_HEIGHT, VERSION, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap };
20
+ import { t as gauge } from "./gauge-DiTk5aWO.js";
21
+ import { t as heatmap } from "./heatmap-J7fxG7MM.js";
22
+ import { n as map, t as addMap } from "./map-CYp6x-uS.js";
23
+ import { t as parliament } from "./parliament-BKN6ikBJ.js";
24
+ import { t as percentageBar } from "./percentage-bar-CaInxrL8.js";
25
+ import { n as pie, t as donut } from "./pie-Ch6Bx0ih.js";
26
+ import { t as radar } from "./radar-Bg-IiIWB.js";
27
+ import { t as rangeBar } from "./range-bar-Dx6ce0J1.js";
28
+ import { t as sankey } from "./sankey-Dp4CuLVe.js";
29
+ import { t as scatter } from "./scatter-0Z7K_YUz.js";
30
+ import { t as sparkline } from "./sparkline-_dxwtdli.js";
31
+ import { t as treemap } from "./treemap-lbYxb-7h.js";
32
+ export { Chart, LINE_HEIGHT, VERSION, addMap, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, calendar, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartModel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, funnel, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, hoverValue, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, map, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, rangeBar, register, render, renderChart, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap, zoom };
@@ -1,5 +1,5 @@
1
1
  const require_format = require("./format-CAE5ruy6.cjs");
2
- const require_cartesian = require("./cartesian-DV02PsBe.cjs");
2
+ const require_cartesian = require("./cartesian-B9CrasFJ.cjs");
3
3
  // src/charts/dates.ts
4
4
  /**
5
5
  * Formatter for date labels on a time axis (tooltips, tables, band axes):
@@ -28,4 +28,4 @@ Object.defineProperty(exports, "dateLabels", {
28
28
  }
29
29
  });
30
30
 
31
- //# sourceMappingURL=dates-DurEr9WT.cjs.map
31
+ //# sourceMappingURL=dates-0YNY49KQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dates-DurEr9WT.cjs","names":["toMs","formatDate"],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAIA,kBAAAA,KAAK,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAMC,eAAAA,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAASD,kBAAAA,KAAK,KAAK,CAAC,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
1
+ {"version":3,"file":"dates-0YNY49KQ.cjs","names":["toMs","formatDate"],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAIA,kBAAAA,KAAK,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAMC,eAAAA,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAASD,kBAAAA,KAAK,KAAK,CAAC,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
@@ -1,5 +1,5 @@
1
1
  import { t as formatDate } from "./format-it1kepFG.js";
2
- import { g as toMs } from "./cartesian-CI2x6N7N.js";
2
+ import { y as toMs } from "./cartesian-COglz544.js";
3
3
  // src/charts/dates.ts
4
4
  /**
5
5
  * Formatter for date labels on a time axis (tooltips, tables, band axes):
@@ -23,4 +23,4 @@ function dateLabels(labels, utc, locale) {
23
23
  }
24
24
  export { dateLabels as t };
25
25
 
26
- //# sourceMappingURL=dates-C2RzY3rE.js.map
26
+ //# sourceMappingURL=dates-CKDRgpin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dates-C2RzY3rE.js","names":[],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAM,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
1
+ {"version":3,"file":"dates-CKDRgpin.js","names":[],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAM,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
package/dist/decimate.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_features = require("./features-DCXEvoya.cjs");
2
+ const require_features = require("./features-DEDP5CEQ.cjs");
3
3
  const require_decimate = require("./decimate-BS3x8g-f.cjs");
4
4
  // src/decimate.ts
5
5
  /**
package/dist/decimate.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as register } from "./features-BMxkqCyS.js";
1
+ import { i as register } from "./features-B55rwpQC.js";
2
2
  import { n as lttbIndices, t as lttb } from "./decimate-CapfgiDY.js";
3
3
  // src/decimate.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_features = require("./features-DCXEvoya.cjs");
1
+ const require_features = require("./features-DEDP5CEQ.cjs");
2
2
  // src/render/attrs.ts
3
3
  /** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */
4
4
  const NAME_RE = /^[a-zA-Z_][\w:.-]*$/;
@@ -58,11 +58,7 @@ function render(container, vnode, replace) {
58
58
  roots.set(container, el);
59
59
  return el;
60
60
  }
61
- function namespaceFor(parent, tag) {
62
- if (tag === "svg") return SVG_NS;
63
- if (parent.namespaceURI === "http://www.w3.org/2000/svg" && parent.localName !== "foreignObject") return SVG_NS;
64
- return HTML_NS;
65
- }
61
+ const namespaceFor = (parent, tag) => tag === "svg" ? SVG_NS : childNamespace(parent);
66
62
  function childNamespace(el) {
67
63
  return el.namespaceURI === "http://www.w3.org/2000/svg" && el.localName !== "foreignObject" ? SVG_NS : HTML_NS;
68
64
  }
@@ -217,4 +213,4 @@ Object.defineProperty(exports, "rendered", {
217
213
  }
218
214
  });
219
215
 
220
- //# sourceMappingURL=dom-D_g13XWY.cjs.map
216
+ //# sourceMappingURL=dom-C33zvtPo.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-C33zvtPo.cjs","names":["features"],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nconst namespaceFor = (parent: Element, tag: string): string =>\n tag === 'svg' ? SVG_NS : childNamespace(parent)\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (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G,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,QAAQ,KAAK;EACnB,IAAI;EACJ,IAAI,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAA,GAC7C,YAAY,MAAM,IAAI,MAAM,GAAG;OAC1B,IAAI,SAAS,QAAQ,QAC1B,YAAY,QAAQ;EAEtB,IAAI,aAAa,CAAC,KAAK,IAAI,SAAS,KAAK,SAAS,WAAW,KAAK,GAAG;GACnE,QAAQ,KAAK;GACb,KAAK,IAAI,SAAS;GAClB,IAAI,cAAc,QAAQ,SAAS;EACrC;CACF;CAGA,KAAK,MAAM,QAAQ,UACjB,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,OAAO,YAAY,IAAI;CAI9C,MAAM,KAAK,eAAe,MAAM;CAChC,MAAM,MAAM,OAAO;CACnB,IAAI,SAAsB;CAC1B,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,QAAQ,KAAK;EACnB,IAAI,OAAO,QAAQ;EACnB,IAAI,MACF,UAAU,MAAM,KAAK;OAChB;GACL,OAAO,WAAW,OAAO,IAAI,GAAG,KAAK,KAAA;GACrC,IAAI,CAAC,MAAM;EACb;EACA,IAAI,KAAK,eAAe,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
@@ -1,4 +1,4 @@
1
- import { r as features } from "./features-BMxkqCyS.js";
1
+ import { r as features } from "./features-B55rwpQC.js";
2
2
  // src/render/attrs.ts
3
3
  /** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */
4
4
  const NAME_RE = /^[a-zA-Z_][\w:.-]*$/;
@@ -58,11 +58,7 @@ function render(container, vnode, replace) {
58
58
  roots.set(container, el);
59
59
  return el;
60
60
  }
61
- function namespaceFor(parent, tag) {
62
- if (tag === "svg") return SVG_NS;
63
- if (parent.namespaceURI === "http://www.w3.org/2000/svg" && parent.localName !== "foreignObject") return SVG_NS;
64
- return HTML_NS;
65
- }
61
+ const namespaceFor = (parent, tag) => tag === "svg" ? SVG_NS : childNamespace(parent);
66
62
  function childNamespace(el) {
67
63
  return el.namespaceURI === "http://www.w3.org/2000/svg" && el.localName !== "foreignObject" ? SVG_NS : HTML_NS;
68
64
  }
@@ -170,4 +166,4 @@ function patchChildren(parent, next) {
170
166
  }
171
167
  export { render as a, isValidTag as c, patchAttrs as i, childNamespace as n, rendered as o, createNode as r, isValidAttr as s, SVG_NS as t };
172
168
 
173
- //# sourceMappingURL=dom-CuceR8gt.js.map
169
+ //# sourceMappingURL=dom-CTse6Rvd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-CTse6Rvd.js","names":[],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nconst namespaceFor = (parent: Element, tag: string): string =>\n tag === 'svg' ? SVG_NS : childNamespace(parent)\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;AAiB5D,SAAgB,OACd,WACA,OACA,SACgB;CAChB,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,SAAS,eAAe,YAAY,UAAU,KAAA;CAEpF,IAAI,UAAU,QAAQ,CAAC,WAAW,MAAM,GAAG,GAAG;EAC5C,IAAI,MAAM;GACR,KAAK,OAAO;GACZ,MAAM,OAAO,SAAS;EACxB;EACA,OAAO;CACT;CAEA,IAAI,QAAQ,SAAS,MAAM,KAAK,GAAG;EACjC,aAAa,MAAM,KAAK;EACxB,MAAM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Ae,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
@@ -0,0 +1,114 @@
1
+ import { n as formatDetail, r as formatNumber } from "./format-it1kepFG.js";
2
+ import { i as insets, n as estimateTextWidth, s as round, t as LINE_HEIGHT } from "./layout-DqAte3H8.js";
3
+ import { t as h } from "./vnode-_EMUqysL.js";
4
+ import { l as plottable, m as seriesKey, p as seriesAxes } from "./cartesian-COglz544.js";
5
+ // src/charts/end-labels.ts
6
+ /** Space between a point and its label (the joining line runs through it), and between name and value. */
7
+ const LEAD = 14;
8
+ const GAP = 6;
9
+ /** The labels of a chart: one per visible series that has a value. */
10
+ function endLabelTexts(options, ctx) {
11
+ const own = typeof options.endLabels === "object" ? options.endLabels : {};
12
+ const axisOf = seriesAxes(options);
13
+ return options.data.series.flatMap((series, index) => {
14
+ const { axis } = axisOf(series);
15
+ const last = series.values.filter((v) => plottable(v, axis)).pop();
16
+ if (last == null || ctx.hidden.has(seriesKey(series))) return [];
17
+ const format = own.format ? formatNumber(own.format, ctx.locale) : formatDetail(axis.format, ctx.locale);
18
+ return {
19
+ index,
20
+ key: seriesKey(series),
21
+ name: series.name,
22
+ value: own.value === false ? "" : format(last),
23
+ color: series.color
24
+ };
25
+ });
26
+ }
27
+ const width = (label, fontSize) => {
28
+ const value = label.value ? GAP + estimateTextWidth(label.value, fontSize) * 1.06 : 0;
29
+ return estimateTextWidth(label.name, fontSize) + value;
30
+ };
31
+ /** Width the labels need beside the plot, in pixels (0 without labels). */
32
+ const endLabelRoom = (labels, fontSize) => labels.length ? Math.ceil(LEAD + Math.max(...labels.map((label) => width(label, fontSize)))) : 0;
33
+ /**
34
+ * The labels layer: every label beside the `point` its line ends at, on the
35
+ * left of the plot when the lines run that way (`left`). `overhang` is what
36
+ * the marks take beyond the plot's edge.
37
+ */
38
+ function endLabelLayer(labels, area, left, fontSize, overhang) {
39
+ const step = Math.ceil(fontSize * LINE_HEIGHT);
40
+ const placed = labels.flatMap((label) => label.point ? {
41
+ ...label,
42
+ point: label.point,
43
+ y: label.point[1]
44
+ } : []).sort((a, b) => a.point[1] - b.point[1]);
45
+ if (!placed.length) return null;
46
+ let floor = area.y;
47
+ for (const label of placed) {
48
+ label.y = Math.max(label.y, floor);
49
+ floor = label.y + step;
50
+ }
51
+ let ceiling = Math.max(area.y + area.height, (placed[0]?.y ?? 0) + (placed.length - 1) * step);
52
+ for (const label of placed.slice().reverse()) {
53
+ label.y = Math.min(label.y, ceiling);
54
+ ceiling = label.y - step;
55
+ }
56
+ const sign = left ? -1 : 1;
57
+ const at = (left ? area.x - overhang : area.x + area.width + overhang) + sign * LEAD;
58
+ return h("g", {
59
+ key: "end-labels",
60
+ class: "tc-end-labels",
61
+ "aria-hidden": "true"
62
+ }, placed.map((label) => {
63
+ const [px, py] = label.point;
64
+ const moved = Math.abs(label.y - py) > 1;
65
+ return h("g", {
66
+ key: label.key,
67
+ class: [
68
+ "tc-end-label",
69
+ "tc-series",
70
+ `tc-series-${label.index + 1}`
71
+ ],
72
+ style: { "--tc-series-color": label.color }
73
+ }, moved && h("path", {
74
+ class: "tc-end-label-line",
75
+ d: `M${round(px + sign * (overhang + 2))},${round(py)}L${round(at - sign * 3)},${round(label.y)}`
76
+ }), h("text", {
77
+ class: "tc-end-label-text",
78
+ style: `transform:translate(${round(at)}px,${round(label.y)}px)`,
79
+ "text-anchor": left ? "end" : "start",
80
+ dy: "0.35em"
81
+ }, left ? [label.value && h("tspan", { class: "tc-end-label-value" }, label.value), h("tspan", { dx: label.value ? GAP : void 0 }, label.name)] : [label.name, label.value && h("tspan", {
82
+ class: "tc-end-label-value",
83
+ dx: GAP
84
+ }, label.value)]));
85
+ }));
86
+ }
87
+ /**
88
+ * The end labels of a line chart: its `options` with room for the labels
89
+ * beside the plot (on the side the lines end at), and the `layer` that
90
+ * draws them once the points of every series (`null` for gaps) and the plot
91
+ * area are known. `overhang` is what the marks take beyond the plot's edge.
92
+ */
93
+ function endLabels(options, ctx, overhang) {
94
+ const texts = endLabelTexts(options, ctx);
95
+ const left = options.x?.reverse ?? ctx.rtl === true;
96
+ const side = left ? "left" : "right";
97
+ const pad = insets(options.padding);
98
+ return {
99
+ options: {
100
+ ...options,
101
+ padding: {
102
+ ...pad,
103
+ [side]: pad[side] + endLabelRoom(texts, ctx.fontSize)
104
+ }
105
+ },
106
+ layer: (points, area) => endLabelLayer(texts.map((label) => ({
107
+ ...label,
108
+ point: (points[label.index] ?? []).filter((p) => p != null).pop() ?? null
109
+ })), area, left, ctx.fontSize, overhang)
110
+ };
111
+ }
112
+ export { endLabels as t };
113
+
114
+ //# sourceMappingURL=end-labels-B3oRvjxw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-labels-B3oRvjxw.js","names":[],"sources":["../src/charts/end-labels.ts"],"sourcesContent":["/**\n * End labels: each line named at its end, with its last value, in a column\n * past the edge of the plot. Labels of lines that end close together are\n * moved apart, and a thin line in the series color joins a moved label to\n * its point, so a chart reads without its legend.\n */\nimport type { RenderContext } from '../chart.ts'\nimport { formatDetail, formatNumber, type NumberFormat } from '../format.ts'\nimport { estimateTextWidth, insets, LINE_HEIGHT, type Rect, round } from '../layout.ts'\nimport type { Point } from '../shapes/path.ts'\nimport { h, type VNode } from '../vnode.ts'\nimport { type CartesianOptions, plottable, seriesAxes, seriesKey } from './cartesian.ts'\n\nexport interface EndLabelOptions {\n /** Format of the values. Defaults to the format of the series' value axis. */\n format?: NumberFormat\n /** Write the last value after the name. Defaults to `true`. */\n value?: boolean\n}\n\n/** The text of one label: the series (by index), its name and its last value. */\nexport interface EndLabelText {\n index: number\n key: string\n name: string\n value: string\n /** The series' own color, if it has one. */\n color?: string\n}\n\n/** Space between a point and its label (the joining line runs through it), and between name and value. */\nconst LEAD = 14\nconst GAP = 6\n\n/** The labels of a chart: one per visible series that has a value. */\nfunction endLabelTexts(\n options: CartesianOptions & { endLabels?: boolean | EndLabelOptions },\n ctx: RenderContext,\n): EndLabelText[] {\n const own: EndLabelOptions = typeof options.endLabels === 'object' ? options.endLabels : {}\n const axisOf = seriesAxes(options)\n return options.data.series.flatMap((series, index) => {\n const { axis } = axisOf(series)\n const last = series.values.filter((v) => plottable(v, axis)).pop()\n if (last == null || ctx.hidden.has(seriesKey(series))) return []\n const format = own.format\n ? formatNumber(own.format, ctx.locale)\n : formatDetail(axis.format, ctx.locale)\n return {\n index,\n key: seriesKey(series),\n name: series.name,\n value: own.value === false ? '' : format(last),\n color: series.color,\n }\n })\n}\n\nconst width = (label: EndLabelText, fontSize: number): number => {\n // The value is set in a heavier weight: a little wider than estimated.\n const value = label.value ? GAP + estimateTextWidth(label.value, fontSize) * 1.06 : 0\n return estimateTextWidth(label.name, fontSize) + value\n}\n\n/** Width the labels need beside the plot, in pixels (0 without labels). */\nconst endLabelRoom = (labels: readonly EndLabelText[], fontSize: number): number =>\n labels.length ? Math.ceil(LEAD + Math.max(...labels.map((label) => width(label, fontSize)))) : 0\n\n/**\n * The labels layer: every label beside the `point` its line ends at, on the\n * left of the plot when the lines run that way (`left`). `overhang` is what\n * the marks take beyond the plot's edge.\n */\nfunction endLabelLayer(\n labels: readonly (EndLabelText & { point: readonly [number, number] | null })[],\n area: Rect,\n left: boolean,\n fontSize: number,\n overhang: number,\n): VNode | null {\n const step = Math.ceil(fontSize * LINE_HEIGHT)\n const placed = labels\n .flatMap((label) => (label.point ? { ...label, point: label.point, y: label.point[1] } : []))\n .sort((a, b) => a.point[1] - b.point[1])\n if (!placed.length) return null\n // Top to bottom, each a line below the one before; then back up from the bottom of the plot.\n let floor = area.y\n for (const label of placed) {\n label.y = Math.max(label.y, floor)\n floor = label.y + step\n }\n let ceiling = Math.max(area.y + area.height, (placed[0]?.y ?? 0) + (placed.length - 1) * step)\n for (const label of placed.slice().reverse()) {\n label.y = Math.min(label.y, ceiling)\n ceiling = label.y - step\n }\n const sign = left ? -1 : 1\n const edge = left ? area.x - overhang : area.x + area.width + overhang\n const at = edge + sign * LEAD\n return h(\n 'g',\n { key: 'end-labels', class: 'tc-end-labels', 'aria-hidden': 'true' },\n placed.map((label) => {\n const [px, py] = label.point\n const moved = Math.abs(label.y - py) > 1\n return h(\n 'g',\n {\n key: label.key,\n class: ['tc-end-label', 'tc-series', `tc-series-${label.index + 1}`],\n // A map, so values from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': label.color },\n },\n // From past the point's dot to just before the text.\n moved &&\n h('path', {\n class: 'tc-end-label-line',\n d: `M${round(px + sign * (overhang + 2))},${round(py)}L${round(at - sign * 3)},${round(label.y)}`,\n }),\n h(\n 'text',\n {\n class: 'tc-end-label-text',\n style: `transform:translate(${round(at)}px,${round(label.y)}px)`,\n 'text-anchor': left ? 'end' : 'start',\n dy: '0.35em',\n },\n left\n ? [\n label.value && h('tspan', { class: 'tc-end-label-value' }, label.value),\n h('tspan', { dx: label.value ? GAP : undefined }, label.name),\n ]\n : [\n label.name,\n label.value && h('tspan', { class: 'tc-end-label-value', dx: GAP }, label.value),\n ],\n ),\n )\n }),\n )\n}\n\ntype Options = CartesianOptions & { endLabels?: boolean | EndLabelOptions }\n\n/**\n * The end labels of a line chart: its `options` with room for the labels\n * beside the plot (on the side the lines end at), and the `layer` that\n * draws them once the points of every series (`null` for gaps) and the plot\n * area are known. `overhang` is what the marks take beyond the plot's edge.\n */\nexport function endLabels<O extends Options>(\n options: O,\n ctx: RenderContext,\n overhang: number,\n): { options: O; layer: (points: readonly (readonly Point[])[], area: Rect) => VNode | null } {\n const texts = endLabelTexts(options, ctx)\n const left = options.x?.reverse ?? ctx.rtl === true\n const side = left ? 'left' : 'right'\n const pad = insets(options.padding)\n return {\n options: {\n ...options,\n padding: { ...pad, [side]: pad[side] + endLabelRoom(texts, ctx.fontSize) },\n },\n layer: (points, area) =>\n endLabelLayer(\n texts.map((label) => ({\n ...label,\n point: (points[label.index] ?? []).filter((p) => p != null).pop() ?? null,\n })),\n area,\n left,\n ctx.fontSize,\n overhang,\n ),\n }\n}\n"],"mappings":";;;;;;AA+B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,EAAE,OAAO,qBAAqB,GAAG,MAAM,KAAK,GACtE,EAAE,SAAS,EAAE,IAAI,MAAM,QAAQ,MAAM,KAAA,EAAU,GAAG,MAAM,IAAI,CAC9D,IACA,CACE,MAAM,MACN,MAAM,SAAS,EAAE,SAAS;GAAE,OAAO;GAAsB,IAAI;EAAI,GAAG,MAAM,KAAK,CACjF,CACN,CACF;CACF,CAAC,CACH;AACF;;;;;;;AAUA,SAAgB,UACd,SACA,KACA,UAC4F;CAC5F,MAAM,QAAQ,cAAc,SAAS,GAAG;CACxC,MAAM,OAAO,QAAQ,GAAG,WAAW,IAAI,QAAQ;CAC/C,MAAM,OAAO,OAAO,SAAS;CAC7B,MAAM,MAAM,OAAO,QAAQ,OAAO;CAClC,OAAO;EACL,SAAS;GACP,GAAG;GACH,SAAS;IAAE,GAAG;KAAM,OAAO,IAAI,QAAQ,aAAa,OAAO,IAAI,QAAQ;GAAE;EAC3E;EACA,QAAQ,QAAQ,SACd,cACE,MAAM,KAAK,WAAW;GACpB,GAAG;GACH,QAAQ,OAAO,MAAM,UAAU,CAAC,EAAA,CAAG,QAAQ,MAAM,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK;EACvE,EAAE,GACF,MACA,MACA,IAAI,UACJ,QACF;CACJ;AACF"}
@@ -0,0 +1,119 @@
1
+ const require_format = require("./format-CAE5ruy6.cjs");
2
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
3
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
4
+ const require_cartesian = require("./cartesian-B9CrasFJ.cjs");
5
+ // src/charts/end-labels.ts
6
+ /** Space between a point and its label (the joining line runs through it), and between name and value. */
7
+ const LEAD = 14;
8
+ const GAP = 6;
9
+ /** The labels of a chart: one per visible series that has a value. */
10
+ function endLabelTexts(options, ctx) {
11
+ const own = typeof options.endLabels === "object" ? options.endLabels : {};
12
+ const axisOf = require_cartesian.seriesAxes(options);
13
+ return options.data.series.flatMap((series, index) => {
14
+ const { axis } = axisOf(series);
15
+ const last = series.values.filter((v) => require_cartesian.plottable(v, axis)).pop();
16
+ if (last == null || ctx.hidden.has(require_cartesian.seriesKey(series))) return [];
17
+ const format = own.format ? require_format.formatNumber(own.format, ctx.locale) : require_format.formatDetail(axis.format, ctx.locale);
18
+ return {
19
+ index,
20
+ key: require_cartesian.seriesKey(series),
21
+ name: series.name,
22
+ value: own.value === false ? "" : format(last),
23
+ color: series.color
24
+ };
25
+ });
26
+ }
27
+ const width = (label, fontSize) => {
28
+ const value = label.value ? GAP + require_layout.estimateTextWidth(label.value, fontSize) * 1.06 : 0;
29
+ return require_layout.estimateTextWidth(label.name, fontSize) + value;
30
+ };
31
+ /** Width the labels need beside the plot, in pixels (0 without labels). */
32
+ const endLabelRoom = (labels, fontSize) => labels.length ? Math.ceil(LEAD + Math.max(...labels.map((label) => width(label, fontSize)))) : 0;
33
+ /**
34
+ * The labels layer: every label beside the `point` its line ends at, on the
35
+ * left of the plot when the lines run that way (`left`). `overhang` is what
36
+ * the marks take beyond the plot's edge.
37
+ */
38
+ function endLabelLayer(labels, area, left, fontSize, overhang) {
39
+ const step = Math.ceil(fontSize * require_layout.LINE_HEIGHT);
40
+ const placed = labels.flatMap((label) => label.point ? {
41
+ ...label,
42
+ point: label.point,
43
+ y: label.point[1]
44
+ } : []).sort((a, b) => a.point[1] - b.point[1]);
45
+ if (!placed.length) return null;
46
+ let floor = area.y;
47
+ for (const label of placed) {
48
+ label.y = Math.max(label.y, floor);
49
+ floor = label.y + step;
50
+ }
51
+ let ceiling = Math.max(area.y + area.height, (placed[0]?.y ?? 0) + (placed.length - 1) * step);
52
+ for (const label of placed.slice().reverse()) {
53
+ label.y = Math.min(label.y, ceiling);
54
+ ceiling = label.y - step;
55
+ }
56
+ const sign = left ? -1 : 1;
57
+ const at = (left ? area.x - overhang : area.x + area.width + overhang) + sign * LEAD;
58
+ return require_vnode.h("g", {
59
+ key: "end-labels",
60
+ class: "tc-end-labels",
61
+ "aria-hidden": "true"
62
+ }, placed.map((label) => {
63
+ const [px, py] = label.point;
64
+ const moved = Math.abs(label.y - py) > 1;
65
+ return require_vnode.h("g", {
66
+ key: label.key,
67
+ class: [
68
+ "tc-end-label",
69
+ "tc-series",
70
+ `tc-series-${label.index + 1}`
71
+ ],
72
+ style: { "--tc-series-color": label.color }
73
+ }, moved && require_vnode.h("path", {
74
+ class: "tc-end-label-line",
75
+ d: `M${require_layout.round(px + sign * (overhang + 2))},${require_layout.round(py)}L${require_layout.round(at - sign * 3)},${require_layout.round(label.y)}`
76
+ }), require_vnode.h("text", {
77
+ class: "tc-end-label-text",
78
+ style: `transform:translate(${require_layout.round(at)}px,${require_layout.round(label.y)}px)`,
79
+ "text-anchor": left ? "end" : "start",
80
+ dy: "0.35em"
81
+ }, left ? [label.value && require_vnode.h("tspan", { class: "tc-end-label-value" }, label.value), require_vnode.h("tspan", { dx: label.value ? GAP : void 0 }, label.name)] : [label.name, label.value && require_vnode.h("tspan", {
82
+ class: "tc-end-label-value",
83
+ dx: GAP
84
+ }, label.value)]));
85
+ }));
86
+ }
87
+ /**
88
+ * The end labels of a line chart: its `options` with room for the labels
89
+ * beside the plot (on the side the lines end at), and the `layer` that
90
+ * draws them once the points of every series (`null` for gaps) and the plot
91
+ * area are known. `overhang` is what the marks take beyond the plot's edge.
92
+ */
93
+ function endLabels(options, ctx, overhang) {
94
+ const texts = endLabelTexts(options, ctx);
95
+ const left = options.x?.reverse ?? ctx.rtl === true;
96
+ const side = left ? "left" : "right";
97
+ const pad = require_layout.insets(options.padding);
98
+ return {
99
+ options: {
100
+ ...options,
101
+ padding: {
102
+ ...pad,
103
+ [side]: pad[side] + endLabelRoom(texts, ctx.fontSize)
104
+ }
105
+ },
106
+ layer: (points, area) => endLabelLayer(texts.map((label) => ({
107
+ ...label,
108
+ point: (points[label.index] ?? []).filter((p) => p != null).pop() ?? null
109
+ })), area, left, ctx.fontSize, overhang)
110
+ };
111
+ }
112
+ Object.defineProperty(exports, "endLabels", {
113
+ enumerable: true,
114
+ get: function() {
115
+ return endLabels;
116
+ }
117
+ });
118
+
119
+ //# sourceMappingURL=end-labels-CS-fnpp-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-labels-CS-fnpp-.cjs","names":["seriesAxes","plottable","seriesKey","formatNumber","formatDetail","estimateTextWidth","LINE_HEIGHT","h","round","insets"],"sources":["../src/charts/end-labels.ts"],"sourcesContent":["/**\n * End labels: each line named at its end, with its last value, in a column\n * past the edge of the plot. Labels of lines that end close together are\n * moved apart, and a thin line in the series color joins a moved label to\n * its point, so a chart reads without its legend.\n */\nimport type { RenderContext } from '../chart.ts'\nimport { formatDetail, formatNumber, type NumberFormat } from '../format.ts'\nimport { estimateTextWidth, insets, LINE_HEIGHT, type Rect, round } from '../layout.ts'\nimport type { Point } from '../shapes/path.ts'\nimport { h, type VNode } from '../vnode.ts'\nimport { type CartesianOptions, plottable, seriesAxes, seriesKey } from './cartesian.ts'\n\nexport interface EndLabelOptions {\n /** Format of the values. Defaults to the format of the series' value axis. */\n format?: NumberFormat\n /** Write the last value after the name. Defaults to `true`. */\n value?: boolean\n}\n\n/** The text of one label: the series (by index), its name and its last value. */\nexport interface EndLabelText {\n index: number\n key: string\n name: string\n value: string\n /** The series' own color, if it has one. */\n color?: string\n}\n\n/** Space between a point and its label (the joining line runs through it), and between name and value. */\nconst LEAD = 14\nconst GAP = 6\n\n/** The labels of a chart: one per visible series that has a value. */\nfunction endLabelTexts(\n options: CartesianOptions & { endLabels?: boolean | EndLabelOptions },\n ctx: RenderContext,\n): EndLabelText[] {\n const own: EndLabelOptions = typeof options.endLabels === 'object' ? options.endLabels : {}\n const axisOf = seriesAxes(options)\n return options.data.series.flatMap((series, index) => {\n const { axis } = axisOf(series)\n const last = series.values.filter((v) => plottable(v, axis)).pop()\n if (last == null || ctx.hidden.has(seriesKey(series))) return []\n const format = own.format\n ? formatNumber(own.format, ctx.locale)\n : formatDetail(axis.format, ctx.locale)\n return {\n index,\n key: seriesKey(series),\n name: series.name,\n value: own.value === false ? '' : format(last),\n color: series.color,\n }\n })\n}\n\nconst width = (label: EndLabelText, fontSize: number): number => {\n // The value is set in a heavier weight: a little wider than estimated.\n const value = label.value ? GAP + estimateTextWidth(label.value, fontSize) * 1.06 : 0\n return estimateTextWidth(label.name, fontSize) + value\n}\n\n/** Width the labels need beside the plot, in pixels (0 without labels). */\nconst endLabelRoom = (labels: readonly EndLabelText[], fontSize: number): number =>\n labels.length ? Math.ceil(LEAD + Math.max(...labels.map((label) => width(label, fontSize)))) : 0\n\n/**\n * The labels layer: every label beside the `point` its line ends at, on the\n * left of the plot when the lines run that way (`left`). `overhang` is what\n * the marks take beyond the plot's edge.\n */\nfunction endLabelLayer(\n labels: readonly (EndLabelText & { point: readonly [number, number] | null })[],\n area: Rect,\n left: boolean,\n fontSize: number,\n overhang: number,\n): VNode | null {\n const step = Math.ceil(fontSize * LINE_HEIGHT)\n const placed = labels\n .flatMap((label) => (label.point ? { ...label, point: label.point, y: label.point[1] } : []))\n .sort((a, b) => a.point[1] - b.point[1])\n if (!placed.length) return null\n // Top to bottom, each a line below the one before; then back up from the bottom of the plot.\n let floor = area.y\n for (const label of placed) {\n label.y = Math.max(label.y, floor)\n floor = label.y + step\n }\n let ceiling = Math.max(area.y + area.height, (placed[0]?.y ?? 0) + (placed.length - 1) * step)\n for (const label of placed.slice().reverse()) {\n label.y = Math.min(label.y, ceiling)\n ceiling = label.y - step\n }\n const sign = left ? -1 : 1\n const edge = left ? area.x - overhang : area.x + area.width + overhang\n const at = edge + sign * LEAD\n return h(\n 'g',\n { key: 'end-labels', class: 'tc-end-labels', 'aria-hidden': 'true' },\n placed.map((label) => {\n const [px, py] = label.point\n const moved = Math.abs(label.y - py) > 1\n return h(\n 'g',\n {\n key: label.key,\n class: ['tc-end-label', 'tc-series', `tc-series-${label.index + 1}`],\n // A map, so values from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': label.color },\n },\n // From past the point's dot to just before the text.\n moved &&\n h('path', {\n class: 'tc-end-label-line',\n d: `M${round(px + sign * (overhang + 2))},${round(py)}L${round(at - sign * 3)},${round(label.y)}`,\n }),\n h(\n 'text',\n {\n class: 'tc-end-label-text',\n style: `transform:translate(${round(at)}px,${round(label.y)}px)`,\n 'text-anchor': left ? 'end' : 'start',\n dy: '0.35em',\n },\n left\n ? [\n label.value && h('tspan', { class: 'tc-end-label-value' }, label.value),\n h('tspan', { dx: label.value ? GAP : undefined }, label.name),\n ]\n : [\n label.name,\n label.value && h('tspan', { class: 'tc-end-label-value', dx: GAP }, label.value),\n ],\n ),\n )\n }),\n )\n}\n\ntype Options = CartesianOptions & { endLabels?: boolean | EndLabelOptions }\n\n/**\n * The end labels of a line chart: its `options` with room for the labels\n * beside the plot (on the side the lines end at), and the `layer` that\n * draws them once the points of every series (`null` for gaps) and the plot\n * area are known. `overhang` is what the marks take beyond the plot's edge.\n */\nexport function endLabels<O extends Options>(\n options: O,\n ctx: RenderContext,\n overhang: number,\n): { options: O; layer: (points: readonly (readonly Point[])[], area: Rect) => VNode | null } {\n const texts = endLabelTexts(options, ctx)\n const left = options.x?.reverse ?? ctx.rtl === true\n const side = left ? 'left' : 'right'\n const pad = insets(options.padding)\n return {\n options: {\n ...options,\n padding: { ...pad, [side]: pad[side] + endLabelRoom(texts, ctx.fontSize) },\n },\n layer: (points, area) =>\n endLabelLayer(\n texts.map((label) => ({\n ...label,\n point: (points[label.index] ?? []).filter((p) => p != null).pop() ?? null,\n })),\n area,\n left,\n ctx.fontSize,\n overhang,\n ),\n }\n}\n"],"mappings":";;;;;;AA+BA,MAAM,OAAO;AACb,MAAM,MAAM;;AAGZ,SAAS,cACP,SACA,KACgB;CAChB,MAAM,MAAuB,OAAO,QAAQ,cAAc,WAAW,QAAQ,YAAY,CAAC;CAC1F,MAAM,SAASA,kBAAAA,WAAW,OAAO;CACjC,OAAO,QAAQ,KAAK,OAAO,SAAS,QAAQ,UAAU;EACpD,MAAM,EAAE,SAAS,OAAO,MAAM;EAC9B,MAAM,OAAO,OAAO,O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U,GAAG,MAAM,IAAI,CAC9D,IACA,CACE,MAAM,MACN,MAAM,SAASA,cAAAA,EAAE,SAAS;GAAE,OAAO;GAAsB,IAAI;EAAI,GAAG,MAAM,KAAK,CACjF,CACN,CACF;CACF,CAAC,CACH;AACF;;;;;;;AAUA,SAAgB,UACd,SACA,KACA,UAC4F;CAC5F,MAAM,QAAQ,cAAc,SAAS,GAAG;CACxC,MAAM,OAAO,QAAQ,GAAG,WAAW,IAAI,QAAQ;CAC/C,MAAM,OAAO,OAAO,SAAS;CAC7B,MAAM,MAAME,eAAAA,OAAO,QAAQ,OAAO;CAClC,OAAO;EACL,SAAS;GACP,GAAG;GACH,SAAS;IAAE,GAAG;KAAM,OAAO,IAAI,QAAQ,aAAa,OAAO,IAAI,QAAQ;GAAE;EAC3E;EACA,QAAQ,QAAQ,SACd,cACE,MAAM,KAAK,WAAW;GACpB,GAAG;GACH,QAAQ,OAAO,MAAM,UAAU,CAAC,EAAA,CAAG,QAAQ,MAAM,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK;EACvE,EAAE,GACF,MACA,MACA,IAAI,UACJ,QACF;CACJ;AACF"}
@@ -0,0 +1,11 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_end_labels = require("./end-labels-CS-fnpp-.cjs");
3
+ // src/end-labels.ts
4
+ /**
5
+ * Standalone entry: `import '@tabler/charts/end-labels'` enables `endLabels`
6
+ * (the name and last value at the end of each line) on the core.
7
+ */
8
+ require("./features-DEDP5CEQ.cjs").register({ "end-labels": require_end_labels.endLabels });
9
+ exports.endLabels = require_end_labels.endLabels;
10
+
11
+ //# sourceMappingURL=end-labels.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-labels.cjs","names":["register","endLabels"],"sources":["../src/end-labels.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/end-labels'` enables `endLabels`\n * (the name and last value at the end of each line) on the core.\n */\nimport { endLabels } from './charts/end-labels.ts'\nimport { register } from './features.ts'\n\nregister({ 'end-labels': endLabels })\n\nexport type { EndLabelOptions } from './charts/end-labels.ts'\nexport { endLabels }\n"],"mappings":";;;;;;;A,iCAOAA,CAAAA,CAAAA,SAAS,EAAE,cAAcC,mBAAAA,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Standalone entry: `import '@tabler/charts/end-labels'` enables `endLabels`
3
+ * (the name and last value at the end of each line) on the core.
4
+ */
5
+ import { ft as EndLabelOptions, pt as endLabels } from "./chart-Dz4geQZy.cjs";
6
+ export { type EndLabelOptions, endLabels };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Standalone entry: `import '@tabler/charts/end-labels'` enables `endLabels`
3
+ * (the name and last value at the end of each line) on the core.
4
+ */
5
+ import { ct as EndLabelOptions, lt as endLabels } from "./chart-CE9EVbfV.js";
6
+ export { type EndLabelOptions, endLabels };
@@ -0,0 +1,11 @@
1
+ import { t as endLabels } from "./end-labels-B3oRvjxw.js";
2
+ import { i as register } from "./features-B55rwpQC.js";
3
+ // src/end-labels.ts
4
+ /**
5
+ * Standalone entry: `import '@tabler/charts/end-labels'` enables `endLabels`
6
+ * (the name and last value at the end of each line) on the core.
7
+ */
8
+ register({ "end-labels": endLabels });
9
+ export { endLabels };
10
+
11
+ //# sourceMappingURL=end-labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-labels.js","names":[],"sources":["../src/end-labels.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/end-labels'` enables `endLabels`\n * (the name and last value at the end of each line) on the core.\n */\nimport { endLabels } from './charts/end-labels.ts'\nimport { register } from './features.ts'\n\nregister({ 'end-labels': endLabels })\n\nexport type { EndLabelOptions } from './charts/end-labels.ts'\nexport { endLabels }\n"],"mappings":";;;;;;;AAOA,SAAS,EAAE,cAAc,UAAU,CAAC"}