@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
package/dist/core.d.cts
CHANGED
|
@@ -3,21 +3,24 @@ import { c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPreci
|
|
|
3
3
|
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-CNKvdnTC.cjs";
|
|
4
4
|
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-YeUiOfG8.cjs";
|
|
5
5
|
import { a as InsetsInput, c as estimateTextWidth, i as Insets, l as innerRect, o as LINE_HEIGHT, s as Rect, t as Annotation, u as insets } from "./annotations-CHafaGd4.cjs";
|
|
6
|
-
import {
|
|
6
|
+
import { A as download, At as describeHit, B as features, C as TooltipPlacement, Ct as Tick, D as DownloadFormat, Dt as linearTicks, E as tooltipContent, Et as bandTicks, Ft as HitTester, G as padAngleForGap, H as ArcOptions, It as Interaction, M as BeforeRenderState, Mt as Highlight, N as ChartPlugin, Nt as Hit, O as DownloadMenuOptions, Ot as thinTicks, P as PluginInstance, Pt as HitItem, R as Features, S as TooltipOptions, St as LinearTicksOptions, T as placeTooltip, Tt as axisSize, U as arcCentroid, V as register, W as arcPathStable, _ as chartToString, _t as seriesKey, a as ChartEvents, at as LegendItem, b as resolveLegend, bt as AxisOptions, c as RenderContext, ct as legendContent, d as Size, dt as CategoryAxisOptions, f as TableContext, ft as Label, g as chartModel, gt as domainOf, h as chartLabel, ht as categoryInteraction, i as ChartConfig, j as AfterRenderState, jt as tableContent, k as DownloadOption, kt as DataTable, l as RenderResult, lt as CartesianData, m as chartEvents, mt as ValueAxisOptions, n as BuiltChart, o as ChartType, ot as LegendOptions, p as buildChart, pt as Series, r as Chart, s as ContextOptions, st as defaultHidden, t as BaseOptions, u as ResolvedLegend, ut as CartesianOptions, v as renderChart, vt as seriesLegend, w as hitAnchor, wt as axis, x as resolveSize, xt as AxisPosition, y as renderContext, yt as seriesTable, z as feature } from "./chart-CbPzP5Dp.cjs";
|
|
7
7
|
import { a as ClassValue, c as StyleValue, d as normalizeClass, f as normalizeStyle, i as ChildInput, l as VNode, n as Attrs, o as Key, r as Child, s as Props, t as AttrValue, u as h } from "./vnode-Du2cC8Fm.cjs";
|
|
8
|
-
import { n as line, t as LineOptions } from "./line-
|
|
9
|
-
import { n as area, t as AreaOptions } from "./area-
|
|
10
|
-
import { n as bar, t as BarOptions } from "./bar-
|
|
11
|
-
import { n as
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as
|
|
14
|
-
import { n as
|
|
15
|
-
import { n as
|
|
16
|
-
import { i as
|
|
17
|
-
import { n as
|
|
18
|
-
import {
|
|
19
|
-
import { i as
|
|
20
|
-
import { n as
|
|
21
|
-
import { n as
|
|
22
|
-
import {
|
|
23
|
-
|
|
8
|
+
import { n as line, t as LineOptions } from "./line-vyWO030v.cjs";
|
|
9
|
+
import { n as area, t as AreaOptions } from "./area-h_FvieFb.cjs";
|
|
10
|
+
import { n as bar, t as BarOptions } from "./bar-DZCQ-kyf.cjs";
|
|
11
|
+
import { a as calendar, i as CalendarSeries, n as CalendarEntry, r as CalendarOptions, t as CalendarData } from "./calendar-BSvO8nRb.cjs";
|
|
12
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-BcomxeVG.cjs";
|
|
13
|
+
import { n as FunnelStage, r as funnel, t as FunnelOptions } from "./funnel-CarOh8w_.cjs";
|
|
14
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-Ds9k1UV2.cjs";
|
|
15
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-CJ-0dfhJ.cjs";
|
|
16
|
+
import { a as MapOptions, c as map, i as MapMarker, l as MapLayout, n as MapHit, o as MapRegion, r as MapLine, s as addMap, t as MapData, u as MapView } from "./map-49FcfdmJ.cjs";
|
|
17
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-C7V8UJj1.cjs";
|
|
18
|
+
import { n as PercentageBarSegment, r as percentageBar, t as PercentageBarOptions } from "./percentage-bar-R1--2grK.cjs";
|
|
19
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-vD5-g8je.cjs";
|
|
20
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-7I6hsY_h.cjs";
|
|
21
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-DqiuxUx7.cjs";
|
|
22
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-DL0zAV09.cjs";
|
|
23
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-RYly7bR0.cjs";
|
|
24
|
+
import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-25vHO_UK.cjs";
|
|
25
|
+
import { C as keyboard, D as GridOptions, E as hoverUnderlay, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-9BnLEW4K.cjs";
|
|
26
|
+
export { type AfterRenderState, type Annotation, type ArcOptions, type AreaOptions, type AttrValue, type Attrs, type AxisOptions, type AxisPosition, type BandKey, type BandScale, type BandScaleOptions, type BarOptions, type BaseOptions, type BeforeRenderState, type BuiltChart, type CalendarData, type CalendarEntry, type CalendarOptions, type CalendarSeries, type Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, Chart, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type ContextOptions, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type Features, type FunnelOptions, type FunnelStage, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Highlight, type Hit, type HitItem, type HitTester, type Insets, type InsetsInput, type Interaction, type Key, LINE_HEIGHT, type Label, type LegendItem, type LegendOptions, type LineOptions, type LinearScale, type LinearScaleOptions, type LinearTicksOptions, type Locale, type MapData, type MapHit, type MapLayout, type MapLine, type MapMarker, type MapOptions, type MapRegion, type MapView, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PercentageBarOptions, type PercentageBarSegment, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, type RenderResult, type RenderToStringOptions, type ResolvedLegend, type SankeyData, type SankeyLink, type SankeyNode, type SankeyOptions, type ScatterOptions, type ScatterPoint, type ScatterSeries, type Series, type Size, type SparklineOptions, type StyleValue, type TableContext, type Tick, type TooltipOptions, type TooltipPlacement, type TreemapNode, type TreemapOptions, VERSION, type VNode, type ValueAxisOptions, addMap, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, calendar, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartModel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, funnel, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, map, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderChart, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { a as InsetsInput, c as estimateTextWidth, i as Insets, l as innerRect, o as LINE_HEIGHT, s as Rect, t as Annotation, u as insets } from "./annotations-B02GR_KU.js";
|
|
2
2
|
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-CNKvdnTC.js";
|
|
3
3
|
import { a as ClassValue, c as StyleValue, d as normalizeClass, f as normalizeStyle, i as ChildInput, l as VNode, n as Attrs, o as Key, r as Child, s as Props, t as AttrValue, u as h } from "./vnode-Du2cC8Fm.js";
|
|
4
|
-
import {
|
|
4
|
+
import { A as download, At as HitItem, B as features, C as TooltipPlacement, Ct as linearTicks, D as DownloadFormat, Dt as tableContent, E as tooltipContent, Et as describeHit, M as BeforeRenderState, Mt as Interaction, N as ChartPlugin, O as DownloadMenuOptions, Ot as Highlight, P as PluginInstance, R as Features, S as TooltipOptions, St as bandTicks, T as placeTooltip, Tt as DataTable, V as register, _ as chartToString, _t as AxisPosition, a as ChartEvents, at as CartesianData, b as resolveLegend, bt as axis, c as RenderContext, ct as Label, d as Size, dt as categoryInteraction, f as TableContext, ft as domainOf, g as chartModel, gt as AxisOptions, h as chartLabel, ht as seriesTable, i as ChartConfig, it as legendContent, j as AfterRenderState, jt as HitTester, k as DownloadOption, kt as Hit, l as RenderResult, lt as Series, m as chartEvents, mt as seriesLegend, n as BuiltChart, nt as LegendOptions, o as ChartType, ot as CartesianOptions, p as buildChart, pt as seriesKey, r as Chart, rt as defaultHidden, s as ContextOptions, st as CategoryAxisOptions, t as BaseOptions, tt as LegendItem, u as ResolvedLegend, ut as ValueAxisOptions, v as renderChart, vt as LinearTicksOptions, w as hitAnchor, wt as thinTicks, x as resolveSize, xt as axisSize, y as renderContext, yt as Tick, z as feature } from "./chart-CYrrUCi3.js";
|
|
5
5
|
import { c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, l as NumberFormatOptions, m as getDateFormat, o as DateFormat, p as formatTicks, s as Locale, u as formatDate } from "./time-DRIDgv2a.js";
|
|
6
6
|
import { a as linear, i as LinearScaleOptions, r as LinearScale } from "./log-CI41TmcU.js";
|
|
7
|
-
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-
|
|
7
|
+
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-C3qEppSm.js";
|
|
8
8
|
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-YeUiOfG8.js";
|
|
9
|
-
import { n as line, t as LineOptions } from "./line-
|
|
10
|
-
import { n as area, t as AreaOptions } from "./area-
|
|
11
|
-
import { n as bar, t as BarOptions } from "./bar-
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as
|
|
14
|
-
import { n as
|
|
15
|
-
import { n as
|
|
16
|
-
import { n as
|
|
17
|
-
import { i as
|
|
18
|
-
import { n as
|
|
19
|
-
import {
|
|
20
|
-
import { i as
|
|
21
|
-
import { n as
|
|
22
|
-
import { n as
|
|
23
|
-
|
|
9
|
+
import { n as line, t as LineOptions } from "./line-Bpr5uVLQ.js";
|
|
10
|
+
import { n as area, t as AreaOptions } from "./area-DEFQm_SQ.js";
|
|
11
|
+
import { n as bar, t as BarOptions } from "./bar-D9B_arKf.js";
|
|
12
|
+
import { a as calendar, i as CalendarSeries, n as CalendarEntry, r as CalendarOptions, t as CalendarData } from "./calendar-Bq3vFzPl.js";
|
|
13
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-B3WcLzph.js";
|
|
14
|
+
import { n as FunnelStage, r as funnel, t as FunnelOptions } from "./funnel-BdcfUkb5.js";
|
|
15
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-Zy25jfps.js";
|
|
16
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-Jp5sHRTo.js";
|
|
17
|
+
import { a as MapOptions, c as map, i as MapMarker, l as MapLayout, n as MapHit, o as MapRegion, r as MapLine, s as addMap, t as MapData, u as MapView } from "./map-BMC61J-P.js";
|
|
18
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-Cz9n_DoK.js";
|
|
19
|
+
import { n as PercentageBarSegment, r as percentageBar, t as PercentageBarOptions } from "./percentage-bar-cSeiLdwU.js";
|
|
20
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-BQQkvy1N.js";
|
|
21
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-vLxilcr4.js";
|
|
22
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-7As41Fo4.js";
|
|
23
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-BXkXGgM_.js";
|
|
24
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-BElUSd0r.js";
|
|
25
|
+
import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-BCXUbixd.js";
|
|
26
|
+
export { type AfterRenderState, type Annotation, type ArcOptions, type AreaOptions, type AttrValue, type Attrs, type AxisOptions, type AxisPosition, type BandKey, type BandScale, type BandScaleOptions, type BarOptions, type BaseOptions, type BeforeRenderState, type BuiltChart, type CalendarData, type CalendarEntry, type CalendarOptions, type CalendarSeries, type Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, Chart, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type ContextOptions, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type Features, type FunnelOptions, type FunnelStage, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Highlight, type Hit, type HitItem, type HitTester, type Insets, type InsetsInput, type Interaction, type Key, LINE_HEIGHT, type Label, type LegendItem, type LegendOptions, type LineOptions, type LinearScale, type LinearScaleOptions, type LinearTicksOptions, type Locale, type MapData, type MapHit, type MapLayout, type MapLine, type MapMarker, type MapOptions, type MapRegion, type MapView, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PercentageBarOptions, type PercentageBarSegment, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, type RenderResult, type RenderToStringOptions, type ResolvedLegend, type SankeyData, type SankeyLink, type SankeyNode, type SankeyOptions, type ScatterOptions, type ScatterPoint, type ScatterSeries, type Series, type Size, type SparklineOptions, type StyleValue, type TableContext, type Tick, type TooltipOptions, type TooltipPlacement, type TreemapNode, type TreemapOptions, VERSION, type VNode, type ValueAxisOptions, addMap, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, calendar, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartModel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, funnel, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, map, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderChart, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap };
|
package/dist/core.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-
|
|
1
|
+
import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-DqAte3H8.js";
|
|
2
2
|
import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-_EMUqysL.js";
|
|
3
3
|
import { a as getDateFormat, i as formatTicks, n as formatDetail, o as getNumberFormat, r as formatNumber, s as stepPrecision, t as formatDate } from "./format-it1kepFG.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { a as bandTicks, c as niceDomain, d as ticks, l as tickIncrement, n as axisSize, o as linearTicks, s as thinTicks, t as axis, u as tickStep } from "./axis-MMaVoSWB.js";
|
|
5
|
+
import { C as linear, E as grid, T as point, _ as seriesTable, h as seriesLegend, m as seriesKey, n as categoryInteraction, r as domainOf, w as band } from "./cartesian-BrPqb5Qn.js";
|
|
6
|
+
import { i as register, n as feature, r as features } from "./features-B55rwpQC.js";
|
|
6
7
|
import { t as extent } from "./extent-DOV8rs-6.js";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { a as render } from "./dom-
|
|
9
|
-
import { n as areaPath, r as linePath } from "./fade-
|
|
10
|
-
import { _ as download, a as placeTooltip, c as sync, d as describeHit, f as tableContent, g as hoverUnderlay, h as hoverOverlay, i as hitAnchor, l as legend, m as pointer, n as defaultPlugins, o as tooltipContent, p as highlight, r as tooltip, s as dataTable, t as VERSION, u as keyboard } from "./core-
|
|
11
|
-
import { t as line } from "./line-
|
|
12
|
-
import { t as area } from "./area-
|
|
13
|
-
import { n as hbarPath, t as barPath } from "./bar-
|
|
14
|
-
import { t as bar } from "./bar-
|
|
15
|
-
import { t as
|
|
8
|
+
import { _ as escapeText, a as chartModel, b as legendContent, c as renderContext, d as cancel, f as flush, g as escapeAttr, h as schedule, i as chartLabel, l as resolveLegend, n as buildChart, o as chartToString, r as chartEvents, s as renderChart, t as Chart, u as resolveSize, v as renderToString, y as defaultHidden } from "./chart-B6TTY4Kr.js";
|
|
9
|
+
import { a as render } from "./dom-CTse6Rvd.js";
|
|
10
|
+
import { n as areaPath, r as linePath } from "./fade-CDrQjnDz.js";
|
|
11
|
+
import { _ as download, a as placeTooltip, c as sync, d as describeHit, f as tableContent, g as hoverUnderlay, h as hoverOverlay, i as hitAnchor, l as legend, m as pointer, n as defaultPlugins, o as tooltipContent, p as highlight, r as tooltip, s as dataTable, t as VERSION, u as keyboard } from "./core-CQ0FaJ4G.js";
|
|
12
|
+
import { t as line } from "./line-CxR4tg1Q.js";
|
|
13
|
+
import { t as area } from "./area-WdtfqvhX.js";
|
|
14
|
+
import { n as hbarPath, t as barPath } from "./bar-CgpC2EpX.js";
|
|
15
|
+
import { t as bar } from "./bar-BOcRcArc.js";
|
|
16
|
+
import { t as calendar } from "./calendar-BXgIX5H1.js";
|
|
17
|
+
import { t as candlestick } from "./candlestick-BtT9glp9.js";
|
|
18
|
+
import { t as funnel } from "./funnel-CYCv8cq2.js";
|
|
16
19
|
import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-B3V5IR0w.js";
|
|
17
|
-
import { t as gauge } from "./gauge-
|
|
18
|
-
import { t as heatmap } from "./heatmap-
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import {
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { t as
|
|
27
|
-
|
|
20
|
+
import { t as gauge } from "./gauge-DiTk5aWO.js";
|
|
21
|
+
import { t as heatmap } from "./heatmap-C1v8bwpq.js";
|
|
22
|
+
import { n as map, t as addMap } from "./map-C15NC7kW.js";
|
|
23
|
+
import { t as parliament } from "./parliament-BKN6ikBJ.js";
|
|
24
|
+
import { t as percentageBar } from "./percentage-bar-CaInxrL8.js";
|
|
25
|
+
import { n as pie, t as donut } from "./pie-Bd8wyrtY.js";
|
|
26
|
+
import { t as radar } from "./radar-D6XqkFWQ.js";
|
|
27
|
+
import { t as sankey } from "./sankey-Dp4CuLVe.js";
|
|
28
|
+
import { t as scatter } from "./scatter-DCMAtt5L.js";
|
|
29
|
+
import { t as sparkline } from "./sparkline-NDmq90kP.js";
|
|
30
|
+
import { t as treemap } from "./treemap-C4glsx-g.js";
|
|
31
|
+
export { Chart, LINE_HEIGHT, VERSION, addMap, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, calendar, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartModel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, funnel, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, map, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderChart, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as formatDate } from "./format-it1kepFG.js";
|
|
2
|
-
import {
|
|
2
|
+
import { y as toMs } from "./cartesian-BrPqb5Qn.js";
|
|
3
3
|
// src/charts/dates.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formatter for date labels on a time axis (tooltips, tables, band axes):
|
|
@@ -23,4 +23,4 @@ function dateLabels(labels, utc, locale) {
|
|
|
23
23
|
}
|
|
24
24
|
export { dateLabels as t };
|
|
25
25
|
|
|
26
|
-
//# sourceMappingURL=dates-
|
|
26
|
+
//# sourceMappingURL=dates-DLe2Ww64.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates-
|
|
1
|
+
{"version":3,"file":"dates-DLe2Ww64.js","names":[],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAM,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_format = require("./format-CAE5ruy6.cjs");
|
|
2
|
-
const require_cartesian = require("./cartesian-
|
|
2
|
+
const require_cartesian = require("./cartesian-DRSXHxWe.cjs");
|
|
3
3
|
// src/charts/dates.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formatter for date labels on a time axis (tooltips, tables, band axes):
|
|
@@ -28,4 +28,4 @@ Object.defineProperty(exports, "dateLabels", {
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
//# sourceMappingURL=dates-
|
|
31
|
+
//# sourceMappingURL=dates-DerXTb1J.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates-
|
|
1
|
+
{"version":3,"file":"dates-DerXTb1J.cjs","names":["toMs","formatDate"],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAIA,kBAAAA,KAAK,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAMC,eAAAA,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAASD,kBAAAA,KAAK,KAAK,CAAC,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
|
package/dist/decimate.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_features = require("./features-
|
|
2
|
+
const require_features = require("./features-DEDP5CEQ.cjs");
|
|
3
3
|
const require_decimate = require("./decimate-BS3x8g-f.cjs");
|
|
4
4
|
// src/decimate.ts
|
|
5
5
|
/**
|
package/dist/decimate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_features = require("./features-
|
|
1
|
+
const require_features = require("./features-DEDP5CEQ.cjs");
|
|
2
2
|
// src/render/attrs.ts
|
|
3
3
|
/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */
|
|
4
4
|
const NAME_RE = /^[a-zA-Z_][\w:.-]*$/;
|
|
@@ -58,11 +58,7 @@ function render(container, vnode, replace) {
|
|
|
58
58
|
roots.set(container, el);
|
|
59
59
|
return el;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
if (tag === "svg") return SVG_NS;
|
|
63
|
-
if (parent.namespaceURI === "http://www.w3.org/2000/svg" && parent.localName !== "foreignObject") return SVG_NS;
|
|
64
|
-
return HTML_NS;
|
|
65
|
-
}
|
|
61
|
+
const namespaceFor = (parent, tag) => tag === "svg" ? SVG_NS : childNamespace(parent);
|
|
66
62
|
function childNamespace(el) {
|
|
67
63
|
return el.namespaceURI === "http://www.w3.org/2000/svg" && el.localName !== "foreignObject" ? SVG_NS : HTML_NS;
|
|
68
64
|
}
|
|
@@ -217,4 +213,4 @@ Object.defineProperty(exports, "rendered", {
|
|
|
217
213
|
}
|
|
218
214
|
});
|
|
219
215
|
|
|
220
|
-
//# sourceMappingURL=dom-
|
|
216
|
+
//# sourceMappingURL=dom-C33zvtPo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom-C33zvtPo.cjs","names":["features"],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nconst namespaceFor = (parent: Element, tag: string): string =>\n tag === 'svg' ? SVG_NS : childNamespace(parent)\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;AAiB5D,SAAgB,OACd,WACA,OACA,SACgB;CAChB,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,SAAS,eAAe,YAAY,UAAU,KAAA;CAEpF,IAAI,UAAU,QAAQ,CAAC,WAAW,MAAM,GAAG,GAAG;EAC5C,IAAI,MAAM;GACR,KAAK,OAAO;GACZ,MAA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AAQ;EACnB,IAAI,MACF,UAAU,MAAM,KAAK;OAChB;GACL,OAAO,WAAW,OAAO,IAAI,GAAG,KAAK,KAAA;GACrC,IAAI,CAAC,MAAM;EACb;EACA,IAAI,KAAK,eAAe,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as features } from "./features-
|
|
1
|
+
import { r as features } from "./features-B55rwpQC.js";
|
|
2
2
|
// src/render/attrs.ts
|
|
3
3
|
/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */
|
|
4
4
|
const NAME_RE = /^[a-zA-Z_][\w:.-]*$/;
|
|
@@ -58,11 +58,7 @@ function render(container, vnode, replace) {
|
|
|
58
58
|
roots.set(container, el);
|
|
59
59
|
return el;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
if (tag === "svg") return SVG_NS;
|
|
63
|
-
if (parent.namespaceURI === "http://www.w3.org/2000/svg" && parent.localName !== "foreignObject") return SVG_NS;
|
|
64
|
-
return HTML_NS;
|
|
65
|
-
}
|
|
61
|
+
const namespaceFor = (parent, tag) => tag === "svg" ? SVG_NS : childNamespace(parent);
|
|
66
62
|
function childNamespace(el) {
|
|
67
63
|
return el.namespaceURI === "http://www.w3.org/2000/svg" && el.localName !== "foreignObject" ? SVG_NS : HTML_NS;
|
|
68
64
|
}
|
|
@@ -170,4 +166,4 @@ function patchChildren(parent, next) {
|
|
|
170
166
|
}
|
|
171
167
|
export { render as a, isValidTag as c, patchAttrs as i, childNamespace as n, rendered as o, createNode as r, isValidAttr as s, SVG_NS as t };
|
|
172
168
|
|
|
173
|
-
//# sourceMappingURL=dom-
|
|
169
|
+
//# sourceMappingURL=dom-CTse6Rvd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom-CTse6Rvd.js","names":[],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nconst namespaceFor = (parent: Element, tag: string): string =>\n tag === 'svg' ? SVG_NS : childNamespace(parent)\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;AAiB5D,SAAgB,OACd,WACA,OACA,SACgB;CAChB,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,SAAS,eAAe,YAAY,UAAU,KAAA;CAEpF,IAAI,UAAU,QAAQ,CAAC,WAAW,MAAM,GAAG,GAAG;EAC5C,IAAI,MAAM;GACR,KAAK,OAAO;GACZ,MAAM,OAAO,SAAS;EACxB;EACA,OAAO;CACT;CAEA,IAAI,QAAQ,SAAS,MAAM,KAAK,GAAG;EACjC,aAAa,MAAM,KAAK;EACxB,MAAM,IAAI,WAAW,IAAI;EACzB,OAAO;CACT;CAEA,IAAI,QAAQ,SAAS,UAAU,MAAM,OAAO,aAAa,WAAW,MAAM,GAAG,CAAC,GAAG;EAC/E,MAAM,IAAI,WAAW,IAAI;EACzB,OAAO;CACT;CAEA,MAAM,KAAK,cAAc,OAAO,aAAa,WAAW,MAAM,GAAG,GAAG,UAAU,aAAa;CAC3F,IAAI,MAAM,KAAK,YAAY,EAAE;MACxB,UAAU,YAAY,EAAE;CAC7B,MAAM,IAAI,WAAW,EAAE;CACvB,OAAO;AACT;AAEA,MAAM,gBAAgB,QAAiB,QACrC,QAAQ,QAAQ,SAAS,eAAe,MAAM;AAEhD,SAAgB,eAAe,IAAqB;CAClD,OAAO,GAAG,iBAAA,gCAA2B,GAAG,c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K,QAAQ,KAAK;EACpC,MAAM,QAAQ,KAAK;EACnB,IAAI;EACJ,IAAI,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAA,GAC7C,YAAY,MAAM,IAAI,MAAM,GAAG;OAC1B,IAAI,SAAS,QAAQ,QAC1B,YAAY,QAAQ;EAEtB,IAAI,aAAa,CAAC,KAAK,IAAI,SAAS,KAAK,SAAS,WAAW,KAAK,GAAG;GACnE,QAAQ,KAAK;GACb,KAAK,IAAI,SAAS;GAClB,IAAI,cAAc,QAAQ,SAAS;EACrC;CACF;CAGA,KAAK,MAAM,QAAQ,UACjB,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,OAAO,YAAY,IAAI;CAI9C,MAAM,KAAK,eAAe,MAAM;CAChC,MAAM,MAAM,OAAO;CACnB,IAAI,SAAsB;CAC1B,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,QAAQ,KAAK;EACnB,IAAI,OAAO,QAAQ;EACnB,IAAI,MACF,UAAU,MAAM,KAAK;OAChB;GACL,OAAO,WAAW,OAAO,IAAI,GAAG,KAAK,KAAA;GACrC,IAAI,CAAC,MAAM;EACb;EACA,IAAI,KAAK,eAAe,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_layout = require("./layout-
|
|
1
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
2
2
|
// src/export-chart.ts
|
|
3
3
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
4
4
|
/** Properties copied from the computed style, with the values they can be left out at. */
|
|
@@ -115,13 +115,9 @@ function legendLayer(container) {
|
|
|
115
115
|
label.textContent = name.textContent;
|
|
116
116
|
g.append(dot, label);
|
|
117
117
|
}
|
|
118
|
-
const bottom = legend.getAttribute("data-position") === "bottom";
|
|
119
|
-
const margin = Number.parseFloat(getComputedStyle(legend)[bottom ? "marginTop" : "marginBottom"]) || 0;
|
|
120
118
|
return {
|
|
121
119
|
svg: g,
|
|
122
|
-
|
|
123
|
-
margin,
|
|
124
|
-
bottom
|
|
120
|
+
box
|
|
125
121
|
};
|
|
126
122
|
}
|
|
127
123
|
/**
|
|
@@ -149,18 +145,27 @@ function exportSVG(target, options = {}) {
|
|
|
149
145
|
const chartStyle = getComputedStyle(svg);
|
|
150
146
|
const container = svg.parentElement;
|
|
151
147
|
const legend = options.legend !== false && container ? legendLayer(container) : void 0;
|
|
148
|
+
let totalWidth = width;
|
|
152
149
|
let total = height;
|
|
153
150
|
if (legend) {
|
|
151
|
+
const { box } = legend;
|
|
152
|
+
const at = svg.getBoundingClientRect();
|
|
153
|
+
const left = Math.min(at.left, box.left);
|
|
154
|
+
const top = Math.min(at.top, box.top);
|
|
154
155
|
const wrap = doc.createElementNS(SVG_NS, "g");
|
|
155
156
|
wrap.append(...Array.from(copy.childNodes));
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
const move = (el, x, y) => {
|
|
158
|
+
if (x || y) el.setAttribute("transform", `translate(${require_layout.round(x)} ${require_layout.round(y)})`);
|
|
159
|
+
};
|
|
160
|
+
move(wrap, at.left - left, at.top - top);
|
|
161
|
+
move(legend.svg, box.left - left, box.top - top);
|
|
158
162
|
copy.append(wrap, legend.svg);
|
|
159
|
-
|
|
163
|
+
totalWidth = require_layout.round(Math.max(at.left + width, box.right) - left);
|
|
164
|
+
total = require_layout.round(Math.max(at.top + height, box.bottom) - top);
|
|
160
165
|
}
|
|
161
|
-
copy.setAttribute("width", String(
|
|
166
|
+
copy.setAttribute("width", String(totalWidth));
|
|
162
167
|
copy.setAttribute("height", String(total));
|
|
163
|
-
copy.setAttribute("viewBox", `0 0 ${
|
|
168
|
+
copy.setAttribute("viewBox", `0 0 ${totalWidth} ${total}`);
|
|
164
169
|
const name = svg.getAttribute("aria-label");
|
|
165
170
|
if (name) {
|
|
166
171
|
const title = doc.createElementNS(SVG_NS, "title");
|
|
@@ -245,4 +250,4 @@ Object.defineProperty(exports, "exportSVG", {
|
|
|
245
250
|
}
|
|
246
251
|
});
|
|
247
252
|
|
|
248
|
-
//# sourceMappingURL=export-chart-
|
|
253
|
+
//# sourceMappingURL=export-chart-CPtXmZvi.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-chart-CPtXmZvi.cjs","names":["round"],"sources":["../src/export-chart.ts"],"sourcesContent":["/**\n * Export a rendered chart as a standalone SVG or an image\n * (`exportSVG()`, `exportImage()`, `downloadChart()` of `@tabler/charts/export`).\n *\n * Charts are styled by CSS, so the export copies the computed styles of\n * every mark into the SVG: the file looks the same anywhere, without the\n * stylesheet or the page's custom properties. Browser only.\n *\n * Kept free of side effects, so `@tabler/charts` can re-export the functions\n * without carrying them into every bundle: the `/export` entry registers the\n * `download` menu's saver on top.\n */\nimport type { Chart } from './chart.ts'\nimport { round } from './layout.ts'\n\nconst SVG_NS = 'http://www.w3.org/2000/svg'\n\nexport interface ExportOptions {\n /**\n * Background color, `'auto'` for the chart's surface (`--tc-surface`), or\n * `false` for none (transparent). Defaults to `'auto'`.\n */\n background?: string | false\n /** Draw the legend into the image, as the page shows it. Defaults to `true`. */\n legend?: boolean\n}\n\nexport interface ImageOptions extends ExportOptions {\n /** Image type. Defaults to `'image/png'`. */\n type?: 'image/png' | 'image/jpeg' | 'image/webp'\n /** Pixels per chart pixel. Defaults to `2`. */\n scale?: number\n /** Quality of lossy types, `0…1`. */\n quality?: number\n}\n\nexport interface DownloadOptions extends ImageOptions {\n /** File name without the extension. Defaults to the chart's title, or `chart`. */\n filename?: string\n /** File format. Defaults to `'png'`. */\n format?: 'svg' | 'png' | 'jpeg' | 'webp'\n}\n\n/** A chart, its container, or its root `<svg>`. */\nexport type ExportTarget = Chart<object> | Element\n\n/** Properties copied from the computed style, with the values they can be left out at. */\nconst SHAPE: Record<string, string> = {\n fill: 'rgb(0, 0, 0)',\n 'fill-opacity': '1',\n stroke: 'none',\n 'stroke-width': '1px',\n 'stroke-opacity': '1',\n 'stroke-dasharray': 'none',\n 'stroke-dashoffset': '0px',\n 'stroke-linecap': 'butt',\n 'stroke-linejoin': 'miter',\n 'paint-order': 'normal',\n 'shape-rendering': 'auto',\n 'vector-effect': 'none',\n opacity: '1',\n visibility: 'visible',\n}\nconst TEXT: Record<string, string> = {\n ...SHAPE,\n 'font-family': '',\n 'font-size': '',\n 'font-weight': '400',\n 'font-style': 'normal',\n 'font-variant-numeric': 'normal',\n 'letter-spacing': 'normal',\n}\nconst STOP: Record<string, string> = { 'stop-color': '', 'stop-opacity': '1' }\nconst GROUP: Record<string, string> = { opacity: '1' }\nconst SHAPES = new Set(['path', 'line', 'rect', 'circle', 'ellipse', 'polygon', 'polyline'])\n\nfunction rootOf(target: ExportTarget): SVGSVGElement {\n const el = 'element' in target && !(target instanceof Element) ? target.element : target\n const svg = el.localName === 'svg' ? el : el.querySelector(':scope > svg.tc-chart')\n if (!svg) throw new Error('@tabler/charts: no rendered chart to export.')\n return svg as SVGSVGElement\n}\n\n/** A computed transform as an SVG `transform` attribute, around its origin. */\nfunction transformOf(style: CSSStyleDeclaration): string | undefined {\n const value = style.transform\n if (!value || value === 'none') return undefined\n // Browsers report a matrix; SVG takes the same functions without units.\n const svg = value.replace(/px/g, '')\n if (svg.startsWith('translate')) return svg\n const [ox = 0, oy = 0] = (style.transformOrigin || '0 0').split(' ').map(Number.parseFloat)\n return ox || oy ? `translate(${ox} ${oy}) ${svg} translate(${-ox} ${-oy})` : svg\n}\n\n/** Copy the computed look of `live` onto its clone, recursively. */\nfunction inline(live: Element, copy: Element): boolean {\n const style = getComputedStyle(live)\n if (style.display === 'none') return false\n const tag = live.localName\n const props = tag === 'text' ? TEXT : tag === 'stop' ? STOP : SHAPES.has(tag) ? SHAPE : GROUP\n const declarations: string[] = []\n for (const name in props) {\n const value = style.getPropertyValue(name)\n if (value && value !== props[name]) declarations.push(`${name}:${value}`)\n }\n copy.removeAttribute('style')\n if (declarations.length) copy.setAttribute('style', declarations.join(';'))\n const transform = transformOf(style)\n if (transform) copy.setAttribute('transform', transform)\n\n const liveChildren = Array.from(live.children)\n const copies = Array.from(copy.children)\n liveChildren.forEach((child, i) => {\n const twin = copies[i] as Element\n if (child.classList.contains('tc-hover-layer') || !inline(child, twin)) twin.remove()\n })\n return true\n}\n\n/**\n * The legend as the page lays it out: every entry at its place relative to\n * the legend box, with a swatch (hollow when hidden) and its name.\n */\nfunction legendLayer(container: Element): { svg: Element; box: DOMRect } | undefined {\n const legend = container.querySelector(':scope > .tc-legend')\n const items = legend ? Array.from(legend.querySelectorAll('.tc-legend-item')) : []\n if (!legend || !items.length) return undefined\n const doc = container.ownerDocument\n const patterned = container.querySelector(':scope > svg.tc-patterned')\n const box = legend.getBoundingClientRect()\n const g = doc.createElementNS(SVG_NS, 'g')\n for (const item of items) {\n const swatch = item.querySelector('.tc-legend-swatch')\n const name = item.querySelector('.tc-legend-name')\n if (!swatch || !name) continue\n const s = swatch.getBoundingClientRect()\n const n = name.getBoundingClientRect()\n const color = getComputedStyle(swatch).getPropertyValue('--tc-series-color').trim()\n // A chart that wears its patterns has them in the copied svg: the swatch takes its slot's.\n const slot = /\\btc-series-([1-8])\\b/.exec(item.getAttribute('class') ?? '')?.[1] ?? 'other'\n const fill = patterned\n ? getComputedStyle(patterned).getPropertyValue(`--tc-pattern-${slot}`).trim()\n : ''\n const hidden = item.classList.contains('tc-legend-item-hidden')\n const dot = doc.createElementNS(SVG_NS, 'circle')\n dot.setAttribute('cx', String(round(s.left - box.left + s.width / 2)))\n dot.setAttribute('cy', String(round(s.top - box.top + s.height / 2)))\n dot.setAttribute('r', String(round(s.width / 2 - (hidden ? 0.75 : 0))))\n dot.setAttribute(\n 'style',\n hidden\n ? `fill:none;stroke:${color};stroke-width:1.5px`\n : `fill:${fill.startsWith('url(') ? fill : color}`,\n )\n const text = getComputedStyle(name)\n const label = doc.createElementNS(SVG_NS, 'text')\n label.setAttribute('x', String(round(n.left - box.left)))\n label.setAttribute('y', String(round(n.top - box.top + n.height / 2)))\n label.setAttribute('dy', '0.35em')\n label.setAttribute(\n 'style',\n `fill:${text.color};font-family:${text.fontFamily};font-size:${text.fontSize};font-weight:${text.fontWeight}`,\n )\n label.textContent = name.textContent\n g.append(dot, label)\n }\n return { svg: g, box }\n}\n\n/**\n * The chart as a standalone SVG document: the computed styles are inlined,\n * hover marks left out and running animations finished first.\n *\n * ```ts\n * const svg = exportSVG(chart)\n * ```\n */\nexport function exportSVG(target: ExportTarget, options: ExportOptions = {}): string {\n const svg = rootOf(target)\n // Read the resting state, not a frame in the middle of an entrance or update.\n for (const animation of svg.getAnimations?.({ subtree: true }) ?? []) animation.finish()\n const copy = svg.cloneNode(true) as SVGSVGElement\n inline(svg, copy)\n const doc = svg.ownerDocument\n const width = Number(svg.getAttribute('width'))\n const height = Number(svg.getAttribute('height'))\n copy.setAttribute('xmlns', SVG_NS)\n copy.removeAttribute('class')\n copy.removeAttribute('tabindex')\n copy.removeAttribute('data-resizing')\n copy.removeAttribute('aria-describedby')\n copy.removeAttribute('aria-activedescendant')\n\n const chartStyle = getComputedStyle(svg)\n const container = svg.parentElement\n const legend = options.legend !== false && container ? legendLayer(container) : undefined\n let totalWidth = width\n let total = height\n if (legend) {\n // Chart and legend where the page shows them (above, below or beside),\n // with the gap between them, in one image as large as both.\n const { box } = legend\n const at = svg.getBoundingClientRect()\n const left = Math.min(at.left, box.left)\n const top = Math.min(at.top, box.top)\n const wrap = doc.createElementNS(SVG_NS, 'g')\n wrap.append(...Array.from(copy.childNodes))\n const move = (el: Element, x: number, y: number) => {\n if (x || y) el.setAttribute('transform', `translate(${round(x)} ${round(y)})`)\n }\n move(wrap, at.left - left, at.top - top)\n move(legend.svg, box.left - left, box.top - top)\n copy.append(wrap, legend.svg)\n totalWidth = round(Math.max(at.left + width, box.right) - left)\n total = round(Math.max(at.top + height, box.bottom) - top)\n }\n copy.setAttribute('width', String(totalWidth))\n copy.setAttribute('height', String(total))\n copy.setAttribute('viewBox', `0 0 ${totalWidth} ${total}`)\n\n // A name for the file itself, besides the aria-label.\n const name = svg.getAttribute('aria-label')\n if (name) {\n const title = doc.createElementNS(SVG_NS, 'title')\n title.textContent = name\n copy.prepend(title)\n }\n\n const background =\n options.background === undefined || options.background === 'auto'\n ? chartStyle.getPropertyValue('--tc-surface').trim() || undefined\n : options.background || undefined\n if (background) {\n const rect = doc.createElementNS(SVG_NS, 'rect')\n rect.setAttribute('width', '100%')\n rect.setAttribute('height', '100%')\n rect.setAttribute('fill', background)\n copy.insertBefore(rect, copy.querySelector(':scope > title')?.nextSibling ?? copy.firstChild)\n }\n return new XMLSerializer().serializeToString(copy)\n}\n\n/**\n * The chart as an image (PNG by default), drawn from `exportSVG()` at\n * `scale` pixels per chart pixel.\n *\n * ```ts\n * const blob = await exportImage(chart, { scale: 3 })\n * ```\n */\nexport async function exportImage(target: ExportTarget, options: ImageOptions = {}): Promise<Blob> {\n const { type = 'image/png', scale = 2, quality } = options\n const markup = exportSVG(target, {\n ...options,\n // JPEG has no transparency: without a background it would turn black.\n ...(type === 'image/jpeg' && options.background === false ? { background: '#fff' } : {}),\n })\n const doc = rootOf(target).ownerDocument\n const image = new Image()\n image.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`\n await image.decode()\n const canvas = doc.createElement('canvas')\n canvas.width = Math.round(image.width * scale)\n canvas.height = Math.round(image.height * scale)\n const context = canvas.getContext('2d')\n if (!context) throw new Error('@tabler/charts: no 2d canvas to draw the image.')\n context.drawImage(image, 0, 0, canvas.width, canvas.height)\n return new Promise((resolve, reject) => {\n canvas.toBlob(\n (blob) => (blob ? resolve(blob) : reject(new Error('@tabler/charts: could not encode.'))),\n type,\n quality,\n )\n })\n}\n\n/**\n * Save the chart as a file: PNG by default, or SVG, JPEG or WebP.\n *\n * ```ts\n * button.onclick = () => downloadChart(chart, { format: 'svg', filename: 'sales' })\n * ```\n */\nexport async function downloadChart(\n target: ExportTarget,\n options: DownloadOptions = {},\n): Promise<void> {\n const { format = 'png' } = options\n const svg = rootOf(target)\n const blob =\n format === 'svg'\n ? new Blob([exportSVG(target, options)], { type: 'image/svg+xml' })\n : await exportImage(target, { ...options, type: `image/${format}` })\n const name = (options.filename ?? svg.getAttribute('aria-label') ?? 'chart')\n .replace(/[\\\\/:*?\"<>|]+/g, '')\n .trim()\n const link = svg.ownerDocument.createElement('a')\n link.href = URL.createObjectURL(blob)\n link.download = `${name || 'chart'}.${format === 'jpeg' ? 'jpg' : format}`\n link.click()\n // Give the browser a moment to start the download before the URL goes.\n setTimeout(() => URL.revokeObjectURL(link.href), 1000)\n}\n"],"mappings":";;AAeA,MAAM,SAAS;;AAgCf,MAAM,QAAgC;CACpC,MAAM;CACN,gBAAgB;CAChB,QAAQ;CACR,gBAAgB;CAChB,kBAAkB;CAClB,oBAAoB;CACpB,qBAAqB;CACrB,kBAAkB;CAClB,mBAAmB;CACnB,eAAe;CACf,mBAAmB;CACnB,iBAAiB;CACjB,SAAS;CACT,YAAY;AACd;AACA,MAAM,OAA+B;CACnC,GAAG;CACH,eAAe;CACf,aAAa;CACb,eAAe;CACf,cAAc;CACd,wBAAwB;CACxB,kBAAkB;AACpB;AACA,MAAM,OAA+B;CAAE,cAAc;CAAI,gBAAgB;AAAI;AAC7E,MAAM,QAAgC,EAAE,SAAS,IAAI;AACrD,MAAM,yBAAS,IAAI,IAAI;CAAC;CAAQ;CAAQ;CAAQ;CAAU;CAAW;CAAW;AAAU,CAAC;AAE3F,SAAS,OAAO,QAAqC;CACnD,MAAM,KAAK,aAAa,UAAU,EAAE,kBAAkB,WAAW,OAAO,UAAU;CAClF,MAAM,MAAM,GAAG,cAAc,QAAQ,KAAK,GAAG,cAAc,uBAAuB;CAClF,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,8CAA8C;CACxE,OAAO;AACT;;AAGA,SAAS,YAAY,OAAgD;CACnE,MAAM,QAAQ,MAAM;CACpB,IAAI,CAAC,SAAS,UAAU,QAAQ,OAAO,KAAA;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,SAAS;CAAS,CAAC;CACvE,MAAM,QAAQ,QAAQ,YAAY,IAAI,aAAa,YAAY,KAAK,QAAA,CACjE,QAAQ,kBAAkB,EAAE,CAAC,CAC7B,KAAK;CACR,MAAM,OAAO,IAAI,cAAc,cAAc,GAAG;CAChD,KAAK,OAAO,IAAI,gBAAgB,IAAI;CACpC,KAAK,WAAW,GAAG,QAAQ,QAAQ,GAAG,WAAW,SAAS,QAAQ;CAClE,KAAK,MAAM;CAEX,iBAAiB,IAAI,gBAAgB,KAAK,IAAI,GAAG,GAAI;AACvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as round } from "./layout-DqAte3H8.js";
|
|
2
2
|
// src/export-chart.ts
|
|
3
3
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
4
4
|
/** Properties copied from the computed style, with the values they can be left out at. */
|
|
@@ -115,13 +115,9 @@ function legendLayer(container) {
|
|
|
115
115
|
label.textContent = name.textContent;
|
|
116
116
|
g.append(dot, label);
|
|
117
117
|
}
|
|
118
|
-
const bottom = legend.getAttribute("data-position") === "bottom";
|
|
119
|
-
const margin = Number.parseFloat(getComputedStyle(legend)[bottom ? "marginTop" : "marginBottom"]) || 0;
|
|
120
118
|
return {
|
|
121
119
|
svg: g,
|
|
122
|
-
|
|
123
|
-
margin,
|
|
124
|
-
bottom
|
|
120
|
+
box
|
|
125
121
|
};
|
|
126
122
|
}
|
|
127
123
|
/**
|
|
@@ -149,18 +145,27 @@ function exportSVG(target, options = {}) {
|
|
|
149
145
|
const chartStyle = getComputedStyle(svg);
|
|
150
146
|
const container = svg.parentElement;
|
|
151
147
|
const legend = options.legend !== false && container ? legendLayer(container) : void 0;
|
|
148
|
+
let totalWidth = width;
|
|
152
149
|
let total = height;
|
|
153
150
|
if (legend) {
|
|
151
|
+
const { box } = legend;
|
|
152
|
+
const at = svg.getBoundingClientRect();
|
|
153
|
+
const left = Math.min(at.left, box.left);
|
|
154
|
+
const top = Math.min(at.top, box.top);
|
|
154
155
|
const wrap = doc.createElementNS(SVG_NS, "g");
|
|
155
156
|
wrap.append(...Array.from(copy.childNodes));
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
const move = (el, x, y) => {
|
|
158
|
+
if (x || y) el.setAttribute("transform", `translate(${round(x)} ${round(y)})`);
|
|
159
|
+
};
|
|
160
|
+
move(wrap, at.left - left, at.top - top);
|
|
161
|
+
move(legend.svg, box.left - left, box.top - top);
|
|
158
162
|
copy.append(wrap, legend.svg);
|
|
159
|
-
|
|
163
|
+
totalWidth = round(Math.max(at.left + width, box.right) - left);
|
|
164
|
+
total = round(Math.max(at.top + height, box.bottom) - top);
|
|
160
165
|
}
|
|
161
|
-
copy.setAttribute("width", String(
|
|
166
|
+
copy.setAttribute("width", String(totalWidth));
|
|
162
167
|
copy.setAttribute("height", String(total));
|
|
163
|
-
copy.setAttribute("viewBox", `0 0 ${
|
|
168
|
+
copy.setAttribute("viewBox", `0 0 ${totalWidth} ${total}`);
|
|
164
169
|
const name = svg.getAttribute("aria-label");
|
|
165
170
|
if (name) {
|
|
166
171
|
const title = doc.createElementNS(SVG_NS, "title");
|
|
@@ -228,4 +233,4 @@ async function downloadChart(target, options = {}) {
|
|
|
228
233
|
}
|
|
229
234
|
export { exportImage as n, exportSVG as r, downloadChart as t };
|
|
230
235
|
|
|
231
|
-
//# sourceMappingURL=export-chart-
|
|
236
|
+
//# sourceMappingURL=export-chart-DoeiAyR2.js.map
|