@tabler/charts 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -4
- package/dist/{annotations-D0YQ0IoA.js → annotations-BQ8l-qHs.js} +3 -3
- package/dist/{annotations-D0YQ0IoA.js.map → annotations-BQ8l-qHs.js.map} +1 -1
- package/dist/{annotations-DdRdeBUB.cjs → annotations-CpCWA29b.cjs} +3 -3
- package/dist/{annotations-DdRdeBUB.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
- package/dist/annotations.cjs +2 -2
- package/dist/annotations.js +2 -2
- package/dist/{area-d11XePuw.d.ts → area-DEFQm_SQ.d.ts} +2 -2
- package/dist/{area-4eRs3c0K.cjs → area-DYdQ_sMV.cjs} +3 -3
- package/dist/{area-4eRs3c0K.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
- package/dist/{area-0-L1bG9B.js → area-WdtfqvhX.js} +3 -3
- package/dist/{area-0-L1bG9B.js.map → area-WdtfqvhX.js.map} +1 -1
- package/dist/{area-CJX9219z.d.cts → area-h_FvieFb.d.cts} +2 -2
- 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-MMaVoSWB.js +235 -0
- package/dist/axis-MMaVoSWB.js.map +1 -0
- package/dist/axis-YfAerNBA.cjs +300 -0
- package/dist/axis-YfAerNBA.cjs.map +1 -0
- package/dist/{bar-BNZ3GhIw.js → bar-BOcRcArc.js} +74 -56
- package/dist/bar-BOcRcArc.js.map +1 -0
- package/dist/{bar-Da6dE_nI.cjs → bar-CVkOJ7WA.cjs} +76 -58
- package/dist/bar-CVkOJ7WA.cjs.map +1 -0
- 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-XwzM6Pb0.d.ts → bar-D9B_arKf.d.ts} +1 -1
- package/dist/{bar-BDLR4p9c.d.cts → bar-DZCQ-kyf.d.cts} +2 -2
- 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-BSvO8nRb.d.cts +106 -0
- package/dist/calendar-BXgIX5H1.js +502 -0
- package/dist/calendar-BXgIX5H1.js.map +1 -0
- package/dist/calendar-Bq3vFzPl.d.ts +106 -0
- package/dist/calendar-DAFXjV99.cjs +507 -0
- package/dist/calendar-DAFXjV99.cjs.map +1 -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-D0xKkdqd.d.ts → candlestick-B3WcLzph.d.ts} +1 -1
- package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-BcomxeVG.d.cts} +1 -1
- package/dist/{candlestick-BHQkQfxH.js → candlestick-BtT9glp9.js} +16 -14
- package/dist/{candlestick-BHQkQfxH.js.map → candlestick-BtT9glp9.js.map} +1 -1
- package/dist/{candlestick-CYCQXgky.cjs → candlestick-CSmRuZ4v.cjs} +16 -14
- package/dist/{candlestick-CYCQXgky.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
- 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-CI2x6N7N.js → cartesian-BrPqb5Qn.js} +122 -248
- package/dist/cartesian-BrPqb5Qn.js.map +1 -0
- package/dist/{cartesian-DV02PsBe.cjs → cartesian-DRSXHxWe.cjs} +146 -308
- package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
- package/dist/{chart-DWn9v6qw.js → chart-B6TTY4Kr.js} +94 -62
- package/dist/chart-B6TTY4Kr.js.map +1 -0
- package/dist/{chart-QilhWP8Z.d.ts → chart-CYrrUCi3.d.ts} +193 -56
- package/dist/{chart-kqFMEwDo.d.cts → chart-CbPzP5Dp.d.cts} +193 -56
- package/dist/{chart-e2VqomCI.cjs → chart-D_lyOy-M.cjs} +106 -68
- package/dist/chart-D_lyOy-M.cjs.map +1 -0
- package/dist/{core-PAX5ogLk.d.cts → core-9BnLEW4K.d.cts} +24 -20
- package/dist/{core-DRUCk67j.d.ts → core-C3qEppSm.d.ts} +7 -6
- package/dist/{core-BKRQvPAT.js → core-CQ0FaJ4G.js} +112 -65
- package/dist/core-CQ0FaJ4G.js.map +1 -0
- package/dist/{core-DIOC61up.cjs → core-D2PSked3.cjs} +113 -66
- package/dist/core-D2PSked3.cjs.map +1 -0
- package/dist/core.cjs +41 -31
- package/dist/core.d.cts +20 -17
- package/dist/core.d.ts +20 -17
- package/dist/core.js +27 -23
- package/dist/{dates-C2RzY3rE.js → dates-DLe2Ww64.js} +2 -2
- package/dist/{dates-C2RzY3rE.js.map → dates-DLe2Ww64.js.map} +1 -1
- package/dist/{dates-DurEr9WT.cjs → dates-DerXTb1J.cjs} +2 -2
- package/dist/{dates-DurEr9WT.cjs.map → dates-DerXTb1J.cjs.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/{export-chart-mYgEfK-L.cjs → export-chart-CPtXmZvi.cjs} +17 -12
- package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
- package/dist/{export-chart-83UYH48t.js → export-chart-DoeiAyR2.js} +17 -12
- package/dist/export-chart-DoeiAyR2.js.map +1 -0
- package/dist/export.cjs +2 -2
- package/dist/export.d.cts +1 -1
- package/dist/export.d.ts +1 -1
- package/dist/export.js +2 -2
- 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-BdcfUkb5.d.ts +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-CarOh8w_.d.cts +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-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
- package/dist/gauge-DiTk5aWO.js.map +1 -0
- package/dist/{gauge-BSist7My.d.cts → gauge-Ds9k1UV2.d.cts} +1 -1
- package/dist/{gauge-0VJuAHWF.d.ts → gauge-Zy25jfps.d.ts} +1 -1
- 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/{heatmap-19BGJTKF.js → heatmap-C1v8bwpq.js} +35 -33
- package/dist/heatmap-C1v8bwpq.js.map +1 -0
- package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-CJ-0dfhJ.d.cts} +1 -1
- package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dcc_bsoQ.cjs} +39 -37
- package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
- package/dist/{heatmap-59lmClj9.d.ts → heatmap-Jp5sHRTo.d.ts} +1 -1
- 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 +55 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -18
- package/dist/index.d.ts +21 -18
- package/dist/index.js +41 -34
- 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-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-DtSh7HQU.d.ts → line-Bpr5uVLQ.d.ts} +1 -1
- package/dist/{line-DO66LtwH.js → line-CxR4tg1Q.js} +46 -34
- package/dist/line-CxR4tg1Q.js.map +1 -0
- package/dist/{line-Dbt6KFRK.cjs → line-YiCuhVMI.cjs} +46 -34
- package/dist/line-YiCuhVMI.cjs.map +1 -0
- package/dist/{line-_rNdeKmS.d.cts → line-vyWO030v.d.cts} +2 -3
- 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-49FcfdmJ.d.cts +156 -0
- package/dist/map-BMC61J-P.d.ts +156 -0
- package/dist/map-BqrZ80vT.cjs +818 -0
- package/dist/map-BqrZ80vT.cjs.map +1 -0
- package/dist/map-C15NC7kW.js +807 -0
- package/dist/map-C15NC7kW.js.map +1 -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-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/others-ls5eKtZ4.d.cts +31 -0
- package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
- package/dist/parliament-BKN6ikBJ.js.map +1 -0
- package/dist/{parliament-CgsVnWEe.d.cts → parliament-C7V8UJj1.d.cts} +1 -1
- package/dist/{parliament-CLCI7tUO.d.ts → parliament-Cz9n_DoK.d.ts} +1 -1
- 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-CufKZYhm.js → patterns-BMUINoka.js} +2 -2
- package/dist/{patterns-CufKZYhm.js.map → patterns-BMUINoka.js.map} +1 -1
- package/dist/{patterns-D3-wQagb.cjs → patterns-Dw7OMD_2.cjs} +2 -2
- package/dist/{patterns-D3-wQagb.cjs.map → patterns-Dw7OMD_2.cjs.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-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-R1--2grK.d.cts} +10 -14
- package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-cSeiLdwU.d.ts} +10 -14
- 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-CFptILSm.d.ts → pie-BQQkvy1N.d.ts} +7 -13
- package/dist/{pie-CVsc-6qD.js → pie-Bd8wyrtY.js} +45 -44
- package/dist/pie-Bd8wyrtY.js.map +1 -0
- package/dist/{pie-BpjvSPnz.cjs → pie-BseZlCgP.cjs} +45 -44
- package/dist/pie-BseZlCgP.cjs.map +1 -0
- package/dist/{pie-BXg2gNpb.d.cts → pie-vD5-g8je.d.cts} +7 -13
- 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-D1-lItDy.d.cts → radar-7I6hsY_h.d.cts} +1 -1
- package/dist/{radar-BR-mumDd.js → radar-D6XqkFWQ.js} +21 -22
- package/dist/radar-D6XqkFWQ.js.map +1 -0
- package/dist/{radar-HPDrIdzc.cjs → radar-DjISDnSf.cjs} +22 -23
- package/dist/radar-DjISDnSf.cjs.map +1 -0
- package/dist/{radar-BC9Skgpj.d.ts → radar-vLxilcr4.d.ts} +1 -1
- 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/{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-D_v7KxnJ.d.ts → sankey-7As41Fo4.d.ts} +1 -1
- package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
- package/dist/sankey-Dp4CuLVe.js.map +1 -0
- package/dist/{sankey-Dk7jUt8x.d.cts → sankey-DqiuxUx7.d.cts} +1 -1
- 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-CXEsioOJ.d.ts → scatter-BXkXGgM_.d.ts} +7 -1
- package/dist/{scatter-DVqB_fP9.cjs → scatter-Bwkblr4L.cjs} +40 -38
- package/dist/scatter-Bwkblr4L.cjs.map +1 -0
- package/dist/{scatter-C0TWjFpW.js → scatter-DCMAtt5L.js} +38 -36
- package/dist/scatter-DCMAtt5L.js.map +1 -0
- package/dist/{scatter-DZeEIfyo.d.cts → scatter-DL0zAV09.d.cts} +7 -1
- package/dist/scatter.cjs +1 -1
- package/dist/scatter.d.cts +1 -1
- package/dist/scatter.d.ts +1 -1
- package/dist/scatter.js +1 -1
- package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-BElUSd0r.d.ts} +1 -1
- package/dist/{sparkline-B39NA0Mi.cjs → sparkline-BMSuEPHP.cjs} +13 -15
- package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
- package/dist/{sparkline-XO_TqCNP.js → sparkline-NDmq90kP.js} +13 -15
- package/dist/sparkline-NDmq90kP.js.map +1 -0
- package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-RYly7bR0.d.cts} +1 -1
- 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-BgPzoQmv.cjs → stack-BO4624CY.cjs} +2 -2
- package/dist/{stack-BgPzoQmv.cjs.map → stack-BO4624CY.cjs.map} +1 -1
- package/dist/{stack-Dagxq7l2.d.cts → stack-BTWYIwLO.d.cts} +1 -1
- package/dist/{stack-2H2Gfs1Q.js → stack-jVKvg2x_.js} +2 -2
- package/dist/{stack-2H2Gfs1Q.js.map → stack-jVKvg2x_.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-B3VekUfX.cjs} +4 -3
- package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
- package/dist/{time-axis-FLONo54E.js → time-axis-CLjqOakA.js} +3 -2
- package/dist/{time-axis-FLONo54E.js.map → time-axis-CLjqOakA.js.map} +1 -1
- package/dist/time.cjs +3 -3
- package/dist/time.js +3 -3
- package/dist/{treemap-BAkhmVQc.d.cts → treemap-25vHO_UK.d.cts} +12 -2
- package/dist/{treemap-BNpxFBao.d.ts → treemap-BCXUbixd.d.ts} +12 -2
- package/dist/{treemap-CQdavQ9u.js → treemap-C4glsx-g.js} +20 -25
- package/dist/treemap-C4glsx-g.js.map +1 -0
- package/dist/{treemap-BWpEUlDh.cjs → treemap-CZk8kKFD.cjs} +21 -26
- package/dist/treemap-CZk8kKFD.cjs.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-C7GrhOXJ.js} +25 -5
- package/dist/value-labels-C7GrhOXJ.js.map +1 -0
- package/dist/{value-labels-BV9keAuL.cjs → value-labels-DzaKIWKp.cjs} +25 -5
- package/dist/value-labels-DzaKIWKp.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/package.json +93 -233
- package/dist/bar-BNZ3GhIw.js.map +0 -1
- package/dist/bar-Da6dE_nI.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,4 +1,4 @@
|
|
|
1
|
-
const require_layout = require("./layout-
|
|
1
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
2
2
|
// src/charts/point-shapes.ts
|
|
3
3
|
/**
|
|
4
4
|
* Outlines by color slot (0-based), as x, y pairs in units of the radius,
|
|
@@ -126,29 +126,30 @@ function markerPath(slot, x, y, r) {
|
|
|
126
126
|
for (let i = 0; i < shape.length; i += 2) d += `${i ? "L" : "M"}${require_layout.round(x + shape[i] * r)},${require_layout.round(y + shape[i + 1] * r)}`;
|
|
127
127
|
return `${d}Z`;
|
|
128
128
|
}
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
tag: "path",
|
|
138
|
-
attrs: {
|
|
139
|
-
class: `${cls} tc-marker`,
|
|
140
|
-
d: markerPath(slot, +(attrs.cx ?? 0), +(attrs.cy ?? 0), +(attrs.r ?? 0))
|
|
141
|
-
},
|
|
142
|
-
children: [],
|
|
143
|
-
key: child.key
|
|
144
|
-
};
|
|
129
|
+
/**
|
|
130
|
+
* Inline style for the legend or tooltip swatch of slot `slot`: its marker as
|
|
131
|
+
* a CSS shape (`--tc-shape`, a `clip-path`) in a box without rounded corners;
|
|
132
|
+
* `undefined` for the slots that stay a circle.
|
|
133
|
+
*/
|
|
134
|
+
function markerClip(slot) {
|
|
135
|
+
if (!SHAPES[slot]?.length) return void 0;
|
|
136
|
+
const points = markerPath(slot, 50, 50, 35.7).slice(1, -1).replace(/,/g, "% ").replace(/L/g, "%,");
|
|
145
137
|
return {
|
|
146
|
-
|
|
147
|
-
|
|
138
|
+
"--tc-shape": slot === 1 ? "inset(10% round 1px)" : `polygon(${points}%)`,
|
|
139
|
+
"--tc-shape-radius": 0
|
|
148
140
|
};
|
|
149
141
|
}
|
|
150
|
-
/**
|
|
151
|
-
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Points are drawn in their shapes as the chart renders: this
|
|
144
|
+
* step leaves the content as it is. It will be removed in the next major.
|
|
145
|
+
*/
|
|
146
|
+
const shapesStep = (_config, content) => content;
|
|
147
|
+
Object.defineProperty(exports, "markerClip", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function() {
|
|
150
|
+
return markerClip;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
152
153
|
Object.defineProperty(exports, "markerPath", {
|
|
153
154
|
enumerable: true,
|
|
154
155
|
get: function() {
|
|
@@ -162,4 +163,4 @@ Object.defineProperty(exports, "shapesStep", {
|
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
|
|
165
|
-
//# sourceMappingURL=point-shapes
|
|
166
|
+
//# sourceMappingURL=point-shapes-BRawRM78.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"point-shapes-BRawRM78.cjs","names":["round"],"sources":["../src/charts/point-shapes.ts"],"sourcesContent":["/**\n * Marker shapes, so the points of series do not depend on color alone\n * (color vision deficiency, grayscale print): one shape per color slot,\n * for line, radar and scatter points and the active points of the hover.\n * On with `shapes: true`, and with `patterns: true` unless `shapes` says\n * otherwise. Legend and tooltip swatches take the same shapes (`markerClip`).\n */\nimport type { PostStep } from '../features.ts'\nimport { round } from '../layout.ts'\n\n/**\n * Outlines by color slot (0-based), as x, y pairs in units of the radius,\n * sized so the shapes weigh about the same as the circle of slot 0 (and of\n * slots 9 and up).\n */\nconst SHAPES: readonly (readonly number[])[] = [\n [],\n // Square.\n [-0.9, -0.9, 0.9, -0.9, 0.9, 0.9, -0.9, 0.9],\n // Triangle.\n [0, -1.3, 1.2, 0.9, -1.2, 0.9],\n // Diamond.\n [0, -1.3, 1.3, 0, 0, 1.3, -1.3, 0],\n // Triangle, pointing down.\n [-1.2, -0.9, 1.2, -0.9, 0, 1.3],\n // Plus.\n [\n -0.4, -1.2, 0.4, -1.2, 0.4, -0.4, 1.2, -0.4, 1.2, 0.4, 0.4, 0.4, 0.4, 1.2, -0.4, 1.2, -0.4, 0.4,\n -1.2, 0.4, -1.2, -0.4, -0.4, -0.4,\n ],\n // Cross.\n [\n -0.7, -1.2, 0, -0.5, 0.7, -1.2, 1.2, -0.7, 0.5, 0, 1.2, 0.7, 0.7, 1.2, 0, 0.5, -0.7, 1.2, -1.2,\n 0.7, -0.5, 0, -1.2, -0.7,\n ],\n // Star.\n [\n 0, -1.4, 0.32, -0.44, 1.33, -0.43, 0.52, 0.17, 0.82, 1.13, 0, 0.55, -0.82, 1.13, -0.52, 0.17,\n -1.33, -0.43, -0.32, -0.44,\n ],\n]\n\n/** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */\nexport function markerPath(slot: number, x: number, y: number, r: number): string {\n const shape = SHAPES[slot] ?? []\n if (!shape.length) {\n return `M${round(x - r)},${round(y)}a${r},${r},0,1,0,${2 * r},0a${r},${r},0,1,0,${-2 * r},0Z`\n }\n let d = ''\n for (let i = 0; i < shape.length; i += 2) {\n d += `${i ? 'L' : 'M'}${round(x + (shape[i] as number) * r)},${round(y + (shape[i + 1] as number) * r)}`\n }\n return `${d}Z`\n}\n\n/**\n * Inline style for the legend or tooltip swatch of slot `slot`: its marker as\n * a CSS shape (`--tc-shape`, a `clip-path`) in a box without rounded corners;\n * `undefined` for the slots that stay a circle.\n */\nexport function markerClip(slot: number): Record<string, string | number> | undefined {\n if (!SHAPES[slot]?.length) return undefined\n // In percent of the box: a radius of 35.7% keeps the largest shape (the star) inside.\n const points = markerPath(slot, 50, 50, 35.7).slice(1, -1).replace(/,/g, '% ').replace(/L/g, '%,')\n return {\n // The square is not cut from the swatch's box but set a little into it.\n '--tc-shape': slot === 1 ? 'inset(10% round 1px)' : `polygon(${points}%)`,\n '--tc-shape-radius': 0,\n }\n}\n\n/**\n * @deprecated Points are drawn in their shapes as the chart renders: this\n * step leaves the content as it is. It will be removed in the next major.\n */\nexport const shapesStep: PostStep = (_config, content) => content\n"],"mappings":";;;;;;;AAeA,MAAM,SAAyC;CAC7C,CAAC;CAED;EAAC;EAAM;EAAM;EAAK;EAAM;EAAK;EAAK;EAAM;CAAG;CAE3C;EAAC;EAAG;EAAM;EAAK;EAAK;EAAM;CAAG;CAE7B;EAAC;EAAG;EAAM;EAAK;EAAG;EAAG;EAAK;EAAM;CAAC;CAEjC;EAAC;EAAM;EAAM;EAAK;EAAM;EAAG;CAAG;CAE9B;EACE;EAAM;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAM;EAAK;EAAM;EAC5F;EAAM;EAAK;EAAM;EAAM;EAAM;CAC/B;CAEA;EACE;EAAM;EAAM;EAAG;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAG;EAAK;EAAK;EAAK;EAAK;EAAG;EAAK;EAAM;EAAK;EAC1F;EAAK;EAAM;EAAG;EAAM;CACtB;CAEA;EACE;EAAG;EAAM;EAAM;EAAO;EAAM;EAAO;EAAM;EAAM;EAAM;EAAM;EAAG;EAAM;EAAO;EAAM;EAAO;EACxF;EAAO;EAAO;EAAO;CACvB;AACF;;AAGA,SAAgB,WAAW,MAAc,GAAW,GAAW,GAAmB;CAChF,MAAM,QAAQ,OAAO,SAAS,CAAC;CAC/B,IAAI,CAAC,MAAM,QACT,OAAO,IAAIA,eAAAA,MAAM,IAAI,CAAC,EAAE,GAAGA,eAAAA,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE;CAE3F,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GACrC,KAAK,GAAG,IAAI,MAAM,MAAMA,eAAAA,MAAM,IAAK,MAAM,KAAgB,CAAC,EAAE,GAAGA,eAAAA,MAAM,IAAK,MAAM,IAAI,KAAgB,CAAC;CAEvG,OAAO,GAAG,EAAE;AACd;;;;;;AAOA,SAAgB,WAAW,MAA2D;CACpF,IAAI,CAAC,OAAO,KAAK,EAAE,QAAQ,OAAO,KAAA;CAElC,MAAM,SAAS,WAAW,MAAM,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,QAAQ,MAAM,IAAI,CAAC,CAAC,QAAQ,MAAM,IAAI;CACjG,OAAO;EAEL,cAAc,SAAS,IAAI,yBAAyB,WAAW,OAAO;EACtE,qBAAqB;CACvB;AACF;;;;;AAMA,MAAa,cAAwB,SAAS,YAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as round } from "./layout-DqAte3H8.js";
|
|
2
2
|
// src/charts/point-shapes.ts
|
|
3
3
|
/**
|
|
4
4
|
* Outlines by color slot (0-based), as x, y pairs in units of the radius,
|
|
@@ -126,29 +126,24 @@ function markerPath(slot, x, y, r) {
|
|
|
126
126
|
for (let i = 0; i < shape.length; i += 2) d += `${i ? "L" : "M"}${round(x + shape[i] * r)},${round(y + shape[i + 1] * r)}`;
|
|
127
127
|
return `${d}Z`;
|
|
128
128
|
}
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
tag: "path",
|
|
138
|
-
attrs: {
|
|
139
|
-
class: `${cls} tc-marker`,
|
|
140
|
-
d: markerPath(slot, +(attrs.cx ?? 0), +(attrs.cy ?? 0), +(attrs.r ?? 0))
|
|
141
|
-
},
|
|
142
|
-
children: [],
|
|
143
|
-
key: child.key
|
|
144
|
-
};
|
|
129
|
+
/**
|
|
130
|
+
* Inline style for the legend or tooltip swatch of slot `slot`: its marker as
|
|
131
|
+
* a CSS shape (`--tc-shape`, a `clip-path`) in a box without rounded corners;
|
|
132
|
+
* `undefined` for the slots that stay a circle.
|
|
133
|
+
*/
|
|
134
|
+
function markerClip(slot) {
|
|
135
|
+
if (!SHAPES[slot]?.length) return void 0;
|
|
136
|
+
const points = markerPath(slot, 50, 50, 35.7).slice(1, -1).replace(/,/g, "% ").replace(/L/g, "%,");
|
|
145
137
|
return {
|
|
146
|
-
|
|
147
|
-
|
|
138
|
+
"--tc-shape": slot === 1 ? "inset(10% round 1px)" : `polygon(${points}%)`,
|
|
139
|
+
"--tc-shape-radius": 0
|
|
148
140
|
};
|
|
149
141
|
}
|
|
150
|
-
/**
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Points are drawn in their shapes as the chart renders: this
|
|
144
|
+
* step leaves the content as it is. It will be removed in the next major.
|
|
145
|
+
*/
|
|
146
|
+
const shapesStep = (_config, content) => content;
|
|
147
|
+
export { markerPath as n, shapesStep as r, markerClip as t };
|
|
153
148
|
|
|
154
|
-
//# sourceMappingURL=point-shapes-
|
|
149
|
+
//# sourceMappingURL=point-shapes-DI6GhcI7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"point-shapes-DI6GhcI7.js","names":[],"sources":["../src/charts/point-shapes.ts"],"sourcesContent":["/**\n * Marker shapes, so the points of series do not depend on color alone\n * (color vision deficiency, grayscale print): one shape per color slot,\n * for line, radar and scatter points and the active points of the hover.\n * On with `shapes: true`, and with `patterns: true` unless `shapes` says\n * otherwise. Legend and tooltip swatches take the same shapes (`markerClip`).\n */\nimport type { PostStep } from '../features.ts'\nimport { round } from '../layout.ts'\n\n/**\n * Outlines by color slot (0-based), as x, y pairs in units of the radius,\n * sized so the shapes weigh about the same as the circle of slot 0 (and of\n * slots 9 and up).\n */\nconst SHAPES: readonly (readonly number[])[] = [\n [],\n // Square.\n [-0.9, -0.9, 0.9, -0.9, 0.9, 0.9, -0.9, 0.9],\n // Triangle.\n [0, -1.3, 1.2, 0.9, -1.2, 0.9],\n // Diamond.\n [0, -1.3, 1.3, 0, 0, 1.3, -1.3, 0],\n // Triangle, pointing down.\n [-1.2, -0.9, 1.2, -0.9, 0, 1.3],\n // Plus.\n [\n -0.4, -1.2, 0.4, -1.2, 0.4, -0.4, 1.2, -0.4, 1.2, 0.4, 0.4, 0.4, 0.4, 1.2, -0.4, 1.2, -0.4, 0.4,\n -1.2, 0.4, -1.2, -0.4, -0.4, -0.4,\n ],\n // Cross.\n [\n -0.7, -1.2, 0, -0.5, 0.7, -1.2, 1.2, -0.7, 0.5, 0, 1.2, 0.7, 0.7, 1.2, 0, 0.5, -0.7, 1.2, -1.2,\n 0.7, -0.5, 0, -1.2, -0.7,\n ],\n // Star.\n [\n 0, -1.4, 0.32, -0.44, 1.33, -0.43, 0.52, 0.17, 0.82, 1.13, 0, 0.55, -0.82, 1.13, -0.52, 0.17,\n -1.33, -0.43, -0.32, -0.44,\n ],\n]\n\n/** The path of slot `slot`'s marker of radius `r` around (`x`, `y`). */\nexport function markerPath(slot: number, x: number, y: number, r: number): string {\n const shape = SHAPES[slot] ?? []\n if (!shape.length) {\n return `M${round(x - r)},${round(y)}a${r},${r},0,1,0,${2 * r},0a${r},${r},0,1,0,${-2 * r},0Z`\n }\n let d = ''\n for (let i = 0; i < shape.length; i += 2) {\n d += `${i ? 'L' : 'M'}${round(x + (shape[i] as number) * r)},${round(y + (shape[i + 1] as number) * r)}`\n }\n return `${d}Z`\n}\n\n/**\n * Inline style for the legend or tooltip swatch of slot `slot`: its marker as\n * a CSS shape (`--tc-shape`, a `clip-path`) in a box without rounded corners;\n * `undefined` for the slots that stay a circle.\n */\nexport function markerClip(slot: number): Record<string, string | number> | undefined {\n if (!SHAPES[slot]?.length) return undefined\n // In percent of the box: a radius of 35.7% keeps the largest shape (the star) inside.\n const points = markerPath(slot, 50, 50, 35.7).slice(1, -1).replace(/,/g, '% ').replace(/L/g, '%,')\n return {\n // The square is not cut from the swatch's box but set a little into it.\n '--tc-shape': slot === 1 ? 'inset(10% round 1px)' : `polygon(${points}%)`,\n '--tc-shape-radius': 0,\n }\n}\n\n/**\n * @deprecated Points are drawn in their shapes as the chart renders: this\n * step leaves the content as it is. It will be removed in the next major.\n */\nexport const shapesStep: PostStep = (_config, content) => content\n"],"mappings":";;;;;;;AAeA,MAAM,SAAyC;CAC7C,CAAC;CAED;EAAC;EAAM;EAAM;EAAK;EAAM;EAAK;EAAK;EAAM;CAAG;CAE3C;EAAC;EAAG;EAAM;EAAK;EAAK;EAAM;CAAG;CAE7B;EAAC;EAAG;EAAM;EAAK;EAAG;EAAG;EAAK;EAAM;CAAC;CAEjC;EAAC;EAAM;EAAM;EAAK;EAAM;EAAG;CAAG;CAE9B;EACE;EAAM;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAM;EAAK;EAAM;EAC5F;EAAM;EAAK;EAAM;EAAM;EAAM;CAC/B;CAEA;EACE;EAAM;EAAM;EAAG;EAAM;EAAK;EAAM;EAAK;EAAM;EAAK;EAAG;EAAK;EAAK;EAAK;EAAK;EAAG;EAAK;EAAM;EAAK;EAC1F;EAAK;EAAM;EAAG;EAAM;CACtB;CAEA;EACE;EAAG;EAAM;EAAM;EAAO;EAAM;EAAO;EAAM;EAAM;EAAM;EAAM;EAAG;EAAM;EAAO;EAAM;EAAO;EACxF;EAAO;EAAO;EAAO;CACvB;AACF;;AAGA,SAAgB,WAAW,MAAc,GAAW,GAAW,GAAmB;CAChF,MAAM,QAAQ,OAAO,SAAS,CAAC;CAC/B,IAAI,CAAC,MAAM,QACT,OAAO,IAAI,MAAM,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE;CAE3F,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GACrC,KAAK,GAAG,IAAI,MAAM,MAAM,MAAM,IAAK,MAAM,KAAgB,CAAC,EAAE,GAAG,MAAM,IAAK,MAAM,IAAI,KAAgB,CAAC;CAEvG,OAAO,GAAG,EAAE;AACd;;;;;;AAOA,SAAgB,WAAW,MAA2D;CACpF,IAAI,CAAC,OAAO,KAAK,EAAE,QAAQ,OAAO,KAAA;CAElC,MAAM,SAAS,WAAW,MAAM,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,QAAQ,MAAM,IAAI,CAAC,CAAC,QAAQ,MAAM,IAAI;CACjG,OAAO;EAEL,cAAc,SAAS,IAAI,yBAAyB,WAAW,OAAO;EACtE,qBAAqB;CACvB;AACF;;;;;AAMA,MAAa,cAAwB,SAAS,YAAY"}
|
package/dist/point-shapes.cjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_point_shapes = require("./point-shapes
|
|
3
|
-
const require_features = require("./features-DCXEvoya.cjs");
|
|
2
|
+
const require_point_shapes = require("./point-shapes-BRawRM78.cjs");
|
|
4
3
|
// src/point-shapes.ts
|
|
5
4
|
/**
|
|
6
5
|
* Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
|
|
7
6
|
* (a point shape per series) on the core.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
require("./features-DEDP5CEQ.cjs").register({
|
|
9
|
+
"point-shapes": require_point_shapes.markerPath,
|
|
10
|
+
swatch: require_point_shapes.markerClip
|
|
11
|
+
});
|
|
12
|
+
exports.markerClip = require_point_shapes.markerClip;
|
|
11
13
|
exports.markerPath = require_point_shapes.markerPath;
|
|
12
14
|
exports.shapesStep = require_point_shapes.shapesStep;
|
|
13
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point-shapes.cjs","names":["register","markerPath","
|
|
1
|
+
{"version":3,"file":"point-shapes.cjs","names":["register","markerPath","markerClip"],"sources":["../src/point-shapes.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`\n * (a point shape per series) on the core.\n */\nimport { markerClip, markerPath, shapesStep } from './charts/point-shapes.ts'\nimport { register } from './features.ts'\n\nregister({ 'point-shapes': markerPath, swatch: markerClip })\n\nexport { markerClip, markerPath, shapesStep }\n"],"mappings":";;;;;;;A,iCAOAA,CAAAA,CAAAA,SAAS;CAAE,gBAAgBC,qBAAAA;CAAY,QAAQC,qBAAAA;AAAW,CAAC"}
|
package/dist/point-shapes.d.cts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
|
|
3
3
|
* (a point shape per series) on the core.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
export { markerPath, shapesStep };
|
|
5
|
+
import { $ as markerClip, et as markerPath, tt as shapesStep } from "./chart-CbPzP5Dp.cjs";
|
|
6
|
+
export { markerClip, markerPath, shapesStep };
|
package/dist/point-shapes.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
|
|
3
3
|
* (a point shape per series) on the core.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
export { markerPath, shapesStep };
|
|
5
|
+
import { X as markerPath, Y as markerClip, Z as shapesStep } from "./chart-CYrrUCi3.js";
|
|
6
|
+
export { markerClip, markerPath, shapesStep };
|
package/dist/point-shapes.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { n as shapesStep, t as
|
|
2
|
-
import { i as register
|
|
1
|
+
import { n as markerPath, r as shapesStep, t as markerClip } from "./point-shapes-DI6GhcI7.js";
|
|
2
|
+
import { i as register } from "./features-B55rwpQC.js";
|
|
3
3
|
// src/point-shapes.ts
|
|
4
4
|
/**
|
|
5
5
|
* Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`
|
|
6
6
|
* (a point shape per series) on the core.
|
|
7
7
|
*/
|
|
8
|
-
register({
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
register({
|
|
9
|
+
"point-shapes": markerPath,
|
|
10
|
+
swatch: markerClip
|
|
11
|
+
});
|
|
12
|
+
export { markerClip, markerPath, shapesStep };
|
|
11
13
|
|
|
12
14
|
//# sourceMappingURL=point-shapes.js.map
|
package/dist/point-shapes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point-shapes.js","names":[],"sources":["../src/point-shapes.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`\n * (a point shape per series) on the core.\n */\nimport { markerPath, shapesStep } from './charts/point-shapes.ts'\nimport {
|
|
1
|
+
{"version":3,"file":"point-shapes.js","names":[],"sources":["../src/point-shapes.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/point-shapes'` enables `shapes`\n * (a point shape per series) on the core.\n */\nimport { markerClip, markerPath, shapesStep } from './charts/point-shapes.ts'\nimport { register } from './features.ts'\n\nregister({ 'point-shapes': markerPath, swatch: markerClip })\n\nexport { markerClip, markerPath, shapesStep }\n"],"mappings":";;;;;;;AAOA,SAAS;CAAE,gBAAgB;CAAY,QAAQ;AAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ft as Label, lt as CartesianData, o as ChartType } from "./chart-CbPzP5Dp.cjs";
|
|
2
2
|
import { c as NumberFormat } from "./time-B4oxWHQI.cjs";
|
|
3
3
|
import { a as InsetsInput } from "./annotations-CHafaGd4.cjs";
|
|
4
4
|
/** Options for the radial value axis. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as linearTicks } from "./axis-MMaVoSWB.js";
|
|
2
2
|
import { n as formatDetail } from "./format-it1kepFG.js";
|
|
3
|
-
import { i as insets, n as estimateTextWidth,
|
|
3
|
+
import { i as insets, n as estimateTextWidth, r as innerRect, s as round, t as LINE_HEIGHT } from "./layout-DqAte3H8.js";
|
|
4
|
+
import { C as linear, _ as seriesTable, d as resolveLabels, f as seriesAttrs, h as seriesLegend, m as seriesKey, o as labelKey, r as domainOf, s as markerShape, u as pointMark, v as tickCount } from "./cartesian-BrPqb5Qn.js";
|
|
4
5
|
import { t as h } from "./vnode-_EMUqysL.js";
|
|
5
6
|
import { r as cleanSeries, t as cleanData } from "./clean-CkoQobGv.js";
|
|
6
7
|
// src/charts/radar.ts
|
|
@@ -141,7 +142,8 @@ function renderRadar(options, ctx) {
|
|
|
141
142
|
height: radius * 2
|
|
142
143
|
},
|
|
143
144
|
items,
|
|
144
|
-
|
|
145
|
+
highlight: {
|
|
146
|
+
kind: "spoke",
|
|
145
147
|
x1: cx,
|
|
146
148
|
y1: cy,
|
|
147
149
|
x2,
|
|
@@ -164,7 +166,6 @@ function renderRadar(options, ctx) {
|
|
|
164
166
|
return hit;
|
|
165
167
|
}
|
|
166
168
|
};
|
|
167
|
-
ctx.onHitTest(interaction);
|
|
168
169
|
const grid = h("g", {
|
|
169
170
|
key: "grid",
|
|
170
171
|
class: "tc-radar-grid",
|
|
@@ -184,6 +185,7 @@ function renderRadar(options, ctx) {
|
|
|
184
185
|
y2: round(y2)
|
|
185
186
|
});
|
|
186
187
|
}));
|
|
188
|
+
const shape = markerShape(options);
|
|
187
189
|
const groups = series.map((s, index) => {
|
|
188
190
|
if (ctx.hidden.has(seriesKey(s))) return null;
|
|
189
191
|
const d = polygon(labels.map((_, i) => radiusOf(s.values[i])));
|
|
@@ -197,13 +199,7 @@ function renderRadar(options, ctx) {
|
|
|
197
199
|
const v = s.values[i];
|
|
198
200
|
if (v == null || !Number.isFinite(v)) return null;
|
|
199
201
|
const [x, y] = at(i, scale(v));
|
|
200
|
-
return
|
|
201
|
-
key: labelKey(label),
|
|
202
|
-
class: "tc-point",
|
|
203
|
-
cx: round(x),
|
|
204
|
-
cy: round(y),
|
|
205
|
-
r: pointRadius
|
|
206
|
-
});
|
|
202
|
+
return pointMark(shape, index, labelKey(label), "tc-point", round(x), round(y), pointRadius);
|
|
207
203
|
})));
|
|
208
204
|
});
|
|
209
205
|
const spokeLabels = h("g", {
|
|
@@ -242,16 +238,19 @@ function renderRadar(options, ctx) {
|
|
|
242
238
|
y: round(cy - tick.position),
|
|
243
239
|
dy: "0.35em"
|
|
244
240
|
}, tick.label)));
|
|
245
|
-
return
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
241
|
+
return {
|
|
242
|
+
content: [
|
|
243
|
+
grid,
|
|
244
|
+
h("g", {
|
|
245
|
+
key: "series",
|
|
246
|
+
class: "tc-series-list tc-radar-series",
|
|
247
|
+
style: `transform-origin:${round(cx)}px ${round(cy)}px`
|
|
248
|
+
}, groups),
|
|
249
|
+
spokeLabels,
|
|
250
|
+
valueLabels
|
|
251
|
+
],
|
|
252
|
+
interaction
|
|
253
|
+
};
|
|
255
254
|
}
|
|
256
255
|
/**
|
|
257
256
|
* Radar (spider) chart: one spoke per label, the values of each series
|
|
@@ -281,4 +280,4 @@ const radar = {
|
|
|
281
280
|
};
|
|
282
281
|
export { radar as t };
|
|
283
282
|
|
|
284
|
-
//# sourceMappingURL=radar-
|
|
283
|
+
//# sourceMappingURL=radar-D6XqkFWQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radar-D6XqkFWQ.js","names":[],"sources":["../src/charts/radar.ts"],"sourcesContent":["import type { ChartType, RenderContext, RenderResult } from '../chart.ts'\nimport { linearTicks } from '../components/axis.ts'\nimport { formatDetail, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport {\n estimateTextWidth,\n type InsetsInput,\n innerRect,\n insets,\n LINE_HEIGHT,\n round,\n} from '../layout.ts'\nimport { linear } from '../scales/linear.ts'\nimport { h } from '../vnode.ts'\nimport {\n type CartesianData,\n domainOf,\n type Label,\n labelKey,\n markerShape,\n pointMark,\n resolveLabels,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n tickCount,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\n\n/** Options for the radial value axis. */\nexport interface RadialAxisOptions {\n /** Render the value labels along the first spoke. Defaults to `true`. */\n show?: boolean\n /** Value at the center. Defaults to `0` (or the data minimum when it is negative). */\n min?: number\n /** Value at the outer ring. Defaults to the niced data maximum. */\n max?: number\n /** Extend the domain to round values. Defaults to `true`. */\n nice?: boolean\n /** Approximate number of rings. Defaults to one per ~40px of radius. */\n ticks?: number\n format?: NumberFormat\n}\n\nexport interface RadarOptions {\n /** One spoke per label, one polygon per series. */\n data: CartesianData\n /** The radial value axis. */\n r?: RadialAxisOptions\n /** Format of the spoke labels (axis, tooltips and the table). */\n format?: (label: Label, index: number) => string\n /** Shape of the rings. Defaults to `'polygon'`. */\n grid?: 'polygon' | 'circle'\n /** Fill each polygon. Defaults to `true`. */\n fill?: boolean\n /** Draw a dot on every value. Defaults to `false`. */\n points?: boolean\n /** Dot radius in pixels. Defaults to `4`. */\n pointRadius?: number\n /**\n * Widest spoke label, in pixels: a longer one wraps at its spaces onto up\n * to three lines. Defaults to a quarter of the chart's width.\n */\n labelWidth?: number\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** Space between the outer ring and the spoke labels. */\nconst LABEL_GAP = 8\n/** Pixels around the outer ring that still count as hovering it. */\nconst HOVER_SLOP = 8\n\n/** Smallest radius, as a share of the space, however long the labels. */\nconst MIN_RADIUS = 0.5\n/** Most lines a wrapped spoke label takes. */\nconst MAX_LINES = 3\n\n/** `text`, cut short with an ellipsis to fit `width` pixels. */\nfunction truncate(text: string, width: number, fontSize: number): string {\n if (estimateTextWidth(text, fontSize) <= width) return text\n let end = text.length\n while (end > 0 && estimateTextWidth(`${text.slice(0, end)}…`, fontSize) > width) end--\n return end > 0 ? `${text.slice(0, end).trimEnd()}…` : ''\n}\n\n/**\n * `text` split at its spaces into lines no wider than `width` pixels (a word\n * wider than that gets a line of its own), at most `MAX_LINES` of them: what\n * is left joins the last line.\n */\nfunction wrap(text: string, width: number, fontSize: number): string[] {\n const lines: string[] = []\n let line = ''\n for (const word of text.split(' ')) {\n const next = line ? `${line} ${word}` : word\n if (!line || estimateTextWidth(next, fontSize) <= width) line = next\n else {\n lines.push(line)\n line = word\n }\n }\n lines.push(line)\n if (lines.length > MAX_LINES)\n lines.splice(MAX_LINES - 1, lines.length, lines.slice(MAX_LINES - 1).join(' '))\n return lines\n}\n\n/** Text anchor of a spoke label on the side its spoke points to. */\nconst side = (sin: number): -1 | 0 | 1 => (sin > 0.1 ? 1 : sin < -0.1 ? -1 : 0)\n\n/**\n * The largest radius at which every spoke label still fits in `area`:\n * labels sit beyond the outer ring, on the side their spoke points to.\n */\nfunction fitRadius(\n area: { width: number; height: number },\n angles: readonly number[],\n labels: readonly (readonly string[])[],\n fontSize: number,\n): number {\n let radius = Math.min(area.width, area.height) / 2\n angles.forEach((angle, i) => {\n const sin = Math.sin(angle)\n const cos = Math.cos(angle)\n const lines = labels[i] ?? []\n const w = Math.max(0, ...lines.map((line) => estimateTextWidth(line, fontSize)))\n const height = blockHeight(lines.length, fontSize)\n const s = side(sin)\n // Horizontal: the label runs outwards from the spoke end (or is centered on it).\n const across = s === 0 ? w / 2 : w + LABEL_GAP\n if (Math.abs(sin) > 1e-6) radius = Math.min(radius, (area.width / 2 - across) / Math.abs(sin))\n // Vertical: the lines of text above the top spokes, below the bottom ones,\n // centered on the ones at the sides.\n if (Math.abs(cos) > 1e-6) {\n const along = (s === 0 ? height + LABEL_GAP : height / 2) / Math.abs(cos)\n radius = Math.min(radius, area.height / 2 / Math.abs(cos) - along)\n }\n })\n return Math.max(0, radius)\n}\n\n/** Height of `lines` lines of text, in pixels. */\nconst blockHeight = (lines: number, fontSize: number) =>\n fontSize * (1 + Math.max(0, lines - 1) * LINE_HEIGHT)\n\nfunction renderRadar(options: RadarOptions, ctx: RenderContext): RenderResult {\n const { width, height, fontSize, locale } = ctx\n const axis = options.r ?? {}\n const { fill = true, points = false, pointRadius = 4 } = options\n const series = options.data.series\n const labels = resolveLabels(options.data)\n const n = labels.length\n const visible = series.filter((s) => !ctx.hidden.has(seriesKey(s)))\n const formatLabel = options.format ?? ((label: Label) => String(label))\n const formatValue = formatDetail(axis.format, locale)\n\n const pad = insets(options.padding)\n const area = innerRect(width, height, {\n top: pad.top + LABEL_GAP,\n right: pad.right + LABEL_GAP,\n bottom: pad.bottom + LABEL_GAP,\n left: pad.left + LABEL_GAP,\n })\n const cx = area.x + area.width / 2\n const cy = area.y + area.height / 2\n const angles = labels.map((_, i) => (i / Math.max(1, n)) * Math.PI * 2)\n const texts = labels.map((label, i) => formatLabel(label, i))\n // Long labels wrap onto a few lines, then the radius fits them, but never\n // shrinks below a share of the space: lines that still do not fit are cut\n // short (the tooltip and the table keep the labels whole).\n const labelWidth = options.labelWidth ?? area.width / 4\n const wrapped = texts.map((text) => wrap(text, labelWidth, fontSize))\n const radius = Math.max(\n fitRadius(area, angles, wrapped, fontSize),\n (Math.min(area.width, area.height) / 2) * MIN_RADIUS,\n )\n const shown = wrapped.map((lines, i) => {\n const sin = Math.sin(angles[i] as number)\n const room = side(sin) === 0 ? area.width : area.width / 2 - radius * Math.abs(sin) - LABEL_GAP\n return lines.map((line) => truncate(line, room, fontSize))\n })\n\n const count = tickCount(axis, Math.max(2, Math.round(radius / 40)))\n const values = visible.flatMap((s) => s.values)\n const domain = domainOf(values, axis, true, count)\n const scale = linear(domain, [0, radius], { clamp: true })\n const ticks = linearTicks(scale, { count, format: axis.format, locale })\n\n /** Point at `r` pixels from the center along spoke `i`. */\n const at = (i: number, r: number): [number, number] => [\n cx + r * Math.sin(angles[i] as number),\n cy - r * Math.cos(angles[i] as number),\n ]\n /** A closed path through one radius per spoke (the same commands for any values). */\n const polygon = (radii: readonly number[]) =>\n `${radii.map((r, i) => `${i ? 'L' : 'M'}${at(i, r).map(round).join(',')}`).join('')}Z`\n const ring = (r: number) =>\n options.grid === 'circle'\n ? `M${round(cx)},${round(cy - r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy + r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy - r)}Z`\n : polygon(labels.map(() => r))\n /** Pixel radius of a value; missing values sit at the center. */\n const radiusOf = (v: number | null | undefined) =>\n v != null && Number.isFinite(v) ? scale(v) : 0\n\n const hitAt = (index: number): Hit => {\n const items: HitItem[] = []\n series.forEach((s, seriesIndex) => {\n if (ctx.hidden.has(seriesKey(s))) return\n const raw = s.values[index]\n const value = raw != null && Number.isFinite(raw) ? raw : null\n const [x, y] = at(index, radiusOf(value))\n const item: HitItem = {\n name: s.name,\n seriesIndex,\n value,\n text: value === null ? '–' : formatValue(value),\n x,\n y: value === null ? null : y,\n }\n if (s.color) item.color = s.color\n items.push(item)\n })\n const [x2, y2] = at(index, radius)\n return {\n index,\n label: labelKey(labels[index] as Label),\n title: texts[index] as string,\n x: x2,\n area: { x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 },\n items,\n highlight: { kind: 'spoke', x1: cx, y1: cy, x2, y2 },\n }\n }\n\n const interaction: Interaction = {\n count: n,\n hitTest(px, py) {\n if (n === 0 || Math.hypot(px - cx, py - cy) > radius + HOVER_SLOP) return null\n // The nearest spoke by angle, clockwise from 12 o'clock.\n const angle = Math.atan2(px - cx, cy - py)\n const turn = (angle < 0 ? angle + Math.PI * 2 : angle) / (Math.PI * 2)\n return hitAt(Math.round(turn * n) % n)\n },\n hitIndex(index, seriesIndex) {\n if (index < 0 || index >= n) return null\n const hit = hitAt(index)\n if (seriesIndex !== undefined && hit.items.some((item) => item.seriesIndex === seriesIndex)) {\n hit.seriesIndex = seriesIndex\n }\n return hit\n },\n }\n\n const grid = h(\n 'g',\n { key: 'grid', class: 'tc-radar-grid', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h('path', { key: tick.value, class: 'tc-radar-ring', d: ring(tick.position) }),\n ),\n labels.map((label, i) => {\n const [x2, y2] = at(i, radius)\n return h('line', {\n key: labelKey(label),\n class: 'tc-radar-spoke',\n x1: round(cx),\n y1: round(cy),\n x2: round(x2),\n y2: round(y2),\n })\n }),\n )\n\n const shape = markerShape(options)\n const groups = series.map((s, index) => {\n if (ctx.hidden.has(seriesKey(s))) return null\n const d = polygon(labels.map((_, i) => radiusOf(s.values[i])))\n return h(\n 'g',\n seriesAttrs(s, index),\n fill && h('path', { class: 'tc-area', d }),\n h('path', { class: 'tc-line', d }),\n points &&\n h(\n 'g',\n { class: 'tc-points' },\n labels.map((label, i) => {\n const v = s.values[i]\n if (v == null || !Number.isFinite(v)) return null\n const [x, y] = at(i, scale(v))\n return pointMark(\n shape,\n index,\n labelKey(label),\n 'tc-point',\n round(x),\n round(y),\n pointRadius,\n )\n }),\n ),\n )\n })\n\n const spokeLabels = h(\n 'g',\n { key: 'labels', class: 'tc-radar-labels', 'aria-hidden': 'true' },\n labels.map((label, i) => {\n const angle = angles[i] as number\n const s = side(Math.sin(angle))\n const cos = Math.cos(angle)\n const [x, y] = at(i, radius + LABEL_GAP)\n const [first = '', ...rest] = shown[i] ?? []\n // Above the top spokes, below the bottom ones, centered on the sides:\n // the first line moves up to leave room for the ones under it.\n const up = rest.length * LINE_HEIGHT\n const dy = s !== 0 ? `${round(0.35 - up / 2)}em` : cos > 0 ? `${round(-up)}em` : '0.71em'\n return h(\n 'text',\n {\n key: labelKey(label),\n class: 'tc-tick-label tc-radar-label',\n x: round(x),\n y: round(y),\n 'text-anchor': s > 0 ? 'start' : s < 0 ? 'end' : 'middle',\n dy,\n },\n first,\n rest.map((line, j) => h('tspan', { key: j, x: round(x), dy: `${LINE_HEIGHT}em` }, line)),\n )\n }),\n )\n\n const valueLabels =\n axis.show !== false &&\n h(\n 'g',\n { key: 'values', class: 'tc-radar-values', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h(\n 'text',\n {\n key: tick.value,\n class: 'tc-tick-label tc-radar-value',\n x: round(cx + 4),\n y: round(cy - tick.position),\n dy: '0.35em',\n },\n tick.label,\n ),\n ),\n )\n\n const content = [\n grid,\n // Series grow from the center: the transform origin is set here, in pixels.\n h(\n 'g',\n {\n key: 'series',\n class: 'tc-series-list tc-radar-series',\n style: `transform-origin:${round(cx)}px ${round(cy)}px`,\n },\n groups,\n ),\n spokeLabels,\n valueLabels,\n ]\n return { content, interaction }\n}\n\n/**\n * Radar (spider) chart: one spoke per label, the values of each series\n * joined into a polygon around the center. Good for comparing a few series\n * over the same handful of measures.\n *\n * ```ts\n * new Chart('#el', {\n * type: radar,\n * data: {\n * labels: ['Speed', 'Range', 'Comfort', 'Price', 'Safety'],\n * series: [{ name: 'Model A', values: [80, 60, 70, 40, 90] }],\n * },\n * })\n * ```\n */\nexport const radar: ChartType<RadarOptions> = {\n name: 'radar',\n clean: cleanData(cleanSeries),\n render: renderRadar,\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) =>\n seriesTable(\n {\n data: options.data,\n ...(options.r?.format ? { y: { format: options.r.format } } : {}),\n ...(options.format ? { x: { format: options.format } } : {}),\n },\n ctx,\n limit,\n ),\n}\n"],"mappings":";;;;;;;;AAsEA,MAAM,YAAY;;AAElB,MAAM,aAAa;;AAGnB,MAAM,aAAa;;AAEnB,MAAM,YAAY;;AAGlB,SAAS,SAAS,MAAc,OAAe,UAA0B;CACvE,IAAI,kBAAkB,MAAM,QAAQ,KAAK,OAAO,OAAO;CACvD,IAAI,MAAM,KAAK;CACf,OAAO,MAAM,KAAK,kBAAkB,GAAG,KAAK,MAAM,GAAG,GAAG,EAAE,IAAI,QAAQ,IAAI,OAAO;CACjF,OAAO,MAAM,IAAI,GAAG,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;AACxD;;;;;;AAOA,SAAS,KA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GAAG,MAAM,KAAK,CAAC;EACf,GAAG,MAAM,KAAK,KAAK,QAAQ;EAC3B,IAAI;CACN,GACA,KAAK,KACP,CACF,CACJ;CAiBF,OAAO;EAAE,SAAA;GAdP;GAEA,EACE,KACA;IACE,KAAK;IACL,OAAO;IACP,OAAO,oBAAoB,MAAM,EAAE,EAAE,KAAK,MAAM,EAAE,EAAE;GACtD,GACA,MACF;GACA;GACA;EAEa;EAAG;CAAY;AAChC;;;;;;;;;;;;;;;;AAiBA,MAAa,QAAiC;CAC5C,MAAM;CACN,OAAO,UAAU,WAAW;CAC5B,QAAQ;CACR,SAAS,YAAY,aAAa,QAAQ,IAAI;CAC9C,QAAQ,SAAS,KAAK,UACpB,YACE;EACE,MAAM,QAAQ;EACd,GAAI,QAAQ,GAAG,SAAS,EAAE,GAAG,EAAE,QAAQ,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC;EAC/D,GAAI,QAAQ,SAAS,EAAE,GAAG,EAAE,QAAQ,QAAQ,OAAO,EAAE,IAAI,CAAC;CAC5D,GACA,KACA,KACF;AACJ"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_axis = require("./axis-YfAerNBA.cjs");
|
|
2
2
|
const require_format = require("./format-CAE5ruy6.cjs");
|
|
3
|
-
const require_layout = require("./layout-
|
|
3
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
4
|
+
const require_cartesian = require("./cartesian-DRSXHxWe.cjs");
|
|
4
5
|
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
5
6
|
const require_clean = require("./clean-Die2iCNc.cjs");
|
|
6
7
|
// src/charts/radar.ts
|
|
@@ -98,7 +99,7 @@ function renderRadar(options, ctx) {
|
|
|
98
99
|
const values = visible.flatMap((s) => s.values);
|
|
99
100
|
const domain = require_cartesian.domainOf(values, axis, true, count);
|
|
100
101
|
const scale = require_cartesian.linear(domain, [0, radius], { clamp: true });
|
|
101
|
-
const ticks =
|
|
102
|
+
const ticks = require_axis.linearTicks(scale, {
|
|
102
103
|
count,
|
|
103
104
|
format: axis.format,
|
|
104
105
|
locale
|
|
@@ -141,7 +142,8 @@ function renderRadar(options, ctx) {
|
|
|
141
142
|
height: radius * 2
|
|
142
143
|
},
|
|
143
144
|
items,
|
|
144
|
-
|
|
145
|
+
highlight: {
|
|
146
|
+
kind: "spoke",
|
|
145
147
|
x1: cx,
|
|
146
148
|
y1: cy,
|
|
147
149
|
x2,
|
|
@@ -164,7 +166,6 @@ function renderRadar(options, ctx) {
|
|
|
164
166
|
return hit;
|
|
165
167
|
}
|
|
166
168
|
};
|
|
167
|
-
ctx.onHitTest(interaction);
|
|
168
169
|
const grid = require_vnode.h("g", {
|
|
169
170
|
key: "grid",
|
|
170
171
|
class: "tc-radar-grid",
|
|
@@ -184,6 +185,7 @@ function renderRadar(options, ctx) {
|
|
|
184
185
|
y2: require_layout.round(y2)
|
|
185
186
|
});
|
|
186
187
|
}));
|
|
188
|
+
const shape = require_cartesian.markerShape(options);
|
|
187
189
|
const groups = series.map((s, index) => {
|
|
188
190
|
if (ctx.hidden.has(require_cartesian.seriesKey(s))) return null;
|
|
189
191
|
const d = polygon(labels.map((_, i) => radiusOf(s.values[i])));
|
|
@@ -197,13 +199,7 @@ function renderRadar(options, ctx) {
|
|
|
197
199
|
const v = s.values[i];
|
|
198
200
|
if (v == null || !Number.isFinite(v)) return null;
|
|
199
201
|
const [x, y] = at(i, scale(v));
|
|
200
|
-
return
|
|
201
|
-
key: require_cartesian.labelKey(label),
|
|
202
|
-
class: "tc-point",
|
|
203
|
-
cx: require_layout.round(x),
|
|
204
|
-
cy: require_layout.round(y),
|
|
205
|
-
r: pointRadius
|
|
206
|
-
});
|
|
202
|
+
return require_cartesian.pointMark(shape, index, require_cartesian.labelKey(label), "tc-point", require_layout.round(x), require_layout.round(y), pointRadius);
|
|
207
203
|
})));
|
|
208
204
|
});
|
|
209
205
|
const spokeLabels = require_vnode.h("g", {
|
|
@@ -242,16 +238,19 @@ function renderRadar(options, ctx) {
|
|
|
242
238
|
y: require_layout.round(cy - tick.position),
|
|
243
239
|
dy: "0.35em"
|
|
244
240
|
}, tick.label)));
|
|
245
|
-
return
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
241
|
+
return {
|
|
242
|
+
content: [
|
|
243
|
+
grid,
|
|
244
|
+
require_vnode.h("g", {
|
|
245
|
+
key: "series",
|
|
246
|
+
class: "tc-series-list tc-radar-series",
|
|
247
|
+
style: `transform-origin:${require_layout.round(cx)}px ${require_layout.round(cy)}px`
|
|
248
|
+
}, groups),
|
|
249
|
+
spokeLabels,
|
|
250
|
+
valueLabels
|
|
251
|
+
],
|
|
252
|
+
interaction
|
|
253
|
+
};
|
|
255
254
|
}
|
|
256
255
|
/**
|
|
257
256
|
* Radar (spider) chart: one spoke per label, the values of each series
|
|
@@ -286,4 +285,4 @@ Object.defineProperty(exports, "radar", {
|
|
|
286
285
|
}
|
|
287
286
|
});
|
|
288
287
|
|
|
289
|
-
//# sourceMappingURL=radar-
|
|
288
|
+
//# sourceMappingURL=radar-DjISDnSf.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radar-DjISDnSf.cjs","names":["estimateTextWidth","LINE_HEIGHT","resolveLabels","seriesKey","formatDetail","insets","innerRect","tickCount","domainOf","linear","linearTicks","round","labelKey","h","markerShape","seriesAttrs","pointMark","cleanData","cleanSeries","seriesLegend","seriesTable"],"sources":["../src/charts/radar.ts"],"sourcesContent":["import type { ChartType, RenderContext, RenderResult } from '../chart.ts'\nimport { linearTicks } from '../components/axis.ts'\nimport { formatDetail, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport {\n estimateTextWidth,\n type InsetsInput,\n innerRect,\n insets,\n LINE_HEIGHT,\n round,\n} from '../layout.ts'\nimport { linear } from '../scales/linear.ts'\nimport { h } from '../vnode.ts'\nimport {\n type CartesianData,\n domainOf,\n type Label,\n labelKey,\n markerShape,\n pointMark,\n resolveLabels,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n tickCount,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\n\n/** Options for the radial value axis. */\nexport interface RadialAxisOptions {\n /** Render the value labels along the first spoke. Defaults to `true`. */\n show?: boolean\n /** Value at the center. Defaults to `0` (or the data minimum when it is negative). */\n min?: number\n /** Value at the outer ring. Defaults to the niced data maximum. */\n max?: number\n /** Extend the domain to round values. Defaults to `true`. */\n nice?: boolean\n /** Approximate number of rings. Defaults to one per ~40px of radius. */\n ticks?: number\n format?: NumberFormat\n}\n\nexport interface RadarOptions {\n /** One spoke per label, one polygon per series. */\n data: CartesianData\n /** The radial value axis. */\n r?: RadialAxisOptions\n /** Format of the spoke labels (axis, tooltips and the table). */\n format?: (label: Label, index: number) => string\n /** Shape of the rings. Defaults to `'polygon'`. */\n grid?: 'polygon' | 'circle'\n /** Fill each polygon. Defaults to `true`. */\n fill?: boolean\n /** Draw a dot on every value. Defaults to `false`. */\n points?: boolean\n /** Dot radius in pixels. Defaults to `4`. */\n pointRadius?: number\n /**\n * Widest spoke label, in pixels: a longer one wraps at its spaces onto up\n * to three lines. Defaults to a quarter of the chart's width.\n */\n labelWidth?: number\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** Space between the outer ring and the spoke labels. */\nconst LABEL_GAP = 8\n/** Pixels around the outer ring that still count as hovering it. */\nconst HOVER_SLOP = 8\n\n/** Smallest radius, as a share of the space, however long the labels. */\nconst MIN_RADIUS = 0.5\n/** Most lines a wrapped spoke label takes. */\nconst MAX_LINES = 3\n\n/** `text`, cut short with an ellipsis to fit `width` pixels. */\nfunction truncate(text: string, width: number, fontSize: number): string {\n if (estimateTextWidth(text, fontSize) <= width) return text\n let end = text.length\n while (end > 0 && estimateTextWidth(`${text.slice(0, end)}…`, fontSize) > width) end--\n return end > 0 ? `${text.slice(0, end).trimEnd()}…` : ''\n}\n\n/**\n * `text` split at its spaces into lines no wider than `width` pixels (a word\n * wider than that gets a line of its own), at most `MAX_LINES` of them: what\n * is left joins the last line.\n */\nfunction wrap(text: string, width: number, fontSize: number): string[] {\n const lines: string[] = []\n let line = ''\n for (const word of text.split(' ')) {\n const next = line ? `${line} ${word}` : word\n if (!line || estimateTextWidth(next, fontSize) <= width) line = next\n else {\n lines.push(line)\n line = word\n }\n }\n lines.push(line)\n if (lines.length > MAX_LINES)\n lines.splice(MAX_LINES - 1, lines.length, lines.slice(MAX_LINES - 1).join(' '))\n return lines\n}\n\n/** Text anchor of a spoke label on the side its spoke points to. */\nconst side = (sin: number): -1 | 0 | 1 => (sin > 0.1 ? 1 : sin < -0.1 ? -1 : 0)\n\n/**\n * The largest radius at which every spoke label still fits in `area`:\n * labels sit beyond the outer ring, on the side their spoke points to.\n */\nfunction fitRadius(\n area: { width: number; height: number },\n angles: readonly number[],\n labels: readonly (readonly string[])[],\n fontSize: number,\n): number {\n let radius = Math.min(area.width, area.height) / 2\n angles.forEach((angle, i) => {\n const sin = Math.sin(angle)\n const cos = Math.cos(angle)\n const lines = labels[i] ?? []\n const w = Math.max(0, ...lines.map((line) => estimateTextWidth(line, fontSize)))\n const height = blockHeight(lines.length, fontSize)\n const s = side(sin)\n // Horizontal: the label runs outwards from the spoke end (or is centered on it).\n const across = s === 0 ? w / 2 : w + LABEL_GAP\n if (Math.abs(sin) > 1e-6) radius = Math.min(radius, (area.width / 2 - across) / Math.abs(sin))\n // Vertical: the lines of text above the top spokes, below the bottom ones,\n // centered on the ones at the sides.\n if (Math.abs(cos) > 1e-6) {\n const along = (s === 0 ? height + LABEL_GAP : height / 2) / Math.abs(cos)\n radius = Math.min(radius, area.height / 2 / Math.abs(cos) - along)\n }\n })\n return Math.max(0, radius)\n}\n\n/** Height of `lines` lines of text, in pixels. */\nconst blockHeight = (lines: number, fontSize: number) =>\n fontSize * (1 + Math.max(0, lines - 1) * LINE_HEIGHT)\n\nfunction renderRadar(options: RadarOptions, ctx: RenderContext): RenderResult {\n const { width, height, fontSize, locale } = ctx\n const axis = options.r ?? {}\n const { fill = true, points = false, pointRadius = 4 } = options\n const series = options.data.series\n const labels = resolveLabels(options.data)\n const n = labels.length\n const visible = series.filter((s) => !ctx.hidden.has(seriesKey(s)))\n const formatLabel = options.format ?? ((label: Label) => String(label))\n const formatValue = formatDetail(axis.format, locale)\n\n const pad = insets(options.padding)\n const area = innerRect(width, height, {\n top: pad.top + LABEL_GAP,\n right: pad.right + LABEL_GAP,\n bottom: pad.bottom + LABEL_GAP,\n left: pad.left + LABEL_GAP,\n })\n const cx = area.x + area.width / 2\n const cy = area.y + area.height / 2\n const angles = labels.map((_, i) => (i / Math.max(1, n)) * Math.PI * 2)\n const texts = labels.map((label, i) => formatLabel(label, i))\n // Long labels wrap onto a few lines, then the radius fits them, but never\n // shrinks below a share of the space: lines that still do not fit are cut\n // short (the tooltip and the table keep the labels whole).\n const labelWidth = options.labelWidth ?? area.width / 4\n const wrapped = texts.map((text) => wrap(text, labelWidth, fontSize))\n const radius = Math.max(\n fitRadius(area, angles, wrapped, fontSize),\n (Math.min(area.width, area.height) / 2) * MIN_RADIUS,\n )\n const shown = wrapped.map((lines, i) => {\n const sin = Math.sin(angles[i] as number)\n const room = side(sin) === 0 ? area.width : area.width / 2 - radius * Math.abs(sin) - LABEL_GAP\n return lines.map((line) => truncate(line, room, fontSize))\n })\n\n const count = tickCount(axis, Math.max(2, Math.round(radius / 40)))\n const values = visible.flatMap((s) => s.values)\n const domain = domainOf(values, axis, true, count)\n const scale = linear(domain, [0, radius], { clamp: true })\n const ticks = linearTicks(scale, { count, format: axis.format, locale })\n\n /** Point at `r` pixels from the center along spoke `i`. */\n const at = (i: number, r: number): [number, number] => [\n cx + r * Math.sin(angles[i] as number),\n cy - r * Math.cos(angles[i] as number),\n ]\n /** A closed path through one radius per spoke (the same commands for any values). */\n const polygon = (radii: readonly number[]) =>\n `${radii.map((r, i) => `${i ? 'L' : 'M'}${at(i, r).map(round).join(',')}`).join('')}Z`\n const ring = (r: number) =>\n options.grid === 'circle'\n ? `M${round(cx)},${round(cy - r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy + r)}A${round(r)},${round(r)},0,1,1,${round(cx)},${round(cy - r)}Z`\n : polygon(labels.map(() => r))\n /** Pixel radius of a value; missing values sit at the center. */\n const radiusOf = (v: number | null | undefined) =>\n v != null && Number.isFinite(v) ? scale(v) : 0\n\n const hitAt = (index: number): Hit => {\n const items: HitItem[] = []\n series.forEach((s, seriesIndex) => {\n if (ctx.hidden.has(seriesKey(s))) return\n const raw = s.values[index]\n const value = raw != null && Number.isFinite(raw) ? raw : null\n const [x, y] = at(index, radiusOf(value))\n const item: HitItem = {\n name: s.name,\n seriesIndex,\n value,\n text: value === null ? '–' : formatValue(value),\n x,\n y: value === null ? null : y,\n }\n if (s.color) item.color = s.color\n items.push(item)\n })\n const [x2, y2] = at(index, radius)\n return {\n index,\n label: labelKey(labels[index] as Label),\n title: texts[index] as string,\n x: x2,\n area: { x: cx - radius, y: cy - radius, width: radius * 2, height: radius * 2 },\n items,\n highlight: { kind: 'spoke', x1: cx, y1: cy, x2, y2 },\n }\n }\n\n const interaction: Interaction = {\n count: n,\n hitTest(px, py) {\n if (n === 0 || Math.hypot(px - cx, py - cy) > radius + HOVER_SLOP) return null\n // The nearest spoke by angle, clockwise from 12 o'clock.\n const angle = Math.atan2(px - cx, cy - py)\n const turn = (angle < 0 ? angle + Math.PI * 2 : angle) / (Math.PI * 2)\n return hitAt(Math.round(turn * n) % n)\n },\n hitIndex(index, seriesIndex) {\n if (index < 0 || index >= n) return null\n const hit = hitAt(index)\n if (seriesIndex !== undefined && hit.items.some((item) => item.seriesIndex === seriesIndex)) {\n hit.seriesIndex = seriesIndex\n }\n return hit\n },\n }\n\n const grid = h(\n 'g',\n { key: 'grid', class: 'tc-radar-grid', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h('path', { key: tick.value, class: 'tc-radar-ring', d: ring(tick.position) }),\n ),\n labels.map((label, i) => {\n const [x2, y2] = at(i, radius)\n return h('line', {\n key: labelKey(label),\n class: 'tc-radar-spoke',\n x1: round(cx),\n y1: round(cy),\n x2: round(x2),\n y2: round(y2),\n })\n }),\n )\n\n const shape = markerShape(options)\n const groups = series.map((s, index) => {\n if (ctx.hidden.has(seriesKey(s))) return null\n const d = polygon(labels.map((_, i) => radiusOf(s.values[i])))\n return h(\n 'g',\n seriesAttrs(s, index),\n fill && h('path', { class: 'tc-area', d }),\n h('path', { class: 'tc-line', d }),\n points &&\n h(\n 'g',\n { class: 'tc-points' },\n labels.map((label, i) => {\n const v = s.values[i]\n if (v == null || !Number.isFinite(v)) return null\n const [x, y] = at(i, scale(v))\n return pointMark(\n shape,\n index,\n labelKey(label),\n 'tc-point',\n round(x),\n round(y),\n pointRadius,\n )\n }),\n ),\n )\n })\n\n const spokeLabels = h(\n 'g',\n { key: 'labels', class: 'tc-radar-labels', 'aria-hidden': 'true' },\n labels.map((label, i) => {\n const angle = angles[i] as number\n const s = side(Math.sin(angle))\n const cos = Math.cos(angle)\n const [x, y] = at(i, radius + LABEL_GAP)\n const [first = '', ...rest] = shown[i] ?? []\n // Above the top spokes, below the bottom ones, centered on the sides:\n // the first line moves up to leave room for the ones under it.\n const up = rest.length * LINE_HEIGHT\n const dy = s !== 0 ? `${round(0.35 - up / 2)}em` : cos > 0 ? `${round(-up)}em` : '0.71em'\n return h(\n 'text',\n {\n key: labelKey(label),\n class: 'tc-tick-label tc-radar-label',\n x: round(x),\n y: round(y),\n 'text-anchor': s > 0 ? 'start' : s < 0 ? 'end' : 'middle',\n dy,\n },\n first,\n rest.map((line, j) => h('tspan', { key: j, x: round(x), dy: `${LINE_HEIGHT}em` }, line)),\n )\n }),\n )\n\n const valueLabels =\n axis.show !== false &&\n h(\n 'g',\n { key: 'values', class: 'tc-radar-values', 'aria-hidden': 'true' },\n ticks\n .filter((tick) => tick.position > 0)\n .map((tick) =>\n h(\n 'text',\n {\n key: tick.value,\n class: 'tc-tick-label tc-radar-value',\n x: round(cx + 4),\n y: round(cy - tick.position),\n dy: '0.35em',\n },\n tick.label,\n ),\n ),\n )\n\n const content = [\n grid,\n // Series grow from the center: the transform origin is set here, in pixels.\n h(\n 'g',\n {\n key: 'series',\n class: 'tc-series-list tc-radar-series',\n style: `transform-origin:${round(cx)}px ${round(cy)}px`,\n },\n groups,\n ),\n spokeLabels,\n valueLabels,\n ]\n return { content, interaction }\n}\n\n/**\n * Radar (spider) chart: one spoke per label, the values of each series\n * joined into a polygon around the center. Good for comparing a few series\n * over the same handful of measures.\n *\n * ```ts\n * new Chart('#el', {\n * type: radar,\n * data: {\n * labels: ['Speed', 'Range', 'Comfort', 'Price', 'Safety'],\n * series: [{ name: 'Model A', values: [80, 60, 70, 40, 90] }],\n * },\n * })\n * ```\n */\nexport const radar: ChartType<RadarOptions> = {\n name: 'radar',\n clean: cleanData(cleanSeries),\n render: renderRadar,\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) =>\n seriesTable(\n {\n data: options.data,\n ...(options.r?.format ? { y: { format: options.r.format } } : {}),\n ...(options.format ? { x: { format: options.format } } : {}),\n },\n ctx,\n limit,\n ),\n}\n"],"mappings":";;;;;;;;AAsEA,MAAM,YAAY;;AAElB,MAAM,aAAa;;AAGnB,MAAM,aAAa;;AAEnB,MAAM,YAAY;;AAGlB,SAAS,SAAS,MAAc,OAAe,UAA0B;CACvE,IAAIA,eAAAA,kBAAkB,MAAM,QAAQ,KAAK,OAAO,OAAO;CACvD,IAAI,MAAM,KAAK;CACf,OAAO,MAAM,KAAKA,eAAAA,kBAAkB,GAAG,KAAK,MAAM,GAAG,GAAG,EAAE,IAAI,QAAQ,IAAI,OAAO;CACjF,OAAO,MAAM,IAAI,GAAG,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK;AACxD;;;;;;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F;AACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as CartesianData, ct as Label, o as ChartType } from "./chart-CYrrUCi3.js";
|
|
2
2
|
import { c as NumberFormat } from "./time-DRIDgv2a.js";
|
|
3
3
|
import { a as InsetsInput } from "./annotations-B02GR_KU.js";
|
|
4
4
|
/** Options for the radial value axis. */
|
package/dist/radar.cjs
CHANGED
package/dist/radar.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Standalone entry: `import { radar } from '@tabler/charts/radar'`. */
|
|
2
|
-
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-
|
|
2
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-7I6hsY_h.cjs";
|
|
3
3
|
export { type RadarOptions, type RadialAxisOptions, radar };
|
package/dist/radar.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Standalone entry: `import { radar } from '@tabler/charts/radar'`. */
|
|
2
|
-
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-
|
|
2
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-vLxilcr4.js";
|
|
3
3
|
export { type RadarOptions, type RadialAxisOptions, radar };
|
package/dist/radar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as radar } from "./radar-
|
|
1
|
+
export { t as radar } from "./radar-D6XqkFWQ.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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rect-
|
|
1
|
+
{"version":3,"file":"rect-CZTNvMlf.js","names":[],"sources":["../src/shapes/rect.ts"],"sourcesContent":["import { round } from '../layout.ts'\n\n/** A rounded rectangle as path data (the hover ring of a cell or a tile). */\nexport function rectPath(x: number, y: number, w: number, hgt: number, r: number): string {\n const rr = Math.max(0, Math.min(r, w / 2, hgt / 2))\n const n = round\n return (\n `M${n(x + rr)},${n(y)}H${n(x + w - rr)}A${n(rr)},${n(rr)},0,0,1,${n(x + w)},${n(y + rr)}` +\n `V${n(y + hgt - rr)}A${n(rr)},${n(rr)},0,0,1,${n(x + w - rr)},${n(y + hgt)}` +\n `H${n(x + rr)}A${n(rr)},${n(rr)},0,0,1,${n(x)},${n(y + hgt - rr)}` +\n `V${n(y + rr)}A${n(rr)},${n(rr)},0,0,1,${n(x + rr)},${n(y)}Z`\n )\n}\n"],"mappings":";;;AAGA,SAAgB,SAAS,GAAW,GAAW,GAAW,KAAa,GAAmB;CACxF,MAAM,KAAK,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;CAClD,MAAM,IAAI;CACV,OACE,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAA,GAClF,EAAE,IAAI,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,GAAG,EAAA,GACrE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,MAAM,EAAE,EAAA,GAC3D,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;AAE/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_layout = require("./layout-
|
|
1
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
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) {
|
|
@@ -13,4 +13,4 @@ Object.defineProperty(exports, "rectPath", {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
//# sourceMappingURL=rect-
|
|
16
|
+
//# sourceMappingURL=rect-DPr9QRxl.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rect-
|
|
1
|
+
{"version":3,"file":"rect-DPr9QRxl.cjs","names":["round"],"sources":["../src/shapes/rect.ts"],"sourcesContent":["import { round } from '../layout.ts'\n\n/** A rounded rectangle as path data (the hover ring of a cell or a tile). */\nexport function rectPath(x: number, y: number, w: number, hgt: number, r: number): string {\n const rr = Math.max(0, Math.min(r, w / 2, hgt / 2))\n const n = round\n return (\n `M${n(x + rr)},${n(y)}H${n(x + w - rr)}A${n(rr)},${n(rr)},0,0,1,${n(x + w)},${n(y + rr)}` +\n `V${n(y + hgt - rr)}A${n(rr)},${n(rr)},0,0,1,${n(x + w - rr)},${n(y + hgt)}` +\n `H${n(x + rr)}A${n(rr)},${n(rr)},0,0,1,${n(x)},${n(y + hgt - rr)}` +\n `V${n(y + rr)}A${n(rr)},${n(rr)},0,0,1,${n(x + rr)},${n(y)}Z`\n )\n}\n"],"mappings":";;;AAGA,SAAgB,SAAS,GAAW,GAAW,GAAW,KAAa,GAAmB;CACxF,MAAM,KAAK,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;CAClD,MAAM,IAAIA,eAAAA;CACV,OACE,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAA,GAClF,EAAE,IAAI,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,GAAG,EAAA,GACrE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,MAAM,EAAE,EAAA,GAC3D,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;AAE/D"}
|