@tabler/charts 0.2.0 → 0.4.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.
- package/README.md +165 -17
- package/dist/{annotations-DdRdeBUB.cjs → annotations--m-HzMBM.cjs} +87 -11
- package/dist/annotations--m-HzMBM.cjs.map +1 -0
- package/dist/{annotations-B02GR_KU.d.ts → annotations-CCDUC1lW.d.ts} +16 -30
- package/dist/{annotations-CHafaGd4.d.cts → annotations-CqZM1z9R.d.cts} +16 -30
- package/dist/{annotations-D0YQ0IoA.js → annotations-DGITy6th.js} +87 -11
- package/dist/annotations-DGITy6th.js.map +1 -0
- package/dist/annotations.cjs +2 -2
- package/dist/annotations.d.cts +1 -1
- package/dist/annotations.d.ts +1 -1
- package/dist/annotations.js +2 -2
- package/dist/{area-0-L1bG9B.js → area-BN0uE9R0.js} +4 -3
- package/dist/area-BN0uE9R0.js.map +1 -0
- package/dist/{area-CJX9219z.d.cts → area-D6LNLk3r.d.cts} +2 -2
- package/dist/{area-d11XePuw.d.ts → area-DEFL-Yun.d.ts} +2 -2
- package/dist/{area-4eRs3c0K.cjs → area-D_N8b4Ng.cjs} +4 -3
- package/dist/area-D_N8b4Ng.cjs.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.d.cts +1 -1
- package/dist/area.d.ts +1 -1
- package/dist/area.js +1 -1
- package/dist/axis-BzBkkC5X.cjs +305 -0
- package/dist/axis-BzBkkC5X.cjs.map +1 -0
- package/dist/axis-C5obgdJt.js +240 -0
- package/dist/axis-C5obgdJt.js.map +1 -0
- package/dist/{bar-Da6dE_nI.cjs → bar-BrmfXugT.cjs} +77 -58
- package/dist/bar-BrmfXugT.cjs.map +1 -0
- package/dist/{bar-XwzM6Pb0.d.ts → bar-Bs_rPqgR.d.ts} +1 -1
- package/dist/{bar-BDLR4p9c.d.cts → bar-CEt8YRxf.d.cts} +2 -2
- package/dist/{bar-B5n2oq9-.js → bar-CgpC2EpX.js} +2 -2
- package/dist/{bar-B5n2oq9-.js.map → bar-CgpC2EpX.js.map} +1 -1
- package/dist/{bar-BNZ3GhIw.js → bar-D_KKd2fL.js} +75 -56
- package/dist/bar-D_KKd2fL.js.map +1 -0
- package/dist/{bar-LYIF8MEz.cjs → bar-wVykm1us.cjs} +2 -2
- package/dist/{bar-LYIF8MEz.cjs.map → bar-wVykm1us.cjs.map} +1 -1
- package/dist/bar.cjs +1 -1
- package/dist/bar.d.cts +1 -1
- package/dist/bar.d.ts +1 -1
- package/dist/bar.js +1 -1
- package/dist/calendar-B7843sQu.d.cts +106 -0
- package/dist/calendar-BG_q_NC_.cjs +507 -0
- package/dist/calendar-BG_q_NC_.cjs.map +1 -0
- package/dist/calendar-CF3gfDQk.js +502 -0
- package/dist/calendar-CF3gfDQk.js.map +1 -0
- package/dist/calendar-D10_ki1S.d.ts +106 -0
- package/dist/calendar.cjs +3 -0
- package/dist/calendar.d.cts +3 -0
- package/dist/calendar.d.ts +3 -0
- package/dist/calendar.js +1 -0
- package/dist/{candlestick-BHQkQfxH.js → candlestick-B1onjo1o.js} +17 -14
- package/dist/candlestick-B1onjo1o.js.map +1 -0
- package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-B7YXUVVh.d.cts} +4 -3
- package/dist/{candlestick-CYCQXgky.cjs → candlestick-BwrFKak_.cjs} +17 -14
- package/dist/candlestick-BwrFKak_.cjs.map +1 -0
- package/dist/{candlestick-D0xKkdqd.d.ts → candlestick-XpqJvarq.d.ts} +4 -3
- package/dist/candlestick.cjs +3 -3
- package/dist/candlestick.d.cts +1 -1
- package/dist/candlestick.d.ts +1 -1
- package/dist/candlestick.js +3 -3
- package/dist/{cartesian-DV02PsBe.cjs → cartesian-B9CrasFJ.cjs} +190 -310
- package/dist/cartesian-B9CrasFJ.cjs.map +1 -0
- package/dist/{cartesian-CI2x6N7N.js → cartesian-COglz544.js} +161 -251
- package/dist/cartesian-COglz544.js.map +1 -0
- package/dist/{chart-DWn9v6qw.js → chart-B97FBRCd.js} +114 -72
- package/dist/chart-B97FBRCd.js.map +1 -0
- package/dist/{chart-QilhWP8Z.d.ts → chart-CE9EVbfV.d.ts} +427 -112
- package/dist/{chart-kqFMEwDo.d.cts → chart-Dz4geQZy.d.cts} +427 -112
- package/dist/{chart-e2VqomCI.cjs → chart-GUmmjJ7S.cjs} +132 -78
- package/dist/chart-GUmmjJ7S.cjs.map +1 -0
- package/dist/{core-BKRQvPAT.js → core-7fgM3su0.js} +188 -73
- package/dist/core-7fgM3su0.js.map +1 -0
- package/dist/{core-DRUCk67j.d.ts → core-BUQzLsRJ.d.ts} +26 -10
- package/dist/{core-DIOC61up.cjs → core-BZTrsPxc.cjs} +200 -73
- package/dist/core-BZTrsPxc.cjs.map +1 -0
- package/dist/{core-PAX5ogLk.d.cts → core-Ck5uHcW8.d.cts} +45 -24
- package/dist/core.cjs +45 -31
- package/dist/core.d.cts +23 -18
- package/dist/core.d.ts +23 -18
- package/dist/core.js +28 -23
- package/dist/{dates-DurEr9WT.cjs → dates-0YNY49KQ.cjs} +2 -2
- package/dist/{dates-DurEr9WT.cjs.map → dates-0YNY49KQ.cjs.map} +1 -1
- package/dist/{dates-C2RzY3rE.js → dates-CKDRgpin.js} +2 -2
- package/dist/{dates-C2RzY3rE.js.map → dates-CKDRgpin.js.map} +1 -1
- package/dist/decimate.cjs +1 -1
- package/dist/decimate.js +1 -1
- package/dist/{dom-D_g13XWY.cjs → dom-C33zvtPo.cjs} +3 -7
- package/dist/dom-C33zvtPo.cjs.map +1 -0
- package/dist/{dom-CuceR8gt.js → dom-CTse6Rvd.js} +3 -7
- package/dist/dom-CTse6Rvd.js.map +1 -0
- package/dist/end-labels-B3oRvjxw.js +114 -0
- package/dist/end-labels-B3oRvjxw.js.map +1 -0
- package/dist/end-labels-CS-fnpp-.cjs +119 -0
- package/dist/end-labels-CS-fnpp-.cjs.map +1 -0
- package/dist/end-labels.cjs +11 -0
- package/dist/end-labels.cjs.map +1 -0
- package/dist/end-labels.d.cts +6 -0
- package/dist/end-labels.d.ts +6 -0
- package/dist/end-labels.js +11 -0
- package/dist/end-labels.js.map +1 -0
- package/dist/{export-chart-83UYH48t.js → export-chart-BOH_nfcH.js} +92 -15
- package/dist/export-chart-BOH_nfcH.js.map +1 -0
- package/dist/{export-chart-mYgEfK-L.cjs → export-chart-Be4T9J3m.cjs} +97 -14
- package/dist/export-chart-Be4T9J3m.cjs.map +1 -0
- package/dist/export.cjs +5 -3
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +4 -3
- package/dist/export.d.ts +4 -3
- package/dist/export.js +5 -4
- package/dist/export.js.map +1 -1
- package/dist/{fade-GGxcBdss.js → fade-CDrQjnDz.js} +56 -78
- package/dist/fade-CDrQjnDz.js.map +1 -0
- package/dist/{fade-DVTkhrFU.cjs → fade-CRqcKMWY.cjs} +56 -78
- package/dist/fade-CRqcKMWY.cjs.map +1 -0
- package/dist/{features-BMxkqCyS.js → features-B55rwpQC.js} +4 -2
- package/dist/features-B55rwpQC.js.map +1 -0
- package/dist/{features-DCXEvoya.cjs → features-DEDP5CEQ.cjs} +9 -1
- package/dist/features-DEDP5CEQ.cjs.map +1 -0
- package/dist/fit-BPyPRnsK.js +16 -0
- package/dist/fit-BPyPRnsK.js.map +1 -0
- package/dist/fit-D4MIIQQz.cjs +21 -0
- package/dist/fit-D4MIIQQz.cjs.map +1 -0
- package/dist/funnel-B9ridzNx.d.cts +50 -0
- package/dist/funnel-CFEEulw_.cjs +244 -0
- package/dist/funnel-CFEEulw_.cjs.map +1 -0
- package/dist/funnel-CYCv8cq2.js +239 -0
- package/dist/funnel-CYCv8cq2.js.map +1 -0
- package/dist/funnel-FogM8flk.d.ts +50 -0
- package/dist/funnel.cjs +3 -0
- package/dist/funnel.d.cts +3 -0
- package/dist/funnel.d.ts +3 -0
- package/dist/funnel.js +1 -0
- package/dist/{gauge-DXkjXNCD.cjs → gauge-6HfDcLMJ.cjs} +28 -28
- package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
- package/dist/{gauge-BSist7My.d.cts → gauge-BScJ7U6O.d.cts} +2 -2
- package/dist/{gauge-0VJuAHWF.d.ts → gauge-D78oq1Lx.d.ts} +2 -2
- package/dist/{gauge-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
- package/dist/gauge-DiTk5aWO.js.map +1 -0
- package/dist/gauge.cjs +1 -1
- package/dist/gauge.d.cts +1 -1
- package/dist/gauge.d.ts +1 -1
- package/dist/gauge.js +1 -1
- package/dist/heat-Bsqq4zw9.js +38 -0
- package/dist/heat-Bsqq4zw9.js.map +1 -0
- package/dist/heat-DYsivvDq.cjs +49 -0
- package/dist/heat-DYsivvDq.cjs.map +1 -0
- package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dyzrd4Fd.cjs} +39 -37
- package/dist/heatmap-Dyzrd4Fd.cjs.map +1 -0
- package/dist/{heatmap-19BGJTKF.js → heatmap-J7fxG7MM.js} +35 -33
- package/dist/heatmap-J7fxG7MM.js.map +1 -0
- package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-Jvwo7iFW.d.cts} +2 -2
- package/dist/{heatmap-59lmClj9.d.ts → heatmap-mFCnP6aB.d.ts} +2 -2
- package/dist/heatmap.cjs +1 -1
- package/dist/heatmap.d.cts +1 -1
- package/dist/heatmap.d.ts +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/{hydrate-OA6R2_Pn.js → hydrate-BB3MlR36.js} +2 -2
- package/dist/{hydrate-OA6R2_Pn.js.map → hydrate-BB3MlR36.js.map} +1 -1
- package/dist/{hydrate-CmN1k8Mo.cjs → hydrate-m0I5m6ue.cjs} +2 -2
- package/dist/{hydrate-CmN1k8Mo.cjs.map → hydrate-m0I5m6ue.cjs.map} +1 -1
- package/dist/hydrate.cjs +2 -2
- package/dist/hydrate.js +2 -2
- package/dist/index.cjs +69 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -19
- package/dist/index.d.ts +24 -19
- package/dist/index.js +51 -37
- package/dist/index.js.map +1 -1
- package/dist/interaction-DXYSjgnP.cjs +32 -0
- package/dist/interaction-DXYSjgnP.cjs.map +1 -0
- package/dist/interaction-En1KlwFO.js +21 -0
- package/dist/interaction-En1KlwFO.js.map +1 -0
- package/dist/layout-CYerDebD.d.cts +29 -0
- package/dist/layout-CYerDebD.d.ts +29 -0
- package/dist/{layout-JY2aR-yE.cjs → layout-Cfg9x1k2.cjs} +32 -1
- package/dist/layout-Cfg9x1k2.cjs.map +1 -0
- package/dist/{layout-DmrrLjwN.js → layout-DqAte3H8.js} +27 -2
- package/dist/layout-DqAte3H8.js.map +1 -0
- package/dist/{line-DO66LtwH.js → line-CXH0L10d.js} +84 -37
- package/dist/line-CXH0L10d.js.map +1 -0
- package/dist/{line-_rNdeKmS.d.cts → line-Cu9ctpbv.d.cts} +9 -3
- package/dist/{line-Dbt6KFRK.cjs → line-DHbYCQy4.cjs} +84 -37
- package/dist/line-DHbYCQy4.cjs.map +1 -0
- package/dist/{line-DtSh7HQU.d.ts → line-TkzA7wMK.d.ts} +8 -1
- package/dist/line.cjs +3 -3
- package/dist/line.d.cts +1 -1
- package/dist/line.d.ts +1 -1
- package/dist/line.js +3 -3
- package/dist/log.cjs +1 -1
- package/dist/log.js +1 -1
- package/dist/map-BirylCmT.d.cts +156 -0
- package/dist/map-CYp6x-uS.js +784 -0
- package/dist/map-CYp6x-uS.js.map +1 -0
- package/dist/map-ChwSgooH.cjs +795 -0
- package/dist/map-ChwSgooH.cjs.map +1 -0
- package/dist/map-DNqog2Xs.d.ts +156 -0
- package/dist/map.cjs +4 -0
- package/dist/map.d.cts +3 -0
- package/dist/map.d.ts +3 -0
- package/dist/map.js +1 -0
- package/dist/maps/world.cjs +875 -0
- package/dist/maps/world.cjs.map +1 -0
- package/dist/maps/world.d.cts +2 -0
- package/dist/maps/world.d.ts +2 -0
- package/dist/maps/world.js +874 -0
- package/dist/maps/world.js.map +1 -0
- package/dist/{morph-9_LJL0ra.cjs → morph-3I1Nf_tR.cjs} +2 -2
- package/dist/{morph-9_LJL0ra.cjs.map → morph-3I1Nf_tR.cjs.map} +1 -1
- package/dist/{morph-DnRxuwR-.js → morph-GfBab-b3.js} +2 -2
- package/dist/{morph-DnRxuwR-.js.map → morph-GfBab-b3.js.map} +1 -1
- package/dist/morph.cjs +2 -2
- package/dist/morph.js +2 -2
- package/dist/others-CuNdpvjd.d.cts +31 -0
- package/dist/{others-J7NCAMA0.js → others-DBIGE6jr.js} +11 -3
- package/dist/others-DBIGE6jr.js.map +1 -0
- package/dist/others-DBO4Kjwl.d.ts +29 -0
- package/dist/{others-DWdK7vKp.cjs → others-WfjCsjqT.cjs} +14 -6
- package/dist/others-WfjCsjqT.cjs.map +1 -0
- package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
- package/dist/parliament-BKN6ikBJ.js.map +1 -0
- package/dist/{parliament-CLCI7tUO.d.ts → parliament-CHdf13XU.d.ts} +2 -2
- package/dist/{parliament-CgsVnWEe.d.cts → parliament-CsYgh4N2.d.cts} +2 -2
- package/dist/{parliament-x5hcFaQ3.cjs → parliament-DhxAaIZ3.cjs} +30 -29
- package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
- package/dist/parliament.cjs +1 -1
- package/dist/parliament.d.cts +1 -1
- package/dist/parliament.d.ts +1 -1
- package/dist/parliament.js +1 -1
- package/dist/{patterns-D3-wQagb.cjs → patterns-BPN1c9qe.cjs} +2 -2
- package/dist/{patterns-D3-wQagb.cjs.map → patterns-BPN1c9qe.cjs.map} +1 -1
- package/dist/{patterns-CufKZYhm.js → patterns-CVrLrJXg.js} +2 -2
- package/dist/{patterns-CufKZYhm.js.map → patterns-CVrLrJXg.js.map} +1 -1
- package/dist/patterns.cjs +2 -2
- package/dist/patterns.d.cts +1 -1
- package/dist/patterns.d.ts +1 -1
- package/dist/patterns.js +2 -2
- package/dist/{percentage-bar-ybNS3goo.cjs → percentage-bar-BChkTRoz.cjs} +37 -35
- package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
- package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-CSAbzDOn.d.ts} +11 -15
- package/dist/{percentage-bar-B6tNOqNn.js → percentage-bar-CaInxrL8.js} +37 -35
- package/dist/percentage-bar-CaInxrL8.js.map +1 -0
- package/dist/{percentage-bar-tepMr7Hd.d.cts → percentage-bar-UZHCRvlK.d.cts} +11 -15
- package/dist/percentage-bar.cjs +1 -1
- package/dist/percentage-bar.d.cts +1 -1
- package/dist/percentage-bar.d.ts +1 -1
- package/dist/percentage-bar.js +1 -1
- package/dist/{pie-BXg2gNpb.d.cts → pie-AFedsDcF.d.cts} +17 -14
- package/dist/{pie-CVsc-6qD.js → pie-Ch6Bx0ih.js} +68 -52
- package/dist/pie-Ch6Bx0ih.js.map +1 -0
- package/dist/{pie-BpjvSPnz.cjs → pie-Cll1OrVZ.cjs} +68 -52
- package/dist/pie-Cll1OrVZ.cjs.map +1 -0
- package/dist/{pie-CFptILSm.d.ts → pie-Cn2H3pz8.d.ts} +17 -14
- package/dist/pie.cjs +1 -1
- package/dist/pie.d.cts +1 -1
- package/dist/pie.d.ts +1 -1
- package/dist/pie.js +1 -1
- package/dist/{point-shapes--_gmdTyK.cjs → point-shapes-BRawRM78.cjs} +23 -22
- package/dist/point-shapes-BRawRM78.cjs.map +1 -0
- package/dist/{point-shapes-DD2Ektzm.js → point-shapes-DI6GhcI7.js} +18 -23
- package/dist/point-shapes-DI6GhcI7.js.map +1 -0
- package/dist/point-shapes.cjs +6 -4
- package/dist/point-shapes.cjs.map +1 -1
- package/dist/point-shapes.d.cts +2 -2
- package/dist/point-shapes.d.ts +2 -2
- package/dist/point-shapes.js +7 -5
- package/dist/point-shapes.js.map +1 -1
- package/dist/{radar-BR-mumDd.js → radar-Bg-IiIWB.js} +21 -22
- package/dist/radar-Bg-IiIWB.js.map +1 -0
- package/dist/{radar-BC9Skgpj.d.ts → radar-DEer2jjd.d.ts} +2 -2
- package/dist/{radar-D1-lItDy.d.cts → radar-DxmjXhMc.d.cts} +2 -2
- package/dist/{radar-HPDrIdzc.cjs → radar-wDyX17S3.cjs} +22 -23
- package/dist/radar-wDyX17S3.cjs.map +1 -0
- package/dist/radar.cjs +1 -1
- package/dist/radar.d.cts +1 -1
- package/dist/radar.d.ts +1 -1
- package/dist/radar.js +1 -1
- package/dist/range-bar-BnKjJP89.cjs +348 -0
- package/dist/range-bar-BnKjJP89.cjs.map +1 -0
- package/dist/range-bar-C4cRaaQE.d.ts +123 -0
- package/dist/range-bar-D32dIQOY.d.cts +123 -0
- package/dist/range-bar-Dx6ce0J1.js +343 -0
- package/dist/range-bar-Dx6ce0J1.js.map +1 -0
- package/dist/range-bar.cjs +3 -0
- package/dist/range-bar.d.cts +3 -0
- package/dist/range-bar.d.ts +3 -0
- package/dist/range-bar.js +1 -0
- package/dist/{rect-DSVmUZrD.js → rect-CZTNvMlf.js} +2 -2
- package/dist/{rect-DSVmUZrD.js.map → rect-CZTNvMlf.js.map} +1 -1
- package/dist/{rect-D6VhynBM.cjs → rect-DPr9QRxl.cjs} +2 -2
- package/dist/{rect-D6VhynBM.cjs.map → rect-DPr9QRxl.cjs.map} +1 -1
- package/dist/{sankey-fCoo1cpz.cjs → sankey-0CSp_Er9.cjs} +72 -71
- package/dist/sankey-0CSp_Er9.cjs.map +1 -0
- package/dist/{sankey-Dk7jUt8x.d.cts → sankey-D-8ATwBT.d.cts} +2 -2
- package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
- package/dist/sankey-Dp4CuLVe.js.map +1 -0
- package/dist/{sankey-D_v7KxnJ.d.ts → sankey-DpYJsOI4.d.ts} +2 -2
- package/dist/sankey.cjs +1 -1
- package/dist/sankey.d.cts +1 -1
- package/dist/sankey.d.ts +1 -1
- package/dist/sankey.js +1 -1
- package/dist/{scatter-C0TWjFpW.js → scatter-0Z7K_YUz.js} +94 -46
- package/dist/scatter-0Z7K_YUz.js.map +1 -0
- package/dist/{scatter-CXEsioOJ.d.ts → scatter-BAL5K9_4.d.ts} +28 -9
- package/dist/{scatter-DZeEIfyo.d.cts → scatter-BUGbnRzM.d.cts} +28 -9
- package/dist/{scatter-DVqB_fP9.cjs → scatter-CZ8do3Up.cjs} +95 -47
- package/dist/scatter-CZ8do3Up.cjs.map +1 -0
- package/dist/scatter.cjs +1 -1
- package/dist/scatter.d.cts +2 -2
- package/dist/scatter.d.ts +2 -2
- package/dist/scatter.js +1 -1
- package/dist/slice-labels-1TBq7p3q.d.cts +28 -0
- package/dist/slice-labels-C9ucsBVW.js +88 -0
- package/dist/slice-labels-C9ucsBVW.js.map +1 -0
- package/dist/slice-labels-CbFiy46l.cjs +93 -0
- package/dist/slice-labels-CbFiy46l.cjs.map +1 -0
- package/dist/slice-labels-Cm5CyV7B.d.ts +28 -0
- package/dist/slice-labels.cjs +11 -0
- package/dist/slice-labels.cjs.map +1 -0
- package/dist/slice-labels.d.cts +6 -0
- package/dist/slice-labels.d.ts +6 -0
- package/dist/slice-labels.js +11 -0
- package/dist/slice-labels.js.map +1 -0
- package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-CtoBJe-a.d.ts} +2 -2
- package/dist/{sparkline-B39NA0Mi.cjs → sparkline-DjR-V6BI.cjs} +13 -15
- package/dist/sparkline-DjR-V6BI.cjs.map +1 -0
- package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-DwHJfeZz.d.cts} +2 -2
- package/dist/{sparkline-XO_TqCNP.js → sparkline-_dxwtdli.js} +13 -15
- package/dist/sparkline-_dxwtdli.js.map +1 -0
- package/dist/sparkline.cjs +1 -1
- package/dist/sparkline.d.cts +1 -1
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/{stack-Dagxq7l2.d.cts → stack-CcmyALx0.d.cts} +1 -1
- package/dist/{stack-2H2Gfs1Q.js → stack-CyVlS7Fr.js} +2 -2
- package/dist/{stack-2H2Gfs1Q.js.map → stack-CyVlS7Fr.js.map} +1 -1
- package/dist/{stack-BgPzoQmv.cjs → stack-DBhmYNat.cjs} +2 -2
- package/dist/{stack-BgPzoQmv.cjs.map → stack-DBhmYNat.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-CVKjQKSS.cjs} +4 -3
- package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-CVKjQKSS.cjs.map} +1 -1
- package/dist/{time-axis-FLONo54E.js → time-axis-CkmbAw4Z.js} +3 -2
- package/dist/{time-axis-FLONo54E.js.map → time-axis-CkmbAw4Z.js.map} +1 -1
- package/dist/time.cjs +3 -3
- package/dist/time.js +3 -3
- package/dist/{treemap-BAkhmVQc.d.cts → treemap-C2maqerU.d.cts} +37 -5
- package/dist/{treemap-BNpxFBao.d.ts → treemap-D_zbubo3.d.ts} +37 -5
- package/dist/{treemap-BWpEUlDh.cjs → treemap-PulGXZv0.cjs} +58 -33
- package/dist/treemap-PulGXZv0.cjs.map +1 -0
- package/dist/{treemap-CQdavQ9u.js → treemap-lbYxb-7h.js} +57 -32
- package/dist/treemap-lbYxb-7h.js.map +1 -0
- package/dist/treemap.cjs +1 -1
- package/dist/treemap.d.cts +1 -1
- package/dist/treemap.d.ts +1 -1
- package/dist/treemap.js +1 -1
- package/dist/{value-labels-BBuSi4i0.js → value-labels-B0VeheyE.js} +29 -8
- package/dist/value-labels-B0VeheyE.js.map +1 -0
- package/dist/{value-labels-BV9keAuL.cjs → value-labels-Dcyk3GIY.cjs} +29 -8
- package/dist/value-labels-Dcyk3GIY.cjs.map +1 -0
- package/dist/value-labels.cjs +2 -2
- package/dist/value-labels.d.cts +1 -1
- package/dist/value-labels.d.ts +1 -1
- package/dist/value-labels.js +2 -2
- package/dist/zoom.cjs +810 -0
- package/dist/zoom.cjs.map +1 -0
- package/dist/zoom.d.cts +34 -0
- package/dist/zoom.d.ts +34 -0
- package/dist/zoom.js +806 -0
- package/dist/zoom.js.map +1 -0
- package/package.json +120 -235
- package/dist/annotations-D0YQ0IoA.js.map +0 -1
- package/dist/annotations-DdRdeBUB.cjs.map +0 -1
- package/dist/area-0-L1bG9B.js.map +0 -1
- package/dist/area-4eRs3c0K.cjs.map +0 -1
- package/dist/bar-BNZ3GhIw.js.map +0 -1
- package/dist/bar-Da6dE_nI.cjs.map +0 -1
- package/dist/candlestick-BHQkQfxH.js.map +0 -1
- package/dist/candlestick-CYCQXgky.cjs.map +0 -1
- package/dist/cartesian-CI2x6N7N.js.map +0 -1
- package/dist/cartesian-DV02PsBe.cjs.map +0 -1
- package/dist/chart-DWn9v6qw.js.map +0 -1
- package/dist/chart-e2VqomCI.cjs.map +0 -1
- package/dist/core-BKRQvPAT.js.map +0 -1
- package/dist/core-DIOC61up.cjs.map +0 -1
- package/dist/dom-CuceR8gt.js.map +0 -1
- package/dist/dom-D_g13XWY.cjs.map +0 -1
- package/dist/export-chart-83UYH48t.js.map +0 -1
- package/dist/export-chart-mYgEfK-L.cjs.map +0 -1
- package/dist/fade-DVTkhrFU.cjs.map +0 -1
- package/dist/fade-GGxcBdss.js.map +0 -1
- package/dist/features-BMxkqCyS.js.map +0 -1
- package/dist/features-DCXEvoya.cjs.map +0 -1
- package/dist/gauge-DXkjXNCD.cjs.map +0 -1
- package/dist/gauge-ts0kqN1-.js.map +0 -1
- package/dist/heatmap-19BGJTKF.js.map +0 -1
- package/dist/heatmap-CXhlrLTl.cjs.map +0 -1
- package/dist/layout-DmrrLjwN.js.map +0 -1
- package/dist/layout-JY2aR-yE.cjs.map +0 -1
- package/dist/line-DO66LtwH.js.map +0 -1
- package/dist/line-Dbt6KFRK.cjs.map +0 -1
- package/dist/others-DWdK7vKp.cjs.map +0 -1
- package/dist/others-J7NCAMA0.js.map +0 -1
- package/dist/parliament-Cru4IcuM.js.map +0 -1
- package/dist/parliament-x5hcFaQ3.cjs.map +0 -1
- package/dist/percentage-bar-B6tNOqNn.js.map +0 -1
- package/dist/percentage-bar-ybNS3goo.cjs.map +0 -1
- package/dist/pie-BpjvSPnz.cjs.map +0 -1
- package/dist/pie-CVsc-6qD.js.map +0 -1
- package/dist/point-shapes--_gmdTyK.cjs.map +0 -1
- package/dist/point-shapes-DD2Ektzm.js.map +0 -1
- package/dist/radar-BR-mumDd.js.map +0 -1
- package/dist/radar-HPDrIdzc.cjs.map +0 -1
- package/dist/sankey-D6JeZfK5.js.map +0 -1
- package/dist/sankey-fCoo1cpz.cjs.map +0 -1
- package/dist/scatter-C0TWjFpW.js.map +0 -1
- package/dist/scatter-DVqB_fP9.cjs.map +0 -1
- package/dist/sparkline-B39NA0Mi.cjs.map +0 -1
- package/dist/sparkline-XO_TqCNP.js.map +0 -1
- package/dist/treemap-BWpEUlDh.cjs.map +0 -1
- package/dist/treemap-CQdavQ9u.js.map +0 -1
- package/dist/value-labels-BBuSi4i0.js.map +0 -1
- package/dist/value-labels-BV9keAuL.cjs.map +0 -1
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
const require_features = require("./features-
|
|
1
|
+
const require_features = require("./features-DEDP5CEQ.cjs");
|
|
2
|
+
const require_interaction = require("./interaction-DXYSjgnP.cjs");
|
|
2
3
|
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
3
|
-
const require_dom = require("./dom-
|
|
4
|
-
// src/interaction.ts
|
|
5
|
-
/** Identity of a hit, used to emit hover changes only when it changes. */
|
|
6
|
-
function hitKey(hit) {
|
|
7
|
-
return hit ? `${hit.index}:${hit.seriesIndex ?? ""}` : "";
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Convert a pointer position to chart pixels, accounting for the SVG being
|
|
11
|
-
* scaled by CSS (e.g. `max-width: 100%`).
|
|
12
|
-
*/
|
|
13
|
-
function toChartPoint(svg, clientX, clientY, width, height) {
|
|
14
|
-
const rect = svg.getBoundingClientRect();
|
|
15
|
-
const sx = rect.width > 0 ? width / rect.width : 1;
|
|
16
|
-
const sy = rect.height > 0 ? height / rect.height : 1;
|
|
17
|
-
return {
|
|
18
|
-
x: (clientX - rect.left) * sx,
|
|
19
|
-
y: (clientY - rect.top) * sy
|
|
20
|
-
};
|
|
21
|
-
}
|
|
4
|
+
const require_dom = require("./dom-C33zvtPo.cjs");
|
|
22
5
|
// src/legend.ts
|
|
23
6
|
/**
|
|
24
7
|
* Legend content: one toggle button per entry. Buttons are native, so they
|
|
25
8
|
* are focusable and work with Enter/Space; `aria-pressed` reflects visibility.
|
|
9
|
+
* `shape` gives the swatches the point shapes of their slots.
|
|
26
10
|
*/
|
|
27
|
-
function legendContent(items, hidden) {
|
|
11
|
+
function legendContent(items, hidden, shape) {
|
|
28
12
|
return require_vnode.h("div", { class: "tc-legend-items" }, items.map((item) => {
|
|
29
13
|
const off = hidden.has(item.key);
|
|
30
14
|
return require_vnode.h("button", {
|
|
@@ -36,7 +20,10 @@ function legendContent(items, hidden) {
|
|
|
36
20
|
`tc-series-${item.index + 1}`,
|
|
37
21
|
off && "tc-legend-item-hidden"
|
|
38
22
|
],
|
|
39
|
-
style: {
|
|
23
|
+
style: {
|
|
24
|
+
"--tc-series-color": item.color,
|
|
25
|
+
...shape?.(item.index)
|
|
26
|
+
},
|
|
40
27
|
"aria-pressed": off ? "false" : "true",
|
|
41
28
|
"data-key": item.key
|
|
42
29
|
}, require_vnode.h("span", {
|
|
@@ -249,6 +236,8 @@ function flush() {
|
|
|
249
236
|
return count;
|
|
250
237
|
}
|
|
251
238
|
// src/chart.ts
|
|
239
|
+
/** Whether the chart shows the value under the pointer on its value axis. */
|
|
240
|
+
const cursorValue = (config) => typeof config.crosshair === "object" && config.crosshair?.value === true;
|
|
252
241
|
const DEFAULT_WIDTH = 600;
|
|
253
242
|
const DEFAULT_ASPECT_RATIO = 2;
|
|
254
243
|
const DEFAULT_FONT_SIZE = 12;
|
|
@@ -259,32 +248,41 @@ function resolveSize(options, measured) {
|
|
|
259
248
|
const measuredWidth = measured?.width ?? 0;
|
|
260
249
|
const width = Math.max(0, Math.round(Number.isFinite(options.width) ? options.width : measuredWidth > 0 ? measuredWidth : DEFAULT_WIDTH));
|
|
261
250
|
const ratio = options.aspectRatio && options.aspectRatio > 0 ? options.aspectRatio : DEFAULT_ASPECT_RATIO;
|
|
262
|
-
const height = Number.isFinite(options.height) ? options.height : options.height === "container" && (measured?.height ?? 0) > 0 ? measured?.height : width / ratio;
|
|
251
|
+
const height = Number.isFinite(options.height) ? options.height : options.height === "container" && (measured?.height ?? 0) > 0 ? measured?.height : options.type?.height?.(chartModel(options), width) ?? width / ratio;
|
|
263
252
|
return {
|
|
264
253
|
width,
|
|
265
254
|
height: Math.max(0, Math.round(height))
|
|
266
255
|
};
|
|
267
256
|
}
|
|
268
|
-
/**
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
|
|
257
|
+
/** Chart models by the config they were worked out from. */
|
|
258
|
+
const models = /* @__PURE__ */ new WeakMap();
|
|
259
|
+
/**
|
|
260
|
+
* The chart model of a config: what its type's `prepare()` works out from
|
|
261
|
+
* it, once per config object, or the config itself for a type without one.
|
|
262
|
+
*/
|
|
263
|
+
function chartModel(config) {
|
|
264
|
+
const { prepare } = config.type;
|
|
265
|
+
if (!prepare) return config;
|
|
266
|
+
const model = models.get(config) ?? prepare(config);
|
|
267
|
+
models.set(config, model);
|
|
268
|
+
return model;
|
|
277
269
|
}
|
|
278
|
-
/**
|
|
279
|
-
function
|
|
270
|
+
/** Run the chart type's `render()` for a config and context, and the optional steps after it. */
|
|
271
|
+
function renderContent(config, ctx) {
|
|
272
|
+
const out = config.type.render(chartModel(config), ctx);
|
|
273
|
+
const result = out?.content !== void 0 ? out : { content: out };
|
|
274
|
+
if (require_features.features.post) result.content = require_features.features.post(config, result.content, result.interaction, ctx);
|
|
275
|
+
return result;
|
|
276
|
+
}
|
|
277
|
+
/** Render context for a config and size. */
|
|
278
|
+
function renderContext(config, { size, id, hidden, fontSize, rtl = config.rtl === true }) {
|
|
280
279
|
return {
|
|
281
280
|
rtl,
|
|
282
281
|
width: size.width,
|
|
283
282
|
height: size.height,
|
|
284
|
-
fontSize: config.fontSize ??
|
|
283
|
+
fontSize: config.fontSize ?? fontSize ?? DEFAULT_FONT_SIZE,
|
|
285
284
|
locale: config.locale,
|
|
286
285
|
id,
|
|
287
|
-
onHitTest,
|
|
288
286
|
hidden
|
|
289
287
|
};
|
|
290
288
|
}
|
|
@@ -301,14 +299,23 @@ function cleanData(config) {
|
|
|
301
299
|
function assertType(config) {
|
|
302
300
|
if (!config.type || typeof config.type.render !== "function") throw new TypeError("@tabler/charts: `type` must be a chart type such as line.");
|
|
303
301
|
}
|
|
302
|
+
const POSITIONS = [
|
|
303
|
+
"top",
|
|
304
|
+
"bottom",
|
|
305
|
+
"left",
|
|
306
|
+
"right",
|
|
307
|
+
"auto"
|
|
308
|
+
];
|
|
304
309
|
/** Legend entries of a config, and whether the legend is shown. */
|
|
305
310
|
function resolveLegend(config) {
|
|
306
|
-
const items = config.type.legend?.(config) ?? [];
|
|
311
|
+
const items = config.type.legend?.(chartModel(config)) ?? [];
|
|
307
312
|
const option = config.legend;
|
|
313
|
+
const show = option === void 0 ? items.length >= 2 : option !== false && items.length > 0;
|
|
314
|
+
const asked = typeof option === "object" ? option.position : void 0;
|
|
308
315
|
return {
|
|
309
316
|
items,
|
|
310
|
-
show
|
|
311
|
-
position:
|
|
317
|
+
show,
|
|
318
|
+
position: asked && POSITIONS.includes(asked) ? asked : "top"
|
|
312
319
|
};
|
|
313
320
|
}
|
|
314
321
|
/**
|
|
@@ -319,7 +326,7 @@ function resolveLegend(config) {
|
|
|
319
326
|
*/
|
|
320
327
|
function chartLabel(config) {
|
|
321
328
|
if (config.title) return config.title;
|
|
322
|
-
const names = (config.
|
|
329
|
+
const names = resolveLegend(config).items.map((item) => item.name).filter(Boolean);
|
|
323
330
|
const shown = names.slice(0, 6).join(", ");
|
|
324
331
|
return `${config.type.name} chart${names.length ? `: ${shown}${names.length > 6 ? ", …" : ""}` : ""}`;
|
|
325
332
|
}
|
|
@@ -364,16 +371,25 @@ function composeChart(config, size, id, still, content, underlay, overlay, extra
|
|
|
364
371
|
}, overlay));
|
|
365
372
|
}
|
|
366
373
|
/**
|
|
367
|
-
* Build
|
|
368
|
-
*
|
|
374
|
+
* Build a chart for a size: a pure function of the config and size, shared
|
|
375
|
+
* by the DOM chart and server-side rendering. `buildChart()` keeps the svg.
|
|
369
376
|
*/
|
|
370
|
-
function
|
|
377
|
+
function renderChart(config, size, id = config.id ?? "tc") {
|
|
371
378
|
assertType(config);
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
379
|
+
const base = cleanData(config);
|
|
380
|
+
const { content, interaction } = renderContent(base, renderContext(base, {
|
|
381
|
+
size,
|
|
382
|
+
id,
|
|
383
|
+
hidden: defaultHidden(resolveLegend(base).items)
|
|
384
|
+
}));
|
|
385
|
+
return {
|
|
386
|
+
svg: composeChart(base, size, id, isStatic(base, content), content),
|
|
387
|
+
interaction
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
/** Build the VNode tree of a chart for a size (see `renderChart()`). */
|
|
391
|
+
function buildChart(config, size, id) {
|
|
392
|
+
return renderChart(config, size, id).svg;
|
|
377
393
|
}
|
|
378
394
|
/**
|
|
379
395
|
* Render a chart to an SVG string, e.g. on the server.
|
|
@@ -383,7 +399,7 @@ function buildChart(config, size, id = config.id ?? "tc", onHitTest = () => {})
|
|
|
383
399
|
* ```
|
|
384
400
|
*/
|
|
385
401
|
function chartToString(config, size) {
|
|
386
|
-
return renderToString(
|
|
402
|
+
return renderToString(renderChart(config, size).svg);
|
|
387
403
|
}
|
|
388
404
|
/** The name of every chart event, for adapters that pass them all on. */
|
|
389
405
|
const chartEvents = [
|
|
@@ -392,6 +408,10 @@ const chartEvents = [
|
|
|
392
408
|
"legend-toggle",
|
|
393
409
|
"render"
|
|
394
410
|
];
|
|
411
|
+
/** The chart's own svg in its container. */
|
|
412
|
+
const ROOT = ":scope > svg.tc-chart";
|
|
413
|
+
/** The computed style of an element, where there is one (not on the server). */
|
|
414
|
+
const computed = (el) => typeof getComputedStyle === "function" ? getComputedStyle(el) : void 0;
|
|
395
415
|
/** The chart on each element. */
|
|
396
416
|
const mounted = /* @__PURE__ */ new WeakMap();
|
|
397
417
|
/**
|
|
@@ -458,11 +478,15 @@ var Chart = class {
|
|
|
458
478
|
this.element = element;
|
|
459
479
|
this.#cfg = cleanData(config);
|
|
460
480
|
this.id = config.id ?? nextId();
|
|
461
|
-
this.#adopt = element.querySelector(
|
|
481
|
+
this.#adopt = element.querySelector(ROOT);
|
|
462
482
|
this.#measure();
|
|
463
483
|
this.#unobserve = observeResize(element, this.#onResize);
|
|
464
484
|
try {
|
|
465
|
-
for (const plugin of [
|
|
485
|
+
for (const plugin of [
|
|
486
|
+
...defaultPlugins,
|
|
487
|
+
...config.type.plugins ?? [],
|
|
488
|
+
...config.plugins ?? []
|
|
489
|
+
]) this.#plugins.push(plugin.install(this));
|
|
466
490
|
this.render();
|
|
467
491
|
} catch (error) {
|
|
468
492
|
this.destroy();
|
|
@@ -476,15 +500,23 @@ var Chart = class {
|
|
|
476
500
|
/** Size of the last render. */
|
|
477
501
|
get size() {
|
|
478
502
|
let measured = this.#measured;
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
503
|
+
let beside = 0;
|
|
504
|
+
for (const plugin of this.#plugins) beside += plugin.reservedWidth?.() ?? 0;
|
|
505
|
+
if (beside && measured.width) measured = {
|
|
506
|
+
...measured,
|
|
507
|
+
width: measured.width - beside
|
|
508
|
+
};
|
|
509
|
+
const { height, legend } = this.#cfg;
|
|
510
|
+
const within = Number.isFinite(height) && typeof legend === "object" && legend?.withinHeight === true;
|
|
511
|
+
let reserved = 0;
|
|
512
|
+
if (within || height === "container" && measured.height) for (const plugin of this.#plugins) reserved += plugin.reservedHeight?.() ?? 0;
|
|
513
|
+
if (reserved && !within) measured = {
|
|
514
|
+
...measured,
|
|
515
|
+
height: measured.height - reserved
|
|
516
|
+
};
|
|
517
|
+
const size = resolveSize(this.#cfg, measured);
|
|
518
|
+
if (within) size.height = Math.max(0, size.height - Math.round(reserved));
|
|
519
|
+
return size;
|
|
488
520
|
}
|
|
489
521
|
/**
|
|
490
522
|
* Whether the chart is laid out right to left: the `rtl` option, with
|
|
@@ -493,7 +525,7 @@ var Chart = class {
|
|
|
493
525
|
get rtl() {
|
|
494
526
|
const cfg = this.#cfg;
|
|
495
527
|
if (this.#font === void 0) {
|
|
496
|
-
this.#rtl = cfg.rtl === "auto" ?
|
|
528
|
+
this.#rtl = cfg.rtl === "auto" ? computed(this.element)?.direction === "rtl" : cfg.rtl === true;
|
|
497
529
|
this.#font = cfg.fontSize ?? this.#measureFontSize();
|
|
498
530
|
}
|
|
499
531
|
return this.#rtl;
|
|
@@ -664,10 +696,15 @@ var Chart = class {
|
|
|
664
696
|
const changed = !cache || cache.cfg !== cfg || cache.hidden !== hiddenKey;
|
|
665
697
|
const stale = changed || cache?.width !== size.width || cache.height !== size.height || cache.fontSize !== fontSize || cache.rtl !== rtl;
|
|
666
698
|
if (!cache || stale) {
|
|
667
|
-
|
|
668
|
-
const content = renderContent(cfg,
|
|
669
|
-
|
|
670
|
-
|
|
699
|
+
if (cfg.type.sweep) require_features.features.sweep = cfg.type.sweep;
|
|
700
|
+
const { content, interaction } = renderContent(cfg, renderContext(cfg, {
|
|
701
|
+
size,
|
|
702
|
+
id: this.id,
|
|
703
|
+
hidden,
|
|
704
|
+
fontSize,
|
|
705
|
+
rtl
|
|
706
|
+
}));
|
|
707
|
+
this.#current = interaction;
|
|
671
708
|
cache = {
|
|
672
709
|
cfg,
|
|
673
710
|
width: size.width,
|
|
@@ -747,8 +784,14 @@ var Chart = class {
|
|
|
747
784
|
* `force`d after new data) and re-render the hover layers in the next frame.
|
|
748
785
|
*/
|
|
749
786
|
#setHover(hit, event, force = false, rerender = true) {
|
|
750
|
-
const key = hitKey(hit);
|
|
751
|
-
if (!force && key === this.#hovered)
|
|
787
|
+
const key = require_interaction.hitKey(hit);
|
|
788
|
+
if (!force && key === this.#hovered) {
|
|
789
|
+
if (hit?.cursor && cursorValue(this.#cfg) && hit.cursor.position !== this.#hit?.cursor?.position) {
|
|
790
|
+
this.#hit = hit;
|
|
791
|
+
if (rerender) this.#schedule();
|
|
792
|
+
}
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
752
795
|
if (force && key === "" && this.#hovered === "") return;
|
|
753
796
|
this.#hovered = key;
|
|
754
797
|
this.#hit = hit;
|
|
@@ -765,7 +808,7 @@ var Chart = class {
|
|
|
765
808
|
}
|
|
766
809
|
/** Suspend transitions while the container keeps resizing (see `[data-resizing]` in CSS). */
|
|
767
810
|
#markResizing() {
|
|
768
|
-
const svg = this.element.querySelector(
|
|
811
|
+
const svg = this.element.querySelector(ROOT);
|
|
769
812
|
if (!svg) return;
|
|
770
813
|
svg.setAttribute("data-resizing", "");
|
|
771
814
|
clearTimeout(this.#resizeTimer);
|
|
@@ -776,14 +819,13 @@ var Chart = class {
|
|
|
776
819
|
}
|
|
777
820
|
/** The `--tc-font-size` in effect on the container, in pixels (browser only). */
|
|
778
821
|
#measureFontSize() {
|
|
779
|
-
|
|
780
|
-
const value = Number.parseFloat(getComputedStyle(this.element).getPropertyValue("--tc-font-size"));
|
|
822
|
+
const value = Number.parseFloat(computed(this.element)?.getPropertyValue("--tc-font-size") ?? "");
|
|
781
823
|
return Number.isFinite(value) && value > 0 ? value : void 0;
|
|
782
824
|
}
|
|
783
825
|
/** Measure the content box, matching what `ResizeObserver` reports. */
|
|
784
826
|
#measure() {
|
|
785
827
|
const el = this.element;
|
|
786
|
-
const style =
|
|
828
|
+
const style = computed(el);
|
|
787
829
|
const px = (value) => Number.parseFloat(value ?? "") || 0;
|
|
788
830
|
this.#measured = {
|
|
789
831
|
width: el.clientWidth - px(style?.paddingLeft) - px(style?.paddingRight),
|
|
@@ -826,12 +868,24 @@ Object.defineProperty(exports, "chartLabel", {
|
|
|
826
868
|
return chartLabel;
|
|
827
869
|
}
|
|
828
870
|
});
|
|
871
|
+
Object.defineProperty(exports, "chartModel", {
|
|
872
|
+
enumerable: true,
|
|
873
|
+
get: function() {
|
|
874
|
+
return chartModel;
|
|
875
|
+
}
|
|
876
|
+
});
|
|
829
877
|
Object.defineProperty(exports, "chartToString", {
|
|
830
878
|
enumerable: true,
|
|
831
879
|
get: function() {
|
|
832
880
|
return chartToString;
|
|
833
881
|
}
|
|
834
882
|
});
|
|
883
|
+
Object.defineProperty(exports, "cursorValue", {
|
|
884
|
+
enumerable: true,
|
|
885
|
+
get: function() {
|
|
886
|
+
return cursorValue;
|
|
887
|
+
}
|
|
888
|
+
});
|
|
835
889
|
Object.defineProperty(exports, "defaultHidden", {
|
|
836
890
|
enumerable: true,
|
|
837
891
|
get: function() {
|
|
@@ -868,6 +922,12 @@ Object.defineProperty(exports, "legendContent", {
|
|
|
868
922
|
return legendContent;
|
|
869
923
|
}
|
|
870
924
|
});
|
|
925
|
+
Object.defineProperty(exports, "renderChart", {
|
|
926
|
+
enumerable: true,
|
|
927
|
+
get: function() {
|
|
928
|
+
return renderChart;
|
|
929
|
+
}
|
|
930
|
+
});
|
|
871
931
|
Object.defineProperty(exports, "renderContext", {
|
|
872
932
|
enumerable: true,
|
|
873
933
|
get: function() {
|
|
@@ -904,11 +964,5 @@ Object.defineProperty(exports, "schedule", {
|
|
|
904
964
|
return schedule;
|
|
905
965
|
}
|
|
906
966
|
});
|
|
907
|
-
Object.defineProperty(exports, "toChartPoint", {
|
|
908
|
-
enumerable: true,
|
|
909
|
-
get: function() {
|
|
910
|
-
return toChartPoint;
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
967
|
|
|
914
|
-
//# sourceMappingURL=chart-
|
|
968
|
+
//# sourceMappingURL=chart-GUmmjJ7S.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-GUmmjJ7S.cjs","names":["h","isValidTag","isValidAttr","features","feature","h","render","hitKey"],"sources":["../src/legend.ts","../src/render/string.ts","../src/resize.ts","../src/scheduler.ts","../src/chart.ts"],"sourcesContent":["import type { SwatchShape } from './features.ts'\nimport { h, type VNode } from './vnode.ts'\n\n/** One legend entry: a series (or a slice, for part-to-whole charts). */\nexport interface LegendItem {\n /** Stable identity, used to toggle it. */\n key: string\n name: string\n /** Color slot: the entry wears `.tc-series-{index + 1}`. */\n index: number\n /** Custom color overriding the slot. */\n color?: string\n /** Hidden by default (e.g. `series.hidden`). */\n hidden?: boolean\n}\n\nexport interface LegendOptions {\n /**\n * Where the legend goes: above or below the chart, or beside it (`'left'`,\n * `'right'`, mirrored in a right-to-left chart) with its entries stacked\n * and the chart in the remaining width. `'auto'` puts it on the right when\n * the chart keeps two thirds of the container that way, and below\n * otherwise. Defaults to `'top'`.\n */\n position?: 'top' | 'bottom' | 'left' | 'right' | 'auto'\n /**\n * Keep the legend inside the chart's `height`: a legend above or below the\n * chart takes its height from the plot, so a chart with `height: 240` is\n * 240 pixels tall with its legend (cards in a row stay the same size).\n * Only with a `height` in pixels. Defaults to `false`: the legend adds to it.\n */\n withinHeight?: boolean\n}\n\n/**\n * Legend content: one toggle button per entry. Buttons are native, so they\n * are focusable and work with Enter/Space; `aria-pressed` reflects visibility.\n * `shape` gives the swatches the point shapes of their slots.\n */\nexport function legendContent(\n items: readonly LegendItem[],\n hidden: ReadonlySet<string>,\n shape?: SwatchShape,\n): VNode {\n return h(\n 'div',\n { class: 'tc-legend-items' },\n items.map((item) => {\n const off = hidden.has(item.key)\n return h(\n 'button',\n {\n key: item.key,\n type: 'button',\n class: [\n 'tc-legend-item',\n 'tc-series',\n `tc-series-${item.index + 1}`,\n off && 'tc-legend-item-hidden',\n ],\n // A map, so values from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': item.color, ...shape?.(item.index) },\n 'aria-pressed': off ? 'false' : 'true',\n 'data-key': item.key,\n },\n h('span', { class: 'tc-legend-swatch', 'aria-hidden': 'true' }),\n h('span', { class: 'tc-legend-name' }, item.name),\n )\n }),\n )\n}\n\n/** Keys hidden by default, from the entries' own `hidden` flags. */\nexport function defaultHidden(items: readonly LegendItem[]): Set<string> {\n return new Set(items.filter((item) => item.hidden).map((item) => item.key))\n}\n","import type { Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nconst SVG_NS = 'http://www.w3.org/2000/svg'\n\nexport interface RenderToStringOptions {\n /**\n * Add `xmlns` to a root `<svg>` that has none, so the output is a valid\n * standalone `.svg` file. Defaults to `true`.\n */\n xmlns?: boolean\n /**\n * Markup context of the root. By default common HTML elements (`div`,\n * `table`, `button`…) render as HTML and everything else as SVG.\n */\n namespace?: 'svg' | 'html'\n}\n\n/** Root tags treated as HTML when no namespace is given. */\nconst HTML_ROOTS = /* @__PURE__ */ new Set([\n 'a',\n 'b',\n 'button',\n 'caption',\n 'div',\n 'em',\n 'i',\n 'label',\n 'li',\n 'ol',\n 'p',\n 'section',\n 'small',\n 'span',\n 'strong',\n 'table',\n 'tbody',\n 'td',\n 'th',\n 'thead',\n 'tr',\n 'ul',\n])\n\n/** HTML elements that never have content and must not get a closing tag. */\nconst VOID = /* @__PURE__ */ new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'source',\n 'track',\n 'wbr',\n])\n\n/**\n * Serialize a VNode tree to markup (SSR, static export): SVG trees as\n * XML-compatible SVG, HTML trees (legend, table, tooltip) as HTML.\n *\n * Empty elements self-close only inside SVG; in HTML they get an explicit\n * closing tag (`<th></th>`), since `<th/>` would open an element there.\n * Text and attribute values are escaped. Invalid tag or attribute names and\n * inline event handlers (`on*`) are dropped, so data coming from chart\n * options can never inject markup or scripts.\n */\nexport function renderToString(node: Child, options: RenderToStringOptions = {}): string {\n if (typeof node === 'string') return escapeText(node)\n const root =\n options.xmlns !== false && node.tag === 'svg' && node.attrs.xmlns === undefined\n ? { ...node, attrs: { xmlns: SVG_NS, ...node.attrs } }\n : node\n const svg = options.namespace ? options.namespace === 'svg' : !HTML_ROOTS.has(node.tag)\n return renderNode(root, svg)\n}\n\nfunction renderNode(node: VNode, parentInSvg: boolean): string {\n const { tag, attrs, children } = node\n if (!isValidTag(tag)) return ''\n const inSvg = parentInSvg || tag === 'svg'\n\n let out = `<${tag}`\n for (const name in attrs) {\n if (!isValidAttr(name)) continue\n out += ` ${name}=\"${escapeAttr(String(attrs[name]))}\"`\n }\n\n if (children.length === 0) {\n if (inSvg) return `${out}/>`\n if (VOID.has(tag.toLowerCase())) return `${out}>`\n }\n\n out += '>'\n // Content of foreignObject is HTML again.\n const childInSvg = inSvg && tag !== 'foreignObject'\n for (const child of children) {\n out += typeof child === 'string' ? escapeText(child) : renderNode(child, childInSvg)\n }\n return `${out}</${tag}>`\n}\n\nconst TEXT_RE = /[&<>]/\nconst ATTR_RE = /[&\"<>]/\nconst TEXT_RE_G = /[&<>]/g\nconst ATTR_RE_G = /[&\"<>]/g\nconst ENTITIES: Record<string, string> = { '&': '&', '<': '<', '>': '>', '\"': '"' }\nconst replaceEntity = (char: string): string => ENTITIES[char] as string\n\n/** Escape text content. */\nexport function escapeText(value: string): string {\n return TEXT_RE.test(value) ? value.replace(TEXT_RE_G, replaceEntity) : value\n}\n\n/** Escape a double-quoted attribute value. */\nexport function escapeAttr(value: string): string {\n return ATTR_RE.test(value) ? value.replace(ATTR_RE_G, replaceEntity) : value\n}\n","/** One `ResizeObserver` shared by every chart on the page. */\n\ntype Listener = (width: number, height: number) => void\n\nconst listeners = /* @__PURE__ */ new WeakMap<Element, Listener>()\n/** Elements observed while in the document. */\nconst seen = /* @__PURE__ */ new WeakSet<Element>()\nlet observer: ResizeObserver | undefined\n\nfunction getObserver(): ResizeObserver | undefined {\n if (observer || typeof ResizeObserver !== 'function') return observer\n observer = new ResizeObserver((entries) => {\n for (const { target, contentRect } of entries) {\n if (target.isConnected) {\n seen.add(target)\n listeners.get(target)?.(contentRect.width, contentRect.height)\n } else if (seen.has(target)) {\n // Taken out of the page without destroy(): stop observing, or the\n // observer would keep the element and its chart in memory for good.\n // `chart.resize()` observes it again if it comes back.\n seen.delete(target)\n observer?.unobserve(target)\n }\n }\n })\n return observer\n}\n\n/**\n * Call `listener` with the content size of `el` whenever it changes.\n * Returns a function that stops observing. No-op where `ResizeObserver`\n * is unavailable (SSR, old browsers). Observing again is harmless.\n */\nexport function observeResize(el: Element, listener: Listener): () => void {\n const ro = getObserver()\n if (!ro) return () => {}\n listeners.set(el, listener)\n ro.observe(el)\n return () => {\n if (listeners.get(el) !== listener) return\n listeners.delete(el)\n ro.unobserve(el)\n }\n}\n","/**\n * Batches work from all charts into a single animation frame. Scheduling the\n * same key twice before the flush runs its latest task once.\n */\n\nconst queue = /* @__PURE__ */ new Map<object, () => void>()\nlet pending = false\n\nconst requestFrame = (callback: () => void): void => {\n if (typeof requestAnimationFrame === 'function') requestAnimationFrame(callback)\n else queueMicrotask(callback)\n}\n\n/**\n * Run a task; an error it throws is reported on its own (as an uncaught\n * error, in the console and to `window.onerror`) instead of stopping the\n * tasks of other charts in the same frame.\n */\nexport function run(task: () => void): void {\n try {\n task()\n } catch (error) {\n setTimeout(() => {\n throw error\n })\n }\n}\n\n/** Run `task` in the next frame, replacing any task already queued for `key`. */\nexport function schedule(key: object, task: () => void): void {\n queue.set(key, task)\n if (!pending) {\n pending = true\n requestFrame(flush)\n }\n}\n\n/** Work `flush()` also runs: the idle queue (`idle.ts`), once something uses it. */\nexport const flushHooks: { idle?: () => number } = {}\n\n/** Drop the task queued for `key`, if any. */\nexport function cancel(key: object): void {\n queue.delete(key)\n}\n\n/**\n * Run queued tasks now, idle ones too; returns how many ran. Tasks queued\n * meanwhile run too, but each key only once: a task queued again after it\n * ran (a chart updated from its own `render` handler) waits for the next\n * frame, instead of looping in this one and freezing the page.\n */\nexport function flush(): number {\n pending = false\n let count = 0\n const ran = new Set<object>()\n const later = new Map<object, () => void>()\n // Idle work can schedule frame work in turn.\n do {\n // (A Map also visits what is added while it is walked: tasks queued meanwhile.)\n for (const [key, task] of queue) {\n queue.delete(key)\n if (ran.has(key)) later.set(key, task)\n else {\n ran.add(key)\n run(task)\n count++\n }\n }\n count += flushHooks.idle?.() ?? 0\n } while (queue.size > 0)\n for (const [key, task] of later) schedule(key, task)\n return count\n}\n","import type { DataTable } from './a11y.ts'\nimport type { ValueLabelOptions } from './charts/value-labels.ts'\nimport { type Features, feature, features } from './features.ts'\nimport type { Locale, NumberFormat } from './format.ts'\nimport { type Hit, hitKey, type Interaction } from './interaction.ts'\nimport { defaultHidden, type LegendItem, type LegendOptions } from './legend.ts'\nimport type { ChartPlugin, PluginInstance } from './plugin.ts'\nimport type { DownloadOption } from './plugins/download.ts'\nimport { render } from './render/dom.ts'\nimport { renderToString } from './render/string.ts'\nimport { observeResize } from './resize.ts'\nimport { cancel, schedule } from './scheduler.ts'\nimport type { TooltipOptions } from './tooltip.ts'\nimport { type ChildInput, type ClassValue, h, type Props, type VNode } from './vnode.ts'\n\n/** Size and environment a chart type renders into. */\nexport interface RenderContext {\n width: number\n height: number\n /** Font size used to estimate label sizes. */\n fontSize: number\n locale: Locale\n /** Unique, stable prefix for ids inside this chart. */\n id: string\n /** Keys of legend entries (series) currently hidden. */\n hidden: ReadonlySet<string>\n /** Lay the chart out right to left (the `rtl` option, resolved). */\n rtl?: boolean\n}\n\n/** What a chart type's `table()` sees: no size, since a table has none. */\nexport type TableContext = Pick<RenderContext, 'locale' | 'hidden' | 'rtl'>\n\n/**\n * What a chart type renders for one size: the content of the root `<svg>`,\n * and how pointer and keyboard map to its data (none, when left out).\n */\nexport interface RenderResult {\n content: ChildInput\n interaction?: Interaction\n}\n\n/**\n * A chart type plugin (`line`, `bar`, …). Works out its model from the chart\n * options and renders it into the content of the root `<svg>`.\n *\n * `M` is the chart model, what `prepare()` works out from the options alone\n * (the options themselves for a type without `prepare()`): `render()`,\n * `legend()`, `table()` and `height()` all read it, so a type groups or sorts\n * its data once per config, not once for each of them. `ChartType<never>`\n * stands for any chart type.\n */\nexport interface ChartType<\n O extends object = object,\n M extends object = [O] extends [never] ? object : O,\n> {\n readonly name: string\n /**\n * Clean options that may come from outside (data, annotations, axis\n * bounds from users, APIs, JSON) into the shape `render()` expects; called\n * as the config comes in, before anything reads it.\n */\n clean?(options: O): unknown\n /**\n * The chart model of the (cleaned) options: whatever the legend, the table\n * and every render share. It knows neither the size nor the hidden series\n * (the legend that hides them reads it). Called once per config.\n */\n prepare?(options: O): M\n /** The chart content for a size: bare content, or with its interaction. */\n render(model: M, context: RenderContext): ChildInput | RenderResult\n /**\n * Height in pixels at a width, for a type whose proportions are not one\n * ratio (parts of it keep their size as it narrows). Asked when `height`\n * is not set; `undefined` leaves it to `aspectRatio`.\n */\n height?(model: M, width: number): number | undefined\n /** Entries for the legend (series, slices); charts without it get no legend. */\n legend?(model: M): LegendItem[]\n /**\n * The data as a text table, for screen readers and the visible table\n * option. `limit` is the most rows wanted; report the real count in `total`.\n */\n table?(model: M, context: TableContext, limit: number): DataTable\n /**\n * Whether the chart should be focusable and keyboard-navigable by default\n * (`keyboard` in the config overrides it). Decorative types such as\n * sparklines opt out so a page of stat tiles does not multiply tab stops.\n */\n readonly keyboard?: boolean\n /**\n * How value labels (`valueLabels`) read this chart type, when not as bars\n * or points: `marks: 'slice'` writes each value as its share, inside its\n * slice; `marks: 'cell'` writes it in the middle of its mark. `format`\n * names the number format of the values in the options (by default a label\n * shows the text of the tooltip).\n */\n /**\n * How the chart's marks turn to new data in the DOM, where CSS cannot\n * animate them (arcs sweeping to their new angles). A chart in the page\n * installs it; it is part of the type, not of a module that loads, so it\n * ships only with the types that use it.\n */\n readonly sweep?: Features['sweep']\n readonly valueLabels?: {\n marks?: 'slice' | 'cell'\n format?(model: M): NumberFormat | undefined\n }\n /**\n * Plugins the chart type brings along (the zoom of a map), installed after\n * the default ones when a chart is created with this type.\n */\n readonly plugins?: readonly ChartPlugin[]\n}\n\nexport type { DataTable, LegendItem }\n\nexport interface CrosshairOptions {\n /** A line through the pointer, and the value under it on the value axis. Defaults to `false`. */\n value?: boolean\n}\n\n/** Whether the chart shows the value under the pointer on its value axis. */\nexport const cursorValue = (config: BaseOptions): boolean =>\n typeof config.crosshair === 'object' && config.crosshair?.value === true\n\n/** Options shared by every chart type. */\nexport interface BaseOptions {\n /** Fixed width in pixels. Defaults to the container width. */\n width?: number\n /**\n * Height in pixels, or `'container'` to follow the container's height (the\n * container then needs a height of its own). Defaults to width / aspectRatio.\n */\n height?: number | 'container'\n /** Width to height ratio used when `height` is not set. Defaults to `2`. */\n aspectRatio?: number\n /** Accessible name of the chart. */\n title?: string\n /** Longer accessible description. */\n description?: string\n /** Extra classes on the root `<svg>`. */\n class?: ClassValue\n /** Locale for number and date formatting. Set it explicitly for SSR. */\n locale?: Locale\n /**\n * Mirror the layout for right-to-left pages: the value axis on the right\n * and categories running from the right (`x.reverse` overrides the latter).\n * `'auto'` follows the `direction` of the container (left to right in SSR).\n * The legend, the tooltip and the download menu read right to left with it.\n * Cartesian charts, heatmaps, sparklines, sankey diagrams and percentage\n * bars. Defaults to `false`.\n */\n rtl?: boolean | 'auto'\n /**\n * Font size used to lay out labels. In the browser it is read from the\n * `--tc-font-size` custom property of the container when not set; set it\n * explicitly for SSR so server and client layouts match. Defaults to `12`.\n */\n fontSize?: number\n /** Id prefix; set it explicitly for SSR so server and client ids match. */\n id?: string\n /** Show a tooltip on hover, optionally with custom content. Defaults to `true`. */\n tooltip?: boolean | TooltipOptions\n /**\n * Show a vertical crosshair on hover (point charts). `{ value: true }` also\n * draws a line through the pointer across the plot, with the value there\n * written on the value axis (line, area, bar and candlestick charts; on the\n * first axis of a chart with two). Defaults to `true`.\n */\n crosshair?: boolean | CrosshairOptions\n /**\n * Draw a dot on every value of the hovered category (point charts).\n * `false` leaves the crosshair and the tooltip. Defaults to `true`.\n */\n activePoints?: boolean\n /** Show a legend with toggles. Defaults to showing it for two or more entries. */\n legend?: boolean | LegendOptions\n /**\n * Animate entrances and data updates (reduced motion always wins). By\n * default charts animate unless they draw more than 1000 elements (e.g. a\n * scatter of a thousand points), where transitions cost far more frame\n * time than they show; `true` animates those too.\n */\n animate?: boolean\n /**\n * Fill bars, areas, slices, rings and bubbles with patterns (and dash\n * lines), so series do not depend on color alone: `true` always, `'auto'`\n * (the default) only in forced colors (Windows High Contrast), where the\n * colors are gone, `false` never. Needs `@tabler/charts/patterns` on the\n * core (`@tabler/charts` includes it).\n */\n patterns?: boolean | 'auto'\n /**\n * Write the values on the marks: bars at their end, stacked segments,\n * cells and slices inside (slices show their share), lines and points\n * above their last point (`points: 'all'` for every one). Labels that do\n * not fit are left out (`overMarks: true` keeps the labels of a line\n * where it crosses the bars). A series' own `valueLabels` overrides this for\n * that series, and each label carries its series classes\n * (`tc-series tc-series-{n}`). Needs `@tabler/charts/value-labels` on the\n * core (`@tabler/charts` includes it).\n */\n valueLabels?: boolean | ValueLabelOptions\n /**\n * Share the hover with the other charts of this group: the category under\n * the pointer is highlighted in all of them (matched by label), with its\n * tooltip. Needs the `sync()` plugin (the `Chart` of `@tabler/charts` has it).\n */\n sync?: string\n /**\n * Give the points of each series a shape of their own (circle, square,\n * triangle, diamond…) in line, radar and scatter charts, so they do not\n * depend on color alone. Defaults to `patterns === true`. Needs\n * `@tabler/charts/point-shapes` on the core (`@tabler/charts` includes it).\n */\n shapes?: boolean\n /**\n * Render the data as an HTML table: visually hidden for screen readers\n * (`true`, the default), shown below the chart (`'visible'`), or not at all.\n * An object sets `visible` and `maxRows` (default 1000; longer data is cut\n * and the caption says so).\n */\n table?: boolean | 'visible' | { visible?: boolean; maxRows?: number }\n /** Make the chart focusable and navigable with arrow keys. Defaults to `true`. */\n keyboard?: boolean\n /**\n * A download menu in the chart's corner: `true` offers PNG and SVG, a list\n * picks the formats (`['png', 'svg', 'jpeg', 'webp', 'csv']`), an object also\n * sets the file name and the export options. Needs `@tabler/charts/export`\n * imported, and on the core the `download()` plugin (the `Chart` of\n * `@tabler/charts` has it).\n */\n download?: DownloadOption\n /**\n * Extra plugins, installed when the chart is created. The default `Chart`\n * from `@tabler/charts` already includes the built-in ones; the bare `Chart`\n * from `@tabler/charts/core` only runs these.\n */\n plugins?: readonly ChartPlugin[]\n}\n\n/** Full chart configuration: base options, the chart type and its options. */\nexport type ChartConfig<O extends object = object> = BaseOptions &\n O & { type: ChartType<O, object> }\n\nexport interface Size {\n width: number\n height: number\n}\n\nconst DEFAULT_WIDTH = 600\nconst DEFAULT_ASPECT_RATIO = 2\nconst DEFAULT_FONT_SIZE = 12\n\nlet uid = 0\nconst nextId = (): string => `tc-${++uid}`\n\n/** Resolve the final pixel size from options and the measured container size. */\nexport function resolveSize(options: BaseOptions, measured?: Partial<Size>): Size {\n const measuredWidth = measured?.width ?? 0\n // (Sizes that are not finite numbers count as not set.)\n const width = Math.max(\n 0,\n Math.round(\n Number.isFinite(options.width)\n ? (options.width as number)\n : measuredWidth > 0\n ? measuredWidth\n : DEFAULT_WIDTH,\n ),\n )\n const ratio =\n options.aspectRatio && options.aspectRatio > 0 ? options.aspectRatio : DEFAULT_ASPECT_RATIO\n const height = Number.isFinite(options.height)\n ? (options.height as number)\n : options.height === 'container' && (measured?.height ?? 0) > 0\n ? (measured?.height as number)\n : ((options as Partial<ChartConfig>).type?.height?.(\n chartModel(options as ChartConfig),\n width,\n ) ?? width / ratio)\n return { width, height: Math.max(0, Math.round(height)) }\n}\n\n/** Chart models by the config they were worked out from. */\nconst models = /* @__PURE__ */ new WeakMap<object, object>()\n\n/**\n * The chart model of a config: what its type's `prepare()` works out from\n * it, once per config object, or the config itself for a type without one.\n */\nexport function chartModel(config: ChartConfig<object>): object {\n const { prepare } = config.type\n if (!prepare) return config\n const model = models.get(config) ?? prepare(config)\n models.set(config, model)\n return model\n}\n\n/** Run the chart type's `render()` for a config and context, and the optional steps after it. */\nfunction renderContent(config: ChartConfig<object>, ctx: RenderContext): RenderResult {\n const out = config.type.render(chartModel(config), ctx)\n // Bare content has no `content` of its own (nodes, lists and text do not).\n const result =\n (out as RenderResult | null)?.content !== undefined\n ? (out as RenderResult)\n : { content: out as ChildInput }\n // Optional features finish the content (point shapes, value labels).\n if (features.post) result.content = features.post(config, result.content, result.interaction, ctx)\n return result\n}\n\n/** What a render context is made for, besides the config. */\nexport interface ContextOptions {\n size: Size\n /** Id prefix of the chart. */\n id: string\n hidden: ReadonlySet<string>\n /** Measured font size, used when the config sets none. */\n fontSize?: number\n /** The resolved `rtl` option; by default `rtl: true` in the config. */\n rtl?: boolean\n}\n\n/** Render context for a config and size. */\nexport function renderContext<O extends object>(\n config: ChartConfig<O>,\n { size, id, hidden, fontSize, rtl = config.rtl === true }: ContextOptions,\n): RenderContext {\n return {\n rtl,\n width: size.width,\n height: size.height,\n fontSize: config.fontSize ?? fontSize ?? DEFAULT_FONT_SIZE,\n locale: config.locale,\n id,\n hidden,\n }\n}\n\n/**\n * The config as cleaned by its chart type, without the options that are\n * numbers nothing can be drawn with (NaN, ±Infinity, from a division or a\n * parse gone wrong outside): their defaults apply, as if they were left out.\n */\nfunction cleanData<O extends object>(config: ChartConfig<O>): ChartConfig<O> {\n const out = {\n ...(config.type?.clean ? (config.type.clean(config) as object) : config),\n } as Record<string, unknown>\n for (const key in out) {\n if (typeof out[key] === 'number' && !Number.isFinite(out[key])) delete out[key]\n }\n return out as ChartConfig<O>\n}\n\nfunction assertType(config: ChartConfig<object>): void {\n if (!config.type || typeof config.type.render !== 'function') {\n throw new TypeError('@tabler/charts: `type` must be a chart type such as line.')\n }\n}\n\nconst POSITIONS: readonly unknown[] = ['top', 'bottom', 'left', 'right', 'auto']\n\n/** Legend entries of a config, whether a legend is shown and where. */\nexport interface ResolvedLegend {\n items: LegendItem[]\n show: boolean\n position: NonNullable<LegendOptions['position']>\n}\n\n/** Legend entries of a config, and whether the legend is shown. */\nexport function resolveLegend<O extends object>(config: ChartConfig<O>): ResolvedLegend {\n const items = config.type.legend?.(chartModel(config)) ?? []\n const option = config.legend\n const show = option === undefined ? items.length >= 2 : option !== false && items.length > 0\n const asked = typeof option === 'object' ? option.position : undefined\n const position = asked && POSITIONS.includes(asked) ? asked : 'top'\n return { items, show, position }\n}\n\n/**\n * The chart's accessible name: its `title`, or else the chart type and its\n * legend entries (\"line chart: Visitors, Sign-ups\"), since an image without\n * a name is announced as nothing at all. Set `title` for a name in the\n * page's language.\n */\nexport function chartLabel(config: ChartConfig<object>): string {\n if (config.title) return config.title\n const names = resolveLegend(config)\n .items.map((item) => item.name)\n .filter(Boolean)\n const shown = names.slice(0, 6).join(', ')\n // Screen readers do not care for capitals; a long list of names is cut short.\n return `${config.type.name} chart${names.length ? `: ${shown}${names.length > 6 ? ', …' : ''}` : ''}`\n}\n\n/** Elements beyond which charts skip transitions unless `animate: true`. */\nconst ANIMATION_LIMIT = 1000\n\n/** Number of elements in chart content. */\nconst countNodes = (child: ChildInput): number =>\n Array.isArray(child)\n ? child.reduce((n: number, c: ChildInput) => n + countNodes(c), 0)\n : child && typeof child === 'object'\n ? 1 + countNodes((child as VNode).children)\n : 0\n\n/** Whether a chart renders without transitions: asked to, or too big to animate cheaply. */\nconst isStatic = (config: ChartConfig<object>, content: ChildInput): boolean =>\n config.animate === false || (config.animate !== true && countNodes(content) > ANIMATION_LIMIT)\n\n/** Wrap chart content (and hover layers) in the accessible root `<svg>`. */\nfunction composeChart(\n config: ChartConfig<object>,\n size: Size,\n id: string,\n still: boolean,\n content: ChildInput,\n underlay?: ChildInput,\n overlay?: ChildInput,\n extraAttrs?: Props,\n rtl: boolean = config.rtl === true,\n): VNode {\n const { width, height } = size\n const descId = config.description ? `${id}-desc` : undefined\n const { patterns } = config\n // [class, root style, defs] of the pattern fills, when the chart has them.\n const fills =\n patterns === false\n ? undefined\n : (patterns === true ? feature('patterns') : features.patterns)?.(config, id)\n return h(\n 'svg',\n {\n class: [\n 'tc-chart',\n `tc-chart-${config.type.name}`,\n still && 'tc-static',\n rtl && 'tc-rtl',\n fills?.[0],\n config.class,\n ],\n style: fills?.[1],\n viewBox: `0 0 ${width} ${height}`,\n width,\n height,\n role: 'img',\n // An svg <title> would also show as a native tooltip, so the name is an attribute.\n 'aria-label': chartLabel(config),\n 'aria-describedby': descId,\n ...extraAttrs,\n },\n // Keyed, so their coming and going never shifts the (unkeyed) chart\n // content in the DOM patcher: that would recreate it and restart animations.\n descId && h('desc', { key: 'desc', id: descId }, config.description),\n fills?.[2],\n underlay && h('g', { key: 'hover-under', class: 'tc-hover-layer' }, underlay),\n content,\n overlay && h('g', { key: 'hover-over', class: 'tc-hover-layer' }, overlay),\n )\n}\n\n/** A chart built without the DOM: its root `<svg>`, and how it answers interaction. */\nexport interface BuiltChart {\n svg: VNode\n interaction?: Interaction\n}\n\n/**\n * Build a chart for a size: a pure function of the config and size, shared\n * by the DOM chart and server-side rendering. `buildChart()` keeps the svg.\n */\nexport function renderChart<O extends object>(\n config: ChartConfig<O>,\n size: Size,\n id: string = config.id ?? 'tc',\n): BuiltChart {\n assertType(config)\n const base: ChartConfig<object> = cleanData(config)\n const hidden = defaultHidden(resolveLegend(base).items)\n const { content, interaction } = renderContent(base, renderContext(base, { size, id, hidden }))\n return { svg: composeChart(base, size, id, isStatic(base, content), content), interaction }\n}\n\n/** Build the VNode tree of a chart for a size (see `renderChart()`). */\nexport function buildChart<O extends object>(\n config: ChartConfig<O>,\n size: Size,\n id?: string,\n): VNode {\n return renderChart(config, size, id).svg\n}\n\n/**\n * Render a chart to an SVG string, e.g. on the server.\n *\n * ```ts\n * chartToString({ type: line, data, id: 'sales', locale: 'en-US' }, { width: 600, height: 300 })\n * ```\n */\nexport function chartToString<O extends object>(config: ChartConfig<O>, size: Size): string {\n return renderToString(renderChart(config, size).svg)\n}\n\nexport interface ChartEvents {\n /** A legend entry was toggled (by the user or `toggleSeries()`). */\n 'legend-toggle': { key: string; name: string; index: number; hidden: boolean }\n /** After the chart content rendered into the DOM (not on hover-only updates). */\n render: { size: Size }\n /**\n * The highlighted category (or mark) changed, or its data changed while\n * highlighted. `hit` is `null` when the pointer left the plot.\n */\n hover: { hit: Hit | null; event?: PointerEvent }\n /** A click on the plot. */\n click: { hit: Hit; event: MouseEvent }\n}\n\n/** The name of every chart event, for adapters that pass them all on. */\nexport const chartEvents: readonly (keyof ChartEvents)[] = [\n 'hover',\n 'click',\n 'legend-toggle',\n 'render',\n]\n\ntype Handler<T> = (event: T) => void\n\n/** The handlers of each event: a `Map` that knows which event its key names. */\ninterface Handlers extends Map<keyof ChartEvents, Set<Handler<never>>> {\n get<K extends keyof ChartEvents>(name: K): Set<Handler<ChartEvents[K]>> | undefined\n set<K extends keyof ChartEvents>(name: K, handlers: Set<Handler<ChartEvents[K]>>): this\n}\n\n/** Where the current highlight came from. */\ntype Source =\n | { kind: 'pointer'; x: number; y: number }\n | { kind: 'index'; index: number; seriesIndex?: number }\n\n/** The output of a chart type, with what it was built for. */\ninterface Content<O extends object> {\n cfg: ChartConfig<O>\n width: number\n height: number\n hidden: string\n fontSize: number | undefined\n rtl: boolean\n content: ChildInput\n /** Whether the content renders without transitions. */\n still: boolean\n}\n\n/** The chart's own svg in its container. */\nconst ROOT = ':scope > svg.tc-chart'\n\n/** The computed style of an element, where there is one (not on the server). */\nconst computed = (el: Element): CSSStyleDeclaration | undefined =>\n typeof getComputedStyle === 'function' ? getComputedStyle(el) : undefined\n\n/** The chart on each element. */\nconst mounted = /* @__PURE__ */ new WeakMap<Element, Chart<object>>()\n\n/**\n * A chart bound to a DOM element: measures its container, renders SVG into\n * it and re-renders on `update()` and resize (batched per animation frame).\n * Features such as the tooltip, the legend and pointer input (`hover` /\n * `click` events, from `pointer()`, which the highlight and tooltip plugins\n * turn on themselves) are plugins; the `Chart` exported by `@tabler/charts`\n * installs the built-in ones.\n *\n * ```ts\n * const chart = new Chart('#sales', { type: line, data })\n * chart.update({ data: next })\n * ```\n */\nexport class Chart<O extends object = object> {\n /** Element the chart renders into. */\n readonly element: HTMLElement\n /** Id prefix used for elements inside the chart. */\n readonly id: string\n #cfg: ChartConfig<O>\n /** Container size changes, from the shared ResizeObserver. */\n #onResize = (width: number, height: number): void => {\n // Our own SVG sets the container height unless it follows the container.\n const followsHeight = this.#cfg.height === 'container'\n const changed =\n width !== this.#measured.width || (followsHeight && height !== this.#measured.height)\n this.#measured = { width, height }\n // A hidden container (display: none) measures 0×0: nothing to draw until it shows again.\n if (changed && (width || height)) {\n this.#font = undefined\n this.#markResizing()\n this.#schedule()\n }\n }\n #measured: Partial<Size> = {}\n readonly #handlers = new Map() as Handlers\n #unobserve: () => void\n readonly #plugins: PluginInstance[] = []\n #destroyed = false\n #current: Interaction | undefined\n #source: Source | undefined\n #hovered = ''\n #hit: Hit | null = null\n /** Chart type output of the last render, reused while only the highlight changes. */\n #cache: Content<O> | undefined\n #resizeTimer: ReturnType<typeof setTimeout> | undefined\n /** Visibility set by the user, overriding each entry's default. */\n readonly #toggled = new Map<string, boolean>()\n /** Server-rendered svg to take over on the first render, if any. */\n #adopt: Element | null\n /**\n * The measured `--tc-font-size` (`undefined` reads it again). Reading it\n * forces the browser to restyle the page, so new data alone reuses it.\n */\n #font: number | undefined\n /** The resolved `rtl` option, read with the font size (`'auto'` asks the container). */\n #rtl = false\n\n constructor(\n target: HTMLElement | string,\n config: ChartConfig<O>,\n defaultPlugins: readonly ChartPlugin[] = [],\n ) {\n const element =\n typeof target === 'string' ? document.querySelector<HTMLElement>(target) : target\n if (!element) throw new Error(`@tabler/charts: element \"${String(target)}\" not found.`)\n // One chart per element: a new one replaces the chart already there.\n mounted.get(element)?.destroy()\n mounted.set(element, this)\n this.element = element\n this.#cfg = cleanData(config)\n this.id = config.id ?? nextId()\n this.#adopt = element.querySelector(ROOT)\n this.#measure()\n this.#unobserve = observeResize(element, this.#onResize)\n try {\n for (const plugin of [\n ...defaultPlugins,\n ...(config.type.plugins ?? []),\n ...(config.plugins ?? []),\n ]) {\n this.#plugins.push(plugin.install(this))\n }\n this.render()\n } catch (error) {\n // Nobody gets this chart to destroy it: leave the element as it was found.\n this.destroy()\n throw error\n }\n }\n\n /** Current configuration. */\n get config(): ChartConfig<O> {\n return this.#cfg\n }\n\n /** Size of the last render. */\n get size(): Size {\n // In 'container' height mode, plugins such as the legend take part of the\n // container. Only then: measuring them forces a layout of the page.\n let measured = this.#measured\n // A legend beside the chart takes its width (it reads its own layout only then).\n let beside = 0\n for (const plugin of this.#plugins) beside += plugin.reservedWidth?.() ?? 0\n if (beside && measured.width) measured = { ...measured, width: measured.width - beside }\n const { height, legend } = this.#cfg\n // A height in pixels covers the legend when asked to (`legend.withinHeight`).\n const within =\n Number.isFinite(height) && typeof legend === 'object' && legend?.withinHeight === true\n let reserved = 0\n if (within || (height === 'container' && measured.height)) {\n for (const plugin of this.#plugins) reserved += plugin.reservedHeight?.() ?? 0\n }\n if (reserved && !within) {\n measured = { ...measured, height: (measured.height as number) - reserved }\n }\n const size = resolveSize(this.#cfg, measured)\n if (within) size.height = Math.max(0, size.height - Math.round(reserved))\n return size\n }\n\n /**\n * Whether the chart is laid out right to left: the `rtl` option, with\n * `'auto'` read from the container (together with the font size).\n */\n get rtl(): boolean {\n const cfg = this.#cfg\n if (this.#font === undefined) {\n this.#rtl =\n cfg.rtl === 'auto' ? computed(this.element)?.direction === 'rtl' : cfg.rtl === true\n this.#font = cfg.fontSize ?? this.#measureFontSize()\n }\n return this.#rtl\n }\n\n /** Font size used by the last render (explicit, measured, or the default). */\n get fontSize(): number {\n return this.#cache?.fontSize ?? this.#cfg.fontSize ?? DEFAULT_FONT_SIZE\n }\n\n /** How pointer and keyboard map to data for the current render. */\n get interaction(): Interaction | undefined {\n return this.#current\n }\n\n /** The highlighted category (hover or keyboard), or `null`. */\n get active(): Hit | null {\n return this.#hit\n }\n\n /**\n * The pointer in chart pixels while it drives the highlight (`undefined`\n * for keyboard highlights). `hitAnchor(chart.active, chart.pointer)` gives\n * where a tooltip belongs either way.\n */\n get pointer(): { x: number; y: number } | undefined {\n const source = this.#source\n return this.#hit && source?.kind === 'pointer' ? { x: source.x, y: source.y } : undefined\n }\n\n /** Whether the highlight comes from the pointer or from `highlightIndex()` (keyboard). */\n get highlightSource(): 'pointer' | 'index' | undefined {\n return this.#hit ? this.#source?.kind : undefined\n }\n\n /**\n * Highlight a category by index (and optionally one series in it), as\n * keyboard navigation does. Returns the hit, or `null` for an invalid index.\n */\n highlightIndex(index: number, seriesIndex?: number): Hit | null {\n const hit = this.#current?.hitIndex(index, seriesIndex) ?? null\n if (!hit) return null\n this.#source = { kind: 'index', index, seriesIndex }\n this.#setHover(hit)\n return hit\n }\n\n /**\n * Highlight what lies at a point in chart pixels, as the pointer does (the\n * `pointer()` plugin calls it). Returns the hit, or `null` for none.\n */\n highlightAt(x: number, y: number, event?: PointerEvent): Hit | null {\n const hit = this.hitTest(x, y)\n this.#source = { kind: 'pointer', x, y }\n this.#setHover(hit, event)\n return hit\n }\n\n /** Remove any highlight. */\n clearHighlight(event?: PointerEvent): void {\n this.#source = undefined\n this.#setHover(null, event)\n }\n\n /**\n * Show or hide a legend entry (series) by key, name or index; toggles when\n * `hidden` is omitted. Re-renders in the next frame.\n */\n toggleSeries(target: string | number, hidden?: boolean): this {\n const { items } = resolveLegend(this.#cfg)\n const item =\n typeof target === 'number'\n ? items.find((entry) => entry.index === target)\n : (items.find((entry) => entry.key === target) ??\n items.find((entry) => entry.name === target))\n if (!item) return this\n const next = hidden ?? !this.#hiddenSet(items).has(item.key)\n this.#toggled.set(item.key, next)\n this.emit('legend-toggle', { key: item.key, name: item.name, index: item.index, hidden: next })\n this.#schedule()\n return this\n }\n\n /** Whether a legend entry is hidden. */\n isHidden(key: string): boolean {\n return this.#hiddenSet(resolveLegend(this.#cfg).items).has(key)\n }\n\n /** Merge `options` into the configuration and re-render in the next frame. */\n update(options: Partial<ChartConfig<O>>): this {\n this.#cfg = cleanData({ ...this.#cfg, ...options })\n // Options such as `class` may change the font size; new data does not.\n for (const key in options) if (key !== 'data') this.#font = undefined\n this.#schedule()\n return this\n }\n\n /**\n * Replace the whole configuration and re-render in the next frame: options\n * left out go back to their defaults (`update()` would keep them).\n */\n setConfig(config: ChartConfig<O>): this {\n this.#cfg = cleanData(config)\n this.#font = undefined\n this.#schedule()\n return this\n }\n\n /** Replace the data and re-render in the next frame. */\n setData(data: O extends { data: infer D } ? D : never): this {\n return this.update({ data } as unknown as Partial<ChartConfig<O>>)\n }\n\n /**\n * Re-measure the container and re-render in the next frame. Call it when a\n * container taken out of the page without `destroy()` comes back.\n */\n resize(): this {\n // A container taken out of the page and put back is observed again.\n if (!this.#destroyed) this.#unobserve = observeResize(this.element, this.#onResize)\n this.#measure()\n this.#font = undefined\n this.#schedule()\n return this\n }\n\n /** Render synchronously now. */\n render(): this {\n if (this.#destroyed) return this\n cancel(this)\n const cfg = this.#cfg\n const config: ChartConfig<object> = cfg\n assertType(config)\n const legend = resolveLegend(cfg)\n const hidden = this.#hiddenSet(legend.items)\n for (const plugin of this.#plugins) plugin.beforeRender?.({ config, legend, hidden })\n const size = this.size\n const { content, stale, changed } = this.#content(size, hidden)\n if (stale) this.#refreshHighlight()\n\n const adopted = this.#adopt\n render(this.element, this.#compose(content, size), adopted)\n this.#adopt = null\n // The server markup was hydrated in place: snap it to the real size and\n // data instead of morphing (the server could not measure the container).\n if (adopted) this.#markResizing()\n\n for (const plugin of this.#plugins)\n plugin.afterRender?.({ config, legend, hidden, size, stale, changed })\n if (stale) this.emit('render', { size })\n return this\n }\n\n /**\n * The chart type's output for the current config, size, hidden series and\n * font size: built again when one of them changed (`stale`; `changed` when\n * it is what the chart shows, not only its size), else the one of the last render.\n */\n #content(\n size: Size,\n hidden: ReadonlySet<string>,\n ): { content: Content<O>; stale: boolean; changed: boolean } {\n const cfg = this.#cfg\n const hiddenKey = [...hidden].sort().join('\\u0000')\n const rtl = this.rtl\n const fontSize = cfg.fontSize ?? this.#font\n\n let cache = this.#cache\n const changed = !cache || cache.cfg !== cfg || cache.hidden !== hiddenKey\n const stale =\n changed ||\n cache?.width !== size.width ||\n cache.height !== size.height ||\n cache.fontSize !== fontSize ||\n cache.rtl !== rtl\n if (!cache || stale) {\n if (cfg.type.sweep) features.sweep = cfg.type.sweep\n const { content, interaction } = renderContent(\n cfg,\n renderContext(cfg, { size, id: this.id, hidden, fontSize, rtl }),\n )\n this.#current = interaction\n cache = {\n cfg,\n width: size.width,\n height: size.height,\n hidden: hiddenKey,\n fontSize,\n rtl,\n content,\n still: isStatic(cfg, content),\n }\n this.#cache = cache\n }\n return { content: cache, stale, changed }\n }\n\n /** Keep the highlight (and its consumers, like tooltips) in sync with new data or layout. */\n #refreshHighlight(): void {\n const source = this.#source\n if (!source) return\n const next =\n source.kind === 'pointer'\n ? this.hitTest(source.x, source.y)\n : (this.#current?.hitIndex(source.index, source.seriesIndex) ?? null)\n this.#setHover(next, undefined, true, false)\n }\n\n /** The root svg: the content, with the plugins' hover layers and attributes. */\n #compose(content: Content<O>, size: Size): VNode {\n const config: ChartConfig<object> = this.#cfg\n const hit = this.#hit\n const under: ChildInput[] = []\n const over: ChildInput[] = []\n let attrs: Props | undefined\n for (const plugin of this.#plugins) {\n if (hit && plugin.layers) {\n const layer = plugin.layers(hit, config)\n under.push(layer.under)\n over.push(layer.over)\n }\n const extra = plugin.svgAttrs?.(config)\n if (extra) attrs = { ...attrs, ...extra }\n }\n // Hover layers only while something is highlighted (an empty list would still render).\n return composeChart(\n config,\n size,\n this.id,\n content.still,\n content.content,\n under.length ? under : undefined,\n over.length ? over : undefined,\n attrs,\n content.rtl,\n )\n }\n\n /** What lies at a point in chart pixels, or `null`. */\n hitTest(x: number, y: number): Hit | null {\n return this.#current?.hitTest(x, y) ?? null\n }\n\n /** Subscribe to an event; returns a function that unsubscribes. */\n on<K extends keyof ChartEvents>(name: K, handler: Handler<ChartEvents[K]>): () => void {\n let set = this.#handlers.get(name)\n if (!set) {\n set = new Set()\n this.#handlers.set(name, set)\n }\n set.add(handler)\n return () => {\n set.delete(handler)\n }\n }\n\n /** Remove the chart from the DOM and stop observing its container. */\n destroy(): void {\n if (this.#destroyed) return\n this.#destroyed = true\n if (mounted.get(this.element) === this) mounted.delete(this.element)\n cancel(this)\n clearTimeout(this.#resizeTimer)\n this.#unobserve()\n for (const plugin of this.#plugins) plugin.destroy?.()\n this.#handlers.clear()\n render(this.element, null)\n }\n\n /**\n * Update the highlighted hit: emit `hover` when it changed (or when\n * `force`d after new data) and re-render the hover layers in the next frame.\n */\n #setHover(hit: Hit | null, event?: PointerEvent, force = false, rerender = true): void {\n const key = hitKey(hit)\n if (!force && key === this.#hovered) {\n // The same category, elsewhere along the values: only the value under the pointer moved.\n if (\n hit?.cursor &&\n cursorValue(this.#cfg) &&\n hit.cursor.position !== this.#hit?.cursor?.position\n ) {\n this.#hit = hit\n if (rerender) this.#schedule()\n }\n return\n }\n // After a re-render, only a highlight that is still active is worth repeating.\n if (force && key === '' && this.#hovered === '') return\n this.#hovered = key\n this.#hit = hit\n this.emit('hover', event ? { hit, event } : { hit })\n if (rerender) this.#schedule()\n }\n\n #hiddenSet(items: readonly LegendItem[]): Set<string> {\n const hidden = new Set<string>()\n for (const item of items) {\n if (this.#toggled.get(item.key) ?? item.hidden) hidden.add(item.key)\n }\n return hidden\n }\n\n /** Suspend transitions while the container keeps resizing (see `[data-resizing]` in CSS). */\n #markResizing(): void {\n const svg = this.element.querySelector(ROOT)\n if (!svg) return\n svg.setAttribute('data-resizing', '')\n clearTimeout(this.#resizeTimer)\n this.#resizeTimer = setTimeout(() => svg.removeAttribute('data-resizing'), 200)\n }\n\n #schedule(): void {\n if (!this.#destroyed) schedule(this, () => this.render())\n }\n\n /** The `--tc-font-size` in effect on the container, in pixels (browser only). */\n #measureFontSize(): number | undefined {\n const value = Number.parseFloat(\n computed(this.element)?.getPropertyValue('--tc-font-size') ?? '',\n )\n return Number.isFinite(value) && value > 0 ? value : undefined\n }\n\n /** Measure the content box, matching what `ResizeObserver` reports. */\n #measure(): void {\n const el = this.element\n const style = computed(el)\n const px = (value: string | undefined) => Number.parseFloat(value ?? '') || 0\n this.#measured = {\n width: el.clientWidth - px(style?.paddingLeft) - px(style?.paddingRight),\n height: el.clientHeight - px(style?.paddingTop) - px(style?.paddingBottom),\n }\n }\n\n /** Call the handlers of an event (plugins emit `click`, for instance). */\n emit<K extends keyof ChartEvents>(name: K, event: ChartEvents[K]): void {\n const set = this.#handlers.get(name)\n if (set) for (const handler of set) handler(event)\n }\n}\n"],"mappings":";;;;;;;;;;AAuCA,SAAgB,cACd,OACA,QACA,OACO;CACP,OAAOA,cAAAA,EACL,OACA,EAAE,OAAO,kBAAkB,GAC3B,MAAM,KAAK,SAAS;EAClB,MAAM,MAAM,OAAO,IAAI,KAAK,GAAG;EAC/B,OAAOA,cAAAA,EACL,UACA;GACE,KAAK,KAAK;GACV,MAAM;GACN,OAAO;IACL;IACA;IACA,aAAa,KAAK,QAAQ;IAC1B,OAAO;GACT;GAEA,OAAO;IAAE,qBAAqB,KAAK;IAAO,GAAG,QAAQ,KAAK,KAAK;GAAE;GACjE,gBAAgB,MAAM,UAAU;GAChC,YAAY,KAAK;EACnB,GACAA,cAAAA,EAAE,QAAQ;GAAE,OAAO;GAAoB,eAAe;EAAO,CAAC,GAC9DA,cAAAA,EAAE,QAAQ,EAAE,OAAO,iBAAiB,GAAG,KAAK,IAAI,CAClD;CACF,CAAC,CACH;AACF;;AAGA,SAAgB,cAAc,OAA2C;CACvE,OAAO,IAAI,IAAI,MAAM,QAAQ,SAAS,KAAK,MAAM,CAAC,CAAC,KAAK,SAAS,KAAK,GAAG,CAAC;AAC5E;;ACxEA,MAAM,SAAS;;AAgBf,MAAM,6BAA6B,IAAI,IAAI;CACzC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,MAAM,uBAAuB,IAAI,IAAI;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;;AAYD,SAAgB,eAAe,MAAa,UAAiC,CAAC,GAAW;CACvF,IAAI,OAAO,SAAS,UAAU,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