@tabler/charts 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -16
- package/dist/{annotations-CpCWA29b.cjs → annotations--m-HzMBM.cjs} +86 -10
- package/dist/annotations--m-HzMBM.cjs.map +1 -0
- package/dist/{annotations-B02GR_KU.d.ts → annotations-CCDUC1lW.d.ts} +16 -30
- package/dist/{annotations-CHafaGd4.d.cts → annotations-CqZM1z9R.d.cts} +16 -30
- package/dist/{annotations-BQ8l-qHs.js → annotations-DGITy6th.js} +86 -10
- package/dist/annotations-DGITy6th.js.map +1 -0
- package/dist/annotations.cjs +1 -1
- package/dist/annotations.d.cts +1 -1
- package/dist/annotations.d.ts +1 -1
- package/dist/annotations.js +1 -1
- package/dist/{area-WdtfqvhX.js → area-BN0uE9R0.js} +4 -3
- package/dist/area-BN0uE9R0.js.map +1 -0
- package/dist/{area-h_FvieFb.d.cts → area-D6LNLk3r.d.cts} +2 -2
- package/dist/{area-DEFQm_SQ.d.ts → area-DEFL-Yun.d.ts} +2 -2
- package/dist/{area-DYdQ_sMV.cjs → area-D_N8b4Ng.cjs} +4 -3
- package/dist/area-D_N8b4Ng.cjs.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.d.cts +1 -1
- package/dist/area.d.ts +1 -1
- package/dist/area.js +1 -1
- package/dist/{axis-YfAerNBA.cjs → axis-BzBkkC5X.cjs} +12 -7
- package/dist/axis-BzBkkC5X.cjs.map +1 -0
- package/dist/{axis-MMaVoSWB.js → axis-C5obgdJt.js} +12 -7
- package/dist/axis-C5obgdJt.js.map +1 -0
- package/dist/{bar-CVkOJ7WA.cjs → bar-BrmfXugT.cjs} +5 -4
- package/dist/bar-BrmfXugT.cjs.map +1 -0
- package/dist/{bar-D9B_arKf.d.ts → bar-Bs_rPqgR.d.ts} +1 -1
- package/dist/{bar-DZCQ-kyf.d.cts → bar-CEt8YRxf.d.cts} +2 -2
- package/dist/{bar-BOcRcArc.js → bar-D_KKd2fL.js} +5 -4
- package/dist/bar-D_KKd2fL.js.map +1 -0
- package/dist/bar.cjs +1 -1
- package/dist/bar.d.cts +1 -1
- package/dist/bar.d.ts +1 -1
- package/dist/bar.js +1 -1
- package/dist/{calendar-BSvO8nRb.d.cts → calendar-B7843sQu.d.cts} +2 -2
- package/dist/{calendar-DAFXjV99.cjs → calendar-BG_q_NC_.cjs} +2 -2
- package/dist/{calendar-DAFXjV99.cjs.map → calendar-BG_q_NC_.cjs.map} +1 -1
- package/dist/{calendar-BXgIX5H1.js → calendar-CF3gfDQk.js} +2 -2
- package/dist/{calendar-BXgIX5H1.js.map → calendar-CF3gfDQk.js.map} +1 -1
- package/dist/{calendar-Bq3vFzPl.d.ts → calendar-D10_ki1S.d.ts} +2 -2
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.cts +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/{candlestick-BtT9glp9.js → candlestick-B1onjo1o.js} +3 -2
- package/dist/candlestick-B1onjo1o.js.map +1 -0
- package/dist/{candlestick-BcomxeVG.d.cts → candlestick-B7YXUVVh.d.cts} +4 -3
- package/dist/{candlestick-CSmRuZ4v.cjs → candlestick-BwrFKak_.cjs} +3 -2
- package/dist/candlestick-BwrFKak_.cjs.map +1 -0
- package/dist/{candlestick-B3WcLzph.d.ts → candlestick-XpqJvarq.d.ts} +4 -3
- package/dist/candlestick.cjs +2 -2
- package/dist/candlestick.d.cts +1 -1
- package/dist/candlestick.d.ts +1 -1
- package/dist/candlestick.js +2 -2
- package/dist/{cartesian-DRSXHxWe.cjs → cartesian-B9CrasFJ.cjs} +49 -7
- package/dist/cartesian-B9CrasFJ.cjs.map +1 -0
- package/dist/{cartesian-BrPqb5Qn.js → cartesian-COglz544.js} +45 -9
- package/dist/cartesian-COglz544.js.map +1 -0
- package/dist/{chart-B6TTY4Kr.js → chart-B97FBRCd.js} +22 -12
- package/dist/chart-B97FBRCd.js.map +1 -0
- package/dist/{chart-CYrrUCi3.d.ts → chart-CE9EVbfV.d.ts} +240 -62
- package/dist/{chart-CbPzP5Dp.d.cts → chart-Dz4geQZy.d.cts} +240 -62
- package/dist/{chart-D_lyOy-M.cjs → chart-GUmmjJ7S.cjs} +27 -11
- package/dist/chart-GUmmjJ7S.cjs.map +1 -0
- package/dist/{core-CQ0FaJ4G.js → core-7fgM3su0.js} +84 -16
- package/dist/core-7fgM3su0.js.map +1 -0
- package/dist/{core-C3qEppSm.d.ts → core-BUQzLsRJ.d.ts} +21 -6
- package/dist/{core-D2PSked3.cjs → core-BZTrsPxc.cjs} +93 -13
- package/dist/core-BZTrsPxc.cjs.map +1 -0
- package/dist/{core-9BnLEW4K.d.cts → core-Ck5uHcW8.d.cts} +40 -23
- package/dist/core.cjs +20 -16
- package/dist/core.d.cts +23 -21
- package/dist/core.d.ts +23 -21
- package/dist/core.js +18 -17
- package/dist/{dates-DerXTb1J.cjs → dates-0YNY49KQ.cjs} +2 -2
- package/dist/{dates-DerXTb1J.cjs.map → dates-0YNY49KQ.cjs.map} +1 -1
- package/dist/{dates-DLe2Ww64.js → dates-CKDRgpin.js} +2 -2
- package/dist/{dates-DLe2Ww64.js.map → dates-CKDRgpin.js.map} +1 -1
- package/dist/end-labels-B3oRvjxw.js +114 -0
- package/dist/end-labels-B3oRvjxw.js.map +1 -0
- package/dist/end-labels-CS-fnpp-.cjs +119 -0
- package/dist/end-labels-CS-fnpp-.cjs.map +1 -0
- package/dist/end-labels.cjs +11 -0
- package/dist/end-labels.cjs.map +1 -0
- package/dist/end-labels.d.cts +6 -0
- package/dist/end-labels.d.ts +6 -0
- package/dist/end-labels.js +11 -0
- package/dist/end-labels.js.map +1 -0
- package/dist/{export-chart-DoeiAyR2.js → export-chart-BOH_nfcH.js} +76 -4
- package/dist/export-chart-BOH_nfcH.js.map +1 -0
- package/dist/{export-chart-CPtXmZvi.cjs → export-chart-Be4T9J3m.cjs} +81 -3
- package/dist/export-chart-Be4T9J3m.cjs.map +1 -0
- package/dist/export.cjs +4 -2
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +4 -3
- package/dist/export.d.ts +4 -3
- package/dist/export.js +4 -3
- package/dist/export.js.map +1 -1
- package/dist/features-B55rwpQC.js.map +1 -1
- package/dist/features-DEDP5CEQ.cjs.map +1 -1
- package/dist/{funnel-CarOh8w_.d.cts → funnel-B9ridzNx.d.cts} +2 -2
- package/dist/{funnel-BdcfUkb5.d.ts → funnel-FogM8flk.d.ts} +2 -2
- package/dist/funnel.d.cts +1 -1
- package/dist/funnel.d.ts +1 -1
- package/dist/{gauge-Ds9k1UV2.d.cts → gauge-BScJ7U6O.d.cts} +2 -2
- package/dist/{gauge-Zy25jfps.d.ts → gauge-D78oq1Lx.d.ts} +2 -2
- package/dist/gauge.d.cts +1 -1
- package/dist/gauge.d.ts +1 -1
- package/dist/heat-Bsqq4zw9.js +38 -0
- package/dist/heat-Bsqq4zw9.js.map +1 -0
- package/dist/heat-DYsivvDq.cjs +49 -0
- package/dist/heat-DYsivvDq.cjs.map +1 -0
- package/dist/{heatmap-Dcc_bsoQ.cjs → heatmap-Dyzrd4Fd.cjs} +3 -3
- package/dist/{heatmap-Dcc_bsoQ.cjs.map → heatmap-Dyzrd4Fd.cjs.map} +1 -1
- package/dist/{heatmap-C1v8bwpq.js → heatmap-J7fxG7MM.js} +3 -3
- package/dist/{heatmap-C1v8bwpq.js.map → heatmap-J7fxG7MM.js.map} +1 -1
- package/dist/{heatmap-CJ-0dfhJ.d.cts → heatmap-Jvwo7iFW.d.cts} +2 -2
- package/dist/{heatmap-Jp5sHRTo.d.ts → heatmap-mFCnP6aB.d.ts} +2 -2
- package/dist/heatmap.cjs +1 -1
- package/dist/heatmap.d.cts +1 -1
- package/dist/heatmap.d.ts +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/index.cjs +37 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -21
- package/dist/index.d.ts +23 -21
- package/dist/index.js +34 -27
- package/dist/index.js.map +1 -1
- package/dist/interaction-DXYSjgnP.cjs.map +1 -1
- package/dist/interaction-En1KlwFO.js.map +1 -1
- package/dist/layout-CYerDebD.d.cts +29 -0
- package/dist/layout-CYerDebD.d.ts +29 -0
- package/dist/{line-CxR4tg1Q.js → line-CXH0L10d.js} +43 -8
- package/dist/line-CXH0L10d.js.map +1 -0
- package/dist/{line-vyWO030v.d.cts → line-Cu9ctpbv.d.cts} +9 -2
- package/dist/{line-YiCuhVMI.cjs → line-DHbYCQy4.cjs} +43 -8
- package/dist/line-DHbYCQy4.cjs.map +1 -0
- package/dist/{line-Bpr5uVLQ.d.ts → line-TkzA7wMK.d.ts} +8 -1
- package/dist/line.cjs +1 -1
- package/dist/line.d.cts +1 -1
- package/dist/line.d.ts +1 -1
- package/dist/line.js +1 -1
- package/dist/{map-49FcfdmJ.d.cts → map-BirylCmT.d.cts} +2 -2
- package/dist/{map-C15NC7kW.js → map-CYp6x-uS.js} +3 -26
- package/dist/map-CYp6x-uS.js.map +1 -0
- package/dist/{map-BqrZ80vT.cjs → map-ChwSgooH.cjs} +4 -27
- package/dist/map-ChwSgooH.cjs.map +1 -0
- package/dist/{map-BMC61J-P.d.ts → map-DNqog2Xs.d.ts} +2 -2
- package/dist/map.cjs +1 -1
- package/dist/map.d.cts +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +1 -1
- package/dist/maps/world.d.cts +1 -1
- package/dist/maps/world.d.ts +1 -1
- package/dist/{others-ls5eKtZ4.d.cts → others-CuNdpvjd.d.cts} +1 -1
- package/dist/{parliament-Cz9n_DoK.d.ts → parliament-CHdf13XU.d.ts} +2 -2
- package/dist/{parliament-C7V8UJj1.d.cts → parliament-CsYgh4N2.d.cts} +2 -2
- package/dist/parliament.d.cts +1 -1
- package/dist/parliament.d.ts +1 -1
- package/dist/{patterns-Dw7OMD_2.cjs → patterns-BPN1c9qe.cjs} +2 -2
- package/dist/{patterns-Dw7OMD_2.cjs.map → patterns-BPN1c9qe.cjs.map} +1 -1
- package/dist/{patterns-BMUINoka.js → patterns-CVrLrJXg.js} +2 -2
- package/dist/{patterns-BMUINoka.js.map → patterns-CVrLrJXg.js.map} +1 -1
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.d.cts +1 -1
- package/dist/patterns.d.ts +1 -1
- package/dist/patterns.js +1 -1
- package/dist/{percentage-bar-cSeiLdwU.d.ts → percentage-bar-CSAbzDOn.d.ts} +2 -2
- package/dist/{percentage-bar-R1--2grK.d.cts → percentage-bar-UZHCRvlK.d.cts} +3 -3
- package/dist/percentage-bar.d.cts +1 -1
- package/dist/percentage-bar.d.ts +1 -1
- package/dist/{pie-vD5-g8je.d.cts → pie-AFedsDcF.d.cts} +12 -3
- package/dist/{pie-Bd8wyrtY.js → pie-Ch6Bx0ih.js} +54 -39
- package/dist/pie-Ch6Bx0ih.js.map +1 -0
- package/dist/{pie-BseZlCgP.cjs → pie-Cll1OrVZ.cjs} +54 -39
- package/dist/pie-Cll1OrVZ.cjs.map +1 -0
- package/dist/{pie-BQQkvy1N.d.ts → pie-Cn2H3pz8.d.ts} +11 -2
- package/dist/pie.cjs +1 -1
- package/dist/pie.d.cts +1 -1
- package/dist/pie.d.ts +1 -1
- package/dist/pie.js +1 -1
- package/dist/point-shapes.d.cts +1 -1
- package/dist/point-shapes.d.ts +1 -1
- package/dist/{radar-D6XqkFWQ.js → radar-Bg-IiIWB.js} +3 -3
- package/dist/{radar-D6XqkFWQ.js.map → radar-Bg-IiIWB.js.map} +1 -1
- package/dist/{radar-vLxilcr4.d.ts → radar-DEer2jjd.d.ts} +2 -2
- package/dist/{radar-7I6hsY_h.d.cts → radar-DxmjXhMc.d.cts} +2 -2
- package/dist/{radar-DjISDnSf.cjs → radar-wDyX17S3.cjs} +3 -3
- package/dist/{radar-DjISDnSf.cjs.map → radar-wDyX17S3.cjs.map} +1 -1
- package/dist/radar.cjs +1 -1
- package/dist/radar.d.cts +1 -1
- package/dist/radar.d.ts +1 -1
- package/dist/radar.js +1 -1
- package/dist/range-bar-BnKjJP89.cjs +348 -0
- package/dist/range-bar-BnKjJP89.cjs.map +1 -0
- package/dist/range-bar-C4cRaaQE.d.ts +123 -0
- package/dist/range-bar-D32dIQOY.d.cts +123 -0
- package/dist/range-bar-Dx6ce0J1.js +343 -0
- package/dist/range-bar-Dx6ce0J1.js.map +1 -0
- package/dist/range-bar.cjs +3 -0
- package/dist/range-bar.d.cts +3 -0
- package/dist/range-bar.d.ts +3 -0
- package/dist/range-bar.js +1 -0
- package/dist/{sankey-DqiuxUx7.d.cts → sankey-D-8ATwBT.d.cts} +2 -2
- package/dist/{sankey-7As41Fo4.d.ts → sankey-DpYJsOI4.d.ts} +2 -2
- package/dist/sankey.d.cts +1 -1
- package/dist/sankey.d.ts +1 -1
- package/dist/{scatter-DCMAtt5L.js → scatter-0Z7K_YUz.js} +65 -19
- package/dist/scatter-0Z7K_YUz.js.map +1 -0
- package/dist/{scatter-BXkXGgM_.d.ts → scatter-BAL5K9_4.d.ts} +22 -9
- package/dist/{scatter-DL0zAV09.d.cts → scatter-BUGbnRzM.d.cts} +22 -9
- package/dist/{scatter-Bwkblr4L.cjs → scatter-CZ8do3Up.cjs} +65 -19
- package/dist/scatter-CZ8do3Up.cjs.map +1 -0
- package/dist/scatter.cjs +1 -1
- package/dist/scatter.d.cts +2 -2
- package/dist/scatter.d.ts +2 -2
- package/dist/scatter.js +1 -1
- package/dist/slice-labels-1TBq7p3q.d.cts +28 -0
- package/dist/slice-labels-C9ucsBVW.js +88 -0
- package/dist/slice-labels-C9ucsBVW.js.map +1 -0
- package/dist/slice-labels-CbFiy46l.cjs +93 -0
- package/dist/slice-labels-CbFiy46l.cjs.map +1 -0
- package/dist/slice-labels-Cm5CyV7B.d.ts +28 -0
- package/dist/slice-labels.cjs +11 -0
- package/dist/slice-labels.cjs.map +1 -0
- package/dist/slice-labels.d.cts +6 -0
- package/dist/slice-labels.d.ts +6 -0
- package/dist/slice-labels.js +11 -0
- package/dist/slice-labels.js.map +1 -0
- package/dist/{sparkline-BElUSd0r.d.ts → sparkline-CtoBJe-a.d.ts} +2 -2
- package/dist/{sparkline-BMSuEPHP.cjs → sparkline-DjR-V6BI.cjs} +2 -2
- package/dist/{sparkline-BMSuEPHP.cjs.map → sparkline-DjR-V6BI.cjs.map} +1 -1
- package/dist/{sparkline-RYly7bR0.d.cts → sparkline-DwHJfeZz.d.cts} +2 -2
- package/dist/{sparkline-NDmq90kP.js → sparkline-_dxwtdli.js} +2 -2
- package/dist/{sparkline-NDmq90kP.js.map → sparkline-_dxwtdli.js.map} +1 -1
- package/dist/sparkline.cjs +1 -1
- package/dist/sparkline.d.cts +1 -1
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/{stack-BTWYIwLO.d.cts → stack-CcmyALx0.d.cts} +1 -1
- package/dist/{stack-jVKvg2x_.js → stack-CyVlS7Fr.js} +2 -2
- package/dist/{stack-jVKvg2x_.js.map → stack-CyVlS7Fr.js.map} +1 -1
- package/dist/{stack-BO4624CY.cjs → stack-DBhmYNat.cjs} +2 -2
- package/dist/{stack-BO4624CY.cjs.map → stack-DBhmYNat.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-axis-B3VekUfX.cjs → time-axis-CVKjQKSS.cjs} +3 -3
- package/dist/{time-axis-B3VekUfX.cjs.map → time-axis-CVKjQKSS.cjs.map} +1 -1
- package/dist/{time-axis-CLjqOakA.js → time-axis-CkmbAw4Z.js} +3 -3
- package/dist/{time-axis-CLjqOakA.js.map → time-axis-CkmbAw4Z.js.map} +1 -1
- package/dist/time.cjs +2 -2
- package/dist/time.js +2 -2
- package/dist/{treemap-25vHO_UK.d.cts → treemap-C2maqerU.d.cts} +26 -4
- package/dist/{treemap-BCXUbixd.d.ts → treemap-D_zbubo3.d.ts} +26 -4
- package/dist/{treemap-CZk8kKFD.cjs → treemap-PulGXZv0.cjs} +38 -8
- package/dist/treemap-PulGXZv0.cjs.map +1 -0
- package/dist/{treemap-C4glsx-g.js → treemap-lbYxb-7h.js} +38 -8
- package/dist/treemap-lbYxb-7h.js.map +1 -0
- package/dist/treemap.cjs +1 -1
- package/dist/treemap.d.cts +1 -1
- package/dist/treemap.d.ts +1 -1
- package/dist/treemap.js +1 -1
- package/dist/{value-labels-C7GrhOXJ.js → value-labels-B0VeheyE.js} +5 -4
- package/dist/value-labels-B0VeheyE.js.map +1 -0
- package/dist/{value-labels-DzaKIWKp.cjs → value-labels-Dcyk3GIY.cjs} +5 -4
- package/dist/value-labels-Dcyk3GIY.cjs.map +1 -0
- package/dist/value-labels.cjs +1 -1
- package/dist/value-labels.d.cts +1 -1
- package/dist/value-labels.d.ts +1 -1
- package/dist/value-labels.js +1 -1
- package/dist/zoom.cjs +810 -0
- package/dist/zoom.cjs.map +1 -0
- package/dist/zoom.d.cts +34 -0
- package/dist/zoom.d.ts +34 -0
- package/dist/zoom.js +806 -0
- package/dist/zoom.js.map +1 -0
- package/package.json +27 -2
- package/dist/annotations-BQ8l-qHs.js.map +0 -1
- package/dist/annotations-CpCWA29b.cjs.map +0 -1
- package/dist/area-DYdQ_sMV.cjs.map +0 -1
- package/dist/area-WdtfqvhX.js.map +0 -1
- package/dist/axis-MMaVoSWB.js.map +0 -1
- package/dist/axis-YfAerNBA.cjs.map +0 -1
- package/dist/bar-BOcRcArc.js.map +0 -1
- package/dist/bar-CVkOJ7WA.cjs.map +0 -1
- package/dist/candlestick-BtT9glp9.js.map +0 -1
- package/dist/candlestick-CSmRuZ4v.cjs.map +0 -1
- package/dist/cartesian-BrPqb5Qn.js.map +0 -1
- package/dist/cartesian-DRSXHxWe.cjs.map +0 -1
- package/dist/chart-B6TTY4Kr.js.map +0 -1
- package/dist/chart-D_lyOy-M.cjs.map +0 -1
- package/dist/core-CQ0FaJ4G.js.map +0 -1
- package/dist/core-D2PSked3.cjs.map +0 -1
- package/dist/export-chart-CPtXmZvi.cjs.map +0 -1
- package/dist/export-chart-DoeiAyR2.js.map +0 -1
- package/dist/line-CxR4tg1Q.js.map +0 -1
- package/dist/line-YiCuhVMI.cjs.map +0 -1
- package/dist/map-BqrZ80vT.cjs.map +0 -1
- package/dist/map-C15NC7kW.js.map +0 -1
- package/dist/pie-Bd8wyrtY.js.map +0 -1
- package/dist/pie-BseZlCgP.cjs.map +0 -1
- package/dist/scatter-Bwkblr4L.cjs.map +0 -1
- package/dist/scatter-DCMAtt5L.js.map +0 -1
- package/dist/treemap-C4glsx-g.js.map +0 -1
- package/dist/treemap-CZk8kKFD.cjs.map +0 -1
- package/dist/value-labels-C7GrhOXJ.js.map +0 -1
- package/dist/value-labels-DzaKIWKp.cjs.map +0 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as Rect, n as InsetsInput } from "./layout-CYerDebD.js";
|
|
2
2
|
import { a as ClassValue, i as ChildInput, l as VNode, n as Attrs, s as Props } from "./vnode-Du2cC8Fm.js";
|
|
3
|
+
import { n as annotationLayers, r as annotationValues, t as Annotation } from "./annotations-CCDUC1lW.js";
|
|
3
4
|
import { a as timePointScale, c as NumberFormat, i as time, s as Locale } from "./time-DRIDgv2a.js";
|
|
4
5
|
import { n as BandScale, t as BandKey } from "./band-CNKvdnTC.js";
|
|
5
6
|
import { n as log, r as LinearScale } from "./log-CI41TmcU.js";
|
|
7
|
+
import { a as linePath, i as areaPath, r as Point } from "./path-YeUiOfG8.js";
|
|
8
|
+
import { n as sliceLabels } from "./slice-labels-Cm5CyV7B.js";
|
|
6
9
|
import { t as hydrate } from "./hydrate-OjM1pIUG.js";
|
|
7
10
|
import { t as morph } from "./morph-Dh7gJkV4.js";
|
|
8
|
-
import { a as linePath, i as areaPath, r as Point } from "./path-YeUiOfG8.js";
|
|
9
11
|
/** One series' value at a hovered position. */
|
|
10
12
|
interface HitItem {
|
|
11
13
|
/** Series name. */
|
|
@@ -45,6 +47,23 @@ interface Hit {
|
|
|
45
47
|
seriesIndex?: number;
|
|
46
48
|
/** The shape that marks the hit; a crosshair when left out. */
|
|
47
49
|
highlight?: Highlight;
|
|
50
|
+
/**
|
|
51
|
+
* The value under the pointer on the value axis (cartesian charts, for a
|
|
52
|
+
* hit from the pointer): what `crosshair: { value: true }` shows.
|
|
53
|
+
*/
|
|
54
|
+
cursor?: HitCursor;
|
|
55
|
+
}
|
|
56
|
+
/** The value under the pointer, read off the value axis. */
|
|
57
|
+
interface HitCursor {
|
|
58
|
+
value: number;
|
|
59
|
+
/** The value formatted like the axis, with the precision of a pixel. */
|
|
60
|
+
text: string;
|
|
61
|
+
/** Where the pointer is along the value axis, in chart pixels. */
|
|
62
|
+
position: number;
|
|
63
|
+
/** The side of the plot the value axis is on. */
|
|
64
|
+
side: "left" | "right" | "bottom";
|
|
65
|
+
/** The axis is hidden (`y.show: false`): the value is written inside the plot. */
|
|
66
|
+
inside?: boolean;
|
|
48
67
|
}
|
|
49
68
|
/**
|
|
50
69
|
* The one shape drawn to mark a hit, in chart pixels:
|
|
@@ -147,11 +166,14 @@ interface AxisOptions {
|
|
|
147
166
|
tickPadding?: number;
|
|
148
167
|
/** Draw the axis line along the plot edge. Defaults to `false`. */
|
|
149
168
|
line?: boolean;
|
|
169
|
+
/** Turn the labels of an axis below the plot 90°, reading bottom to top. */
|
|
170
|
+
rotate?: boolean;
|
|
150
171
|
}
|
|
151
172
|
/** Pixels an axis occupies perpendicular to the plot edge (for margins). */
|
|
152
173
|
declare function axisSize(position: AxisPosition, ticks: readonly Tick[], fontSize: number, options?: {
|
|
153
174
|
tickSize?: number;
|
|
154
175
|
tickPadding?: number;
|
|
176
|
+
rotate?: boolean;
|
|
155
177
|
}): number;
|
|
156
178
|
/**
|
|
157
179
|
* Render an axis as `<g class="tc-axis tc-axis-{x|y} tc-axis-{position}">`
|
|
@@ -159,6 +181,70 @@ declare function axisSize(position: AxisPosition, ticks: readonly Tick[], fontSi
|
|
|
159
181
|
* transition when the scale changes.
|
|
160
182
|
*/
|
|
161
183
|
declare function axis(options: AxisOptions): VNode;
|
|
184
|
+
/**
|
|
185
|
+
* The categories a chart shows, as indexes into its labels, both included.
|
|
186
|
+
* A side left out runs to that end of the data.
|
|
187
|
+
*/
|
|
188
|
+
interface ViewWindow {
|
|
189
|
+
/** Index of the first category shown. Defaults to `0`. */
|
|
190
|
+
start?: number;
|
|
191
|
+
/** Index of the last category shown. Defaults to the last one. */
|
|
192
|
+
end?: number;
|
|
193
|
+
}
|
|
194
|
+
interface ZoomOptions {
|
|
195
|
+
/** Zoom with the wheel (and a pinch on a trackpad). Defaults to `true`. */
|
|
196
|
+
wheel?: boolean;
|
|
197
|
+
/** Show the zoom in, zoom out and reset buttons. Defaults to `true`. */
|
|
198
|
+
controls?: boolean;
|
|
199
|
+
/** The fewest categories a reader can zoom in to. Defaults to `2`. */
|
|
200
|
+
min?: number;
|
|
201
|
+
/** Names of the buttons, for a page in another language. */
|
|
202
|
+
labels?: {
|
|
203
|
+
in?: string;
|
|
204
|
+
out?: string;
|
|
205
|
+
reset?: string;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/** The options of a chart that can show a window of its categories. */
|
|
209
|
+
interface Zoomable {
|
|
210
|
+
/**
|
|
211
|
+
* Let the reader zoom along the categories: with the wheel, by dragging
|
|
212
|
+
* over a range, with a pinch, the buttons or the `+`, `-` and `0` keys;
|
|
213
|
+
* Shift with a drag, the wheel or an arrow key moves the range. The range
|
|
214
|
+
* shown lives in `view`. Needs `import '@tabler/charts/zoom'`.
|
|
215
|
+
*/
|
|
216
|
+
zoom?: boolean | ZoomOptions;
|
|
217
|
+
/**
|
|
218
|
+
* The range of categories shown; the value axis follows the values in it.
|
|
219
|
+
* Set it to show a part of the data, read it from `chart.config.view`
|
|
220
|
+
* after a zoom. Needs `import '@tabler/charts/zoom'`.
|
|
221
|
+
*/
|
|
222
|
+
view?: ViewWindow | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* Make the chart a brush: it shows all its data with a range marked on
|
|
225
|
+
* it, which the reader moves, resizes by its ends or draws again, and
|
|
226
|
+
* which charts in the same `sync` group take as their `view` (matched by
|
|
227
|
+
* label). Zooming one of them moves the range too. The range lives in
|
|
228
|
+
* `selection`. `min` is the fewest categories it can cover (2 by
|
|
229
|
+
* default). The brush and the charts of its group add to their
|
|
230
|
+
* `padding` so that their plots start and end together; `align: false`
|
|
231
|
+
* leaves them as they are. Needs `import '@tabler/charts/zoom'`.
|
|
232
|
+
*/
|
|
233
|
+
brush?: boolean | {
|
|
234
|
+
min?: number;
|
|
235
|
+
align?: boolean;
|
|
236
|
+
};
|
|
237
|
+
/** The range marked on a brush; everything when left out. */
|
|
238
|
+
selection?: ViewWindow | undefined;
|
|
239
|
+
}
|
|
240
|
+
/** The first and last index of a view over `count` categories, within the data. */
|
|
241
|
+
declare function viewRange(view: ViewWindow | undefined, count: number): [number, number];
|
|
242
|
+
/**
|
|
243
|
+
* The options of a chart with only the categories of its `view`: the chart
|
|
244
|
+
* type then draws them like any other data, so axes, stacks, tooltips and
|
|
245
|
+
* the table all follow the range shown.
|
|
246
|
+
*/
|
|
247
|
+
declare function viewWindow<O extends object>(options: O): O;
|
|
162
248
|
/** Category label on the x axis. */
|
|
163
249
|
type Label = string | number | Date;
|
|
164
250
|
/** One data series. `null` values are gaps. */
|
|
@@ -180,6 +266,12 @@ interface Series {
|
|
|
180
266
|
* that could inject CSS are ignored, as for `color`.
|
|
181
267
|
*/
|
|
182
268
|
dash?: number | string;
|
|
269
|
+
/**
|
|
270
|
+
* Dash the line only from this label on (a forecast, provisional figures):
|
|
271
|
+
* it stays solid up to the label and takes `dash` (`'5 4'` when left out)
|
|
272
|
+
* after it. Line and area charts.
|
|
273
|
+
*/
|
|
274
|
+
dashFrom?: Label;
|
|
183
275
|
/** Line width in pixels; overrides `--tc-stroke-width` via `--tc-series-width`. */
|
|
184
276
|
width?: number;
|
|
185
277
|
/**
|
|
@@ -248,6 +340,12 @@ interface CategoryAxisOptions {
|
|
|
248
340
|
line?: boolean;
|
|
249
341
|
/** Format a label for display (axis ticks for categories, tooltips and the table). */
|
|
250
342
|
format?: (label: Label, index: number) => string;
|
|
343
|
+
/**
|
|
344
|
+
* Turn the labels 90°, reading bottom to top, so that many or long
|
|
345
|
+
* categories all keep their label. Categories along the bottom only: not
|
|
346
|
+
* on a time axis, nor in horizontal bars.
|
|
347
|
+
*/
|
|
348
|
+
rotate?: boolean;
|
|
251
349
|
/**
|
|
252
350
|
* `'time'` treats labels as dates or timestamps: line and area charts place
|
|
253
351
|
* points at their real distance in time, with calendar-aware ticks.
|
|
@@ -260,7 +358,7 @@ interface CategoryAxisOptions {
|
|
|
260
358
|
/** Run the categories from the right. Defaults to the chart's `rtl`. */
|
|
261
359
|
reverse?: boolean;
|
|
262
360
|
}
|
|
263
|
-
interface CartesianOptions {
|
|
361
|
+
interface CartesianOptions extends Zoomable {
|
|
264
362
|
data: CartesianData;
|
|
265
363
|
y?: ValueAxisOptions;
|
|
266
364
|
/**
|
|
@@ -336,6 +434,25 @@ declare function seriesTable(options: CartesianOptions, ctx: TableContext, limit
|
|
|
336
434
|
* the date, with the time of day when the labels span less than a few days.
|
|
337
435
|
*/
|
|
338
436
|
declare function dateLabels(labels: readonly Label[], utc: boolean | undefined, locale: Locale): (label: Label) => string;
|
|
437
|
+
interface EndLabelOptions {
|
|
438
|
+
/** Format of the values. Defaults to the format of the series' value axis. */
|
|
439
|
+
format?: NumberFormat;
|
|
440
|
+
/** Write the last value after the name. Defaults to `true`. */
|
|
441
|
+
value?: boolean;
|
|
442
|
+
}
|
|
443
|
+
type Options = CartesianOptions & {
|
|
444
|
+
endLabels?: boolean | EndLabelOptions;
|
|
445
|
+
};
|
|
446
|
+
/**
|
|
447
|
+
* The end labels of a line chart: its `options` with room for the labels
|
|
448
|
+
* beside the plot (on the side the lines end at), and the `layer` that
|
|
449
|
+
* draws them once the points of every series (`null` for gaps) and the plot
|
|
450
|
+
* area are known. `overhang` is what the marks take beyond the plot's edge.
|
|
451
|
+
*/
|
|
452
|
+
declare function endLabels<O extends Options>(options: O, ctx: RenderContext, overhang: number): {
|
|
453
|
+
options: O;
|
|
454
|
+
layer: (points: readonly (readonly Point[])[], area: Rect) => VNode | null;
|
|
455
|
+
};
|
|
339
456
|
/** Domain of a log axis: positive values only, niced to whole powers of ten. */
|
|
340
457
|
declare function logDomain(values: readonly (number | null | undefined)[], options: ValueAxisOptions): [number, number];
|
|
341
458
|
/** Ticks of a log axis, each power formatted as is. */
|
|
@@ -361,6 +478,13 @@ interface LegendOptions {
|
|
|
361
478
|
* otherwise. Defaults to `'top'`.
|
|
362
479
|
*/
|
|
363
480
|
position?: "top" | "bottom" | "left" | "right" | "auto";
|
|
481
|
+
/**
|
|
482
|
+
* Keep the legend inside the chart's `height`: a legend above or below the
|
|
483
|
+
* chart takes its height from the plot, so a chart with `height: 240` is
|
|
484
|
+
* 240 pixels tall with its legend (cards in a row stay the same size).
|
|
485
|
+
* Only with a `height` in pixels. Defaults to `false`: the legend adds to it.
|
|
486
|
+
*/
|
|
487
|
+
withinHeight?: boolean;
|
|
364
488
|
}
|
|
365
489
|
/**
|
|
366
490
|
* Legend content: one toggle button per entry. Buttons are native, so they
|
|
@@ -416,11 +540,15 @@ interface ImageOptions extends ExportOptions {
|
|
|
416
540
|
/** Quality of lossy types, `0…1`. */
|
|
417
541
|
quality?: number;
|
|
418
542
|
}
|
|
419
|
-
interface
|
|
543
|
+
interface CSVOptions {
|
|
544
|
+
/** Separator of the values. Defaults to `','`. */
|
|
545
|
+
delimiter?: string;
|
|
546
|
+
}
|
|
547
|
+
interface DownloadOptions extends ImageOptions, CSVOptions {
|
|
420
548
|
/** File name without the extension. Defaults to the chart's title, or `chart`. */
|
|
421
549
|
filename?: string;
|
|
422
550
|
/** File format. Defaults to `'png'`. */
|
|
423
|
-
format?: "svg" | "png" | "jpeg" | "webp";
|
|
551
|
+
format?: "svg" | "png" | "jpeg" | "webp" | "csv";
|
|
424
552
|
}
|
|
425
553
|
/** A chart, its container, or its root `<svg>`. */
|
|
426
554
|
type ExportTarget = Chart<object> | Element;
|
|
@@ -443,13 +571,75 @@ declare function exportSVG(target: ExportTarget, options?: ExportOptions): strin
|
|
|
443
571
|
*/
|
|
444
572
|
declare function exportImage(target: ExportTarget, options?: ImageOptions): Promise<Blob>;
|
|
445
573
|
/**
|
|
446
|
-
*
|
|
574
|
+
* The chart's data as CSV (RFC 4180): one row per category with a column per
|
|
575
|
+
* visible series, as in the chart's data table but with every row. Line,
|
|
576
|
+
* area, bar, heatmap and radar charts give plain values (numbers without
|
|
577
|
+
* their format, dates in ISO 8601, gaps empty); the other types give the
|
|
578
|
+
* text of their table. Text that a spreadsheet would run as a formula (`=`,
|
|
579
|
+
* `+`, `-` or `@` first) is prefixed with `'`. Takes the rendered chart
|
|
580
|
+
* itself, not its element.
|
|
581
|
+
*
|
|
582
|
+
* ```ts
|
|
583
|
+
* const csv = exportCSV(chart)
|
|
584
|
+
* ```
|
|
585
|
+
*/
|
|
586
|
+
declare function exportCSV(chart: Chart<object>, options?: CSVOptions): string;
|
|
587
|
+
/**
|
|
588
|
+
* Save the chart as a file: PNG by default, SVG, JPEG or WebP, or its data
|
|
589
|
+
* as CSV (which needs the chart itself, not its element).
|
|
447
590
|
*
|
|
448
591
|
* ```ts
|
|
449
592
|
* button.onclick = () => downloadChart(chart, { format: 'svg', filename: 'sales' })
|
|
450
593
|
* ```
|
|
451
594
|
*/
|
|
452
595
|
declare function downloadChart(target: ExportTarget, options?: DownloadOptions): Promise<void>;
|
|
596
|
+
/** What a plugin sees before the chart measures itself and renders. */
|
|
597
|
+
interface BeforeRenderState {
|
|
598
|
+
config: ChartConfig<object>;
|
|
599
|
+
legend: ResolvedLegend;
|
|
600
|
+
hidden: ReadonlySet<string>;
|
|
601
|
+
}
|
|
602
|
+
/** What a plugin sees after the chart rendered into the DOM. */
|
|
603
|
+
interface AfterRenderState extends BeforeRenderState {
|
|
604
|
+
size: Size;
|
|
605
|
+
/** Whether the chart content was rebuilt (config, size or hidden series changed). */
|
|
606
|
+
stale: boolean;
|
|
607
|
+
/** Whether the config or the hidden series changed (`stale` also covers size and font). */
|
|
608
|
+
changed: boolean;
|
|
609
|
+
}
|
|
610
|
+
/** Hooks of an installed plugin; every one is optional. */
|
|
611
|
+
interface PluginInstance {
|
|
612
|
+
/** Runs first on every render, e.g. to render a legend that takes up space. */
|
|
613
|
+
beforeRender?(state: BeforeRenderState): void;
|
|
614
|
+
/** Vertical space the plugin takes from the container in `height: 'container'` mode. */
|
|
615
|
+
reservedHeight?(): number;
|
|
616
|
+
/** Horizontal space the plugin takes from the container, e.g. a legend beside the chart. */
|
|
617
|
+
reservedWidth?(): number;
|
|
618
|
+
/** Extra attributes for the root `<svg>`. */
|
|
619
|
+
svgAttrs?(config: ChartConfig<object>): Props | undefined;
|
|
620
|
+
/** SVG drawn below (`under`) and above (`over`) the chart content for the active hit. */
|
|
621
|
+
layers?(hit: Hit, config: ChartConfig<object>): {
|
|
622
|
+
under?: ChildInput;
|
|
623
|
+
over?: ChildInput;
|
|
624
|
+
};
|
|
625
|
+
/** Runs after the SVG is in the DOM, e.g. to place a tooltip. */
|
|
626
|
+
afterRender?(state: AfterRenderState): void;
|
|
627
|
+
/** Clean up DOM and listeners. */
|
|
628
|
+
destroy?(): void;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* A chart feature that can be left out of the bundle: tooltip, legend, data
|
|
632
|
+
* table, keyboard navigation, hover highlight. `install` runs once per chart.
|
|
633
|
+
*
|
|
634
|
+
* ```ts
|
|
635
|
+
* import { Chart, tooltip } from '@tabler/charts/core'
|
|
636
|
+
* new Chart(el, { type: line, data, plugins: [tooltip()] })
|
|
637
|
+
* ```
|
|
638
|
+
*/
|
|
639
|
+
interface ChartPlugin {
|
|
640
|
+
readonly name: string;
|
|
641
|
+
install(chart: Chart<object>): PluginInstance;
|
|
642
|
+
}
|
|
453
643
|
/**
|
|
454
644
|
* Take `el` from the arc of its last render, `prev`, to the arc of `next`.
|
|
455
645
|
* Returns the attributes left for the caller to patch (all but `d`, set
|
|
@@ -459,7 +649,7 @@ declare function downloadChart(target: ExportTarget, options?: DownloadOptions):
|
|
|
459
649
|
declare function sweep(el: Element, prev: VNode, next: VNode): Attrs | undefined;
|
|
460
650
|
/**
|
|
461
651
|
* Optional features that chart types look up at render time. Each lives in
|
|
462
|
-
* its own module (`@tabler/charts/time`, `/log`, `/decimate`, `/line`, `/annotations`) and registers
|
|
652
|
+
* its own module (`@tabler/charts/time`, `/log`, `/decimate`, `/line`, `/annotations`, `/end-labels`, `/slice-labels`, `/zoom`) and registers
|
|
463
653
|
* itself when imported; `@tabler/charts` registers all of them, while
|
|
464
654
|
* `@tabler/charts/core` starts empty so unused code never ships.
|
|
465
655
|
*/
|
|
@@ -499,6 +689,10 @@ interface Features {
|
|
|
499
689
|
layers: typeof annotationLayers;
|
|
500
690
|
values: typeof annotationValues;
|
|
501
691
|
};
|
|
692
|
+
/** Names and last values at the end of lines, behind `endLabels`. */
|
|
693
|
+
"end-labels"?: typeof endLabels;
|
|
694
|
+
/** Names beside the slices of a pie, behind its `labels`. */
|
|
695
|
+
"slice-labels"?: typeof sliceLabels;
|
|
502
696
|
/** Pattern fills behind `patterns` (and forced colors, with `'auto'`). */
|
|
503
697
|
patterns?: typeof patternFills;
|
|
504
698
|
/**
|
|
@@ -510,6 +704,14 @@ interface Features {
|
|
|
510
704
|
"point-shapes"?: typeof markerPath;
|
|
511
705
|
/** The same shapes for legend and tooltip swatches, as CSS shapes. */
|
|
512
706
|
swatch?: typeof markerClip;
|
|
707
|
+
/**
|
|
708
|
+
* Behind `view` and `zoom` in cartesian charts: the window of categories a
|
|
709
|
+
* chart type draws, and what the `zoom()` plugin installs on a chart.
|
|
710
|
+
*/
|
|
711
|
+
zoom?: {
|
|
712
|
+
window: typeof viewWindow;
|
|
713
|
+
install: ChartPlugin["install"];
|
|
714
|
+
};
|
|
513
715
|
/** Saving a chart as a file, behind the `download` menu. */
|
|
514
716
|
export?: typeof downloadChart;
|
|
515
717
|
}
|
|
@@ -530,60 +732,19 @@ interface ValueLabelOptions {
|
|
|
530
732
|
format?: NumberFormat;
|
|
531
733
|
/** Which points of lines, areas and scatters get a label. Defaults to `'last'`. */
|
|
532
734
|
points?: "last" | "all";
|
|
735
|
+
/**
|
|
736
|
+
* Let the label of a point lie over a bar or a cell when it has no free
|
|
737
|
+
* place (a line over bars): every point keeps its label. Labels still
|
|
738
|
+
* never cover each other. Defaults to `false`.
|
|
739
|
+
*/
|
|
740
|
+
overMarks?: boolean;
|
|
533
741
|
}
|
|
534
742
|
/** The labels layer of a chart, or `null` when nothing gets one. */
|
|
535
743
|
declare function valueLabels(config: ChartConfig<object>, interaction: Interaction, ctx: RenderContext): VNode | null;
|
|
536
744
|
/** The step that adds the labels over the content of charts with `valueLabels`. */
|
|
537
745
|
declare const labelsStep: PostStep;
|
|
538
|
-
/** What a plugin sees before the chart measures itself and renders. */
|
|
539
|
-
interface BeforeRenderState {
|
|
540
|
-
config: ChartConfig<object>;
|
|
541
|
-
legend: ResolvedLegend;
|
|
542
|
-
hidden: ReadonlySet<string>;
|
|
543
|
-
}
|
|
544
|
-
/** What a plugin sees after the chart rendered into the DOM. */
|
|
545
|
-
interface AfterRenderState extends BeforeRenderState {
|
|
546
|
-
size: Size;
|
|
547
|
-
/** Whether the chart content was rebuilt (config, size or hidden series changed). */
|
|
548
|
-
stale: boolean;
|
|
549
|
-
/** Whether the config or the hidden series changed (`stale` also covers size and font). */
|
|
550
|
-
changed: boolean;
|
|
551
|
-
}
|
|
552
|
-
/** Hooks of an installed plugin; every one is optional. */
|
|
553
|
-
interface PluginInstance {
|
|
554
|
-
/** Runs first on every render, e.g. to render a legend that takes up space. */
|
|
555
|
-
beforeRender?(state: BeforeRenderState): void;
|
|
556
|
-
/** Vertical space the plugin takes from the container in `height: 'container'` mode. */
|
|
557
|
-
reservedHeight?(): number;
|
|
558
|
-
/** Horizontal space the plugin takes from the container, e.g. a legend beside the chart. */
|
|
559
|
-
reservedWidth?(): number;
|
|
560
|
-
/** Extra attributes for the root `<svg>`. */
|
|
561
|
-
svgAttrs?(config: ChartConfig<object>): Props | undefined;
|
|
562
|
-
/** SVG drawn below (`under`) and above (`over`) the chart content for the active hit. */
|
|
563
|
-
layers?(hit: Hit, config: ChartConfig<object>): {
|
|
564
|
-
under?: ChildInput;
|
|
565
|
-
over?: ChildInput;
|
|
566
|
-
};
|
|
567
|
-
/** Runs after the SVG is in the DOM, e.g. to place a tooltip. */
|
|
568
|
-
afterRender?(state: AfterRenderState): void;
|
|
569
|
-
/** Clean up DOM and listeners. */
|
|
570
|
-
destroy?(): void;
|
|
571
|
-
}
|
|
572
|
-
/**
|
|
573
|
-
* A chart feature that can be left out of the bundle: tooltip, legend, data
|
|
574
|
-
* table, keyboard navigation, hover highlight. `install` runs once per chart.
|
|
575
|
-
*
|
|
576
|
-
* ```ts
|
|
577
|
-
* import { Chart, tooltip } from '@tabler/charts/core'
|
|
578
|
-
* new Chart(el, { type: line, data, plugins: [tooltip()] })
|
|
579
|
-
* ```
|
|
580
|
-
*/
|
|
581
|
-
interface ChartPlugin {
|
|
582
|
-
readonly name: string;
|
|
583
|
-
install(chart: Chart<object>): PluginInstance;
|
|
584
|
-
}
|
|
585
746
|
/** A file format of the download menu. */
|
|
586
|
-
type DownloadFormat = "png" | "svg" | "jpeg" | "webp";
|
|
747
|
+
type DownloadFormat = "png" | "svg" | "jpeg" | "webp" | "csv";
|
|
587
748
|
/** The `download` option as an object. */
|
|
588
749
|
interface DownloadMenuOptions {
|
|
589
750
|
/** Formats offered, in this order. Defaults to `['png', 'svg']`. */
|
|
@@ -601,13 +762,15 @@ interface DownloadMenuOptions {
|
|
|
601
762
|
legend?: boolean;
|
|
602
763
|
/** Pixels per chart pixel in images. Defaults to `2`. */
|
|
603
764
|
scale?: number;
|
|
765
|
+
/** Separator of the values in a CSV file. Defaults to `','`. */
|
|
766
|
+
delimiter?: string;
|
|
604
767
|
}
|
|
605
768
|
/** The `download` option: on, a list of formats, or the options. */
|
|
606
769
|
type DownloadOption = boolean | readonly DownloadFormat[] | DownloadMenuOptions;
|
|
607
770
|
/**
|
|
608
771
|
* A download menu in the chart's corner (`.tc-download`): a button that opens
|
|
609
|
-
* a list of file formats, PNG and SVG by default
|
|
610
|
-
* option. The files come from `@tabler/charts/export`, which must be imported
|
|
772
|
+
* a list of file formats, PNG and SVG by default (`'csv'` adds the data as a
|
|
773
|
+
* CSV file). Shown with the `download` option. The files come from `@tabler/charts/export`, which must be imported
|
|
611
774
|
* (the chart says so otherwise): that way charts without a download never
|
|
612
775
|
* carry the export code.
|
|
613
776
|
*/
|
|
@@ -759,6 +922,10 @@ interface ChartType<O extends object = object, M extends object = [O] extends [n
|
|
|
759
922
|
*/
|
|
760
923
|
readonly plugins?: readonly ChartPlugin[];
|
|
761
924
|
}
|
|
925
|
+
interface CrosshairOptions {
|
|
926
|
+
/** A line through the pointer, and the value under it on the value axis. Defaults to `false`. */
|
|
927
|
+
value?: boolean;
|
|
928
|
+
}
|
|
762
929
|
/** Options shared by every chart type. */
|
|
763
930
|
interface BaseOptions {
|
|
764
931
|
/** Fixed width in pixels. Defaults to the container width. */
|
|
@@ -797,8 +964,18 @@ interface BaseOptions {
|
|
|
797
964
|
id?: string;
|
|
798
965
|
/** Show a tooltip on hover, optionally with custom content. Defaults to `true`. */
|
|
799
966
|
tooltip?: boolean | TooltipOptions;
|
|
800
|
-
/**
|
|
801
|
-
|
|
967
|
+
/**
|
|
968
|
+
* Show a vertical crosshair on hover (point charts). `{ value: true }` also
|
|
969
|
+
* draws a line through the pointer across the plot, with the value there
|
|
970
|
+
* written on the value axis (line, area, bar and candlestick charts; on the
|
|
971
|
+
* first axis of a chart with two). Defaults to `true`.
|
|
972
|
+
*/
|
|
973
|
+
crosshair?: boolean | CrosshairOptions;
|
|
974
|
+
/**
|
|
975
|
+
* Draw a dot on every value of the hovered category (point charts).
|
|
976
|
+
* `false` leaves the crosshair and the tooltip. Defaults to `true`.
|
|
977
|
+
*/
|
|
978
|
+
activePoints?: boolean;
|
|
802
979
|
/** Show a legend with toggles. Defaults to showing it for two or more entries. */
|
|
803
980
|
legend?: boolean | LegendOptions;
|
|
804
981
|
/**
|
|
@@ -820,7 +997,8 @@ interface BaseOptions {
|
|
|
820
997
|
* Write the values on the marks: bars at their end, stacked segments,
|
|
821
998
|
* cells and slices inside (slices show their share), lines and points
|
|
822
999
|
* above their last point (`points: 'all'` for every one). Labels that do
|
|
823
|
-
* not fit are left out
|
|
1000
|
+
* not fit are left out (`overMarks: true` keeps the labels of a line
|
|
1001
|
+
* where it crosses the bars). A series' own `valueLabels` overrides this for
|
|
824
1002
|
* that series, and each label carries its series classes
|
|
825
1003
|
* (`tc-series tc-series-{n}`). Needs `@tabler/charts/value-labels` on the
|
|
826
1004
|
* core (`@tabler/charts` includes it).
|
|
@@ -853,7 +1031,7 @@ interface BaseOptions {
|
|
|
853
1031
|
keyboard?: boolean;
|
|
854
1032
|
/**
|
|
855
1033
|
* A download menu in the chart's corner: `true` offers PNG and SVG, a list
|
|
856
|
-
* picks the formats (`['png', 'svg', 'jpeg', 'webp']`), an object also
|
|
1034
|
+
* picks the formats (`['png', 'svg', 'jpeg', 'webp', 'csv']`), an object also
|
|
857
1035
|
* sets the file name and the export options. Needs `@tabler/charts/export`
|
|
858
1036
|
* imported, and on the core the `download()` plugin (the `Chart` of
|
|
859
1037
|
* `@tabler/charts` has it).
|
|
@@ -1050,4 +1228,4 @@ declare class Chart<O extends object = object> {
|
|
|
1050
1228
|
/** Call the handlers of an event (plugins emit `click`, for instance). */
|
|
1051
1229
|
emit<K extends keyof ChartEvents>(name: K, event: ChartEvents[K]): void;
|
|
1052
1230
|
}
|
|
1053
|
-
export {
|
|
1231
|
+
export { markerPath as $, DownloadOption as A, axis as At, BeforeRenderState as B, HitCursor as Bt, TooltipOptions as C, Zoomable as Ct, tooltipContent as D, AxisPosition as Dt, placeTooltip as E, AxisOptions as Et, Features as F, DataTable as Ft, ExportOptions as G, PluginInstance as H, HitTester as Ht, feature as I, describeHit as It, downloadChart as J, ExportTarget as K, features as L, tableContent as Lt, ValueLabelOptions as M, bandTicks as Mt, labelsStep as N, linearTicks as Nt, DownloadFormat as O, LinearTicksOptions as Ot, valueLabels as P, thinTicks as Pt, markerClip as Q, register as R, Highlight as Rt, resolveSize as S, ZoomOptions as St, hitAnchor as T, viewWindow as Tt, CSVOptions as U, Interaction as Ut, ChartPlugin as V, HitItem as Vt, DownloadOptions as W, exportImage as X, exportCSV as Y, exportSVG as Z, chartModel as _, domainOf as _t, ChartEvents as a, LegendOptions as at, renderContext as b, seriesTable as bt, CrosshairOptions as c, EndLabelOptions as ct, ResolvedLegend as d, CartesianOptions as dt, shapesStep as et, Size as f, CategoryAxisOptions as ft, chartLabel as g, categoryInteraction as gt, chartEvents as h, ValueAxisOptions as ht, ChartConfig as i, LegendItem as it, download as j, axisSize as jt, DownloadMenuOptions as k, Tick as kt, RenderContext as l, endLabels as lt, buildChart as m, Series as mt, BuiltChart as n, patternFills as nt, ChartType as o, defaultHidden as ot, TableContext as p, Label as pt, ImageOptions as q, Chart as r, patternVars as rt, ContextOptions as s, legendContent as st, BaseOptions as t, patternDefs as tt, RenderResult as u, CartesianData as ut, chartToString as v, seriesKey as vt, TooltipPlacement as w, viewRange as wt, resolveLegend as x, ViewWindow as xt, renderChart as y, seriesLegend as yt, AfterRenderState as z, Hit as zt };
|