@tabler/charts 0.0.1-alpha.0 → 0.2.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 +33 -5
- package/dist/{annotations-Bp7HwtF5.d.ts → annotations-B02GR_KU.d.ts} +3 -8
- package/dist/{annotations-lyt0I3HU.d.cts → annotations-CHafaGd4.d.cts} +3 -8
- package/dist/{annotations-BszTTjf9.js → annotations-D0YQ0IoA.js} +6 -7
- package/dist/{annotations-BszTTjf9.js.map → annotations-D0YQ0IoA.js.map} +1 -1
- package/dist/{annotations-DpETO8dE.cjs → annotations-DdRdeBUB.cjs} +6 -7
- package/dist/{annotations-DpETO8dE.cjs.map → annotations-DdRdeBUB.cjs.map} +1 -1
- package/dist/annotations.cjs +3 -5
- package/dist/annotations.cjs.map +1 -1
- package/dist/annotations.d.cts +2 -1
- package/dist/annotations.d.ts +2 -1
- package/dist/annotations.js +3 -4
- package/dist/{sweep-WSgn2etB.js → arc-B3V5IR0w.js} +3 -60
- package/dist/arc-B3V5IR0w.js.map +1 -0
- package/dist/{sweep-Duowaput.cjs → arc-CYhI62kO.cjs} +2 -71
- package/dist/arc-CYhI62kO.cjs.map +1 -0
- package/dist/{area-DQsLERhx.js → area-0-L1bG9B.js} +5 -6
- package/dist/{area-DQsLERhx.js.map → area-0-L1bG9B.js.map} +1 -1
- package/dist/{area-sHCE3pg5.cjs → area-4eRs3c0K.cjs} +5 -6
- package/dist/{area-sHCE3pg5.cjs.map → area-4eRs3c0K.cjs.map} +1 -1
- package/dist/{area-DaO4MQl4.d.ts → area-CJX9219z.d.cts} +3 -6
- package/dist/{area-BFvkc-ZM.d.cts → area-d11XePuw.d.ts} +3 -6
- package/dist/area.cjs +1 -1
- package/dist/area.d.cts +2 -1
- package/dist/area.d.ts +2 -1
- package/dist/area.js +1 -2
- package/dist/{band-DTcNDAFO.d.ts → band-CNKvdnTC.d.cts} +1 -4
- package/dist/{band-DTcNDAFO.d.cts → band-CNKvdnTC.d.ts} +1 -4
- package/dist/{bar-DM16NUvV.js → bar-B5n2oq9-.js} +3 -4
- package/dist/{bar-DM16NUvV.js.map → bar-B5n2oq9-.js.map} +1 -1
- package/dist/{bar-DdsDxk3W.d.ts → bar-BDLR4p9c.d.cts} +4 -7
- package/dist/{bar-jZEoao74.js → bar-BNZ3GhIw.js} +20 -20
- package/dist/bar-BNZ3GhIw.js.map +1 -0
- package/dist/{bar-C-7zR2qp.cjs → bar-Da6dE_nI.cjs} +20 -20
- package/dist/bar-Da6dE_nI.cjs.map +1 -0
- package/dist/{bar-DGuUN3nc.cjs → bar-LYIF8MEz.cjs} +3 -4
- package/dist/{bar-DGuUN3nc.cjs.map → bar-LYIF8MEz.cjs.map} +1 -1
- package/dist/{bar-a0h9KC8A.d.cts → bar-XwzM6Pb0.d.ts} +4 -7
- package/dist/bar.cjs +1 -1
- package/dist/bar.d.cts +2 -1
- package/dist/bar.d.ts +2 -1
- package/dist/bar.js +1 -2
- package/dist/{candlestick-DuXwAFID.js → candlestick-BHQkQfxH.js} +6 -7
- package/dist/{candlestick-DuXwAFID.js.map → candlestick-BHQkQfxH.js.map} +1 -1
- package/dist/{candlestick-B5r1w3kc.cjs → candlestick-CYCQXgky.cjs} +6 -7
- package/dist/{candlestick-B5r1w3kc.cjs.map → candlestick-CYCQXgky.cjs.map} +1 -1
- package/dist/{candlestick-BnUG1SGi.d.ts → candlestick-D0xKkdqd.d.ts} +3 -6
- package/dist/{candlestick-BKdPyorY.d.cts → candlestick-Dq7qp-F0.d.cts} +3 -6
- package/dist/candlestick.cjs +4 -5
- package/dist/candlestick.d.cts +1 -1
- package/dist/candlestick.d.ts +1 -1
- package/dist/candlestick.js +4 -6
- package/dist/{cartesian-Cr0AF0nG.js → cartesian-CI2x6N7N.js} +27 -27
- package/dist/cartesian-CI2x6N7N.js.map +1 -0
- package/dist/{cartesian-BoDfgBCV.cjs → cartesian-DV02PsBe.cjs} +27 -27
- package/dist/cartesian-DV02PsBe.cjs.map +1 -0
- package/dist/{chart-BF2CK9I_.js → chart-DWn9v6qw.js} +35 -24
- package/dist/chart-DWn9v6qw.js.map +1 -0
- package/dist/{chart-iJGxMz9z.d.ts → chart-QilhWP8Z.d.ts} +38 -49
- package/dist/{chart-CowF_lWY.cjs → chart-e2VqomCI.cjs} +35 -24
- package/dist/chart-e2VqomCI.cjs.map +1 -0
- package/dist/{chart-Qa417fJo.d.cts → chart-kqFMEwDo.d.cts} +64 -49
- package/dist/{circle-BQMuAfls.cjs → circle-Bwxy5j7B.cjs} +2 -3
- package/dist/{circle-BQMuAfls.cjs.map → circle-Bwxy5j7B.cjs.map} +1 -1
- package/dist/{circle-Z7YfCoCM.js → circle-YRDaOBpk.js} +2 -3
- package/dist/{circle-Z7YfCoCM.js.map → circle-YRDaOBpk.js.map} +1 -1
- package/dist/{clean-o1vDEhFV.js → clean-CkoQobGv.js} +3 -4
- package/dist/{clean-o1vDEhFV.js.map → clean-CkoQobGv.js.map} +1 -1
- package/dist/{clean-Byl6kzf0.cjs → clean-Die2iCNc.cjs} +8 -3
- package/dist/{clean-Byl6kzf0.cjs.map → clean-Die2iCNc.cjs.map} +1 -1
- package/dist/{core-plobgBC7.js → core-BKRQvPAT.js} +47 -46
- package/dist/core-BKRQvPAT.js.map +1 -0
- package/dist/{core-C7fPm6t7.cjs → core-DIOC61up.cjs} +47 -46
- package/dist/core-DIOC61up.cjs.map +1 -0
- package/dist/{core-CjgbhS_v.d.ts → core-DRUCk67j.d.ts} +6 -42
- package/dist/{core-CnGFKojH.d.cts → core-PAX5ogLk.d.cts} +24 -68
- package/dist/core.cjs +32 -26
- package/dist/core.d.cts +23 -20
- package/dist/core.d.ts +23 -20
- package/dist/core.js +27 -24
- package/dist/{dates-CG-FvioW.js → dates-C2RzY3rE.js} +4 -5
- package/dist/{dates-CG-FvioW.js.map → dates-C2RzY3rE.js.map} +1 -1
- package/dist/{dates-Btm7Zm6W.cjs → dates-DurEr9WT.cjs} +4 -5
- package/dist/{dates-Btm7Zm6W.cjs.map → dates-DurEr9WT.cjs.map} +1 -1
- package/dist/{decimate-tLhDk1ys.cjs → decimate-BS3x8g-f.cjs} +2 -3
- package/dist/{decimate-tLhDk1ys.cjs.map → decimate-BS3x8g-f.cjs.map} +1 -1
- package/dist/{decimate-BGg9XgF0.d.ts → decimate-BxxYBJJk.d.cts} +2 -5
- package/dist/{decimate-C87cl_Sp.js → decimate-CapfgiDY.js} +2 -3
- package/dist/{decimate-C87cl_Sp.js.map → decimate-CapfgiDY.js.map} +1 -1
- package/dist/{decimate-CNSpgGa5.d.cts → decimate-Du87fMLG.d.ts} +2 -5
- package/dist/decimate.cjs +3 -4
- package/dist/decimate.d.cts +1 -1
- package/dist/decimate.d.ts +1 -1
- package/dist/decimate.js +3 -4
- package/dist/{dom-vP3IcMak.js → dom-CuceR8gt.js} +4 -6
- package/dist/{dom-vP3IcMak.js.map → dom-CuceR8gt.js.map} +1 -1
- package/dist/{dom-CLF868Qs.cjs → dom-D_g13XWY.cjs} +4 -6
- package/dist/{dom-CLF868Qs.cjs.map → dom-D_g13XWY.cjs.map} +1 -1
- package/dist/{export-chart-9w8t3rjZ.js → export-chart-83UYH48t.js} +3 -4
- package/dist/{export-chart-9w8t3rjZ.js.map → export-chart-83UYH48t.js.map} +1 -1
- package/dist/{export-chart-BhhYgksr.cjs → export-chart-mYgEfK-L.cjs} +3 -4
- package/dist/{export-chart-BhhYgksr.cjs.map → export-chart-mYgEfK-L.cjs.map} +1 -1
- package/dist/export.cjs +3 -5
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +8 -1
- package/dist/export.d.ts +8 -1
- package/dist/export.js +3 -4
- package/dist/{extent-BAMZo0Nq.js → extent-DOV8rs-6.js} +2 -3
- package/dist/{extent-BAMZo0Nq.js.map → extent-DOV8rs-6.js.map} +1 -1
- package/dist/{extent-DsFWvAHJ.cjs → extent-DuYDcvM9.cjs} +2 -3
- package/dist/{extent-DsFWvAHJ.cjs.map → extent-DuYDcvM9.cjs.map} +1 -1
- package/dist/{fade-Cs74puQS.cjs → fade-DVTkhrFU.cjs} +4 -6
- package/dist/{fade-Cs74puQS.cjs.map → fade-DVTkhrFU.cjs.map} +1 -1
- package/dist/{fade-D3NxH5Qg.js → fade-GGxcBdss.js} +4 -6
- package/dist/{fade-D3NxH5Qg.js.map → fade-GGxcBdss.js.map} +1 -1
- package/dist/{features-wASyHGic.js → features-BMxkqCyS.js} +2 -3
- package/dist/{features-wASyHGic.js.map → features-BMxkqCyS.js.map} +1 -1
- package/dist/{features-BclHgg2W.cjs → features-DCXEvoya.cjs} +2 -3
- package/dist/{features-BclHgg2W.cjs.map → features-DCXEvoya.cjs.map} +1 -1
- package/dist/{format-B0yKXBTH.cjs → format-CAE5ruy6.cjs} +2 -3
- package/dist/{format-B0yKXBTH.cjs.map → format-CAE5ruy6.cjs.map} +1 -1
- package/dist/{format-lStwuc1L.js → format-it1kepFG.js} +2 -3
- package/dist/{format-lStwuc1L.js.map → format-it1kepFG.js.map} +1 -1
- package/dist/{gauge-Cu9jttC0.d.ts → gauge-0VJuAHWF.d.ts} +5 -8
- package/dist/{gauge-Cu_OFxBd.d.cts → gauge-BSist7My.d.cts} +5 -8
- package/dist/{gauge-CEfkWXSu.cjs → gauge-DXkjXNCD.cjs} +14 -14
- package/dist/gauge-DXkjXNCD.cjs.map +1 -0
- package/dist/{gauge-_ljQHrMN.js → gauge-ts0kqN1-.js} +10 -10
- package/dist/{gauge-_ljQHrMN.js.map → gauge-ts0kqN1-.js.map} +1 -1
- package/dist/gauge.cjs +1 -1
- package/dist/gauge.d.cts +2 -1
- package/dist/gauge.d.ts +2 -1
- package/dist/gauge.js +1 -2
- package/dist/{heatmap-DSZ2bVIa.js → heatmap-19BGJTKF.js} +20 -22
- package/dist/heatmap-19BGJTKF.js.map +1 -0
- package/dist/{heatmap-PhLPXIg1.d.ts → heatmap-59lmClj9.d.ts} +4 -7
- package/dist/{heatmap-BK18EBgJ.cjs → heatmap-CXhlrLTl.cjs} +20 -22
- package/dist/heatmap-CXhlrLTl.cjs.map +1 -0
- package/dist/{heatmap-BwS-y0c6.d.cts → heatmap-Dp_oyEe0.d.cts} +4 -7
- package/dist/heatmap.cjs +1 -1
- package/dist/heatmap.d.cts +2 -1
- package/dist/heatmap.d.ts +2 -1
- package/dist/heatmap.js +1 -2
- package/dist/{hydrate-CzfxLfTv.d.ts → hydrate-BtAZf_5K.d.cts} +2 -5
- package/dist/{hydrate-CxwTXDqO.cjs → hydrate-CmN1k8Mo.cjs} +3 -4
- package/dist/hydrate-CmN1k8Mo.cjs.map +1 -0
- package/dist/{hydrate-DDNIHYv_.js → hydrate-OA6R2_Pn.js} +3 -4
- package/dist/{hydrate-DDNIHYv_.js.map → hydrate-OA6R2_Pn.js.map} +1 -1
- package/dist/{hydrate-CTTmQy0x.d.cts → hydrate-OjM1pIUG.d.ts} +2 -5
- package/dist/hydrate.cjs +3 -4
- package/dist/hydrate.cjs.map +1 -1
- package/dist/hydrate.d.cts +1 -1
- package/dist/hydrate.d.ts +1 -1
- package/dist/hydrate.js +3 -4
- package/dist/index.cjs +54 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -26
- package/dist/index.d.ts +24 -26
- package/dist/index.js +45 -42
- package/dist/index.js.map +1 -1
- package/dist/{layout-B3hiqVEw.js → layout-DmrrLjwN.js} +9 -4
- package/dist/layout-DmrrLjwN.js.map +1 -0
- package/dist/{layout-CtMBhNd9.cjs → layout-JY2aR-yE.cjs} +14 -3
- package/dist/layout-JY2aR-yE.cjs.map +1 -0
- package/dist/{line-B3Ed6u7j.js → line-DO66LtwH.js} +9 -10
- package/dist/{line-B3Ed6u7j.js.map → line-DO66LtwH.js.map} +1 -1
- package/dist/{line-fQbtP_jL.cjs → line-Dbt6KFRK.cjs} +9 -10
- package/dist/{line-fQbtP_jL.cjs.map → line-Dbt6KFRK.cjs.map} +1 -1
- package/dist/{line-CMDGH6q5.d.cts → line-DtSh7HQU.d.ts} +4 -7
- package/dist/{line-D5kb8e6w.d.ts → line-_rNdeKmS.d.cts} +5 -7
- package/dist/line.cjs +4 -5
- package/dist/line.cjs.map +1 -1
- package/dist/line.d.cts +1 -1
- package/dist/line.d.ts +1 -1
- package/dist/line.js +4 -6
- package/dist/{log-CaofN3-n.d.ts → log-CI41TmcU.d.cts} +1 -6
- package/dist/{log-CaofN3-n.d.cts → log-CI41TmcU.d.ts} +1 -6
- package/dist/{log-axis-83rSpvL5.cjs → log-axis-DdRNyAq8.cjs} +6 -8
- package/dist/{log-axis-83rSpvL5.cjs.map → log-axis-DdRNyAq8.cjs.map} +1 -1
- package/dist/{log-axis-B_uvvOFc.js → log-axis-DhthtHFk.js} +6 -8
- package/dist/{log-axis-B_uvvOFc.js.map → log-axis-DhthtHFk.js.map} +1 -1
- package/dist/log.cjs +3 -5
- package/dist/log.cjs.map +1 -1
- package/dist/log.d.cts +1 -1
- package/dist/log.d.ts +1 -1
- package/dist/log.js +3 -4
- package/dist/{morph-CqYDu1bY.cjs → morph-9_LJL0ra.cjs} +4 -5
- package/dist/morph-9_LJL0ra.cjs.map +1 -0
- package/dist/{morph-BMxz3X2b.d.ts → morph-Dh7gJkV4.d.cts} +1 -4
- package/dist/{morph-BMxz3X2b.d.cts → morph-Dh7gJkV4.d.ts} +1 -4
- package/dist/{morph-Bgg-24l8.js → morph-DnRxuwR-.js} +4 -5
- package/dist/{morph-Bgg-24l8.js.map → morph-DnRxuwR-.js.map} +1 -1
- package/dist/morph.cjs +3 -4
- package/dist/morph.cjs.map +1 -1
- package/dist/morph.d.cts +1 -1
- package/dist/morph.d.ts +1 -1
- package/dist/morph.js +3 -4
- package/dist/{named-BWWb5LQJ.cjs → named-BBASc8dW.cjs} +2 -3
- package/dist/{named-BWWb5LQJ.cjs.map → named-BBASc8dW.cjs.map} +1 -1
- package/dist/{named-DE15TOgh.js → named-BOiBah6I.js} +2 -3
- package/dist/{named-DE15TOgh.js.map → named-BOiBah6I.js.map} +1 -1
- package/dist/others-DWdK7vKp.cjs +60 -0
- package/dist/others-DWdK7vKp.cjs.map +1 -0
- package/dist/others-J7NCAMA0.js +49 -0
- package/dist/others-J7NCAMA0.js.map +1 -0
- package/dist/parliament-CLCI7tUO.d.ts +66 -0
- package/dist/parliament-CgsVnWEe.d.cts +66 -0
- package/dist/parliament-Cru4IcuM.js +302 -0
- package/dist/parliament-Cru4IcuM.js.map +1 -0
- package/dist/parliament-x5hcFaQ3.cjs +307 -0
- package/dist/parliament-x5hcFaQ3.cjs.map +1 -0
- package/dist/parliament.cjs +3 -0
- package/dist/parliament.d.cts +3 -0
- package/dist/parliament.d.ts +3 -0
- package/dist/parliament.js +1 -0
- package/dist/{path-CwB28da0.d.ts → path-YeUiOfG8.d.cts} +1 -4
- package/dist/{path-CwB28da0.d.cts → path-YeUiOfG8.d.ts} +1 -4
- package/dist/{patterns-DtgcnA8o.js → patterns-CufKZYhm.js} +4 -5
- package/dist/{patterns-DtgcnA8o.js.map → patterns-CufKZYhm.js.map} +1 -1
- package/dist/{patterns-LfcQAWCy.cjs → patterns-D3-wQagb.cjs} +4 -5
- package/dist/{patterns-LfcQAWCy.cjs.map → patterns-D3-wQagb.cjs.map} +1 -1
- package/dist/patterns.cjs +3 -5
- package/dist/patterns.cjs.map +1 -1
- package/dist/patterns.d.cts +5 -1
- package/dist/patterns.d.ts +5 -1
- package/dist/patterns.js +3 -4
- package/dist/percentage-bar-B6tNOqNn.js +157 -0
- package/dist/percentage-bar-B6tNOqNn.js.map +1 -0
- package/dist/percentage-bar-nhTeakD_.d.ts +62 -0
- package/dist/percentage-bar-tepMr7Hd.d.cts +62 -0
- package/dist/percentage-bar-ybNS3goo.cjs +162 -0
- package/dist/percentage-bar-ybNS3goo.cjs.map +1 -0
- package/dist/percentage-bar.cjs +3 -0
- package/dist/percentage-bar.d.cts +3 -0
- package/dist/percentage-bar.d.ts +3 -0
- package/dist/percentage-bar.js +1 -0
- package/dist/{pie-B8UlOZiq.d.ts → pie-BXg2gNpb.d.cts} +14 -8
- package/dist/{pie-C1Pa6W_l.cjs → pie-BpjvSPnz.cjs} +19 -22
- package/dist/pie-BpjvSPnz.cjs.map +1 -0
- package/dist/{pie-DnQQmxkk.d.cts → pie-CFptILSm.d.ts} +14 -8
- package/dist/{pie-RnMTQWMS.js → pie-CVsc-6qD.js} +13 -16
- package/dist/pie-CVsc-6qD.js.map +1 -0
- package/dist/pie.cjs +1 -1
- package/dist/pie.d.cts +2 -1
- package/dist/pie.d.ts +2 -1
- package/dist/pie.js +1 -2
- package/dist/{point-shapes-CGl4dugc.cjs → point-shapes--_gmdTyK.cjs} +3 -4
- package/dist/{point-shapes-CGl4dugc.cjs.map → point-shapes--_gmdTyK.cjs.map} +1 -1
- package/dist/{point-shapes-DI84NNpI.js → point-shapes-DD2Ektzm.js} +3 -4
- package/dist/{point-shapes-DI84NNpI.js.map → point-shapes-DD2Ektzm.js.map} +1 -1
- package/dist/point-shapes.cjs +3 -4
- package/dist/point-shapes.d.cts +5 -1
- package/dist/point-shapes.d.ts +5 -1
- package/dist/point-shapes.js +3 -4
- package/dist/{radar-pFI6fvOq.d.ts → radar-BC9Skgpj.d.ts} +4 -7
- package/dist/{radar-CYPab_I4.js → radar-BR-mumDd.js} +7 -8
- package/dist/{radar-CYPab_I4.js.map → radar-BR-mumDd.js.map} +1 -1
- package/dist/{radar-BB13CGmq.d.cts → radar-D1-lItDy.d.cts} +4 -7
- package/dist/{radar-CoGUNNSb.cjs → radar-HPDrIdzc.cjs} +7 -8
- package/dist/{radar-CoGUNNSb.cjs.map → radar-HPDrIdzc.cjs.map} +1 -1
- package/dist/radar.cjs +1 -1
- package/dist/radar.d.cts +2 -1
- package/dist/radar.d.ts +2 -1
- package/dist/radar.js +1 -2
- package/dist/rect-D6VhynBM.cjs +16 -0
- package/dist/rect-D6VhynBM.cjs.map +1 -0
- package/dist/rect-DSVmUZrD.js +11 -0
- package/dist/rect-DSVmUZrD.js.map +1 -0
- package/dist/{sankey-B4PNKusJ.js → sankey-D6JeZfK5.js} +33 -29
- package/dist/sankey-D6JeZfK5.js.map +1 -0
- package/dist/{sankey-Bm518bqL.d.ts → sankey-D_v7KxnJ.d.ts} +4 -7
- package/dist/{sankey-B9JYnx7e.d.cts → sankey-Dk7jUt8x.d.cts} +4 -7
- package/dist/{sankey-Bacx4fVe.cjs → sankey-fCoo1cpz.cjs} +33 -29
- package/dist/sankey-fCoo1cpz.cjs.map +1 -0
- package/dist/sankey.cjs +1 -1
- package/dist/sankey.d.cts +2 -1
- package/dist/sankey.d.ts +2 -1
- package/dist/sankey.js +1 -2
- package/dist/{scatter-kgtgR318.js → scatter-C0TWjFpW.js} +21 -18
- package/dist/scatter-C0TWjFpW.js.map +1 -0
- package/dist/{scatter-Bl7nasE6.d.ts → scatter-CXEsioOJ.d.ts} +8 -9
- package/dist/{scatter-DgMN9zRy.cjs → scatter-DVqB_fP9.cjs} +21 -18
- package/dist/scatter-DVqB_fP9.cjs.map +1 -0
- package/dist/{scatter-DrJ8xYz4.d.cts → scatter-DZeEIfyo.d.cts} +8 -9
- package/dist/scatter.cjs +1 -1
- package/dist/scatter.d.cts +2 -1
- package/dist/scatter.d.ts +2 -1
- package/dist/scatter.js +1 -2
- package/dist/{sparkline-BS9-hltA.cjs → sparkline-B39NA0Mi.cjs} +14 -13
- package/dist/sparkline-B39NA0Mi.cjs.map +1 -0
- package/dist/{sparkline-BG13V4Pz.d.cts → sparkline-DAP6jtzw.d.cts} +5 -8
- package/dist/{sparkline-BQzt27Fr.js → sparkline-XO_TqCNP.js} +14 -13
- package/dist/sparkline-XO_TqCNP.js.map +1 -0
- package/dist/{sparkline-iWuXbKpd.d.ts → sparkline-cbvRkWqS.d.ts} +5 -8
- package/dist/sparkline.cjs +1 -1
- package/dist/sparkline.d.cts +2 -1
- package/dist/sparkline.d.ts +2 -1
- package/dist/sparkline.js +1 -2
- package/dist/{stack-DRbwTeF3.js → stack-2H2Gfs1Q.js} +3 -4
- package/dist/{stack-DRbwTeF3.js.map → stack-2H2Gfs1Q.js.map} +1 -1
- package/dist/{stack-DVhJWaki.cjs → stack-BgPzoQmv.cjs} +3 -4
- package/dist/{stack-DVhJWaki.cjs.map → stack-BgPzoQmv.cjs.map} +1 -1
- package/dist/{stack-CpR6RGKd.d.ts → stack-DR0eQTsB.d.ts} +1 -4
- package/dist/{stack-CpR6RGKd.d.cts → stack-Dagxq7l2.d.cts} +2 -4
- package/dist/style.css +1 -1
- package/dist/sweep-BpRPlhs6.js +59 -0
- package/dist/sweep-BpRPlhs6.js.map +1 -0
- package/dist/sweep-Dnp6LDBz.cjs +70 -0
- package/dist/sweep-Dnp6LDBz.cjs.map +1 -0
- package/dist/{time-CNVnt-B2.d.cts → time-B4oxWHQI.d.cts} +2 -7
- package/dist/{time-CHjiY9Q4.d.ts → time-DRIDgv2a.d.ts} +2 -7
- package/dist/{time-axis-VSX34_Tb.cjs → time-axis-BjZ1bYTK.cjs} +9 -10
- package/dist/{time-axis-VSX34_Tb.cjs.map → time-axis-BjZ1bYTK.cjs.map} +1 -1
- package/dist/{time-axis-Bc9eHX1r.js → time-axis-FLONo54E.js} +9 -10
- package/dist/{time-axis-Bc9eHX1r.js.map → time-axis-FLONo54E.js.map} +1 -1
- package/dist/time.cjs +4 -6
- package/dist/time.cjs.map +1 -1
- package/dist/time.d.cts +1 -1
- package/dist/time.d.ts +1 -1
- package/dist/time.js +4 -5
- package/dist/treemap-BAkhmVQc.d.cts +55 -0
- package/dist/treemap-BNpxFBao.d.ts +55 -0
- package/dist/treemap-BWpEUlDh.cjs +303 -0
- package/dist/treemap-BWpEUlDh.cjs.map +1 -0
- package/dist/treemap-CQdavQ9u.js +298 -0
- package/dist/treemap-CQdavQ9u.js.map +1 -0
- package/dist/treemap.cjs +3 -0
- package/dist/treemap.d.cts +3 -0
- package/dist/treemap.d.ts +3 -0
- package/dist/treemap.js +1 -0
- package/dist/{tween-BCYd0RTY.js → tween-BdQqUmmv.js} +2 -3
- package/dist/{tween-BCYd0RTY.js.map → tween-BdQqUmmv.js.map} +1 -1
- package/dist/{tween-CIGBlryn.cjs → tween-c3aOmfKE.cjs} +2 -3
- package/dist/{tween-CIGBlryn.cjs.map → tween-c3aOmfKE.cjs.map} +1 -1
- package/dist/{value-labels-IZIQPhfk.js → value-labels-BBuSi4i0.js} +7 -7
- package/dist/value-labels-BBuSi4i0.js.map +1 -0
- package/dist/{value-labels-B0WJoJ7x.cjs → value-labels-BV9keAuL.cjs} +7 -7
- package/dist/value-labels-BV9keAuL.cjs.map +1 -0
- package/dist/value-labels.cjs +3 -5
- package/dist/value-labels.cjs.map +1 -1
- package/dist/value-labels.d.cts +5 -1
- package/dist/value-labels.d.ts +5 -1
- package/dist/value-labels.js +3 -4
- package/dist/{vnode-CkQ27Cxe.cjs → vnode-ClAiw28x.cjs} +2 -3
- package/dist/{vnode-CkQ27Cxe.cjs.map → vnode-ClAiw28x.cjs.map} +1 -1
- package/dist/{vnode-BUflsBsa.d.ts → vnode-Du2cC8Fm.d.cts} +1 -4
- package/dist/{vnode-BUflsBsa.d.cts → vnode-Du2cC8Fm.d.ts} +1 -4
- package/dist/{vnode-tCWItoUH.js → vnode-_EMUqysL.js} +2 -3
- package/dist/{vnode-tCWItoUH.js.map → vnode-_EMUqysL.js.map} +1 -1
- package/package.json +31 -1
- package/dist/bar-C-7zR2qp.cjs.map +0 -1
- package/dist/bar-jZEoao74.js.map +0 -1
- package/dist/cartesian-BoDfgBCV.cjs.map +0 -1
- package/dist/cartesian-Cr0AF0nG.js.map +0 -1
- package/dist/chart-BF2CK9I_.js.map +0 -1
- package/dist/chart-CowF_lWY.cjs.map +0 -1
- package/dist/core-C7fPm6t7.cjs.map +0 -1
- package/dist/core-plobgBC7.js.map +0 -1
- package/dist/gauge-CEfkWXSu.cjs.map +0 -1
- package/dist/heatmap-BK18EBgJ.cjs.map +0 -1
- package/dist/heatmap-DSZ2bVIa.js.map +0 -1
- package/dist/hydrate-CxwTXDqO.cjs.map +0 -1
- package/dist/layout-B3hiqVEw.js.map +0 -1
- package/dist/layout-CtMBhNd9.cjs.map +0 -1
- package/dist/morph-CqYDu1bY.cjs.map +0 -1
- package/dist/pie-C1Pa6W_l.cjs.map +0 -1
- package/dist/pie-RnMTQWMS.js.map +0 -1
- package/dist/sankey-B4PNKusJ.js.map +0 -1
- package/dist/sankey-Bacx4fVe.cjs.map +0 -1
- package/dist/scatter-DgMN9zRy.cjs.map +0 -1
- package/dist/scatter-kgtgR318.js.map +0 -1
- package/dist/sparkline-BQzt27Fr.js.map +0 -1
- package/dist/sparkline-BS9-hltA.cjs.map +0 -1
- package/dist/sweep-Duowaput.cjs.map +0 -1
- package/dist/sweep-WSgn2etB.js.map +0 -1
- package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
- package/dist/value-labels-IZIQPhfk.js.map +0 -1
package/dist/log.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as log, t as LogScaleOptions } from "./log-
|
|
1
|
+
import { n as log, t as LogScaleOptions } from "./log-CI41TmcU.cjs";
|
|
2
2
|
export { type LogScaleOptions, log };
|
package/dist/log.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as log, t as LogScaleOptions } from "./log-
|
|
1
|
+
import { n as log, t as LogScaleOptions } from "./log-CI41TmcU.js";
|
|
2
2
|
export { type LogScaleOptions, log };
|
package/dist/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { n as logTicks, r as log, t as logDomain } from "./log-axis-DhthtHFk.js";
|
|
2
|
+
import { i as register } from "./features-BMxkqCyS.js";
|
|
3
|
+
// src/log.ts
|
|
4
4
|
/**
|
|
5
5
|
* Registers logarithmic value axes (`scale: 'log'`):
|
|
6
6
|
* `import '@tabler/charts/log'`. Also exports the scale itself.
|
|
@@ -10,7 +10,6 @@ register({ log: {
|
|
|
10
10
|
domain: logDomain,
|
|
11
11
|
ticks: logTicks
|
|
12
12
|
} });
|
|
13
|
-
//#endregion
|
|
14
13
|
export { log };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=log.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_layout = require("./layout-
|
|
2
|
-
const require_tween = require("./tween-
|
|
3
|
-
|
|
1
|
+
const require_layout = require("./layout-JY2aR-yE.cjs");
|
|
2
|
+
const require_tween = require("./tween-c3aOmfKE.cjs");
|
|
3
|
+
// src/render/morph.ts
|
|
4
4
|
/**
|
|
5
5
|
* Path morphing for browsers that cannot transition `d` in CSS (Safari):
|
|
6
6
|
* when a patch changes the `d` of a path whose style asks for a `d`
|
|
@@ -30,7 +30,6 @@ function morph(el, from, to) {
|
|
|
30
30
|
require_tween.tween(el, current?.length === end.length ? current : start, end, duration, (now) => now.reduce((d, value, i) => d + require_layout.round(value) + text[i + 1], text[0]), to);
|
|
31
31
|
return true;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
Object.defineProperty(exports, "morph", {
|
|
35
34
|
enumerable: true,
|
|
36
35
|
get: function() {
|
|
@@ -38,4 +37,4 @@ Object.defineProperty(exports, "morph", {
|
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
|
|
41
|
-
//# sourceMappingURL=morph-
|
|
40
|
+
//# sourceMappingURL=morph-9_LJL0ra.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-9_LJL0ra.cjs","names":["stop","tween","round"],"sources":["../src/render/morph.ts"],"sourcesContent":["/**\n * Path morphing for browsers that cannot transition `d` in CSS (Safari):\n * when a patch changes the `d` of a path whose style asks for a `d`\n * transition, the numbers in the path are interpolated frame by frame\n * instead, over the transition's duration with an ease-out curve. Chart\n * paths keep their commands between renders, so only the numbers move; a\n * path whose commands changed jumps, as it would in CSS too.\n */\n\nimport { round } from '../layout.ts'\nimport { stop, tween } from './tween.ts'\n\nconst NUMBER = /-?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?/gi\n\nlet native: boolean | undefined\n\n/**\n * Change `el`'s `d` from `from` to `to` over its CSS transition, frame by\n * frame. Returns `false` when the browser transitions `d` itself, or the\n * path is not meant to move (the caller then just sets the attribute).\n */\nexport function morph(el: Element, from: string, to: string): boolean {\n native ??= typeof CSS === 'undefined' || CSS.supports('d', 'path(\"M0 0\")')\n const current = stop(el)\n // A chart without transitions (too big to animate, or resizing) has nothing to\n // morph: said here, before asking for the style of each of its paths.\n if (native || el.closest('.tc-static,[data-resizing]')) return false\n\n const style = getComputedStyle(el)\n const index = style.transitionProperty.split(', ').findIndex((p) => p === 'd' || p === 'all')\n const duration =\n index < 0 ? 0 : Number.parseFloat(style.transitionDuration.split(', ')[index] ?? '') * 1000\n const text = to.split(NUMBER)\n const end = to.match(NUMBER)?.map(Number) ?? []\n const start = from.match(NUMBER)?.map(Number) ?? []\n if (!(duration > 0) || start.length !== end.length || from.split(NUMBER).join() !== text.join()) {\n return false\n }\n\n // An interrupted morph continues from where the path is now.\n tween(\n el,\n current?.length === end.length ? current : start,\n end,\n duration,\n (now) =>\n now.reduce((d, value, i) => d + round(value) + (text[i + 1] as string), text[0] as string),\n to,\n )\n return true\n}\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,SAAS;AAEf,IAAI;;;;;;AAOJ,SAAgB,MAAM,IAAa,MAAc,IAAqB;CACpE,WAAW,OAAO,QAAQ,eAAe,IAAI,SAAS,KAAK,gBAAc;CACzE,MAAM,UAAUA,cAAAA,KAAK,EAAE;CAGvB,IAAI,UAAU,GAAG,QAAQ,4BAA4B,GAAG,OAAO;CAE/D,MAAM,QAAQ,iBAAiB,EAAE;CACjC,MAAM,QAAQ,MAAM,mBAAmB,MAAM,IAAI,CAAC,CAAC,WAAW,MAAM,MAAM,OAAO,MAAM,KAAK;CAC5F,MAAM,WACJ,QAAQ,IAAI,IAAI,OAAO,WAAW,MAAM,mBAAmB,MAAM,IAAI,CAAC,CAAC,UAAU,EAAE,IAAI;CACzF,MAAM,OAAO,GAAG,MAAM,MAAM;CAC5B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,EAAE,IAAI,MAAM,KAAK,CAAC;CAC9C,MAAM,QAAQ,KAAK,MAAM,MAAM,CAAC,EAAE,IAAI,MAAM,KAAK,CAAC;CAClD,IAAI,EAAE,WAAW,MAAM,MAAM,WAAW,IAAI,UAAU,KAAK,MAAM,MAAM,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,GAC5F,OAAO;CAITC,cAAAA,MACE,IACA,SAAS,WAAW,IAAI,SAAS,UAAU,OAC3C,KACA,WACC,QACC,IAAI,QAAQ,GAAG,OAAO,MAAM,IAAIC,eAAAA,MAAM,KAAK,IAAK,KAAK,IAAI,IAAe,KAAK,EAAY,GAC3F,EACF;CACA,OAAO;AACT"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
//#region src/render/morph.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Change `el`'s `d` from `from` to `to` over its CSS transition, frame by
|
|
4
3
|
* frame. Returns `false` when the browser transitions `d` itself, or the
|
|
5
4
|
* path is not meant to move (the caller then just sets the attribute).
|
|
6
5
|
*/
|
|
7
6
|
declare function morph(el: Element, from: string, to: string): boolean;
|
|
8
|
-
|
|
9
|
-
export { morph as t };
|
|
10
|
-
//# sourceMappingURL=morph-BMxz3X2b.d.ts.map
|
|
7
|
+
export { morph as t };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
//#region src/render/morph.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Change `el`'s `d` from `from` to `to` over its CSS transition, frame by
|
|
4
3
|
* frame. Returns `false` when the browser transitions `d` itself, or the
|
|
5
4
|
* path is not meant to move (the caller then just sets the attribute).
|
|
6
5
|
*/
|
|
7
6
|
declare function morph(el: Element, from: string, to: string): boolean;
|
|
8
|
-
|
|
9
|
-
export { morph as t };
|
|
10
|
-
//# sourceMappingURL=morph-BMxz3X2b.d.cts.map
|
|
7
|
+
export { morph as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as tween, t as stop } from "./tween-
|
|
3
|
-
|
|
1
|
+
import { o as round } from "./layout-DmrrLjwN.js";
|
|
2
|
+
import { n as tween, t as stop } from "./tween-BdQqUmmv.js";
|
|
3
|
+
// src/render/morph.ts
|
|
4
4
|
/**
|
|
5
5
|
* Path morphing for browsers that cannot transition `d` in CSS (Safari):
|
|
6
6
|
* when a patch changes the `d` of a path whose style asks for a `d`
|
|
@@ -30,7 +30,6 @@ function morph(el, from, to) {
|
|
|
30
30
|
tween(el, current?.length === end.length ? current : start, end, duration, (now) => now.reduce((d, value, i) => d + round(value) + text[i + 1], text[0]), to);
|
|
31
31
|
return true;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { morph as t };
|
|
35
34
|
|
|
36
|
-
//# sourceMappingURL=morph-
|
|
35
|
+
//# sourceMappingURL=morph-DnRxuwR-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph-
|
|
1
|
+
{"version":3,"file":"morph-DnRxuwR-.js","names":[],"sources":["../src/render/morph.ts"],"sourcesContent":["/**\n * Path morphing for browsers that cannot transition `d` in CSS (Safari):\n * when a patch changes the `d` of a path whose style asks for a `d`\n * transition, the numbers in the path are interpolated frame by frame\n * instead, over the transition's duration with an ease-out curve. Chart\n * paths keep their commands between renders, so only the numbers move; a\n * path whose commands changed jumps, as it would in CSS too.\n */\n\nimport { round } from '../layout.ts'\nimport { stop, tween } from './tween.ts'\n\nconst NUMBER = /-?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?/gi\n\nlet native: boolean | undefined\n\n/**\n * Change `el`'s `d` from `from` to `to` over its CSS transition, frame by\n * frame. Returns `false` when the browser transitions `d` itself, or the\n * path is not meant to move (the caller then just sets the attribute).\n */\nexport function morph(el: Element, from: string, to: string): boolean {\n native ??= typeof CSS === 'undefined' || CSS.supports('d', 'path(\"M0 0\")')\n const current = stop(el)\n // A chart without transitions (too big to animate, or resizing) has nothing to\n // morph: said here, before asking for the style of each of its paths.\n if (native || el.closest('.tc-static,[data-resizing]')) return false\n\n const style = getComputedStyle(el)\n const index = style.transitionProperty.split(', ').findIndex((p) => p === 'd' || p === 'all')\n const duration =\n index < 0 ? 0 : Number.parseFloat(style.transitionDuration.split(', ')[index] ?? '') * 1000\n const text = to.split(NUMBER)\n const end = to.match(NUMBER)?.map(Number) ?? []\n const start = from.match(NUMBER)?.map(Number) ?? []\n if (!(duration > 0) || start.length !== end.length || from.split(NUMBER).join() !== text.join()) {\n return false\n }\n\n // An interrupted morph continues from where the path is now.\n tween(\n el,\n current?.length === end.length ? current : start,\n end,\n duration,\n (now) =>\n now.reduce((d, value, i) => d + round(value) + (text[i + 1] as string), text[0] as string),\n to,\n )\n return true\n}\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,SAAS;AAEf,IAAI;;;;;;AAOJ,SAAgB,MAAM,IAAa,MAAc,IAAqB;CACpE,WAAW,OAAO,QAAQ,eAAe,IAAI,SAAS,KAAK,gBAAc;CACzE,MAAM,UAAU,KAAK,EAAE;CAGvB,IAAI,UAAU,GAAG,QAAQ,4BAA4B,GAAG,OAAO;CAE/D,MAAM,QAAQ,iBAAiB,EAAE;CACjC,MAAM,QAAQ,MAAM,mBAAmB,MAAM,IAAI,CAAC,CAAC,WAAW,MAAM,MAAM,OAAO,MAAM,KAAK;CAC5F,MAAM,WACJ,QAAQ,IAAI,IAAI,OAAO,WAAW,MAAM,mBAAmB,MAAM,IAAI,CAAC,CAAC,UAAU,EAAE,IAAI;CACzF,MAAM,OAAO,GAAG,MAAM,MAAM;CAC5B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,EAAE,IAAI,MAAM,KAAK,CAAC;CAC9C,MAAM,QAAQ,KAAK,MAAM,MAAM,CAAC,EAAE,IAAI,MAAM,KAAK,CAAC;CAClD,IAAI,EAAE,WAAW,MAAM,MAAM,WAAW,IAAI,UAAU,KAAK,MAAM,MAAM,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,GAC5F,OAAO;CAIT,MACE,IACA,SAAS,WAAW,IAAI,SAAS,UAAU,OAC3C,KACA,WACC,QACC,IAAI,QAAQ,GAAG,OAAO,MAAM,IAAI,MAAM,KAAK,IAAK,KAAK,IAAI,IAAe,KAAK,EAAY,GAC3F,EACF;CACA,OAAO;AACT"}
|
package/dist/morph.cjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_features = require("./features-
|
|
3
|
-
const require_morph = require("./morph-
|
|
4
|
-
|
|
2
|
+
const require_features = require("./features-DCXEvoya.cjs");
|
|
3
|
+
const require_morph = require("./morph-9_LJL0ra.cjs");
|
|
4
|
+
// src/morph.ts
|
|
5
5
|
/**
|
|
6
6
|
* Standalone entry: `import '@tabler/charts/morph'` animates path changes
|
|
7
7
|
* (new data) in browsers that cannot transition `d` in CSS, such as Safari.
|
|
8
8
|
* Elsewhere it does nothing; `@tabler/charts` includes it.
|
|
9
9
|
*/
|
|
10
10
|
require_features.register({ morph: require_morph.morph });
|
|
11
|
-
//#endregion
|
|
12
11
|
exports.morph = require_morph.morph;
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=morph.cjs.map
|
package/dist/morph.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph.cjs","names":["register"],"sources":["../src/morph.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/morph'` animates path changes\n * (new data) in browsers that cannot transition `d` in CSS, such as Safari.\n * Elsewhere it does nothing; `@tabler/charts` includes it.\n */\nimport { register } from './features.ts'\nimport { morph } from './render/morph.ts'\n\nregister({ morph })\n\nexport { morph }\n"],"mappings":";;;;;;;;;AAQAA,iBAAAA,SAAS,
|
|
1
|
+
{"version":3,"file":"morph.cjs","names":["register","morph"],"sources":["../src/morph.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/morph'` animates path changes\n * (new data) in browsers that cannot transition `d` in CSS, such as Safari.\n * Elsewhere it does nothing; `@tabler/charts` includes it.\n */\nimport { register } from './features.ts'\nimport { morph } from './render/morph.ts'\n\nregister({ morph })\n\nexport { morph }\n"],"mappings":";;;;;;;;;AAQAA,iBAAAA,SAAS,EAAEC,OAAAA,cAAAA,MAAM,CAAC"}
|
package/dist/morph.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as morph } from "./morph-
|
|
1
|
+
import { t as morph } from "./morph-Dh7gJkV4.cjs";
|
|
2
2
|
export { morph };
|
package/dist/morph.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as morph } from "./morph-
|
|
1
|
+
import { t as morph } from "./morph-Dh7gJkV4.js";
|
|
2
2
|
export { morph };
|
package/dist/morph.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { i as register } from "./features-
|
|
2
|
-
import { t as morph } from "./morph-
|
|
3
|
-
|
|
1
|
+
import { i as register } from "./features-BMxkqCyS.js";
|
|
2
|
+
import { t as morph } from "./morph-DnRxuwR-.js";
|
|
3
|
+
// src/morph.ts
|
|
4
4
|
/**
|
|
5
5
|
* Standalone entry: `import '@tabler/charts/morph'` animates path changes
|
|
6
6
|
* (new data) in browsers that cannot transition `d` in CSS, such as Safari.
|
|
7
7
|
* Elsewhere it does nothing; `@tabler/charts` includes it.
|
|
8
8
|
*/
|
|
9
9
|
register({ morph });
|
|
10
|
-
//#endregion
|
|
11
10
|
export { morph };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=morph.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/charts/named.ts
|
|
2
2
|
/** Stable key of a series, slice or ring: its `id`, or its name. */
|
|
3
3
|
const keyOf = (item) => item.id ?? item.name;
|
|
4
4
|
/** Legend entries for series, slices or rings, in their order (which is their color slot). */
|
|
@@ -27,7 +27,6 @@ function groupAttrs(item, index) {
|
|
|
27
27
|
style: { "--tc-series-color": item.color }
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
Object.defineProperty(exports, "groupAttrs", {
|
|
32
31
|
enumerable: true,
|
|
33
32
|
get: function() {
|
|
@@ -47,4 +46,4 @@ Object.defineProperty(exports, "legendItems", {
|
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
|
|
50
|
-
//# sourceMappingURL=named-
|
|
49
|
+
//# sourceMappingURL=named-BBASc8dW.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-
|
|
1
|
+
{"version":3,"file":"named-BBASc8dW.cjs","names":[],"sources":["../src/charts/named.ts"],"sourcesContent":["import type { LegendItem } from '../legend.ts'\nimport type { ClassValue, Props } from '../vnode.ts'\n\n/** What series, slices and rings have in common: a name, and how they look in a legend. */\nexport interface Named {\n name: string\n id?: string\n color?: string\n class?: ClassValue\n hidden?: boolean\n}\n\n/** Stable key of a series, slice or ring: its `id`, or its name. */\nexport const keyOf = (item: Named): string => item.id ?? item.name\n\n/** Legend entries for series, slices or rings, in their order (which is their color slot). */\nexport function legendItems(list: readonly Named[]): LegendItem[] {\n return list.map((entry, index) => {\n const item: LegendItem = { key: keyOf(entry), name: entry.name, index }\n if (entry.color) item.color = entry.color\n if (entry.hidden) item.hidden = true\n return item\n })\n}\n\n/** Attributes of the group of a series, slice or ring in color slot `index`. */\nexport function groupAttrs(item: Named, index: number): Props {\n return {\n key: keyOf(item),\n class: ['tc-series', `tc-series-${index + 1}`, item.class],\n 'data-series': item.name,\n // A map, so values from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': item.color },\n }\n}\n"],"mappings":";;AAaA,MAAa,SAAS,SAAwB,KAAK,MAAM,KAAK;;AAG9D,SAAgB,YAAY,MAAsC;CAChE,OAAO,KAAK,KAAK,OAAO,UAAU;EAChC,MAAM,OAAmB;GAAE,KAAK,MAAM,KAAK;GAAG,MAAM,MAAM;GAAM;EAAM;EACtE,IAAI,MAAM,OAAO,KAAK,QAAQ,MAAM;EACpC,IAAI,MAAM,QAAQ,KAAK,SAAS;EAChC,OAAO;CACT,CAAC;AACH;;AAGA,SAAgB,WAAW,MAAa,OAAsB;CAC5D,OAAO;EACL,KAAK,MAAM,IAAI;EACf,OAAO;GAAC;GAAa,aAAa,QAAQ;GAAK,KAAK;EAAK;EACzD,eAAe,KAAK;EAEpB,OAAO,EAAE,qBAAqB,KAAK,MAAM;CAC3C;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/charts/named.ts
|
|
2
2
|
/** Stable key of a series, slice or ring: its `id`, or its name. */
|
|
3
3
|
const keyOf = (item) => item.id ?? item.name;
|
|
4
4
|
/** Legend entries for series, slices or rings, in their order (which is their color slot). */
|
|
@@ -27,7 +27,6 @@ function groupAttrs(item, index) {
|
|
|
27
27
|
style: { "--tc-series-color": item.color }
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { keyOf as n, legendItems as r, groupAttrs as t };
|
|
32
31
|
|
|
33
|
-
//# sourceMappingURL=named-
|
|
32
|
+
//# sourceMappingURL=named-BOiBah6I.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-
|
|
1
|
+
{"version":3,"file":"named-BOiBah6I.js","names":[],"sources":["../src/charts/named.ts"],"sourcesContent":["import type { LegendItem } from '../legend.ts'\nimport type { ClassValue, Props } from '../vnode.ts'\n\n/** What series, slices and rings have in common: a name, and how they look in a legend. */\nexport interface Named {\n name: string\n id?: string\n color?: string\n class?: ClassValue\n hidden?: boolean\n}\n\n/** Stable key of a series, slice or ring: its `id`, or its name. */\nexport const keyOf = (item: Named): string => item.id ?? item.name\n\n/** Legend entries for series, slices or rings, in their order (which is their color slot). */\nexport function legendItems(list: readonly Named[]): LegendItem[] {\n return list.map((entry, index) => {\n const item: LegendItem = { key: keyOf(entry), name: entry.name, index }\n if (entry.color) item.color = entry.color\n if (entry.hidden) item.hidden = true\n return item\n })\n}\n\n/** Attributes of the group of a series, slice or ring in color slot `index`. */\nexport function groupAttrs(item: Named, index: number): Props {\n return {\n key: keyOf(item),\n class: ['tc-series', `tc-series-${index + 1}`, item.class],\n 'data-series': item.name,\n // A map, so values from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': item.color },\n }\n}\n"],"mappings":";;AAaA,MAAa,SAAS,SAAwB,KAAK,MAAM,KAAK;;AAG9D,SAAgB,YAAY,MAAsC;CAChE,OAAO,KAAK,KAAK,OAAO,UAAU;EAChC,MAAM,OAAmB;GAAE,KAAK,MAAM,KAAK;GAAG,MAAM,MAAM;GAAM;EAAM;EACtE,IAAI,MAAM,OAAO,KAAK,QAAQ,MAAM;EACpC,IAAI,MAAM,QAAQ,KAAK,SAAS;EAChC,OAAO;CACT,CAAC;AACH;;AAGA,SAAgB,WAAW,MAAa,OAAsB;CAC5D,OAAO;EACL,KAAK,MAAM,IAAI;EACf,OAAO;GAAC;GAAa,aAAa,QAAQ;GAAK,KAAK;EAAK;EACzD,eAAe,KAAK;EAEpB,OAAO,EAAE,qBAAqB,KAAK,MAAM;CAC3C;AACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const require_named = require("./named-BBASc8dW.cjs");
|
|
2
|
+
// src/charts/others.ts
|
|
3
|
+
/** Legend key of the slice that groups the rest. */
|
|
4
|
+
const OTHERS = "__others__";
|
|
5
|
+
/**
|
|
6
|
+
* The slices of the data in its order: every entry, or with more of them
|
|
7
|
+
* than `maxSlices`, the largest ones and one slice for the rest (in the
|
|
8
|
+
* color of the slots past the palette), named by `label`. `maxSlices` is nine
|
|
9
|
+
* by default (the eight palette colors and the rest) and zero never groups.
|
|
10
|
+
* Hidden entries count here, so hiding one does not pull another out of the
|
|
11
|
+
* rest.
|
|
12
|
+
*/
|
|
13
|
+
function groupSlices(data, maxSlices, label = "Others") {
|
|
14
|
+
const all = data.map((entry, index) => ({
|
|
15
|
+
data: entry,
|
|
16
|
+
index,
|
|
17
|
+
value: Math.max(0, entry.value || 0)
|
|
18
|
+
}));
|
|
19
|
+
const max = Number.isFinite(maxSlices) && maxSlices >= 0 ? maxSlices : 9;
|
|
20
|
+
const limit = max ? Math.max(1, Math.round(max)) : Number.POSITIVE_INFINITY;
|
|
21
|
+
if (all.length <= limit) return all;
|
|
22
|
+
const kept = new Set([...all].sort((a, b) => b.value - a.value || a.index - b.index).slice(0, limit - 1));
|
|
23
|
+
const value = all.reduce((sum, slice) => kept.has(slice) ? sum : sum + slice.value, 0);
|
|
24
|
+
return [...all.filter((slice) => kept.has(slice)), {
|
|
25
|
+
data: {
|
|
26
|
+
name: label,
|
|
27
|
+
id: OTHERS,
|
|
28
|
+
value
|
|
29
|
+
},
|
|
30
|
+
index: Math.max(8, all.length),
|
|
31
|
+
value
|
|
32
|
+
}];
|
|
33
|
+
}
|
|
34
|
+
/** Legend entries of the slices as drawn, the rest included. */
|
|
35
|
+
function groupLegend(slices) {
|
|
36
|
+
return slices.map(({ data, index }) => {
|
|
37
|
+
const item = {
|
|
38
|
+
key: require_named.keyOf(data),
|
|
39
|
+
name: data.name,
|
|
40
|
+
index
|
|
41
|
+
};
|
|
42
|
+
if (data.color) item.color = data.color;
|
|
43
|
+
if (data.hidden) item.hidden = true;
|
|
44
|
+
return item;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
Object.defineProperty(exports, "groupLegend", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function() {
|
|
50
|
+
return groupLegend;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "groupSlices", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function() {
|
|
56
|
+
return groupSlices;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=others-DWdK7vKp.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"others-DWdK7vKp.cjs","names":["keyOf"],"sources":["../src/charts/others.ts"],"sourcesContent":["import type { LegendItem } from '../legend.ts'\nimport { keyOf, type Named } from './named.ts'\n\n/** Legend key of the slice that groups the rest. */\nconst OTHERS = '__others__'\n\n/** A slice or segment with its size, in color slot `index` (past the data for the rest). */\nexport interface Grouped<T> {\n data: T\n index: number\n value: number\n}\n\n/**\n * The slices of the data in its order: every entry, or with more of them\n * than `maxSlices`, the largest ones and one slice for the rest (in the\n * color of the slots past the palette), named by `label`. `maxSlices` is nine\n * by default (the eight palette colors and the rest) and zero never groups.\n * Hidden entries count here, so hiding one does not pull another out of the\n * rest.\n */\nexport function groupSlices<T extends Named & { value: number }>(\n data: readonly T[],\n maxSlices: number | undefined,\n label = 'Others',\n): Grouped<T>[] {\n const all = data.map((entry, index) => ({\n data: entry,\n index,\n value: Math.max(0, entry.value || 0),\n }))\n const max = Number.isFinite(maxSlices) && (maxSlices as number) >= 0 ? maxSlices : 9\n const limit = max ? Math.max(1, Math.round(max)) : Number.POSITIVE_INFINITY\n if (all.length <= limit) return all\n const kept = new Set(\n [...all].sort((a, b) => b.value - a.value || a.index - b.index).slice(0, limit - 1),\n )\n const value = all.reduce((sum, slice) => (kept.has(slice) ? sum : sum + slice.value), 0)\n return [\n ...all.filter((slice) => kept.has(slice)),\n { data: { name: label, id: OTHERS, value } as T, index: Math.max(8, all.length), value },\n ]\n}\n\n/** Legend entries of the slices as drawn, the rest included. */\nexport function groupLegend<T extends Named>(slices: readonly Grouped<T>[]): LegendItem[] {\n return slices.map(({ data, index }) => {\n const item: LegendItem = { key: keyOf(data), name: data.name, index }\n if (data.color) item.color = data.color\n if (data.hidden) item.hidden = true\n return item\n })\n}\n"],"mappings":";;;AAIA,MAAM,SAAS;;;;;;;;;AAiBf,SAAgB,YACd,MACA,WACA,QAAQ,UACM;CACd,MAAM,MAAM,KAAK,KAAK,OAAO,WAAW;EACtC,MAAM;EACN;EACA,OAAO,KAAK,IAAI,GAAG,MAAM,SAAS,CAAC;CACrC,EAAE;CACF,MAAM,MAAM,OAAO,SAAS,SAAS,KAAM,aAAwB,IAAI,YAAY;CACnF,MAAM,QAAQ,MAAM,KAAK,IAAI,GAAG,KAAK,MAAM,GAAG,CAAC,IAAI,OAAO;CAC1D,IAAI,IAAI,UAAU,OAAO,OAAO;CAChC,MAAM,OAAO,IAAI,IACf,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,GAAG,QAAQ,CAAC,CACpF;CACA,MAAM,QAAQ,IAAI,QAAQ,KAAK,UAAW,KAAK,IAAI,KAAK,IAAI,MAAM,MAAM,MAAM,OAAQ,CAAC;CACvF,OAAO,CACL,GAAG,IAAI,QAAQ,UAAU,KAAK,IAAI,KAAK,CAAC,GACxC;EAAE,MAAM;GAAE,MAAM;GAAO,IAAI;GAAQ;EAAM;EAAQ,OAAO,KAAK,IAAI,GAAG,IAAI,MAAM;EAAG;CAAM,CACzF;AACF;;AAGA,SAAgB,YAA6B,QAA6C;CACxF,OAAO,OAAO,KAAK,EAAE,MAAM,YAAY;EACrC,MAAM,OAAmB;GAAE,KAAKA,cAAAA,MAAM,IAAI;GAAG,MAAM,KAAK;GAAM;EAAM;EACpE,IAAI,KAAK,OAAO,KAAK,QAAQ,KAAK;EAClC,IAAI,KAAK,QAAQ,KAAK,SAAS;EAC/B,OAAO;CACT,CAAC;AACH"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { n as keyOf } from "./named-BOiBah6I.js";
|
|
2
|
+
// src/charts/others.ts
|
|
3
|
+
/** Legend key of the slice that groups the rest. */
|
|
4
|
+
const OTHERS = "__others__";
|
|
5
|
+
/**
|
|
6
|
+
* The slices of the data in its order: every entry, or with more of them
|
|
7
|
+
* than `maxSlices`, the largest ones and one slice for the rest (in the
|
|
8
|
+
* color of the slots past the palette), named by `label`. `maxSlices` is nine
|
|
9
|
+
* by default (the eight palette colors and the rest) and zero never groups.
|
|
10
|
+
* Hidden entries count here, so hiding one does not pull another out of the
|
|
11
|
+
* rest.
|
|
12
|
+
*/
|
|
13
|
+
function groupSlices(data, maxSlices, label = "Others") {
|
|
14
|
+
const all = data.map((entry, index) => ({
|
|
15
|
+
data: entry,
|
|
16
|
+
index,
|
|
17
|
+
value: Math.max(0, entry.value || 0)
|
|
18
|
+
}));
|
|
19
|
+
const max = Number.isFinite(maxSlices) && maxSlices >= 0 ? maxSlices : 9;
|
|
20
|
+
const limit = max ? Math.max(1, Math.round(max)) : Number.POSITIVE_INFINITY;
|
|
21
|
+
if (all.length <= limit) return all;
|
|
22
|
+
const kept = new Set([...all].sort((a, b) => b.value - a.value || a.index - b.index).slice(0, limit - 1));
|
|
23
|
+
const value = all.reduce((sum, slice) => kept.has(slice) ? sum : sum + slice.value, 0);
|
|
24
|
+
return [...all.filter((slice) => kept.has(slice)), {
|
|
25
|
+
data: {
|
|
26
|
+
name: label,
|
|
27
|
+
id: OTHERS,
|
|
28
|
+
value
|
|
29
|
+
},
|
|
30
|
+
index: Math.max(8, all.length),
|
|
31
|
+
value
|
|
32
|
+
}];
|
|
33
|
+
}
|
|
34
|
+
/** Legend entries of the slices as drawn, the rest included. */
|
|
35
|
+
function groupLegend(slices) {
|
|
36
|
+
return slices.map(({ data, index }) => {
|
|
37
|
+
const item = {
|
|
38
|
+
key: keyOf(data),
|
|
39
|
+
name: data.name,
|
|
40
|
+
index
|
|
41
|
+
};
|
|
42
|
+
if (data.color) item.color = data.color;
|
|
43
|
+
if (data.hidden) item.hidden = true;
|
|
44
|
+
return item;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { groupSlices as n, groupLegend as t };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=others-J7NCAMA0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"others-J7NCAMA0.js","names":[],"sources":["../src/charts/others.ts"],"sourcesContent":["import type { LegendItem } from '../legend.ts'\nimport { keyOf, type Named } from './named.ts'\n\n/** Legend key of the slice that groups the rest. */\nconst OTHERS = '__others__'\n\n/** A slice or segment with its size, in color slot `index` (past the data for the rest). */\nexport interface Grouped<T> {\n data: T\n index: number\n value: number\n}\n\n/**\n * The slices of the data in its order: every entry, or with more of them\n * than `maxSlices`, the largest ones and one slice for the rest (in the\n * color of the slots past the palette), named by `label`. `maxSlices` is nine\n * by default (the eight palette colors and the rest) and zero never groups.\n * Hidden entries count here, so hiding one does not pull another out of the\n * rest.\n */\nexport function groupSlices<T extends Named & { value: number }>(\n data: readonly T[],\n maxSlices: number | undefined,\n label = 'Others',\n): Grouped<T>[] {\n const all = data.map((entry, index) => ({\n data: entry,\n index,\n value: Math.max(0, entry.value || 0),\n }))\n const max = Number.isFinite(maxSlices) && (maxSlices as number) >= 0 ? maxSlices : 9\n const limit = max ? Math.max(1, Math.round(max)) : Number.POSITIVE_INFINITY\n if (all.length <= limit) return all\n const kept = new Set(\n [...all].sort((a, b) => b.value - a.value || a.index - b.index).slice(0, limit - 1),\n )\n const value = all.reduce((sum, slice) => (kept.has(slice) ? sum : sum + slice.value), 0)\n return [\n ...all.filter((slice) => kept.has(slice)),\n { data: { name: label, id: OTHERS, value } as T, index: Math.max(8, all.length), value },\n ]\n}\n\n/** Legend entries of the slices as drawn, the rest included. */\nexport function groupLegend<T extends Named>(slices: readonly Grouped<T>[]): LegendItem[] {\n return slices.map(({ data, index }) => {\n const item: LegendItem = { key: keyOf(data), name: data.name, index }\n if (data.color) item.color = data.color\n if (data.hidden) item.hidden = true\n return item\n })\n}\n"],"mappings":";;;AAIA,MAAM,SAAS;;;;;;;;;AAiBf,SAAgB,YACd,MACA,WACA,QAAQ,UACM;CACd,MAAM,MAAM,KAAK,KAAK,OAAO,WAAW;EACtC,MAAM;EACN;EACA,OAAO,KAAK,IAAI,GAAG,MAAM,SAAS,CAAC;CACrC,EAAE;CACF,MAAM,MAAM,OAAO,SAAS,SAAS,KAAM,aAAwB,IAAI,YAAY;CACnF,MAAM,QAAQ,MAAM,KAAK,IAAI,GAAG,KAAK,MAAM,GAAG,CAAC,IAAI,OAAO;CAC1D,IAAI,IAAI,UAAU,OAAO,OAAO;CAChC,MAAM,OAAO,IAAI,IACf,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,GAAG,QAAQ,CAAC,CACpF;CACA,MAAM,QAAQ,IAAI,QAAQ,KAAK,UAAW,KAAK,IAAI,KAAK,IAAI,MAAM,MAAM,MAAM,OAAQ,CAAC;CACvF,OAAO,CACL,GAAG,IAAI,QAAQ,UAAU,KAAK,IAAI,KAAK,CAAC,GACxC;EAAE,MAAM;GAAE,MAAM;GAAO,IAAI;GAAQ;EAAM;EAAQ,OAAO,KAAK,IAAI,GAAG,IAAI,MAAM;EAAG;CAAM,CACzF;AACF;;AAGA,SAAgB,YAA6B,QAA6C;CACxF,OAAO,OAAO,KAAK,EAAE,MAAM,YAAY;EACrC,MAAM,OAAmB;GAAE,KAAK,MAAM,IAAI;GAAG,MAAM,KAAK;GAAM;EAAM;EACpE,IAAI,KAAK,OAAO,KAAK,QAAQ,KAAK;EAClC,IAAI,KAAK,QAAQ,KAAK,SAAS;EAC/B,OAAO;CACT,CAAC;AACH"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { a as ChartType } from "./chart-QilhWP8Z.js";
|
|
2
|
+
import { c as NumberFormat } from "./time-DRIDgv2a.js";
|
|
3
|
+
import { a as InsetsInput } from "./annotations-B02GR_KU.js";
|
|
4
|
+
import { a as ClassValue } from "./vnode-Du2cC8Fm.js";
|
|
5
|
+
/** One party (or group) of a parliament. */
|
|
6
|
+
interface ParliamentParty {
|
|
7
|
+
name: string;
|
|
8
|
+
/** Seats won; a fraction is rounded, a negative count is zero. */
|
|
9
|
+
seats: number;
|
|
10
|
+
/** Stable identity for keyed updates and legend toggles. Defaults to `name`. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom color; overrides the palette slot via `--tc-series-color`.
|
|
14
|
+
* Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
|
|
15
|
+
*/
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Extra classes on the party group. */
|
|
18
|
+
class?: ClassValue;
|
|
19
|
+
/** Start hidden (toggle it back from the legend). */
|
|
20
|
+
hidden?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface ParliamentOptions {
|
|
23
|
+
/** Parties in their order along the benches, from the left. */
|
|
24
|
+
data: readonly ParliamentParty[];
|
|
25
|
+
/**
|
|
26
|
+
* Seats in the house. Defaults to the parties' sum; more than that leaves
|
|
27
|
+
* vacant seats, drawn empty after the last party.
|
|
28
|
+
*/
|
|
29
|
+
total?: number;
|
|
30
|
+
/** Rows of seats. Defaults to the fewest rows that seat everyone comfortably. */
|
|
31
|
+
rows?: number;
|
|
32
|
+
/** Where the benches start, in degrees clockwise from 12 o'clock. Defaults to `-angle / 2`. */
|
|
33
|
+
startAngle?: number;
|
|
34
|
+
/** Degrees the benches span, `0…360`. Defaults to `180` (a hemicycle). */
|
|
35
|
+
angle?: number;
|
|
36
|
+
/** Radius of the innermost row relative to the outermost, `0…0.95`. Defaults to `0.45`. */
|
|
37
|
+
innerRadius?: number;
|
|
38
|
+
/** Space between seats as a share of their pitch, `0…0.9`. Defaults to `0.35`. */
|
|
39
|
+
gap?: number;
|
|
40
|
+
/** Format of the seat counts (tooltip, table, center). */
|
|
41
|
+
format?: NumberFormat;
|
|
42
|
+
/**
|
|
43
|
+
* Text in the middle: the number of seats by default; `false` hides it, or
|
|
44
|
+
* give your own `value` / `label` (the label sits above the value).
|
|
45
|
+
*/
|
|
46
|
+
center?: false | {
|
|
47
|
+
value?: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
};
|
|
50
|
+
/** Extra space around the chart, in pixels. */
|
|
51
|
+
padding?: InsetsInput;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Parliament chart: the seats of a house as dots on concentric benches, a
|
|
55
|
+
* hemicycle by default, each party a wedge of them in data order from the
|
|
56
|
+
* left, with the number of seats in the middle.
|
|
57
|
+
*
|
|
58
|
+
* ```ts
|
|
59
|
+
* new Chart('#el', {
|
|
60
|
+
* type: parliament,
|
|
61
|
+
* data: [{ name: 'Left', seats: 135 }, { name: 'Right', seats: 57 }, { name: 'Other', seats: 7 }],
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
declare const parliament: ChartType<ParliamentOptions>;
|
|
66
|
+
export { ParliamentParty as n, parliament as r, ParliamentOptions as t };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { a as ChartType } from "./chart-kqFMEwDo.cjs";
|
|
2
|
+
import { c as NumberFormat } from "./time-B4oxWHQI.cjs";
|
|
3
|
+
import { a as InsetsInput } from "./annotations-CHafaGd4.cjs";
|
|
4
|
+
import { a as ClassValue } from "./vnode-Du2cC8Fm.cjs";
|
|
5
|
+
/** One party (or group) of a parliament. */
|
|
6
|
+
interface ParliamentParty {
|
|
7
|
+
name: string;
|
|
8
|
+
/** Seats won; a fraction is rounded, a negative count is zero. */
|
|
9
|
+
seats: number;
|
|
10
|
+
/** Stable identity for keyed updates and legend toggles. Defaults to `name`. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom color; overrides the palette slot via `--tc-series-color`.
|
|
14
|
+
* Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.
|
|
15
|
+
*/
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Extra classes on the party group. */
|
|
18
|
+
class?: ClassValue;
|
|
19
|
+
/** Start hidden (toggle it back from the legend). */
|
|
20
|
+
hidden?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface ParliamentOptions {
|
|
23
|
+
/** Parties in their order along the benches, from the left. */
|
|
24
|
+
data: readonly ParliamentParty[];
|
|
25
|
+
/**
|
|
26
|
+
* Seats in the house. Defaults to the parties' sum; more than that leaves
|
|
27
|
+
* vacant seats, drawn empty after the last party.
|
|
28
|
+
*/
|
|
29
|
+
total?: number;
|
|
30
|
+
/** Rows of seats. Defaults to the fewest rows that seat everyone comfortably. */
|
|
31
|
+
rows?: number;
|
|
32
|
+
/** Where the benches start, in degrees clockwise from 12 o'clock. Defaults to `-angle / 2`. */
|
|
33
|
+
startAngle?: number;
|
|
34
|
+
/** Degrees the benches span, `0…360`. Defaults to `180` (a hemicycle). */
|
|
35
|
+
angle?: number;
|
|
36
|
+
/** Radius of the innermost row relative to the outermost, `0…0.95`. Defaults to `0.45`. */
|
|
37
|
+
innerRadius?: number;
|
|
38
|
+
/** Space between seats as a share of their pitch, `0…0.9`. Defaults to `0.35`. */
|
|
39
|
+
gap?: number;
|
|
40
|
+
/** Format of the seat counts (tooltip, table, center). */
|
|
41
|
+
format?: NumberFormat;
|
|
42
|
+
/**
|
|
43
|
+
* Text in the middle: the number of seats by default; `false` hides it, or
|
|
44
|
+
* give your own `value` / `label` (the label sits above the value).
|
|
45
|
+
*/
|
|
46
|
+
center?: false | {
|
|
47
|
+
value?: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
};
|
|
50
|
+
/** Extra space around the chart, in pixels. */
|
|
51
|
+
padding?: InsetsInput;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Parliament chart: the seats of a house as dots on concentric benches, a
|
|
55
|
+
* hemicycle by default, each party a wedge of them in data order from the
|
|
56
|
+
* left, with the number of seats in the middle.
|
|
57
|
+
*
|
|
58
|
+
* ```ts
|
|
59
|
+
* new Chart('#el', {
|
|
60
|
+
* type: parliament,
|
|
61
|
+
* data: [{ name: 'Left', seats: 135 }, { name: 'Right', seats: 57 }, { name: 'Other', seats: 7 }],
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
declare const parliament: ChartType<ParliamentOptions>;
|
|
66
|
+
export { ParliamentParty as n, parliament as r, ParliamentOptions as t };
|