@tabler/charts 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/README.md +74 -4
  2. package/dist/{annotations-D0YQ0IoA.js → annotations-BQ8l-qHs.js} +3 -3
  3. package/dist/{annotations-D0YQ0IoA.js.map → annotations-BQ8l-qHs.js.map} +1 -1
  4. package/dist/{annotations-DdRdeBUB.cjs → annotations-CpCWA29b.cjs} +3 -3
  5. package/dist/{annotations-DdRdeBUB.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
  6. package/dist/annotations.cjs +2 -2
  7. package/dist/annotations.js +2 -2
  8. package/dist/{area-d11XePuw.d.ts → area-DEFQm_SQ.d.ts} +2 -2
  9. package/dist/{area-4eRs3c0K.cjs → area-DYdQ_sMV.cjs} +3 -3
  10. package/dist/{area-4eRs3c0K.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
  11. package/dist/{area-0-L1bG9B.js → area-WdtfqvhX.js} +3 -3
  12. package/dist/{area-0-L1bG9B.js.map → area-WdtfqvhX.js.map} +1 -1
  13. package/dist/{area-CJX9219z.d.cts → area-h_FvieFb.d.cts} +2 -2
  14. package/dist/area.cjs +1 -1
  15. package/dist/area.d.cts +1 -1
  16. package/dist/area.d.ts +1 -1
  17. package/dist/area.js +1 -1
  18. package/dist/axis-MMaVoSWB.js +235 -0
  19. package/dist/axis-MMaVoSWB.js.map +1 -0
  20. package/dist/axis-YfAerNBA.cjs +300 -0
  21. package/dist/axis-YfAerNBA.cjs.map +1 -0
  22. package/dist/{bar-BNZ3GhIw.js → bar-BOcRcArc.js} +74 -56
  23. package/dist/bar-BOcRcArc.js.map +1 -0
  24. package/dist/{bar-Da6dE_nI.cjs → bar-CVkOJ7WA.cjs} +76 -58
  25. package/dist/bar-CVkOJ7WA.cjs.map +1 -0
  26. package/dist/{bar-B5n2oq9-.js → bar-CgpC2EpX.js} +2 -2
  27. package/dist/{bar-B5n2oq9-.js.map → bar-CgpC2EpX.js.map} +1 -1
  28. package/dist/{bar-XwzM6Pb0.d.ts → bar-D9B_arKf.d.ts} +1 -1
  29. package/dist/{bar-BDLR4p9c.d.cts → bar-DZCQ-kyf.d.cts} +2 -2
  30. package/dist/{bar-LYIF8MEz.cjs → bar-wVykm1us.cjs} +2 -2
  31. package/dist/{bar-LYIF8MEz.cjs.map → bar-wVykm1us.cjs.map} +1 -1
  32. package/dist/bar.cjs +1 -1
  33. package/dist/bar.d.cts +1 -1
  34. package/dist/bar.d.ts +1 -1
  35. package/dist/bar.js +1 -1
  36. package/dist/calendar-BSvO8nRb.d.cts +106 -0
  37. package/dist/calendar-BXgIX5H1.js +502 -0
  38. package/dist/calendar-BXgIX5H1.js.map +1 -0
  39. package/dist/calendar-Bq3vFzPl.d.ts +106 -0
  40. package/dist/calendar-DAFXjV99.cjs +507 -0
  41. package/dist/calendar-DAFXjV99.cjs.map +1 -0
  42. package/dist/calendar.cjs +3 -0
  43. package/dist/calendar.d.cts +3 -0
  44. package/dist/calendar.d.ts +3 -0
  45. package/dist/calendar.js +1 -0
  46. package/dist/{candlestick-D0xKkdqd.d.ts → candlestick-B3WcLzph.d.ts} +1 -1
  47. package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-BcomxeVG.d.cts} +1 -1
  48. package/dist/{candlestick-BHQkQfxH.js → candlestick-BtT9glp9.js} +16 -14
  49. package/dist/{candlestick-BHQkQfxH.js.map → candlestick-BtT9glp9.js.map} +1 -1
  50. package/dist/{candlestick-CYCQXgky.cjs → candlestick-CSmRuZ4v.cjs} +16 -14
  51. package/dist/{candlestick-CYCQXgky.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
  52. package/dist/candlestick.cjs +3 -3
  53. package/dist/candlestick.d.cts +1 -1
  54. package/dist/candlestick.d.ts +1 -1
  55. package/dist/candlestick.js +3 -3
  56. package/dist/{cartesian-CI2x6N7N.js → cartesian-BrPqb5Qn.js} +122 -248
  57. package/dist/cartesian-BrPqb5Qn.js.map +1 -0
  58. package/dist/{cartesian-DV02PsBe.cjs → cartesian-DRSXHxWe.cjs} +146 -308
  59. package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
  60. package/dist/{chart-DWn9v6qw.js → chart-B6TTY4Kr.js} +94 -62
  61. package/dist/chart-B6TTY4Kr.js.map +1 -0
  62. package/dist/{chart-QilhWP8Z.d.ts → chart-CYrrUCi3.d.ts} +193 -56
  63. package/dist/{chart-kqFMEwDo.d.cts → chart-CbPzP5Dp.d.cts} +193 -56
  64. package/dist/{chart-e2VqomCI.cjs → chart-D_lyOy-M.cjs} +106 -68
  65. package/dist/chart-D_lyOy-M.cjs.map +1 -0
  66. package/dist/{core-PAX5ogLk.d.cts → core-9BnLEW4K.d.cts} +24 -20
  67. package/dist/{core-DRUCk67j.d.ts → core-C3qEppSm.d.ts} +7 -6
  68. package/dist/{core-BKRQvPAT.js → core-CQ0FaJ4G.js} +112 -65
  69. package/dist/core-CQ0FaJ4G.js.map +1 -0
  70. package/dist/{core-DIOC61up.cjs → core-D2PSked3.cjs} +113 -66
  71. package/dist/core-D2PSked3.cjs.map +1 -0
  72. package/dist/core.cjs +41 -31
  73. package/dist/core.d.cts +20 -17
  74. package/dist/core.d.ts +20 -17
  75. package/dist/core.js +27 -23
  76. package/dist/{dates-C2RzY3rE.js → dates-DLe2Ww64.js} +2 -2
  77. package/dist/{dates-C2RzY3rE.js.map → dates-DLe2Ww64.js.map} +1 -1
  78. package/dist/{dates-DurEr9WT.cjs → dates-DerXTb1J.cjs} +2 -2
  79. package/dist/{dates-DurEr9WT.cjs.map → dates-DerXTb1J.cjs.map} +1 -1
  80. package/dist/decimate.cjs +1 -1
  81. package/dist/decimate.js +1 -1
  82. package/dist/{dom-D_g13XWY.cjs → dom-C33zvtPo.cjs} +3 -7
  83. package/dist/dom-C33zvtPo.cjs.map +1 -0
  84. package/dist/{dom-CuceR8gt.js → dom-CTse6Rvd.js} +3 -7
  85. package/dist/dom-CTse6Rvd.js.map +1 -0
  86. package/dist/{export-chart-mYgEfK-L.cjs → export-chart-CPtXmZvi.cjs} +17 -12
  87. package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
  88. package/dist/{export-chart-83UYH48t.js → export-chart-DoeiAyR2.js} +17 -12
  89. package/dist/export-chart-DoeiAyR2.js.map +1 -0
  90. package/dist/export.cjs +2 -2
  91. package/dist/export.d.cts +1 -1
  92. package/dist/export.d.ts +1 -1
  93. package/dist/export.js +2 -2
  94. package/dist/{fade-GGxcBdss.js → fade-CDrQjnDz.js} +56 -78
  95. package/dist/fade-CDrQjnDz.js.map +1 -0
  96. package/dist/{fade-DVTkhrFU.cjs → fade-CRqcKMWY.cjs} +56 -78
  97. package/dist/fade-CRqcKMWY.cjs.map +1 -0
  98. package/dist/{features-BMxkqCyS.js → features-B55rwpQC.js} +4 -2
  99. package/dist/features-B55rwpQC.js.map +1 -0
  100. package/dist/{features-DCXEvoya.cjs → features-DEDP5CEQ.cjs} +9 -1
  101. package/dist/features-DEDP5CEQ.cjs.map +1 -0
  102. package/dist/fit-BPyPRnsK.js +16 -0
  103. package/dist/fit-BPyPRnsK.js.map +1 -0
  104. package/dist/fit-D4MIIQQz.cjs +21 -0
  105. package/dist/fit-D4MIIQQz.cjs.map +1 -0
  106. package/dist/funnel-BdcfUkb5.d.ts +50 -0
  107. package/dist/funnel-CFEEulw_.cjs +244 -0
  108. package/dist/funnel-CFEEulw_.cjs.map +1 -0
  109. package/dist/funnel-CYCv8cq2.js +239 -0
  110. package/dist/funnel-CYCv8cq2.js.map +1 -0
  111. package/dist/funnel-CarOh8w_.d.cts +50 -0
  112. package/dist/funnel.cjs +3 -0
  113. package/dist/funnel.d.cts +3 -0
  114. package/dist/funnel.d.ts +3 -0
  115. package/dist/funnel.js +1 -0
  116. package/dist/{gauge-DXkjXNCD.cjs → gauge-6HfDcLMJ.cjs} +28 -28
  117. package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
  118. package/dist/{gauge-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
  119. package/dist/gauge-DiTk5aWO.js.map +1 -0
  120. package/dist/{gauge-BSist7My.d.cts → gauge-Ds9k1UV2.d.cts} +1 -1
  121. package/dist/{gauge-0VJuAHWF.d.ts → gauge-Zy25jfps.d.ts} +1 -1
  122. package/dist/gauge.cjs +1 -1
  123. package/dist/gauge.d.cts +1 -1
  124. package/dist/gauge.d.ts +1 -1
  125. package/dist/gauge.js +1 -1
  126. package/dist/{heatmap-19BGJTKF.js → heatmap-C1v8bwpq.js} +35 -33
  127. package/dist/heatmap-C1v8bwpq.js.map +1 -0
  128. package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-CJ-0dfhJ.d.cts} +1 -1
  129. package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dcc_bsoQ.cjs} +39 -37
  130. package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
  131. package/dist/{heatmap-59lmClj9.d.ts → heatmap-Jp5sHRTo.d.ts} +1 -1
  132. package/dist/heatmap.cjs +1 -1
  133. package/dist/heatmap.d.cts +1 -1
  134. package/dist/heatmap.d.ts +1 -1
  135. package/dist/heatmap.js +1 -1
  136. package/dist/{hydrate-OA6R2_Pn.js → hydrate-BB3MlR36.js} +2 -2
  137. package/dist/{hydrate-OA6R2_Pn.js.map → hydrate-BB3MlR36.js.map} +1 -1
  138. package/dist/{hydrate-CmN1k8Mo.cjs → hydrate-m0I5m6ue.cjs} +2 -2
  139. package/dist/{hydrate-CmN1k8Mo.cjs.map → hydrate-m0I5m6ue.cjs.map} +1 -1
  140. package/dist/hydrate.cjs +2 -2
  141. package/dist/hydrate.js +2 -2
  142. package/dist/index.cjs +55 -42
  143. package/dist/index.cjs.map +1 -1
  144. package/dist/index.d.cts +21 -18
  145. package/dist/index.d.ts +21 -18
  146. package/dist/index.js +41 -34
  147. package/dist/index.js.map +1 -1
  148. package/dist/interaction-DXYSjgnP.cjs +32 -0
  149. package/dist/interaction-DXYSjgnP.cjs.map +1 -0
  150. package/dist/interaction-En1KlwFO.js +21 -0
  151. package/dist/interaction-En1KlwFO.js.map +1 -0
  152. package/dist/{layout-JY2aR-yE.cjs → layout-Cfg9x1k2.cjs} +32 -1
  153. package/dist/layout-Cfg9x1k2.cjs.map +1 -0
  154. package/dist/{layout-DmrrLjwN.js → layout-DqAte3H8.js} +27 -2
  155. package/dist/layout-DqAte3H8.js.map +1 -0
  156. package/dist/{line-DtSh7HQU.d.ts → line-Bpr5uVLQ.d.ts} +1 -1
  157. package/dist/{line-DO66LtwH.js → line-CxR4tg1Q.js} +46 -34
  158. package/dist/line-CxR4tg1Q.js.map +1 -0
  159. package/dist/{line-Dbt6KFRK.cjs → line-YiCuhVMI.cjs} +46 -34
  160. package/dist/line-YiCuhVMI.cjs.map +1 -0
  161. package/dist/{line-_rNdeKmS.d.cts → line-vyWO030v.d.cts} +2 -3
  162. package/dist/line.cjs +3 -3
  163. package/dist/line.d.cts +1 -1
  164. package/dist/line.d.ts +1 -1
  165. package/dist/line.js +3 -3
  166. package/dist/log.cjs +1 -1
  167. package/dist/log.js +1 -1
  168. package/dist/map-49FcfdmJ.d.cts +156 -0
  169. package/dist/map-BMC61J-P.d.ts +156 -0
  170. package/dist/map-BqrZ80vT.cjs +818 -0
  171. package/dist/map-BqrZ80vT.cjs.map +1 -0
  172. package/dist/map-C15NC7kW.js +807 -0
  173. package/dist/map-C15NC7kW.js.map +1 -0
  174. package/dist/map.cjs +4 -0
  175. package/dist/map.d.cts +3 -0
  176. package/dist/map.d.ts +3 -0
  177. package/dist/map.js +1 -0
  178. package/dist/maps/world.cjs +875 -0
  179. package/dist/maps/world.cjs.map +1 -0
  180. package/dist/maps/world.d.cts +2 -0
  181. package/dist/maps/world.d.ts +2 -0
  182. package/dist/maps/world.js +874 -0
  183. package/dist/maps/world.js.map +1 -0
  184. package/dist/{morph-9_LJL0ra.cjs → morph-3I1Nf_tR.cjs} +2 -2
  185. package/dist/{morph-9_LJL0ra.cjs.map → morph-3I1Nf_tR.cjs.map} +1 -1
  186. package/dist/{morph-DnRxuwR-.js → morph-GfBab-b3.js} +2 -2
  187. package/dist/{morph-DnRxuwR-.js.map → morph-GfBab-b3.js.map} +1 -1
  188. package/dist/morph.cjs +2 -2
  189. package/dist/morph.js +2 -2
  190. package/dist/{others-J7NCAMA0.js → others-DBIGE6jr.js} +11 -3
  191. package/dist/others-DBIGE6jr.js.map +1 -0
  192. package/dist/others-DBO4Kjwl.d.ts +29 -0
  193. package/dist/{others-DWdK7vKp.cjs → others-WfjCsjqT.cjs} +14 -6
  194. package/dist/others-WfjCsjqT.cjs.map +1 -0
  195. package/dist/others-ls5eKtZ4.d.cts +31 -0
  196. package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
  197. package/dist/parliament-BKN6ikBJ.js.map +1 -0
  198. package/dist/{parliament-CgsVnWEe.d.cts → parliament-C7V8UJj1.d.cts} +1 -1
  199. package/dist/{parliament-CLCI7tUO.d.ts → parliament-Cz9n_DoK.d.ts} +1 -1
  200. package/dist/{parliament-x5hcFaQ3.cjs → parliament-DhxAaIZ3.cjs} +30 -29
  201. package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
  202. package/dist/parliament.cjs +1 -1
  203. package/dist/parliament.d.cts +1 -1
  204. package/dist/parliament.d.ts +1 -1
  205. package/dist/parliament.js +1 -1
  206. package/dist/{patterns-CufKZYhm.js → patterns-BMUINoka.js} +2 -2
  207. package/dist/{patterns-CufKZYhm.js.map → patterns-BMUINoka.js.map} +1 -1
  208. package/dist/{patterns-D3-wQagb.cjs → patterns-Dw7OMD_2.cjs} +2 -2
  209. package/dist/{patterns-D3-wQagb.cjs.map → patterns-Dw7OMD_2.cjs.map} +1 -1
  210. package/dist/patterns.cjs +2 -2
  211. package/dist/patterns.d.cts +1 -1
  212. package/dist/patterns.d.ts +1 -1
  213. package/dist/patterns.js +2 -2
  214. package/dist/{percentage-bar-ybNS3goo.cjs → percentage-bar-BChkTRoz.cjs} +37 -35
  215. package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
  216. package/dist/{percentage-bar-B6tNOqNn.js → percentage-bar-CaInxrL8.js} +37 -35
  217. package/dist/percentage-bar-CaInxrL8.js.map +1 -0
  218. package/dist/{percentage-bar-tepMr7Hd.d.cts → percentage-bar-R1--2grK.d.cts} +10 -14
  219. package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-cSeiLdwU.d.ts} +10 -14
  220. package/dist/percentage-bar.cjs +1 -1
  221. package/dist/percentage-bar.d.cts +1 -1
  222. package/dist/percentage-bar.d.ts +1 -1
  223. package/dist/percentage-bar.js +1 -1
  224. package/dist/{pie-CFptILSm.d.ts → pie-BQQkvy1N.d.ts} +7 -13
  225. package/dist/{pie-CVsc-6qD.js → pie-Bd8wyrtY.js} +45 -44
  226. package/dist/pie-Bd8wyrtY.js.map +1 -0
  227. package/dist/{pie-BpjvSPnz.cjs → pie-BseZlCgP.cjs} +45 -44
  228. package/dist/pie-BseZlCgP.cjs.map +1 -0
  229. package/dist/{pie-BXg2gNpb.d.cts → pie-vD5-g8je.d.cts} +7 -13
  230. package/dist/pie.cjs +1 -1
  231. package/dist/pie.d.cts +1 -1
  232. package/dist/pie.d.ts +1 -1
  233. package/dist/pie.js +1 -1
  234. package/dist/{point-shapes--_gmdTyK.cjs → point-shapes-BRawRM78.cjs} +23 -22
  235. package/dist/point-shapes-BRawRM78.cjs.map +1 -0
  236. package/dist/{point-shapes-DD2Ektzm.js → point-shapes-DI6GhcI7.js} +18 -23
  237. package/dist/point-shapes-DI6GhcI7.js.map +1 -0
  238. package/dist/point-shapes.cjs +6 -4
  239. package/dist/point-shapes.cjs.map +1 -1
  240. package/dist/point-shapes.d.cts +2 -2
  241. package/dist/point-shapes.d.ts +2 -2
  242. package/dist/point-shapes.js +7 -5
  243. package/dist/point-shapes.js.map +1 -1
  244. package/dist/{radar-D1-lItDy.d.cts → radar-7I6hsY_h.d.cts} +1 -1
  245. package/dist/{radar-BR-mumDd.js → radar-D6XqkFWQ.js} +21 -22
  246. package/dist/radar-D6XqkFWQ.js.map +1 -0
  247. package/dist/{radar-HPDrIdzc.cjs → radar-DjISDnSf.cjs} +22 -23
  248. package/dist/radar-DjISDnSf.cjs.map +1 -0
  249. package/dist/{radar-BC9Skgpj.d.ts → radar-vLxilcr4.d.ts} +1 -1
  250. package/dist/radar.cjs +1 -1
  251. package/dist/radar.d.cts +1 -1
  252. package/dist/radar.d.ts +1 -1
  253. package/dist/radar.js +1 -1
  254. package/dist/{rect-DSVmUZrD.js → rect-CZTNvMlf.js} +2 -2
  255. package/dist/{rect-DSVmUZrD.js.map → rect-CZTNvMlf.js.map} +1 -1
  256. package/dist/{rect-D6VhynBM.cjs → rect-DPr9QRxl.cjs} +2 -2
  257. package/dist/{rect-D6VhynBM.cjs.map → rect-DPr9QRxl.cjs.map} +1 -1
  258. package/dist/{sankey-fCoo1cpz.cjs → sankey-0CSp_Er9.cjs} +72 -71
  259. package/dist/sankey-0CSp_Er9.cjs.map +1 -0
  260. package/dist/{sankey-D_v7KxnJ.d.ts → sankey-7As41Fo4.d.ts} +1 -1
  261. package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
  262. package/dist/sankey-Dp4CuLVe.js.map +1 -0
  263. package/dist/{sankey-Dk7jUt8x.d.cts → sankey-DqiuxUx7.d.cts} +1 -1
  264. package/dist/sankey.cjs +1 -1
  265. package/dist/sankey.d.cts +1 -1
  266. package/dist/sankey.d.ts +1 -1
  267. package/dist/sankey.js +1 -1
  268. package/dist/{scatter-CXEsioOJ.d.ts → scatter-BXkXGgM_.d.ts} +7 -1
  269. package/dist/{scatter-DVqB_fP9.cjs → scatter-Bwkblr4L.cjs} +40 -38
  270. package/dist/scatter-Bwkblr4L.cjs.map +1 -0
  271. package/dist/{scatter-C0TWjFpW.js → scatter-DCMAtt5L.js} +38 -36
  272. package/dist/scatter-DCMAtt5L.js.map +1 -0
  273. package/dist/{scatter-DZeEIfyo.d.cts → scatter-DL0zAV09.d.cts} +7 -1
  274. package/dist/scatter.cjs +1 -1
  275. package/dist/scatter.d.cts +1 -1
  276. package/dist/scatter.d.ts +1 -1
  277. package/dist/scatter.js +1 -1
  278. package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-BElUSd0r.d.ts} +1 -1
  279. package/dist/{sparkline-B39NA0Mi.cjs → sparkline-BMSuEPHP.cjs} +13 -15
  280. package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
  281. package/dist/{sparkline-XO_TqCNP.js → sparkline-NDmq90kP.js} +13 -15
  282. package/dist/sparkline-NDmq90kP.js.map +1 -0
  283. package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-RYly7bR0.d.cts} +1 -1
  284. package/dist/sparkline.cjs +1 -1
  285. package/dist/sparkline.d.cts +1 -1
  286. package/dist/sparkline.d.ts +1 -1
  287. package/dist/sparkline.js +1 -1
  288. package/dist/{stack-BgPzoQmv.cjs → stack-BO4624CY.cjs} +2 -2
  289. package/dist/{stack-BgPzoQmv.cjs.map → stack-BO4624CY.cjs.map} +1 -1
  290. package/dist/{stack-Dagxq7l2.d.cts → stack-BTWYIwLO.d.cts} +1 -1
  291. package/dist/{stack-2H2Gfs1Q.js → stack-jVKvg2x_.js} +2 -2
  292. package/dist/{stack-2H2Gfs1Q.js.map → stack-jVKvg2x_.js.map} +1 -1
  293. package/dist/style.css +1 -1
  294. package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-B3VekUfX.cjs} +4 -3
  295. package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
  296. package/dist/{time-axis-FLONo54E.js → time-axis-CLjqOakA.js} +3 -2
  297. package/dist/{time-axis-FLONo54E.js.map → time-axis-CLjqOakA.js.map} +1 -1
  298. package/dist/time.cjs +3 -3
  299. package/dist/time.js +3 -3
  300. package/dist/{treemap-BAkhmVQc.d.cts → treemap-25vHO_UK.d.cts} +12 -2
  301. package/dist/{treemap-BNpxFBao.d.ts → treemap-BCXUbixd.d.ts} +12 -2
  302. package/dist/{treemap-CQdavQ9u.js → treemap-C4glsx-g.js} +20 -25
  303. package/dist/treemap-C4glsx-g.js.map +1 -0
  304. package/dist/{treemap-BWpEUlDh.cjs → treemap-CZk8kKFD.cjs} +21 -26
  305. package/dist/treemap-CZk8kKFD.cjs.map +1 -0
  306. package/dist/treemap.cjs +1 -1
  307. package/dist/treemap.d.cts +1 -1
  308. package/dist/treemap.d.ts +1 -1
  309. package/dist/treemap.js +1 -1
  310. package/dist/{value-labels-BBuSi4i0.js → value-labels-C7GrhOXJ.js} +25 -5
  311. package/dist/value-labels-C7GrhOXJ.js.map +1 -0
  312. package/dist/{value-labels-BV9keAuL.cjs → value-labels-DzaKIWKp.cjs} +25 -5
  313. package/dist/value-labels-DzaKIWKp.cjs.map +1 -0
  314. package/dist/value-labels.cjs +2 -2
  315. package/dist/value-labels.d.cts +1 -1
  316. package/dist/value-labels.d.ts +1 -1
  317. package/dist/value-labels.js +2 -2
  318. package/package.json +93 -233
  319. package/dist/bar-BNZ3GhIw.js.map +0 -1
  320. package/dist/bar-Da6dE_nI.cjs.map +0 -1
  321. package/dist/cartesian-CI2x6N7N.js.map +0 -1
  322. package/dist/cartesian-DV02PsBe.cjs.map +0 -1
  323. package/dist/chart-DWn9v6qw.js.map +0 -1
  324. package/dist/chart-e2VqomCI.cjs.map +0 -1
  325. package/dist/core-BKRQvPAT.js.map +0 -1
  326. package/dist/core-DIOC61up.cjs.map +0 -1
  327. package/dist/dom-CuceR8gt.js.map +0 -1
  328. package/dist/dom-D_g13XWY.cjs.map +0 -1
  329. package/dist/export-chart-83UYH48t.js.map +0 -1
  330. package/dist/export-chart-mYgEfK-L.cjs.map +0 -1
  331. package/dist/fade-DVTkhrFU.cjs.map +0 -1
  332. package/dist/fade-GGxcBdss.js.map +0 -1
  333. package/dist/features-BMxkqCyS.js.map +0 -1
  334. package/dist/features-DCXEvoya.cjs.map +0 -1
  335. package/dist/gauge-DXkjXNCD.cjs.map +0 -1
  336. package/dist/gauge-ts0kqN1-.js.map +0 -1
  337. package/dist/heatmap-19BGJTKF.js.map +0 -1
  338. package/dist/heatmap-CXhlrLTl.cjs.map +0 -1
  339. package/dist/layout-DmrrLjwN.js.map +0 -1
  340. package/dist/layout-JY2aR-yE.cjs.map +0 -1
  341. package/dist/line-DO66LtwH.js.map +0 -1
  342. package/dist/line-Dbt6KFRK.cjs.map +0 -1
  343. package/dist/others-DWdK7vKp.cjs.map +0 -1
  344. package/dist/others-J7NCAMA0.js.map +0 -1
  345. package/dist/parliament-Cru4IcuM.js.map +0 -1
  346. package/dist/parliament-x5hcFaQ3.cjs.map +0 -1
  347. package/dist/percentage-bar-B6tNOqNn.js.map +0 -1
  348. package/dist/percentage-bar-ybNS3goo.cjs.map +0 -1
  349. package/dist/pie-BpjvSPnz.cjs.map +0 -1
  350. package/dist/pie-CVsc-6qD.js.map +0 -1
  351. package/dist/point-shapes--_gmdTyK.cjs.map +0 -1
  352. package/dist/point-shapes-DD2Ektzm.js.map +0 -1
  353. package/dist/radar-BR-mumDd.js.map +0 -1
  354. package/dist/radar-HPDrIdzc.cjs.map +0 -1
  355. package/dist/sankey-D6JeZfK5.js.map +0 -1
  356. package/dist/sankey-fCoo1cpz.cjs.map +0 -1
  357. package/dist/scatter-C0TWjFpW.js.map +0 -1
  358. package/dist/scatter-DVqB_fP9.cjs.map +0 -1
  359. package/dist/sparkline-B39NA0Mi.cjs.map +0 -1
  360. package/dist/sparkline-XO_TqCNP.js.map +0 -1
  361. package/dist/treemap-BWpEUlDh.cjs.map +0 -1
  362. package/dist/treemap-CQdavQ9u.js.map +0 -1
  363. package/dist/value-labels-BBuSi4i0.js.map +0 -1
  364. package/dist/value-labels-BV9keAuL.cjs.map +0 -1
@@ -1,10 +1,11 @@
1
1
  import { t as h } from "./vnode-_EMUqysL.js";
2
- import { d as flushHooks, f as run, o as renderContext, p as schedule, v as legendContent, y as toChartPoint } from "./chart-DWn9v6qw.js";
3
- import { s as markerShape } from "./cartesian-CI2x6N7N.js";
4
- import { o as round } from "./layout-DmrrLjwN.js";
5
- import { n as feature } from "./features-BMxkqCyS.js";
2
+ import { a as chartModel, b as legendContent, h as schedule, m as run, p as flushHooks } from "./chart-B6TTY4Kr.js";
3
+ import { s as markerShape } from "./cartesian-BrPqb5Qn.js";
4
+ import { s as round } from "./layout-DqAte3H8.js";
5
+ import { a as swatchShape, n as feature } from "./features-B55rwpQC.js";
6
6
  import { o as getNumberFormat } from "./format-it1kepFG.js";
7
- import { a as render } from "./dom-CuceR8gt.js";
7
+ import { a as render } from "./dom-CTse6Rvd.js";
8
+ import { n as toChartPoint } from "./interaction-En1KlwFO.js";
8
9
  // src/plugins/download.ts
9
10
  const NAMES = {
10
11
  png: "PNG",
@@ -151,56 +152,50 @@ function seriesGroup(seriesIndex, color, child) {
151
152
  style: { "--tc-series-color": color }
152
153
  }, child);
153
154
  }
155
+ /** A halo around the hit, in the color of its series. */
156
+ function halo(hit, mark) {
157
+ const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
158
+ return item && seriesGroup(item.seriesIndex, item.color, h("path", {
159
+ class: "tc-hover-mark",
160
+ d: mark.d,
161
+ style: `transform:translate(${round(mark.x ?? 0)}px,${round(mark.y ?? 0)}px)`
162
+ }));
163
+ }
154
164
  /**
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).
165
+ * Hover marks drawn below the series: the band behind the hovered category
166
+ * (bars), a crosshair through it (point charts; a spoke in radars), or a
167
+ * halo that asks to stay `under` the chart (sankey flows).
157
168
  */
158
169
  function hoverUnderlay(hit, crosshair = true) {
159
- const { area } = hit;
170
+ const { area, highlight: mark = { kind: "crosshair" } } = hit;
171
+ const line = (x1, y1, x2, y2) => crosshair && h("line", {
172
+ class: "tc-crosshair",
173
+ x1: round(x1),
174
+ x2: round(x2),
175
+ y1: round(y1),
176
+ y2: round(y2)
177
+ });
160
178
  return h("g", {
161
179
  class: "tc-hover",
162
180
  "aria-hidden": "true"
163
- }, hit.mark ? null : hit.band ? h("rect", {
181
+ }, mark.kind === "halo" ? mark.under && halo(hit, mark) : mark.kind === "band" ? h("rect", {
164
182
  class: "tc-hover-band",
165
- x: round(hit.band.x),
166
- y: round(hit.band.y),
167
- width: round(hit.band.width),
168
- height: round(hit.band.height)
169
- }) : crosshair && h("line", hit.guide ? {
170
- class: "tc-crosshair",
171
- x1: round(hit.guide.x1),
172
- x2: round(hit.guide.x2),
173
- y1: round(hit.guide.y1),
174
- y2: round(hit.guide.y2)
175
- } : {
176
- class: "tc-crosshair",
177
- x1: round(hit.x),
178
- x2: round(hit.x),
179
- y1: round(area.y),
180
- y2: round(area.y + area.height)
181
- }));
183
+ x: round(mark.x),
184
+ y: round(mark.y),
185
+ width: round(mark.width),
186
+ height: round(mark.height)
187
+ }) : mark.kind === "spoke" ? line(mark.x1, mark.y1, mark.x2, mark.y2) : line(hit.x, area.y, hit.x, area.y + area.height));
182
188
  }
183
189
  /**
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).
190
+ * Hover marks drawn above the series: a halo (pie slices), or an active dot
191
+ * on every value of point charts (of the series' `shape`, if given).
186
192
  */
187
193
  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 h("g", {
192
- class: "tc-hover",
193
- "aria-hidden": "true"
194
- }, item && seriesGroup(item.seriesIndex, item.color, h("path", {
195
- class: "tc-hover-mark",
196
- d: mark.d,
197
- style: `transform:translate(${round(mark.x)}px,${round(mark.y)}px)`
198
- })));
199
- }
194
+ const mark = hit.highlight;
200
195
  return h("g", {
201
196
  class: "tc-hover",
202
197
  "aria-hidden": "true"
203
- }, !hit.band && hit.items.map((item) => item.y !== null && seriesGroup(item.seriesIndex, item.color, shape ? h("path", {
198
+ }, mark?.kind === "halo" ? !mark.under && halo(hit, mark) : mark?.kind !== "band" && hit.items.map((item) => item.y !== null && seriesGroup(item.seriesIndex, item.color, shape ? h("path", {
204
199
  class: "tc-point tc-point-active tc-marker",
205
200
  d: shape(item.seriesIndex, item.x, item.y, radius)
206
201
  }) : h("circle", {
@@ -227,7 +222,7 @@ function listenPointer(chart) {
227
222
  const { width, height } = chart.size;
228
223
  return toChartPoint(svg, event.clientX, event.clientY, width, height);
229
224
  };
230
- const overControl = (event) => !!event.target?.closest?.(".tc-download");
225
+ const overControl = (event) => !!event.target?.closest?.(".tc-download,.tc-map-zoom");
231
226
  const onLeave = (event) => {
232
227
  if (event.pointerType !== "touch" && chart.highlightSource === "pointer") chart.clearHighlight(event);
233
228
  };
@@ -352,6 +347,11 @@ function keyboard() {
352
347
  const interaction = chart.interaction;
353
348
  if (!interaction || interaction.count === 0) return false;
354
349
  if (interaction.reversed && /^Arrow(L|R)/.test(key)) key = key === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
350
+ let column = interaction.rows ?? 1;
351
+ if (interaction.rows && /^Arrow(U|D)/.test(key)) {
352
+ key = key === "ArrowUp" ? "ArrowLeft" : "ArrowRight";
353
+ column = 1;
354
+ }
355
355
  const current = chart.highlightSource === "index" ? chart.active : null;
356
356
  const last = interaction.count - 1;
357
357
  const index = current?.index;
@@ -360,10 +360,10 @@ function keyboard() {
360
360
  const at = focused === void 0 ? -1 : series.indexOf(focused);
361
361
  switch (key) {
362
362
  case "ArrowRight":
363
- go(index === void 0 ? 0 : Math.min(last, index + 1), focused);
363
+ go(index === void 0 ? 0 : Math.min(last, index + column), focused);
364
364
  return true;
365
365
  case "ArrowLeft":
366
- go(index === void 0 ? last : Math.max(0, index - 1), focused);
366
+ go(index === void 0 ? last : Math.max(0, index - column), focused);
367
367
  return true;
368
368
  case "Home":
369
369
  go(0, focused);
@@ -417,8 +417,22 @@ function keyboard() {
417
417
  };
418
418
  }
419
419
  // src/plugins/legend.ts
420
+ /** The side a legend beside the chart takes in a right-to-left chart. */
421
+ const MIRROR = {
422
+ left: "right",
423
+ right: "left"
424
+ };
425
+ /**
426
+ * Classes on the container of a legend beside the chart, and of one before
427
+ * it. A class rather than `:has()` in the stylesheet: a selector such as
428
+ * `:where(:has(> .tc-legend…))` matches any element, so the browser checks it
429
+ * again on every change to the page (a hover, a tooltip), which stalls a page
430
+ * of charts.
431
+ */
432
+ const BESIDE = "tc-legend-beside";
433
+ const START = "tc-legend-start";
420
434
  /**
421
- * An HTML legend (`.tc-legend`) with toggle buttons, above or below the SVG.
435
+ * An HTML legend (`.tc-legend`) with toggle buttons, above, below or beside the SVG.
422
436
  * Shown for two or more entries unless the `legend` option says otherwise.
423
437
  */
424
438
  function legend() {
@@ -440,19 +454,37 @@ function legend() {
440
454
  bound = false;
441
455
  el.remove();
442
456
  el = void 0;
457
+ host.classList.remove(BESIDE, START);
458
+ };
459
+ /** Whether the legend follows the SVG in the container (below it, or beside it at the end). */
460
+ let after = false;
461
+ const side = () => {
462
+ const position = el?.dataset.position;
463
+ return position === "left" || position === "right";
443
464
  };
444
465
  /** Keep the legend right before or after the SVG, whatever else lives in the container. */
445
466
  const place = () => {
446
467
  if (!el) return;
447
468
  const svg = host.querySelector(":scope > svg.tc-chart");
448
- if (el.dataset.position === "bottom") {
469
+ if (after) {
449
470
  if (!svg) {
450
471
  if (!el.isConnected) host.appendChild(el);
451
472
  } else if (svg.nextElementSibling !== el) svg.after(el);
452
473
  } else if (!el.isConnected || el.nextElementSibling !== svg) host.insertBefore(el, svg ?? host.firstChild);
453
474
  };
475
+ /** Put the legend at `position`: beside the chart it comes first on the container's start side. */
476
+ const put = (position) => {
477
+ if (!el) return;
478
+ el.dataset.position = position;
479
+ after = position === "bottom" || side() && position === "right" !== (getComputedStyle(host).direction === "rtl");
480
+ place();
481
+ host.classList.toggle(BESIDE, side());
482
+ host.classList.toggle(START, side() && !after);
483
+ };
484
+ /** Space between the chart and a legend beside it. */
485
+ const gap = () => Number.parseFloat(getComputedStyle(host).columnGap) || 0;
454
486
  return {
455
- beforeRender({ legend, hidden }) {
487
+ beforeRender({ config, legend, hidden }) {
456
488
  if (!legend.show || typeof document === "undefined") {
457
489
  remove();
458
490
  return;
@@ -465,17 +497,22 @@ function legend() {
465
497
  el.addEventListener("click", onClick);
466
498
  bound = true;
467
499
  }
468
- el.dataset.position = legend.position;
469
500
  el.dir = chart.rtl ? "rtl" : "";
470
- render(el, legendContent(legend.items, hidden), adopt);
501
+ render(el, legendContent(legend.items, hidden, swatchShape(config)), adopt);
471
502
  adopt = null;
472
- place();
503
+ const { position } = legend;
504
+ const beside = position === "auto" ? "right" : position;
505
+ put(chart.rtl && MIRROR[beside] || beside);
506
+ if (position === "auto" && (el.offsetWidth + gap()) * 3 > host.clientWidth) put("bottom");
473
507
  },
474
508
  reservedHeight() {
475
- if (!el?.isConnected) return 0;
509
+ if (!el?.isConnected || side()) return 0;
476
510
  const { marginTop, marginBottom } = getComputedStyle(el);
477
511
  return el.offsetHeight + (Number.parseFloat(marginTop) || 0) + (Number.parseFloat(marginBottom) || 0);
478
512
  },
513
+ reservedWidth() {
514
+ return el?.isConnected && side() ? el.offsetWidth + gap() : 0;
515
+ },
479
516
  afterRender: place,
480
517
  destroy: remove
481
518
  };
@@ -618,10 +655,14 @@ function dataTable() {
618
655
  el.remove();
619
656
  el = void 0;
620
657
  };
621
- const update = (config, size, hidden) => {
658
+ const update = (config, hidden) => {
622
659
  const option = config.table ?? true;
623
660
  const maxRows = typeof option === "object" && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS;
624
- const table = option !== false && typeof document !== "undefined" ? config.type.table?.(config, renderContext(config, size, chart.id, () => {}, hidden, chart.fontSize), maxRows) : void 0;
661
+ const table = option !== false && typeof document !== "undefined" ? config.type.table?.(chartModel(config), {
662
+ locale: config.locale,
663
+ hidden,
664
+ rtl: chart.rtl
665
+ }, maxRows) : void 0;
625
666
  if (!table) {
626
667
  remove();
627
668
  return;
@@ -643,20 +684,20 @@ function dataTable() {
643
684
  render(el, tableContent(rows, caption), adopt);
644
685
  adopt = null;
645
686
  const svg = host.querySelector(":scope > svg.tc-chart");
646
- const after = host.querySelector(":scope > .tc-legend[data-position=\"bottom\"]") ?? svg;
687
+ const after = host.querySelector(":scope > svg.tc-chart + .tc-legend") ?? svg;
647
688
  if (after && after.nextElementSibling !== el) after.after(el);
648
689
  else if (!el.isConnected) host.appendChild(el);
649
690
  };
650
691
  return {
651
- afterRender({ config, size, hidden, changed }) {
692
+ afterRender({ config, hidden, changed }) {
652
693
  if (!changed && el?.isConnected) return;
653
694
  const option = config.table ?? true;
654
695
  const same = shown === option;
655
696
  shown = option;
656
- if (same && el?.isConnected && el.classList.contains("tc-sr-only")) scheduleIdle(key, () => update(config, size, hidden));
697
+ if (same && el?.isConnected && el.classList.contains("tc-sr-only")) scheduleIdle(key, () => update(config, hidden));
657
698
  else {
658
699
  cancelIdle(key);
659
- update(config, size, hidden);
700
+ update(config, hidden);
660
701
  }
661
702
  },
662
703
  destroy: remove
@@ -672,7 +713,7 @@ function dataTable() {
672
713
  function hitAnchor(hit, pointer) {
673
714
  if (pointer) return pointer;
674
715
  const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
675
- if (hit.guide && item?.y != null) return {
716
+ if (hit.highlight?.kind === "spoke" && item?.y != null) return {
676
717
  x: item.x,
677
718
  y: item.y
678
719
  };
@@ -685,8 +726,11 @@ function hitAnchor(hit, pointer) {
685
726
  y: item?.y ?? hit.area.y + hit.area.height / 2
686
727
  };
687
728
  }
688
- /** Default tooltip content: the category title and one row per series. */
689
- function tooltipContent(hit, options = {}) {
729
+ /**
730
+ * Default tooltip content: the category title and one row per series
731
+ * (`shape` gives their swatches the point shapes of their slots).
732
+ */
733
+ function tooltipContent(hit, options = {}, shape) {
690
734
  const body = options.format ? options.format(hit) : [
691
735
  hit.title && h("div", { class: "tc-tooltip-title" }, hit.title),
692
736
  hit.items.map((item) => h("div", {
@@ -697,7 +741,10 @@ function tooltipContent(hit, options = {}) {
697
741
  `tc-series-${item.seriesIndex + 1}`,
698
742
  hit.seriesIndex === item.seriesIndex && "tc-tooltip-item-active"
699
743
  ],
700
- style: { "--tc-series-color": item.color }
744
+ style: {
745
+ "--tc-series-color": item.color,
746
+ ...shape?.(item.seriesIndex)
747
+ }
701
748
  }, h("span", { class: "tc-tooltip-swatch" }), h("span", { class: "tc-tooltip-name" }, item.name), h("span", { class: "tc-tooltip-value" }, item.text))),
702
749
  options.footer && h("div", { class: "tc-tooltip-footer" }, options.footer(hit))
703
750
  ];
@@ -800,7 +847,7 @@ function tooltip() {
800
847
  tip.classList.toggle("tc-tooltip-light", options?.theme === "light");
801
848
  const { rtl } = chart;
802
849
  tip.dir = rtl ? "rtl" : "";
803
- render(tip, tooltipContent(hit, options));
850
+ render(tip, tooltipContent(hit, options, swatchShape(chart.config)));
804
851
  const shown = tip;
805
852
  const turn = ++turns;
806
853
  waiting.push(() => {
@@ -816,7 +863,7 @@ function tooltip() {
816
863
  x: (rect.left - box.left) / k - el.clientLeft,
817
864
  y: (rect.top - box.top) / k - el.clientTop
818
865
  };
819
- const ax = hit.axis === "y" || hit.guide ? anchor.x : hit.x;
866
+ const ax = hit.axis === "y" || hit.highlight?.kind === "spoke" ? anchor.x : hit.x;
820
867
  const ay = hit.axis === "y" ? hit.y ?? anchor.y : anchor.y;
821
868
  const clip = room(el);
822
869
  const place = placeTooltip({
@@ -870,7 +917,7 @@ function defaultPlugins() {
870
917
  }
871
918
  // src/core.ts
872
919
  /** Version of the `@tabler/charts` package. */
873
- const VERSION = "0.2.0";
920
+ const VERSION = "0.3.0";
874
921
  export { download as _, placeTooltip as a, sync as c, describeHit as d, tableContent as f, hoverUnderlay as g, hoverOverlay as h, hitAnchor as i, legend as l, pointer as m, defaultPlugins as n, tooltipContent as o, highlight as p, tooltip as r, dataTable as s, VERSION as t, keyboard as u };
875
922
 
876
- //# sourceMappingURL=core-BKRQvPAT.js.map
923
+ //# sourceMappingURL=core-CQ0FaJ4G.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-CQ0FaJ4G.js","names":[],"sources":["../src/plugins/download.ts","../src/components/hover.ts","../src/plugins/pointer.ts","../src/plugins/highlight.ts","../src/a11y.ts","../src/plugins/keyboard.ts","../src/plugins/legend.ts","../src/plugins/sync.ts","../src/idle.ts","../src/plugins/table.ts","../src/tooltip.ts","../src/plugins/tooltip.ts","../src/plugins/index.ts","../package.json","../src/core.ts"],"sourcesContent":["import { feature } from '../features.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\nimport { h } from '../vnode.ts'\n\n/** A file format of the download menu. */\nexport type DownloadFormat = 'png' | 'svg' | 'jpeg' | 'webp'\n\n/** The `download` option as an object. */\nexport interface DownloadMenuOptions {\n /** Formats offered, in this order. Defaults to `['png', 'svg']`. */\n formats?: readonly DownloadFormat[]\n /** File name without the extension. Defaults to the chart's title, or `chart`. */\n filename?: string\n /** Accessible name of the menu button. Defaults to `'Download'`. */\n label?: string\n /**\n * Background color, `'auto'` for the chart's surface (`--tc-surface`), or\n * `false` for none (transparent). Defaults to `'auto'`.\n */\n background?: string | false\n /** Draw the legend into the file. Defaults to `true`. */\n legend?: boolean\n /** Pixels per chart pixel in images. Defaults to `2`. */\n scale?: number\n}\n\n/** The `download` option: on, a list of formats, or the options. */\nexport type DownloadOption = boolean | readonly DownloadFormat[] | DownloadMenuOptions\n\nconst NAMES: Record<DownloadFormat, string> = { png: 'PNG', svg: 'SVG', jpeg: 'JPEG', webp: 'WebP' }\nconst DEFAULT_FORMATS: readonly DownloadFormat[] = ['png', 'svg']\n\nfunction resolve(option: DownloadOption): DownloadMenuOptions {\n return option === true\n ? {}\n : Array.isArray(option)\n ? { formats: option }\n : (option as DownloadMenuOptions)\n}\n\n/**\n * A download menu in the chart's corner (`.tc-download`): a button that opens\n * a list of file formats, PNG and SVG by default. Shown with the `download`\n * option. The files come from `@tabler/charts/export`, which must be imported\n * (the chart says so otherwise): that way charts without a download never\n * carry the export code.\n */\nexport function download(): ChartPlugin {\n return {\n name: 'download',\n install(chart) {\n const host = chart.element\n const doc = host.ownerDocument\n let el: HTMLElement | undefined\n let options: DownloadMenuOptions = {}\n // The menu overlays the chart: the container is the positioning context.\n const addedClass = !host.classList.contains('tc-container')\n\n const toggle = () => el?.querySelector<HTMLElement>('.tc-download-toggle')\n const menu = () => el?.querySelector<HTMLElement>('.tc-download-menu')\n const items = () => Array.from(el?.querySelectorAll<HTMLElement>('.tc-download-item') ?? [])\n\n const setOpen = (open: boolean) => {\n const list = menu()\n if (!list) return\n list.hidden = !open\n toggle()?.setAttribute('aria-expanded', String(open))\n if (open) doc.addEventListener('pointerdown', onOutside, true)\n else doc.removeEventListener('pointerdown', onOutside, true)\n }\n const isOpen = () => menu()?.hidden === false\n\n const onOutside = (event: Event) => {\n if (!el?.contains(event.target as Node)) setOpen(false)\n }\n\n const onClick = (event: Event) => {\n const target = event.target as Element\n if (target.closest('.tc-download-toggle')) {\n setOpen(!isOpen())\n if (isOpen()) items()[0]?.focus()\n return\n }\n const format = target.closest('.tc-download-item')?.getAttribute('data-format')\n if (!format) return\n setOpen(false)\n toggle()?.focus()\n void feature('export')(chart, { ...options, format: format as DownloadFormat })\n }\n\n const onKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isOpen()) {\n event.preventDefault()\n setOpen(false)\n toggle()?.focus()\n return\n }\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return\n const list = items()\n if (!list.length) return\n event.preventDefault()\n if (!isOpen()) setOpen(true)\n const at = list.indexOf(doc.activeElement as HTMLElement)\n const step = event.key === 'ArrowDown' ? 1 : -1\n list[(at + step + list.length) % list.length]?.focus()\n }\n\n // Tabbing out of the menu closes it.\n const onBlur = (event: FocusEvent) => {\n if (!el?.contains(event.relatedTarget as Node)) setOpen(false)\n }\n\n const remove = () => {\n if (!el) return\n setOpen(false)\n render(el, null)\n el.remove()\n el = undefined\n if (addedClass) host.classList.remove('tc-container')\n }\n\n return {\n afterRender({ config, changed }) {\n const option = config.download\n if (!option || typeof document === 'undefined') {\n remove()\n return\n }\n // Resizing and hovering change nothing in the menu.\n if (!changed && el?.isConnected) return\n // Fail early, at render, when the export entry is not imported.\n feature('export')\n options = resolve(option)\n const formats = options.formats?.length ? options.formats : DEFAULT_FORMATS\n if (!el) {\n el = doc.createElement('div')\n el.className = 'tc-download'\n el.addEventListener('click', onClick)\n el.addEventListener('keydown', onKey)\n el.addEventListener('focusout', onBlur)\n }\n render(\n el,\n h(\n 'div',\n { class: 'tc-download-box' },\n h(\n 'button',\n {\n type: 'button',\n class: 'tc-download-toggle',\n 'aria-label': options.label ?? 'Download',\n 'aria-haspopup': 'menu',\n 'aria-expanded': 'false',\n },\n h(\n 'svg',\n {\n viewBox: '0 0 24 24',\n width: '16',\n height: '16',\n 'aria-hidden': 'true',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': '2',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n },\n h('path', {\n d: 'M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12',\n }),\n ),\n ),\n h(\n 'div',\n { class: 'tc-download-menu', role: 'menu', hidden: '' },\n formats.map((format) =>\n h(\n 'button',\n {\n key: format,\n type: 'button',\n role: 'menuitem',\n class: 'tc-download-item',\n 'data-format': format,\n },\n NAMES[format] ?? format,\n ),\n ),\n ),\n ),\n )\n // In the corner the chart starts from: the left one, right to left.\n el.dir = chart.rtl ? 'rtl' : ''\n host.classList.add('tc-container')\n if (!el.isConnected) host.appendChild(el)\n },\n destroy: remove,\n }\n },\n }\n}\n","import type { Highlight, Hit } from '../interaction.ts'\nimport { round } from '../layout.ts'\nimport { h, type VNode } from '../vnode.ts'\n\n/** Series wrapper so hover marks pick up the series color from CSS. */\nfunction seriesGroup(seriesIndex: number, color: string | undefined, child: VNode): VNode {\n return h(\n 'g',\n {\n key: seriesIndex,\n class: ['tc-series', `tc-series-${seriesIndex + 1}`],\n style: { '--tc-series-color': color },\n },\n child,\n )\n}\n\n/** A halo around the hit, in the color of its series. */\nfunction halo(hit: Hit, mark: Extract<Highlight, { kind: 'halo' }>): VNode | undefined {\n const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0]\n return (\n item &&\n seriesGroup(\n item.seriesIndex,\n item.color,\n h('path', {\n class: 'tc-hover-mark',\n d: mark.d,\n style: `transform:translate(${round(mark.x ?? 0)}px,${round(mark.y ?? 0)}px)`,\n }),\n )\n )\n}\n\n/**\n * Hover marks drawn below the series: the band behind the hovered category\n * (bars), a crosshair through it (point charts; a spoke in radars), or a\n * halo that asks to stay `under` the chart (sankey flows).\n */\nexport function hoverUnderlay(hit: Hit, crosshair = true): VNode {\n const { area, highlight: mark = { kind: 'crosshair' } } = hit\n const line = (x1: number, y1: number, x2: number, y2: number) =>\n crosshair &&\n h('line', { class: 'tc-crosshair', x1: round(x1), x2: round(x2), y1: round(y1), y2: round(y2) })\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n mark.kind === 'halo'\n ? mark.under && halo(hit, mark)\n : mark.kind === 'band'\n ? h('rect', {\n class: 'tc-hover-band',\n x: round(mark.x),\n y: round(mark.y),\n width: round(mark.width),\n height: round(mark.height),\n })\n : mark.kind === 'spoke'\n ? line(mark.x1, mark.y1, mark.x2, mark.y2)\n : line(hit.x, area.y, hit.x, area.y + area.height),\n )\n}\n\n/**\n * Hover marks drawn above the series: a halo (pie slices), or an active dot\n * on every value of point charts (of the series' `shape`, if given).\n */\nexport function hoverOverlay(\n hit: Hit,\n radius = 4,\n shape?: (slot: number, x: number, y: number, r: number) => string,\n): VNode {\n const mark = hit.highlight\n return h(\n 'g',\n { class: 'tc-hover', 'aria-hidden': 'true' },\n mark?.kind === 'halo'\n ? !mark.under && halo(hit, mark)\n : mark?.kind !== 'band' &&\n hit.items.map(\n (item) =>\n item.y !== null &&\n seriesGroup(\n item.seriesIndex,\n item.color,\n shape\n ? h('path', {\n class: 'tc-point tc-point-active tc-marker',\n d: shape(item.seriesIndex, item.x, item.y, radius),\n })\n : h('circle', {\n class: 'tc-point tc-point-active',\n cx: round(item.x),\n cy: round(item.y),\n r: radius,\n }),\n ),\n ),\n )\n}\n","import type { Chart } from '../chart.ts'\nimport { toChartPoint } from '../interaction.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\nconst listening = /* @__PURE__ */ new WeakSet<object>()\n\n/**\n * Turn pointer input on the chart's element into highlights and `hover` /\n * `click` events (once per chart, however many plugins ask). Returns the\n * function that stops listening, or nothing when already listening.\n */\nexport function listenPointer(chart: Chart<object>): (() => void) | undefined {\n const el = chart.element\n if (listening.has(chart) || typeof el.addEventListener !== 'function') return undefined\n listening.add(chart)\n const local = (event: MouseEvent) => {\n const svg = el.querySelector('svg.tc-chart')\n if (!svg) return undefined\n const { width, height } = chart.size\n return toChartPoint(svg, event.clientX, event.clientY, width, height)\n }\n // Controls laid over the chart (the download menu, the zoom of a map) are not\n // the chart: hovering them clears the highlight, so the tooltip never covers them.\n const overControl = (event: Event) =>\n !!(event.target as Element | null)?.closest?.('.tc-download,.tc-map-zoom')\n const onLeave = (event: PointerEvent) => {\n // On touch, keep the last highlight after the finger lifts.\n if (event.pointerType !== 'touch' && chart.highlightSource === 'pointer') {\n chart.clearHighlight(event)\n }\n }\n const onMove = (event: PointerEvent) => {\n if (overControl(event)) {\n onLeave(event)\n return\n }\n const point = local(event)\n if (point) chart.highlightAt(point.x, point.y, event)\n }\n const onClick = (event: MouseEvent) => {\n if (overControl(event)) return\n const point = local(event)\n const hit = point ? chart.hitTest(point.x, point.y) : null\n if (hit) chart.emit('click', { hit, event })\n }\n el.addEventListener('pointermove', onMove)\n el.addEventListener('pointerdown', onMove)\n el.addEventListener('pointerleave', onLeave)\n el.addEventListener('click', onClick)\n return () => {\n listening.delete(chart)\n el.removeEventListener('pointermove', onMove)\n el.removeEventListener('pointerdown', onMove)\n el.removeEventListener('pointerleave', onLeave)\n el.removeEventListener('click', onClick)\n }\n}\n\n/**\n * Pointer input: hovering highlights what is under the pointer and emits\n * `hover`, clicking emits `click`. The highlight and tooltip plugins turn it\n * on themselves; add it to a bare `Chart` that only needs the events.\n */\nexport function pointer(): ChartPlugin {\n return {\n name: 'pointer',\n install(chart) {\n const stop = listenPointer(chart)\n return stop ? { destroy: stop } : {}\n },\n }\n}\n","import { markerShape } from '../charts/cartesian.ts'\nimport { hoverOverlay, hoverUnderlay } from '../components/hover.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { listenPointer } from './pointer.ts'\n\n/**\n * Draws the highlighted category: a crosshair (or a band behind bars) under\n * the series and active dots above them. `crosshair: false` keeps the dots.\n */\nexport function highlight(): ChartPlugin {\n return {\n name: 'highlight',\n install(chart) {\n const stop = listenPointer(chart)\n return {\n layers: (hit, config) => ({\n under: hoverUnderlay(hit, config.crosshair !== false),\n over: hoverOverlay(hit, 4, markerShape(config)),\n }),\n ...(stop ? { destroy: stop } : {}),\n }\n },\n }\n}\n","import type { Hit } from './interaction.ts'\nimport { h, type VNode } from './vnode.ts'\n\n/** The data behind a chart as text: header cells and one row per category. */\nexport interface DataTable {\n /** Column headers; the first one labels the row headers (may be empty). */\n columns: string[]\n /** Rows of display text; the first cell of each row is its header. */\n rows: string[][]\n /** Total number of rows when `rows` was cut to a limit. */\n total?: number\n}\n\n/**\n * An HTML table of the chart data, for screen readers (visually hidden by\n * default) or as a visible fallback. Every cell is text, escaped by the renderer.\n */\nexport function tableContent(table: DataTable, caption?: string): VNode {\n const [corner = '', ...headers] = table.columns\n return h(\n 'table',\n { class: 'tc-table' },\n caption && h('caption', null, caption),\n h(\n 'thead',\n null,\n h(\n 'tr',\n null,\n h('th', { scope: 'col' }, corner),\n headers.map((name, i) => h('th', { key: i, scope: 'col' }, name)),\n ),\n ),\n h(\n 'tbody',\n null,\n table.rows.map(([head = '', ...cells], i) =>\n h(\n 'tr',\n { key: i },\n h('th', { scope: 'row' }, head),\n cells.map((cell, j) => h('td', { key: j }, cell)),\n ),\n ),\n ),\n )\n}\n\n/** Short sentence describing a hit, announced during keyboard navigation. */\nexport function describeHit(hit: Hit): string {\n const items =\n hit.seriesIndex === undefined\n ? hit.items\n : hit.items.filter((item) => item.seriesIndex === hit.seriesIndex)\n const values = items.map((item) => `${item.name} ${item.text}`).join(', ')\n return hit.title ? `${hit.title}: ${values}` : values\n}\n","import { describeHit } from '../a11y.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\n/**\n * Keyboard navigation: the SVG becomes focusable; arrow keys walk\n * categories, Up/Down walk series, Home/End jump, Escape (or leaving)\n * clears. Every step is announced through a polite live region.\n */\n/** The config's `keyboard` option, else the chart type's default, else on. */\nconst enabled = (config: { keyboard?: boolean; type: { keyboard?: boolean } }): boolean =>\n config.keyboard ?? config.type.keyboard ?? true\n\nexport function keyboard(): ChartPlugin {\n return {\n name: 'keyboard',\n install(chart) {\n const host = chart.element\n let live: HTMLElement | undefined\n\n /**\n * The live region, added when the chart takes focus: screen readers only\n * announce changes of a region that was already there, so one created\n * with its first message would stay silent for that message.\n */\n const region = (): HTMLElement => {\n if (!live) {\n live = host.ownerDocument.createElement('div')\n live.className = 'tc-sr-only'\n live.setAttribute('aria-live', 'polite')\n live.setAttribute('aria-atomic', 'true')\n host.appendChild(live)\n }\n return live\n }\n const announce = (text: string) => {\n region().textContent = text\n }\n\n const go = (index: number, seriesIndex?: number) => {\n const hit = chart.highlightIndex(index, seriesIndex)\n if (hit) announce(describeHit(hit))\n }\n\n /** Returns whether the key was handled. */\n const handle = (key: string): boolean => {\n const interaction = chart.interaction\n if (!interaction || interaction.count === 0) return false\n // Arrows follow the screen: categories from the right swap them.\n if (interaction.reversed && /^Arrow(L|R)/.test(key))\n key = key === 'ArrowLeft' ? 'ArrowRight' : 'ArrowLeft'\n // In a grid a column is `rows` categories away, and Up/Down walk a column.\n let column = interaction.rows ?? 1\n if (interaction.rows && /^Arrow(U|D)/.test(key)) {\n key = key === 'ArrowUp' ? 'ArrowLeft' : 'ArrowRight'\n column = 1\n }\n const current = chart.highlightSource === 'index' ? chart.active : null\n const last = interaction.count - 1\n const index = current?.index\n const focused = current?.seriesIndex\n const series = current?.items.map((item) => item.seriesIndex) ?? []\n const at = focused === undefined ? -1 : series.indexOf(focused)\n\n switch (key) {\n case 'ArrowRight':\n go(index === undefined ? 0 : Math.min(last, index + column), focused)\n return true\n case 'ArrowLeft':\n go(index === undefined ? last : Math.max(0, index - column), focused)\n return true\n case 'Home':\n go(0, focused)\n return true\n case 'End':\n go(last, focused)\n return true\n case 'ArrowDown':\n case 'ArrowUp': {\n if (index === undefined || series.length === 0) {\n go(0)\n return true\n }\n const step = key === 'ArrowDown' ? 1 : -1\n const next = at === -1 ? (step > 0 ? 0 : series.length - 1) : at + step\n go(index, next < 0 || next >= series.length ? undefined : series[next])\n return true\n }\n case 'Escape':\n if (!current) return false\n chart.clearHighlight()\n return true\n default:\n return false\n }\n }\n\n const isChart = (target: EventTarget | null) =>\n (target as Element | null)?.matches?.('svg.tc-chart') === true\n const onKey = (event: Event) => {\n const { key } = event as KeyboardEvent\n if (!enabled(chart.config) || !isChart(event.target)) return\n if (handle(key)) event.preventDefault()\n }\n const onBlur = (event: Event) => {\n if (isChart(event.target) && chart.highlightSource === 'index') chart.clearHighlight()\n }\n const onFocus = (event: Event) => {\n if (enabled(chart.config) && isChart(event.target)) region()\n }\n host.addEventListener('keydown', onKey)\n host.addEventListener('focusin', onFocus)\n host.addEventListener('focusout', onBlur)\n\n return {\n svgAttrs: (config) => (enabled(config) ? { tabindex: 0 } : undefined),\n destroy() {\n host.removeEventListener('keydown', onKey)\n host.removeEventListener('focusin', onFocus)\n host.removeEventListener('focusout', onBlur)\n live?.remove()\n },\n }\n },\n }\n}\n","import { swatchShape } from '../features.ts'\nimport { legendContent } from '../legend.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\n\n/** The side a legend beside the chart takes in a right-to-left chart. */\nconst MIRROR: Record<string, string | undefined> = { left: 'right', right: 'left' }\n\n/**\n * Classes on the container of a legend beside the chart, and of one before\n * it. A class rather than `:has()` in the stylesheet: a selector such as\n * `:where(:has(> .tc-legend…))` matches any element, so the browser checks it\n * again on every change to the page (a hover, a tooltip), which stalls a page\n * of charts.\n */\nconst BESIDE = 'tc-legend-beside'\nconst START = 'tc-legend-start'\n\n/**\n * An HTML legend (`.tc-legend`) with toggle buttons, above, below or beside the SVG.\n * Shown for two or more entries unless the `legend` option says otherwise.\n */\nexport function legend(): ChartPlugin {\n return {\n name: 'legend',\n install(chart) {\n const host = chart.element\n // Take over a server-rendered legend instead of adding a second one.\n let el = host.querySelector<HTMLElement>(':scope > .tc-legend') ?? undefined\n let adopt = el?.firstElementChild ?? null\n let bound = false\n const onClick = (event: Event) => {\n const button = (event.target as Element).closest?.('.tc-legend-item')\n const key = button?.getAttribute('data-key')\n if (key != null) chart.toggleSeries(key)\n }\n\n const remove = () => {\n if (!el) return\n render(el, null)\n el.removeEventListener('click', onClick)\n bound = false\n el.remove()\n el = undefined\n host.classList.remove(BESIDE, START)\n }\n\n /** Whether the legend follows the SVG in the container (below it, or beside it at the end). */\n let after = false\n const side = () => {\n const position = el?.dataset.position\n return position === 'left' || position === 'right'\n }\n\n /** Keep the legend right before or after the SVG, whatever else lives in the container. */\n const place = () => {\n if (!el) return\n const svg = host.querySelector(':scope > svg.tc-chart')\n if (after) {\n if (!svg) {\n if (!el.isConnected) host.appendChild(el)\n } else if (svg.nextElementSibling !== el) {\n svg.after(el)\n }\n } else if (!el.isConnected || el.nextElementSibling !== svg) {\n host.insertBefore(el, svg ?? host.firstChild)\n }\n }\n\n /** Put the legend at `position`: beside the chart it comes first on the container's start side. */\n const put = (position: string) => {\n if (!el) return\n el.dataset.position = position\n after =\n position === 'bottom' ||\n (side() && (position === 'right') !== (getComputedStyle(host).direction === 'rtl'))\n place()\n // The container lays a legend beside the chart out in two columns (style.css).\n host.classList.toggle(BESIDE, side())\n host.classList.toggle(START, side() && !after)\n }\n\n /** Space between the chart and a legend beside it. */\n const gap = () => Number.parseFloat(getComputedStyle(host).columnGap) || 0\n\n return {\n beforeRender({ config, legend, hidden }) {\n if (!legend.show || typeof document === 'undefined') {\n remove()\n return\n }\n if (!el) {\n el = host.ownerDocument.createElement('div')\n el.className = 'tc-legend'\n }\n if (!bound) {\n el.addEventListener('click', onClick)\n bound = true\n }\n // A right-to-left chart reads right to left, whatever the page around it.\n el.dir = chart.rtl ? 'rtl' : ''\n render(el, legendContent(legend.items, hidden, swatchShape(config)), adopt)\n adopt = null\n const { position } = legend\n const beside = position === 'auto' ? 'right' : position\n // Beside the chart, sides swap in a right-to-left chart.\n put((chart.rtl && MIRROR[beside]) || beside)\n // Beside the chart when it keeps two thirds of the container, else below it.\n if (position === 'auto' && (el.offsetWidth + gap()) * 3 > host.clientWidth) put('bottom')\n },\n // With its margin: the gap to the chart is taken from the container too.\n reservedHeight() {\n if (!el?.isConnected || side()) return 0\n const { marginTop, marginBottom } = getComputedStyle(el)\n return (\n el.offsetHeight +\n (Number.parseFloat(marginTop) || 0) +\n (Number.parseFloat(marginBottom) || 0)\n )\n },\n reservedWidth() {\n return el?.isConnected && side() ? el.offsetWidth + gap() : 0\n },\n afterRender: place,\n destroy: remove,\n }\n },\n }\n}\n","import type { Chart } from '../chart.ts'\nimport type { Interaction } from '../interaction.ts'\nimport type { ChartPlugin } from '../plugin.ts'\n\n/** Charts by `sync` group, held weakly: a chart taken out without destroy() is let go. */\nconst groups = /* @__PURE__ */ new Map<string, Set<WeakRef<Chart<object>>>>()\n\n/** The index of each category label, per render of a chart. */\nconst indexes = /* @__PURE__ */ new WeakMap<Interaction, Map<string | number, number>>()\n\n/** Set while a highlight is passed on, so the charts it reaches do not pass it on again. */\nlet passing = false\n\n/** The index of the category with `label` in a chart's current render, if it has one. */\nfunction indexOf(interaction: Interaction, label: string | number): number | undefined {\n let index = indexes.get(interaction)\n if (!index) {\n index = new Map()\n for (let i = 0; i < interaction.count; i++) {\n const hit = interaction.hitIndex(i)\n if (hit && !index.has(hit.label)) index.set(hit.label, i)\n }\n indexes.set(interaction, index)\n }\n return index.get(label)\n}\n\n/**\n * Shared hover across charts: charts with the same `sync` group highlight\n * the category under the pointer in any of them (with its crosshair and\n * tooltip), matched by label, and clear together when it leaves. Keyboard\n * highlights stay in their own chart.\n */\nexport function sync(): ChartPlugin {\n return {\n name: 'sync',\n install(chart) {\n const self = new WeakRef(chart)\n let group: Set<WeakRef<Chart<object>>> | undefined\n /** The name of the group joined: the config may have moved on before the next render. */\n let joined: string | undefined\n /** Leave the group, and take it off the list when it is empty. */\n const leave = () => {\n group?.delete(self)\n if (joined && group?.size === 0 && groups.get(joined) === group) groups.delete(joined)\n }\n /** Join the group of the current config, leaving the one before. */\n const join = () => {\n const name = chart.config.sync\n const next = name ? (groups.get(name) ?? new Set()) : undefined\n if (next === group) return\n leave()\n if (name && next) {\n next.add(self)\n groups.set(name, next)\n }\n group = next\n joined = name\n }\n join()\n const off = chart.on('hover', ({ hit }) => {\n // Only the pointer leads; keyboard highlights and highlights passed on do not.\n if (passing || !group || (hit && chart.highlightSource !== 'pointer')) return\n passing = true\n try {\n for (const ref of group) {\n const other = ref.deref()\n if (!other) group.delete(ref)\n if (!other || other === chart) continue\n const index = hit && other.interaction && indexOf(other.interaction, hit.label)\n if (index === undefined || index === null) other.clearHighlight()\n else other.highlightIndex(index)\n }\n } finally {\n passing = false\n }\n })\n return {\n afterRender: join,\n destroy() {\n off()\n leave()\n },\n }\n },\n }\n}\n","/**\n * Work that can wait until the browser is idle, such as hidden data tables:\n * it runs in an idle callback (within a second at the latest), or with\n * `flush()`. A module of its own, so charts without such work do not ship it.\n */\nimport { flushHooks, run } from './scheduler.ts'\n\nconst idle = /* @__PURE__ */ new Map<object, () => void>()\nlet pending = false\n\nfunction drain(): number {\n pending = false\n let count = 0\n while (idle.size > 0) {\n const tasks = Array.from(idle.values())\n idle.clear()\n for (const task of tasks) {\n run(task)\n count++\n }\n }\n return count\n}\n\n/** Run `task` once the browser is idle, replacing any idle task already queued for `key`. */\nexport function scheduleIdle(key: object, task: () => void): void {\n flushHooks.idle = drain\n idle.set(key, task)\n if (pending) return\n pending = true\n if (typeof requestIdleCallback === 'function') requestIdleCallback(drain, { timeout: 1000 })\n else setTimeout(drain, 100)\n}\n\n/** Drop the idle task queued for `key`, if any. */\nexport function cancelIdle(key: object): void {\n idle.delete(key)\n}\n","import { tableContent } from '../a11y.ts'\nimport { type ChartConfig, chartModel } from '../chart.ts'\nimport { getNumberFormat } from '../format.ts'\nimport { cancelIdle, scheduleIdle } from '../idle.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\n\n/**\n * The chart data as an HTML table next to the SVG: visually hidden for\n * screen readers by default, visible with `table: 'visible'`.\n */\nconst DEFAULT_MAX_ROWS = 1000\n\nexport function dataTable(): ChartPlugin {\n return {\n name: 'table',\n install(chart) {\n const host = chart.element\n // Take over a server-rendered table instead of adding a second one.\n let el = host.querySelector<HTMLElement>(':scope > .tc-table-wrap') ?? undefined\n let adopt = el?.firstElementChild ?? null\n\n /** The table option of the last table, to tell its changes from new data. */\n let shown: unknown\n const key = {}\n\n const remove = () => {\n cancelIdle(key)\n if (!el) return\n render(el, null)\n el.remove()\n el = undefined\n }\n\n const update = (config: ChartConfig<object>, hidden: ReadonlySet<string>) => {\n const option = config.table ?? true\n const maxRows =\n typeof option === 'object' && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS\n const table =\n option !== false && typeof document !== 'undefined'\n ? config.type.table?.(\n chartModel(config),\n { locale: config.locale, hidden, rtl: chart.rtl },\n maxRows,\n )\n : undefined\n if (!table) {\n remove()\n return\n }\n const visible =\n option === 'visible' || (typeof option === 'object' && option.visible === true)\n // Huge tables help nobody and cost real time to build; keep the first rows.\n let caption = config.title\n const total = table.total ?? table.rows.length\n const rows =\n table.rows.length > maxRows\n ? { columns: table.columns, rows: table.rows.slice(0, maxRows) }\n : table\n if (total > rows.rows.length) {\n const n = getNumberFormat(config.locale)\n const note = `${n.format(rows.rows.length)} of ${n.format(total)} rows`\n caption = caption ? `${caption} (${note})` : note\n }\n if (!el) el = host.ownerDocument.createElement('div')\n el.className = visible ? 'tc-table-wrap' : 'tc-table-wrap tc-sr-only'\n render(el, tableContent(rows, caption), adopt)\n adopt = null\n const svg = host.querySelector(':scope > svg.tc-chart')\n // After a legend below or beside (after) the chart.\n const after = host.querySelector(':scope > svg.tc-chart + .tc-legend') ?? svg\n if (after && after.nextElementSibling !== el) after.after(el)\n else if (!el.isConnected) host.appendChild(el)\n }\n\n return {\n afterRender({ config, hidden, changed }) {\n // Resizing changes nothing in the table.\n if (!changed && el?.isConnected) return\n const option = config.table ?? true\n const same = shown === option\n shown = option\n // A hidden table only serves screen readers: rebuilding thousands of\n // cells for new data can wait until the browser is idle instead of\n // delaying the frame that animates the chart. The first table, visible\n // ones and changes of the table option itself are built right away.\n if (same && el?.isConnected && el.classList.contains('tc-sr-only')) {\n scheduleIdle(key, () => update(config, hidden))\n } else {\n cancelIdle(key)\n update(config, hidden)\n }\n },\n destroy: remove,\n }\n },\n }\n}\n","import type { SwatchShape } from './features.ts'\nimport type { Hit } from './interaction.ts'\nimport { type ChildInput, h, type VNode } from './vnode.ts'\n\n/**\n * Where a tooltip for `hit` belongs, in chart pixels: the pointer when it\n * drives the highlight, otherwise the focused value (keyboard).\n */\nexport function hitAnchor(hit: Hit, pointer?: { x: number; y: number }): { x: number; y: number } {\n if (pointer) return pointer\n const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0]\n if (hit.highlight?.kind === 'spoke' && item?.y != null) return { x: item.x, y: item.y }\n if (hit.axis === 'y') return { x: item?.x ?? hit.x, y: hit.y ?? hit.area.y }\n return { x: hit.x, y: item?.y ?? hit.area.y + hit.area.height / 2 }\n}\n\nexport interface TooltipOptions {\n /**\n * Colors of the tooltip: `'dark'` (the default) is a dark box with light\n * text, `'light'` a white one with dark text. Both keep their colors in\n * dark mode; the `--tc-tooltip-*` tokens tune them.\n */\n theme?: 'dark' | 'light'\n /**\n * Custom content for a hit: VNodes built with `h()` or plain text.\n * Rendered safely (no HTML parsing), inside `.tc-tooltip`.\n */\n format?: (hit: Hit) => ChildInput\n /** Extra content below the default rows (e.g. a total), in `.tc-tooltip-footer`. */\n footer?: (hit: Hit) => ChildInput\n}\n\n/**\n * Default tooltip content: the category title and one row per series\n * (`shape` gives their swatches the point shapes of their slots).\n */\nexport function tooltipContent(hit: Hit, options: TooltipOptions = {}, shape?: SwatchShape): VNode {\n const body: ChildInput = options.format\n ? options.format(hit)\n : [\n hit.title && h('div', { class: 'tc-tooltip-title' }, hit.title),\n hit.items.map((item) =>\n h(\n 'div',\n {\n key: item.seriesIndex,\n class: [\n 'tc-tooltip-item',\n 'tc-series',\n `tc-series-${item.seriesIndex + 1}`,\n hit.seriesIndex === item.seriesIndex && 'tc-tooltip-item-active',\n ],\n style: { '--tc-series-color': item.color, ...shape?.(item.seriesIndex) },\n },\n h('span', { class: 'tc-tooltip-swatch' }),\n h('span', { class: 'tc-tooltip-name' }, item.name),\n h('span', { class: 'tc-tooltip-value' }, item.text),\n ),\n ),\n options.footer && h('div', { class: 'tc-tooltip-footer' }, options.footer(hit)),\n ]\n return h('div', { class: 'tc-tooltip-content' }, body)\n}\n\nexport interface TooltipPlacement {\n x: number\n y: number\n side: 'left' | 'right'\n}\n\n/**\n * Place a `width × height` tooltip next to an anchor within `bounds` (from\n * `bounds.x`, `bounds.y`, 0 by default): right of the anchor, or left when it\n * would overflow (the other way round with `rtl`), vertically centered on the\n * pointer and clamped.\n */\nexport function placeTooltip(\n anchor: { x: number; y: number },\n size: { width: number; height: number },\n bounds: { x?: number; y?: number; width: number; height: number },\n offset = 12,\n rtl = false,\n): TooltipPlacement {\n const { x: left = 0, y: top = 0 } = bounds\n const fitsRight = anchor.x + offset + size.width <= left + bounds.width\n const fitsLeft = anchor.x - offset - size.width >= left\n // The side read first, unless only the other one has room.\n const side = (rtl ? fitsLeft || !fitsRight : fitsLeft && !fitsRight) ? 'left' : 'right'\n const rawX = side === 'right' ? anchor.x + offset : anchor.x - offset - size.width\n const x = Math.max(left, Math.min(rawX, left + bounds.width - size.width))\n const y = Math.max(top, Math.min(anchor.y - size.height / 2, top + bounds.height - size.height))\n return { x: Math.round(x), y: Math.round(y), side }\n}\n","import { swatchShape } from '../features.ts'\nimport type { ChartPlugin } from '../plugin.ts'\nimport { render } from '../render/dom.ts'\nimport { schedule } from '../scheduler.ts'\nimport { hitAnchor, placeTooltip, tooltipContent } from '../tooltip.ts'\nimport { listenPointer } from './pointer.ts'\n\n/**\n * Where a tooltip in `el` can show without being cut off: the box of the\n * nearest element that clips its overflow (`el` itself, an ancestor, across\n * shadow roots), within the viewport.\n */\nfunction room(el: Element): { left: number; top: number; right: number; bottom: number } {\n let left = 0\n let top = 0\n let right = innerWidth\n let bottom = innerHeight\n for (let node: Element | null = el; node; ) {\n const style = getComputedStyle(node)\n if (style.overflowX !== 'visible' || style.overflowY !== 'visible') {\n const box = node.getBoundingClientRect()\n left = Math.max(left, box.left)\n top = Math.max(top, box.top)\n right = Math.min(right, box.right)\n bottom = Math.min(bottom, box.bottom)\n break\n }\n node = node.parentElement ?? ((node.getRootNode() as ShadowRoot).host || null)\n }\n return { left, top, right, bottom }\n}\n\n/** Tooltips to place: each measures where it goes, and returns what moves it there. */\nconst waiting: (() => (() => void) | undefined)[] = []\n\n/**\n * Place the waiting tooltips, in the frame that rendered their charts: all\n * are measured before any is moved, so the page is laid out once for the\n * frame. Measured and moved one by one, twelve charts sharing a hover laid\n * the page out twelve times.\n */\nfunction placeAll(): void {\n for (const move of waiting.splice(0).map((measure) => measure())) move?.()\n}\n\n/**\n * An HTML tooltip (`.tc-tooltip`) for the highlighted category, placed next\n * to it inside the chart element. Configure it with the `tooltip` option;\n * `theme: 'light'` adds `.tc-tooltip-light` for the white variant.\n */\nexport function tooltip(): ChartPlugin {\n return {\n name: 'tooltip',\n install(chart) {\n const stop = listenPointer(chart)\n const el = chart.element\n // Positioning context for the tooltip (zero specificity in CSS, so page styles win).\n const addedClass = !el.classList.contains('tc-container')\n el.classList.add('tc-container')\n let tip: HTMLElement | undefined\n /** Counts the renders, so a placement still waiting knows when it is out of date. */\n let turns = 0\n\n return {\n afterRender() {\n const option = chart.config.tooltip\n const hit = chart.active\n const anchor = hit && hitAnchor(hit, chart.pointer)\n if (\n option === false ||\n typeof document === 'undefined' ||\n !hit ||\n !anchor ||\n !Number.isFinite(anchor.x) ||\n !Number.isFinite(anchor.y)\n ) {\n turns++\n tip?.removeAttribute('data-visible')\n return\n }\n if (!tip) {\n tip = el.ownerDocument.createElement('div')\n tip.className = 'tc-tooltip'\n tip.setAttribute('aria-hidden', 'true')\n el.appendChild(tip)\n }\n const options = typeof option === 'object' ? option : undefined\n tip.classList.toggle('tc-tooltip-light', options?.theme === 'light')\n const { rtl } = chart\n tip.dir = rtl ? 'rtl' : ''\n render(tip, tooltipContent(hit, options, swatchShape(chart.config)))\n\n // Placed with the tooltips of the other charts of this frame (see placeAll).\n const shown = tip\n const turn = ++turns\n waiting.push(() => {\n const svg = el.querySelector('svg.tc-chart')\n // A later render of this chart, or its end, overtook this one.\n if (!svg || turn !== turns) return undefined\n const { width, height } = chart.size\n const box = el.getBoundingClientRect()\n const rect = svg.getBoundingClientRect()\n // Screen pixels per pixel of the container (transformed or zoomed ancestors).\n const k = box.width > 0 && el.offsetWidth > 0 ? box.width / el.offsetWidth : 1\n const sx = rect.width > 0 ? rect.width / width / k : 1\n const sy = rect.height > 0 ? rect.height / height / k : 1\n const origin = {\n x: (rect.left - box.left) / k - el.clientLeft,\n y: (rect.top - box.top) / k - el.clientTop,\n }\n // Snap to the category, follow the pointer along the values\n // (a radar spoke runs both ways, so there it follows the pointer).\n const ax = hit.axis === 'y' || hit.highlight?.kind === 'spoke' ? anchor.x : hit.x\n const ay = hit.axis === 'y' ? (hit.y ?? anchor.y) : anchor.y\n // The tooltip may leave the container, up to what would cut it off.\n const clip = room(el)\n const place = placeTooltip(\n { x: origin.x + ax * sx, y: origin.y + ay * sy },\n { width: shown.offsetWidth, height: shown.offsetHeight },\n {\n x: (clip.left - box.left) / k - el.clientLeft,\n y: (clip.top - box.top) / k - el.clientTop,\n width: (clip.right - clip.left) / k,\n height: (clip.bottom - clip.top) / k,\n },\n 12,\n rtl,\n )\n return () => {\n shown.style.transform = `translate(${place.x}px, ${place.y}px)`\n shown.dataset.side = place.side\n if (!shown.hasAttribute('data-visible')) {\n // Commit the position before becoming visible, so it does not glide in from the old spot.\n void getComputedStyle(shown).transform\n shown.setAttribute('data-visible', '')\n }\n }\n })\n schedule(waiting, placeAll)\n },\n destroy() {\n turns++\n if (tip) {\n render(tip, null)\n tip.remove()\n }\n if (addedClass) el.classList.remove('tc-container')\n stop?.()\n },\n }\n },\n }\n}\n","import type { ChartPlugin } from '../plugin.ts'\nimport { download } from './download.ts'\nimport { highlight } from './highlight.ts'\nimport { keyboard } from './keyboard.ts'\nimport { legend } from './legend.ts'\nimport { pointer } from './pointer.ts'\nimport { sync } from './sync.ts'\nimport { dataTable } from './table.ts'\nimport { tooltip } from './tooltip.ts'\n\nexport { dataTable, download, highlight, keyboard, legend, pointer, sync, tooltip }\n\n/** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */\nexport function defaultPlugins(): ChartPlugin[] {\n return [highlight(), legend(), tooltip(), dataTable(), keyboard(), sync(), download()]\n}\n","","import { version } from '../package.json'\n\n/** Version of the `@tabler/charts` package. */\nexport const VERSION: string = version\n\nexport type { DataTable } from './a11y.ts'\nexport { describeHit, tableContent } from './a11y.ts'\nexport type {\n BaseOptions,\n BuiltChart,\n ChartConfig,\n ChartEvents,\n ChartType,\n ContextOptions,\n RenderContext,\n RenderResult,\n ResolvedLegend,\n Size,\n TableContext,\n} from './chart.ts'\nexport {\n buildChart,\n Chart,\n chartEvents,\n chartLabel,\n chartModel,\n chartToString,\n renderChart,\n renderContext,\n resolveLegend,\n resolveSize,\n} from './chart.ts'\nexport type { Annotation } from './charts/annotations.ts'\nexport type { AreaOptions } from './charts/area.ts'\nexport { area } from './charts/area.ts'\nexport type { BarOptions } from './charts/bar.ts'\nexport { bar } from './charts/bar.ts'\nexport type {\n CalendarData,\n CalendarEntry,\n CalendarOptions,\n CalendarSeries,\n} from './charts/calendar.ts'\nexport { calendar } from './charts/calendar.ts'\nexport type { Candle, CandlestickOptions } from './charts/candlestick.ts'\nexport { candlestick } from './charts/candlestick.ts'\nexport type {\n CartesianData,\n CartesianOptions,\n CategoryAxisOptions,\n Label,\n Series,\n ValueAxisOptions,\n} from './charts/cartesian.ts'\nexport {\n categoryInteraction,\n domainOf,\n seriesKey,\n seriesLegend,\n seriesTable,\n} from './charts/cartesian.ts'\nexport type { FunnelOptions, FunnelStage } from './charts/funnel.ts'\nexport { funnel } from './charts/funnel.ts'\nexport type { GaugeOptions, GaugeRing } from './charts/gauge.ts'\nexport { gauge } from './charts/gauge.ts'\nexport type { HeatmapOptions, HeatmapRange } from './charts/heatmap.ts'\nexport { heatmap } from './charts/heatmap.ts'\nexport type { LineOptions } from './charts/line.ts'\nexport { line } from './charts/line.ts'\nexport type {\n MapData,\n MapHit,\n MapLayout,\n MapLine,\n MapMarker,\n MapOptions,\n MapRegion,\n MapView,\n} from './charts/map.ts'\nexport { addMap, map } from './charts/map.ts'\nexport type { ParliamentOptions, ParliamentParty } from './charts/parliament.ts'\nexport { parliament } from './charts/parliament.ts'\nexport type { PercentageBarOptions, PercentageBarSegment } from './charts/percentage-bar.ts'\nexport { percentageBar } from './charts/percentage-bar.ts'\nexport type { PieOptions, PieSlice } from './charts/pie.ts'\nexport { donut, pie } from './charts/pie.ts'\nexport type { RadarOptions, RadialAxisOptions } from './charts/radar.ts'\nexport { radar } from './charts/radar.ts'\nexport type { SankeyData, SankeyLink, SankeyNode, SankeyOptions } from './charts/sankey.ts'\nexport { sankey } from './charts/sankey.ts'\nexport type { ScatterOptions, ScatterPoint, ScatterSeries } from './charts/scatter.ts'\nexport { scatter } from './charts/scatter.ts'\nexport type { SparklineOptions } from './charts/sparkline.ts'\nexport { sparkline } from './charts/sparkline.ts'\nexport type { TreemapNode, TreemapOptions } from './charts/treemap.ts'\nexport { treemap } from './charts/treemap.ts'\nexport type { AxisOptions, AxisPosition, LinearTicksOptions, Tick } from './components/axis.ts'\nexport { axis, axisSize, bandTicks, linearTicks, thinTicks } from './components/axis.ts'\nexport type { GridOptions } from './components/grid.ts'\nexport { grid } from './components/grid.ts'\nexport { hoverOverlay, hoverUnderlay } from './components/hover.ts'\nexport type { Features } from './features.ts'\nexport { feature, features, register } from './features.ts'\nexport type { DateFormat, Locale, NumberFormat, NumberFormatOptions } from './format.ts'\nexport {\n formatDate,\n formatDetail,\n formatNumber,\n formatTicks,\n getDateFormat,\n getNumberFormat,\n stepPrecision,\n} from './format.ts'\nexport type { Highlight, Hit, HitItem, HitTester, Interaction } from './interaction.ts'\nexport type { Insets, InsetsInput, Rect } from './layout.ts'\nexport { estimateTextWidth, innerRect, insets, LINE_HEIGHT } from './layout.ts'\nexport type { LegendItem, LegendOptions } from './legend.ts'\nexport { defaultHidden, legendContent } from './legend.ts'\nexport type {\n AfterRenderState,\n BeforeRenderState,\n ChartPlugin,\n PluginInstance,\n} from './plugin.ts'\nexport type { DownloadFormat, DownloadMenuOptions, DownloadOption } from './plugins/download.ts'\nexport {\n dataTable,\n defaultPlugins,\n download,\n highlight,\n keyboard,\n legend,\n pointer,\n sync,\n tooltip,\n} from './plugins/index.ts'\nexport { render } from './render/dom.ts'\nexport type { RenderToStringOptions } from './render/string.ts'\nexport { escapeAttr, escapeText, renderToString } from './render/string.ts'\nexport type { BandKey, BandScale, BandScaleOptions } from './scales/band.ts'\nexport { band, point } from './scales/band.ts'\nexport { extent } from './scales/extent.ts'\nexport type { LinearScale, LinearScaleOptions } from './scales/linear.ts'\nexport { linear } from './scales/linear.ts'\nexport { niceDomain, tickIncrement, tickStep, ticks } from './scales/ticks.ts'\nexport { cancel, flush, schedule } from './scheduler.ts'\nexport type { ArcOptions } from './shapes/arc.ts'\nexport { arcCentroid, arcPathStable, padAngleForGap } from './shapes/arc.ts'\nexport { barPath, hbarPath } from './shapes/bar.ts'\nexport type { Curve, PathOptions, Point } from './shapes/path.ts'\nexport { areaPath, linePath } from './shapes/path.ts'\nexport type { TooltipOptions, TooltipPlacement } from './tooltip.ts'\nexport { hitAnchor, placeTooltip, tooltipContent } from './tooltip.ts'\nexport type {\n Attrs,\n AttrValue,\n Child,\n ChildInput,\n ClassValue,\n Key,\n Props,\n StyleValue,\n VNode,\n} from './vnode.ts'\nexport { h, normalizeClass, normalizeStyle } from './vnode.ts'\n"],"mappings":";;;;;;;;;AA8BA,MAAM,QAAwC;CAAE,KAAK;CAAO,KAAK;CAAO,MAAM;CAAQ,MAAM;AAAO;AACnG,MAAM,kBAA6C,CAAC,OAAO,KAAK;AAEhE,SAAS,QAAQ,QAA6C;CAC5D,OAAO,WAAW,OACd,CAAC,IACD,MAAM,QAAQ,MAAM,IAClB,EAAE,SAAS,OAAO,IACjB;AACT;;;;;;;;AASA,SAAgB,WAAwB;CACtC,OAAO;EACL,MAAM;EACN,QAAQ,OAAO;GACb,MAAM,OAAO,MAAM;GACnB,MAAM,MAAM,KAAK;GACjB,IAAI;GACJ,IAAI,UAA+B,CAAC;GAEpC,MAAM,aAAa,CAAC,KAAK,UAAU,SAAS,cAAc;GAE1D,MAAM,eAAe,IAAI,cAA2B,qBAAqB;GACzE,MAAM,aAAa,IAAI,cAA2B,mBAAmB;GACrE,MAAM,cAAc,MAAM,KAAK,IAAI,iBAA8B,mBAAmB,KAAK,CAAC,CAAC;GAE3F,MAAM,WAAW,SAAkB;IACjC,MAAM,OAAO,KAAK;IAClB,IAAI,CAAC,MAAM;IACX,KAAK,SAAS,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,iBAAiB,OAAO,IAAI,CAAC;IACpD,IAAI,MAAM,IAAI,iBAAiB,eAAe,WAAW,IAAI;SACxD,IAAI,oBAAoB,eAAe,WAAW,IAAI;GAC7D;GACA,MAAM,eAAe,KAAK,CAAC,EAAE,WA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