@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
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { o as ChartType } from "./chart-CE9EVbfV.js";
|
|
2
|
+
import { c as NumberFormat } from "./time-DRIDgv2a.js";
|
|
3
|
+
import { n as InsetsInput } from "./layout-CYerDebD.js";
|
|
4
|
+
import { a as ClassValue } from "./vnode-Du2cC8Fm.js";
|
|
5
|
+
import { t as Annotation } from "./annotations-CCDUC1lW.js";
|
|
6
|
+
/** Where a range starts or ends: a number, or a date (a `Date`, a timestamp, an ISO string) on a time axis. */
|
|
7
|
+
type RangeValue = number | string | Date;
|
|
8
|
+
/** One range: a bar from `from` to `to`, in the row of its `name`. */
|
|
9
|
+
interface RangeBarItem {
|
|
10
|
+
/** The row of the range; ranges with the same name share a row. */
|
|
11
|
+
name: string;
|
|
12
|
+
from: RangeValue;
|
|
13
|
+
to: RangeValue;
|
|
14
|
+
/** Stable identity for keyed updates. Defaults to `name`. */
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Custom color; overrides the palette slot via `--tc-series-color`.
|
|
18
|
+
* Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
|
|
19
|
+
*/
|
|
20
|
+
color?: string;
|
|
21
|
+
/** Extra classes on the bar. */
|
|
22
|
+
class?: ClassValue;
|
|
23
|
+
}
|
|
24
|
+
/** Options for the axis the ranges run along (at the bottom). */
|
|
25
|
+
interface RangeAxisOptions {
|
|
26
|
+
/**
|
|
27
|
+
* `'time'` reads `from` and `to` as dates or timestamps and draws
|
|
28
|
+
* calendar-aware ticks. Needs `@tabler/charts/time` (included in
|
|
29
|
+
* `@tabler/charts`). Defaults to `'linear'`: plain numbers.
|
|
30
|
+
*/
|
|
31
|
+
type?: "linear" | "time";
|
|
32
|
+
/** Align time ticks to UTC instead of local time (use it for SSR). */
|
|
33
|
+
utc?: boolean;
|
|
34
|
+
/** Render the axis labels. Defaults to `true`. */
|
|
35
|
+
show?: boolean;
|
|
36
|
+
/** Title of the axis, below its labels. */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Render vertical grid lines. Defaults to `true`. */
|
|
39
|
+
grid?: boolean;
|
|
40
|
+
/** Fixed lower bound; overrides the data. */
|
|
41
|
+
min?: RangeValue;
|
|
42
|
+
/** Fixed upper bound. */
|
|
43
|
+
max?: RangeValue;
|
|
44
|
+
/** Extend the domain to round tick values. Defaults to `true`. */
|
|
45
|
+
nice?: boolean;
|
|
46
|
+
/** Approximate tick count. Defaults to one per ~80px of width. */
|
|
47
|
+
ticks?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Format of the values (ticks, tooltip, table). On a time axis only a
|
|
50
|
+
* function counts: it gets the timestamp in milliseconds.
|
|
51
|
+
*/
|
|
52
|
+
format?: NumberFormat;
|
|
53
|
+
}
|
|
54
|
+
/** Options for the axis of the rows (beside the plot). */
|
|
55
|
+
interface RangeRowAxisOptions {
|
|
56
|
+
/** Render the row names. Defaults to `true`. */
|
|
57
|
+
show?: boolean;
|
|
58
|
+
/** Title of the axis, turned 90° beside the names. */
|
|
59
|
+
title?: string;
|
|
60
|
+
/** Render a horizontal grid line through every row. Defaults to `false`. */
|
|
61
|
+
grid?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A reference line or band of a range bar chart: a moment or a value on the
|
|
65
|
+
* range axis (`x: '2026-03-01'`), a period (`x: [from, to]`), a row
|
|
66
|
+
* (`y: 'Design'`) or the rows from one to another (`y: ['Design', 'Testing']`).
|
|
67
|
+
* With a single `x` and a single `y` it is a point in that row.
|
|
68
|
+
*/
|
|
69
|
+
interface RangeBarAnnotation extends Omit<Annotation, "x" | "y"> {
|
|
70
|
+
x?: RangeValue | readonly [RangeValue, RangeValue];
|
|
71
|
+
y?: string | readonly [string, string];
|
|
72
|
+
}
|
|
73
|
+
interface RangeBarOptions {
|
|
74
|
+
/** The ranges, top to bottom in the order their names first come. */
|
|
75
|
+
data: readonly RangeBarItem[];
|
|
76
|
+
/** The axis the ranges run along. */
|
|
77
|
+
x?: RangeAxisOptions;
|
|
78
|
+
/** The axis of the rows. */
|
|
79
|
+
y?: RangeRowAxisOptions;
|
|
80
|
+
/** Corner radius of the bars. Defaults to `4`. */
|
|
81
|
+
radius?: number;
|
|
82
|
+
/** Maximum bar thickness in pixels; leftover row space stays empty. Defaults to `24`. */
|
|
83
|
+
maxBarWidth?: number;
|
|
84
|
+
/** Share of each row left empty between bars, `0…1`. Defaults to `0.3`. */
|
|
85
|
+
groupPadding?: number;
|
|
86
|
+
/** Reference lines and bands: today, a deadline, a freeze. Needs `@tabler/charts/annotations` on the core. */
|
|
87
|
+
annotations?: readonly RangeBarAnnotation[];
|
|
88
|
+
/** Extra space around the plot area, in pixels. */
|
|
89
|
+
padding?: InsetsInput;
|
|
90
|
+
}
|
|
91
|
+
/** A range that can be drawn: its item, its row and its ends in axis units (lower first). */
|
|
92
|
+
interface Bar {
|
|
93
|
+
item: RangeBarItem;
|
|
94
|
+
key: string;
|
|
95
|
+
row: number;
|
|
96
|
+
from: number;
|
|
97
|
+
to: number;
|
|
98
|
+
}
|
|
99
|
+
/** The chart model: the options, with the ranges that can be drawn and their rows. */
|
|
100
|
+
interface RangeBarModel extends RangeBarOptions {
|
|
101
|
+
timed: boolean;
|
|
102
|
+
rows: readonly string[];
|
|
103
|
+
bars: readonly Bar[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Range bar (timeline) chart: one row per name with a bar from `from` to
|
|
107
|
+
* `to`, along a time axis (a roadmap, a schedule) or a number axis (floating
|
|
108
|
+
* bars: salary bands, temperature ranges). Ranges with the same name share
|
|
109
|
+
* a row.
|
|
110
|
+
*
|
|
111
|
+
* ```ts
|
|
112
|
+
* new Chart('#el', {
|
|
113
|
+
* type: rangeBar,
|
|
114
|
+
* data: [
|
|
115
|
+
* { name: 'Research', from: '2026-01-05', to: '2026-02-10' },
|
|
116
|
+
* { name: 'Design', from: '2026-02-01', to: '2026-03-15' },
|
|
117
|
+
* ],
|
|
118
|
+
* x: { type: 'time' },
|
|
119
|
+
* })
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
declare const rangeBar: ChartType<RangeBarOptions, RangeBarModel>;
|
|
123
|
+
export { RangeRowAxisOptions as a, RangeBarOptions as i, RangeBarAnnotation as n, RangeValue as o, RangeBarItem as r, rangeBar as s, RangeAxisOptions as t };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { o as ChartType } from "./chart-Dz4geQZy.cjs";
|
|
2
|
+
import { c as NumberFormat } from "./time-B4oxWHQI.cjs";
|
|
3
|
+
import { n as InsetsInput } from "./layout-CYerDebD.cjs";
|
|
4
|
+
import { a as ClassValue } from "./vnode-Du2cC8Fm.cjs";
|
|
5
|
+
import { t as Annotation } from "./annotations-CqZM1z9R.cjs";
|
|
6
|
+
/** Where a range starts or ends: a number, or a date (a `Date`, a timestamp, an ISO string) on a time axis. */
|
|
7
|
+
type RangeValue = number | string | Date;
|
|
8
|
+
/** One range: a bar from `from` to `to`, in the row of its `name`. */
|
|
9
|
+
interface RangeBarItem {
|
|
10
|
+
/** The row of the range; ranges with the same name share a row. */
|
|
11
|
+
name: string;
|
|
12
|
+
from: RangeValue;
|
|
13
|
+
to: RangeValue;
|
|
14
|
+
/** Stable identity for keyed updates. Defaults to `name`. */
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Custom color; overrides the palette slot via `--tc-series-color`.
|
|
18
|
+
* Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
|
|
19
|
+
*/
|
|
20
|
+
color?: string;
|
|
21
|
+
/** Extra classes on the bar. */
|
|
22
|
+
class?: ClassValue;
|
|
23
|
+
}
|
|
24
|
+
/** Options for the axis the ranges run along (at the bottom). */
|
|
25
|
+
interface RangeAxisOptions {
|
|
26
|
+
/**
|
|
27
|
+
* `'time'` reads `from` and `to` as dates or timestamps and draws
|
|
28
|
+
* calendar-aware ticks. Needs `@tabler/charts/time` (included in
|
|
29
|
+
* `@tabler/charts`). Defaults to `'linear'`: plain numbers.
|
|
30
|
+
*/
|
|
31
|
+
type?: "linear" | "time";
|
|
32
|
+
/** Align time ticks to UTC instead of local time (use it for SSR). */
|
|
33
|
+
utc?: boolean;
|
|
34
|
+
/** Render the axis labels. Defaults to `true`. */
|
|
35
|
+
show?: boolean;
|
|
36
|
+
/** Title of the axis, below its labels. */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Render vertical grid lines. Defaults to `true`. */
|
|
39
|
+
grid?: boolean;
|
|
40
|
+
/** Fixed lower bound; overrides the data. */
|
|
41
|
+
min?: RangeValue;
|
|
42
|
+
/** Fixed upper bound. */
|
|
43
|
+
max?: RangeValue;
|
|
44
|
+
/** Extend the domain to round tick values. Defaults to `true`. */
|
|
45
|
+
nice?: boolean;
|
|
46
|
+
/** Approximate tick count. Defaults to one per ~80px of width. */
|
|
47
|
+
ticks?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Format of the values (ticks, tooltip, table). On a time axis only a
|
|
50
|
+
* function counts: it gets the timestamp in milliseconds.
|
|
51
|
+
*/
|
|
52
|
+
format?: NumberFormat;
|
|
53
|
+
}
|
|
54
|
+
/** Options for the axis of the rows (beside the plot). */
|
|
55
|
+
interface RangeRowAxisOptions {
|
|
56
|
+
/** Render the row names. Defaults to `true`. */
|
|
57
|
+
show?: boolean;
|
|
58
|
+
/** Title of the axis, turned 90° beside the names. */
|
|
59
|
+
title?: string;
|
|
60
|
+
/** Render a horizontal grid line through every row. Defaults to `false`. */
|
|
61
|
+
grid?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A reference line or band of a range bar chart: a moment or a value on the
|
|
65
|
+
* range axis (`x: '2026-03-01'`), a period (`x: [from, to]`), a row
|
|
66
|
+
* (`y: 'Design'`) or the rows from one to another (`y: ['Design', 'Testing']`).
|
|
67
|
+
* With a single `x` and a single `y` it is a point in that row.
|
|
68
|
+
*/
|
|
69
|
+
interface RangeBarAnnotation extends Omit<Annotation, "x" | "y"> {
|
|
70
|
+
x?: RangeValue | readonly [RangeValue, RangeValue];
|
|
71
|
+
y?: string | readonly [string, string];
|
|
72
|
+
}
|
|
73
|
+
interface RangeBarOptions {
|
|
74
|
+
/** The ranges, top to bottom in the order their names first come. */
|
|
75
|
+
data: readonly RangeBarItem[];
|
|
76
|
+
/** The axis the ranges run along. */
|
|
77
|
+
x?: RangeAxisOptions;
|
|
78
|
+
/** The axis of the rows. */
|
|
79
|
+
y?: RangeRowAxisOptions;
|
|
80
|
+
/** Corner radius of the bars. Defaults to `4`. */
|
|
81
|
+
radius?: number;
|
|
82
|
+
/** Maximum bar thickness in pixels; leftover row space stays empty. Defaults to `24`. */
|
|
83
|
+
maxBarWidth?: number;
|
|
84
|
+
/** Share of each row left empty between bars, `0…1`. Defaults to `0.3`. */
|
|
85
|
+
groupPadding?: number;
|
|
86
|
+
/** Reference lines and bands: today, a deadline, a freeze. Needs `@tabler/charts/annotations` on the core. */
|
|
87
|
+
annotations?: readonly RangeBarAnnotation[];
|
|
88
|
+
/** Extra space around the plot area, in pixels. */
|
|
89
|
+
padding?: InsetsInput;
|
|
90
|
+
}
|
|
91
|
+
/** A range that can be drawn: its item, its row and its ends in axis units (lower first). */
|
|
92
|
+
interface Bar {
|
|
93
|
+
item: RangeBarItem;
|
|
94
|
+
key: string;
|
|
95
|
+
row: number;
|
|
96
|
+
from: number;
|
|
97
|
+
to: number;
|
|
98
|
+
}
|
|
99
|
+
/** The chart model: the options, with the ranges that can be drawn and their rows. */
|
|
100
|
+
interface RangeBarModel extends RangeBarOptions {
|
|
101
|
+
timed: boolean;
|
|
102
|
+
rows: readonly string[];
|
|
103
|
+
bars: readonly Bar[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Range bar (timeline) chart: one row per name with a bar from `from` to
|
|
107
|
+
* `to`, along a time axis (a roadmap, a schedule) or a number axis (floating
|
|
108
|
+
* bars: salary bands, temperature ranges). Ranges with the same name share
|
|
109
|
+
* a row.
|
|
110
|
+
*
|
|
111
|
+
* ```ts
|
|
112
|
+
* new Chart('#el', {
|
|
113
|
+
* type: rangeBar,
|
|
114
|
+
* data: [
|
|
115
|
+
* { name: 'Research', from: '2026-01-05', to: '2026-02-10' },
|
|
116
|
+
* { name: 'Design', from: '2026-02-01', to: '2026-03-15' },
|
|
117
|
+
* ],
|
|
118
|
+
* x: { type: 'time' },
|
|
119
|
+
* })
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
declare const rangeBar: ChartType<RangeBarOptions, RangeBarModel>;
|
|
123
|
+
export { RangeRowAxisOptions as a, RangeBarOptions as i, RangeBarAnnotation as n, RangeValue as o, RangeBarItem as r, rangeBar as s, RangeAxisOptions as t };
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { a as bandTicks, i as axisTitleSize, n as axisSize, o as linearTicks, s as thinTicks } from "./axis-C5obgdJt.js";
|
|
2
|
+
import { n as feature } from "./features-B55rwpQC.js";
|
|
3
|
+
import { n as formatDetail } from "./format-it1kepFG.js";
|
|
4
|
+
import { n as estimateTextWidth, o as plotFrame } from "./layout-DqAte3H8.js";
|
|
5
|
+
import { T as band, i as finishLayout, r as domainOf, v as tickCount, w as linear, y as toMs } from "./cartesian-COglz544.js";
|
|
6
|
+
import { t as extent } from "./extent-DOV8rs-6.js";
|
|
7
|
+
import { t as rectPath } from "./rect-CZTNvMlf.js";
|
|
8
|
+
import { t as h } from "./vnode-_EMUqysL.js";
|
|
9
|
+
import { a as isRecord, c as named, i as finite, o as label, s as list, t as cleanData, u as records } from "./clean-CkoQobGv.js";
|
|
10
|
+
// src/charts/range-bar.ts
|
|
11
|
+
/** The shortest bar drawn, in pixels: a range with no length (a milestone) still shows. */
|
|
12
|
+
const MIN_LENGTH = 2;
|
|
13
|
+
/** Pixels around the plot area that still count as hovering it. */
|
|
14
|
+
const HOVER_SLOP = 8;
|
|
15
|
+
const DAY = 864e5;
|
|
16
|
+
/** A value in axis units (milliseconds on a time axis), or `null` when it has no place there. */
|
|
17
|
+
const position = (value, timed) => {
|
|
18
|
+
if (!timed) return finite(value);
|
|
19
|
+
const ms = toMs(value);
|
|
20
|
+
return Number.isFinite(ms) ? ms : null;
|
|
21
|
+
};
|
|
22
|
+
function prepare(options) {
|
|
23
|
+
const timed = options.x?.type === "time";
|
|
24
|
+
const rows = [];
|
|
25
|
+
const index = /* @__PURE__ */ new Map();
|
|
26
|
+
const seen = /* @__PURE__ */ new Map();
|
|
27
|
+
const bars = [];
|
|
28
|
+
for (const item of options.data) {
|
|
29
|
+
const a = position(item.from, timed);
|
|
30
|
+
const b = position(item.to, timed);
|
|
31
|
+
if (a === null || b === null) continue;
|
|
32
|
+
let row = index.get(item.name);
|
|
33
|
+
if (row === void 0) {
|
|
34
|
+
row = rows.length;
|
|
35
|
+
index.set(item.name, row);
|
|
36
|
+
rows.push(item.name);
|
|
37
|
+
}
|
|
38
|
+
const base = item.id ?? item.name;
|
|
39
|
+
const nth = seen.get(base) ?? 0;
|
|
40
|
+
seen.set(base, nth + 1);
|
|
41
|
+
bars.push({
|
|
42
|
+
item,
|
|
43
|
+
key: nth ? `${base}/${nth}` : base,
|
|
44
|
+
row,
|
|
45
|
+
from: Math.min(a, b),
|
|
46
|
+
to: Math.max(a, b)
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
...options,
|
|
51
|
+
timed,
|
|
52
|
+
rows,
|
|
53
|
+
bars
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** How the ends of the ranges read in tooltips and the table. */
|
|
57
|
+
function valueFormat(model, locale) {
|
|
58
|
+
const { format, utc } = model.x ?? {};
|
|
59
|
+
if (!model.timed) return formatDetail(format, locale);
|
|
60
|
+
if (typeof format === "function") return format;
|
|
61
|
+
const [lo, hi] = extent(model.bars.flatMap((bar) => [bar.from, bar.to])) ?? [0, 0];
|
|
62
|
+
const date = feature("dates")([lo, hi], utc, locale);
|
|
63
|
+
return (value) => date(value);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The annotations as the cartesian layers read them: there `y` is a value
|
|
67
|
+
* on the value axis and `x` a category, here `x` runs along the ranges and
|
|
68
|
+
* `y` names rows.
|
|
69
|
+
*/
|
|
70
|
+
function annotationsOf(model) {
|
|
71
|
+
const at = (v) => position(v, model.timed);
|
|
72
|
+
return list(model.annotations).filter(isRecord).flatMap((a) => {
|
|
73
|
+
const { x, y, ...rest } = a;
|
|
74
|
+
const out = { ...rest };
|
|
75
|
+
if (x !== void 0) {
|
|
76
|
+
const ends = Array.isArray(x) ? x.map(at) : at(x);
|
|
77
|
+
if (ends === null || Array.isArray(ends) && (ends.length !== 2 || ends.includes(null))) return [];
|
|
78
|
+
out.y = ends;
|
|
79
|
+
}
|
|
80
|
+
if (y !== void 0) out.x = typeof y === "string" && (x === void 0 || Array.isArray(x)) ? [y, y] : y;
|
|
81
|
+
return [out];
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** The range axis before the plot is placed: its domain and the ticks of a scale over it. */
|
|
85
|
+
function rangeAxis(model, ctx, extra) {
|
|
86
|
+
const options = model.x ?? {};
|
|
87
|
+
const count = tickCount(options, Math.max(2, Math.round(ctx.width / 80)));
|
|
88
|
+
const values = [...model.bars.flatMap((bar) => [bar.from, bar.to]), ...extra];
|
|
89
|
+
const min = position(options.min, model.timed);
|
|
90
|
+
const max = position(options.max, model.timed);
|
|
91
|
+
if (!model.timed) {
|
|
92
|
+
const { format } = options;
|
|
93
|
+
const bounds = {
|
|
94
|
+
...min === null ? {} : { min },
|
|
95
|
+
...max === null ? {} : { max }
|
|
96
|
+
};
|
|
97
|
+
const domain = domainOf(values, {
|
|
98
|
+
...bounds,
|
|
99
|
+
nice: options.nice !== false
|
|
100
|
+
}, false, count);
|
|
101
|
+
return {
|
|
102
|
+
domain,
|
|
103
|
+
ticks: (range) => linearTicks(linear(domain, range), {
|
|
104
|
+
count,
|
|
105
|
+
format,
|
|
106
|
+
locale: ctx.locale
|
|
107
|
+
})
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
const time = feature("time").scale;
|
|
111
|
+
const utc = options.utc === true;
|
|
112
|
+
let [lo, hi] = extent(values) ?? [0, DAY];
|
|
113
|
+
if (lo === hi) {
|
|
114
|
+
lo -= DAY / 2;
|
|
115
|
+
hi += DAY / 2;
|
|
116
|
+
}
|
|
117
|
+
if (min !== null) lo = min;
|
|
118
|
+
if (max !== null) hi = max;
|
|
119
|
+
if (options.nice !== false) for (let pass = 0; pass < 2; pass++) {
|
|
120
|
+
const [nlo, nhi] = time([lo, hi], [0, 1], { utc }).nice(count).domain;
|
|
121
|
+
if (min === null) lo = nlo;
|
|
122
|
+
if (max === null) hi = nhi;
|
|
123
|
+
}
|
|
124
|
+
const domain = [lo, hi];
|
|
125
|
+
const { format } = options;
|
|
126
|
+
return {
|
|
127
|
+
domain,
|
|
128
|
+
ticks(range) {
|
|
129
|
+
const scale = time(domain, range, { utc });
|
|
130
|
+
const text = typeof format === "function" ? (date) => format(date.getTime()) : scale.tickFormat(count, ctx.locale);
|
|
131
|
+
return scale.ticks(count).map((date) => ({
|
|
132
|
+
value: date.getTime(),
|
|
133
|
+
position: scale(date),
|
|
134
|
+
label: text(date)
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function renderRangeBar(model, ctx) {
|
|
140
|
+
const { radius = 4, maxBarWidth = 24, groupPadding = .3, rows, bars } = model;
|
|
141
|
+
const { fontSize } = ctx;
|
|
142
|
+
const xOptions = model.x ?? {};
|
|
143
|
+
const yOptions = model.y ?? {};
|
|
144
|
+
const annotations = annotationsOf(model);
|
|
145
|
+
const axis = rangeAxis(model, ctx, annotations.flatMap((a) => a.y === void 0 ? [] : a.y));
|
|
146
|
+
const showValues = xOptions.show !== false;
|
|
147
|
+
const showRows = yOptions.show !== false && rows.length > 0;
|
|
148
|
+
const probe = axis.ticks([0, 1]);
|
|
149
|
+
const names = rows.map((name) => ({
|
|
150
|
+
value: name,
|
|
151
|
+
position: 0,
|
|
152
|
+
label: name
|
|
153
|
+
}));
|
|
154
|
+
const edgeLabel = (tick) => showValues && tick ? Math.ceil(estimateTextWidth(tick.label, fontSize) / 2) : 0;
|
|
155
|
+
const { area, side, range } = plotFrame(ctx, model.padding, (pad) => ({
|
|
156
|
+
top: pad.top + 4,
|
|
157
|
+
bottom: pad.bottom + Math.max((showValues ? axisSize("bottom", probe, fontSize) : 0) + axisTitleSize(xOptions.title, fontSize), 4),
|
|
158
|
+
start: pad.start + Math.max((showRows ? axisSize("left", names, fontSize) : 0) + axisTitleSize(yOptions.title, fontSize), edgeLabel(probe[0]), 8),
|
|
159
|
+
end: pad.end + Math.max(edgeLabel(probe[probe.length - 1]), 8)
|
|
160
|
+
}));
|
|
161
|
+
const across = band(rows, [area.y, area.y + area.height], {
|
|
162
|
+
paddingInner: groupPadding,
|
|
163
|
+
paddingOuter: groupPadding / 2
|
|
164
|
+
});
|
|
165
|
+
const along = linear(axis.domain, range());
|
|
166
|
+
const valueTicks = thinTicks(axis.ticks(along.range), "bottom", fontSize);
|
|
167
|
+
const rowTicks = showRows ? thinTicks(bandTicks(across), "left", fontSize) : [];
|
|
168
|
+
const cartesian = {
|
|
169
|
+
data: { series: [] },
|
|
170
|
+
x: {
|
|
171
|
+
show: yOptions.show !== false,
|
|
172
|
+
grid: yOptions.grid === true,
|
|
173
|
+
title: yOptions.title
|
|
174
|
+
},
|
|
175
|
+
y: {
|
|
176
|
+
show: showValues,
|
|
177
|
+
grid: xOptions.grid !== false,
|
|
178
|
+
title: xOptions.title
|
|
179
|
+
},
|
|
180
|
+
annotations
|
|
181
|
+
};
|
|
182
|
+
const layout = finishLayout(cartesian, ctx, side, 0, {
|
|
183
|
+
area,
|
|
184
|
+
labels: rows,
|
|
185
|
+
x: across,
|
|
186
|
+
y: along,
|
|
187
|
+
horizontal: true,
|
|
188
|
+
xTicks: rowTicks,
|
|
189
|
+
yTicks: valueTicks
|
|
190
|
+
}, rows);
|
|
191
|
+
const thickness = Math.max(1, Math.min(maxBarWidth, across.bandwidth));
|
|
192
|
+
const top = (bar) => across.at(bar.row) + (across.bandwidth - thickness) / 2;
|
|
193
|
+
/** The bar's ends in pixels, left first. */
|
|
194
|
+
const ends = (bar) => {
|
|
195
|
+
const a = along(bar.from);
|
|
196
|
+
const b = along(bar.to);
|
|
197
|
+
const lo = Math.min(a, b);
|
|
198
|
+
const hi = Math.max(a, b);
|
|
199
|
+
if (hi - lo >= MIN_LENGTH) return [lo, hi];
|
|
200
|
+
const mid = (lo + hi) / 2;
|
|
201
|
+
return [mid - MIN_LENGTH / 2, mid + MIN_LENGTH / 2];
|
|
202
|
+
};
|
|
203
|
+
const text = valueFormat(model, ctx.locale);
|
|
204
|
+
const hitFor = (i) => {
|
|
205
|
+
const bar = bars[i];
|
|
206
|
+
const [lo, hi] = ends(bar);
|
|
207
|
+
const y = top(bar);
|
|
208
|
+
const item = {
|
|
209
|
+
name: bar.item.name,
|
|
210
|
+
seriesIndex: 0,
|
|
211
|
+
value: bar.to - bar.from,
|
|
212
|
+
text: `${text(bar.from)} – ${text(bar.to)}`,
|
|
213
|
+
x: ctx.rtl ? lo : hi,
|
|
214
|
+
y: y + thickness / 2,
|
|
215
|
+
box: {
|
|
216
|
+
x: lo,
|
|
217
|
+
y,
|
|
218
|
+
width: hi - lo,
|
|
219
|
+
height: thickness
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
if (bar.item.color) item.color = bar.item.color;
|
|
223
|
+
return {
|
|
224
|
+
index: i,
|
|
225
|
+
label: bar.item.name,
|
|
226
|
+
title: "",
|
|
227
|
+
x: (lo + hi) / 2,
|
|
228
|
+
y: across.at(bar.row) + across.bandwidth / 2,
|
|
229
|
+
axis: "y",
|
|
230
|
+
area,
|
|
231
|
+
items: [item],
|
|
232
|
+
highlight: {
|
|
233
|
+
kind: "band",
|
|
234
|
+
x: area.x,
|
|
235
|
+
y: across.at(bar.row),
|
|
236
|
+
width: area.width,
|
|
237
|
+
height: across.bandwidth
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
const interaction = {
|
|
242
|
+
count: bars.length,
|
|
243
|
+
hitIndex: (i) => i >= 0 && i < bars.length ? hitFor(i) : null,
|
|
244
|
+
hitTest(px, py) {
|
|
245
|
+
if (px < area.x - HOVER_SLOP || px > area.x + area.width + HOVER_SLOP || py < area.y - HOVER_SLOP || py > area.y + area.height + HOVER_SLOP) return null;
|
|
246
|
+
const row = across.indexAt(py);
|
|
247
|
+
let found = -1;
|
|
248
|
+
let nearest = Number.POSITIVE_INFINITY;
|
|
249
|
+
bars.forEach((bar, i) => {
|
|
250
|
+
if (bar.row !== row) return;
|
|
251
|
+
const [lo, hi] = ends(bar);
|
|
252
|
+
const distance = Math.max(lo - px, px - hi, 0);
|
|
253
|
+
if (distance <= nearest) {
|
|
254
|
+
nearest = distance;
|
|
255
|
+
found = i;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
if (found < 0) return null;
|
|
259
|
+
const hit = hitFor(found);
|
|
260
|
+
if (nearest === 0) hit.seriesIndex = 0;
|
|
261
|
+
return hit;
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const marks = bars.map((bar) => {
|
|
265
|
+
const [lo, hi] = ends(bar);
|
|
266
|
+
return h("path", {
|
|
267
|
+
key: bar.key,
|
|
268
|
+
class: [
|
|
269
|
+
"tc-bar",
|
|
270
|
+
"tc-bar-horizontal",
|
|
271
|
+
"tc-range-bar",
|
|
272
|
+
bar.item.class
|
|
273
|
+
],
|
|
274
|
+
"data-series": bar.item.name,
|
|
275
|
+
d: rectPath(lo, top(bar), hi - lo, thickness, Math.max(0, radius)),
|
|
276
|
+
style: { "--tc-series-color": bar.item.color }
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
return {
|
|
280
|
+
content: [
|
|
281
|
+
h("defs", { key: "defs" }, layout.clip.def),
|
|
282
|
+
layout.background,
|
|
283
|
+
h("g", {
|
|
284
|
+
key: "series",
|
|
285
|
+
class: "tc-series-list tc-range-bars",
|
|
286
|
+
"clip-path": layout.clip.url
|
|
287
|
+
}, h("g", { class: "tc-series tc-series-1" }, marks)),
|
|
288
|
+
layout.foreground
|
|
289
|
+
],
|
|
290
|
+
interaction
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function rangeBarTable(model, ctx, limit) {
|
|
294
|
+
const text = valueFormat(model, ctx.locale);
|
|
295
|
+
const { bars } = model;
|
|
296
|
+
const shown = bars.length > limit ? bars.slice(0, limit) : bars;
|
|
297
|
+
return {
|
|
298
|
+
columns: [
|
|
299
|
+
"",
|
|
300
|
+
"From",
|
|
301
|
+
"To"
|
|
302
|
+
],
|
|
303
|
+
total: bars.length,
|
|
304
|
+
rows: shown.map((bar) => [
|
|
305
|
+
bar.item.name,
|
|
306
|
+
text(bar.from),
|
|
307
|
+
text(bar.to)
|
|
308
|
+
])
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
/** Ranges with text for names; ends that are no number or date are left for `prepare` to drop. */
|
|
312
|
+
const cleanRanges = (data) => records(data, (r) => ({
|
|
313
|
+
...named(r),
|
|
314
|
+
from: label(r.from),
|
|
315
|
+
to: label(r.to)
|
|
316
|
+
}));
|
|
317
|
+
/**
|
|
318
|
+
* Range bar (timeline) chart: one row per name with a bar from `from` to
|
|
319
|
+
* `to`, along a time axis (a roadmap, a schedule) or a number axis (floating
|
|
320
|
+
* bars: salary bands, temperature ranges). Ranges with the same name share
|
|
321
|
+
* a row.
|
|
322
|
+
*
|
|
323
|
+
* ```ts
|
|
324
|
+
* new Chart('#el', {
|
|
325
|
+
* type: rangeBar,
|
|
326
|
+
* data: [
|
|
327
|
+
* { name: 'Research', from: '2026-01-05', to: '2026-02-10' },
|
|
328
|
+
* { name: 'Design', from: '2026-02-01', to: '2026-03-15' },
|
|
329
|
+
* ],
|
|
330
|
+
* x: { type: 'time' },
|
|
331
|
+
* })
|
|
332
|
+
* ```
|
|
333
|
+
*/
|
|
334
|
+
const rangeBar = {
|
|
335
|
+
name: "range-bar",
|
|
336
|
+
clean: cleanData(cleanRanges),
|
|
337
|
+
prepare,
|
|
338
|
+
render: renderRangeBar,
|
|
339
|
+
table: rangeBarTable
|
|
340
|
+
};
|
|
341
|
+
export { rangeBar as t };
|
|
342
|
+
|
|
343
|
+
//# sourceMappingURL=range-bar-Dx6ce0J1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-bar-Dx6ce0J1.js","names":[],"sources":["../src/charts/range-bar.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext, RenderResult, TableContext } from '../chart.ts'\nimport {\n axisSize,\n axisTitleSize,\n bandTicks,\n linearTicks,\n type Tick,\n thinTicks,\n} from '../components/axis.ts'\nimport { feature } from '../features.ts'\nimport { formatDetail, type Locale, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { estimateTextWidth, type InsetsInput, plotFrame } from '../layout.ts'\nimport { band } from '../scales/band.ts'\nimport { extent } from '../scales/extent.ts'\nimport { linear } from '../scales/linear.ts'\nimport { rectPath } from '../shapes/rect.ts'\nimport { type ClassValue, h } from '../vnode.ts'\nimport type { Annotation } from './annotations.ts'\nimport {\n type CartesianOptions,\n domainOf,\n EDGE,\n finishLayout,\n TICK_SPACING_X,\n tickCount,\n toMs,\n} from './cartesian.ts'\nimport { cleanData, finite, isRecord, label, list, named, records } from './clean.ts'\n\n/** Where a range starts or ends: a number, or a date (a `Date`, a timestamp, an ISO string) on a time axis. */\nexport type RangeValue = number | string | Date\n\n/** One range: a bar from `from` to `to`, in the row of its `name`. */\nexport interface RangeBarItem {\n /** The row of the range; ranges with the same name share a row. */\n name: string\n from: RangeValue\n to: RangeValue\n /** Stable identity for keyed updates. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the bar. */\n class?: ClassValue\n}\n\n/** Options for the axis the ranges run along (at the bottom). */\nexport interface RangeAxisOptions {\n /**\n * `'time'` reads `from` and `to` as dates or timestamps and draws\n * calendar-aware ticks. Needs `@tabler/charts/time` (included in\n * `@tabler/charts`). Defaults to `'linear'`: plain numbers.\n */\n type?: 'linear' | 'time'\n /** Align time ticks to UTC instead of local time (use it for SSR). */\n utc?: boolean\n /** Render the axis labels. Defaults to `true`. */\n show?: boolean\n /** Title of the axis, below its labels. */\n title?: string\n /** Render vertical grid lines. Defaults to `true`. */\n grid?: boolean\n /** Fixed lower bound; overrides the data. */\n min?: RangeValue\n /** Fixed upper bound. */\n max?: RangeValue\n /** Extend the domain to round tick values. Defaults to `true`. */\n nice?: boolean\n /** Approximate tick count. Defaults to one per ~80px of width. */\n ticks?: number\n /**\n * Format of the values (ticks, tooltip, table). On a time axis only a\n * function counts: it gets the timestamp in milliseconds.\n */\n format?: NumberFormat\n}\n\n/** Options for the axis of the rows (beside the plot). */\nexport interface RangeRowAxisOptions {\n /** Render the row names. Defaults to `true`. */\n show?: boolean\n /** Title of the axis, turned 90° beside the names. */\n title?: string\n /** Render a horizontal grid line through every row. Defaults to `false`. */\n grid?: boolean\n}\n\n/**\n * A reference line or band of a range bar chart: a moment or a value on the\n * range axis (`x: '2026-03-01'`), a period (`x: [from, to]`), a row\n * (`y: 'Design'`) or the rows from one to another (`y: ['Design', 'Testing']`).\n * With a single `x` and a single `y` it is a point in that row.\n */\nexport interface RangeBarAnnotation extends Omit<Annotation, 'x' | 'y'> {\n x?: RangeValue | readonly [RangeValue, RangeValue]\n y?: string | readonly [string, string]\n}\n\nexport interface RangeBarOptions {\n /** The ranges, top to bottom in the order their names first come. */\n data: readonly RangeBarItem[]\n /** The axis the ranges run along. */\n x?: RangeAxisOptions\n /** The axis of the rows. */\n y?: RangeRowAxisOptions\n /** Corner radius of the bars. Defaults to `4`. */\n radius?: number\n /** Maximum bar thickness in pixels; leftover row space stays empty. Defaults to `24`. */\n maxBarWidth?: number\n /** Share of each row left empty between bars, `0…1`. Defaults to `0.3`. */\n groupPadding?: number\n /** Reference lines and bands: today, a deadline, a freeze. Needs `@tabler/charts/annotations` on the core. */\n annotations?: readonly RangeBarAnnotation[]\n /** Extra space around the plot area, in pixels. */\n padding?: InsetsInput\n}\n\n/** A range that can be drawn: its item, its row and its ends in axis units (lower first). */\ninterface Bar {\n item: RangeBarItem\n key: string\n row: number\n from: number\n to: number\n}\n\n/** The chart model: the options, with the ranges that can be drawn and their rows. */\ninterface RangeBarModel extends RangeBarOptions {\n timed: boolean\n rows: readonly string[]\n bars: readonly Bar[]\n}\n\n/** The shortest bar drawn, in pixels: a range with no length (a milestone) still shows. */\nconst MIN_LENGTH = 2\n\n/** Pixels around the plot area that still count as hovering it. */\nconst HOVER_SLOP = 8\n\nconst DAY = 24 * 60 * 60 * 1000\n\n/** A value in axis units (milliseconds on a time axis), or `null` when it has no place there. */\nconst position = (value: unknown, timed: boolean): number | null => {\n if (!timed) return finite(value)\n const ms = toMs(value as RangeValue)\n return Number.isFinite(ms) ? ms : null\n}\n\nfunction prepare(options: RangeBarOptions): RangeBarModel {\n const timed = options.x?.type === 'time'\n const rows: string[] = []\n const index = new Map<string, number>()\n const seen = new Map<string, number>()\n const bars: Bar[] = []\n for (const item of options.data) {\n const a = position(item.from, timed)\n const b = position(item.to, timed)\n if (a === null || b === null) continue\n let row = index.get(item.name)\n if (row === undefined) {\n row = rows.length\n index.set(item.name, row)\n rows.push(item.name)\n }\n // Ranges that share a name (and have no id) still need keys of their own.\n const base = item.id ?? item.name\n const nth = seen.get(base) ?? 0\n seen.set(base, nth + 1)\n bars.push({\n item,\n key: nth ? `${base}/${nth}` : base,\n row,\n from: Math.min(a, b),\n to: Math.max(a, b),\n })\n }\n return { ...options, timed, rows, bars }\n}\n\n/** How the ends of the ranges read in tooltips and the table. */\nfunction valueFormat(model: RangeBarModel, locale: Locale): (value: number) => string {\n const { format, utc } = model.x ?? {}\n if (!model.timed) return formatDetail(format, locale)\n if (typeof format === 'function') return format\n const [lo, hi] = extent(model.bars.flatMap((bar) => [bar.from, bar.to])) ?? [0, 0]\n const date = feature('dates')([lo, hi], utc, locale)\n return (value) => date(value)\n}\n\n/**\n * The annotations as the cartesian layers read them: there `y` is a value\n * on the value axis and `x` a category, here `x` runs along the ranges and\n * `y` names rows.\n */\nfunction annotationsOf(model: RangeBarModel): Annotation[] {\n const at = (v: unknown) => position(v, model.timed)\n return list(model.annotations)\n .filter(isRecord)\n .flatMap((a) => {\n const { x, y, ...rest } = a as RangeBarAnnotation\n const out: Annotation = { ...rest }\n if (x !== undefined) {\n const ends = Array.isArray(x) ? x.map(at) : at(x)\n if (ends === null || (Array.isArray(ends) && (ends.length !== 2 || ends.includes(null)))) {\n return []\n }\n out.y = ends as number | [number, number]\n }\n // A row is marked as a whole (a band), unless a single `x` makes it a point.\n if (y !== undefined) {\n out.x = typeof y === 'string' && (x === undefined || Array.isArray(x)) ? [y, y] : y\n }\n return [out]\n })\n}\n\n/** The range axis before the plot is placed: its domain and the ticks of a scale over it. */\nfunction rangeAxis(\n model: RangeBarModel,\n ctx: RenderContext,\n extra: readonly number[],\n): { domain: [number, number]; ticks(range: readonly [number, number]): Tick[] } {\n const options = model.x ?? {}\n const count = tickCount(options, Math.max(2, Math.round(ctx.width / TICK_SPACING_X)))\n const values = [...model.bars.flatMap((bar) => [bar.from, bar.to]), ...extra]\n const min = position(options.min, model.timed)\n const max = position(options.max, model.timed)\n if (!model.timed) {\n const { format } = options\n const bounds = { ...(min === null ? {} : { min }), ...(max === null ? {} : { max }) }\n const domain = domainOf(values, { ...bounds, nice: options.nice !== false }, false, count)\n return {\n domain,\n ticks: (range) => linearTicks(linear(domain, range), { count, format, locale: ctx.locale }),\n }\n }\n\n const time = feature('time').scale\n const utc = options.utc === true\n let [lo, hi] = extent(values) ?? [0, DAY]\n // A single moment still needs a visible range: the day around it.\n if (lo === hi) {\n lo -= DAY / 2\n hi += DAY / 2\n }\n if (min !== null) lo = min\n if (max !== null) hi = max\n if (options.nice !== false) {\n // Twice: the wider domain may call for a longer tick interval, whose\n // boundaries are then the ones the axis should end on.\n for (let pass = 0; pass < 2; pass++) {\n const [nlo, nhi] = time([lo, hi], [0, 1], { utc }).nice(count).domain\n if (min === null) lo = nlo\n if (max === null) hi = nhi\n }\n }\n const domain: [number, number] = [lo, hi]\n const { format } = options\n return {\n domain,\n ticks(range) {\n const scale = time(domain, range, { utc })\n const text =\n typeof format === 'function'\n ? (date: Date) => format(date.getTime())\n : scale.tickFormat(count, ctx.locale)\n return scale\n .ticks(count)\n .map((date) => ({ value: date.getTime(), position: scale(date), label: text(date) }))\n },\n }\n}\n\nfunction renderRangeBar(model: RangeBarModel, ctx: RenderContext): RenderResult {\n const { radius = 4, maxBarWidth = 24, groupPadding = 0.3, rows, bars } = model\n const { fontSize } = ctx\n const xOptions = model.x ?? {}\n const yOptions = model.y ?? {}\n const annotations = annotationsOf(model)\n // Annotations on the range axis stay in view, like targets on a value axis.\n const marked = annotations.flatMap((a) => (a.y === undefined ? [] : a.y))\n const axis = rangeAxis(model, ctx, marked)\n const showValues = xOptions.show !== false\n const showRows = yOptions.show !== false && rows.length > 0\n\n const probe = axis.ticks([0, 1])\n const names: Tick[] = rows.map((name) => ({ value: name, position: 0, label: name }))\n const edgeLabel = (tick: Tick | undefined) =>\n showValues && tick ? Math.ceil(estimateTextWidth(tick.label, fontSize) / 2) : 0\n\n const { area, side, range } = plotFrame(ctx, model.padding, (pad) => ({\n top: pad.top + EDGE / 2,\n bottom:\n pad.bottom +\n Math.max(\n (showValues ? axisSize('bottom', probe, fontSize) : 0) +\n axisTitleSize(xOptions.title, fontSize),\n EDGE / 2,\n ),\n start:\n pad.start +\n Math.max(\n (showRows ? axisSize('left', names, fontSize) : 0) +\n axisTitleSize(yOptions.title, fontSize),\n edgeLabel(probe[0]),\n EDGE,\n ),\n end: pad.end + Math.max(edgeLabel(probe[probe.length - 1]), EDGE),\n }))\n\n const across = band(rows, [area.y, area.y + area.height], {\n paddingInner: groupPadding,\n paddingOuter: groupPadding / 2,\n })\n // The ranges run from the start side: from the right in a right-to-left chart.\n const along = linear(axis.domain, range())\n const valueTicks = thinTicks(axis.ticks(along.range), 'bottom', fontSize)\n const rowTicks = showRows ? thinTicks(bandTicks(across), 'left', fontSize) : []\n\n // The shared layers read categories as `x` and values as `y`, whichever way they run.\n const cartesian: CartesianOptions = {\n data: { series: [] },\n x: { show: yOptions.show !== false, grid: yOptions.grid === true, title: yOptions.title },\n y: { show: showValues, grid: xOptions.grid !== false, title: xOptions.title },\n annotations,\n }\n const layout = finishLayout(\n cartesian,\n ctx,\n side,\n 0,\n {\n area,\n labels: rows,\n x: across,\n y: along,\n horizontal: true,\n xTicks: rowTicks,\n yTicks: valueTicks,\n },\n rows,\n )\n\n const thickness = Math.max(1, Math.min(maxBarWidth, across.bandwidth))\n const top = (bar: Bar) => across.at(bar.row) + (across.bandwidth - thickness) / 2\n /** The bar's ends in pixels, left first. */\n const ends = (bar: Bar): [number, number] => {\n const a = along(bar.from)\n const b = along(bar.to)\n const lo = Math.min(a, b)\n const hi = Math.max(a, b)\n if (hi - lo >= MIN_LENGTH) return [lo, hi]\n const mid = (lo + hi) / 2\n return [mid - MIN_LENGTH / 2, mid + MIN_LENGTH / 2]\n }\n\n const text = valueFormat(model, ctx.locale)\n const hitFor = (i: number): Hit => {\n const bar = bars[i] as Bar\n const [lo, hi] = ends(bar)\n const y = top(bar)\n const item: HitItem = {\n name: bar.item.name,\n seriesIndex: 0,\n // The length of the range; value labels write the range itself.\n value: bar.to - bar.from,\n text: `${text(bar.from)} – ${text(bar.to)}`,\n // The end the bar runs to.\n x: ctx.rtl ? lo : hi,\n y: y + thickness / 2,\n box: { x: lo, y, width: hi - lo, height: thickness },\n }\n if (bar.item.color) item.color = bar.item.color\n return {\n index: i,\n label: bar.item.name,\n title: '',\n x: (lo + hi) / 2,\n y: across.at(bar.row) + across.bandwidth / 2,\n axis: 'y',\n area,\n items: [item],\n highlight: {\n kind: 'band',\n x: area.x,\n y: across.at(bar.row),\n width: area.width,\n height: across.bandwidth,\n },\n }\n }\n\n const interaction: Interaction = {\n count: bars.length,\n hitIndex: (i) => (i >= 0 && i < bars.length ? hitFor(i) : null),\n hitTest(px, py) {\n if (\n px < area.x - HOVER_SLOP ||\n px > area.x + area.width + HOVER_SLOP ||\n py < area.y - HOVER_SLOP ||\n py > area.y + area.height + HOVER_SLOP\n ) {\n return null\n }\n // The bar under the pointer in its row (the one drawn last), or the nearest one there.\n const row = across.indexAt(py)\n let found = -1\n let nearest = Number.POSITIVE_INFINITY\n bars.forEach((bar, i) => {\n if (bar.row !== row) return\n const [lo, hi] = ends(bar)\n const distance = Math.max(lo - px, px - hi, 0)\n if (distance <= nearest) {\n nearest = distance\n found = i\n }\n })\n if (found < 0) return null\n const hit = hitFor(found)\n if (nearest === 0) hit.seriesIndex = 0\n return hit\n },\n }\n\n const marks = bars.map((bar) => {\n const [lo, hi] = ends(bar)\n return h('path', {\n key: bar.key,\n class: ['tc-bar', 'tc-bar-horizontal', 'tc-range-bar', bar.item.class],\n 'data-series': bar.item.name,\n // A path, not a rect, so it morphs between updates (d), in Safari too.\n d: rectPath(lo, top(bar), hi - lo, thickness, Math.max(0, radius)),\n // A map, so values from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': bar.item.color },\n })\n })\n\n const content = [\n h('defs', { key: 'defs' }, layout.clip.def),\n layout.background,\n h(\n 'g',\n { key: 'series', class: 'tc-series-list tc-range-bars', 'clip-path': layout.clip.url },\n // One color slot for every range: a bar's own `color` sets it apart.\n h('g', { class: 'tc-series tc-series-1' }, marks),\n ),\n layout.foreground,\n ]\n return { content, interaction }\n}\n\nfunction rangeBarTable(model: RangeBarModel, ctx: TableContext, limit: number): DataTable {\n const text = valueFormat(model, ctx.locale)\n const { bars } = model\n const shown = bars.length > limit ? bars.slice(0, limit) : bars\n return {\n columns: ['', 'From', 'To'],\n total: bars.length,\n rows: shown.map((bar) => [bar.item.name, text(bar.from), text(bar.to)]),\n }\n}\n\n/** Ranges with text for names; ends that are no number or date are left for `prepare` to drop. */\nconst cleanRanges = (data: unknown): unknown =>\n records(data, (r) => ({ ...named(r), from: label(r.from), to: label(r.to) }))\n\n/**\n * Range bar (timeline) chart: one row per name with a bar from `from` to\n * `to`, along a time axis (a roadmap, a schedule) or a number axis (floating\n * bars: salary bands, temperature ranges). Ranges with the same name share\n * a row.\n *\n * ```ts\n * new Chart('#el', {\n * type: rangeBar,\n * data: [\n * { name: 'Research', from: '2026-01-05', to: '2026-02-10' },\n * { name: 'Design', from: '2026-02-01', to: '2026-03-15' },\n * ],\n * x: { type: 'time' },\n * })\n * ```\n */\nexport const rangeBar: ChartType<RangeBarOptions, RangeBarModel> = {\n name: 'range-bar',\n clean: cleanData(cleanRanges),\n prepare,\n render: renderRangeBar,\n table: rangeBarTable,\n}\n"],"mappings":";;;;;;;;;;;AA2IA,MAAM,aAAa;;AAGnB,MAAM,aAAa;AAEnB,MAAM,MAAM;;AAGZ,MAAM,YAAY,OAAgB,UAAkC;CAClE,IAAI,CAAC,OAAO,OAAO,OAAO,KAAK;CAC/B,MAAM,KAAK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AAW;CAC5B;CACA,QAAQ;CACR,OAAO;AACT"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Standalone entry: `import { rangeBar } from '@tabler/charts/range-bar'`. */
|
|
2
|
+
import { a as RangeRowAxisOptions, i as RangeBarOptions, n as RangeBarAnnotation, o as RangeValue, r as RangeBarItem, s as rangeBar, t as RangeAxisOptions } from "./range-bar-D32dIQOY.cjs";
|
|
3
|
+
export { type RangeAxisOptions, type RangeBarAnnotation, type RangeBarItem, type RangeBarOptions, type RangeRowAxisOptions, type RangeValue, rangeBar };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Standalone entry: `import { rangeBar } from '@tabler/charts/range-bar'`. */
|
|
2
|
+
import { a as RangeRowAxisOptions, i as RangeBarOptions, n as RangeBarAnnotation, o as RangeValue, r as RangeBarItem, s as rangeBar, t as RangeAxisOptions } from "./range-bar-C4cRaaQE.js";
|
|
3
|
+
export { type RangeAxisOptions, type RangeBarAnnotation, type RangeBarItem, type RangeBarOptions, type RangeRowAxisOptions, type RangeValue, rangeBar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as rangeBar } from "./range-bar-Dx6ce0J1.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as round } from "./layout-DqAte3H8.js";
|
|
2
2
|
// src/shapes/rect.ts
|
|
3
3
|
/** A rounded rectangle as path data (the hover ring of a cell or a tile). */
|
|
4
4
|
function rectPath(x, y, w, hgt, r) {
|
|
@@ -8,4 +8,4 @@ function rectPath(x, y, w, hgt, r) {
|
|
|
8
8
|
}
|
|
9
9
|
export { rectPath as t };
|
|
10
10
|
|
|
11
|
-
//# sourceMappingURL=rect-
|
|
11
|
+
//# sourceMappingURL=rect-CZTNvMlf.js.map
|