@tabler/charts 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/README.md +74 -4
  2. package/dist/{annotations-D0YQ0IoA.js → annotations-BQ8l-qHs.js} +3 -3
  3. package/dist/{annotations-D0YQ0IoA.js.map → annotations-BQ8l-qHs.js.map} +1 -1
  4. package/dist/{annotations-DdRdeBUB.cjs → annotations-CpCWA29b.cjs} +3 -3
  5. package/dist/{annotations-DdRdeBUB.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
  6. package/dist/annotations.cjs +2 -2
  7. package/dist/annotations.js +2 -2
  8. package/dist/{area-d11XePuw.d.ts → area-DEFQm_SQ.d.ts} +2 -2
  9. package/dist/{area-4eRs3c0K.cjs → area-DYdQ_sMV.cjs} +3 -3
  10. package/dist/{area-4eRs3c0K.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
  11. package/dist/{area-0-L1bG9B.js → area-WdtfqvhX.js} +3 -3
  12. package/dist/{area-0-L1bG9B.js.map → area-WdtfqvhX.js.map} +1 -1
  13. package/dist/{area-CJX9219z.d.cts → area-h_FvieFb.d.cts} +2 -2
  14. package/dist/area.cjs +1 -1
  15. package/dist/area.d.cts +1 -1
  16. package/dist/area.d.ts +1 -1
  17. package/dist/area.js +1 -1
  18. package/dist/axis-MMaVoSWB.js +235 -0
  19. package/dist/axis-MMaVoSWB.js.map +1 -0
  20. package/dist/axis-YfAerNBA.cjs +300 -0
  21. package/dist/axis-YfAerNBA.cjs.map +1 -0
  22. package/dist/{bar-BNZ3GhIw.js → bar-BOcRcArc.js} +74 -56
  23. package/dist/bar-BOcRcArc.js.map +1 -0
  24. package/dist/{bar-Da6dE_nI.cjs → bar-CVkOJ7WA.cjs} +76 -58
  25. package/dist/bar-CVkOJ7WA.cjs.map +1 -0
  26. package/dist/{bar-B5n2oq9-.js → bar-CgpC2EpX.js} +2 -2
  27. package/dist/{bar-B5n2oq9-.js.map → bar-CgpC2EpX.js.map} +1 -1
  28. package/dist/{bar-XwzM6Pb0.d.ts → bar-D9B_arKf.d.ts} +1 -1
  29. package/dist/{bar-BDLR4p9c.d.cts → bar-DZCQ-kyf.d.cts} +2 -2
  30. package/dist/{bar-LYIF8MEz.cjs → bar-wVykm1us.cjs} +2 -2
  31. package/dist/{bar-LYIF8MEz.cjs.map → bar-wVykm1us.cjs.map} +1 -1
  32. package/dist/bar.cjs +1 -1
  33. package/dist/bar.d.cts +1 -1
  34. package/dist/bar.d.ts +1 -1
  35. package/dist/bar.js +1 -1
  36. package/dist/calendar-BSvO8nRb.d.cts +106 -0
  37. package/dist/calendar-BXgIX5H1.js +502 -0
  38. package/dist/calendar-BXgIX5H1.js.map +1 -0
  39. package/dist/calendar-Bq3vFzPl.d.ts +106 -0
  40. package/dist/calendar-DAFXjV99.cjs +507 -0
  41. package/dist/calendar-DAFXjV99.cjs.map +1 -0
  42. package/dist/calendar.cjs +3 -0
  43. package/dist/calendar.d.cts +3 -0
  44. package/dist/calendar.d.ts +3 -0
  45. package/dist/calendar.js +1 -0
  46. package/dist/{candlestick-D0xKkdqd.d.ts → candlestick-B3WcLzph.d.ts} +1 -1
  47. package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-BcomxeVG.d.cts} +1 -1
  48. package/dist/{candlestick-BHQkQfxH.js → candlestick-BtT9glp9.js} +16 -14
  49. package/dist/{candlestick-BHQkQfxH.js.map → candlestick-BtT9glp9.js.map} +1 -1
  50. package/dist/{candlestick-CYCQXgky.cjs → candlestick-CSmRuZ4v.cjs} +16 -14
  51. package/dist/{candlestick-CYCQXgky.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
  52. package/dist/candlestick.cjs +3 -3
  53. package/dist/candlestick.d.cts +1 -1
  54. package/dist/candlestick.d.ts +1 -1
  55. package/dist/candlestick.js +3 -3
  56. package/dist/{cartesian-CI2x6N7N.js → cartesian-BrPqb5Qn.js} +122 -248
  57. package/dist/cartesian-BrPqb5Qn.js.map +1 -0
  58. package/dist/{cartesian-DV02PsBe.cjs → cartesian-DRSXHxWe.cjs} +146 -308
  59. package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
  60. package/dist/{chart-DWn9v6qw.js → chart-B6TTY4Kr.js} +94 -62
  61. package/dist/chart-B6TTY4Kr.js.map +1 -0
  62. package/dist/{chart-QilhWP8Z.d.ts → chart-CYrrUCi3.d.ts} +193 -56
  63. package/dist/{chart-kqFMEwDo.d.cts → chart-CbPzP5Dp.d.cts} +193 -56
  64. package/dist/{chart-e2VqomCI.cjs → chart-D_lyOy-M.cjs} +106 -68
  65. package/dist/chart-D_lyOy-M.cjs.map +1 -0
  66. package/dist/{core-PAX5ogLk.d.cts → core-9BnLEW4K.d.cts} +24 -20
  67. package/dist/{core-DRUCk67j.d.ts → core-C3qEppSm.d.ts} +7 -6
  68. package/dist/{core-BKRQvPAT.js → core-CQ0FaJ4G.js} +112 -65
  69. package/dist/core-CQ0FaJ4G.js.map +1 -0
  70. package/dist/{core-DIOC61up.cjs → core-D2PSked3.cjs} +113 -66
  71. package/dist/core-D2PSked3.cjs.map +1 -0
  72. package/dist/core.cjs +41 -31
  73. package/dist/core.d.cts +20 -17
  74. package/dist/core.d.ts +20 -17
  75. package/dist/core.js +27 -23
  76. package/dist/{dates-C2RzY3rE.js → dates-DLe2Ww64.js} +2 -2
  77. package/dist/{dates-C2RzY3rE.js.map → dates-DLe2Ww64.js.map} +1 -1
  78. package/dist/{dates-DurEr9WT.cjs → dates-DerXTb1J.cjs} +2 -2
  79. package/dist/{dates-DurEr9WT.cjs.map → dates-DerXTb1J.cjs.map} +1 -1
  80. package/dist/decimate.cjs +1 -1
  81. package/dist/decimate.js +1 -1
  82. package/dist/{dom-D_g13XWY.cjs → dom-C33zvtPo.cjs} +3 -7
  83. package/dist/dom-C33zvtPo.cjs.map +1 -0
  84. package/dist/{dom-CuceR8gt.js → dom-CTse6Rvd.js} +3 -7
  85. package/dist/dom-CTse6Rvd.js.map +1 -0
  86. package/dist/{export-chart-mYgEfK-L.cjs → export-chart-CPtXmZvi.cjs} +17 -12
  87. package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
  88. package/dist/{export-chart-83UYH48t.js → export-chart-DoeiAyR2.js} +17 -12
  89. package/dist/export-chart-DoeiAyR2.js.map +1 -0
  90. package/dist/export.cjs +2 -2
  91. package/dist/export.d.cts +1 -1
  92. package/dist/export.d.ts +1 -1
  93. package/dist/export.js +2 -2
  94. package/dist/{fade-GGxcBdss.js → fade-CDrQjnDz.js} +56 -78
  95. package/dist/fade-CDrQjnDz.js.map +1 -0
  96. package/dist/{fade-DVTkhrFU.cjs → fade-CRqcKMWY.cjs} +56 -78
  97. package/dist/fade-CRqcKMWY.cjs.map +1 -0
  98. package/dist/{features-BMxkqCyS.js → features-B55rwpQC.js} +4 -2
  99. package/dist/features-B55rwpQC.js.map +1 -0
  100. package/dist/{features-DCXEvoya.cjs → features-DEDP5CEQ.cjs} +9 -1
  101. package/dist/features-DEDP5CEQ.cjs.map +1 -0
  102. package/dist/fit-BPyPRnsK.js +16 -0
  103. package/dist/fit-BPyPRnsK.js.map +1 -0
  104. package/dist/fit-D4MIIQQz.cjs +21 -0
  105. package/dist/fit-D4MIIQQz.cjs.map +1 -0
  106. package/dist/funnel-BdcfUkb5.d.ts +50 -0
  107. package/dist/funnel-CFEEulw_.cjs +244 -0
  108. package/dist/funnel-CFEEulw_.cjs.map +1 -0
  109. package/dist/funnel-CYCv8cq2.js +239 -0
  110. package/dist/funnel-CYCv8cq2.js.map +1 -0
  111. package/dist/funnel-CarOh8w_.d.cts +50 -0
  112. package/dist/funnel.cjs +3 -0
  113. package/dist/funnel.d.cts +3 -0
  114. package/dist/funnel.d.ts +3 -0
  115. package/dist/funnel.js +1 -0
  116. package/dist/{gauge-DXkjXNCD.cjs → gauge-6HfDcLMJ.cjs} +28 -28
  117. package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
  118. package/dist/{gauge-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
  119. package/dist/gauge-DiTk5aWO.js.map +1 -0
  120. package/dist/{gauge-BSist7My.d.cts → gauge-Ds9k1UV2.d.cts} +1 -1
  121. package/dist/{gauge-0VJuAHWF.d.ts → gauge-Zy25jfps.d.ts} +1 -1
  122. package/dist/gauge.cjs +1 -1
  123. package/dist/gauge.d.cts +1 -1
  124. package/dist/gauge.d.ts +1 -1
  125. package/dist/gauge.js +1 -1
  126. package/dist/{heatmap-19BGJTKF.js → heatmap-C1v8bwpq.js} +35 -33
  127. package/dist/heatmap-C1v8bwpq.js.map +1 -0
  128. package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-CJ-0dfhJ.d.cts} +1 -1
  129. package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dcc_bsoQ.cjs} +39 -37
  130. package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
  131. package/dist/{heatmap-59lmClj9.d.ts → heatmap-Jp5sHRTo.d.ts} +1 -1
  132. package/dist/heatmap.cjs +1 -1
  133. package/dist/heatmap.d.cts +1 -1
  134. package/dist/heatmap.d.ts +1 -1
  135. package/dist/heatmap.js +1 -1
  136. package/dist/{hydrate-OA6R2_Pn.js → hydrate-BB3MlR36.js} +2 -2
  137. package/dist/{hydrate-OA6R2_Pn.js.map → hydrate-BB3MlR36.js.map} +1 -1
  138. package/dist/{hydrate-CmN1k8Mo.cjs → hydrate-m0I5m6ue.cjs} +2 -2
  139. package/dist/{hydrate-CmN1k8Mo.cjs.map → hydrate-m0I5m6ue.cjs.map} +1 -1
  140. package/dist/hydrate.cjs +2 -2
  141. package/dist/hydrate.js +2 -2
  142. package/dist/index.cjs +55 -42
  143. package/dist/index.cjs.map +1 -1
  144. package/dist/index.d.cts +21 -18
  145. package/dist/index.d.ts +21 -18
  146. package/dist/index.js +41 -34
  147. package/dist/index.js.map +1 -1
  148. package/dist/interaction-DXYSjgnP.cjs +32 -0
  149. package/dist/interaction-DXYSjgnP.cjs.map +1 -0
  150. package/dist/interaction-En1KlwFO.js +21 -0
  151. package/dist/interaction-En1KlwFO.js.map +1 -0
  152. package/dist/{layout-JY2aR-yE.cjs → layout-Cfg9x1k2.cjs} +32 -1
  153. package/dist/layout-Cfg9x1k2.cjs.map +1 -0
  154. package/dist/{layout-DmrrLjwN.js → layout-DqAte3H8.js} +27 -2
  155. package/dist/layout-DqAte3H8.js.map +1 -0
  156. package/dist/{line-DtSh7HQU.d.ts → line-Bpr5uVLQ.d.ts} +1 -1
  157. package/dist/{line-DO66LtwH.js → line-CxR4tg1Q.js} +46 -34
  158. package/dist/line-CxR4tg1Q.js.map +1 -0
  159. package/dist/{line-Dbt6KFRK.cjs → line-YiCuhVMI.cjs} +46 -34
  160. package/dist/line-YiCuhVMI.cjs.map +1 -0
  161. package/dist/{line-_rNdeKmS.d.cts → line-vyWO030v.d.cts} +2 -3
  162. package/dist/line.cjs +3 -3
  163. package/dist/line.d.cts +1 -1
  164. package/dist/line.d.ts +1 -1
  165. package/dist/line.js +3 -3
  166. package/dist/log.cjs +1 -1
  167. package/dist/log.js +1 -1
  168. package/dist/map-49FcfdmJ.d.cts +156 -0
  169. package/dist/map-BMC61J-P.d.ts +156 -0
  170. package/dist/map-BqrZ80vT.cjs +818 -0
  171. package/dist/map-BqrZ80vT.cjs.map +1 -0
  172. package/dist/map-C15NC7kW.js +807 -0
  173. package/dist/map-C15NC7kW.js.map +1 -0
  174. package/dist/map.cjs +4 -0
  175. package/dist/map.d.cts +3 -0
  176. package/dist/map.d.ts +3 -0
  177. package/dist/map.js +1 -0
  178. package/dist/maps/world.cjs +875 -0
  179. package/dist/maps/world.cjs.map +1 -0
  180. package/dist/maps/world.d.cts +2 -0
  181. package/dist/maps/world.d.ts +2 -0
  182. package/dist/maps/world.js +874 -0
  183. package/dist/maps/world.js.map +1 -0
  184. package/dist/{morph-9_LJL0ra.cjs → morph-3I1Nf_tR.cjs} +2 -2
  185. package/dist/{morph-9_LJL0ra.cjs.map → morph-3I1Nf_tR.cjs.map} +1 -1
  186. package/dist/{morph-DnRxuwR-.js → morph-GfBab-b3.js} +2 -2
  187. package/dist/{morph-DnRxuwR-.js.map → morph-GfBab-b3.js.map} +1 -1
  188. package/dist/morph.cjs +2 -2
  189. package/dist/morph.js +2 -2
  190. package/dist/{others-J7NCAMA0.js → others-DBIGE6jr.js} +11 -3
  191. package/dist/others-DBIGE6jr.js.map +1 -0
  192. package/dist/others-DBO4Kjwl.d.ts +29 -0
  193. package/dist/{others-DWdK7vKp.cjs → others-WfjCsjqT.cjs} +14 -6
  194. package/dist/others-WfjCsjqT.cjs.map +1 -0
  195. package/dist/others-ls5eKtZ4.d.cts +31 -0
  196. package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
  197. package/dist/parliament-BKN6ikBJ.js.map +1 -0
  198. package/dist/{parliament-CgsVnWEe.d.cts → parliament-C7V8UJj1.d.cts} +1 -1
  199. package/dist/{parliament-CLCI7tUO.d.ts → parliament-Cz9n_DoK.d.ts} +1 -1
  200. package/dist/{parliament-x5hcFaQ3.cjs → parliament-DhxAaIZ3.cjs} +30 -29
  201. package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
  202. package/dist/parliament.cjs +1 -1
  203. package/dist/parliament.d.cts +1 -1
  204. package/dist/parliament.d.ts +1 -1
  205. package/dist/parliament.js +1 -1
  206. package/dist/{patterns-CufKZYhm.js → patterns-BMUINoka.js} +2 -2
  207. package/dist/{patterns-CufKZYhm.js.map → patterns-BMUINoka.js.map} +1 -1
  208. package/dist/{patterns-D3-wQagb.cjs → patterns-Dw7OMD_2.cjs} +2 -2
  209. package/dist/{patterns-D3-wQagb.cjs.map → patterns-Dw7OMD_2.cjs.map} +1 -1
  210. package/dist/patterns.cjs +2 -2
  211. package/dist/patterns.d.cts +1 -1
  212. package/dist/patterns.d.ts +1 -1
  213. package/dist/patterns.js +2 -2
  214. package/dist/{percentage-bar-ybNS3goo.cjs → percentage-bar-BChkTRoz.cjs} +37 -35
  215. package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
  216. package/dist/{percentage-bar-B6tNOqNn.js → percentage-bar-CaInxrL8.js} +37 -35
  217. package/dist/percentage-bar-CaInxrL8.js.map +1 -0
  218. package/dist/{percentage-bar-tepMr7Hd.d.cts → percentage-bar-R1--2grK.d.cts} +10 -14
  219. package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-cSeiLdwU.d.ts} +10 -14
  220. package/dist/percentage-bar.cjs +1 -1
  221. package/dist/percentage-bar.d.cts +1 -1
  222. package/dist/percentage-bar.d.ts +1 -1
  223. package/dist/percentage-bar.js +1 -1
  224. package/dist/{pie-CFptILSm.d.ts → pie-BQQkvy1N.d.ts} +7 -13
  225. package/dist/{pie-CVsc-6qD.js → pie-Bd8wyrtY.js} +45 -44
  226. package/dist/pie-Bd8wyrtY.js.map +1 -0
  227. package/dist/{pie-BpjvSPnz.cjs → pie-BseZlCgP.cjs} +45 -44
  228. package/dist/pie-BseZlCgP.cjs.map +1 -0
  229. package/dist/{pie-BXg2gNpb.d.cts → pie-vD5-g8je.d.cts} +7 -13
  230. package/dist/pie.cjs +1 -1
  231. package/dist/pie.d.cts +1 -1
  232. package/dist/pie.d.ts +1 -1
  233. package/dist/pie.js +1 -1
  234. package/dist/{point-shapes--_gmdTyK.cjs → point-shapes-BRawRM78.cjs} +23 -22
  235. package/dist/point-shapes-BRawRM78.cjs.map +1 -0
  236. package/dist/{point-shapes-DD2Ektzm.js → point-shapes-DI6GhcI7.js} +18 -23
  237. package/dist/point-shapes-DI6GhcI7.js.map +1 -0
  238. package/dist/point-shapes.cjs +6 -4
  239. package/dist/point-shapes.cjs.map +1 -1
  240. package/dist/point-shapes.d.cts +2 -2
  241. package/dist/point-shapes.d.ts +2 -2
  242. package/dist/point-shapes.js +7 -5
  243. package/dist/point-shapes.js.map +1 -1
  244. package/dist/{radar-D1-lItDy.d.cts → radar-7I6hsY_h.d.cts} +1 -1
  245. package/dist/{radar-BR-mumDd.js → radar-D6XqkFWQ.js} +21 -22
  246. package/dist/radar-D6XqkFWQ.js.map +1 -0
  247. package/dist/{radar-HPDrIdzc.cjs → radar-DjISDnSf.cjs} +22 -23
  248. package/dist/radar-DjISDnSf.cjs.map +1 -0
  249. package/dist/{radar-BC9Skgpj.d.ts → radar-vLxilcr4.d.ts} +1 -1
  250. package/dist/radar.cjs +1 -1
  251. package/dist/radar.d.cts +1 -1
  252. package/dist/radar.d.ts +1 -1
  253. package/dist/radar.js +1 -1
  254. package/dist/{rect-DSVmUZrD.js → rect-CZTNvMlf.js} +2 -2
  255. package/dist/{rect-DSVmUZrD.js.map → rect-CZTNvMlf.js.map} +1 -1
  256. package/dist/{rect-D6VhynBM.cjs → rect-DPr9QRxl.cjs} +2 -2
  257. package/dist/{rect-D6VhynBM.cjs.map → rect-DPr9QRxl.cjs.map} +1 -1
  258. package/dist/{sankey-fCoo1cpz.cjs → sankey-0CSp_Er9.cjs} +72 -71
  259. package/dist/sankey-0CSp_Er9.cjs.map +1 -0
  260. package/dist/{sankey-D_v7KxnJ.d.ts → sankey-7As41Fo4.d.ts} +1 -1
  261. package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
  262. package/dist/sankey-Dp4CuLVe.js.map +1 -0
  263. package/dist/{sankey-Dk7jUt8x.d.cts → sankey-DqiuxUx7.d.cts} +1 -1
  264. package/dist/sankey.cjs +1 -1
  265. package/dist/sankey.d.cts +1 -1
  266. package/dist/sankey.d.ts +1 -1
  267. package/dist/sankey.js +1 -1
  268. package/dist/{scatter-CXEsioOJ.d.ts → scatter-BXkXGgM_.d.ts} +7 -1
  269. package/dist/{scatter-DVqB_fP9.cjs → scatter-Bwkblr4L.cjs} +40 -38
  270. package/dist/scatter-Bwkblr4L.cjs.map +1 -0
  271. package/dist/{scatter-C0TWjFpW.js → scatter-DCMAtt5L.js} +38 -36
  272. package/dist/scatter-DCMAtt5L.js.map +1 -0
  273. package/dist/{scatter-DZeEIfyo.d.cts → scatter-DL0zAV09.d.cts} +7 -1
  274. package/dist/scatter.cjs +1 -1
  275. package/dist/scatter.d.cts +1 -1
  276. package/dist/scatter.d.ts +1 -1
  277. package/dist/scatter.js +1 -1
  278. package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-BElUSd0r.d.ts} +1 -1
  279. package/dist/{sparkline-B39NA0Mi.cjs → sparkline-BMSuEPHP.cjs} +13 -15
  280. package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
  281. package/dist/{sparkline-XO_TqCNP.js → sparkline-NDmq90kP.js} +13 -15
  282. package/dist/sparkline-NDmq90kP.js.map +1 -0
  283. package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-RYly7bR0.d.cts} +1 -1
  284. package/dist/sparkline.cjs +1 -1
  285. package/dist/sparkline.d.cts +1 -1
  286. package/dist/sparkline.d.ts +1 -1
  287. package/dist/sparkline.js +1 -1
  288. package/dist/{stack-BgPzoQmv.cjs → stack-BO4624CY.cjs} +2 -2
  289. package/dist/{stack-BgPzoQmv.cjs.map → stack-BO4624CY.cjs.map} +1 -1
  290. package/dist/{stack-Dagxq7l2.d.cts → stack-BTWYIwLO.d.cts} +1 -1
  291. package/dist/{stack-2H2Gfs1Q.js → stack-jVKvg2x_.js} +2 -2
  292. package/dist/{stack-2H2Gfs1Q.js.map → stack-jVKvg2x_.js.map} +1 -1
  293. package/dist/style.css +1 -1
  294. package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-B3VekUfX.cjs} +4 -3
  295. package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
  296. package/dist/{time-axis-FLONo54E.js → time-axis-CLjqOakA.js} +3 -2
  297. package/dist/{time-axis-FLONo54E.js.map → time-axis-CLjqOakA.js.map} +1 -1
  298. package/dist/time.cjs +3 -3
  299. package/dist/time.js +3 -3
  300. package/dist/{treemap-BAkhmVQc.d.cts → treemap-25vHO_UK.d.cts} +12 -2
  301. package/dist/{treemap-BNpxFBao.d.ts → treemap-BCXUbixd.d.ts} +12 -2
  302. package/dist/{treemap-CQdavQ9u.js → treemap-C4glsx-g.js} +20 -25
  303. package/dist/treemap-C4glsx-g.js.map +1 -0
  304. package/dist/{treemap-BWpEUlDh.cjs → treemap-CZk8kKFD.cjs} +21 -26
  305. package/dist/treemap-CZk8kKFD.cjs.map +1 -0
  306. package/dist/treemap.cjs +1 -1
  307. package/dist/treemap.d.cts +1 -1
  308. package/dist/treemap.d.ts +1 -1
  309. package/dist/treemap.js +1 -1
  310. package/dist/{value-labels-BBuSi4i0.js → value-labels-C7GrhOXJ.js} +25 -5
  311. package/dist/value-labels-C7GrhOXJ.js.map +1 -0
  312. package/dist/{value-labels-BV9keAuL.cjs → value-labels-DzaKIWKp.cjs} +25 -5
  313. package/dist/value-labels-DzaKIWKp.cjs.map +1 -0
  314. package/dist/value-labels.cjs +2 -2
  315. package/dist/value-labels.d.cts +1 -1
  316. package/dist/value-labels.d.ts +1 -1
  317. package/dist/value-labels.js +2 -2
  318. package/package.json +93 -233
  319. package/dist/bar-BNZ3GhIw.js.map +0 -1
  320. package/dist/bar-Da6dE_nI.cjs.map +0 -1
  321. package/dist/cartesian-CI2x6N7N.js.map +0 -1
  322. package/dist/cartesian-DV02PsBe.cjs.map +0 -1
  323. package/dist/chart-DWn9v6qw.js.map +0 -1
  324. package/dist/chart-e2VqomCI.cjs.map +0 -1
  325. package/dist/core-BKRQvPAT.js.map +0 -1
  326. package/dist/core-DIOC61up.cjs.map +0 -1
  327. package/dist/dom-CuceR8gt.js.map +0 -1
  328. package/dist/dom-D_g13XWY.cjs.map +0 -1
  329. package/dist/export-chart-83UYH48t.js.map +0 -1
  330. package/dist/export-chart-mYgEfK-L.cjs.map +0 -1
  331. package/dist/fade-DVTkhrFU.cjs.map +0 -1
  332. package/dist/fade-GGxcBdss.js.map +0 -1
  333. package/dist/features-BMxkqCyS.js.map +0 -1
  334. package/dist/features-DCXEvoya.cjs.map +0 -1
  335. package/dist/gauge-DXkjXNCD.cjs.map +0 -1
  336. package/dist/gauge-ts0kqN1-.js.map +0 -1
  337. package/dist/heatmap-19BGJTKF.js.map +0 -1
  338. package/dist/heatmap-CXhlrLTl.cjs.map +0 -1
  339. package/dist/layout-DmrrLjwN.js.map +0 -1
  340. package/dist/layout-JY2aR-yE.cjs.map +0 -1
  341. package/dist/line-DO66LtwH.js.map +0 -1
  342. package/dist/line-Dbt6KFRK.cjs.map +0 -1
  343. package/dist/others-DWdK7vKp.cjs.map +0 -1
  344. package/dist/others-J7NCAMA0.js.map +0 -1
  345. package/dist/parliament-Cru4IcuM.js.map +0 -1
  346. package/dist/parliament-x5hcFaQ3.cjs.map +0 -1
  347. package/dist/percentage-bar-B6tNOqNn.js.map +0 -1
  348. package/dist/percentage-bar-ybNS3goo.cjs.map +0 -1
  349. package/dist/pie-BpjvSPnz.cjs.map +0 -1
  350. package/dist/pie-CVsc-6qD.js.map +0 -1
  351. package/dist/point-shapes--_gmdTyK.cjs.map +0 -1
  352. package/dist/point-shapes-DD2Ektzm.js.map +0 -1
  353. package/dist/radar-BR-mumDd.js.map +0 -1
  354. package/dist/radar-HPDrIdzc.cjs.map +0 -1
  355. package/dist/sankey-D6JeZfK5.js.map +0 -1
  356. package/dist/sankey-fCoo1cpz.cjs.map +0 -1
  357. package/dist/scatter-C0TWjFpW.js.map +0 -1
  358. package/dist/scatter-DVqB_fP9.cjs.map +0 -1
  359. package/dist/sparkline-B39NA0Mi.cjs.map +0 -1
  360. package/dist/sparkline-XO_TqCNP.js.map +0 -1
  361. package/dist/treemap-BWpEUlDh.cjs.map +0 -1
  362. package/dist/treemap-CQdavQ9u.js.map +0 -1
  363. package/dist/value-labels-BBuSi4i0.js.map +0 -1
  364. package/dist/value-labels-BV9keAuL.cjs.map +0 -1
@@ -1,216 +1,11 @@
1
- const require_format = require("./format-CAE5ruy6.cjs");
2
- const require_layout = require("./layout-JY2aR-yE.cjs");
1
+ const require_axis = require("./axis-YfAerNBA.cjs");
2
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
3
3
  const require_vnode = require("./vnode-ClAiw28x.cjs");
4
- const require_features = require("./features-DCXEvoya.cjs");
4
+ const require_features = require("./features-DEDP5CEQ.cjs");
5
+ const require_format = require("./format-CAE5ruy6.cjs");
5
6
  const require_extent = require("./extent-DuYDcvM9.cjs");
6
7
  const require_clean = require("./clean-Die2iCNc.cjs");
7
8
  const require_named = require("./named-BBASc8dW.cjs");
8
- // 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
- // src/components/axis.ts
104
- /** Ticks for a linear scale, labelled with a shared precision. */
105
- function linearTicks(scale, options = {}) {
106
- const { count = 5, format, locale } = options;
107
- const [d0, d1] = scale.domain;
108
- const fmt = require_format.formatTicks(tickStep(d0, d1, count), format, locale);
109
- return scale.ticks(count).map((value) => ({
110
- value,
111
- position: scale(value),
112
- label: fmt(value)
113
- }));
114
- }
115
- /** Ticks at the center of every band. */
116
- function bandTicks(scale, format = String) {
117
- return scale.domain.map((key, i) => ({
118
- value: key,
119
- position: scale.at(i) + scale.bandwidth / 2,
120
- label: format(key, i)
121
- }));
122
- }
123
- /** Whether labels are laid out along x (horizontal axes). */
124
- const isHorizontal = (position) => position === "top" || position === "bottom";
125
- /**
126
- * Keep every n-th tick (smallest n) so labels do not overlap along the axis.
127
- * The first and the last tick are always kept: when the last one does not
128
- * land on the step, it replaces the last kept tick if they would collide.
129
- */
130
- function thinTicks(ticks, position, fontSize, gap = 8) {
131
- if (ticks.length < 2) return ticks.slice();
132
- const size = (tick) => isHorizontal(position) ? require_layout.estimateTextWidth(tick.label, fontSize) : fontSize * require_layout.LINE_HEIGHT;
133
- const sizes = ticks.map(size);
134
- const fitsBetween = (i, j) => Math.abs(ticks[j].position - ticks[i].position) >= (sizes[i] + sizes[j]) / 2 + gap;
135
- const last = ticks.length - 1;
136
- const span = Math.abs(ticks[last].position - ticks[0].position);
137
- const total = sizes.reduce((sum, size) => sum + size + gap, 0);
138
- const first = span > 0 ? Math.max(1, Math.floor(total / span)) : last;
139
- for (let step = first; step <= last; step++) {
140
- let fits = true;
141
- for (let i = step; i <= last && fits; i += step) fits = fitsBetween(i - step, i);
142
- if (!fits) continue;
143
- const kept = [];
144
- for (let i = 0; i <= last; i += step) kept.push(i);
145
- const tail = kept[kept.length - 1];
146
- if (tail !== last) {
147
- if (fitsBetween(tail, last)) kept.push(last);
148
- else if (kept.length > 1 && fitsBetween(kept[kept.length - 2], last)) kept[kept.length - 1] = last;
149
- }
150
- return kept.map((i) => ticks[i]);
151
- }
152
- return ticks.slice(0, 1);
153
- }
154
- /** Pixels an axis occupies perpendicular to the plot edge (for margins). */
155
- function axisSize(position, ticks, fontSize, options = {}) {
156
- const { tickSize = 0, tickPadding = 8 } = options;
157
- if (ticks.length === 0) return 0;
158
- const labels = isHorizontal(position) ? fontSize * require_layout.LINE_HEIGHT : ticks.reduce((max, t) => Math.max(max, require_layout.estimateTextWidth(t.label, fontSize)), 0) + 3;
159
- return Math.ceil(labels + tickSize + tickPadding);
160
- }
161
- /**
162
- * Render an axis as `<g class="tc-axis tc-axis-{x|y} tc-axis-{position}">`
163
- * with one `<g class="tc-tick">` per tick, keyed by value so ticks can
164
- * transition when the scale changes.
165
- */
166
- function axis(options) {
167
- const { position, ticks, area, tickSize = 0, tickPadding = 8, line = false } = options;
168
- const horizontal = isHorizontal(position);
169
- const sign = position === "top" || position === "left" ? -1 : 1;
170
- const offset = sign * (tickSize + tickPadding);
171
- const edge = position === "top" ? area.y : position === "bottom" ? area.y + area.height : position === "left" ? area.x : area.x + area.width;
172
- const label = horizontal ? {
173
- y: offset,
174
- dy: position === "top" ? "0em" : "0.71em",
175
- "text-anchor": "middle"
176
- } : {
177
- x: offset,
178
- dy: "0.32em",
179
- "text-anchor": position === "left" ? "end" : "start"
180
- };
181
- const tickLine = horizontal ? { y2: sign * tickSize } : { x2: sign * tickSize };
182
- return require_vnode.h("g", {
183
- key: `axis-${position}`,
184
- class: [
185
- "tc-axis",
186
- horizontal ? "tc-axis-x" : "tc-axis-y",
187
- `tc-axis-${position}`
188
- ],
189
- "aria-hidden": "true"
190
- }, line && require_vnode.h("line", horizontal ? {
191
- class: "tc-axis-line",
192
- x1: area.x,
193
- x2: area.x + area.width,
194
- y1: edge,
195
- y2: edge
196
- } : {
197
- class: "tc-axis-line",
198
- x1: edge,
199
- x2: edge,
200
- y1: area.y,
201
- y2: area.y + area.height
202
- }), ticks.map((tick) => require_vnode.h("g", {
203
- key: tick.value,
204
- class: "tc-tick",
205
- style: horizontal ? `transform:translate(${require_layout.round(tick.position)}px,${require_layout.round(edge)}px)` : `transform:translate(${require_layout.round(edge)}px,${require_layout.round(tick.position)}px)`
206
- }, tickSize > 0 && require_vnode.h("line", {
207
- class: "tc-tick-line",
208
- ...tickLine
209
- }), require_vnode.h("text", {
210
- class: "tc-tick-label",
211
- ...label
212
- }, tick.label))));
213
- }
214
9
  // src/components/grid.ts
215
10
  /**
216
11
  * Render grid lines as `<g class="tc-grid tc-grid-{x|y}">`. The line at
@@ -341,10 +136,10 @@ function linear(domain, range, options = {}) {
341
136
  return clamp ? Math.min(dMax, Math.max(dMin, value)) : value;
342
137
  },
343
138
  ticks(count) {
344
- return ticks(d0, d1, count);
139
+ return require_axis.ticks(d0, d1, count);
345
140
  },
346
141
  nice(count) {
347
- return linear(niceDomain(d0, d1, count), range, options);
142
+ return linear(require_axis.niceDomain(d0, d1, count), range, options);
348
143
  }
349
144
  });
350
145
  }
@@ -353,6 +148,29 @@ function linear(domain, range, options = {}) {
353
148
  const labelKey = (label) => label instanceof Date ? label.getTime() : label;
354
149
  /** Stable key of a series: its `id`, or its name. */
355
150
  const seriesKey = require_named.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;
356
174
  /** Legend entries for series-based charts. */
357
175
  const seriesLegend = (data) => require_named.legendItems(data.series);
358
176
  /** Categories from `data.labels`, or `1…n` for the longest series. */
@@ -389,7 +207,7 @@ function valueScale(domain, range, options) {
389
207
  }
390
208
  /** Ticks of a value scale with labels; log scales format each power as is. */
391
209
  function valueTicks(scale, options, count, format, locale) {
392
- return options.scale === "log" ? require_features.feature("log").ticks(scale, count, format, locale) : linearTicks(scale, {
210
+ return options.scale === "log" ? require_features.feature("log").ticks(scale, count, format, locale) : require_axis.linearTicks(scale, {
393
211
  count,
394
212
  format,
395
213
  locale
@@ -400,6 +218,23 @@ const markerShape = (options) => {
400
218
  const { shapes, patterns } = options;
401
219
  return shapes ?? patterns === true ? require_features.features["point-shapes"] : void 0;
402
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 ? require_vnode.h("path", {
227
+ key,
228
+ class: [cls, "tc-marker"],
229
+ d: shape(slot, cx, cy, r)
230
+ }) : require_vnode.h("circle", {
231
+ key,
232
+ class: cls,
233
+ cx,
234
+ cy,
235
+ r
236
+ });
237
+ }
403
238
  /** The tick count asked for on an axis (a number up to 100), or `auto`. */
404
239
  const tickCount = (axis, auto) => Math.min(require_clean.finite(axis?.ticks) ?? auto, 100);
405
240
  /** Y domain from the data and axis options. */
@@ -428,7 +263,7 @@ function domainOf(values, options, zeroDefault, count) {
428
263
  if (min !== null) lo = min;
429
264
  if (max !== null) hi = max;
430
265
  if (options.nice !== false) {
431
- const [nlo, nhi] = niceDomain(lo, hi, count);
266
+ const [nlo, nhi] = require_axis.niceDomain(lo, hi, count);
432
267
  if (min === null) lo = nlo;
433
268
  if (max === null) hi = nhi;
434
269
  }
@@ -444,11 +279,20 @@ function notesFeature(options) {
444
279
  * measure the labels with (their positions mean nothing). `auto` is the
445
280
  * tick count the plot has room for, unless the axis asks for its own.
446
281
  */
447
- function valueAxis(options, ctx, layout, auto) {
448
- 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) ?? {};
449
285
  const count = tickCount(axis, Math.max(2, auto));
450
- const domain = valueDomain(options.data, axis, layout.zero, count, ctx.hidden, layout.values, notesFeature(options)?.values(options.annotations));
451
- 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;
452
296
  const scale = (range) => valueScale(domain, range, axis);
453
297
  const ticks = (of) => valueTicks(of, axis, count, format, ctx.locale);
454
298
  return {
@@ -461,12 +305,13 @@ function valueAxis(options, ctx, layout, auto) {
461
305
  * Finish a layout that has its plot area, scales and ticks with what is
462
306
  * drawn around the marks: grid lines and annotation bands below them,
463
307
  * annotation lines and the axes above. Values run along y and categories
464
- * 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`.
465
310
  */
466
- function finishLayout(options, ctx, overhang, plot, keys, time) {
467
- 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;
468
313
  const xOptions = options.x ?? {};
469
- const side = ctx.rtl ? "right" : "left";
314
+ const opposite = side === "left" ? "right" : "left";
470
315
  const notes = notesFeature(options)?.layers(options.annotations, {
471
316
  area,
472
317
  horizontal: flip,
@@ -476,17 +321,28 @@ function finishLayout(options, ctx, overhang, plot, keys, time) {
476
321
  keys,
477
322
  time
478
323
  });
479
- const values = options.y?.show !== false && [axis({
324
+ const values = options.y?.show !== false && [require_axis.axis({
480
325
  position: flip ? "bottom" : side,
481
326
  ticks: yTicks,
482
327
  area
483
328
  })];
484
- const categories = (xOptions.show !== false && plot.labels.length > 0 || xOptions.line) && [axis({
329
+ const categories = (xOptions.show !== false && plot.labels.length > 0 || xOptions.line) && [require_axis.axis({
485
330
  position: flip ? side : "bottom",
486
331
  ticks: xTicks,
487
332
  area,
488
333
  line: xOptions.line === true
489
334
  })];
335
+ const seconds = !!y2Ticks && options.y2?.show !== false && [require_axis.axis({
336
+ position: opposite,
337
+ ticks: y2Ticks,
338
+ area
339
+ })];
340
+ const title = (text, position, ticks) => !!text && require_axis.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
+ ];
490
346
  const present = (parts) => parts.flatMap((part) => part || []);
491
347
  return {
492
348
  ...plot,
@@ -506,7 +362,9 @@ function finishLayout(options, ctx, overhang, plot, keys, time) {
506
362
  foreground: present([
507
363
  notes?.over,
508
364
  flip ? categories : values,
509
- flip ? values : categories
365
+ flip ? values : categories,
366
+ seconds,
367
+ ...titles
510
368
  ]),
511
369
  clip: plotClip(ctx, area, overhang)
512
370
  };
@@ -520,14 +378,18 @@ function cartesianLayout(options, ctx, layout) {
520
378
  const overhang = layout.overhang ?? 0;
521
379
  const rtl = ctx.rtl === true;
522
380
  const reverse = xOptions.reverse ?? rtl;
523
- const pad = require_layout.mirrorSides(require_layout.insets(options.padding), rtl);
524
381
  const labels = resolveLabels(data);
525
382
  const format = labelFormatter(options, ctx);
526
383
  const showY = yOptions.show !== false;
527
384
  const showX = xOptions.show !== false && labels.length > 0;
528
385
  const timed = isTimeAxis(options) && layout.scale === "point";
529
- 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);
530
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;
531
393
  const countX = Math.max(2, Math.round(width / 80));
532
394
  const keys = labels.map(labelKey);
533
395
  const labelAt = (i) => format(labels[i], i);
@@ -537,7 +399,7 @@ function cartesianLayout(options, ctx, layout) {
537
399
  paddingInner: layout.paddingInner ?? .3,
538
400
  paddingOuter: layout.paddingOuter ?? .15
539
401
  }),
540
- ticks: (scale) => bandTicks(scale, (_, i) => labelAt(i))
402
+ ticks: (scale) => require_axis.bandTicks(scale, (_, i) => labelAt(i))
541
403
  };
542
404
  const edgeLabels = xAxis.edges;
543
405
  const halfLine = Math.ceil(fontSize * require_layout.LINE_HEIGHT / 2);
@@ -545,36 +407,43 @@ function cartesianLayout(options, ctx, layout) {
545
407
  const firstLabel = edgeWidth(reverse !== rtl);
546
408
  const lastLabel = edgeWidth(reverse === rtl);
547
409
  const edgeX = layout.scale === "point";
548
- const valueWidth = showY ? axisSize("left", probeY, fontSize) : 0;
549
- const side = (halfStep) => {
550
- const overflow = (label) => edgeX ? Math.ceil(label / 2) : Math.max(0, Math.ceil(label / 2 - halfStep));
410
+ const valueWidth = (showY ? require_axis.axisSize("left", probeY, fontSize) : 0) + require_axis.axisTitleSize(yOptions.title, fontSize);
411
+ const value2Width = value2 ? (showY2 ? require_axis.axisSize("right", value2.probe, fontSize) : 0) + require_axis.axisTitleSize(y2Options.title, fontSize) : 0;
412
+ const { area, side, range } = require_layout.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);
551
423
  return {
552
- right: pad.right + Math.max(overflow(lastLabel), overhang, 8),
553
- 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 ? require_axis.axisSize("bottom", [probeY[0]], fontSize) : showY ? halfLine : 0) + require_axis.axisTitleSize(xOptions.title, fontSize), overhang, 4),
426
+ ...both
554
427
  };
555
- };
556
- const steps = Math.max(1, labels.length) * 2;
557
- let sides = side((width - pad.left - pad.right - valueWidth) / steps);
558
- if (!edgeX) sides = side((width - sides.left - sides.right) / steps);
559
- const margins = {
560
- top: pad.top + Math.max(showY ? halfLine : 0, overhang, 4),
561
- bottom: pad.bottom + Math.max(showX ? axisSize("bottom", [probeY[0]], fontSize) : showY ? halfLine : 0, overhang, 4),
562
- ...require_layout.mirrorSides(sides, rtl)
563
- };
564
- const area = require_layout.innerRect(width, height, margins);
565
- const end = area.x + area.width;
566
- const x = xAxis.scale(reverse ? [end, area.x] : [area.x, end]);
428
+ });
429
+ const x = xAxis.scale(range(reverse));
567
430
  const y = value.scale([area.y + area.height, area.y]);
568
- const yTicks = thinTicks(value.ticks(y), "left", fontSize, 4);
569
- return finishLayout(options, ctx, overhang, {
431
+ const y2 = value2?.scale([area.y + area.height, area.y]);
432
+ const yTicks = require_axis.thinTicks(value.ticks(y), "left", fontSize, 4);
433
+ const plot = {
570
434
  area,
571
435
  labels,
572
436
  x,
573
437
  y,
574
438
  horizontal: false,
575
- xTicks: showX ? thinTicks(xAxis.ticks(x), "bottom", fontSize) : [],
439
+ xTicks: showX ? require_axis.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 = require_axis.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 = require_format.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) => require_format.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,
@@ -693,41 +566,24 @@ function seriesTable(options, ctx, limit = Number.POSITIVE_INFINITY) {
693
566
  const all = resolveLabels(options.data);
694
567
  const labels = all.length > limit ? all.slice(0, limit) : all;
695
568
  const formatLabel = labelFormatter(options, ctx);
696
- const formatValue = require_format.formatDetail(options.y?.format, ctx.locale);
569
+ const axisOf = seriesAxes(options);
697
570
  const series = options.data.series.filter((s) => !ctx.hidden.has(seriesKey(s)));
571
+ const formats = series.map((s) => require_format.formatDetail(axisOf(s).axis.format, ctx.locale));
698
572
  return {
699
573
  columns: ["", ...series.map((s) => s.name)],
700
574
  total: all.length,
701
- rows: labels.map((label, i) => [formatLabel(label, i), ...series.map((s) => {
575
+ rows: labels.map((label, i) => [formatLabel(label, i), ...series.map((s, n) => {
702
576
  const v = s.values[i];
703
- return v == null || !Number.isFinite(v) ? "–" : formatValue(v);
577
+ return v == null || !Number.isFinite(v) ? "–" : formats[n](v);
704
578
  })])
705
579
  };
706
580
  }
707
- Object.defineProperty(exports, "axis", {
708
- enumerable: true,
709
- get: function() {
710
- return axis;
711
- }
712
- });
713
- Object.defineProperty(exports, "axisSize", {
714
- enumerable: true,
715
- get: function() {
716
- return axisSize;
717
- }
718
- });
719
581
  Object.defineProperty(exports, "band", {
720
582
  enumerable: true,
721
583
  get: function() {
722
584
  return band;
723
585
  }
724
586
  });
725
- Object.defineProperty(exports, "bandTicks", {
726
- enumerable: true,
727
- get: function() {
728
- return bandTicks;
729
- }
730
- });
731
587
  Object.defineProperty(exports, "cartesianLayout", {
732
588
  enumerable: true,
733
589
  get: function() {
@@ -776,24 +632,12 @@ Object.defineProperty(exports, "linear", {
776
632
  return linear;
777
633
  }
778
634
  });
779
- Object.defineProperty(exports, "linearTicks", {
780
- enumerable: true,
781
- get: function() {
782
- return linearTicks;
783
- }
784
- });
785
635
  Object.defineProperty(exports, "markerShape", {
786
636
  enumerable: true,
787
637
  get: function() {
788
638
  return markerShape;
789
639
  }
790
640
  });
791
- Object.defineProperty(exports, "niceDomain", {
792
- enumerable: true,
793
- get: function() {
794
- return niceDomain;
795
- }
796
- });
797
641
  Object.defineProperty(exports, "plotClip", {
798
642
  enumerable: true,
799
643
  get: function() {
@@ -812,6 +656,12 @@ Object.defineProperty(exports, "point", {
812
656
  return point;
813
657
  }
814
658
  });
659
+ Object.defineProperty(exports, "pointMark", {
660
+ enumerable: true,
661
+ get: function() {
662
+ return pointMark;
663
+ }
664
+ });
815
665
  Object.defineProperty(exports, "resolveLabels", {
816
666
  enumerable: true,
817
667
  get: function() {
@@ -824,6 +674,12 @@ Object.defineProperty(exports, "seriesAttrs", {
824
674
  return seriesAttrs;
825
675
  }
826
676
  });
677
+ Object.defineProperty(exports, "seriesAxes", {
678
+ enumerable: true,
679
+ get: function() {
680
+ return seriesAxes;
681
+ }
682
+ });
827
683
  Object.defineProperty(exports, "seriesKey", {
828
684
  enumerable: true,
829
685
  get: function() {
@@ -836,16 +692,16 @@ Object.defineProperty(exports, "seriesLegend", {
836
692
  return seriesLegend;
837
693
  }
838
694
  });
839
- Object.defineProperty(exports, "seriesTable", {
695
+ Object.defineProperty(exports, "seriesScale", {
840
696
  enumerable: true,
841
697
  get: function() {
842
- return seriesTable;
698
+ return seriesScale;
843
699
  }
844
700
  });
845
- Object.defineProperty(exports, "thinTicks", {
701
+ Object.defineProperty(exports, "seriesTable", {
846
702
  enumerable: true,
847
703
  get: function() {
848
- return thinTicks;
704
+ return seriesTable;
849
705
  }
850
706
  });
851
707
  Object.defineProperty(exports, "tickCount", {
@@ -854,24 +710,6 @@ Object.defineProperty(exports, "tickCount", {
854
710
  return tickCount;
855
711
  }
856
712
  });
857
- Object.defineProperty(exports, "tickIncrement", {
858
- enumerable: true,
859
- get: function() {
860
- return tickIncrement;
861
- }
862
- });
863
- Object.defineProperty(exports, "tickStep", {
864
- enumerable: true,
865
- get: function() {
866
- return tickStep;
867
- }
868
- });
869
- Object.defineProperty(exports, "ticks", {
870
- enumerable: true,
871
- get: function() {
872
- return ticks;
873
- }
874
- });
875
713
  Object.defineProperty(exports, "toMs", {
876
714
  enumerable: true,
877
715
  get: function() {
@@ -897,4 +735,4 @@ Object.defineProperty(exports, "valueTicks", {
897
735
  }
898
736
  });
899
737
 
900
- //# sourceMappingURL=cartesian-DV02PsBe.cjs.map
738
+ //# sourceMappingURL=cartesian-DRSXHxWe.cjs.map