@tabler/charts 0.1.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 +19 -1
- 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/{arc-a1tRTEw7.js → arc-B3V5IR0w.js} +2 -3
- package/dist/{arc-a1tRTEw7.js.map → arc-B3V5IR0w.js.map} +1 -1
- package/dist/{arc-BXpLrt9b.cjs → arc-CYhI62kO.cjs} +2 -3
- package/dist/{arc-BXpLrt9b.cjs.map → arc-CYhI62kO.cjs.map} +1 -1
- 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-CF__HOwL.d.ts → area-CJX9219z.d.cts} +3 -6
- package/dist/{area-DIxaAbYZ.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-BBM8RhoL.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-CRKLDg98.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-D_vV0_XZ.d.ts → candlestick-D0xKkdqd.d.ts} +3 -6
- package/dist/{candlestick-__pXl_pV.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-DyN7bcx8.d.ts → chart-QilhWP8Z.d.ts} +32 -49
- package/dist/{chart-CowF_lWY.cjs → chart-e2VqomCI.cjs} +35 -24
- package/dist/chart-e2VqomCI.cjs.map +1 -0
- package/dist/{chart-D7ooEFnk.d.cts → chart-kqFMEwDo.d.cts} +58 -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-CegR_j55.js → core-BKRQvPAT.js} +33 -41
- package/dist/core-BKRQvPAT.js.map +1 -0
- package/dist/{core-RzS9IQO5.cjs → core-DIOC61up.cjs} +33 -41
- package/dist/core-DIOC61up.cjs.map +1 -0
- package/dist/{core-DcbemzGf.d.ts → core-DRUCk67j.d.ts} +4 -41
- package/dist/{core-D1vO1LrC.d.cts → core-PAX5ogLk.d.cts} +22 -67
- package/dist/core.cjs +28 -24
- package/dist/core.d.cts +23 -21
- package/dist/core.d.ts +23 -21
- package/dist/core.js +27 -25
- 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-zpia05t2.d.ts → gauge-0VJuAHWF.d.ts} +5 -8
- package/dist/{gauge-DP_EB2z3.d.cts → gauge-BSist7My.d.cts} +5 -8
- package/dist/{gauge-D-FYhuds.cjs → gauge-DXkjXNCD.cjs} +10 -11
- package/dist/gauge-DXkjXNCD.cjs.map +1 -0
- package/dist/{gauge-Dh423FHh.js → gauge-ts0kqN1-.js} +10 -11
- package/dist/{gauge-Dh423FHh.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-BectCEeE.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-CCso6m61.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 +49 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -27
- package/dist/index.d.ts +24 -27
- package/dist/index.js +44 -43
- 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-CN4uZ9ZX.d.ts → line-DtSh7HQU.d.ts} +4 -7
- package/dist/{line-W7VD_qs1.d.cts → 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-1Zv2Xh0D.d.ts → parliament-CLCI7tUO.d.ts} +5 -8
- package/dist/{parliament-DdrLVZwt.d.cts → parliament-CgsVnWEe.d.cts} +5 -8
- package/dist/{parliament-Dw0sOERi.js → parliament-Cru4IcuM.js} +8 -9
- package/dist/parliament-Cru4IcuM.js.map +1 -0
- package/dist/{parliament-CpWnoEvG.cjs → parliament-x5hcFaQ3.cjs} +8 -9
- package/dist/parliament-x5hcFaQ3.cjs.map +1 -0
- package/dist/parliament.cjs +1 -1
- package/dist/parliament.d.cts +2 -1
- package/dist/parliament.d.ts +2 -1
- package/dist/parliament.js +1 -2
- 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-5z1fDdKO.d.ts → pie-BXg2gNpb.d.cts} +14 -8
- package/dist/{pie-BxTZt6Go.cjs → pie-BpjvSPnz.cjs} +13 -17
- package/dist/pie-BpjvSPnz.cjs.map +1 -0
- package/dist/{pie-BF9yI5mE.d.cts → pie-CFptILSm.d.ts} +14 -8
- package/dist/{pie-DzUXDTcn.js → pie-CVsc-6qD.js} +13 -17
- 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-1-EryihA.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-DBW4O0Vt.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-OV_WoPrl.d.ts → sankey-D_v7KxnJ.d.ts} +4 -7
- package/dist/{sankey-DuGI3Qc5.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-BqzgJqdX.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-DbxLyZX0.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-CWlJDKyh.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-BfyO_oNM.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-CbfR7--d.js → sweep-BpRPlhs6.js} +5 -6
- package/dist/{sweep-CbfR7--d.js.map → sweep-BpRPlhs6.js.map} +1 -1
- package/dist/{sweep-DaTEDDuC.cjs → sweep-Dnp6LDBz.cjs} +5 -6
- 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 +21 -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-CegR_j55.js.map +0 -1
- package/dist/core-RzS9IQO5.cjs.map +0 -1
- package/dist/gauge-D-FYhuds.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/parliament-CpWnoEvG.cjs.map +0 -1
- package/dist/parliament-Dw0sOERi.js.map +0 -1
- package/dist/pie-BxTZt6Go.cjs.map +0 -1
- package/dist/pie-DzUXDTcn.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-DaTEDDuC.cjs.map +0 -1
- package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
- package/dist/value-labels-IZIQPhfk.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
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 CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-
|
|
13
|
-
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-
|
|
14
|
-
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-
|
|
15
|
-
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-
|
|
16
|
-
import {
|
|
17
|
-
import { n as
|
|
18
|
-
import {
|
|
19
|
-
import { i as
|
|
20
|
-
import { n as
|
|
21
|
-
import { n as
|
|
22
|
-
|
|
1
|
+
import { a as linear, i as LinearScaleOptions, n as log, r as LinearScale, t as LogScaleOptions } from "./log-CI41TmcU.cjs";
|
|
2
|
+
import { a as timePointScale, c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, i as time, l as NumberFormatOptions, m as getDateFormat, n as TimeScaleOptions, o as DateFormat, p as formatTicks, r as TimeValue, s as Locale, t as TimeScale, u as formatDate } from "./time-B4oxWHQI.cjs";
|
|
3
|
+
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-CNKvdnTC.cjs";
|
|
4
|
+
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-YeUiOfG8.cjs";
|
|
5
|
+
import { n as lttbIndices, t as lttb } from "./decimate-BxxYBJJk.cjs";
|
|
6
|
+
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";
|
|
7
|
+
import { $ as LegendOptions, B as DownloadOptions, C as DownloadOption, Ct as describeHit, D as ChartPlugin, Dt as HitTester, E as BeforeRenderState, Et as HitItem, F as register, G as exportImage, H as ExportTarget, I as ArcOptions, K as exportSVG, L as arcCentroid, M as Features, N as feature, O as PluginInstance, Ot as Interaction, P as features, Q as LegendItem, R as arcPathStable, S as DownloadMenuOptions, St as DataTable, T as AfterRenderState, Tt as Hit, U as ImageOptions, V as ExportOptions, W as downloadChart, _ as TooltipPlacement, _t as axis, a as ChartType, at as Label, b as tooltipContent, bt as linearTicks, c as Size, ct as categoryInteraction, d as chartLabel, dt as seriesLegend, et as defaultHidden, f as chartToString, ft as seriesTable, g as TooltipOptions, gt as Tick, h as resolveSize, ht as LinearTicksOptions, i as ChartEvents, it as CategoryAxisOptions, l as buildChart, lt as domainOf, m as resolveLegend, mt as AxisPosition, n as Chart$1, nt as CartesianData, o as RenderContext, ot as Series, p as renderContext, pt as AxisOptions, r as ChartConfig, rt as CartesianOptions, s as ResolvedLegend, st as ValueAxisOptions, t as BaseOptions, tt as legendContent, u as chartEvents, ut as seriesKey, v as hitAnchor, vt as axisSize, w as download, wt as tableContent, x as DownloadFormat, xt as thinTicks, y as placeTooltip, yt as bandTicks, z as padAngleForGap } from "./chart-kqFMEwDo.cjs";
|
|
8
|
+
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";
|
|
9
|
+
import { n as line, t as LineOptions } from "./line-_rNdeKmS.cjs";
|
|
10
|
+
import { n as area, t as AreaOptions } from "./area-CJX9219z.cjs";
|
|
11
|
+
import { n as bar, t as BarOptions } from "./bar-BDLR4p9c.cjs";
|
|
12
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-Dq7qp-F0.cjs";
|
|
13
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-BSist7My.cjs";
|
|
14
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-Dp_oyEe0.cjs";
|
|
15
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-CgsVnWEe.cjs";
|
|
16
|
+
import { n as PercentageBarSegment, r as percentageBar, t as PercentageBarOptions } from "./percentage-bar-tepMr7Hd.cjs";
|
|
17
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-BXg2gNpb.cjs";
|
|
18
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-D1-lItDy.cjs";
|
|
19
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-Dk7jUt8x.cjs";
|
|
20
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-DZeEIfyo.cjs";
|
|
21
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-DAP6jtzw.cjs";
|
|
22
|
+
import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-BAkhmVQc.cjs";
|
|
23
|
+
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-PAX5ogLk.cjs";
|
|
23
24
|
/**
|
|
24
25
|
* A chart with every built-in plugin installed: hover highlight, legend,
|
|
25
26
|
* tooltip, data table and keyboard navigation. Each can be switched off in
|
|
@@ -33,14 +34,10 @@ import { n as lttbIndices, t as lttb } from "./decimate-CNSpgGa5.cjs";
|
|
|
33
34
|
export declare class Chart<O extends object = object> extends Chart$1<O> {
|
|
34
35
|
constructor(target: Element | string, config: ChartConfig<O>);
|
|
35
36
|
}
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/chart-types.d.ts
|
|
38
37
|
/**
|
|
39
38
|
* Every built-in chart type by its name, for charts declared in markup
|
|
40
39
|
* (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
|
|
41
40
|
* brings every type along: code that knows its types imports them directly.
|
|
42
41
|
*/
|
|
43
42
|
export declare const types: Readonly<Record<string, ChartType<never>>>;
|
|
44
|
-
|
|
45
|
-
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 Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type DownloadOptions, type ExportOptions, type ExportTarget, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type ImageOptions, 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 LogScaleOptions, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, 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 Tick, type TimeScale, type TimeScaleOptions, type TimeValue, type TooltipOptions, type TooltipPlacement, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, time, timePointScale, tooltip, tooltipContent };
|
|
46
|
-
//# sourceMappingURL=index.d.cts.map
|
|
43
|
+
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 Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type DownloadOptions, type ExportOptions, type ExportTarget, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type ImageOptions, 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 LogScaleOptions, 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 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 Tick, type TimeScale, type TimeScaleOptions, type TimeValue, type TooltipOptions, type TooltipPlacement, type TreemapNode, type TreemapOptions, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, time, timePointScale, tooltip, tooltipContent, treemap };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
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-
|
|
2
|
-
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-
|
|
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-
|
|
4
|
-
import {
|
|
5
|
-
import { a as timePointScale, c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, i as time, l as NumberFormatOptions, m as getDateFormat, n as TimeScaleOptions, o as DateFormat, p as formatTicks, r as TimeValue, s as Locale, t as TimeScale, u as formatDate } from "./time-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-
|
|
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 CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-
|
|
13
|
-
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-
|
|
14
|
-
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-
|
|
15
|
-
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-
|
|
16
|
-
import {
|
|
17
|
-
import { n as
|
|
18
|
-
import {
|
|
19
|
-
import { i as
|
|
20
|
-
import { n as
|
|
21
|
-
import { n as
|
|
22
|
-
|
|
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
|
+
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-CNKvdnTC.js";
|
|
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 { a as linear, i as LinearScaleOptions, n as log, r as LinearScale, t as LogScaleOptions } from "./log-CI41TmcU.js";
|
|
5
|
+
import { a as timePointScale, c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, i as time, l as NumberFormatOptions, m as getDateFormat, n as TimeScaleOptions, o as DateFormat, p as formatTicks, r as TimeValue, s as Locale, t as TimeScale, u as formatDate } from "./time-DRIDgv2a.js";
|
|
6
|
+
import { n as lttbIndices, t as lttb } from "./decimate-Du87fMLG.js";
|
|
7
|
+
import { $ as CartesianOptions, B as downloadChart, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, H as exportSVG, I as DownloadOptions, J as LegendItem, L as ExportOptions, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, R as ExportTarget, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, V as exportImage, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart$1, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit, z as ImageOptions } from "./chart-QilhWP8Z.js";
|
|
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-DtSh7HQU.js";
|
|
10
|
+
import { n as area, t as AreaOptions } from "./area-d11XePuw.js";
|
|
11
|
+
import { n as bar, t as BarOptions } from "./bar-XwzM6Pb0.js";
|
|
12
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-D0xKkdqd.js";
|
|
13
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-0VJuAHWF.js";
|
|
14
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-59lmClj9.js";
|
|
15
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-CLCI7tUO.js";
|
|
16
|
+
import { n as PercentageBarSegment, r as percentageBar, t as PercentageBarOptions } from "./percentage-bar-nhTeakD_.js";
|
|
17
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-CFptILSm.js";
|
|
18
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-BC9Skgpj.js";
|
|
19
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-D_v7KxnJ.js";
|
|
20
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-CXEsioOJ.js";
|
|
21
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-cbvRkWqS.js";
|
|
22
|
+
import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-BNpxFBao.js";
|
|
23
|
+
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-DRUCk67j.js";
|
|
23
24
|
/**
|
|
24
25
|
* A chart with every built-in plugin installed: hover highlight, legend,
|
|
25
26
|
* tooltip, data table and keyboard navigation. Each can be switched off in
|
|
@@ -33,14 +34,10 @@ import { n as lttbIndices, t as lttb } from "./decimate-BGg9XgF0.js";
|
|
|
33
34
|
export declare class Chart<O extends object = object> extends Chart$1<O> {
|
|
34
35
|
constructor(target: Element | string, config: ChartConfig<O>);
|
|
35
36
|
}
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/chart-types.d.ts
|
|
38
37
|
/**
|
|
39
38
|
* Every built-in chart type by its name, for charts declared in markup
|
|
40
39
|
* (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
|
|
41
40
|
* brings every type along: code that knows its types imports them directly.
|
|
42
41
|
*/
|
|
43
42
|
export declare const types: Readonly<Record<string, ChartType<never>>>;
|
|
44
|
-
|
|
45
|
-
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 Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type DownloadOptions, type ExportOptions, type ExportTarget, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type ImageOptions, 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 LogScaleOptions, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, 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 Tick, type TimeScale, type TimeScaleOptions, type TimeValue, type TooltipOptions, type TooltipPlacement, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, time, timePointScale, tooltip, tooltipContent };
|
|
46
|
-
//# sourceMappingURL=index.d.ts.map
|
|
43
|
+
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 Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type DownloadOptions, type ExportOptions, type ExportTarget, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type ImageOptions, 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 LogScaleOptions, 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 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 Tick, type TimeScale, type TimeScaleOptions, type TimeValue, type TooltipOptions, type TooltipPlacement, type TreemapNode, type TreemapOptions, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, time, timePointScale, tooltip, tooltipContent, treemap };
|
package/dist/index.js
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-
|
|
2
|
-
import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-
|
|
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-
|
|
4
|
-
import { A as tickIncrement, C as grid, D as linearTicks, E as bandTicks, M as ticks, O as thinTicks, S as point, T as axisSize, b as linear, f as seriesKey, j as tickStep, k as niceDomain, m as seriesTable, n as categoryInteraction, p as seriesLegend, r as domainOf, w as axis, x as band } from "./cartesian-
|
|
5
|
-
import {
|
|
6
|
-
import { t as extent } from "./extent-
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import { a as render } from "./dom-
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import { n as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as
|
|
19
|
-
import { n as
|
|
20
|
-
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-
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { n as hbarPath, t as barPath } from "./bar-
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-
|
|
27
|
-
import { t as
|
|
28
|
-
import { t as
|
|
29
|
-
import { t as parliament } from "./parliament-
|
|
30
|
-
import {
|
|
31
|
-
import { t as
|
|
32
|
-
import { t as
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
35
|
-
import {
|
|
36
|
-
|
|
1
|
+
import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-DmrrLjwN.js";
|
|
2
|
+
import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-_EMUqysL.js";
|
|
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 { A as tickIncrement, C as grid, D as linearTicks, E as bandTicks, M as ticks, O as thinTicks, S as point, T as axisSize, b as linear, f as seriesKey, j as tickStep, k as niceDomain, m as seriesTable, n as categoryInteraction, p as seriesLegend, r as domainOf, w as axis, x as band } from "./cartesian-CI2x6N7N.js";
|
|
5
|
+
import { n as annotationValues, t as annotationLayers } from "./annotations-D0YQ0IoA.js";
|
|
6
|
+
import { t as extent } from "./extent-DOV8rs-6.js";
|
|
7
|
+
import { t as dateLabels } from "./dates-C2RzY3rE.js";
|
|
8
|
+
import { n as logTicks, r as log, t as logDomain } from "./log-axis-DhthtHFk.js";
|
|
9
|
+
import { n as patternFills } from "./patterns-CufKZYhm.js";
|
|
10
|
+
import { n as shapesStep, t as markerPath } from "./point-shapes-DD2Ektzm.js";
|
|
11
|
+
import { a as render } from "./dom-CuceR8gt.js";
|
|
12
|
+
import { n as time, r as timePointScale, t as timeAxis } from "./time-axis-FLONo54E.js";
|
|
13
|
+
import { t as labelsStep } from "./value-labels-BBuSi4i0.js";
|
|
14
|
+
import { i as register, n as feature, r as features, t as addPost } from "./features-BMxkqCyS.js";
|
|
15
|
+
import { t as hydrate } from "./hydrate-OA6R2_Pn.js";
|
|
16
|
+
import { t as morph } from "./morph-DnRxuwR-.js";
|
|
17
|
+
import { n as lttbIndices, t as lttb } from "./decimate-CapfgiDY.js";
|
|
18
|
+
import { n as areaPath, r as linePath } from "./fade-GGxcBdss.js";
|
|
19
|
+
import { _ as defaultHidden, a as chartToString, c as resolveSize, g as renderToString, h as escapeText, i as chartLabel, l as cancel, m as escapeAttr, n as buildChart, o as renderContext, p as schedule, r as chartEvents, s as resolveLegend, t as Chart$1, u as flush, v as legendContent } from "./chart-DWn9v6qw.js";
|
|
20
|
+
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-BKRQvPAT.js";
|
|
21
|
+
import { t as area } from "./area-0-L1bG9B.js";
|
|
22
|
+
import { t as bar } from "./bar-BNZ3GhIw.js";
|
|
23
|
+
import { n as hbarPath, t as barPath } from "./bar-B5n2oq9-.js";
|
|
24
|
+
import { t as candlestick } from "./candlestick-BHQkQfxH.js";
|
|
25
|
+
import { t as gauge } from "./gauge-ts0kqN1-.js";
|
|
26
|
+
import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-B3V5IR0w.js";
|
|
27
|
+
import { t as heatmap } from "./heatmap-19BGJTKF.js";
|
|
28
|
+
import { t as line } from "./line-DO66LtwH.js";
|
|
29
|
+
import { t as parliament } from "./parliament-Cru4IcuM.js";
|
|
30
|
+
import { t as percentageBar } from "./percentage-bar-B6tNOqNn.js";
|
|
31
|
+
import { n as pie, t as donut } from "./pie-CVsc-6qD.js";
|
|
32
|
+
import { t as radar } from "./radar-BR-mumDd.js";
|
|
33
|
+
import { t as sankey } from "./sankey-D6JeZfK5.js";
|
|
34
|
+
import { t as scatter } from "./scatter-C0TWjFpW.js";
|
|
35
|
+
import { t as sparkline } from "./sparkline-XO_TqCNP.js";
|
|
36
|
+
import { t as treemap } from "./treemap-CQdavQ9u.js";
|
|
37
|
+
import { n as exportImage, r as exportSVG, t as downloadChart } from "./export-chart-83UYH48t.js";
|
|
38
|
+
// src/chart-default.ts
|
|
37
39
|
/**
|
|
38
40
|
* A chart with every built-in plugin installed: hover highlight, legend,
|
|
39
41
|
* tooltip, data table and keyboard navigation. Each can be switched off in
|
|
@@ -49,8 +51,7 @@ var Chart = class extends Chart$1 {
|
|
|
49
51
|
super(target, config, defaultPlugins());
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
|
-
|
|
53
|
-
//#region src/chart-types.ts
|
|
54
|
+
// src/chart-types.ts
|
|
54
55
|
/**
|
|
55
56
|
* Every built-in chart type by its name, for charts declared in markup
|
|
56
57
|
* (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
|
|
@@ -69,10 +70,11 @@ const types = {
|
|
|
69
70
|
candlestick,
|
|
70
71
|
radar,
|
|
71
72
|
sankey,
|
|
72
|
-
parliament
|
|
73
|
+
parliament,
|
|
74
|
+
treemap,
|
|
75
|
+
"percentage-bar": percentageBar
|
|
73
76
|
};
|
|
74
|
-
|
|
75
|
-
//#region src/index.ts
|
|
77
|
+
// src/index.ts
|
|
76
78
|
/**
|
|
77
79
|
* `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`
|
|
78
80
|
* that installs the built-in plugins (tooltip, legend, keyboard, …) and
|
|
@@ -109,7 +111,6 @@ register({
|
|
|
109
111
|
});
|
|
110
112
|
addPost(shapesStep);
|
|
111
113
|
addPost(labelsStep);
|
|
112
|
-
|
|
113
|
-
export { Chart, LINE_HEIGHT, VERSION, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, time, timePointScale, tooltip, tooltipContent, types };
|
|
114
|
+
export { Chart, LINE_HEIGHT, VERSION, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, time, timePointScale, tooltip, tooltipContent, treemap, types };
|
|
114
115
|
|
|
115
116
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CoreChart"],"sources":["../src/chart-default.ts","../src/chart-types.ts","../src/index.ts"],"sourcesContent":["import { type ChartConfig, Chart as CoreChart } from './chart.ts'\nimport { defaultPlugins } from './plugins/index.ts'\n\n/**\n * A chart with every built-in plugin installed: hover highlight, legend,\n * tooltip, data table and keyboard navigation. Each can be switched off in\n * the config (`tooltip: false`, …). For the smallest bundle, use the bare\n * `Chart` from `@tabler/charts/core` and pick plugins explicitly.\n *\n * ```ts\n * const chart = new Chart('#sales', { type: line, data })\n * ```\n */\nexport class Chart<O extends object = object> extends CoreChart<O> {\n constructor(target: Element | string, config: ChartConfig<O>) {\n super(target, config, defaultPlugins())\n }\n}\n","import type { ChartType } from './chart.ts'\nimport { area } from './charts/area.ts'\nimport { bar } from './charts/bar.ts'\nimport { candlestick } from './charts/candlestick.ts'\nimport { gauge } from './charts/gauge.ts'\nimport { heatmap } from './charts/heatmap.ts'\nimport { line } from './charts/line.ts'\nimport { parliament } from './charts/parliament.ts'\nimport { donut, pie } from './charts/pie.ts'\nimport { radar } from './charts/radar.ts'\nimport { sankey } from './charts/sankey.ts'\nimport { scatter } from './charts/scatter.ts'\nimport { sparkline } from './charts/sparkline.ts'\n\n/**\n * Every built-in chart type by its name, for charts declared in markup\n * (`<tabler-chart type=\"line\">`, `data-tc-chart=\"line\"`). Importing it\n * brings every type along: code that knows its types imports them directly.\n */\nexport const types: Readonly<Record<string, ChartType<never>>> = {\n line,\n area,\n bar,\n pie,\n donut,\n scatter,\n sparkline,\n gauge,\n heatmap,\n candlestick,\n radar,\n sankey,\n parliament,\n} as Record<string, ChartType<never>>\n","/**\n * `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`\n * that installs the built-in plugins (tooltip, legend, keyboard, …) and\n * every optional feature registered (time and log axes, decimation,\n * annotations, pattern fills, value labels, point shapes). The one exception\n * is the `download` menu's saver: `import '@tabler/charts/export'` adds it,\n * so charts that never offer a download do not carry the export code.\n */\n\nimport { annotationLayers, annotationValues } from './charts/annotations.ts'\nimport { dateLabels } from './charts/dates.ts'\nimport { logDomain, logTicks } from './charts/log-axis.ts'\nimport { patternFills } from './charts/patterns.ts'\nimport { markerPath, shapesStep } from './charts/point-shapes.ts'\nimport { timeAxis } from './charts/time-axis.ts'\nimport { labelsStep } from './charts/value-labels.ts'\nimport { addPost, register } from './features.ts'\nimport { hydrate } from './render/hydrate.ts'\nimport { morph } from './render/morph.ts'\nimport { log } from './scales/log.ts'\nimport { time, timePointScale } from './scales/time.ts'\nimport { lttb, lttbIndices } from './shapes/decimate.ts'\nimport { areaPath, linePath } from './shapes/path.ts'\n\n// Registered here, in the entry itself, so no bundler can shake it away.\nregister({\n time: { scale: time, points: timePointScale, axis: timeAxis },\n dates: dateLabels,\n log: { scale: log, domain: logDomain, ticks: logTicks },\n decimate: lttbIndices,\n line: { linePath, areaPath },\n annotations: { layers: annotationLayers, values: annotationValues },\n patterns: patternFills,\n 'point-shapes': markerPath,\n hydrate,\n morph,\n})\n\n// Steps that finish the content: shapes first, then the labels over them.\naddPost(shapesStep)\naddPost(labelsStep)\n\nexport { Chart } from './chart-default.ts'\nexport { types } from './chart-types.ts'\nexport * from './core.ts'\nexport type { DownloadOptions, ExportOptions, ExportTarget, ImageOptions } from './export-chart.ts'\nexport { downloadChart, exportImage, exportSVG } from './export-chart.ts'\nexport type { LogScaleOptions } from './scales/log.ts'\nexport type { TimeScale, TimeScaleOptions, TimeValue } from './scales/time.ts'\nexport { log, lttb, lttbIndices, time, timePointScale }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["CoreChart"],"sources":["../src/chart-default.ts","../src/chart-types.ts","../src/index.ts"],"sourcesContent":["import { type ChartConfig, Chart as CoreChart } from './chart.ts'\nimport { defaultPlugins } from './plugins/index.ts'\n\n/**\n * A chart with every built-in plugin installed: hover highlight, legend,\n * tooltip, data table and keyboard navigation. Each can be switched off in\n * the config (`tooltip: false`, …). For the smallest bundle, use the bare\n * `Chart` from `@tabler/charts/core` and pick plugins explicitly.\n *\n * ```ts\n * const chart = new Chart('#sales', { type: line, data })\n * ```\n */\nexport class Chart<O extends object = object> extends CoreChart<O> {\n constructor(target: Element | string, config: ChartConfig<O>) {\n super(target, config, defaultPlugins())\n }\n}\n","import type { ChartType } from './chart.ts'\nimport { area } from './charts/area.ts'\nimport { bar } from './charts/bar.ts'\nimport { candlestick } from './charts/candlestick.ts'\nimport { gauge } from './charts/gauge.ts'\nimport { heatmap } from './charts/heatmap.ts'\nimport { line } from './charts/line.ts'\nimport { parliament } from './charts/parliament.ts'\nimport { percentageBar } from './charts/percentage-bar.ts'\nimport { donut, pie } from './charts/pie.ts'\nimport { radar } from './charts/radar.ts'\nimport { sankey } from './charts/sankey.ts'\nimport { scatter } from './charts/scatter.ts'\nimport { sparkline } from './charts/sparkline.ts'\nimport { treemap } from './charts/treemap.ts'\n\n/**\n * Every built-in chart type by its name, for charts declared in markup\n * (`<tabler-chart type=\"line\">`, `data-tc-chart=\"line\"`). Importing it\n * brings every type along: code that knows its types imports them directly.\n */\nexport const types: Readonly<Record<string, ChartType<never>>> = {\n line,\n area,\n bar,\n pie,\n donut,\n scatter,\n sparkline,\n gauge,\n heatmap,\n candlestick,\n radar,\n sankey,\n parliament,\n treemap,\n 'percentage-bar': percentageBar,\n} as Record<string, ChartType<never>>\n","/**\n * `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`\n * that installs the built-in plugins (tooltip, legend, keyboard, …) and\n * every optional feature registered (time and log axes, decimation,\n * annotations, pattern fills, value labels, point shapes). The one exception\n * is the `download` menu's saver: `import '@tabler/charts/export'` adds it,\n * so charts that never offer a download do not carry the export code.\n */\n\nimport { annotationLayers, annotationValues } from './charts/annotations.ts'\nimport { dateLabels } from './charts/dates.ts'\nimport { logDomain, logTicks } from './charts/log-axis.ts'\nimport { patternFills } from './charts/patterns.ts'\nimport { markerPath, shapesStep } from './charts/point-shapes.ts'\nimport { timeAxis } from './charts/time-axis.ts'\nimport { labelsStep } from './charts/value-labels.ts'\nimport { addPost, register } from './features.ts'\nimport { hydrate } from './render/hydrate.ts'\nimport { morph } from './render/morph.ts'\nimport { log } from './scales/log.ts'\nimport { time, timePointScale } from './scales/time.ts'\nimport { lttb, lttbIndices } from './shapes/decimate.ts'\nimport { areaPath, linePath } from './shapes/path.ts'\n\n// Registered here, in the entry itself, so no bundler can shake it away.\nregister({\n time: { scale: time, points: timePointScale, axis: timeAxis },\n dates: dateLabels,\n log: { scale: log, domain: logDomain, ticks: logTicks },\n decimate: lttbIndices,\n line: { linePath, areaPath },\n annotations: { layers: annotationLayers, values: annotationValues },\n patterns: patternFills,\n 'point-shapes': markerPath,\n hydrate,\n morph,\n})\n\n// Steps that finish the content: shapes first, then the labels over them.\naddPost(shapesStep)\naddPost(labelsStep)\n\nexport { Chart } from './chart-default.ts'\nexport { types } from './chart-types.ts'\nexport * from './core.ts'\nexport type { DownloadOptions, ExportOptions, ExportTarget, ImageOptions } from './export-chart.ts'\nexport { downloadChart, exportImage, exportSVG } from './export-chart.ts'\nexport type { LogScaleOptions } from './scales/log.ts'\nexport type { TimeScale, TimeScaleOptions, TimeValue } from './scales/time.ts'\nexport { log, lttb, lttbIndices, time, timePointScale }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAa,QAAb,cAAsDA,QAAa;CACjE,YAAY,QAA0B,QAAwB;EAC5D,MAAM,QAAQ,QAAQ,eAAe,CAAC;CACxC;AACF;;;;;;;ACIA,MAAa,QAAoD;CAC/D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,kBAAkB;AACpB;;;;;;;;;;ACZA,SAAS;CACP,MAAM;EAAE,OAAO;EAAM,QAAQ;EAAgB,MAAM;CAAS;CAC5D,OAAO;CACP,KAAK;EAAE,OAAO;EAAK,QAAQ;EAAW,OAAO;CAAS;CACtD,UAAU;CACV,MAAM;EAAE;EAAU;CAAS;CAC3B,aAAa;EAAE,QAAQ;EAAkB,QAAQ;CAAiB;CAClE,UAAU;CACV,gBAAgB;CAChB;CACA;AACF,CAAC;AAGD,QAAQ,UAAU;AAClB,QAAQ,UAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/layout.ts
|
|
2
2
|
/** Normalize an {@link InsetsInput}; missing sides fall back to `fallback`. */
|
|
3
3
|
function insets(value, fallback = 0) {
|
|
4
4
|
const side = (key) => {
|
|
@@ -12,6 +12,12 @@ function insets(value, fallback = 0) {
|
|
|
12
12
|
left: side("left")
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
/** Swap the left and right of `sides` in a right-to-left chart. */
|
|
16
|
+
const mirrorSides = (sides, rtl) => rtl ? {
|
|
17
|
+
...sides,
|
|
18
|
+
left: sides.right,
|
|
19
|
+
right: sides.left
|
|
20
|
+
} : sides;
|
|
15
21
|
/** Rectangle left inside `width × height` after `margins`; never negative. */
|
|
16
22
|
function innerRect(width, height, margins) {
|
|
17
23
|
return {
|
|
@@ -63,7 +69,6 @@ const ASCII = /* @__PURE__ */ Array.from({ length: 128 }, (_, code) => charWidth
|
|
|
63
69
|
const round = (value) => Math.round(value * 100) / 100;
|
|
64
70
|
/** Line height used for single-line labels, relative to the font size. */
|
|
65
71
|
const LINE_HEIGHT = 1.25;
|
|
66
|
-
|
|
67
|
-
export { round as a, insets as i, estimateTextWidth as n, innerRect as r, LINE_HEIGHT as t };
|
|
72
|
+
export { mirrorSides as a, insets as i, estimateTextWidth as n, round as o, innerRect as r, LINE_HEIGHT as t };
|
|
68
73
|
|
|
69
|
-
//# sourceMappingURL=layout-
|
|
74
|
+
//# sourceMappingURL=layout-DmrrLjwN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-DmrrLjwN.js","names":[],"sources":["../src/layout.ts"],"sourcesContent":["/** Axis-aligned rectangle in pixels. */\nexport interface Rect {\n x: number\n y: number\n width: number\n height: number\n}\n\n/** Space around a box, in pixels. */\nexport interface Insets {\n top: number\n right: number\n bottom: number\n left: number\n}\n\n/** Insets given as one number for all sides or per side. */\nexport type InsetsInput = number | Partial<Insets>\n\n/** Normalize an {@link InsetsInput}; missing sides fall back to `fallback`. */\nexport function insets(value: InsetsInput | undefined, fallback = 0): Insets {\n // A side that is not a finite number (left out, or junk from outside) takes the fallback.\n const side = (key: keyof Insets): number => {\n const v = typeof value === 'number' ? value : value?.[key]\n return Number.isFinite(v) ? (v as number) : fallback\n }\n return { top: side('top'), right: side('right'), bottom: side('bottom'), left: side('left') }\n}\n\n/** Swap the left and right of `sides` in a right-to-left chart. */\nexport const mirrorSides = <T extends { left: number; right: number }>(\n sides: T,\n rtl: boolean | undefined,\n): T => (rtl ? { ...sides, left: sides.right, right: sides.left } : sides)\n\n/** Rectangle left inside `width × height` after `margins`; never negative. */\nexport function innerRect(width: number, height: number, margins: Insets): Rect {\n return {\n x: margins.left,\n y: margins.top,\n width: Math.max(0, width - margins.left - margins.right),\n height: Math.max(0, height - margins.top - margins.bottom),\n }\n}\n\n// Approximate advance widths in em for common UI sans-serif fonts\n// (system-ui / SF, Segoe UI, Roboto), measured in the browser.\nconst THIN = \" !'.,:;|ijlI`\"\nconst NARROW = '()[]{}-/frt'\nconst ROUND = 'CDGHNOQU'\nconst WIDE = '%@MWmw'\n\n/**\n * Full-width characters, a whole em each: Hangul, CJK and kana, compatibility\n * ideographs, fullwidth forms and pictographs (emoji).\n */\nconst isWide = (code: number): boolean =>\n code >= 0x1100 &&\n (code <= 0x115f ||\n (code >= 0x2e80 && code <= 0xa4cf) ||\n (code >= 0xac00 && code <= 0xd7a3) ||\n (code >= 0xf900 && code <= 0xfaff) ||\n (code >= 0xff00 && code <= 0xff60) ||\n code >= 0x1f300)\n\n/** The width of an ASCII character, in em. */\nfunction charWidth(char: string): number {\n if (char >= '0' && char <= '9') return char === '1' ? 0.45 : 0.63\n if (THIN.includes(char)) return 0.27\n if (NARROW.includes(char)) return 0.38\n if (WIDE.includes(char)) return 0.88\n if (ROUND.includes(char)) return 0.76\n if (char >= 'A' && char <= 'Z') return 0.66\n return 0.57\n}\n\n/**\n * Estimate the rendered width of `text` without a DOM, for layout on the\n * server and in workers. Tuned for common UI sans-serif fonts; deterministic,\n * so SSR and client layouts agree.\n */\nexport function estimateTextWidth(text: string, fontSize: number): number {\n let em = 0\n for (let i = 0; i < text.length; i++) {\n const point = text.codePointAt(i) as number\n // Beyond ASCII a character is a whole em or an average one; a pair of surrogates is one.\n em += ASCII[point] ?? (isWide(point) ? 1 : 0.57)\n if (point > 0xffff) i++\n }\n return em * fontSize\n}\n\n/**\n * The width of every ASCII character, looked up instead of worked out: an\n * axis of 100,000 long labels estimates millions of characters per render.\n */\nconst ASCII = /* @__PURE__ */ Array.from({ length: 128 }, (_, code) =>\n charWidth(String.fromCharCode(code)),\n)\n\n/** A pixel value rounded to two decimals, as written into attributes and path data. */\nexport const round = (value: number): number => Math.round(value * 100) / 100\n\n/** Line height used for single-line labels, relative to the font size. */\nexport const LINE_HEIGHT = 1.25\n"],"mappings":";;AAoBA,SAAgB,OAAO,OAAgC,WAAW,GAAW;CAE3E,MAAM,QAAQ,QAA8B;EAC1C,MAAM,IAAI,OAAO,UAAU,WAAW,QAAQ,QAAQ;EACtD,OAAO,OAAO,SAAS,CAAC,IAAK,IAAe;CAC9C;CACA,OAAO;EAAE,KAAK,KAAK,KAAK;EAAG,OAAO,KAAK,OAAO;EAAG,QAAQ,KAAK,QAAQ;EAAG,MAAM,KAAK,MAAM;CAAE;AAC9F;;AAGA,MAAa,eACX,OACA,QACO,MAAM;CAAE,GAAG;CAAO,MAAM,MAAM;CAAO,OAAO,MAAM;AAAK,IAAI;;AAGpE,SAAgB,UAAU,OAAe,QAAgB,SAAuB;CAC9E,OAAO;EACL,GAAG,QAAQ;EACX,GAAG,QAAQ;EACX,OAAO,KAAK,IAAI,GAAG,QAAQ,QAAQ,OAAO,QAAQ,KAAK;EACvD,QAAQ,KAAK,IAAI,GAAG,SAAS,QAAQ,MAAM,QAAQ,MAAM;CAC3D;AACF;AAIA,MAAM,OAAO;AACb,MAAM,SAAS;AACf,MAAM,QAAQ;AACd,MAAM,OAAO;;;;;AAMb,MAAM,UAAU,SACd,QAAQ,SACP,QAAQ,QACN,QAAQ,SAAU,QAAQ,SAC1B,QAAQ,SAAU,QAAQ,SAC1B,QAAQ,SAAU,QAAQ,SAC1B,QAAQ,SAAU,QAAQ,SAC3B,QAAQ;;AAGZ,SAAS,UAAU,MAAsB;CACvC,IAAI,QAAQ,OAAO,QAAQ,KAAK,OAAO,SAAS,MAAM,MAAO;CAC7D,IAAI,KAAK,SAAS,IAAI,GAAG,OAAO;CAChC,IAAI,OAAO,SAAS,IAAI,GAAG,OAAO;CAClC,IAAI,KAAK,SAAS,IAAI,GAAG,OAAO;CAChC,IAAI,MAAM,SAAS,IAAI,GAAG,OAAO;CACjC,IAAI,QAAQ,OAAO,QAAQ,KAAK,OAAO;CACvC,OAAO;AACT;;;;;;AAOA,SAAgB,kBAAkB,MAAc,UAA0B;CACxE,IAAI,KAAK;CACT,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,QAAQ,KAAK,YAAY,CAAC;EAEhC,MAAM,MAAM,WAAW,OAAO,KAAK,IAAI,IAAI;EAC3C,IAAI,QAAQ,OAAQ;CACtB;CACA,OAAO,KAAK;AACd;;;;;AAMA,MAAM,QAAwB,sBAAM,KAAK,EAAE,QAAQ,IAAI,IAAI,GAAG,SAC5D,UAAU,OAAO,aAAa,IAAI,CAAC,CACrC;;AAGA,MAAa,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI;;AAG1E,MAAa,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/layout.ts
|
|
2
2
|
/** Normalize an {@link InsetsInput}; missing sides fall back to `fallback`. */
|
|
3
3
|
function insets(value, fallback = 0) {
|
|
4
4
|
const side = (key) => {
|
|
@@ -12,6 +12,12 @@ function insets(value, fallback = 0) {
|
|
|
12
12
|
left: side("left")
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
/** Swap the left and right of `sides` in a right-to-left chart. */
|
|
16
|
+
const mirrorSides = (sides, rtl) => rtl ? {
|
|
17
|
+
...sides,
|
|
18
|
+
left: sides.right,
|
|
19
|
+
right: sides.left
|
|
20
|
+
} : sides;
|
|
15
21
|
/** Rectangle left inside `width × height` after `margins`; never negative. */
|
|
16
22
|
function innerRect(width, height, margins) {
|
|
17
23
|
return {
|
|
@@ -63,7 +69,6 @@ const ASCII = /* @__PURE__ */ Array.from({ length: 128 }, (_, code) => charWidth
|
|
|
63
69
|
const round = (value) => Math.round(value * 100) / 100;
|
|
64
70
|
/** Line height used for single-line labels, relative to the font size. */
|
|
65
71
|
const LINE_HEIGHT = 1.25;
|
|
66
|
-
//#endregion
|
|
67
72
|
Object.defineProperty(exports, "LINE_HEIGHT", {
|
|
68
73
|
enumerable: true,
|
|
69
74
|
get: function() {
|
|
@@ -88,6 +93,12 @@ Object.defineProperty(exports, "insets", {
|
|
|
88
93
|
return insets;
|
|
89
94
|
}
|
|
90
95
|
});
|
|
96
|
+
Object.defineProperty(exports, "mirrorSides", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function() {
|
|
99
|
+
return mirrorSides;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
91
102
|
Object.defineProperty(exports, "round", {
|
|
92
103
|
enumerable: true,
|
|
93
104
|
get: function() {
|
|
@@ -95,4 +106,4 @@ Object.defineProperty(exports, "round", {
|
|
|
95
106
|
}
|
|
96
107
|
});
|
|
97
108
|
|
|
98
|
-
//# sourceMappingURL=layout-
|
|
109
|
+
//# sourceMappingURL=layout-JY2aR-yE.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-JY2aR-yE.cjs","names":[],"sources":["../src/layout.ts"],"sourcesContent":["/** Axis-aligned rectangle in pixels. */\nexport interface Rect {\n x: number\n y: number\n width: number\n height: number\n}\n\n/** Space around a box, in pixels. */\nexport interface Insets {\n top: number\n right: number\n bottom: number\n left: number\n}\n\n/** Insets given as one number for all sides or per side. */\nexport type InsetsInput = number | Partial<Insets>\n\n/** Normalize an {@link InsetsInput}; missing sides fall back to `fallback`. */\nexport function insets(value: InsetsInput | undefined, fallback = 0): Insets {\n // A side that is not a finite number (left out, or junk from outside) takes the fallback.\n const side = (key: keyof Insets): number => {\n const v = typeof value === 'number' ? value : value?.[key]\n return Number.isFinite(v) ? (v as number) : fallback\n }\n return { top: side('top'), right: side('right'), bottom: side('bottom'), left: side('left') }\n}\n\n/** Swap the left and right of `sides` in a right-to-left chart. */\nexport const mirrorSides = <T extends { left: number; right: number }>(\n sides: T,\n rtl: boolean | undefined,\n): T => (rtl ? { ...sides, left: sides.right, right: sides.left } : sides)\n\n/** Rectangle left inside `width × height` after `margins`; never negative. */\nexport function innerRect(width: number, height: number, margins: Insets): Rect {\n return {\n x: margins.left,\n y: margins.top,\n width: Math.max(0, width - margins.left - margins.right),\n height: Math.max(0, height - margins.top - margins.bottom),\n }\n}\n\n// Approximate advance widths in em for common UI sans-serif fonts\n// (system-ui / SF, Segoe UI, Roboto), measured in the browser.\nconst THIN = \" !'.,:;|ijlI`\"\nconst NARROW = '()[]{}-/frt'\nconst ROUND = 'CDGHNOQU'\nconst WIDE = '%@MWmw'\n\n/**\n * Full-width characters, a whole em each: Hangul, CJK and kana, compatibility\n * ideographs, fullwidth forms and pictographs (emoji).\n */\nconst isWide = (code: number): boolean =>\n code >= 0x1100 &&\n (code <= 0x115f ||\n (code >= 0x2e80 && code <= 0xa4cf) ||\n (code >= 0xac00 && code <= 0xd7a3) ||\n (code >= 0xf900 && code <= 0xfaff) ||\n (code >= 0xff00 && code <= 0xff60) ||\n code >= 0x1f300)\n\n/** The width of an ASCII character, in em. */\nfunction charWidth(char: string): number {\n if (char >= '0' && char <= '9') return char === '1' ? 0.45 : 0.63\n if (THIN.includes(char)) return 0.27\n if (NARROW.includes(char)) return 0.38\n if (WIDE.includes(char)) return 0.88\n if (ROUND.includes(char)) return 0.76\n if (char >= 'A' && char <= 'Z') return 0.66\n return 0.57\n}\n\n/**\n * Estimate the rendered width of `text` without a DOM, for layout on the\n * server and in workers. Tuned for common UI sans-serif fonts; deterministic,\n * so SSR and client layouts agree.\n */\nexport function estimateTextWidth(text: string, fontSize: number): number {\n let em = 0\n for (let i = 0; i < text.length; i++) {\n const point = text.codePointAt(i) as number\n // Beyond ASCII a character is a whole em or an average one; a pair of surrogates is one.\n em += ASCII[point] ?? (isWide(point) ? 1 : 0.57)\n if (point > 0xffff) i++\n }\n return em * fontSize\n}\n\n/**\n * The width of every ASCII character, looked up instead of worked out: an\n * axis of 100,000 long labels estimates millions of characters per render.\n */\nconst ASCII = /* @__PURE__ */ Array.from({ length: 128 }, (_, code) =>\n charWidth(String.fromCharCode(code)),\n)\n\n/** A pixel value rounded to two decimals, as written into attributes and path data. */\nexport const round = (value: number): number => Math.round(value * 100) / 100\n\n/** Line height used for single-line labels, relative to the font size. */\nexport const LINE_HEIGHT = 1.25\n"],"mappings":";;AAoBA,SAAgB,OAAO,OAAgC,WAAW,GAAW;CAE3E,MAAM,QAAQ,QAA8B;EAC1C,MAAM,IAAI,OAAO,UAAU,WAAW,QAAQ,QAAQ;EACtD,OAAO,OAAO,SAAS,CAAC,IAAK,IAAe;CAC9C;CACA,OAAO;EAAE,KAAK,KAAK,KAAK;EAAG,OAAO,KAAK,OAAO;EAAG,QAAQ,KAAK,QAAQ;EAAG,MAAM,KAAK,MAAM;CAAE;AAC9F;;AAGA,MAAa,eACX,OACA,QACO,MAAM;CAAE,GAAG;CAAO,MAAM,MAAM;CAAO,OAAO,MAAM;AAAK,IAAI;;AAGpE,SAAgB,UAAU,OAAe,QAAgB,SAAuB;CAC9E,OAAO;EACL,GAAG,QAAQ;EACX,GAAG,QAAQ;EACX,OAAO,KAAK,IAAI,GAAG,QAAQ,QAAQ,OAAO,QAAQ,KAAK;EACvD,QAAQ,KAAK,IAAI,GAAG,SAAS,QAAQ,MAAM,QAAQ,MAAM;CAC3D;AACF;AAIA,MAAM,OAAO;AACb,MAAM,SAAS;AACf,MAAM,QAAQ;AACd,MAAM,OAAO;;;;;AAMb,MAAM,UAAU,SACd,QAAQ,SACP,QAAQ,QACN,QAAQ,SAAU,QAAQ,SAC1B,QAAQ,SAAU,QAAQ,SAC1B,QAAQ,SAAU,QAAQ,SAC1B,QAAQ,SAAU,QAAQ,SAC3B,QAAQ;;AAGZ,SAAS,UAAU,MAAsB;CACvC,IAAI,QAAQ,OAAO,QAAQ,KAAK,OAAO,SAAS,MAAM,MAAO;CAC7D,IAAI,KAAK,SAAS,IAAI,GAAG,OAAO;CAChC,IAAI,OAAO,SAAS,IAAI,GAAG,OAAO;CAClC,IAAI,KAAK,SAAS,IAAI,GAAG,OAAO;CAChC,IAAI,MAAM,SAAS,IAAI,GAAG,OAAO;CACjC,IAAI,QAAQ,OAAO,QAAQ,KAAK,OAAO;CACvC,OAAO;AACT;;;;;;AAOA,SAAgB,kBAAkB,MAAc,UAA0B;CACxE,IAAI,KAAK;CACT,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,QAAQ,KAAK,YAAY,CAAC;EAEhC,MAAM,MAAM,WAAW,OAAO,KAAK,IAAI,IAAI;EAC3C,IAAI,QAAQ,OAAQ;CACtB;CACA,OAAO,KAAK;AACd;;;;;AAMA,MAAM,QAAwB,sBAAM,KAAK,EAAE,QAAQ,IAAI,IAAI,GAAG,SAC5D,UAAU,OAAO,aAAa,IAAI,CAAC,CACrC;;AAGA,MAAa,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI;;AAG1E,MAAa,cAAc"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as stackSeries, t as stackBounds } from "./stack-
|
|
8
|
-
|
|
1
|
+
import { n as areaPath, r as linePath, t as fadeMask } from "./fade-GGxcBdss.js";
|
|
2
|
+
import { n as feature } from "./features-BMxkqCyS.js";
|
|
3
|
+
import { o as round } from "./layout-DmrrLjwN.js";
|
|
4
|
+
import { t as h } from "./vnode-_EMUqysL.js";
|
|
5
|
+
import { d as seriesAttrs, f as seriesKey, l as plottable, m as seriesTable, n as categoryInteraction, p as seriesLegend, t as cartesianLayout, u as resolveLabels } from "./cartesian-CI2x6N7N.js";
|
|
6
|
+
import { r as cleanSeries, t as cleanData } from "./clean-CkoQobGv.js";
|
|
7
|
+
import { n as stackSeries, t as stackBounds } from "./stack-2H2Gfs1Q.js";
|
|
8
|
+
// src/charts/line.ts
|
|
9
9
|
/** Points in pixels for a series; `null` for missing values. */
|
|
10
10
|
function seriesPoints(series, count, x, y, connectNulls, valid) {
|
|
11
11
|
const points = [];
|
|
@@ -114,7 +114,6 @@ const line = {
|
|
|
114
114
|
legend: (options) => seriesLegend(options.data),
|
|
115
115
|
table: (options, ctx, limit) => seriesTable(options, ctx, limit)
|
|
116
116
|
};
|
|
117
|
-
//#endregion
|
|
118
117
|
export { renderLines as n, line as t };
|
|
119
118
|
|
|
120
|
-
//# sourceMappingURL=line-
|
|
119
|
+
//# sourceMappingURL=line-DO66LtwH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-B3Ed6u7j.js","names":[],"sources":["../src/charts/line.ts"],"sourcesContent":["import type { ChartType, RenderContext } from '../chart.ts'\nimport { fadeMask } from '../components/fade.ts'\nimport { feature } from '../features.ts'\nimport { round } from '../layout.ts'\nimport { areaPath, type Curve, linePath, type Point } from '../shapes/path.ts'\nimport { type ChildInput, h } from '../vnode.ts'\nimport {\n type CartesianOptions,\n cartesianLayout,\n categoryInteraction,\n plottable,\n resolveLabels,\n type Series,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { type StackMode, stackBounds, stackSeries } from './stack.ts'\n\nexport interface LineOptions extends CartesianOptions {\n /** Interpolation between points. Defaults to `'monotone'`. */\n curve?: Curve\n /** Draw dots on every point, only on the last one, or none. Defaults to `'none'`. */\n points?: 'none' | 'last' | 'all'\n /** Dot radius in pixels. Defaults to `4`. */\n pointRadius?: number\n /** Bridge `null` values instead of leaving gaps. Defaults to `false`. */\n connectNulls?: boolean\n /** Fill the area under each line. Defaults to `false` (`true` for `area`). */\n area?: boolean\n /**\n * Area fill style: a vertical fade (strength set by `--tc-area-gradient-start`\n * / `--tc-area-gradient-end`) or a flat wash (`--tc-area-opacity`).\n * Defaults to `'gradient'`, or `'solid'` for stacked areas.\n */\n fill?: 'gradient' | 'solid'\n /**\n * Stack series on top of each other (each line draws the running total);\n * `'percent'` shows every category as 100%. Missing values count as zero.\n */\n stacked?: StackMode\n /**\n * Draw long series with at most this many points, chosen by LTTB\n * downsampling so peaks and valleys survive. Tooltips and keyboard\n * navigation still use every value. Off by default.\n */\n decimate?: number\n}\n\n/** Points in pixels for a series; `null` for missing values. */\nfunction seriesPoints(\n series: Series,\n count: number,\n x: (i: number) => number,\n y: (v: number) => number,\n connectNulls: boolean,\n valid: (v: number | null | undefined) => v is number,\n): Point[] {\n const points: Point[] = []\n for (let i = 0; i < count; i++) {\n const v = series.values[i]\n if (!valid(v)) {\n if (!connectNulls) points.push(null)\n } else {\n points.push([x(i), y(v)])\n }\n }\n return points\n}\n\n/** Render line (and optionally area) series; shared by `line` and `area`. */\nexport function renderLines(options: LineOptions, ctx: RenderContext, fill: boolean): ChildInput {\n const {\n curve = 'monotone',\n points = 'none',\n pointRadius = 4,\n connectNulls = false,\n area: filled = fill,\n stacked = false,\n decimate,\n // Faded layers would show light seams between stacked areas, so stacks default to solid.\n fill: fillStyle = stacked ? 'solid' : 'gradient',\n } = options\n const overhang = points === 'none' ? 2 : pointRadius + 2\n const { series } = options.data\n const count = resolveLabels(options.data).length\n const stacks = stacked\n ? stackSeries(series, count, {\n percent: stacked === 'percent',\n nullAsZero: true,\n hidden: ctx.hidden,\n })\n : null\n const layout = cartesianLayout(options, ctx, {\n scale: 'point',\n zero: filled || stacks !== null,\n overhang,\n ...(stacks ? { values: stackBounds(stacks) } : {}),\n ...(stacked === 'percent' ? { tickFormat: { style: 'percent' } } : {}),\n })\n const { x, y, labels } = layout\n const baseline = y(Math.min(Math.max(0, y.domain[0]), y.domain[1]))\n ctx.onHitTest(\n categoryInteraction(layout, options, ctx, (seriesIndex, i, v) => ({\n x: x.at(i),\n y: y(stacks ? (stacks[seriesIndex]?.[i]?.y1 ?? 0) : v),\n })),\n )\n const gradient = filled && fillStyle === 'gradient'\n const fadeId = `${ctx.id}-fade`\n\n // Hidden series keep their index (and color slot) but draw nothing.\n const visible = (s: Series) => !ctx.hidden.has(seriesKey(s))\n const all = series.map((s, index) => {\n if (!visible(s)) return []\n // Stacked series draw their running total.\n const stack = stacks?.[index]\n if (stack) return stack.map((seg, i): Point => (seg ? [x.at(i), y(seg.y1)] : null))\n return seriesPoints(\n s,\n labels.length,\n (i) => x.at(i),\n y,\n connectNulls,\n (v) => plottable(v, options.y),\n )\n })\n /** Indices drawn per series: a downsampled subset when `decimate` is set. */\n const kept = all.map((pts) =>\n decimate !== undefined && pts.length > decimate ? feature('decimate')(pts, decimate) : null,\n )\n const drawn = (index: number): Point[] => {\n const pts = all[index] as Point[]\n const keep = kept[index]\n return keep ? keep.map((i) => pts[i] as Point) : pts\n }\n /** Area bottom: zero, or the top of the layer below for stacks (downsampled alike). */\n const bottom = (index: number): number | (number | null)[] => {\n const stack = stacks?.[index]\n if (!stack) return baseline\n const bottoms = stack.map((seg) => (seg ? y(seg.y0) : null))\n const keep = kept[index]\n return keep ? keep.map((i) => bottoms[i] ?? null) : bottoms\n }\n\n // All areas go below all lines, so a filled series never covers another line.\n const areas =\n filled &&\n h(\n 'g',\n { class: 'tc-areas' },\n options.data.series.map(\n (s, index) =>\n visible(s) &&\n h(\n 'g',\n seriesAttrs(s, index),\n h('path', {\n class: ['tc-area', gradient && 'tc-area-gradient'],\n d: areaPath(drawn(index), bottom(index), { curve }),\n mask: gradient ? `url(#${fadeId})` : undefined,\n }),\n ),\n ),\n )\n\n const lines = options.data.series.map((s, index) => {\n if (!visible(s)) return null\n const pts = drawn(index)\n const valid = pts.filter((p): p is readonly [number, number] => p != null)\n const dots = points === 'all' ? valid : points === 'last' ? valid.slice(-1) : []\n return h(\n 'g',\n seriesAttrs(s, index),\n h('path', { class: 'tc-line', d: linePath(pts, { curve }) }),\n dots.length > 0 &&\n h(\n 'g',\n { class: 'tc-points' },\n dots.map(([cx, cy]) =>\n h('circle', {\n key: cx,\n class: 'tc-point',\n cx: round(cx),\n cy: round(cy),\n r: pointRadius,\n }),\n ),\n ),\n )\n })\n\n return [\n h('defs', { key: 'defs' }, layout.clip.def, gradient && fadeMask(fadeId)),\n layout.background,\n // Layers are keyed: an annotation band or a grid that comes and goes must not\n // shift the series list onto another node (that would recreate every series).\n h('g', { key: 'series', class: 'tc-series-list', 'clip-path': layout.clip.url }, areas, lines),\n layout.foreground,\n ]\n}\n\n/**\n * Line chart: one line per series over category labels.\n *\n * ```ts\n * new Chart('#el', {\n * type: line,\n * data: { labels: ['Jan', 'Feb', 'Mar'], series: [{ name: 'Sales', values: [3, 5, 4] }] },\n * })\n * ```\n */\nexport const line: ChartType<LineOptions> = {\n name: 'line',\n clean: cleanData(cleanSeries),\n render: (options, ctx) => renderLines(options, ctx, false),\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"line-DO66LtwH.js","names":[],"sources":["../src/charts/line.ts"],"sourcesContent":["import type { ChartType, RenderContext } from '../chart.ts'\nimport { fadeMask } from '../components/fade.ts'\nimport { feature } from '../features.ts'\nimport { round } from '../layout.ts'\nimport { areaPath, type Curve, linePath, type Point } from '../shapes/path.ts'\nimport { type ChildInput, h } from '../vnode.ts'\nimport {\n type CartesianOptions,\n cartesianLayout,\n categoryInteraction,\n plottable,\n resolveLabels,\n type Series,\n seriesAttrs,\n seriesKey,\n seriesLegend,\n seriesTable,\n} from './cartesian.ts'\nimport { cleanData, cleanSeries } from './clean.ts'\nimport { type StackMode, stackBounds, stackSeries } from './stack.ts'\n\nexport interface LineOptions extends CartesianOptions {\n /** Interpolation between points. Defaults to `'monotone'`. */\n curve?: Curve\n /** Draw dots on every point, only on the last one, or none. Defaults to `'none'`. */\n points?: 'none' | 'last' | 'all'\n /** Dot radius in pixels. Defaults to `4`. */\n pointRadius?: number\n /** Bridge `null` values instead of leaving gaps. Defaults to `false`. */\n connectNulls?: boolean\n /** Fill the area under each line. Defaults to `false` (`true` for `area`). */\n area?: boolean\n /**\n * Area fill style: a vertical fade (strength set by `--tc-area-gradient-start`\n * / `--tc-area-gradient-end`) or a flat wash (`--tc-area-opacity`).\n * Defaults to `'gradient'`, or `'solid'` for stacked areas.\n */\n fill?: 'gradient' | 'solid'\n /**\n * Stack series on top of each other (each line draws the running total);\n * `'percent'` shows every category as 100%. Missing values count as zero.\n */\n stacked?: StackMode\n /**\n * Draw long series with at most this many points, chosen by LTTB\n * downsampling so peaks and valleys survive. Tooltips and keyboard\n * navigation still use every value. Off by default.\n */\n decimate?: number\n}\n\n/** Points in pixels for a series; `null` for missing values. */\nfunction seriesPoints(\n series: Series,\n count: number,\n x: (i: number) => number,\n y: (v: number) => number,\n connectNulls: boolean,\n valid: (v: number | null | undefined) => v is number,\n): Point[] {\n const points: Point[] = []\n for (let i = 0; i < count; i++) {\n const v = series.values[i]\n if (!valid(v)) {\n if (!connectNulls) points.push(null)\n } else {\n points.push([x(i), y(v)])\n }\n }\n return points\n}\n\n/** Render line (and optionally area) series; shared by `line` and `area`. */\nexport function renderLines(options: LineOptions, ctx: RenderContext, fill: boolean): ChildInput {\n const {\n curve = 'monotone',\n points = 'none',\n pointRadius = 4,\n connectNulls = false,\n area: filled = fill,\n stacked = false,\n decimate,\n // Faded layers would show light seams between stacked areas, so stacks default to solid.\n fill: fillStyle = stacked ? 'solid' : 'gradient',\n } = options\n const overhang = points === 'none' ? 2 : pointRadius + 2\n const { series } = options.data\n const count = resolveLabels(options.data).length\n const stacks = stacked\n ? stackSeries(series, count, {\n percent: stacked === 'percent',\n nullAsZero: true,\n hidden: ctx.hidden,\n })\n : null\n const layout = cartesianLayout(options, ctx, {\n scale: 'point',\n zero: filled || stacks !== null,\n overhang,\n ...(stacks ? { values: stackBounds(stacks) } : {}),\n ...(stacked === 'percent' ? { tickFormat: { style: 'percent' } } : {}),\n })\n const { x, y, labels } = layout\n const baseline = y(Math.min(Math.max(0, y.domain[0]), y.domain[1]))\n ctx.onHitTest(\n categoryInteraction(layout, options, ctx, (seriesIndex, i, v) => ({\n x: x.at(i),\n y: y(stacks ? (stacks[seriesIndex]?.[i]?.y1 ?? 0) : v),\n })),\n )\n const gradient = filled && fillStyle === 'gradient'\n const fadeId = `${ctx.id}-fade`\n\n // Hidden series keep their index (and color slot) but draw nothing.\n const visible = (s: Series) => !ctx.hidden.has(seriesKey(s))\n const all = series.map((s, index) => {\n if (!visible(s)) return []\n // Stacked series draw their running total.\n const stack = stacks?.[index]\n if (stack) return stack.map((seg, i): Point => (seg ? [x.at(i), y(seg.y1)] : null))\n return seriesPoints(\n s,\n labels.length,\n (i) => x.at(i),\n y,\n connectNulls,\n (v) => plottable(v, options.y),\n )\n })\n /** Indices drawn per series: a downsampled subset when `decimate` is set. */\n const kept = all.map((pts) =>\n decimate !== undefined && pts.length > decimate ? feature('decimate')(pts, decimate) : null,\n )\n const drawn = (index: number): Point[] => {\n const pts = all[index] as Point[]\n const keep = kept[index]\n return keep ? keep.map((i) => pts[i] as Point) : pts\n }\n /** Area bottom: zero, or the top of the layer below for stacks (downsampled alike). */\n const bottom = (index: number): number | (number | null)[] => {\n const stack = stacks?.[index]\n if (!stack) return baseline\n const bottoms = stack.map((seg) => (seg ? y(seg.y0) : null))\n const keep = kept[index]\n return keep ? keep.map((i) => bottoms[i] ?? null) : bottoms\n }\n\n // All areas go below all lines, so a filled series never covers another line.\n const areas =\n filled &&\n h(\n 'g',\n { class: 'tc-areas' },\n options.data.series.map(\n (s, index) =>\n visible(s) &&\n h(\n 'g',\n seriesAttrs(s, index),\n h('path', {\n class: ['tc-area', gradient && 'tc-area-gradient'],\n d: areaPath(drawn(index), bottom(index), { curve }),\n mask: gradient ? `url(#${fadeId})` : undefined,\n }),\n ),\n ),\n )\n\n const lines = options.data.series.map((s, index) => {\n if (!visible(s)) return null\n const pts = drawn(index)\n const valid = pts.filter((p): p is readonly [number, number] => p != null)\n const dots = points === 'all' ? valid : points === 'last' ? valid.slice(-1) : []\n return h(\n 'g',\n seriesAttrs(s, index),\n h('path', { class: 'tc-line', d: linePath(pts, { curve }) }),\n dots.length > 0 &&\n h(\n 'g',\n { class: 'tc-points' },\n dots.map(([cx, cy]) =>\n h('circle', {\n key: cx,\n class: 'tc-point',\n cx: round(cx),\n cy: round(cy),\n r: pointRadius,\n }),\n ),\n ),\n )\n })\n\n return [\n h('defs', { key: 'defs' }, layout.clip.def, gradient && fadeMask(fadeId)),\n layout.background,\n // Layers are keyed: an annotation band or a grid that comes and goes must not\n // shift the series list onto another node (that would recreate every series).\n h('g', { key: 'series', class: 'tc-series-list', 'clip-path': layout.clip.url }, areas, lines),\n layout.foreground,\n ]\n}\n\n/**\n * Line chart: one line per series over category labels.\n *\n * ```ts\n * new Chart('#el', {\n * type: line,\n * data: { labels: ['Jan', 'Feb', 'Mar'], series: [{ name: 'Sales', values: [3, 5, 4] }] },\n * })\n * ```\n */\nexport const line: ChartType<LineOptions> = {\n name: 'line',\n clean: cleanData(cleanSeries),\n render: (options, ctx) => renderLines(options, ctx, false),\n legend: (options) => seriesLegend(options.data),\n table: (options, ctx, limit) => seriesTable(options, ctx, limit),\n}\n"],"mappings":"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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const require_stack = require("./stack-
|
|
8
|
-
|
|
1
|
+
const require_fade = require("./fade-DVTkhrFU.cjs");
|
|
2
|
+
const require_features = require("./features-DCXEvoya.cjs");
|
|
3
|
+
const require_layout = require("./layout-JY2aR-yE.cjs");
|
|
4
|
+
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
5
|
+
const require_cartesian = require("./cartesian-DV02PsBe.cjs");
|
|
6
|
+
const require_clean = require("./clean-Die2iCNc.cjs");
|
|
7
|
+
const require_stack = require("./stack-BgPzoQmv.cjs");
|
|
8
|
+
// src/charts/line.ts
|
|
9
9
|
/** Points in pixels for a series; `null` for missing values. */
|
|
10
10
|
function seriesPoints(series, count, x, y, connectNulls, valid) {
|
|
11
11
|
const points = [];
|
|
@@ -114,7 +114,6 @@ const line = {
|
|
|
114
114
|
legend: (options) => require_cartesian.seriesLegend(options.data),
|
|
115
115
|
table: (options, ctx, limit) => require_cartesian.seriesTable(options, ctx, limit)
|
|
116
116
|
};
|
|
117
|
-
//#endregion
|
|
118
117
|
Object.defineProperty(exports, "line", {
|
|
119
118
|
enumerable: true,
|
|
120
119
|
get: function() {
|
|
@@ -128,4 +127,4 @@ Object.defineProperty(exports, "renderLines", {
|
|
|
128
127
|
}
|
|
129
128
|
});
|
|
130
129
|
|
|
131
|
-
//# sourceMappingURL=line-
|
|
130
|
+
//# sourceMappingURL=line-Dbt6KFRK.cjs.map
|