@tabler/charts 0.1.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 (445) hide show
  1. package/README.md +92 -4
  2. package/dist/{annotations-Bp7HwtF5.d.ts → annotations-B02GR_KU.d.ts} +3 -8
  3. package/dist/{annotations-BszTTjf9.js → annotations-BQ8l-qHs.js} +6 -7
  4. package/dist/{annotations-BszTTjf9.js.map → annotations-BQ8l-qHs.js.map} +1 -1
  5. package/dist/{annotations-lyt0I3HU.d.cts → annotations-CHafaGd4.d.cts} +3 -8
  6. package/dist/{annotations-DpETO8dE.cjs → annotations-CpCWA29b.cjs} +6 -7
  7. package/dist/{annotations-DpETO8dE.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
  8. package/dist/annotations.cjs +3 -5
  9. package/dist/annotations.cjs.map +1 -1
  10. package/dist/annotations.d.cts +2 -1
  11. package/dist/annotations.d.ts +2 -1
  12. package/dist/annotations.js +3 -4
  13. package/dist/{arc-a1tRTEw7.js → arc-B3V5IR0w.js} +2 -3
  14. package/dist/{arc-a1tRTEw7.js.map → arc-B3V5IR0w.js.map} +1 -1
  15. package/dist/{arc-BXpLrt9b.cjs → arc-CYhI62kO.cjs} +2 -3
  16. package/dist/{arc-BXpLrt9b.cjs.map → arc-CYhI62kO.cjs.map} +1 -1
  17. package/dist/{area-CF__HOwL.d.ts → area-DEFQm_SQ.d.ts} +3 -6
  18. package/dist/{area-sHCE3pg5.cjs → area-DYdQ_sMV.cjs} +5 -6
  19. package/dist/{area-sHCE3pg5.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
  20. package/dist/{area-DQsLERhx.js → area-WdtfqvhX.js} +5 -6
  21. package/dist/{area-DQsLERhx.js.map → area-WdtfqvhX.js.map} +1 -1
  22. package/dist/{area-DIxaAbYZ.d.cts → area-h_FvieFb.d.cts} +3 -6
  23. package/dist/area.cjs +1 -1
  24. package/dist/area.d.cts +2 -1
  25. package/dist/area.d.ts +2 -1
  26. package/dist/area.js +1 -2
  27. package/dist/axis-MMaVoSWB.js +235 -0
  28. package/dist/axis-MMaVoSWB.js.map +1 -0
  29. package/dist/axis-YfAerNBA.cjs +300 -0
  30. package/dist/axis-YfAerNBA.cjs.map +1 -0
  31. package/dist/{band-DTcNDAFO.d.ts → band-CNKvdnTC.d.cts} +1 -4
  32. package/dist/{band-DTcNDAFO.d.cts → band-CNKvdnTC.d.ts} +1 -4
  33. package/dist/{bar-jZEoao74.js → bar-BOcRcArc.js} +80 -62
  34. package/dist/bar-BOcRcArc.js.map +1 -0
  35. package/dist/{bar-C-7zR2qp.cjs → bar-CVkOJ7WA.cjs} +82 -64
  36. package/dist/bar-CVkOJ7WA.cjs.map +1 -0
  37. package/dist/{bar-DM16NUvV.js → bar-CgpC2EpX.js} +3 -4
  38. package/dist/{bar-DM16NUvV.js.map → bar-CgpC2EpX.js.map} +1 -1
  39. package/dist/{bar-BBM8RhoL.d.ts → bar-D9B_arKf.d.ts} +4 -7
  40. package/dist/{bar-CRKLDg98.d.cts → bar-DZCQ-kyf.d.cts} +4 -7
  41. package/dist/{bar-DGuUN3nc.cjs → bar-wVykm1us.cjs} +3 -4
  42. package/dist/{bar-DGuUN3nc.cjs.map → bar-wVykm1us.cjs.map} +1 -1
  43. package/dist/bar.cjs +1 -1
  44. package/dist/bar.d.cts +2 -1
  45. package/dist/bar.d.ts +2 -1
  46. package/dist/bar.js +1 -2
  47. package/dist/calendar-BSvO8nRb.d.cts +106 -0
  48. package/dist/calendar-BXgIX5H1.js +502 -0
  49. package/dist/calendar-BXgIX5H1.js.map +1 -0
  50. package/dist/calendar-Bq3vFzPl.d.ts +106 -0
  51. package/dist/calendar-DAFXjV99.cjs +507 -0
  52. package/dist/calendar-DAFXjV99.cjs.map +1 -0
  53. package/dist/calendar.cjs +3 -0
  54. package/dist/calendar.d.cts +3 -0
  55. package/dist/calendar.d.ts +3 -0
  56. package/dist/calendar.js +1 -0
  57. package/dist/{candlestick-D_vV0_XZ.d.ts → candlestick-B3WcLzph.d.ts} +3 -6
  58. package/dist/{candlestick-__pXl_pV.d.cts → candlestick-BcomxeVG.d.cts} +3 -6
  59. package/dist/{candlestick-DuXwAFID.js → candlestick-BtT9glp9.js} +19 -18
  60. package/dist/{candlestick-DuXwAFID.js.map → candlestick-BtT9glp9.js.map} +1 -1
  61. package/dist/{candlestick-B5r1w3kc.cjs → candlestick-CSmRuZ4v.cjs} +19 -18
  62. package/dist/{candlestick-B5r1w3kc.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
  63. package/dist/candlestick.cjs +4 -5
  64. package/dist/candlestick.d.cts +1 -1
  65. package/dist/candlestick.d.ts +1 -1
  66. package/dist/candlestick.js +4 -6
  67. package/dist/{cartesian-Cr0AF0nG.js → cartesian-BrPqb5Qn.js} +138 -264
  68. package/dist/cartesian-BrPqb5Qn.js.map +1 -0
  69. package/dist/{cartesian-BoDfgBCV.cjs → cartesian-DRSXHxWe.cjs} +162 -324
  70. package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
  71. package/dist/{chart-BF2CK9I_.js → chart-B6TTY4Kr.js} +120 -77
  72. package/dist/chart-B6TTY4Kr.js.map +1 -0
  73. package/dist/{chart-DyN7bcx8.d.ts → chart-CYrrUCi3.d.ts} +222 -102
  74. package/dist/{chart-D7ooEFnk.d.cts → chart-CbPzP5Dp.d.cts} +248 -102
  75. package/dist/{chart-CowF_lWY.cjs → chart-D_lyOy-M.cjs} +132 -83
  76. package/dist/chart-D_lyOy-M.cjs.map +1 -0
  77. package/dist/{circle-BQMuAfls.cjs → circle-Bwxy5j7B.cjs} +2 -3
  78. package/dist/{circle-BQMuAfls.cjs.map → circle-Bwxy5j7B.cjs.map} +1 -1
  79. package/dist/{circle-Z7YfCoCM.js → circle-YRDaOBpk.js} +2 -3
  80. package/dist/{circle-Z7YfCoCM.js.map → circle-YRDaOBpk.js.map} +1 -1
  81. package/dist/{clean-o1vDEhFV.js → clean-CkoQobGv.js} +3 -4
  82. package/dist/{clean-o1vDEhFV.js.map → clean-CkoQobGv.js.map} +1 -1
  83. package/dist/{clean-Byl6kzf0.cjs → clean-Die2iCNc.cjs} +8 -3
  84. package/dist/{clean-Byl6kzf0.cjs.map → clean-Die2iCNc.cjs.map} +1 -1
  85. package/dist/{core-D1vO1LrC.d.cts → core-9BnLEW4K.d.cts} +31 -72
  86. package/dist/{core-DcbemzGf.d.ts → core-C3qEppSm.d.ts} +10 -46
  87. package/dist/{core-CegR_j55.js → core-CQ0FaJ4G.js} +138 -99
  88. package/dist/core-CQ0FaJ4G.js.map +1 -0
  89. package/dist/{core-RzS9IQO5.cjs → core-D2PSked3.cjs} +139 -100
  90. package/dist/core-D2PSked3.cjs.map +1 -0
  91. package/dist/core.cjs +47 -33
  92. package/dist/core.d.cts +26 -21
  93. package/dist/core.d.ts +26 -21
  94. package/dist/core.js +31 -25
  95. package/dist/{dates-CG-FvioW.js → dates-DLe2Ww64.js} +4 -5
  96. package/dist/{dates-CG-FvioW.js.map → dates-DLe2Ww64.js.map} +1 -1
  97. package/dist/{dates-Btm7Zm6W.cjs → dates-DerXTb1J.cjs} +4 -5
  98. package/dist/{dates-Btm7Zm6W.cjs.map → dates-DerXTb1J.cjs.map} +1 -1
  99. package/dist/{decimate-tLhDk1ys.cjs → decimate-BS3x8g-f.cjs} +2 -3
  100. package/dist/{decimate-tLhDk1ys.cjs.map → decimate-BS3x8g-f.cjs.map} +1 -1
  101. package/dist/{decimate-BGg9XgF0.d.ts → decimate-BxxYBJJk.d.cts} +2 -5
  102. package/dist/{decimate-C87cl_Sp.js → decimate-CapfgiDY.js} +2 -3
  103. package/dist/{decimate-C87cl_Sp.js.map → decimate-CapfgiDY.js.map} +1 -1
  104. package/dist/{decimate-CNSpgGa5.d.cts → decimate-Du87fMLG.d.ts} +2 -5
  105. package/dist/decimate.cjs +3 -4
  106. package/dist/decimate.d.cts +1 -1
  107. package/dist/decimate.d.ts +1 -1
  108. package/dist/decimate.js +3 -4
  109. package/dist/{dom-CLF868Qs.cjs → dom-C33zvtPo.cjs} +5 -11
  110. package/dist/dom-C33zvtPo.cjs.map +1 -0
  111. package/dist/{dom-vP3IcMak.js → dom-CTse6Rvd.js} +5 -11
  112. package/dist/dom-CTse6Rvd.js.map +1 -0
  113. package/dist/{export-chart-BhhYgksr.cjs → export-chart-CPtXmZvi.cjs} +18 -14
  114. package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
  115. package/dist/{export-chart-9w8t3rjZ.js → export-chart-DoeiAyR2.js} +18 -14
  116. package/dist/export-chart-DoeiAyR2.js.map +1 -0
  117. package/dist/export.cjs +3 -5
  118. package/dist/export.cjs.map +1 -1
  119. package/dist/export.d.cts +8 -1
  120. package/dist/export.d.ts +8 -1
  121. package/dist/export.js +3 -4
  122. package/dist/{extent-BAMZo0Nq.js → extent-DOV8rs-6.js} +2 -3
  123. package/dist/{extent-BAMZo0Nq.js.map → extent-DOV8rs-6.js.map} +1 -1
  124. package/dist/{extent-DsFWvAHJ.cjs → extent-DuYDcvM9.cjs} +2 -3
  125. package/dist/{extent-DsFWvAHJ.cjs.map → extent-DuYDcvM9.cjs.map} +1 -1
  126. package/dist/{fade-D3NxH5Qg.js → fade-CDrQjnDz.js} +59 -83
  127. package/dist/fade-CDrQjnDz.js.map +1 -0
  128. package/dist/{fade-Cs74puQS.cjs → fade-CRqcKMWY.cjs} +59 -83
  129. package/dist/fade-CRqcKMWY.cjs.map +1 -0
  130. package/dist/{features-wASyHGic.js → features-B55rwpQC.js} +5 -4
  131. package/dist/features-B55rwpQC.js.map +1 -0
  132. package/dist/{features-BclHgg2W.cjs → features-DEDP5CEQ.cjs} +10 -3
  133. package/dist/features-DEDP5CEQ.cjs.map +1 -0
  134. package/dist/fit-BPyPRnsK.js +16 -0
  135. package/dist/fit-BPyPRnsK.js.map +1 -0
  136. package/dist/fit-D4MIIQQz.cjs +21 -0
  137. package/dist/fit-D4MIIQQz.cjs.map +1 -0
  138. package/dist/{format-B0yKXBTH.cjs → format-CAE5ruy6.cjs} +2 -3
  139. package/dist/{format-B0yKXBTH.cjs.map → format-CAE5ruy6.cjs.map} +1 -1
  140. package/dist/{format-lStwuc1L.js → format-it1kepFG.js} +2 -3
  141. package/dist/{format-lStwuc1L.js.map → format-it1kepFG.js.map} +1 -1
  142. package/dist/funnel-BdcfUkb5.d.ts +50 -0
  143. package/dist/funnel-CFEEulw_.cjs +244 -0
  144. package/dist/funnel-CFEEulw_.cjs.map +1 -0
  145. package/dist/funnel-CYCv8cq2.js +239 -0
  146. package/dist/funnel-CYCv8cq2.js.map +1 -0
  147. package/dist/funnel-CarOh8w_.d.cts +50 -0
  148. package/dist/funnel.cjs +3 -0
  149. package/dist/funnel.d.cts +3 -0
  150. package/dist/funnel.d.ts +3 -0
  151. package/dist/funnel.js +1 -0
  152. package/dist/{gauge-D-FYhuds.cjs → gauge-6HfDcLMJ.cjs} +35 -36
  153. package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
  154. package/dist/{gauge-Dh423FHh.js → gauge-DiTk5aWO.js} +35 -36
  155. package/dist/gauge-DiTk5aWO.js.map +1 -0
  156. package/dist/{gauge-zpia05t2.d.ts → gauge-Ds9k1UV2.d.cts} +5 -8
  157. package/dist/{gauge-DP_EB2z3.d.cts → gauge-Zy25jfps.d.ts} +5 -8
  158. package/dist/gauge.cjs +1 -1
  159. package/dist/gauge.d.cts +2 -1
  160. package/dist/gauge.d.ts +2 -1
  161. package/dist/gauge.js +1 -2
  162. package/dist/{heatmap-DSZ2bVIa.js → heatmap-C1v8bwpq.js} +43 -43
  163. package/dist/heatmap-C1v8bwpq.js.map +1 -0
  164. package/dist/{heatmap-BectCEeE.d.ts → heatmap-CJ-0dfhJ.d.cts} +4 -7
  165. package/dist/{heatmap-BK18EBgJ.cjs → heatmap-Dcc_bsoQ.cjs} +47 -47
  166. package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
  167. package/dist/{heatmap-CCso6m61.d.cts → heatmap-Jp5sHRTo.d.ts} +4 -7
  168. package/dist/heatmap.cjs +1 -1
  169. package/dist/heatmap.d.cts +2 -1
  170. package/dist/heatmap.d.ts +2 -1
  171. package/dist/heatmap.js +1 -2
  172. package/dist/{hydrate-DDNIHYv_.js → hydrate-BB3MlR36.js} +3 -4
  173. package/dist/{hydrate-DDNIHYv_.js.map → hydrate-BB3MlR36.js.map} +1 -1
  174. package/dist/{hydrate-CzfxLfTv.d.ts → hydrate-BtAZf_5K.d.cts} +2 -5
  175. package/dist/{hydrate-CTTmQy0x.d.cts → hydrate-OjM1pIUG.d.ts} +2 -5
  176. package/dist/{hydrate-CxwTXDqO.cjs → hydrate-m0I5m6ue.cjs} +3 -4
  177. package/dist/hydrate-m0I5m6ue.cjs.map +1 -0
  178. package/dist/hydrate.cjs +3 -4
  179. package/dist/hydrate.cjs.map +1 -1
  180. package/dist/hydrate.d.cts +1 -1
  181. package/dist/hydrate.d.ts +1 -1
  182. package/dist/hydrate.js +3 -4
  183. package/dist/index.cjs +72 -56
  184. package/dist/index.cjs.map +1 -1
  185. package/dist/index.d.cts +28 -28
  186. package/dist/index.d.ts +28 -28
  187. package/dist/index.js +52 -44
  188. package/dist/index.js.map +1 -1
  189. package/dist/interaction-DXYSjgnP.cjs +32 -0
  190. package/dist/interaction-DXYSjgnP.cjs.map +1 -0
  191. package/dist/interaction-En1KlwFO.js +21 -0
  192. package/dist/interaction-En1KlwFO.js.map +1 -0
  193. package/dist/{layout-CtMBhNd9.cjs → layout-Cfg9x1k2.cjs} +45 -3
  194. package/dist/layout-Cfg9x1k2.cjs.map +1 -0
  195. package/dist/{layout-B3hiqVEw.js → layout-DqAte3H8.js} +34 -4
  196. package/dist/layout-DqAte3H8.js.map +1 -0
  197. package/dist/{line-CN4uZ9ZX.d.ts → line-Bpr5uVLQ.d.ts} +4 -7
  198. package/dist/{line-B3Ed6u7j.js → line-CxR4tg1Q.js} +49 -38
  199. package/dist/line-CxR4tg1Q.js.map +1 -0
  200. package/dist/{line-fQbtP_jL.cjs → line-YiCuhVMI.cjs} +49 -38
  201. package/dist/line-YiCuhVMI.cjs.map +1 -0
  202. package/dist/{line-W7VD_qs1.d.cts → line-vyWO030v.d.cts} +4 -7
  203. package/dist/line.cjs +4 -5
  204. package/dist/line.cjs.map +1 -1
  205. package/dist/line.d.cts +1 -1
  206. package/dist/line.d.ts +1 -1
  207. package/dist/line.js +4 -6
  208. package/dist/{log-CaofN3-n.d.ts → log-CI41TmcU.d.cts} +1 -6
  209. package/dist/{log-CaofN3-n.d.cts → log-CI41TmcU.d.ts} +1 -6
  210. package/dist/{log-axis-83rSpvL5.cjs → log-axis-DdRNyAq8.cjs} +6 -8
  211. package/dist/{log-axis-83rSpvL5.cjs.map → log-axis-DdRNyAq8.cjs.map} +1 -1
  212. package/dist/{log-axis-B_uvvOFc.js → log-axis-DhthtHFk.js} +6 -8
  213. package/dist/{log-axis-B_uvvOFc.js.map → log-axis-DhthtHFk.js.map} +1 -1
  214. package/dist/log.cjs +3 -5
  215. package/dist/log.cjs.map +1 -1
  216. package/dist/log.d.cts +1 -1
  217. package/dist/log.d.ts +1 -1
  218. package/dist/log.js +3 -4
  219. package/dist/map-49FcfdmJ.d.cts +156 -0
  220. package/dist/map-BMC61J-P.d.ts +156 -0
  221. package/dist/map-BqrZ80vT.cjs +818 -0
  222. package/dist/map-BqrZ80vT.cjs.map +1 -0
  223. package/dist/map-C15NC7kW.js +807 -0
  224. package/dist/map-C15NC7kW.js.map +1 -0
  225. package/dist/map.cjs +4 -0
  226. package/dist/map.d.cts +3 -0
  227. package/dist/map.d.ts +3 -0
  228. package/dist/map.js +1 -0
  229. package/dist/maps/world.cjs +875 -0
  230. package/dist/maps/world.cjs.map +1 -0
  231. package/dist/maps/world.d.cts +2 -0
  232. package/dist/maps/world.d.ts +2 -0
  233. package/dist/maps/world.js +874 -0
  234. package/dist/maps/world.js.map +1 -0
  235. package/dist/{morph-CqYDu1bY.cjs → morph-3I1Nf_tR.cjs} +4 -5
  236. package/dist/morph-3I1Nf_tR.cjs.map +1 -0
  237. package/dist/{morph-BMxz3X2b.d.ts → morph-Dh7gJkV4.d.cts} +1 -4
  238. package/dist/{morph-BMxz3X2b.d.cts → morph-Dh7gJkV4.d.ts} +1 -4
  239. package/dist/{morph-Bgg-24l8.js → morph-GfBab-b3.js} +4 -5
  240. package/dist/{morph-Bgg-24l8.js.map → morph-GfBab-b3.js.map} +1 -1
  241. package/dist/morph.cjs +3 -4
  242. package/dist/morph.cjs.map +1 -1
  243. package/dist/morph.d.cts +1 -1
  244. package/dist/morph.d.ts +1 -1
  245. package/dist/morph.js +3 -4
  246. package/dist/{named-BWWb5LQJ.cjs → named-BBASc8dW.cjs} +2 -3
  247. package/dist/{named-BWWb5LQJ.cjs.map → named-BBASc8dW.cjs.map} +1 -1
  248. package/dist/{named-DE15TOgh.js → named-BOiBah6I.js} +2 -3
  249. package/dist/{named-DE15TOgh.js.map → named-BOiBah6I.js.map} +1 -1
  250. package/dist/others-DBIGE6jr.js +57 -0
  251. package/dist/others-DBIGE6jr.js.map +1 -0
  252. package/dist/others-DBO4Kjwl.d.ts +29 -0
  253. package/dist/others-WfjCsjqT.cjs +68 -0
  254. package/dist/others-WfjCsjqT.cjs.map +1 -0
  255. package/dist/others-ls5eKtZ4.d.cts +31 -0
  256. package/dist/{parliament-Dw0sOERi.js → parliament-BKN6ikBJ.js} +36 -36
  257. package/dist/parliament-BKN6ikBJ.js.map +1 -0
  258. package/dist/{parliament-1Zv2Xh0D.d.ts → parliament-C7V8UJj1.d.cts} +5 -8
  259. package/dist/{parliament-DdrLVZwt.d.cts → parliament-Cz9n_DoK.d.ts} +5 -8
  260. package/dist/{parliament-CpWnoEvG.cjs → parliament-DhxAaIZ3.cjs} +36 -36
  261. package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
  262. package/dist/parliament.cjs +1 -1
  263. package/dist/parliament.d.cts +2 -1
  264. package/dist/parliament.d.ts +2 -1
  265. package/dist/parliament.js +1 -2
  266. package/dist/{path-CwB28da0.d.ts → path-YeUiOfG8.d.cts} +1 -4
  267. package/dist/{path-CwB28da0.d.cts → path-YeUiOfG8.d.ts} +1 -4
  268. package/dist/{patterns-DtgcnA8o.js → patterns-BMUINoka.js} +4 -5
  269. package/dist/{patterns-DtgcnA8o.js.map → patterns-BMUINoka.js.map} +1 -1
  270. package/dist/{patterns-LfcQAWCy.cjs → patterns-Dw7OMD_2.cjs} +4 -5
  271. package/dist/{patterns-LfcQAWCy.cjs.map → patterns-Dw7OMD_2.cjs.map} +1 -1
  272. package/dist/patterns.cjs +3 -5
  273. package/dist/patterns.cjs.map +1 -1
  274. package/dist/patterns.d.cts +5 -1
  275. package/dist/patterns.d.ts +5 -1
  276. package/dist/patterns.js +3 -4
  277. package/dist/percentage-bar-BChkTRoz.cjs +164 -0
  278. package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
  279. package/dist/percentage-bar-CaInxrL8.js +159 -0
  280. package/dist/percentage-bar-CaInxrL8.js.map +1 -0
  281. package/dist/percentage-bar-R1--2grK.d.cts +58 -0
  282. package/dist/percentage-bar-cSeiLdwU.d.ts +58 -0
  283. package/dist/percentage-bar.cjs +3 -0
  284. package/dist/percentage-bar.d.cts +3 -0
  285. package/dist/percentage-bar.d.ts +3 -0
  286. package/dist/percentage-bar.js +1 -0
  287. package/dist/{pie-BF9yI5mE.d.cts → pie-BQQkvy1N.d.ts} +11 -11
  288. package/dist/{pie-DzUXDTcn.js → pie-Bd8wyrtY.js} +52 -55
  289. package/dist/pie-Bd8wyrtY.js.map +1 -0
  290. package/dist/{pie-BxTZt6Go.cjs → pie-BseZlCgP.cjs} +52 -55
  291. package/dist/pie-BseZlCgP.cjs.map +1 -0
  292. package/dist/{pie-5z1fDdKO.d.ts → pie-vD5-g8je.d.cts} +11 -11
  293. package/dist/pie.cjs +1 -1
  294. package/dist/pie.d.cts +2 -1
  295. package/dist/pie.d.ts +2 -1
  296. package/dist/pie.js +1 -2
  297. package/dist/{point-shapes-CGl4dugc.cjs → point-shapes-BRawRM78.cjs} +24 -24
  298. package/dist/point-shapes-BRawRM78.cjs.map +1 -0
  299. package/dist/{point-shapes-DI84NNpI.js → point-shapes-DI6GhcI7.js} +19 -25
  300. package/dist/point-shapes-DI6GhcI7.js.map +1 -0
  301. package/dist/point-shapes.cjs +7 -6
  302. package/dist/point-shapes.cjs.map +1 -1
  303. package/dist/point-shapes.d.cts +6 -2
  304. package/dist/point-shapes.d.ts +6 -2
  305. package/dist/point-shapes.js +8 -7
  306. package/dist/point-shapes.js.map +1 -1
  307. package/dist/{radar-1-EryihA.d.ts → radar-7I6hsY_h.d.cts} +4 -7
  308. package/dist/{radar-CYPab_I4.js → radar-D6XqkFWQ.js} +25 -27
  309. package/dist/radar-D6XqkFWQ.js.map +1 -0
  310. package/dist/{radar-CoGUNNSb.cjs → radar-DjISDnSf.cjs} +26 -28
  311. package/dist/radar-DjISDnSf.cjs.map +1 -0
  312. package/dist/{radar-DBW4O0Vt.d.cts → radar-vLxilcr4.d.ts} +4 -7
  313. package/dist/radar.cjs +1 -1
  314. package/dist/radar.d.cts +2 -1
  315. package/dist/radar.d.ts +2 -1
  316. package/dist/radar.js +1 -2
  317. package/dist/rect-CZTNvMlf.js +11 -0
  318. package/dist/rect-CZTNvMlf.js.map +1 -0
  319. package/dist/rect-DPr9QRxl.cjs +16 -0
  320. package/dist/rect-DPr9QRxl.cjs.map +1 -0
  321. package/dist/{sankey-Bacx4fVe.cjs → sankey-0CSp_Er9.cjs} +100 -95
  322. package/dist/sankey-0CSp_Er9.cjs.map +1 -0
  323. package/dist/{sankey-OV_WoPrl.d.ts → sankey-7As41Fo4.d.ts} +4 -7
  324. package/dist/{sankey-B4PNKusJ.js → sankey-Dp4CuLVe.js} +100 -95
  325. package/dist/sankey-Dp4CuLVe.js.map +1 -0
  326. package/dist/{sankey-DuGI3Qc5.d.cts → sankey-DqiuxUx7.d.cts} +4 -7
  327. package/dist/sankey.cjs +1 -1
  328. package/dist/sankey.d.cts +2 -1
  329. package/dist/sankey.d.ts +2 -1
  330. package/dist/sankey.js +1 -2
  331. package/dist/{scatter-DbxLyZX0.d.cts → scatter-BXkXGgM_.d.ts} +14 -9
  332. package/dist/{scatter-DgMN9zRy.cjs → scatter-Bwkblr4L.cjs} +47 -42
  333. package/dist/scatter-Bwkblr4L.cjs.map +1 -0
  334. package/dist/{scatter-kgtgR318.js → scatter-DCMAtt5L.js} +45 -40
  335. package/dist/scatter-DCMAtt5L.js.map +1 -0
  336. package/dist/{scatter-BqzgJqdX.d.ts → scatter-DL0zAV09.d.cts} +14 -9
  337. package/dist/scatter.cjs +1 -1
  338. package/dist/scatter.d.cts +2 -1
  339. package/dist/scatter.d.ts +2 -1
  340. package/dist/scatter.js +1 -2
  341. package/dist/{sparkline-BfyO_oNM.d.ts → sparkline-BElUSd0r.d.ts} +5 -8
  342. package/dist/{sparkline-BS9-hltA.cjs → sparkline-BMSuEPHP.cjs} +22 -23
  343. package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
  344. package/dist/{sparkline-BQzt27Fr.js → sparkline-NDmq90kP.js} +22 -23
  345. package/dist/sparkline-NDmq90kP.js.map +1 -0
  346. package/dist/{sparkline-CWlJDKyh.d.cts → sparkline-RYly7bR0.d.cts} +5 -8
  347. package/dist/sparkline.cjs +1 -1
  348. package/dist/sparkline.d.cts +2 -1
  349. package/dist/sparkline.d.ts +2 -1
  350. package/dist/sparkline.js +1 -2
  351. package/dist/{stack-DVhJWaki.cjs → stack-BO4624CY.cjs} +3 -4
  352. package/dist/{stack-DVhJWaki.cjs.map → stack-BO4624CY.cjs.map} +1 -1
  353. package/dist/{stack-CpR6RGKd.d.ts → stack-BTWYIwLO.d.cts} +2 -4
  354. package/dist/{stack-CpR6RGKd.d.cts → stack-DR0eQTsB.d.ts} +1 -4
  355. package/dist/{stack-DRbwTeF3.js → stack-jVKvg2x_.js} +3 -4
  356. package/dist/{stack-DRbwTeF3.js.map → stack-jVKvg2x_.js.map} +1 -1
  357. package/dist/style.css +1 -1
  358. package/dist/{sweep-CbfR7--d.js → sweep-BpRPlhs6.js} +5 -6
  359. package/dist/{sweep-CbfR7--d.js.map → sweep-BpRPlhs6.js.map} +1 -1
  360. package/dist/{sweep-DaTEDDuC.cjs → sweep-Dnp6LDBz.cjs} +5 -6
  361. package/dist/sweep-Dnp6LDBz.cjs.map +1 -0
  362. package/dist/{time-CNVnt-B2.d.cts → time-B4oxWHQI.d.cts} +2 -7
  363. package/dist/{time-CHjiY9Q4.d.ts → time-DRIDgv2a.d.ts} +2 -7
  364. package/dist/{time-axis-VSX34_Tb.cjs → time-axis-B3VekUfX.cjs} +11 -11
  365. package/dist/{time-axis-VSX34_Tb.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
  366. package/dist/{time-axis-Bc9eHX1r.js → time-axis-CLjqOakA.js} +10 -10
  367. package/dist/{time-axis-Bc9eHX1r.js.map → time-axis-CLjqOakA.js.map} +1 -1
  368. package/dist/time.cjs +4 -6
  369. package/dist/time.cjs.map +1 -1
  370. package/dist/time.d.cts +1 -1
  371. package/dist/time.d.ts +1 -1
  372. package/dist/time.js +4 -5
  373. package/dist/treemap-25vHO_UK.d.cts +65 -0
  374. package/dist/treemap-BCXUbixd.d.ts +65 -0
  375. package/dist/treemap-C4glsx-g.js +293 -0
  376. package/dist/treemap-C4glsx-g.js.map +1 -0
  377. package/dist/treemap-CZk8kKFD.cjs +298 -0
  378. package/dist/treemap-CZk8kKFD.cjs.map +1 -0
  379. package/dist/treemap.cjs +3 -0
  380. package/dist/treemap.d.cts +3 -0
  381. package/dist/treemap.d.ts +3 -0
  382. package/dist/treemap.js +1 -0
  383. package/dist/{tween-BCYd0RTY.js → tween-BdQqUmmv.js} +2 -3
  384. package/dist/{tween-BCYd0RTY.js.map → tween-BdQqUmmv.js.map} +1 -1
  385. package/dist/{tween-CIGBlryn.cjs → tween-c3aOmfKE.cjs} +2 -3
  386. package/dist/{tween-CIGBlryn.cjs.map → tween-c3aOmfKE.cjs.map} +1 -1
  387. package/dist/{value-labels-IZIQPhfk.js → value-labels-C7GrhOXJ.js} +30 -10
  388. package/dist/value-labels-C7GrhOXJ.js.map +1 -0
  389. package/dist/{value-labels-B0WJoJ7x.cjs → value-labels-DzaKIWKp.cjs} +30 -10
  390. package/dist/value-labels-DzaKIWKp.cjs.map +1 -0
  391. package/dist/value-labels.cjs +3 -5
  392. package/dist/value-labels.cjs.map +1 -1
  393. package/dist/value-labels.d.cts +5 -1
  394. package/dist/value-labels.d.ts +5 -1
  395. package/dist/value-labels.js +3 -4
  396. package/dist/{vnode-CkQ27Cxe.cjs → vnode-ClAiw28x.cjs} +2 -3
  397. package/dist/{vnode-CkQ27Cxe.cjs.map → vnode-ClAiw28x.cjs.map} +1 -1
  398. package/dist/{vnode-BUflsBsa.d.ts → vnode-Du2cC8Fm.d.cts} +1 -4
  399. package/dist/{vnode-BUflsBsa.d.cts → vnode-Du2cC8Fm.d.ts} +1 -4
  400. package/dist/{vnode-tCWItoUH.js → vnode-_EMUqysL.js} +2 -3
  401. package/dist/{vnode-tCWItoUH.js.map → vnode-_EMUqysL.js.map} +1 -1
  402. package/package.json +94 -214
  403. package/dist/bar-C-7zR2qp.cjs.map +0 -1
  404. package/dist/bar-jZEoao74.js.map +0 -1
  405. package/dist/cartesian-BoDfgBCV.cjs.map +0 -1
  406. package/dist/cartesian-Cr0AF0nG.js.map +0 -1
  407. package/dist/chart-BF2CK9I_.js.map +0 -1
  408. package/dist/chart-CowF_lWY.cjs.map +0 -1
  409. package/dist/core-CegR_j55.js.map +0 -1
  410. package/dist/core-RzS9IQO5.cjs.map +0 -1
  411. package/dist/dom-CLF868Qs.cjs.map +0 -1
  412. package/dist/dom-vP3IcMak.js.map +0 -1
  413. package/dist/export-chart-9w8t3rjZ.js.map +0 -1
  414. package/dist/export-chart-BhhYgksr.cjs.map +0 -1
  415. package/dist/fade-Cs74puQS.cjs.map +0 -1
  416. package/dist/fade-D3NxH5Qg.js.map +0 -1
  417. package/dist/features-BclHgg2W.cjs.map +0 -1
  418. package/dist/features-wASyHGic.js.map +0 -1
  419. package/dist/gauge-D-FYhuds.cjs.map +0 -1
  420. package/dist/gauge-Dh423FHh.js.map +0 -1
  421. package/dist/heatmap-BK18EBgJ.cjs.map +0 -1
  422. package/dist/heatmap-DSZ2bVIa.js.map +0 -1
  423. package/dist/hydrate-CxwTXDqO.cjs.map +0 -1
  424. package/dist/layout-B3hiqVEw.js.map +0 -1
  425. package/dist/layout-CtMBhNd9.cjs.map +0 -1
  426. package/dist/line-B3Ed6u7j.js.map +0 -1
  427. package/dist/line-fQbtP_jL.cjs.map +0 -1
  428. package/dist/morph-CqYDu1bY.cjs.map +0 -1
  429. package/dist/parliament-CpWnoEvG.cjs.map +0 -1
  430. package/dist/parliament-Dw0sOERi.js.map +0 -1
  431. package/dist/pie-BxTZt6Go.cjs.map +0 -1
  432. package/dist/pie-DzUXDTcn.js.map +0 -1
  433. package/dist/point-shapes-CGl4dugc.cjs.map +0 -1
  434. package/dist/point-shapes-DI84NNpI.js.map +0 -1
  435. package/dist/radar-CYPab_I4.js.map +0 -1
  436. package/dist/radar-CoGUNNSb.cjs.map +0 -1
  437. package/dist/sankey-B4PNKusJ.js.map +0 -1
  438. package/dist/sankey-Bacx4fVe.cjs.map +0 -1
  439. package/dist/scatter-DgMN9zRy.cjs.map +0 -1
  440. package/dist/scatter-kgtgR318.js.map +0 -1
  441. package/dist/sparkline-BQzt27Fr.js.map +0 -1
  442. package/dist/sparkline-BS9-hltA.cjs.map +0 -1
  443. package/dist/sweep-DaTEDDuC.cjs.map +0 -1
  444. package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
  445. package/dist/value-labels-IZIQPhfk.js.map +0 -1
@@ -1,11 +1,12 @@
1
- const require_layout = require("./layout-CtMBhNd9.cjs");
2
- const require_vnode = require("./vnode-CkQ27Cxe.cjs");
3
- const require_format = require("./format-B0yKXBTH.cjs");
4
- const require_cartesian = require("./cartesian-BoDfgBCV.cjs");
5
- const require_features = require("./features-BclHgg2W.cjs");
6
- const require_chart = require("./chart-CowF_lWY.cjs");
7
- const require_dom = require("./dom-CLF868Qs.cjs");
8
- //#region src/plugins/download.ts
1
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
2
+ const require_chart = require("./chart-D_lyOy-M.cjs");
3
+ const require_cartesian = require("./cartesian-DRSXHxWe.cjs");
4
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
5
+ const require_features = require("./features-DEDP5CEQ.cjs");
6
+ const require_format = require("./format-CAE5ruy6.cjs");
7
+ const require_dom = require("./dom-C33zvtPo.cjs");
8
+ const require_interaction = require("./interaction-DXYSjgnP.cjs");
9
+ // src/plugins/download.ts
9
10
  const NAMES = {
10
11
  png: "PNG",
11
12
  svg: "SVG",
@@ -133,6 +134,7 @@ function download() {
133
134
  class: "tc-download-item",
134
135
  "data-format": format
135
136
  }, NAMES[format] ?? format)))));
137
+ el.dir = chart.rtl ? "rtl" : "";
136
138
  host.classList.add("tc-container");
137
139
  if (!el.isConnected) host.appendChild(el);
138
140
  },
@@ -141,8 +143,7 @@ function download() {
141
143
  }
142
144
  };
143
145
  }
144
- //#endregion
145
- //#region src/components/hover.ts
146
+ // src/components/hover.ts
146
147
  /** Series wrapper so hover marks pick up the series color from CSS. */
147
148
  function seriesGroup(seriesIndex, color, child) {
148
149
  return require_vnode.h("g", {
@@ -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, require_vnode.h("path", {
159
+ class: "tc-hover-mark",
160
+ d: mark.d,
161
+ style: `transform:translate(${require_layout.round(mark.x ?? 0)}px,${require_layout.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 && require_vnode.h("line", {
172
+ class: "tc-crosshair",
173
+ x1: require_layout.round(x1),
174
+ x2: require_layout.round(x2),
175
+ y1: require_layout.round(y1),
176
+ y2: require_layout.round(y2)
177
+ });
160
178
  return require_vnode.h("g", {
161
179
  class: "tc-hover",
162
180
  "aria-hidden": "true"
163
- }, hit.mark ? null : hit.band ? require_vnode.h("rect", {
181
+ }, mark.kind === "halo" ? mark.under && halo(hit, mark) : mark.kind === "band" ? require_vnode.h("rect", {
164
182
  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
- }));
183
+ x: require_layout.round(mark.x),
184
+ y: require_layout.round(mark.y),
185
+ width: require_layout.round(mark.width),
186
+ height: require_layout.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 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
- }
194
+ const mark = hit.highlight;
200
195
  return require_vnode.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 ? require_vnode.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 ? require_vnode.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
  }) : require_vnode.h("circle", {
@@ -210,8 +205,7 @@ function hoverOverlay(hit, radius = 4, shape) {
210
205
  r: radius
211
206
  }))));
212
207
  }
213
- //#endregion
214
- //#region src/plugins/pointer.ts
208
+ // src/plugins/pointer.ts
215
209
  const listening = /* @__PURE__ */ new WeakSet();
216
210
  /**
217
211
  * Turn pointer input on the chart's element into highlights and `hover` /
@@ -226,9 +220,9 @@ function listenPointer(chart) {
226
220
  const svg = el.querySelector("svg.tc-chart");
227
221
  if (!svg) return void 0;
228
222
  const { width, height } = chart.size;
229
- return require_chart.toChartPoint(svg, event.clientX, event.clientY, width, height);
223
+ return require_interaction.toChartPoint(svg, event.clientX, event.clientY, width, height);
230
224
  };
231
- const overControl = (event) => !!event.target?.closest?.(".tc-download");
225
+ const overControl = (event) => !!event.target?.closest?.(".tc-download,.tc-map-zoom");
232
226
  const onLeave = (event) => {
233
227
  if (event.pointerType !== "touch" && chart.highlightSource === "pointer") chart.clearHighlight(event);
234
228
  };
@@ -275,8 +269,7 @@ function pointer() {
275
269
  }
276
270
  };
277
271
  }
278
- //#endregion
279
- //#region src/plugins/highlight.ts
272
+ // src/plugins/highlight.ts
280
273
  /**
281
274
  * Draws the highlighted category: a crosshair (or a band behind bars) under
282
275
  * the series and active dots above them. `crosshair: false` keeps the dots.
@@ -296,8 +289,7 @@ function highlight() {
296
289
  }
297
290
  };
298
291
  }
299
- //#endregion
300
- //#region src/a11y.ts
292
+ // src/a11y.ts
301
293
  /**
302
294
  * An HTML table of the chart data, for screen readers (visually hidden by
303
295
  * default) or as a visible fallback. Every cell is text, escaped by the renderer.
@@ -314,8 +306,7 @@ function describeHit(hit) {
314
306
  const values = (hit.seriesIndex === void 0 ? hit.items : hit.items.filter((item) => item.seriesIndex === hit.seriesIndex)).map((item) => `${item.name} ${item.text}`).join(", ");
315
307
  return hit.title ? `${hit.title}: ${values}` : values;
316
308
  }
317
- //#endregion
318
- //#region src/plugins/keyboard.ts
309
+ // src/plugins/keyboard.ts
319
310
  /**
320
311
  * Keyboard navigation: the SVG becomes focusable; arrow keys walk
321
312
  * categories, Up/Down walk series, Home/End jump, Escape (or leaving)
@@ -355,6 +346,12 @@ function keyboard() {
355
346
  const handle = (key) => {
356
347
  const interaction = chart.interaction;
357
348
  if (!interaction || interaction.count === 0) return false;
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
+ }
358
355
  const current = chart.highlightSource === "index" ? chart.active : null;
359
356
  const last = interaction.count - 1;
360
357
  const index = current?.index;
@@ -363,10 +360,10 @@ function keyboard() {
363
360
  const at = focused === void 0 ? -1 : series.indexOf(focused);
364
361
  switch (key) {
365
362
  case "ArrowRight":
366
- go(index === void 0 ? 0 : Math.min(last, index + 1), focused);
363
+ go(index === void 0 ? 0 : Math.min(last, index + column), focused);
367
364
  return true;
368
365
  case "ArrowLeft":
369
- go(index === void 0 ? last : Math.max(0, index - 1), focused);
366
+ go(index === void 0 ? last : Math.max(0, index - column), focused);
370
367
  return true;
371
368
  case "Home":
372
369
  go(0, focused);
@@ -419,10 +416,23 @@ function keyboard() {
419
416
  }
420
417
  };
421
418
  }
422
- //#endregion
423
- //#region src/plugins/legend.ts
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";
424
434
  /**
425
- * 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.
426
436
  * Shown for two or more entries unless the `legend` option says otherwise.
427
437
  */
428
438
  function legend() {
@@ -444,19 +454,37 @@ function legend() {
444
454
  bound = false;
445
455
  el.remove();
446
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";
447
464
  };
448
465
  /** Keep the legend right before or after the SVG, whatever else lives in the container. */
449
466
  const place = () => {
450
467
  if (!el) return;
451
468
  const svg = host.querySelector(":scope > svg.tc-chart");
452
- if (el.dataset.position === "bottom") {
469
+ if (after) {
453
470
  if (!svg) {
454
471
  if (!el.isConnected) host.appendChild(el);
455
472
  } else if (svg.nextElementSibling !== el) svg.after(el);
456
473
  } else if (!el.isConnected || el.nextElementSibling !== svg) host.insertBefore(el, svg ?? host.firstChild);
457
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;
458
486
  return {
459
- beforeRender({ legend, hidden }) {
487
+ beforeRender({ config, legend, hidden }) {
460
488
  if (!legend.show || typeof document === "undefined") {
461
489
  remove();
462
490
  return;
@@ -469,24 +497,29 @@ function legend() {
469
497
  el.addEventListener("click", onClick);
470
498
  bound = true;
471
499
  }
472
- el.dataset.position = legend.position;
473
- require_dom.render(el, require_chart.legendContent(legend.items, hidden), adopt);
500
+ el.dir = chart.rtl ? "rtl" : "";
501
+ require_dom.render(el, require_chart.legendContent(legend.items, hidden, require_features.swatchShape(config)), adopt);
474
502
  adopt = null;
475
- 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");
476
507
  },
477
508
  reservedHeight() {
478
- if (!el?.isConnected) return 0;
509
+ if (!el?.isConnected || side()) return 0;
479
510
  const { marginTop, marginBottom } = getComputedStyle(el);
480
511
  return el.offsetHeight + (Number.parseFloat(marginTop) || 0) + (Number.parseFloat(marginBottom) || 0);
481
512
  },
513
+ reservedWidth() {
514
+ return el?.isConnected && side() ? el.offsetWidth + gap() : 0;
515
+ },
482
516
  afterRender: place,
483
517
  destroy: remove
484
518
  };
485
519
  }
486
520
  };
487
521
  }
488
- //#endregion
489
- //#region src/plugins/sync.ts
522
+ // src/plugins/sync.ts
490
523
  /** Charts by `sync` group, held weakly: a chart taken out without destroy() is let go. */
491
524
  const groups = /* @__PURE__ */ new Map();
492
525
  /** The index of each category label, per render of a chart. */
@@ -565,8 +598,7 @@ function sync() {
565
598
  }
566
599
  };
567
600
  }
568
- //#endregion
569
- //#region src/idle.ts
601
+ // src/idle.ts
570
602
  /**
571
603
  * Work that can wait until the browser is idle, such as hidden data tables:
572
604
  * it runs in an idle callback (within a second at the latest), or with
@@ -600,8 +632,7 @@ function scheduleIdle(key, task) {
600
632
  function cancelIdle(key) {
601
633
  idle.delete(key);
602
634
  }
603
- //#endregion
604
- //#region src/plugins/table.ts
635
+ // src/plugins/table.ts
605
636
  /**
606
637
  * The chart data as an HTML table next to the SVG: visually hidden for
607
638
  * screen readers by default, visible with `table: 'visible'`.
@@ -624,10 +655,14 @@ function dataTable() {
624
655
  el.remove();
625
656
  el = void 0;
626
657
  };
627
- const update = (config, size, hidden) => {
658
+ const update = (config, hidden) => {
628
659
  const option = config.table ?? true;
629
660
  const maxRows = typeof option === "object" && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS;
630
- const table = option !== false && typeof document !== "undefined" ? config.type.table?.(config, require_chart.renderContext(config, size, chart.id, () => {}, hidden, chart.fontSize), maxRows) : void 0;
661
+ const table = option !== false && typeof document !== "undefined" ? config.type.table?.(require_chart.chartModel(config), {
662
+ locale: config.locale,
663
+ hidden,
664
+ rtl: chart.rtl
665
+ }, maxRows) : void 0;
631
666
  if (!table) {
632
667
  remove();
633
668
  return;
@@ -649,20 +684,20 @@ function dataTable() {
649
684
  require_dom.render(el, tableContent(rows, caption), adopt);
650
685
  adopt = null;
651
686
  const svg = host.querySelector(":scope > svg.tc-chart");
652
- const after = host.querySelector(":scope > .tc-legend[data-position=\"bottom\"]") ?? svg;
687
+ const after = host.querySelector(":scope > svg.tc-chart + .tc-legend") ?? svg;
653
688
  if (after && after.nextElementSibling !== el) after.after(el);
654
689
  else if (!el.isConnected) host.appendChild(el);
655
690
  };
656
691
  return {
657
- afterRender({ config, size, hidden, changed }) {
692
+ afterRender({ config, hidden, changed }) {
658
693
  if (!changed && el?.isConnected) return;
659
694
  const option = config.table ?? true;
660
695
  const same = shown === option;
661
696
  shown = option;
662
- 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));
663
698
  else {
664
699
  cancelIdle(key);
665
- update(config, size, hidden);
700
+ update(config, hidden);
666
701
  }
667
702
  },
668
703
  destroy: remove
@@ -670,8 +705,7 @@ function dataTable() {
670
705
  }
671
706
  };
672
707
  }
673
- //#endregion
674
- //#region src/tooltip.ts
708
+ // src/tooltip.ts
675
709
  /**
676
710
  * Where a tooltip for `hit` belongs, in chart pixels: the pointer when it
677
711
  * drives the highlight, otherwise the focused value (keyboard).
@@ -679,7 +713,7 @@ function dataTable() {
679
713
  function hitAnchor(hit, pointer) {
680
714
  if (pointer) return pointer;
681
715
  const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
682
- if (hit.guide && item?.y != null) return {
716
+ if (hit.highlight?.kind === "spoke" && item?.y != null) return {
683
717
  x: item.x,
684
718
  y: item.y
685
719
  };
@@ -692,8 +726,11 @@ function hitAnchor(hit, pointer) {
692
726
  y: item?.y ?? hit.area.y + hit.area.height / 2
693
727
  };
694
728
  }
695
- /** Default tooltip content: the category title and one row per series. */
696
- 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) {
697
734
  const body = options.format ? options.format(hit) : [
698
735
  hit.title && require_vnode.h("div", { class: "tc-tooltip-title" }, hit.title),
699
736
  hit.items.map((item) => require_vnode.h("div", {
@@ -704,7 +741,10 @@ function tooltipContent(hit, options = {}) {
704
741
  `tc-series-${item.seriesIndex + 1}`,
705
742
  hit.seriesIndex === item.seriesIndex && "tc-tooltip-item-active"
706
743
  ],
707
- style: { "--tc-series-color": item.color }
744
+ style: {
745
+ "--tc-series-color": item.color,
746
+ ...shape?.(item.seriesIndex)
747
+ }
708
748
  }, 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))),
709
749
  options.footer && require_vnode.h("div", { class: "tc-tooltip-footer" }, options.footer(hit))
710
750
  ];
@@ -713,13 +753,14 @@ function tooltipContent(hit, options = {}) {
713
753
  /**
714
754
  * Place a `width × height` tooltip next to an anchor within `bounds` (from
715
755
  * `bounds.x`, `bounds.y`, 0 by default): right of the anchor, or left when it
716
- * would overflow, vertically centered on the pointer and clamped.
756
+ * would overflow (the other way round with `rtl`), vertically centered on the
757
+ * pointer and clamped.
717
758
  */
718
- function placeTooltip(anchor, size, bounds, offset = 12) {
759
+ function placeTooltip(anchor, size, bounds, offset = 12, rtl = false) {
719
760
  const { x: left = 0, y: top = 0 } = bounds;
720
761
  const fitsRight = anchor.x + offset + size.width <= left + bounds.width;
721
762
  const fitsLeft = anchor.x - offset - size.width >= left;
722
- const side = fitsRight || !fitsLeft ? "right" : "left";
763
+ const side = (rtl ? fitsLeft || !fitsRight : fitsLeft && !fitsRight) ? "left" : "right";
723
764
  const rawX = side === "right" ? anchor.x + offset : anchor.x - offset - size.width;
724
765
  const x = Math.max(left, Math.min(rawX, left + bounds.width - size.width));
725
766
  const y = Math.max(top, Math.min(anchor.y - size.height / 2, top + bounds.height - size.height));
@@ -729,8 +770,7 @@ function placeTooltip(anchor, size, bounds, offset = 12) {
729
770
  side
730
771
  };
731
772
  }
732
- //#endregion
733
- //#region src/plugins/tooltip.ts
773
+ // src/plugins/tooltip.ts
734
774
  /**
735
775
  * Where a tooltip in `el` can show without being cut off: the box of the
736
776
  * nearest element that clips its overflow (`el` itself, an ancestor, across
@@ -805,7 +845,9 @@ function tooltip() {
805
845
  }
806
846
  const options = typeof option === "object" ? option : void 0;
807
847
  tip.classList.toggle("tc-tooltip-light", options?.theme === "light");
808
- require_dom.render(tip, tooltipContent(hit, options));
848
+ const { rtl } = chart;
849
+ tip.dir = rtl ? "rtl" : "";
850
+ require_dom.render(tip, tooltipContent(hit, options, require_features.swatchShape(chart.config)));
809
851
  const shown = tip;
810
852
  const turn = ++turns;
811
853
  waiting.push(() => {
@@ -821,7 +863,7 @@ function tooltip() {
821
863
  x: (rect.left - box.left) / k - el.clientLeft,
822
864
  y: (rect.top - box.top) / k - el.clientTop
823
865
  };
824
- 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;
825
867
  const ay = hit.axis === "y" ? hit.y ?? anchor.y : anchor.y;
826
868
  const clip = room(el);
827
869
  const place = placeTooltip({
@@ -835,7 +877,7 @@ function tooltip() {
835
877
  y: (clip.top - box.top) / k - el.clientTop,
836
878
  width: (clip.right - clip.left) / k,
837
879
  height: (clip.bottom - clip.top) / k
838
- });
880
+ }, 12, rtl);
839
881
  return () => {
840
882
  shown.style.transform = `translate(${place.x}px, ${place.y}px)`;
841
883
  shown.dataset.side = place.side;
@@ -860,8 +902,7 @@ function tooltip() {
860
902
  }
861
903
  };
862
904
  }
863
- //#endregion
864
- //#region src/plugins/index.ts
905
+ // src/plugins/index.ts
865
906
  /** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */
866
907
  function defaultPlugins() {
867
908
  return [
@@ -874,11 +915,9 @@ function defaultPlugins() {
874
915
  download()
875
916
  ];
876
917
  }
877
- //#endregion
878
- //#region src/core.ts
918
+ // src/core.ts
879
919
  /** Version of the `@tabler/charts` package. */
880
- const VERSION = "0.1.0";
881
- //#endregion
920
+ const VERSION = "0.3.0";
882
921
  Object.defineProperty(exports, "VERSION", {
883
922
  enumerable: true,
884
923
  get: function() {
@@ -982,4 +1021,4 @@ Object.defineProperty(exports, "tooltipContent", {
982
1021
  }
983
1022
  });
984
1023
 
985
- //# sourceMappingURL=core-RzS9IQO5.cjs.map
1024
+ //# sourceMappingURL=core-D2PSked3.cjs.map