@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
@@ -39,37 +39,46 @@ interface Hit {
39
39
  axis?: "x" | "y";
40
40
  /** Center of the category along y, when categories run along y. */
41
41
  y?: number;
42
- /** The category's band in chart pixels, for band scales (bars). */
43
- band?: {
44
- x: number;
45
- y: number;
46
- width: number;
47
- height: number;
48
- };
49
42
  /** Every series' value at this category. */
50
43
  items: HitItem[];
51
44
  /** Series of the mark directly under the pointer (e.g. a bar), if any. */
52
45
  seriesIndex?: number;
53
- /**
54
- * The crosshair segment, when it is not vertical across the plot (a radar
55
- * spoke). Tooltips from the keyboard then anchor on the value itself.
56
- */
57
- guide?: {
58
- x1: number;
59
- y1: number;
60
- x2: number;
61
- y2: number;
62
- };
63
- /**
64
- * A shape to highlight instead of a crosshair or band (e.g. a halo around a
65
- * pie slice): path data `d`, drawn translated by `x` / `y`.
66
- */
67
- mark?: {
68
- d: string;
69
- x: number;
70
- y: number;
71
- };
46
+ /** The shape that marks the hit; a crosshair when left out. */
47
+ highlight?: Highlight;
72
48
  }
49
+ /**
50
+ * The one shape drawn to mark a hit, in chart pixels:
51
+ *
52
+ * - `crosshair`: a vertical line through the category across the plot, and
53
+ * a dot on every value (point charts);
54
+ * - `band`: the category's band behind the series (bars);
55
+ * - `spoke`: a line from `x1, y1` to `x2, y2` (a radar spoke), and a dot on
56
+ * every value; keyboard tooltips anchor on the value itself;
57
+ * - `halo`: path data `d` drawn translated by `x` / `y` in the color of the
58
+ * hit's series (a ring around a pie slice); `under` draws it below the
59
+ * chart instead of above, so it never covers the labels.
60
+ */
61
+ type Highlight = {
62
+ kind: "crosshair";
63
+ } | {
64
+ kind: "band";
65
+ x: number;
66
+ y: number;
67
+ width: number;
68
+ height: number;
69
+ } | {
70
+ kind: "spoke";
71
+ x1: number;
72
+ y1: number;
73
+ x2: number;
74
+ y2: number;
75
+ } | {
76
+ kind: "halo";
77
+ d: string;
78
+ x?: number;
79
+ y?: number;
80
+ under?: boolean;
81
+ };
73
82
  /** Maps a point in chart pixels to what lies there. */
74
83
  type HitTester = (x: number, y: number) => Hit | null;
75
84
  /** How a rendered chart answers pointer and keyboard interaction. */
@@ -80,6 +89,11 @@ interface Interaction {
80
89
  hitIndex(index: number, seriesIndex?: number): Hit | null;
81
90
  /** Number of categories. */
82
91
  count: number;
92
+ /**
93
+ * Categories fill a grid column by column, this many to a column (the days
94
+ * of a calendar in weeks): left and right move by a column, up and down by one.
95
+ */
96
+ rows?: number;
83
97
  /** Categories run from the right: the left arrow key goes to the next one. */
84
98
  reversed?: boolean;
85
99
  }
@@ -174,10 +188,23 @@ interface Series {
174
188
  * (`@tabler/charts/line`, or `@tabler/charts`). Defaults to `'bar'`.
175
189
  */
176
190
  type?: "bar" | "line" | "area";
191
+ /**
192
+ * Value axis of the series: `'y2'` draws it against the second axis
193
+ * (options in `y2`), on the right of the plot (on the left in a
194
+ * right-to-left chart), and leaves it out of stacks. Line, area and
195
+ * vertical bar charts. Defaults to `'y'`.
196
+ */
197
+ axis?: "y" | "y2";
177
198
  /** Extra classes on the series group. */
178
199
  class?: ClassValue;
179
200
  /** Start hidden (toggle it back from the legend). */
180
201
  hidden?: boolean;
202
+ /**
203
+ * Write values on this series' marks, whatever the chart's `valueLabels`
204
+ * says: `true` labels it even when the chart option is off, `false` leaves
205
+ * it out. Needs `@tabler/charts/value-labels` on the core.
206
+ */
207
+ valueLabels?: boolean;
181
208
  }
182
209
  interface CartesianData {
183
210
  /** Categories along x. Defaults to `1…n` for the longest series. */
@@ -188,6 +215,11 @@ interface CartesianData {
188
215
  interface ValueAxisOptions {
189
216
  /** Render the axis labels. Defaults to `true`. */
190
217
  show?: boolean;
218
+ /**
219
+ * Title of the axis (e.g. a unit), beside its labels: turned 90° on the
220
+ * left of the plot, or on the right in a right-to-left chart.
221
+ */
222
+ title?: string;
191
223
  /** Render horizontal grid lines. Defaults to `true`. */
192
224
  grid?: boolean;
193
225
  /** Fixed lower bound; overrides data and `zero`. */
@@ -208,6 +240,8 @@ interface ValueAxisOptions {
208
240
  interface CategoryAxisOptions {
209
241
  /** Render the axis labels. Defaults to `true`. */
210
242
  show?: boolean;
243
+ /** Title of the axis, below its labels. */
244
+ title?: string;
211
245
  /** Render vertical grid lines. Defaults to `false`. */
212
246
  grid?: boolean;
213
247
  /** Draw the axis line along the bottom edge. Defaults to `false`. */
@@ -229,6 +263,12 @@ interface CategoryAxisOptions {
229
263
  interface CartesianOptions {
230
264
  data: CartesianData;
231
265
  y?: ValueAxisOptions;
266
+ /**
267
+ * The second value axis, for series with `axis: 'y2'` (it is drawn only
268
+ * when a series uses it). Its labels and title stand on the other side of
269
+ * the plot; the grid lines follow `y`.
270
+ */
271
+ y2?: ValueAxisOptions;
232
272
  x?: CategoryAxisOptions;
233
273
  /** Reference lines and bands: targets, normal ranges, events and periods. */
234
274
  annotations?: readonly Annotation[];
@@ -242,10 +282,14 @@ interface CartesianLayout {
242
282
  x: BandScale;
243
283
  /** Value scale (along y, or along x when `horizontal`). */
244
284
  y: LinearScale;
285
+ /** Scale of the second value axis, when a series uses it. */
286
+ y2?: LinearScale;
245
287
  /** Whether categories run along y. */
246
288
  horizontal: boolean;
247
289
  xTicks: Tick[];
248
290
  yTicks: Tick[];
291
+ /** Ticks of the second value axis (with `y2`). */
292
+ y2Ticks?: Tick[];
249
293
  /** Grid lines, drawn below the marks. */
250
294
  background: VNode[];
251
295
  /** Axes, drawn above the marks. */
@@ -286,7 +330,7 @@ declare function categoryInteraction(layout: CartesianLayout, options: Cartesian
286
330
  box?: Rect;
287
331
  }, markAt?: (x: number, y: number, index: number) => number | undefined): Interaction;
288
332
  /** Accessible table of series values: one row per category, one column per visible series. */
289
- declare function seriesTable(options: CartesianOptions, ctx: RenderContext, limit?: number): DataTable;
333
+ declare function seriesTable(options: CartesianOptions, ctx: TableContext, limit?: number): DataTable;
290
334
  /**
291
335
  * Formatter for date labels on a time axis (tooltips, tables, band axes):
292
336
  * the date, with the time of day when the labels span less than a few days.
@@ -309,14 +353,21 @@ interface LegendItem {
309
353
  hidden?: boolean;
310
354
  }
311
355
  interface LegendOptions {
312
- /** Place the legend above or below the chart. Defaults to `'top'`. */
313
- position?: "top" | "bottom";
356
+ /**
357
+ * Where the legend goes: above or below the chart, or beside it (`'left'`,
358
+ * `'right'`, mirrored in a right-to-left chart) with its entries stacked
359
+ * and the chart in the remaining width. `'auto'` puts it on the right when
360
+ * the chart keeps two thirds of the container that way, and below
361
+ * otherwise. Defaults to `'top'`.
362
+ */
363
+ position?: "top" | "bottom" | "left" | "right" | "auto";
314
364
  }
315
365
  /**
316
366
  * Legend content: one toggle button per entry. Buttons are native, so they
317
367
  * are focusable and work with Enter/Space; `aria-pressed` reflects visibility.
368
+ * `shape` gives the swatches the point shapes of their slots.
318
369
  */
319
- declare function legendContent(items: readonly LegendItem[], hidden: ReadonlySet<string>): VNode;
370
+ declare function legendContent(items: readonly LegendItem[], hidden: ReadonlySet<string>, shape?: SwatchShape): VNode;
320
371
  /** Keys hidden by default, from the entries' own `hidden` flags. */
321
372
  declare function defaultHidden(items: readonly LegendItem[]): Set<string>;
322
373
  /** `<pattern>` elements for the legend entries of a chart. */
@@ -332,7 +383,16 @@ declare function patternVars(items: readonly LegendItem[], id: string): Record<s
332
383
  declare function patternFills(config: ChartConfig<object>, id: string): [string, Record<string, string>, VNode] | undefined;
333
384
  /** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */
334
385
  declare function markerPath(slot: number, x: number, y: number, r: number): string;
335
- /** The step that gives the points of charts with `shapes` (or `patterns: true`) their shapes. */
386
+ /**
387
+ * Inline style for the legend or tooltip swatch of slot `slot`: its marker as
388
+ * a CSS shape (`--tc-shape`, a `clip-path`) in a box without rounded corners;
389
+ * `undefined` for the slots that stay a circle.
390
+ */
391
+ declare function markerClip(slot: number): Record<string, string | number> | undefined;
392
+ /**
393
+ * @deprecated Points are drawn in their shapes as the chart renders: this
394
+ * step leaves the content as it is. It will be removed in the next major.
395
+ */
336
396
  declare const shapesStep: PostStep;
337
397
  /**
338
398
  * A time category axis: points at their real distance in time, ticks on
@@ -453,7 +513,7 @@ interface Features {
453
513
  hydrate?: typeof hydrate;
454
514
  /** Path morphing on data updates where CSS cannot transition `d` (Safari). */
455
515
  morph?: typeof morph;
456
- /** Arcs turning to their new angles on data updates (set by pie, donut and gauge). */
516
+ /** Arcs turning to their new angles on data updates (installed by a chart whose type has `sweep`). */
457
517
  sweep?: typeof sweep;
458
518
  /** Line and area paths behind `series.type: 'line' | 'area'` in bar charts. */
459
519
  line?: {
@@ -474,12 +534,19 @@ interface Features {
474
534
  post?: PostStep;
475
535
  /** Point shapes by color slot, behind `shapes`. */
476
536
  "point-shapes"?: typeof markerPath;
537
+ /** The same shapes for legend and tooltip swatches, as CSS shapes. */
538
+ swatch?: typeof markerClip;
477
539
  /** Saving a chart as a file, behind the `download` menu. */
478
540
  export?: typeof downloadChart;
479
541
  }
480
542
  declare const features: Features;
481
543
  /** Register optional features (idempotent). */
482
544
  declare function register(added: Features): void;
545
+ /**
546
+ * Inline style that gives the swatch of a legend or tooltip entry the point
547
+ * shape of its color slot (the stylesheet applies it when points are drawn).
548
+ */
549
+ type SwatchShape = (slot: number) => Record<string, string | number> | undefined;
483
550
  /** A step that finishes rendered chart content, e.g. by adding value labels. */
484
551
  type PostStep = (config: ChartConfig<object>, content: ChildInput, interaction: Interaction | undefined, ctx: RenderContext) => ChildInput;
485
552
  /** The registered feature, or a helpful error naming the import that provides it. */
@@ -514,6 +581,8 @@ interface PluginInstance {
514
581
  beforeRender?(state: BeforeRenderState): void;
515
582
  /** Vertical space the plugin takes from the container in `height: 'container'` mode. */
516
583
  reservedHeight?(): number;
584
+ /** Horizontal space the plugin takes from the container, e.g. a legend beside the chart. */
585
+ reservedWidth?(): number;
517
586
  /** Extra attributes for the root `<svg>`. */
518
587
  svgAttrs?(config: ChartConfig<object>): Props | undefined;
519
588
  /** SVG drawn below (`under`) and above (`over`) the chart content for the active hit. */
@@ -595,8 +664,11 @@ interface TooltipOptions {
595
664
  /** Extra content below the default rows (e.g. a total), in `.tc-tooltip-footer`. */
596
665
  footer?: (hit: Hit) => ChildInput;
597
666
  }
598
- /** Default tooltip content: the category title and one row per series. */
599
- declare function tooltipContent(hit: Hit, options?: TooltipOptions): VNode;
667
+ /**
668
+ * Default tooltip content: the category title and one row per series
669
+ * (`shape` gives their swatches the point shapes of their slots).
670
+ */
671
+ declare function tooltipContent(hit: Hit, options?: TooltipOptions, shape?: SwatchShape): VNode;
600
672
  interface TooltipPlacement {
601
673
  x: number;
602
674
  y: number;
@@ -629,18 +701,32 @@ interface RenderContext {
629
701
  locale: Locale;
630
702
  /** Unique, stable prefix for ids inside this chart. */
631
703
  id: string;
632
- /** Register how pointer and keyboard map to data (ignored in SSR). */
633
- onHitTest(interaction: Interaction): void;
634
704
  /** Keys of legend entries (series) currently hidden. */
635
705
  hidden: ReadonlySet<string>;
636
706
  /** Lay the chart out right to left (the `rtl` option, resolved). */
637
707
  rtl?: boolean;
638
708
  }
709
+ /** What a chart type's `table()` sees: no size, since a table has none. */
710
+ type TableContext = Pick<RenderContext, "locale" | "hidden" | "rtl">;
711
+ /**
712
+ * What a chart type renders for one size: the content of the root `<svg>`,
713
+ * and how pointer and keyboard map to its data (none, when left out).
714
+ */
715
+ interface RenderResult {
716
+ content: ChildInput;
717
+ interaction?: Interaction;
718
+ }
639
719
  /**
640
- * A chart type plugin (`line`, `bar`, …). Receives the chart options and
641
- * returns the content of the root `<svg>`.
720
+ * A chart type plugin (`line`, `bar`, …). Works out its model from the chart
721
+ * options and renders it into the content of the root `<svg>`.
722
+ *
723
+ * `M` is the chart model, what `prepare()` works out from the options alone
724
+ * (the options themselves for a type without `prepare()`): `render()`,
725
+ * `legend()`, `table()` and `height()` all read it, so a type groups or sorts
726
+ * its data once per config, not once for each of them. `ChartType<never>`
727
+ * stands for any chart type.
642
728
  */
643
- interface ChartType<O extends object = object> {
729
+ interface ChartType<O extends object = object, M extends object = [O] extends [never] ? object : O> {
644
730
  readonly name: string;
645
731
  /**
646
732
  * Clean options that may come from outside (data, annotations, axis
@@ -648,14 +734,27 @@ interface ChartType<O extends object = object> {
648
734
  * as the config comes in, before anything reads it.
649
735
  */
650
736
  clean?(options: O): unknown;
651
- render(options: O, context: RenderContext): ChildInput;
737
+ /**
738
+ * The chart model of the (cleaned) options: whatever the legend, the table
739
+ * and every render share. It knows neither the size nor the hidden series
740
+ * (the legend that hides them reads it). Called once per config.
741
+ */
742
+ prepare?(options: O): M;
743
+ /** The chart content for a size: bare content, or with its interaction. */
744
+ render(model: M, context: RenderContext): ChildInput | RenderResult;
745
+ /**
746
+ * Height in pixels at a width, for a type whose proportions are not one
747
+ * ratio (parts of it keep their size as it narrows). Asked when `height`
748
+ * is not set; `undefined` leaves it to `aspectRatio`.
749
+ */
750
+ height?(model: M, width: number): number | undefined;
652
751
  /** Entries for the legend (series, slices); charts without it get no legend. */
653
- legend?(options: O): LegendItem[];
752
+ legend?(model: M): LegendItem[];
654
753
  /**
655
754
  * The data as a text table, for screen readers and the visible table
656
755
  * option. `limit` is the most rows wanted; report the real count in `total`.
657
756
  */
658
- table?(options: O, context: RenderContext, limit: number): DataTable;
757
+ table?(model: M, context: TableContext, limit: number): DataTable;
659
758
  /**
660
759
  * Whether the chart should be focusable and keyboard-navigable by default
661
760
  * (`keyboard` in the config overrides it). Decorative types such as
@@ -669,10 +768,22 @@ interface ChartType<O extends object = object> {
669
768
  * names the number format of the values in the options (by default a label
670
769
  * shows the text of the tooltip).
671
770
  */
771
+ /**
772
+ * How the chart's marks turn to new data in the DOM, where CSS cannot
773
+ * animate them (arcs sweeping to their new angles). A chart in the page
774
+ * installs it; it is part of the type, not of a module that loads, so it
775
+ * ships only with the types that use it.
776
+ */
777
+ readonly sweep?: Features["sweep"];
672
778
  readonly valueLabels?: {
673
779
  marks?: "slice" | "cell";
674
- format?(options: O): NumberFormat | undefined;
780
+ format?(model: M): NumberFormat | undefined;
675
781
  };
782
+ /**
783
+ * Plugins the chart type brings along (the zoom of a map), installed after
784
+ * the default ones when a chart is created with this type.
785
+ */
786
+ readonly plugins?: readonly ChartPlugin[];
676
787
  }
677
788
  /** Options shared by every chart type. */
678
789
  interface BaseOptions {
@@ -698,7 +809,8 @@ interface BaseOptions {
698
809
  * and categories running from the right (`x.reverse` overrides the latter).
699
810
  * `'auto'` follows the `direction` of the container (left to right in SSR).
700
811
  * The legend, the tooltip and the download menu read right to left with it.
701
- * Cartesian charts, heatmaps, sparklines and sankey diagrams. Defaults to `false`.
812
+ * Cartesian charts, heatmaps, sparklines, sankey diagrams and percentage
813
+ * bars. Defaults to `false`.
702
814
  */
703
815
  rtl?: boolean | "auto";
704
816
  /**
@@ -734,8 +846,10 @@ interface BaseOptions {
734
846
  * Write the values on the marks: bars at their end, stacked segments,
735
847
  * cells and slices inside (slices show their share), lines and points
736
848
  * above their last point (`points: 'all'` for every one). Labels that do
737
- * not fit are left out. Needs `@tabler/charts/value-labels` on the core
738
- * (`@tabler/charts` includes it).
849
+ * not fit are left out. A series' own `valueLabels` overrides this for
850
+ * that series, and each label carries its series classes
851
+ * (`tc-series tc-series-{n}`). Needs `@tabler/charts/value-labels` on the
852
+ * core (`@tabler/charts` includes it).
739
853
  */
740
854
  valueLabels?: boolean | ValueLabelOptions;
741
855
  /**
@@ -780,7 +894,7 @@ interface BaseOptions {
780
894
  }
781
895
  /** Full chart configuration: base options, the chart type and its options. */
782
896
  type ChartConfig<O extends object = object> = BaseOptions & O & {
783
- type: ChartType<O>;
897
+ type: ChartType<O, object>;
784
898
  };
785
899
  interface Size {
786
900
  width: number;
@@ -788,13 +902,29 @@ interface Size {
788
902
  }
789
903
  /** Resolve the final pixel size from options and the measured container size. */
790
904
  declare function resolveSize(options: BaseOptions, measured?: Partial<Size>): Size;
791
- /** Render context for a config and size (also used by plugins such as the data table). */
792
- declare function renderContext<O extends object>(config: ChartConfig<O>, size: Size, id: string, onHitTest: (interaction: Interaction) => void, hidden: ReadonlySet<string>, measuredFontSize?: number, rtl?: boolean): RenderContext;
905
+ /**
906
+ * The chart model of a config: what its type's `prepare()` works out from
907
+ * it, once per config object, or the config itself for a type without one.
908
+ */
909
+ declare function chartModel(config: ChartConfig<object>): object;
910
+ /** What a render context is made for, besides the config. */
911
+ interface ContextOptions {
912
+ size: Size;
913
+ /** Id prefix of the chart. */
914
+ id: string;
915
+ hidden: ReadonlySet<string>;
916
+ /** Measured font size, used when the config sets none. */
917
+ fontSize?: number;
918
+ /** The resolved `rtl` option; by default `rtl: true` in the config. */
919
+ rtl?: boolean;
920
+ }
921
+ /** Render context for a config and size. */
922
+ declare function renderContext<O extends object>(config: ChartConfig<O>, { size, id, hidden, fontSize, rtl }: ContextOptions): RenderContext;
793
923
  /** Legend entries of a config, whether a legend is shown and where. */
794
924
  interface ResolvedLegend {
795
925
  items: LegendItem[];
796
926
  show: boolean;
797
- position: "top" | "bottom";
927
+ position: NonNullable<LegendOptions["position"]>;
798
928
  }
799
929
  /** Legend entries of a config, and whether the legend is shown. */
800
930
  declare function resolveLegend<O extends object>(config: ChartConfig<O>): ResolvedLegend;
@@ -805,11 +935,18 @@ declare function resolveLegend<O extends object>(config: ChartConfig<O>): Resolv
805
935
  * page's language.
806
936
  */
807
937
  declare function chartLabel(config: ChartConfig<object>): string;
938
+ /** A chart built without the DOM: its root `<svg>`, and how it answers interaction. */
939
+ interface BuiltChart {
940
+ svg: VNode;
941
+ interaction?: Interaction;
942
+ }
808
943
  /**
809
- * Build the VNode tree of a chart: a pure function of the config and size,
810
- * shared by the DOM chart and server-side rendering.
944
+ * Build a chart for a size: a pure function of the config and size, shared
945
+ * by the DOM chart and server-side rendering. `buildChart()` keeps the svg.
811
946
  */
812
- declare function buildChart<O extends object>(config: ChartConfig<O>, size: Size, id?: string, onHitTest?: (interaction: Interaction) => void): VNode;
947
+ declare function renderChart<O extends object>(config: ChartConfig<O>, size: Size, id?: string): BuiltChart;
948
+ /** Build the VNode tree of a chart for a size (see `renderChart()`). */
949
+ declare function buildChart<O extends object>(config: ChartConfig<O>, size: Size, id?: string): VNode;
813
950
  /**
814
951
  * Render a chart to an SVG string, e.g. on the server.
815
952
  *
@@ -863,10 +1000,10 @@ type Handler<T> = (event: T) => void;
863
1000
  declare class Chart<O extends object = object> {
864
1001
  #private;
865
1002
  /** Element the chart renders into. */
866
- readonly element: Element;
1003
+ readonly element: HTMLElement;
867
1004
  /** Id prefix used for elements inside the chart. */
868
1005
  readonly id: string;
869
- constructor(target: Element | string, config: ChartConfig<O>, defaultPlugins?: readonly ChartPlugin[]);
1006
+ constructor(target: HTMLElement | string, config: ChartConfig<O>, defaultPlugins?: readonly ChartPlugin[]);
870
1007
  /** Current configuration. */
871
1008
  get config(): ChartConfig<O>;
872
1009
  /** Size of the last render. */
@@ -939,4 +1076,4 @@ declare class Chart<O extends object = object> {
939
1076
  /** Call the handlers of an event (plugins emit `click`, for instance). */
940
1077
  emit<K extends keyof ChartEvents>(name: K, event: ChartEvents[K]): void;
941
1078
  }
942
- export { LegendOptions as $, labelsStep as A, DownloadOptions as B, DownloadOption as C, describeHit as Ct, ChartPlugin as D, HitTester as Dt, BeforeRenderState as E, HitItem as Et, register as F, exportImage as G, ExportTarget as H, ArcOptions as I, shapesStep as J, exportSVG as K, arcCentroid as L, Features as M, feature as N, PluginInstance as O, Interaction as Ot, features as P, LegendItem as Q, arcPathStable as R, DownloadMenuOptions as S, DataTable as St, AfterRenderState as T, Hit as Tt, ImageOptions as U, ExportOptions as V, downloadChart as W, patternFills as X, patternDefs as Y, patternVars as Z, TooltipPlacement as _, axis as _t, ChartType as a, Label as at, tooltipContent as b, linearTicks as bt, Size as c, categoryInteraction as ct, chartLabel as d, seriesLegend as dt, defaultHidden as et, chartToString as f, seriesTable as ft, TooltipOptions as g, Tick as gt, resolveSize as h, LinearTicksOptions as ht, ChartEvents as i, CategoryAxisOptions as it, valueLabels as j, ValueLabelOptions as k, buildChart as l, domainOf as lt, resolveLegend as m, AxisPosition as mt, Chart as n, CartesianData as nt, RenderContext as o, Series as ot, renderContext as p, AxisOptions as pt, markerPath as q, ChartConfig as r, CartesianOptions as rt, ResolvedLegend as s, ValueAxisOptions as st, BaseOptions as t, legendContent as tt, chartEvents as u, seriesKey as ut, hitAnchor as v, axisSize as vt, download as w, tableContent as wt, DownloadFormat as x, thinTicks as xt, placeTooltip as y, bandTicks as yt, padAngleForGap as z };
1079
+ export { markerClip as $, download as A, describeHit as At, features as B, TooltipPlacement as C, Tick as Ct, DownloadFormat as D, linearTicks as Dt, tooltipContent as E, bandTicks as Et, ValueLabelOptions as F, HitTester as Ft, padAngleForGap as G, ArcOptions as H, labelsStep as I, Interaction as It, ExportTarget as J, DownloadOptions as K, valueLabels as L, BeforeRenderState as M, Highlight as Mt, ChartPlugin as N, Hit as Nt, DownloadMenuOptions as O, thinTicks as Ot, PluginInstance as P, HitItem as Pt, exportSVG as Q, Features as R, TooltipOptions as S, LinearTicksOptions as St, placeTooltip as T, axisSize as Tt, arcCentroid as U, register as V, arcPathStable as W, downloadChart as X, ImageOptions as Y, exportImage as Z, chartToString as _, seriesKey as _t, ChartEvents as a, LegendItem as at, resolveLegend as b, AxisOptions as bt, RenderContext as c, legendContent as ct, Size as d, CategoryAxisOptions as dt, markerPath as et, TableContext as f, Label as ft, chartModel as g, domainOf as gt, chartLabel as h, categoryInteraction as ht, ChartConfig as i, patternVars as it, AfterRenderState as j, tableContent as jt, DownloadOption as k, DataTable as kt, RenderResult as l, CartesianData as lt, chartEvents as m, ValueAxisOptions as mt, BuiltChart as n, patternDefs as nt, ChartType as o, LegendOptions as ot, buildChart as p, Series as pt, ExportOptions as q, Chart as r, patternFills as rt, ContextOptions as s, defaultHidden as st, BaseOptions as t, shapesStep as tt, ResolvedLegend as u, CartesianOptions as ut, renderChart as v, seriesLegend as vt, hitAnchor as w, axis as wt, resolveSize as x, AxisPosition as xt, renderContext as y, seriesTable as yt, feature as z };