@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,219 +1,12 @@
1
- import { a as round, i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-B3hiqVEw.js";
2
- import { t as h } from "./vnode-tCWItoUH.js";
3
- import { i as formatTicks, n as formatDetail } from "./format-lStwuc1L.js";
4
- import { n as feature, r as features } from "./features-wASyHGic.js";
5
- import { t as extent } from "./extent-BAMZo0Nq.js";
6
- import { i as finite } from "./clean-o1vDEhFV.js";
7
- import { n as keyOf, r as legendItems, t as groupAttrs } from "./named-DE15TOgh.js";
8
- //#region src/scales/ticks.ts
9
- const E10 = Math.sqrt(50);
10
- const E5 = Math.sqrt(10);
11
- const E2 = Math.sqrt(2);
12
- /**
13
- * Integer tick indices `[i1, i2]` and an increment `inc`. A negative `inc`
14
- * means "divide by -inc", which keeps decimal ticks exact (0.3, not
15
- * 0.30000000000000004).
16
- */
17
- function tickSpec(start, stop, count) {
18
- const step = (stop - start) / Math.max(0, count);
19
- const power = Math.floor(Math.log10(step));
20
- const error = step / 10 ** power;
21
- const factor = error >= E10 ? 10 : error >= E5 ? 5 : error >= E2 ? 2 : 1;
22
- let i1;
23
- let i2;
24
- let inc;
25
- if (power < 0) {
26
- inc = 10 ** -power / factor;
27
- i1 = Math.round(start * inc);
28
- i2 = Math.round(stop * inc);
29
- if (i1 / inc < start) ++i1;
30
- if (i2 / inc > stop) --i2;
31
- inc = -inc;
32
- } else {
33
- inc = 10 ** power * factor;
34
- i1 = Math.round(start / inc);
35
- i2 = Math.round(stop / inc);
36
- if (i1 * inc < start) ++i1;
37
- if (i2 * inc > stop) --i2;
38
- }
39
- if (i2 < i1 && count >= .5 && count < 2) return tickSpec(start, stop, count * 2);
40
- return [
41
- i1,
42
- i2,
43
- inc
44
- ];
45
- }
46
- /**
47
- * Roughly `count` evenly spaced, "nice" values (multiples of 1, 2 or 5 × 10ⁿ)
48
- * between `start` and `stop`, inclusive. Order follows `start → stop`.
49
- */
50
- function ticks(start, stop, count = 5) {
51
- if (!(count > 0) || !Number.isFinite(start) || !Number.isFinite(stop)) return [];
52
- if (start === stop) return [start];
53
- const reverse = stop < start;
54
- const [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
55
- if (!(i2 >= i1)) return [];
56
- const n = i2 - i1 + 1;
57
- const out = new Array(n);
58
- for (let i = 0; i < n; i++) {
59
- const index = reverse ? i2 - i : i1 + i;
60
- out[i] = inc < 0 ? index / -inc : index * inc;
61
- }
62
- return out;
63
- }
64
- /**
65
- * Signed tick increment: positive values are the step, negative values `-k`
66
- * mean a step of `1 / k`.
67
- */
68
- function tickIncrement(start, stop, count) {
69
- return tickSpec(start, stop, count)[2];
70
- }
71
- /** Distance between ticks produced by {@link ticks} for the same arguments. */
72
- function tickStep(start, stop, count = 5) {
73
- const reverse = stop < start;
74
- const inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
75
- return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
76
- }
77
- /**
78
- * Extend `[start, stop]` to round tick values, e.g. `[0.2, 9.7] → [0, 10]`.
79
- * Iterates because rounding can change the ideal step; if the step does not
80
- * settle (e.g. very low `count` around zero keeps doubling the domain), the
81
- * domain is returned unchanged, matching d3.
82
- */
83
- function niceDomain(start, stop, count = 5) {
84
- if (!Number.isFinite(start) || !Number.isFinite(stop) || start === stop || !(count > 0)) return [start, stop];
85
- const reverse = stop < start;
86
- let lo = reverse ? stop : start;
87
- let hi = reverse ? start : stop;
88
- let prev;
89
- for (let i = 0; i < 10; i++) {
90
- const step = tickIncrement(lo, hi, count);
91
- if (step === prev) return reverse ? [hi, lo] : [lo, hi];
92
- if (step > 0) {
93
- lo = Math.floor(lo / step) * step;
94
- hi = Math.ceil(hi / step) * step;
95
- } else if (step < 0) {
96
- lo = Math.ceil(lo * step) / step;
97
- hi = Math.floor(hi * step) / step;
98
- } else break;
99
- prev = step;
100
- }
101
- return [start, stop];
102
- }
103
- //#endregion
104
- //#region src/components/axis.ts
105
- /** Ticks for a linear scale, labelled with a shared precision. */
106
- function linearTicks(scale, options = {}) {
107
- const { count = 5, format, locale } = options;
108
- const [d0, d1] = scale.domain;
109
- const fmt = formatTicks(tickStep(d0, d1, count), format, locale);
110
- return scale.ticks(count).map((value) => ({
111
- value,
112
- position: scale(value),
113
- label: fmt(value)
114
- }));
115
- }
116
- /** Ticks at the center of every band. */
117
- function bandTicks(scale, format = String) {
118
- return scale.domain.map((key, i) => ({
119
- value: key,
120
- position: scale.at(i) + scale.bandwidth / 2,
121
- label: format(key, i)
122
- }));
123
- }
124
- /** Whether labels are laid out along x (horizontal axes). */
125
- const isHorizontal = (position) => position === "top" || position === "bottom";
126
- /**
127
- * Keep every n-th tick (smallest n) so labels do not overlap along the axis.
128
- * The first and the last tick are always kept: when the last one does not
129
- * land on the step, it replaces the last kept tick if they would collide.
130
- */
131
- function thinTicks(ticks, position, fontSize, gap = 8) {
132
- if (ticks.length < 2) return ticks.slice();
133
- const size = (tick) => isHorizontal(position) ? estimateTextWidth(tick.label, fontSize) : fontSize * LINE_HEIGHT;
134
- const sizes = ticks.map(size);
135
- const fitsBetween = (i, j) => Math.abs(ticks[j].position - ticks[i].position) >= (sizes[i] + sizes[j]) / 2 + gap;
136
- const last = ticks.length - 1;
137
- const span = Math.abs(ticks[last].position - ticks[0].position);
138
- const total = sizes.reduce((sum, size) => sum + size + gap, 0);
139
- const first = span > 0 ? Math.max(1, Math.floor(total / span)) : last;
140
- for (let step = first; step <= last; step++) {
141
- let fits = true;
142
- for (let i = step; i <= last && fits; i += step) fits = fitsBetween(i - step, i);
143
- if (!fits) continue;
144
- const kept = [];
145
- for (let i = 0; i <= last; i += step) kept.push(i);
146
- const tail = kept[kept.length - 1];
147
- if (tail !== last) {
148
- if (fitsBetween(tail, last)) kept.push(last);
149
- else if (kept.length > 1 && fitsBetween(kept[kept.length - 2], last)) kept[kept.length - 1] = last;
150
- }
151
- return kept.map((i) => ticks[i]);
152
- }
153
- return ticks.slice(0, 1);
154
- }
155
- /** Pixels an axis occupies perpendicular to the plot edge (for margins). */
156
- function axisSize(position, ticks, fontSize, options = {}) {
157
- const { tickSize = 0, tickPadding = 8 } = options;
158
- if (ticks.length === 0) return 0;
159
- const labels = isHorizontal(position) ? fontSize * LINE_HEIGHT : ticks.reduce((max, t) => Math.max(max, estimateTextWidth(t.label, fontSize)), 0) + 3;
160
- return Math.ceil(labels + tickSize + tickPadding);
161
- }
162
- /**
163
- * Render an axis as `<g class="tc-axis tc-axis-{x|y} tc-axis-{position}">`
164
- * with one `<g class="tc-tick">` per tick, keyed by value so ticks can
165
- * transition when the scale changes.
166
- */
167
- function axis(options) {
168
- const { position, ticks, area, tickSize = 0, tickPadding = 8, line = false } = options;
169
- const horizontal = isHorizontal(position);
170
- const sign = position === "top" || position === "left" ? -1 : 1;
171
- const offset = sign * (tickSize + tickPadding);
172
- const edge = position === "top" ? area.y : position === "bottom" ? area.y + area.height : position === "left" ? area.x : area.x + area.width;
173
- const label = horizontal ? {
174
- y: offset,
175
- dy: position === "top" ? "0em" : "0.71em",
176
- "text-anchor": "middle"
177
- } : {
178
- x: offset,
179
- dy: "0.32em",
180
- "text-anchor": position === "left" ? "end" : "start"
181
- };
182
- const tickLine = horizontal ? { y2: sign * tickSize } : { x2: sign * tickSize };
183
- return h("g", {
184
- key: `axis-${position}`,
185
- class: [
186
- "tc-axis",
187
- horizontal ? "tc-axis-x" : "tc-axis-y",
188
- `tc-axis-${position}`
189
- ],
190
- "aria-hidden": "true"
191
- }, line && h("line", horizontal ? {
192
- class: "tc-axis-line",
193
- x1: area.x,
194
- x2: area.x + area.width,
195
- y1: edge,
196
- y2: edge
197
- } : {
198
- class: "tc-axis-line",
199
- x1: edge,
200
- x2: edge,
201
- y1: area.y,
202
- y2: area.y + area.height
203
- }), ticks.map((tick) => h("g", {
204
- key: tick.value,
205
- class: "tc-tick",
206
- style: horizontal ? `transform:translate(${round(tick.position)}px,${round(edge)}px)` : `transform:translate(${round(edge)}px,${round(tick.position)}px)`
207
- }, tickSize > 0 && h("line", {
208
- class: "tc-tick-line",
209
- ...tickLine
210
- }), h("text", {
211
- class: "tc-tick-label",
212
- ...label
213
- }, tick.label))));
214
- }
215
- //#endregion
216
- //#region src/components/grid.ts
1
+ import { a as bandTicks, c as niceDomain, d as ticks, i as axisTitleSize, n as axisSize, o as linearTicks, r as axisTitle, s as thinTicks, t as axis } from "./axis-MMaVoSWB.js";
2
+ import { n as estimateTextWidth, o as plotFrame, s as round, t as LINE_HEIGHT } from "./layout-DqAte3H8.js";
3
+ import { t as h } from "./vnode-_EMUqysL.js";
4
+ import { n as feature, r as features } from "./features-B55rwpQC.js";
5
+ import { n as formatDetail } from "./format-it1kepFG.js";
6
+ import { t as extent } from "./extent-DOV8rs-6.js";
7
+ import { i as finite } from "./clean-CkoQobGv.js";
8
+ import { n as keyOf, r as legendItems, t as groupAttrs } from "./named-BOiBah6I.js";
9
+ // src/components/grid.ts
217
10
  /**
218
11
  * Render grid lines as `<g class="tc-grid tc-grid-{x|y}">`. The line at
219
12
  * value `0` also gets `tc-grid-line-zero`, so the baseline can be emphasized.
@@ -245,8 +38,7 @@ function grid(options) {
245
38
  });
246
39
  }));
247
40
  }
248
- //#endregion
249
- //#region src/scales/band.ts
41
+ // src/scales/band.ts
250
42
  /**
251
43
  * Create a band scale, e.g. for bar charts.
252
44
  *
@@ -308,8 +100,7 @@ function point(domain, range, options = {}) {
308
100
  ...align === void 0 ? {} : { align }
309
101
  });
310
102
  }
311
- //#endregion
312
- //#region src/scales/linear.ts
103
+ // src/scales/linear.ts
313
104
  /**
314
105
  * Create a linear scale.
315
106
  *
@@ -352,12 +143,34 @@ function linear(domain, range, options = {}) {
352
143
  }
353
144
  });
354
145
  }
355
- //#endregion
356
- //#region src/charts/cartesian.ts
146
+ // src/charts/cartesian.ts
357
147
  /** A label as a `key` for keyed rendering (dates by their timestamp). */
358
148
  const labelKey = (label) => label instanceof Date ? label.getTime() : label;
359
149
  /** Stable key of a series: its `id`, or its name. */
360
150
  const seriesKey = keyOf;
151
+ /**
152
+ * Whether the chart draws a second value axis: a series asks for it with
153
+ * `axis: 'y2'`, and the values run along y (not in horizontal bars).
154
+ */
155
+ const hasY2 = (options) => options.orientation !== "horizontal" && options.data.series.some((s) => s.axis === "y2");
156
+ /**
157
+ * The value axis a series is read on: a function giving each series'
158
+ * axis options, and whether it is the second one.
159
+ */
160
+ function seriesAxes(options) {
161
+ const second = hasY2(options);
162
+ const y = {
163
+ second: false,
164
+ axis: options.y ?? {}
165
+ };
166
+ const y2 = {
167
+ second: true,
168
+ axis: options.y2 ?? {}
169
+ };
170
+ return (series) => second && series?.axis === "y2" ? y2 : y;
171
+ }
172
+ /** The scale of a series: the second one for series on `y2`. */
173
+ const seriesScale = (layout, series) => layout.y2 && series?.axis === "y2" ? layout.y2 : layout.y;
361
174
  /** Legend entries for series-based charts. */
362
175
  const seriesLegend = (data) => legendItems(data.series);
363
176
  /** Categories from `data.labels`, or `1…n` for the longest series. */
@@ -405,6 +218,23 @@ const markerShape = (options) => {
405
218
  const { shapes, patterns } = options;
406
219
  return shapes ?? patterns === true ? features["point-shapes"] : void 0;
407
220
  };
221
+ /**
222
+ * A point of the series in color slot `slot`: a circle, or the slot's marker
223
+ * when the chart has point shapes (see `markerShape`).
224
+ */
225
+ function pointMark(shape, slot, key, cls, cx, cy, r) {
226
+ return shape ? h("path", {
227
+ key,
228
+ class: [cls, "tc-marker"],
229
+ d: shape(slot, cx, cy, r)
230
+ }) : h("circle", {
231
+ key,
232
+ class: cls,
233
+ cx,
234
+ cy,
235
+ r
236
+ });
237
+ }
408
238
  /** The tick count asked for on an axis (a number up to 100), or `auto`. */
409
239
  const tickCount = (axis, auto) => Math.min(finite(axis?.ticks) ?? auto, 100);
410
240
  /** Y domain from the data and axis options. */
@@ -449,11 +279,20 @@ function notesFeature(options) {
449
279
  * measure the labels with (their positions mean nothing). `auto` is the
450
280
  * tick count the plot has room for, unless the axis asks for its own.
451
281
  */
452
- function valueAxis(options, ctx, layout, auto) {
453
- const axis = options.y ?? {};
282
+ function valueAxis(options, ctx, layout, auto, which) {
283
+ const second = which === "y2";
284
+ const axis = (second ? options.y2 : options.y) ?? {};
454
285
  const count = tickCount(axis, Math.max(2, auto));
455
- const domain = valueDomain(options.data, axis, layout.zero, count, ctx.hidden, layout.values, notesFeature(options)?.values(options.annotations));
456
- const format = layout.tickFormat ?? axis.format;
286
+ let domain;
287
+ if (second) {
288
+ const own = options.data.series.filter((s) => s.axis === "y2");
289
+ const shown = own.filter((s) => !ctx.hidden.has(seriesKey(s)));
290
+ domain = domainOf((shown.length ? shown : own).flatMap((s) => s.values), axis, layout.zero2 ?? layout.zero, count);
291
+ } else domain = valueDomain(which === "y" ? {
292
+ ...options.data,
293
+ series: options.data.series.filter((s) => s.axis !== "y2")
294
+ } : options.data, axis, layout.zero, count, ctx.hidden, layout.values, notesFeature(options)?.values(options.annotations));
295
+ const format = second ? axis.format : layout.tickFormat ?? axis.format;
457
296
  const scale = (range) => valueScale(domain, range, axis);
458
297
  const ticks = (of) => valueTicks(of, axis, count, format, ctx.locale);
459
298
  return {
@@ -466,11 +305,13 @@ function valueAxis(options, ctx, layout, auto) {
466
305
  * Finish a layout that has its plot area, scales and ticks with what is
467
306
  * drawn around the marks: grid lines and annotation bands below them,
468
307
  * annotation lines and the axes above. Values run along y and categories
469
- * along x, or the other way round when `horizontal`.
308
+ * along x, or the other way round when `horizontal`. The value axis (the
309
+ * category axis when `horizontal`) sits on the start `side`.
470
310
  */
471
- function finishLayout(options, ctx, overhang, plot, keys, time) {
472
- const { area, x, y, xTicks, yTicks, horizontal: flip } = plot;
311
+ function finishLayout(options, ctx, side, overhang, plot, keys, time) {
312
+ const { area, x, y, xTicks, yTicks, y2Ticks, horizontal: flip } = plot;
473
313
  const xOptions = options.x ?? {};
314
+ const opposite = side === "left" ? "right" : "left";
474
315
  const notes = notesFeature(options)?.layers(options.annotations, {
475
316
  area,
476
317
  horizontal: flip,
@@ -481,16 +322,27 @@ function finishLayout(options, ctx, overhang, plot, keys, time) {
481
322
  time
482
323
  });
483
324
  const values = options.y?.show !== false && [axis({
484
- position: flip ? "bottom" : "left",
325
+ position: flip ? "bottom" : side,
485
326
  ticks: yTicks,
486
327
  area
487
328
  })];
488
329
  const categories = (xOptions.show !== false && plot.labels.length > 0 || xOptions.line) && [axis({
489
- position: flip ? "left" : "bottom",
330
+ position: flip ? side : "bottom",
490
331
  ticks: xTicks,
491
332
  area,
492
333
  line: xOptions.line === true
493
334
  })];
335
+ const seconds = !!y2Ticks && options.y2?.show !== false && [axis({
336
+ position: opposite,
337
+ ticks: y2Ticks,
338
+ area
339
+ })];
340
+ const title = (text, position, ticks) => !!text && axisTitle(position, ticks || [], area, text, ctx.fontSize);
341
+ const titles = [
342
+ title(options.y?.title, flip ? "bottom" : side, !!values && yTicks),
343
+ title(xOptions.title, flip ? side : "bottom", xTicks),
344
+ !!y2Ticks && title(options.y2?.title, opposite, !!seconds && y2Ticks)
345
+ ];
494
346
  const present = (parts) => parts.flatMap((part) => part || []);
495
347
  return {
496
348
  ...plot,
@@ -510,7 +362,9 @@ function finishLayout(options, ctx, overhang, plot, keys, time) {
510
362
  foreground: present([
511
363
  notes?.over,
512
364
  flip ? categories : values,
513
- flip ? values : categories
365
+ flip ? values : categories,
366
+ seconds,
367
+ ...titles
514
368
  ]),
515
369
  clip: plotClip(ctx, area, overhang)
516
370
  };
@@ -522,14 +376,20 @@ function cartesianLayout(options, ctx, layout) {
522
376
  const xOptions = options.x ?? {};
523
377
  const { fontSize, locale, width, height } = ctx;
524
378
  const overhang = layout.overhang ?? 0;
525
- const pad = insets(options.padding);
379
+ const rtl = ctx.rtl === true;
380
+ const reverse = xOptions.reverse ?? rtl;
526
381
  const labels = resolveLabels(data);
527
382
  const format = labelFormatter(options, ctx);
528
383
  const showY = yOptions.show !== false;
529
384
  const showX = xOptions.show !== false && labels.length > 0;
530
385
  const timed = isTimeAxis(options) && layout.scale === "point";
531
- const value = valueAxis(options, ctx, layout, Math.round(height / 60));
386
+ const auto = Math.round(height / 60);
387
+ const second = hasY2(options);
388
+ const value = valueAxis(options, ctx, layout, auto, second ? "y" : void 0);
532
389
  const probeY = value.probe;
390
+ const y2Options = options.y2 ?? {};
391
+ const value2 = second ? valueAxis(options, ctx, layout, auto, "y2") : null;
392
+ const showY2 = !!value2 && y2Options.show !== false;
533
393
  const countX = Math.max(2, Math.round(width / 80));
534
394
  const keys = labels.map(labelKey);
535
395
  const labelAt = (i) => format(labels[i], i);
@@ -543,30 +403,34 @@ function cartesianLayout(options, ctx, layout) {
543
403
  };
544
404
  const edgeLabels = xAxis.edges;
545
405
  const halfLine = Math.ceil(fontSize * LINE_HEIGHT / 2);
546
- const firstLabel = showX ? estimateTextWidth(edgeLabels[0] ?? "", fontSize) : 0;
547
- const lastLabel = showX ? estimateTextWidth(edgeLabels[edgeLabels.length - 1] ?? "", fontSize) : 0;
406
+ const edgeWidth = (last) => showX ? estimateTextWidth(edgeLabels[last ? edgeLabels.length - 1 : 0] ?? "", fontSize) : 0;
407
+ const firstLabel = edgeWidth(reverse !== rtl);
408
+ const lastLabel = edgeWidth(reverse === rtl);
548
409
  const edgeX = layout.scale === "point";
549
- const valueWidth = showY ? axisSize("left", probeY, fontSize) : 0;
550
- const side = (halfStep) => {
551
- const overflow = (label) => edgeX ? Math.ceil(label / 2) : Math.max(0, Math.ceil(label / 2 - halfStep));
410
+ const valueWidth = (showY ? axisSize("left", probeY, fontSize) : 0) + axisTitleSize(yOptions.title, fontSize);
411
+ const value2Width = value2 ? (showY2 ? axisSize("right", value2.probe, fontSize) : 0) + axisTitleSize(y2Options.title, fontSize) : 0;
412
+ const { area, side, range } = plotFrame(ctx, options.padding, (pad) => {
413
+ const sides = (halfStep) => {
414
+ const overflow = (label) => edgeX ? Math.ceil(label / 2) : Math.max(0, Math.ceil(label / 2 - halfStep));
415
+ return {
416
+ start: pad.start + Math.max(valueWidth, overflow(firstLabel), overhang, showY ? 0 : 8),
417
+ end: pad.end + Math.max(value2Width, overflow(lastLabel), overhang, 8)
418
+ };
419
+ };
420
+ const steps = Math.max(1, labels.length) * 2;
421
+ let both = sides((width - pad.start - pad.end - valueWidth - value2Width) / steps);
422
+ if (!edgeX) both = sides((width - both.start - both.end) / steps);
552
423
  return {
553
- right: pad.right + Math.max(overflow(lastLabel), overhang, 8),
554
- left: pad.left + Math.max(valueWidth, overflow(firstLabel), overhang, showY ? 0 : 8)
424
+ top: pad.top + Math.max(showY || showY2 ? halfLine : 0, overhang, 4),
425
+ bottom: pad.bottom + Math.max((showX ? axisSize("bottom", [probeY[0]], fontSize) : showY ? halfLine : 0) + axisTitleSize(xOptions.title, fontSize), overhang, 4),
426
+ ...both
555
427
  };
556
- };
557
- const steps = Math.max(1, labels.length) * 2;
558
- let sides = side((width - pad.left - pad.right - valueWidth) / steps);
559
- if (!edgeX) sides = side((width - sides.left - sides.right) / steps);
560
- const margins = {
561
- top: pad.top + Math.max(showY ? halfLine : 0, overhang, 4),
562
- bottom: pad.bottom + Math.max(showX ? axisSize("bottom", [probeY[0]], fontSize) : showY ? halfLine : 0, overhang, 4),
563
- ...sides
564
- };
565
- const area = innerRect(width, height, margins);
566
- const x = xAxis.scale([area.x, area.x + area.width]);
428
+ });
429
+ const x = xAxis.scale(range(reverse));
567
430
  const y = value.scale([area.y + area.height, area.y]);
431
+ const y2 = value2?.scale([area.y + area.height, area.y]);
568
432
  const yTicks = thinTicks(value.ticks(y), "left", fontSize, 4);
569
- return finishLayout(options, ctx, overhang, {
433
+ const plot = {
570
434
  area,
571
435
  labels,
572
436
  x,
@@ -574,7 +438,12 @@ function cartesianLayout(options, ctx, layout) {
574
438
  horizontal: false,
575
439
  xTicks: showX ? thinTicks(xAxis.ticks(x), "bottom", fontSize) : [],
576
440
  yTicks
577
- }, keys, xAxis.time);
441
+ };
442
+ if (value2 && y2) {
443
+ plot.y2 = y2;
444
+ plot.y2Ticks = thinTicks(value2.ticks(y2), "right", fontSize, 4);
445
+ }
446
+ return finishLayout(options, ctx, side, overhang, plot, keys, xAxis.time);
578
447
  }
579
448
  /** Clip path around the plot area, a little larger so strokes and dots are not cut. */
580
449
  function plotClip(ctx, area, overhang) {
@@ -615,7 +484,9 @@ function categoryInteraction(layout, options, ctx, anchor, markAt) {
615
484
  const { area, x, labels, horizontal } = layout;
616
485
  const { data } = options;
617
486
  const formatLabel = labelFormatter(options, ctx);
618
- const formatValue = formatDetail(options.y?.format, ctx.locale);
487
+ const axisOf = seriesAxes(options);
488
+ const axes = data.series.map((s) => axisOf(s).axis);
489
+ const formats = axes.map((axis) => formatDetail(axis.format, ctx.locale));
619
490
  const hitAt = (index) => {
620
491
  const start = x.at(index);
621
492
  const center = start + x.bandwidth / 2;
@@ -631,13 +502,13 @@ function categoryInteraction(layout, options, ctx, anchor, markAt) {
631
502
  data.series.forEach((series, seriesIndex) => {
632
503
  if (ctx.hidden.has(seriesKey(series))) return;
633
504
  const raw = series.values[index];
634
- const value = plottable(raw, options.y) ? raw : null;
505
+ const value = plottable(raw, axes[seriesIndex]) ? raw : null;
635
506
  const point = value === null ? empty : anchor(seriesIndex, index, value);
636
507
  const item = {
637
508
  name: series.name,
638
509
  seriesIndex,
639
510
  value,
640
- text: value === null ? "–" : formatValue(value),
511
+ text: value === null ? "–" : formats[seriesIndex](value),
641
512
  ...point
642
513
  };
643
514
  if (series.color) item.color = series.color;
@@ -655,12 +526,14 @@ function categoryInteraction(layout, options, ctx, anchor, markAt) {
655
526
  hit.y = center;
656
527
  hit.axis = "y";
657
528
  }
658
- if (x.bandwidth > 0) hit.band = horizontal ? {
529
+ if (x.bandwidth > 0) hit.highlight = horizontal ? {
530
+ kind: "band",
659
531
  x: area.x,
660
532
  y: start,
661
533
  width: area.width,
662
534
  height: x.bandwidth
663
535
  } : {
536
+ kind: "band",
664
537
  x: start,
665
538
  y: area.y,
666
539
  width: x.bandwidth,
@@ -670,6 +543,7 @@ function categoryInteraction(layout, options, ctx, anchor, markAt) {
670
543
  };
671
544
  return {
672
545
  count: labels.length,
546
+ reversed: x.range[1] < x.range[0],
673
547
  hitTest(px, py) {
674
548
  if (labels.length === 0) return null;
675
549
  if (px < area.x - HOVER_SLOP || px > area.x + area.width + HOVER_SLOP || py < area.y - HOVER_SLOP || py > area.y + area.height + HOVER_SLOP) return null;
@@ -692,18 +566,18 @@ function seriesTable(options, ctx, limit = Number.POSITIVE_INFINITY) {
692
566
  const all = resolveLabels(options.data);
693
567
  const labels = all.length > limit ? all.slice(0, limit) : all;
694
568
  const formatLabel = labelFormatter(options, ctx);
695
- const formatValue = formatDetail(options.y?.format, ctx.locale);
569
+ const axisOf = seriesAxes(options);
696
570
  const series = options.data.series.filter((s) => !ctx.hidden.has(seriesKey(s)));
571
+ const formats = series.map((s) => formatDetail(axisOf(s).axis.format, ctx.locale));
697
572
  return {
698
573
  columns: ["", ...series.map((s) => s.name)],
699
574
  total: all.length,
700
- rows: labels.map((label, i) => [formatLabel(label, i), ...series.map((s) => {
575
+ rows: labels.map((label, i) => [formatLabel(label, i), ...series.map((s, n) => {
701
576
  const v = s.values[i];
702
- return v == null || !Number.isFinite(v) ? "–" : formatValue(v);
577
+ return v == null || !Number.isFinite(v) ? "–" : formats[n](v);
703
578
  })])
704
579
  };
705
580
  }
706
- //#endregion
707
- export { tickIncrement as A, grid as C, linearTicks as D, bandTicks as E, ticks as M, thinTicks as O, point as S, axisSize as T, valueAxis as _, labelFormatter as a, linear as b, plotClip as c, seriesAttrs as d, seriesKey as f, toMs as g, tickCount as h, finishLayout as i, tickStep as j, niceDomain as k, plottable as l, seriesTable as m, categoryInteraction as n, labelKey as o, seriesLegend as p, domainOf as r, markerShape as s, cartesianLayout as t, resolveLabels as u, valueScale as v, axis as w, band as x, valueTicks as y };
581
+ export { linear as C, grid as E, valueTicks as S, point as T, seriesTable as _, labelFormatter as a, valueAxis as b, plotClip as c, resolveLabels as d, seriesAttrs as f, seriesScale as g, seriesLegend as h, finishLayout as i, plottable as l, seriesKey as m, categoryInteraction as n, labelKey as o, seriesAxes as p, domainOf as r, markerShape as s, cartesianLayout as t, pointMark as u, tickCount as v, band as w, valueScale as x, toMs as y };
708
582
 
709
- //# sourceMappingURL=cartesian-Cr0AF0nG.js.map
583
+ //# sourceMappingURL=cartesian-BrPqb5Qn.js.map