@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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as Rect } from "./layout-CYerDebD.js";
|
|
2
2
|
import { l as VNode, r as Child } from "./vnode-Du2cC8Fm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { V as ChartPlugin, kt as Tick, zt as Hit } from "./chart-CE9EVbfV.js";
|
|
4
4
|
interface ArcOptions {
|
|
5
5
|
innerRadius: number;
|
|
6
6
|
outerRadius: number;
|
|
@@ -39,23 +39,33 @@ interface GridOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
declare function grid(options: GridOptions): VNode;
|
|
41
41
|
/**
|
|
42
|
-
* Hover marks drawn below the series:
|
|
43
|
-
*
|
|
42
|
+
* Hover marks drawn below the series: the band behind the hovered category
|
|
43
|
+
* (bars), a crosshair through it (point charts; a spoke in radars), or a
|
|
44
|
+
* halo that asks to stay `under` the chart (sankey flows).
|
|
44
45
|
*/
|
|
45
46
|
declare function hoverUnderlay(hit: Hit, crosshair?: boolean): VNode;
|
|
46
47
|
/**
|
|
47
|
-
* Hover marks drawn above the series:
|
|
48
|
-
*
|
|
48
|
+
* Hover marks drawn above the series: a halo (pie slices), or an active dot
|
|
49
|
+
* on every value of point charts (of the series' `shape`, if given);
|
|
50
|
+
* `points: false` leaves the dots out.
|
|
49
51
|
*/
|
|
50
|
-
declare function hoverOverlay(hit: Hit, radius?: number, shape?: (slot: number, x: number, y: number, r: number) => string): VNode;
|
|
52
|
+
declare function hoverOverlay(hit: Hit, radius?: number, shape?: (slot: number, x: number, y: number, r: number) => string, points?: boolean): VNode;
|
|
53
|
+
/**
|
|
54
|
+
* The value under the pointer (`hit.cursor`): a line through it across the
|
|
55
|
+
* plot and the value in a tag on the value axis, drawn above the axes. Nothing
|
|
56
|
+
* for a hit without one (keyboard, charts without a value axis).
|
|
57
|
+
*/
|
|
58
|
+
declare function hoverValue(hit: Hit, fontSize: number): VNode | undefined;
|
|
51
59
|
/**
|
|
52
60
|
* Draws the highlighted category: a crosshair (or a band behind bars) under
|
|
53
|
-
* the series and active dots above them. `crosshair: false` keeps the dots
|
|
61
|
+
* the series and active dots above them. `crosshair: false` keeps the dots,
|
|
62
|
+
* `activePoints: false` the crosshair; `crosshair: { value: true }` adds the
|
|
63
|
+
* value under the pointer on the value axis.
|
|
54
64
|
*/
|
|
55
65
|
declare function highlight(): ChartPlugin;
|
|
56
66
|
declare function keyboard(): ChartPlugin;
|
|
57
67
|
/**
|
|
58
|
-
* An HTML legend (`.tc-legend`) with toggle buttons, above or
|
|
68
|
+
* An HTML legend (`.tc-legend`) with toggle buttons, above, below or beside the SVG.
|
|
59
69
|
* Shown for two or more entries unless the `legend` option says otherwise.
|
|
60
70
|
*/
|
|
61
71
|
declare function legend(): ChartPlugin;
|
|
@@ -79,6 +89,12 @@ declare function dataTable(): ChartPlugin;
|
|
|
79
89
|
* `theme: 'light'` adds `.tc-tooltip-light` for the white variant.
|
|
80
90
|
*/
|
|
81
91
|
declare function tooltip(): ChartPlugin;
|
|
92
|
+
/**
|
|
93
|
+
* Zoom along the categories of line, area, bar and candlestick charts,
|
|
94
|
+
* behind `zoom: true`. The code comes with `import '@tabler/charts/zoom'`
|
|
95
|
+
* (before the chart is created); without it the plugin does nothing.
|
|
96
|
+
*/
|
|
97
|
+
declare const zoom: () => ChartPlugin;
|
|
82
98
|
/** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */
|
|
83
99
|
declare function defaultPlugins(): ChartPlugin[];
|
|
84
100
|
/**
|
|
@@ -180,4 +196,4 @@ declare function barPath(x: number, width: number, baseline: number, value: numb
|
|
|
180
196
|
declare function hbarPath(y: number, height: number, baseline: number, value: number, radius?: number): string;
|
|
181
197
|
/** Version of the `@tabler/charts` package. */
|
|
182
198
|
declare const VERSION: string;
|
|
183
|
-
export {
|
|
199
|
+
export { grid as A, legend as C, hoverUnderlay as D, hoverOverlay as E, arcCentroid as M, arcPathStable as N, hoverValue as O, padAngleForGap as P, pointer as S, highlight as T, defaultPlugins as _, flush as a, dataTable as b, tickIncrement as c, extent as d, RenderToStringOptions as f, render as g, renderToString as h, cancel as i, ArcOptions as j, GridOptions as k, tickStep as l, escapeText as m, barPath as n, schedule as o, escapeAttr as p, hbarPath as r, niceDomain as s, VERSION as t, ticks as u, zoom as v, keyboard as w, sync as x, tooltip as y };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
2
|
-
const require_chart = require("./chart-
|
|
3
|
-
const require_cartesian = require("./cartesian-
|
|
4
|
-
const require_layout = require("./layout-
|
|
5
|
-
const require_features = require("./features-
|
|
2
|
+
const require_chart = require("./chart-GUmmjJ7S.cjs");
|
|
3
|
+
const require_cartesian = require("./cartesian-B9CrasFJ.cjs");
|
|
4
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
5
|
+
const require_features = require("./features-DEDP5CEQ.cjs");
|
|
6
6
|
const require_format = require("./format-CAE5ruy6.cjs");
|
|
7
|
-
const require_dom = require("./dom-
|
|
7
|
+
const require_dom = require("./dom-C33zvtPo.cjs");
|
|
8
|
+
const require_interaction = require("./interaction-DXYSjgnP.cjs");
|
|
8
9
|
// src/plugins/download.ts
|
|
9
10
|
const NAMES = {
|
|
10
11
|
png: "PNG",
|
|
11
12
|
svg: "SVG",
|
|
12
13
|
jpeg: "JPEG",
|
|
13
|
-
webp: "WebP"
|
|
14
|
+
webp: "WebP",
|
|
15
|
+
csv: "CSV"
|
|
14
16
|
};
|
|
15
17
|
const DEFAULT_FORMATS = ["png", "svg"];
|
|
16
18
|
function resolve(option) {
|
|
@@ -18,8 +20,8 @@ function resolve(option) {
|
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* A download menu in the chart's corner (`.tc-download`): a button that opens
|
|
21
|
-
* a list of file formats, PNG and SVG by default
|
|
22
|
-
* option. The files come from `@tabler/charts/export`, which must be imported
|
|
23
|
+
* a list of file formats, PNG and SVG by default (`'csv'` adds the data as a
|
|
24
|
+
* CSV file). Shown with the `download` option. The files come from `@tabler/charts/export`, which must be imported
|
|
23
25
|
* (the chart says so otherwise): that way charts without a download never
|
|
24
26
|
* carry the export code.
|
|
25
27
|
*/
|
|
@@ -151,56 +153,51 @@ function seriesGroup(seriesIndex, color, child) {
|
|
|
151
153
|
style: { "--tc-series-color": color }
|
|
152
154
|
}, child);
|
|
153
155
|
}
|
|
156
|
+
/** A halo around the hit, in the color of its series. */
|
|
157
|
+
function halo(hit, mark) {
|
|
158
|
+
const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
|
|
159
|
+
return item && seriesGroup(item.seriesIndex, item.color, require_vnode.h("path", {
|
|
160
|
+
class: "tc-hover-mark",
|
|
161
|
+
d: mark.d,
|
|
162
|
+
style: `transform:translate(${require_layout.round(mark.x ?? 0)}px,${require_layout.round(mark.y ?? 0)}px)`
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
154
165
|
/**
|
|
155
|
-
* Hover marks drawn below the series:
|
|
156
|
-
*
|
|
166
|
+
* Hover marks drawn below the series: the band behind the hovered category
|
|
167
|
+
* (bars), a crosshair through it (point charts; a spoke in radars), or a
|
|
168
|
+
* halo that asks to stay `under` the chart (sankey flows).
|
|
157
169
|
*/
|
|
158
170
|
function hoverUnderlay(hit, crosshair = true) {
|
|
159
|
-
const { area } = hit;
|
|
171
|
+
const { area, highlight: mark = { kind: "crosshair" } } = hit;
|
|
172
|
+
const line = (x1, y1, x2, y2) => crosshair && require_vnode.h("line", {
|
|
173
|
+
class: "tc-crosshair",
|
|
174
|
+
x1: require_layout.round(x1),
|
|
175
|
+
x2: require_layout.round(x2),
|
|
176
|
+
y1: require_layout.round(y1),
|
|
177
|
+
y2: require_layout.round(y2)
|
|
178
|
+
});
|
|
160
179
|
return require_vnode.h("g", {
|
|
161
180
|
class: "tc-hover",
|
|
162
181
|
"aria-hidden": "true"
|
|
163
|
-
},
|
|
182
|
+
}, mark.kind === "halo" ? mark.under && halo(hit, mark) : mark.kind === "band" ? require_vnode.h("rect", {
|
|
164
183
|
class: "tc-hover-band",
|
|
165
|
-
x: require_layout.round(
|
|
166
|
-
y: require_layout.round(
|
|
167
|
-
width: require_layout.round(
|
|
168
|
-
height: require_layout.round(
|
|
169
|
-
}) :
|
|
170
|
-
class: "tc-crosshair",
|
|
171
|
-
x1: require_layout.round(hit.guide.x1),
|
|
172
|
-
x2: require_layout.round(hit.guide.x2),
|
|
173
|
-
y1: require_layout.round(hit.guide.y1),
|
|
174
|
-
y2: require_layout.round(hit.guide.y2)
|
|
175
|
-
} : {
|
|
176
|
-
class: "tc-crosshair",
|
|
177
|
-
x1: require_layout.round(hit.x),
|
|
178
|
-
x2: require_layout.round(hit.x),
|
|
179
|
-
y1: require_layout.round(area.y),
|
|
180
|
-
y2: require_layout.round(area.y + area.height)
|
|
181
|
-
}));
|
|
184
|
+
x: require_layout.round(mark.x),
|
|
185
|
+
y: require_layout.round(mark.y),
|
|
186
|
+
width: require_layout.round(mark.width),
|
|
187
|
+
height: require_layout.round(mark.height)
|
|
188
|
+
}) : mark.kind === "spoke" ? line(mark.x1, mark.y1, mark.x2, mark.y2) : line(hit.x, area.y, hit.x, area.y + area.height));
|
|
182
189
|
}
|
|
183
190
|
/**
|
|
184
|
-
* Hover marks drawn above the series:
|
|
185
|
-
*
|
|
191
|
+
* Hover marks drawn above the series: a halo (pie slices), or an active dot
|
|
192
|
+
* on every value of point charts (of the series' `shape`, if given);
|
|
193
|
+
* `points: false` leaves the dots out.
|
|
186
194
|
*/
|
|
187
|
-
function hoverOverlay(hit, radius = 4, shape) {
|
|
188
|
-
const
|
|
189
|
-
if (mark) {
|
|
190
|
-
const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
|
|
191
|
-
return require_vnode.h("g", {
|
|
192
|
-
class: "tc-hover",
|
|
193
|
-
"aria-hidden": "true"
|
|
194
|
-
}, item && seriesGroup(item.seriesIndex, item.color, require_vnode.h("path", {
|
|
195
|
-
class: "tc-hover-mark",
|
|
196
|
-
d: mark.d,
|
|
197
|
-
style: `transform:translate(${require_layout.round(mark.x)}px,${require_layout.round(mark.y)}px)`
|
|
198
|
-
})));
|
|
199
|
-
}
|
|
195
|
+
function hoverOverlay(hit, radius = 4, shape, points = true) {
|
|
196
|
+
const mark = hit.highlight;
|
|
200
197
|
return require_vnode.h("g", {
|
|
201
198
|
class: "tc-hover",
|
|
202
199
|
"aria-hidden": "true"
|
|
203
|
-
}, !hit
|
|
200
|
+
}, mark?.kind === "halo" ? !mark.under && halo(hit, mark) : points && mark?.kind !== "band" && hit.items.map((item) => item.y !== null && seriesGroup(item.seriesIndex, item.color, shape ? require_vnode.h("path", {
|
|
204
201
|
class: "tc-point tc-point-active tc-marker",
|
|
205
202
|
d: shape(item.seriesIndex, item.x, item.y, radius)
|
|
206
203
|
}) : require_vnode.h("circle", {
|
|
@@ -210,6 +207,60 @@ function hoverOverlay(hit, radius = 4, shape) {
|
|
|
210
207
|
r: radius
|
|
211
208
|
}))));
|
|
212
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* The value under the pointer (`hit.cursor`): a line through it across the
|
|
212
|
+
* plot and the value in a tag on the value axis, drawn above the axes. Nothing
|
|
213
|
+
* for a hit without one (keyboard, charts without a value axis).
|
|
214
|
+
*/
|
|
215
|
+
function hoverValue(hit, fontSize) {
|
|
216
|
+
const { cursor, area } = hit;
|
|
217
|
+
if (!cursor) return void 0;
|
|
218
|
+
const { position: at, side, inside } = cursor;
|
|
219
|
+
const right = area.x + area.width;
|
|
220
|
+
const bottom = area.y + area.height;
|
|
221
|
+
const w = require_layout.estimateTextWidth(cursor.text, fontSize) + 8;
|
|
222
|
+
const hgt = Math.round(fontSize * require_layout.LINE_HEIGHT) + 2;
|
|
223
|
+
const gap = 4;
|
|
224
|
+
let x;
|
|
225
|
+
let y;
|
|
226
|
+
if (side === "bottom") {
|
|
227
|
+
x = Math.min(Math.max(at - w / 2, area.x), right - w);
|
|
228
|
+
y = inside ? bottom - hgt - 2 : bottom + gap;
|
|
229
|
+
} else {
|
|
230
|
+
y = Math.min(Math.max(at - hgt / 2, area.y - hgt / 2), bottom - hgt / 2);
|
|
231
|
+
if (side === "left") x = inside ? area.x + 2 : area.x - gap - w;
|
|
232
|
+
else x = inside ? right - w - 2 : right + gap;
|
|
233
|
+
}
|
|
234
|
+
return require_vnode.h("g", {
|
|
235
|
+
class: "tc-hover tc-crosshair-value",
|
|
236
|
+
"aria-hidden": "true"
|
|
237
|
+
}, require_vnode.h("line", side === "bottom" ? {
|
|
238
|
+
class: "tc-crosshair",
|
|
239
|
+
x1: require_layout.round(at),
|
|
240
|
+
x2: require_layout.round(at),
|
|
241
|
+
y1: require_layout.round(area.y),
|
|
242
|
+
y2: require_layout.round(bottom)
|
|
243
|
+
} : {
|
|
244
|
+
class: "tc-crosshair",
|
|
245
|
+
x1: require_layout.round(area.x),
|
|
246
|
+
x2: require_layout.round(right),
|
|
247
|
+
y1: require_layout.round(at),
|
|
248
|
+
y2: require_layout.round(at)
|
|
249
|
+
}), require_vnode.h("rect", {
|
|
250
|
+
class: "tc-crosshair-tag",
|
|
251
|
+
x: require_layout.round(x),
|
|
252
|
+
y: require_layout.round(y),
|
|
253
|
+
width: require_layout.round(w),
|
|
254
|
+
height: hgt,
|
|
255
|
+
rx: 3
|
|
256
|
+
}), require_vnode.h("text", {
|
|
257
|
+
class: "tc-crosshair-label",
|
|
258
|
+
x: require_layout.round(x + w / 2),
|
|
259
|
+
y: require_layout.round(y + hgt / 2),
|
|
260
|
+
dy: "0.32em",
|
|
261
|
+
"text-anchor": "middle"
|
|
262
|
+
}, cursor.text));
|
|
263
|
+
}
|
|
213
264
|
// src/plugins/pointer.ts
|
|
214
265
|
const listening = /* @__PURE__ */ new WeakSet();
|
|
215
266
|
/**
|
|
@@ -225,9 +276,9 @@ function listenPointer(chart) {
|
|
|
225
276
|
const svg = el.querySelector("svg.tc-chart");
|
|
226
277
|
if (!svg) return void 0;
|
|
227
278
|
const { width, height } = chart.size;
|
|
228
|
-
return
|
|
279
|
+
return require_interaction.toChartPoint(svg, event.clientX, event.clientY, width, height);
|
|
229
280
|
};
|
|
230
|
-
const overControl = (event) => !!event.target?.closest?.(".tc-download");
|
|
281
|
+
const overControl = (event) => !!event.target?.closest?.(".tc-download,.tc-map-zoom");
|
|
231
282
|
const onLeave = (event) => {
|
|
232
283
|
if (event.pointerType !== "touch" && chart.highlightSource === "pointer") chart.clearHighlight(event);
|
|
233
284
|
};
|
|
@@ -277,7 +328,9 @@ function pointer() {
|
|
|
277
328
|
// src/plugins/highlight.ts
|
|
278
329
|
/**
|
|
279
330
|
* Draws the highlighted category: a crosshair (or a band behind bars) under
|
|
280
|
-
* the series and active dots above them. `crosshair: false` keeps the dots
|
|
331
|
+
* the series and active dots above them. `crosshair: false` keeps the dots,
|
|
332
|
+
* `activePoints: false` the crosshair; `crosshair: { value: true }` adds the
|
|
333
|
+
* value under the pointer on the value axis.
|
|
281
334
|
*/
|
|
282
335
|
function highlight() {
|
|
283
336
|
return {
|
|
@@ -287,7 +340,7 @@ function highlight() {
|
|
|
287
340
|
return {
|
|
288
341
|
layers: (hit, config) => ({
|
|
289
342
|
under: hoverUnderlay(hit, config.crosshair !== false),
|
|
290
|
-
over: hoverOverlay(hit, 4, require_cartesian.markerShape(config))
|
|
343
|
+
over: [hoverOverlay(hit, 4, require_cartesian.markerShape(config), config.activePoints !== false), require_chart.cursorValue(config) && hoverValue(hit, chart.fontSize)]
|
|
291
344
|
}),
|
|
292
345
|
...stop ? { destroy: stop } : {}
|
|
293
346
|
};
|
|
@@ -352,6 +405,11 @@ function keyboard() {
|
|
|
352
405
|
const interaction = chart.interaction;
|
|
353
406
|
if (!interaction || interaction.count === 0) return false;
|
|
354
407
|
if (interaction.reversed && /^Arrow(L|R)/.test(key)) key = key === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
|
|
408
|
+
let column = interaction.rows ?? 1;
|
|
409
|
+
if (interaction.rows && /^Arrow(U|D)/.test(key)) {
|
|
410
|
+
key = key === "ArrowUp" ? "ArrowLeft" : "ArrowRight";
|
|
411
|
+
column = 1;
|
|
412
|
+
}
|
|
355
413
|
const current = chart.highlightSource === "index" ? chart.active : null;
|
|
356
414
|
const last = interaction.count - 1;
|
|
357
415
|
const index = current?.index;
|
|
@@ -360,10 +418,10 @@ function keyboard() {
|
|
|
360
418
|
const at = focused === void 0 ? -1 : series.indexOf(focused);
|
|
361
419
|
switch (key) {
|
|
362
420
|
case "ArrowRight":
|
|
363
|
-
go(index === void 0 ? 0 : Math.min(last, index +
|
|
421
|
+
go(index === void 0 ? 0 : Math.min(last, index + column), focused);
|
|
364
422
|
return true;
|
|
365
423
|
case "ArrowLeft":
|
|
366
|
-
go(index === void 0 ? last : Math.max(0, index -
|
|
424
|
+
go(index === void 0 ? last : Math.max(0, index - column), focused);
|
|
367
425
|
return true;
|
|
368
426
|
case "Home":
|
|
369
427
|
go(0, focused);
|
|
@@ -417,8 +475,22 @@ function keyboard() {
|
|
|
417
475
|
};
|
|
418
476
|
}
|
|
419
477
|
// src/plugins/legend.ts
|
|
478
|
+
/** The side a legend beside the chart takes in a right-to-left chart. */
|
|
479
|
+
const MIRROR = {
|
|
480
|
+
left: "right",
|
|
481
|
+
right: "left"
|
|
482
|
+
};
|
|
483
|
+
/**
|
|
484
|
+
* Classes on the container of a legend beside the chart, and of one before
|
|
485
|
+
* it. A class rather than `:has()` in the stylesheet: a selector such as
|
|
486
|
+
* `:where(:has(> .tc-legend…))` matches any element, so the browser checks it
|
|
487
|
+
* again on every change to the page (a hover, a tooltip), which stalls a page
|
|
488
|
+
* of charts.
|
|
489
|
+
*/
|
|
490
|
+
const BESIDE = "tc-legend-beside";
|
|
491
|
+
const START = "tc-legend-start";
|
|
420
492
|
/**
|
|
421
|
-
* An HTML legend (`.tc-legend`) with toggle buttons, above or
|
|
493
|
+
* An HTML legend (`.tc-legend`) with toggle buttons, above, below or beside the SVG.
|
|
422
494
|
* Shown for two or more entries unless the `legend` option says otherwise.
|
|
423
495
|
*/
|
|
424
496
|
function legend() {
|
|
@@ -440,19 +512,37 @@ function legend() {
|
|
|
440
512
|
bound = false;
|
|
441
513
|
el.remove();
|
|
442
514
|
el = void 0;
|
|
515
|
+
host.classList.remove(BESIDE, START);
|
|
516
|
+
};
|
|
517
|
+
/** Whether the legend follows the SVG in the container (below it, or beside it at the end). */
|
|
518
|
+
let after = false;
|
|
519
|
+
const side = () => {
|
|
520
|
+
const position = el?.dataset.position;
|
|
521
|
+
return position === "left" || position === "right";
|
|
443
522
|
};
|
|
444
523
|
/** Keep the legend right before or after the SVG, whatever else lives in the container. */
|
|
445
524
|
const place = () => {
|
|
446
525
|
if (!el) return;
|
|
447
526
|
const svg = host.querySelector(":scope > svg.tc-chart");
|
|
448
|
-
if (
|
|
527
|
+
if (after) {
|
|
449
528
|
if (!svg) {
|
|
450
529
|
if (!el.isConnected) host.appendChild(el);
|
|
451
530
|
} else if (svg.nextElementSibling !== el) svg.after(el);
|
|
452
531
|
} else if (!el.isConnected || el.nextElementSibling !== svg) host.insertBefore(el, svg ?? host.firstChild);
|
|
453
532
|
};
|
|
533
|
+
/** Put the legend at `position`: beside the chart it comes first on the container's start side. */
|
|
534
|
+
const put = (position) => {
|
|
535
|
+
if (!el) return;
|
|
536
|
+
el.dataset.position = position;
|
|
537
|
+
after = position === "bottom" || side() && position === "right" !== (getComputedStyle(host).direction === "rtl");
|
|
538
|
+
place();
|
|
539
|
+
host.classList.toggle(BESIDE, side());
|
|
540
|
+
host.classList.toggle(START, side() && !after);
|
|
541
|
+
};
|
|
542
|
+
/** Space between the chart and a legend beside it. */
|
|
543
|
+
const gap = () => Number.parseFloat(getComputedStyle(host).columnGap) || 0;
|
|
454
544
|
return {
|
|
455
|
-
beforeRender({ legend, hidden }) {
|
|
545
|
+
beforeRender({ config, legend, hidden }) {
|
|
456
546
|
if (!legend.show || typeof document === "undefined") {
|
|
457
547
|
remove();
|
|
458
548
|
return;
|
|
@@ -465,17 +555,22 @@ function legend() {
|
|
|
465
555
|
el.addEventListener("click", onClick);
|
|
466
556
|
bound = true;
|
|
467
557
|
}
|
|
468
|
-
el.dataset.position = legend.position;
|
|
469
558
|
el.dir = chart.rtl ? "rtl" : "";
|
|
470
|
-
require_dom.render(el, require_chart.legendContent(legend.items, hidden), adopt);
|
|
559
|
+
require_dom.render(el, require_chart.legendContent(legend.items, hidden, require_features.swatchShape(config)), adopt);
|
|
471
560
|
adopt = null;
|
|
472
|
-
|
|
561
|
+
const { position } = legend;
|
|
562
|
+
const beside = position === "auto" ? "right" : position;
|
|
563
|
+
put(chart.rtl && MIRROR[beside] || beside);
|
|
564
|
+
if (position === "auto" && (el.offsetWidth + gap()) * 3 > host.clientWidth) put("bottom");
|
|
473
565
|
},
|
|
474
566
|
reservedHeight() {
|
|
475
|
-
if (!el?.isConnected) return 0;
|
|
567
|
+
if (!el?.isConnected || side()) return 0;
|
|
476
568
|
const { marginTop, marginBottom } = getComputedStyle(el);
|
|
477
569
|
return el.offsetHeight + (Number.parseFloat(marginTop) || 0) + (Number.parseFloat(marginBottom) || 0);
|
|
478
570
|
},
|
|
571
|
+
reservedWidth() {
|
|
572
|
+
return el?.isConnected && side() ? el.offsetWidth + gap() : 0;
|
|
573
|
+
},
|
|
479
574
|
afterRender: place,
|
|
480
575
|
destroy: remove
|
|
481
576
|
};
|
|
@@ -618,10 +713,14 @@ function dataTable() {
|
|
|
618
713
|
el.remove();
|
|
619
714
|
el = void 0;
|
|
620
715
|
};
|
|
621
|
-
const update = (config,
|
|
716
|
+
const update = (config, hidden) => {
|
|
622
717
|
const option = config.table ?? true;
|
|
623
718
|
const maxRows = typeof option === "object" && option.maxRows ? option.maxRows : DEFAULT_MAX_ROWS;
|
|
624
|
-
const table = option !== false && typeof document !== "undefined" ? config.type.table?.(
|
|
719
|
+
const table = option !== false && typeof document !== "undefined" ? config.type.table?.(require_chart.chartModel(config), {
|
|
720
|
+
locale: config.locale,
|
|
721
|
+
hidden,
|
|
722
|
+
rtl: chart.rtl
|
|
723
|
+
}, maxRows) : void 0;
|
|
625
724
|
if (!table) {
|
|
626
725
|
remove();
|
|
627
726
|
return;
|
|
@@ -643,20 +742,20 @@ function dataTable() {
|
|
|
643
742
|
require_dom.render(el, tableContent(rows, caption), adopt);
|
|
644
743
|
adopt = null;
|
|
645
744
|
const svg = host.querySelector(":scope > svg.tc-chart");
|
|
646
|
-
const after = host.querySelector(":scope > .tc-legend
|
|
745
|
+
const after = host.querySelector(":scope > svg.tc-chart + .tc-legend") ?? svg;
|
|
647
746
|
if (after && after.nextElementSibling !== el) after.after(el);
|
|
648
747
|
else if (!el.isConnected) host.appendChild(el);
|
|
649
748
|
};
|
|
650
749
|
return {
|
|
651
|
-
afterRender({ config,
|
|
750
|
+
afterRender({ config, hidden, changed }) {
|
|
652
751
|
if (!changed && el?.isConnected) return;
|
|
653
752
|
const option = config.table ?? true;
|
|
654
753
|
const same = shown === option;
|
|
655
754
|
shown = option;
|
|
656
|
-
if (same && el?.isConnected && el.classList.contains("tc-sr-only")) scheduleIdle(key, () => update(config,
|
|
755
|
+
if (same && el?.isConnected && el.classList.contains("tc-sr-only")) scheduleIdle(key, () => update(config, hidden));
|
|
657
756
|
else {
|
|
658
757
|
cancelIdle(key);
|
|
659
|
-
update(config,
|
|
758
|
+
update(config, hidden);
|
|
660
759
|
}
|
|
661
760
|
},
|
|
662
761
|
destroy: remove
|
|
@@ -672,7 +771,7 @@ function dataTable() {
|
|
|
672
771
|
function hitAnchor(hit, pointer) {
|
|
673
772
|
if (pointer) return pointer;
|
|
674
773
|
const item = hit.items.find((i) => i.seriesIndex === hit.seriesIndex) ?? hit.items[0];
|
|
675
|
-
if (hit.
|
|
774
|
+
if (hit.highlight?.kind === "spoke" && item?.y != null) return {
|
|
676
775
|
x: item.x,
|
|
677
776
|
y: item.y
|
|
678
777
|
};
|
|
@@ -685,8 +784,11 @@ function hitAnchor(hit, pointer) {
|
|
|
685
784
|
y: item?.y ?? hit.area.y + hit.area.height / 2
|
|
686
785
|
};
|
|
687
786
|
}
|
|
688
|
-
/**
|
|
689
|
-
|
|
787
|
+
/**
|
|
788
|
+
* Default tooltip content: the category title and one row per series
|
|
789
|
+
* (`shape` gives their swatches the point shapes of their slots).
|
|
790
|
+
*/
|
|
791
|
+
function tooltipContent(hit, options = {}, shape) {
|
|
690
792
|
const body = options.format ? options.format(hit) : [
|
|
691
793
|
hit.title && require_vnode.h("div", { class: "tc-tooltip-title" }, hit.title),
|
|
692
794
|
hit.items.map((item) => require_vnode.h("div", {
|
|
@@ -697,7 +799,10 @@ function tooltipContent(hit, options = {}) {
|
|
|
697
799
|
`tc-series-${item.seriesIndex + 1}`,
|
|
698
800
|
hit.seriesIndex === item.seriesIndex && "tc-tooltip-item-active"
|
|
699
801
|
],
|
|
700
|
-
style: {
|
|
802
|
+
style: {
|
|
803
|
+
"--tc-series-color": item.color,
|
|
804
|
+
...shape?.(item.seriesIndex)
|
|
805
|
+
}
|
|
701
806
|
}, require_vnode.h("span", { class: "tc-tooltip-swatch" }), require_vnode.h("span", { class: "tc-tooltip-name" }, item.name), require_vnode.h("span", { class: "tc-tooltip-value" }, item.text))),
|
|
702
807
|
options.footer && require_vnode.h("div", { class: "tc-tooltip-footer" }, options.footer(hit))
|
|
703
808
|
];
|
|
@@ -800,7 +905,7 @@ function tooltip() {
|
|
|
800
905
|
tip.classList.toggle("tc-tooltip-light", options?.theme === "light");
|
|
801
906
|
const { rtl } = chart;
|
|
802
907
|
tip.dir = rtl ? "rtl" : "";
|
|
803
|
-
require_dom.render(tip, tooltipContent(hit, options));
|
|
908
|
+
require_dom.render(tip, tooltipContent(hit, options, require_features.swatchShape(chart.config)));
|
|
804
909
|
const shown = tip;
|
|
805
910
|
const turn = ++turns;
|
|
806
911
|
waiting.push(() => {
|
|
@@ -816,7 +921,7 @@ function tooltip() {
|
|
|
816
921
|
x: (rect.left - box.left) / k - el.clientLeft,
|
|
817
922
|
y: (rect.top - box.top) / k - el.clientTop
|
|
818
923
|
};
|
|
819
|
-
const ax = hit.axis === "y" || hit.
|
|
924
|
+
const ax = hit.axis === "y" || hit.highlight?.kind === "spoke" ? anchor.x : hit.x;
|
|
820
925
|
const ay = hit.axis === "y" ? hit.y ?? anchor.y : anchor.y;
|
|
821
926
|
const clip = room(el);
|
|
822
927
|
const place = placeTooltip({
|
|
@@ -856,6 +961,15 @@ function tooltip() {
|
|
|
856
961
|
};
|
|
857
962
|
}
|
|
858
963
|
// src/plugins/index.ts
|
|
964
|
+
/**
|
|
965
|
+
* Zoom along the categories of line, area, bar and candlestick charts,
|
|
966
|
+
* behind `zoom: true`. The code comes with `import '@tabler/charts/zoom'`
|
|
967
|
+
* (before the chart is created); without it the plugin does nothing.
|
|
968
|
+
*/
|
|
969
|
+
const zoom = () => ({
|
|
970
|
+
name: "zoom",
|
|
971
|
+
install: (chart) => require_features.features.zoom?.install(chart) ?? {}
|
|
972
|
+
});
|
|
859
973
|
/** The built-in plugins installed by the default `Chart` from `@tabler/charts`. */
|
|
860
974
|
function defaultPlugins() {
|
|
861
975
|
return [
|
|
@@ -865,12 +979,13 @@ function defaultPlugins() {
|
|
|
865
979
|
dataTable(),
|
|
866
980
|
keyboard(),
|
|
867
981
|
sync(),
|
|
868
|
-
download()
|
|
982
|
+
download(),
|
|
983
|
+
zoom()
|
|
869
984
|
];
|
|
870
985
|
}
|
|
871
986
|
// src/core.ts
|
|
872
987
|
/** Version of the `@tabler/charts` package. */
|
|
873
|
-
const VERSION = "0.
|
|
988
|
+
const VERSION = "0.4.0";
|
|
874
989
|
Object.defineProperty(exports, "VERSION", {
|
|
875
990
|
enumerable: true,
|
|
876
991
|
get: function() {
|
|
@@ -925,6 +1040,12 @@ Object.defineProperty(exports, "hoverUnderlay", {
|
|
|
925
1040
|
return hoverUnderlay;
|
|
926
1041
|
}
|
|
927
1042
|
});
|
|
1043
|
+
Object.defineProperty(exports, "hoverValue", {
|
|
1044
|
+
enumerable: true,
|
|
1045
|
+
get: function() {
|
|
1046
|
+
return hoverValue;
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
928
1049
|
Object.defineProperty(exports, "keyboard", {
|
|
929
1050
|
enumerable: true,
|
|
930
1051
|
get: function() {
|
|
@@ -973,5 +1094,11 @@ Object.defineProperty(exports, "tooltipContent", {
|
|
|
973
1094
|
return tooltipContent;
|
|
974
1095
|
}
|
|
975
1096
|
});
|
|
1097
|
+
Object.defineProperty(exports, "zoom", {
|
|
1098
|
+
enumerable: true,
|
|
1099
|
+
get: function() {
|
|
1100
|
+
return zoom;
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
976
1103
|
|
|
977
|
-
//# sourceMappingURL=core-
|
|
1104
|
+
//# sourceMappingURL=core-BZTrsPxc.cjs.map
|