@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
@@ -1,6 +1,6 @@
1
- import { s as Rect } from "./annotations-B02GR_KU.js";
1
+ import { i as Rect } from "./layout-CYerDebD.js";
2
2
  import { l as VNode, r as Child } from "./vnode-Du2cC8Fm.js";
3
- import { D as ChartPlugin, ft as Tick, xt as Hit } from "./chart-QilhWP8Z.js";
3
+ import { V as ChartPlugin, kt as Tick, zt as Hit } from "./chart-CE9EVbfV.js";
4
4
  interface ArcOptions {
5
5
  innerRadius: number;
6
6
  outerRadius: number;
@@ -39,23 +39,33 @@ interface GridOptions {
39
39
  */
40
40
  declare function grid(options: GridOptions): VNode;
41
41
  /**
42
- * Hover marks drawn below the series: a band behind the hovered category of
43
- * band charts (bars), or a vertical crosshair for point charts (lines).
42
+ * Hover marks drawn below the series: the band behind the hovered category
43
+ * (bars), a crosshair through it (point charts; a spoke in radars), or a
44
+ * halo that asks to stay `under` the chart (sankey flows).
44
45
  */
45
46
  declare function hoverUnderlay(hit: Hit, crosshair?: boolean): VNode;
46
47
  /**
47
- * Hover marks drawn above the series: the hit's own mark (pie slices), or
48
- * an active dot on every point of point charts (of the series' `shape`, if given).
48
+ * Hover marks drawn above the series: a halo (pie slices), or an active dot
49
+ * on every value of point charts (of the series' `shape`, if given);
50
+ * `points: false` leaves the dots out.
49
51
  */
50
- declare function hoverOverlay(hit: Hit, radius?: number, shape?: (slot: number, x: number, y: number, r: number) => string): VNode;
52
+ declare function hoverOverlay(hit: Hit, radius?: number, shape?: (slot: number, x: number, y: number, r: number) => string, points?: boolean): VNode;
53
+ /**
54
+ * The value under the pointer (`hit.cursor`): a line through it across the
55
+ * plot and the value in a tag on the value axis, drawn above the axes. Nothing
56
+ * for a hit without one (keyboard, charts without a value axis).
57
+ */
58
+ declare function hoverValue(hit: Hit, fontSize: number): VNode | undefined;
51
59
  /**
52
60
  * Draws the highlighted category: a crosshair (or a band behind bars) under
53
- * the series and active dots above them. `crosshair: false` keeps the dots.
61
+ * the series and active dots above them. `crosshair: false` keeps the dots,
62
+ * `activePoints: false` the crosshair; `crosshair: { value: true }` adds the
63
+ * value under the pointer on the value axis.
54
64
  */
55
65
  declare function highlight(): ChartPlugin;
56
66
  declare function keyboard(): ChartPlugin;
57
67
  /**
58
- * An HTML legend (`.tc-legend`) with toggle buttons, above or below the SVG.
68
+ * An HTML legend (`.tc-legend`) with toggle buttons, above, below or beside the SVG.
59
69
  * Shown for two or more entries unless the `legend` option says otherwise.
60
70
  */
61
71
  declare function legend(): ChartPlugin;
@@ -79,6 +89,12 @@ declare function dataTable(): ChartPlugin;
79
89
  * `theme: 'light'` adds `.tc-tooltip-light` for the white variant.
80
90
  */
81
91
  declare function tooltip(): ChartPlugin;
92
+ /**
93
+ * Zoom along the categories of line, area, bar and candlestick charts,
94
+ * behind `zoom: true`. The code comes with `import '@tabler/charts/zoom'`
95
+ * (before the chart is created); without it the plugin does nothing.
96
+ */
97
+ declare const zoom: () => ChartPlugin;
82
98
  /** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */
83
99
  declare function defaultPlugins(): ChartPlugin[];
84
100
  /**
@@ -180,4 +196,4 @@ declare function barPath(x: number, width: number, baseline: number, value: numb
180
196
  declare function hbarPath(y: number, height: number, baseline: number, value: number, radius?: number): string;
181
197
  /** Version of the `@tabler/charts` package. */
182
198
  declare const VERSION: string;
183
- export { arcCentroid as A, keyboard as C, GridOptions as D, hoverUnderlay as E, padAngleForGap as M, grid as O, legend as S, hoverOverlay as T, defaultPlugins as _, flush as a, sync as b, tickIncrement as c, extent as d, RenderToStringOptions as f, render as g, renderToString as h, cancel as i, arcPathStable as j, ArcOptions as k, tickStep as l, escapeText as m, barPath as n, schedule as o, escapeAttr as p, hbarPath as r, niceDomain as s, VERSION as t, ticks as u, tooltip as v, highlight as w, pointer as x, dataTable as y };
199
+ export { grid as A, legend as C, hoverUnderlay as D, hoverOverlay as E, arcCentroid as M, arcPathStable as N, hoverValue as O, padAngleForGap as P, pointer as S, highlight as T, defaultPlugins as _, flush as a, dataTable as b, tickIncrement as c, extent as d, RenderToStringOptions as f, render as g, renderToString as h, cancel as i, ArcOptions as j, GridOptions as k, tickStep as l, escapeText as m, barPath as n, schedule as o, escapeAttr as p, hbarPath as r, niceDomain as s, VERSION as t, ticks as u, zoom as v, keyboard as w, sync as x, tooltip as y };
@@ -1,16 +1,18 @@
1
1
  const require_vnode = require("./vnode-ClAiw28x.cjs");
2
- const require_chart = require("./chart-e2VqomCI.cjs");
3
- const require_cartesian = require("./cartesian-DV02PsBe.cjs");
4
- const require_layout = require("./layout-JY2aR-yE.cjs");
5
- const require_features = require("./features-DCXEvoya.cjs");
2
+ const require_chart = require("./chart-GUmmjJ7S.cjs");
3
+ const require_cartesian = require("./cartesian-B9CrasFJ.cjs");
4
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
5
+ const require_features = require("./features-DEDP5CEQ.cjs");
6
6
  const require_format = require("./format-CAE5ruy6.cjs");
7
- const require_dom = require("./dom-D_g13XWY.cjs");
7
+ const require_dom = require("./dom-C33zvtPo.cjs");
8
+ const require_interaction = require("./interaction-DXYSjgnP.cjs");
8
9
  // src/plugins/download.ts
9
10
  const NAMES = {
10
11
  png: "PNG",
11
12
  svg: "SVG",
12
13
  jpeg: "JPEG",
13
- webp: "WebP"
14
+ webp: "WebP",
15
+ csv: "CSV"
14
16
  };
15
17
  const DEFAULT_FORMATS = ["png", "svg"];
16
18
  function resolve(option) {
@@ -18,8 +20,8 @@ function resolve(option) {
18
20
  }
19
21
  /**
20
22
  * A download menu in the chart's corner (`.tc-download`): a button that opens
21
- * a list of file formats, PNG and SVG by default. Shown with the `download`
22
- * option. The files come from `@tabler/charts/export`, which must be imported
23
+ * a list of file formats, PNG and SVG by default (`'csv'` adds the data as a
24
+ * CSV file). Shown with the `download` option. The files come from `@tabler/charts/export`, which must be imported
23
25
  * (the chart says so otherwise): that way charts without a download never
24
26
  * carry the export code.
25
27
  */
@@ -151,56 +153,51 @@ function seriesGroup(seriesIndex, color, child) {
151
153
  style: { "--tc-series-color": color }
152
154
  }, child);
153
155
  }
156
+ /** A halo around the hit, in the color of its series. */
157
+ function halo(hit, mark) {
158
+ const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
159
+ return item && seriesGroup(item.seriesIndex, item.color, require_vnode.h("path", {
160
+ class: "tc-hover-mark",
161
+ d: mark.d,
162
+ style: `transform:translate(${require_layout.round(mark.x ?? 0)}px,${require_layout.round(mark.y ?? 0)}px)`
163
+ }));
164
+ }
154
165
  /**
155
- * Hover marks drawn below the series: a band behind the hovered category of
156
- * band charts (bars), or a vertical crosshair for point charts (lines).
166
+ * Hover marks drawn below the series: the band behind the hovered category
167
+ * (bars), a crosshair through it (point charts; a spoke in radars), or a
168
+ * halo that asks to stay `under` the chart (sankey flows).
157
169
  */
158
170
  function hoverUnderlay(hit, crosshair = true) {
159
- const { area } = hit;
171
+ const { area, highlight: mark = { kind: "crosshair" } } = hit;
172
+ const line = (x1, y1, x2, y2) => crosshair && require_vnode.h("line", {
173
+ class: "tc-crosshair",
174
+ x1: require_layout.round(x1),
175
+ x2: require_layout.round(x2),
176
+ y1: require_layout.round(y1),
177
+ y2: require_layout.round(y2)
178
+ });
160
179
  return require_vnode.h("g", {
161
180
  class: "tc-hover",
162
181
  "aria-hidden": "true"
163
- }, hit.mark ? null : hit.band ? require_vnode.h("rect", {
182
+ }, mark.kind === "halo" ? mark.under && halo(hit, mark) : mark.kind === "band" ? require_vnode.h("rect", {
164
183
  class: "tc-hover-band",
165
- x: require_layout.round(hit.band.x),
166
- y: require_layout.round(hit.band.y),
167
- width: require_layout.round(hit.band.width),
168
- height: require_layout.round(hit.band.height)
169
- }) : crosshair && require_vnode.h("line", hit.guide ? {
170
- class: "tc-crosshair",
171
- x1: require_layout.round(hit.guide.x1),
172
- x2: require_layout.round(hit.guide.x2),
173
- y1: require_layout.round(hit.guide.y1),
174
- y2: require_layout.round(hit.guide.y2)
175
- } : {
176
- class: "tc-crosshair",
177
- x1: require_layout.round(hit.x),
178
- x2: require_layout.round(hit.x),
179
- y1: require_layout.round(area.y),
180
- y2: require_layout.round(area.y + area.height)
181
- }));
184
+ x: require_layout.round(mark.x),
185
+ y: require_layout.round(mark.y),
186
+ width: require_layout.round(mark.width),
187
+ height: require_layout.round(mark.height)
188
+ }) : mark.kind === "spoke" ? line(mark.x1, mark.y1, mark.x2, mark.y2) : line(hit.x, area.y, hit.x, area.y + area.height));
182
189
  }
183
190
  /**
184
- * Hover marks drawn above the series: the hit's own mark (pie slices), or
185
- * an active dot on every point of point charts (of the series' `shape`, if given).
191
+ * Hover marks drawn above the series: a halo (pie slices), or an active dot
192
+ * on every value of point charts (of the series' `shape`, if given);
193
+ * `points: false` leaves the dots out.
186
194
  */
187
- function hoverOverlay(hit, radius = 4, shape) {
188
- const { mark } = hit;
189
- if (mark) {
190
- const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
191
- return require_vnode.h("g", {
192
- class: "tc-hover",
193
- "aria-hidden": "true"
194
- }, item && seriesGroup(item.seriesIndex, item.color, require_vnode.h("path", {
195
- class: "tc-hover-mark",
196
- d: mark.d,
197
- style: `transform:translate(${require_layout.round(mark.x)}px,${require_layout.round(mark.y)}px)`
198
- })));
199
- }
195
+ function hoverOverlay(hit, radius = 4, shape, points = true) {
196
+ const mark = hit.highlight;
200
197
  return require_vnode.h("g", {
201
198
  class: "tc-hover",
202
199
  "aria-hidden": "true"
203
- }, !hit.band && hit.items.map((item) => item.y !== null && seriesGroup(item.seriesIndex, item.color, shape ? require_vnode.h("path", {
200
+ }, mark?.kind === "halo" ? !mark.under && halo(hit, mark) : points && mark?.kind !== "band" && hit.items.map((item) => item.y !== null && seriesGroup(item.seriesIndex, item.color, shape ? require_vnode.h("path", {
204
201
  class: "tc-point tc-point-active tc-marker",
205
202
  d: shape(item.seriesIndex, item.x, item.y, radius)
206
203
  }) : require_vnode.h("circle", {
@@ -210,6 +207,60 @@ function hoverOverlay(hit, radius = 4, shape) {
210
207
  r: radius
211
208
  }))));
212
209
  }
210
+ /**
211
+ * The value under the pointer (`hit.cursor`): a line through it across the
212
+ * plot and the value in a tag on the value axis, drawn above the axes. Nothing
213
+ * for a hit without one (keyboard, charts without a value axis).
214
+ */
215
+ function hoverValue(hit, fontSize) {
216
+ const { cursor, area } = hit;
217
+ if (!cursor) return void 0;
218
+ const { position: at, side, inside } = cursor;
219
+ const right = area.x + area.width;
220
+ const bottom = area.y + area.height;
221
+ const w = require_layout.estimateTextWidth(cursor.text, fontSize) + 8;
222
+ const hgt = Math.round(fontSize * require_layout.LINE_HEIGHT) + 2;
223
+ const gap = 4;
224
+ let x;
225
+ let y;
226
+ if (side === "bottom") {
227
+ x = Math.min(Math.max(at - w / 2, area.x), right - w);
228
+ y = inside ? bottom - hgt - 2 : bottom + gap;
229
+ } else {
230
+ y = Math.min(Math.max(at - hgt / 2, area.y - hgt / 2), bottom - hgt / 2);
231
+ if (side === "left") x = inside ? area.x + 2 : area.x - gap - w;
232
+ else x = inside ? right - w - 2 : right + gap;
233
+ }
234
+ return require_vnode.h("g", {
235
+ class: "tc-hover tc-crosshair-value",
236
+ "aria-hidden": "true"
237
+ }, require_vnode.h("line", side === "bottom" ? {
238
+ class: "tc-crosshair",
239
+ x1: require_layout.round(at),
240
+ x2: require_layout.round(at),
241
+ y1: require_layout.round(area.y),
242
+ y2: require_layout.round(bottom)
243
+ } : {
244
+ class: "tc-crosshair",
245
+ x1: require_layout.round(area.x),
246
+ x2: require_layout.round(right),
247
+ y1: require_layout.round(at),
248
+ y2: require_layout.round(at)
249
+ }), require_vnode.h("rect", {
250
+ class: "tc-crosshair-tag",
251
+ x: require_layout.round(x),
252
+ y: require_layout.round(y),
253
+ width: require_layout.round(w),
254
+ height: hgt,
255
+ rx: 3
256
+ }), require_vnode.h("text", {
257
+ class: "tc-crosshair-label",
258
+ x: require_layout.round(x + w / 2),
259
+ y: require_layout.round(y + hgt / 2),
260
+ dy: "0.32em",
261
+ "text-anchor": "middle"
262
+ }, cursor.text));
263
+ }
213
264
  // src/plugins/pointer.ts
214
265
  const listening = /* @__PURE__ */ new WeakSet();
215
266
  /**
@@ -225,9 +276,9 @@ function listenPointer(chart) {
225
276
  const svg = el.querySelector("svg.tc-chart");
226
277
  if (!svg) return void 0;
227
278
  const { width, height } = chart.size;
228
- return require_chart.toChartPoint(svg, event.clientX, event.clientY, width, height);
279
+ return require_interaction.toChartPoint(svg, event.clientX, event.clientY, width, height);
229
280
  };
230
- const overControl = (event) => !!event.target?.closest?.(".tc-download");
281
+ const overControl = (event) => !!event.target?.closest?.(".tc-download,.tc-map-zoom");
231
282
  const onLeave = (event) => {
232
283
  if (event.pointerType !== "touch" && chart.highlightSource === "pointer") chart.clearHighlight(event);
233
284
  };
@@ -277,7 +328,9 @@ function pointer() {
277
328
  // src/plugins/highlight.ts
278
329
  /**
279
330
  * Draws the highlighted category: a crosshair (or a band behind bars) under
280
- * the series and active dots above them. `crosshair: false` keeps the dots.
331
+ * the series and active dots above them. `crosshair: false` keeps the dots,
332
+ * `activePoints: false` the crosshair; `crosshair: { value: true }` adds the
333
+ * value under the pointer on the value axis.
281
334
  */
282
335
  function highlight() {
283
336
  return {
@@ -287,7 +340,7 @@ function highlight() {
287
340
  return {
288
341
  layers: (hit, config) => ({
289
342
  under: hoverUnderlay(hit, config.crosshair !== false),
290
- over: hoverOverlay(hit, 4, require_cartesian.markerShape(config))
343
+ over: [hoverOverlay(hit, 4, require_cartesian.markerShape(config), config.activePoints !== false), require_chart.cursorValue(config) && hoverValue(hit, chart.fontSize)]
291
344
  }),
292
345
  ...stop ? { destroy: stop } : {}
293
346
  };
@@ -352,6 +405,11 @@ function keyboard() {
352
405
  const interaction = chart.interaction;
353
406
  if (!interaction || interaction.count === 0) return false;
354
407
  if (interaction.reversed && /^Arrow(L|R)/.test(key)) key = key === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
408
+ let column = interaction.rows ?? 1;
409
+ if (interaction.rows && /^Arrow(U|D)/.test(key)) {
410
+ key = key === "ArrowUp" ? "ArrowLeft" : "ArrowRight";
411
+ column = 1;
412
+ }
355
413
  const current = chart.highlightSource === "index" ? chart.active : null;
356
414
  const last = interaction.count - 1;
357
415
  const index = current?.index;
@@ -360,10 +418,10 @@ function keyboard() {
360
418
  const at = focused === void 0 ? -1 : series.indexOf(focused);
361
419
  switch (key) {
362
420
  case "ArrowRight":
363
- go(index === void 0 ? 0 : Math.min(last, index + 1), focused);
421
+ go(index === void 0 ? 0 : Math.min(last, index + column), focused);
364
422
  return true;
365
423
  case "ArrowLeft":
366
- go(index === void 0 ? last : Math.max(0, index - 1), focused);
424
+ go(index === void 0 ? last : Math.max(0, index - column), focused);
367
425
  return true;
368
426
  case "Home":
369
427
  go(0, focused);
@@ -417,8 +475,22 @@ function keyboard() {
417
475
  };
418
476
  }
419
477
  // src/plugins/legend.ts
478
+ /** The side a legend beside the chart takes in a right-to-left chart. */
479
+ const MIRROR = {
480
+ left: "right",
481
+ right: "left"
482
+ };
483
+ /**
484
+ * Classes on the container of a legend beside the chart, and of one before
485
+ * it. A class rather than `:has()` in the stylesheet: a selector such as
486
+ * `:where(:has(> .tc-legend…))` matches any element, so the browser checks it
487
+ * again on every change to the page (a hover, a tooltip), which stalls a page
488
+ * of charts.
489
+ */
490
+ const BESIDE = "tc-legend-beside";
491
+ const START = "tc-legend-start";
420
492
  /**
421
- * An HTML legend (`.tc-legend`) with toggle buttons, above or below the SVG.
493
+ * An HTML legend (`.tc-legend`) with toggle buttons, above, below or beside the SVG.
422
494
  * Shown for two or more entries unless the `legend` option says otherwise.
423
495
  */
424
496
  function legend() {
@@ -440,19 +512,37 @@ function legend() {
440
512
  bound = false;
441
513
  el.remove();
442
514
  el = void 0;
515
+ host.classList.remove(BESIDE, START);
516
+ };
517
+ /** Whether the legend follows the SVG in the container (below it, or beside it at the end). */
518
+ let after = false;
519
+ const side = () => {
520
+ const position = el?.dataset.position;
521
+ return position === "left" || position === "right";
443
522
  };
444
523
  /** Keep the legend right before or after the SVG, whatever else lives in the container. */
445
524
  const place = () => {
446
525
  if (!el) return;
447
526
  const svg = host.querySelector(":scope > svg.tc-chart");
448
- if (el.dataset.position === "bottom") {
527
+ if (after) {
449
528
  if (!svg) {
450
529
  if (!el.isConnected) host.appendChild(el);
451
530
  } else if (svg.nextElementSibling !== el) svg.after(el);
452
531
  } else if (!el.isConnected || el.nextElementSibling !== svg) host.insertBefore(el, svg ?? host.firstChild);
453
532
  };
533
+ /** Put the legend at `position`: beside the chart it comes first on the container's start side. */
534
+ const put = (position) => {
535
+ if (!el) return;
536
+ el.dataset.position = position;
537
+ after = position === "bottom" || side() && position === "right" !== (getComputedStyle(host).direction === "rtl");
538
+ place();
539
+ host.classList.toggle(BESIDE, side());
540
+ host.classList.toggle(START, side() && !after);
541
+ };
542
+ /** Space between the chart and a legend beside it. */
543
+ const gap = () => Number.parseFloat(getComputedStyle(host).columnGap) || 0;
454
544
  return {
455
- beforeRender({ legend, hidden }) {
545
+ beforeRender({ config, legend, hidden }) {
456
546
  if (!legend.show || typeof document === "undefined") {
457
547
  remove();
458
548
  return;
@@ -465,17 +555,22 @@ function legend() {
465
555
  el.addEventListener("click", onClick);
466
556
  bound = true;
467
557
  }
468
- el.dataset.position = legend.position;
469
558
  el.dir = chart.rtl ? "rtl" : "";
470
- require_dom.render(el, require_chart.legendContent(legend.items, hidden), adopt);
559
+ require_dom.render(el, require_chart.legendContent(legend.items, hidden, require_features.swatchShape(config)), adopt);
471
560
  adopt = null;
472
- place();
561
+ const { position } = legend;
562
+ const beside = position === "auto" ? "right" : position;
563
+ put(chart.rtl && MIRROR[beside] || beside);
564
+ if (position === "auto" && (el.offsetWidth + gap()) * 3 > host.clientWidth) put("bottom");
473
565
  },
474
566
  reservedHeight() {
475
- if (!el?.isConnected) return 0;
567
+ if (!el?.isConnected || side()) return 0;
476
568
  const { marginTop, marginBottom } = getComputedStyle(el);
477
569
  return el.offsetHeight + (Number.parseFloat(marginTop) || 0) + (Number.parseFloat(marginBottom) || 0);
478
570
  },
571
+ reservedWidth() {
572
+ return el?.isConnected && side() ? el.offsetWidth + gap() : 0;
573
+ },
479
574
  afterRender: place,
480
575
  destroy: remove
481
576
  };
@@ -618,10 +713,14 @@ function dataTable() {
618
713
  el.remove();
619
714
  el = void 0;
620
715
  };
621
- const update = (config, size, hidden) => {
716
+ const update = (config, hidden) => {
622
717
  const option = config.table ?? true;
623
718
  const maxRows = typeof option === "object" && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS;
624
- const table = option !== false && typeof document !== "undefined" ? config.type.table?.(config, require_chart.renderContext(config, size, chart.id, () => {}, hidden, chart.fontSize), maxRows) : void 0;
719
+ const table = option !== false && typeof document !== "undefined" ? config.type.table?.(require_chart.chartModel(config), {
720
+ locale: config.locale,
721
+ hidden,
722
+ rtl: chart.rtl
723
+ }, maxRows) : void 0;
625
724
  if (!table) {
626
725
  remove();
627
726
  return;
@@ -643,20 +742,20 @@ function dataTable() {
643
742
  require_dom.render(el, tableContent(rows, caption), adopt);
644
743
  adopt = null;
645
744
  const svg = host.querySelector(":scope > svg.tc-chart");
646
- const after = host.querySelector(":scope > .tc-legend[data-position=\"bottom\"]") ?? svg;
745
+ const after = host.querySelector(":scope > svg.tc-chart + .tc-legend") ?? svg;
647
746
  if (after && after.nextElementSibling !== el) after.after(el);
648
747
  else if (!el.isConnected) host.appendChild(el);
649
748
  };
650
749
  return {
651
- afterRender({ config, size, hidden, changed }) {
750
+ afterRender({ config, hidden, changed }) {
652
751
  if (!changed && el?.isConnected) return;
653
752
  const option = config.table ?? true;
654
753
  const same = shown === option;
655
754
  shown = option;
656
- if (same && el?.isConnected && el.classList.contains("tc-sr-only")) scheduleIdle(key, () => update(config, size, hidden));
755
+ if (same && el?.isConnected && el.classList.contains("tc-sr-only")) scheduleIdle(key, () => update(config, hidden));
657
756
  else {
658
757
  cancelIdle(key);
659
- update(config, size, hidden);
758
+ update(config, hidden);
660
759
  }
661
760
  },
662
761
  destroy: remove
@@ -672,7 +771,7 @@ function dataTable() {
672
771
  function hitAnchor(hit, pointer) {
673
772
  if (pointer) return pointer;
674
773
  const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
675
- if (hit.guide && item?.y != null) return {
774
+ if (hit.highlight?.kind === "spoke" && item?.y != null) return {
676
775
  x: item.x,
677
776
  y: item.y
678
777
  };
@@ -685,8 +784,11 @@ function hitAnchor(hit, pointer) {
685
784
  y: item?.y ?? hit.area.y + hit.area.height / 2
686
785
  };
687
786
  }
688
- /** Default tooltip content: the category title and one row per series. */
689
- function tooltipContent(hit, options = {}) {
787
+ /**
788
+ * Default tooltip content: the category title and one row per series
789
+ * (`shape` gives their swatches the point shapes of their slots).
790
+ */
791
+ function tooltipContent(hit, options = {}, shape) {
690
792
  const body = options.format ? options.format(hit) : [
691
793
  hit.title && require_vnode.h("div", { class: "tc-tooltip-title" }, hit.title),
692
794
  hit.items.map((item) => require_vnode.h("div", {
@@ -697,7 +799,10 @@ function tooltipContent(hit, options = {}) {
697
799
  `tc-series-${item.seriesIndex + 1}`,
698
800
  hit.seriesIndex === item.seriesIndex && "tc-tooltip-item-active"
699
801
  ],
700
- style: { "--tc-series-color": item.color }
802
+ style: {
803
+ "--tc-series-color": item.color,
804
+ ...shape?.(item.seriesIndex)
805
+ }
701
806
  }, require_vnode.h("span", { class: "tc-tooltip-swatch" }), require_vnode.h("span", { class: "tc-tooltip-name" }, item.name), require_vnode.h("span", { class: "tc-tooltip-value" }, item.text))),
702
807
  options.footer && require_vnode.h("div", { class: "tc-tooltip-footer" }, options.footer(hit))
703
808
  ];
@@ -800,7 +905,7 @@ function tooltip() {
800
905
  tip.classList.toggle("tc-tooltip-light", options?.theme === "light");
801
906
  const { rtl } = chart;
802
907
  tip.dir = rtl ? "rtl" : "";
803
- require_dom.render(tip, tooltipContent(hit, options));
908
+ require_dom.render(tip, tooltipContent(hit, options, require_features.swatchShape(chart.config)));
804
909
  const shown = tip;
805
910
  const turn = ++turns;
806
911
  waiting.push(() => {
@@ -816,7 +921,7 @@ function tooltip() {
816
921
  x: (rect.left - box.left) / k - el.clientLeft,
817
922
  y: (rect.top - box.top) / k - el.clientTop
818
923
  };
819
- const ax = hit.axis === "y" || hit.guide ? anchor.x : hit.x;
924
+ const ax = hit.axis === "y" || hit.highlight?.kind === "spoke" ? anchor.x : hit.x;
820
925
  const ay = hit.axis === "y" ? hit.y ?? anchor.y : anchor.y;
821
926
  const clip = room(el);
822
927
  const place = placeTooltip({
@@ -856,6 +961,15 @@ function tooltip() {
856
961
  };
857
962
  }
858
963
  // src/plugins/index.ts
964
+ /**
965
+ * Zoom along the categories of line, area, bar and candlestick charts,
966
+ * behind `zoom: true`. The code comes with `import '@tabler/charts/zoom'`
967
+ * (before the chart is created); without it the plugin does nothing.
968
+ */
969
+ const zoom = () => ({
970
+ name: "zoom",
971
+ install: (chart) => require_features.features.zoom?.install(chart) ?? {}
972
+ });
859
973
  /** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */
860
974
  function defaultPlugins() {
861
975
  return [
@@ -865,12 +979,13 @@ function defaultPlugins() {
865
979
  dataTable(),
866
980
  keyboard(),
867
981
  sync(),
868
- download()
982
+ download(),
983
+ zoom()
869
984
  ];
870
985
  }
871
986
  // src/core.ts
872
987
  /** Version of the `@tabler/charts` package. */
873
- const VERSION = "0.2.0";
988
+ const VERSION = "0.4.0";
874
989
  Object.defineProperty(exports, "VERSION", {
875
990
  enumerable: true,
876
991
  get: function() {
@@ -925,6 +1040,12 @@ Object.defineProperty(exports, "hoverUnderlay", {
925
1040
  return hoverUnderlay;
926
1041
  }
927
1042
  });
1043
+ Object.defineProperty(exports, "hoverValue", {
1044
+ enumerable: true,
1045
+ get: function() {
1046
+ return hoverValue;
1047
+ }
1048
+ });
928
1049
  Object.defineProperty(exports, "keyboard", {
929
1050
  enumerable: true,
930
1051
  get: function() {
@@ -973,5 +1094,11 @@ Object.defineProperty(exports, "tooltipContent", {
973
1094
  return tooltipContent;
974
1095
  }
975
1096
  });
1097
+ Object.defineProperty(exports, "zoom", {
1098
+ enumerable: true,
1099
+ get: function() {
1100
+ return zoom;
1101
+ }
1102
+ });
976
1103
 
977
- //# sourceMappingURL=core-DIOC61up.cjs.map
1104
+ //# sourceMappingURL=core-BZTrsPxc.cjs.map