@krizaka/charts 0.0.0-stage → 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/LICENSE +202 -0
- package/README.md +59 -2
- package/dist/bar.d.ts +17 -0
- package/dist/bar.js +17 -0
- package/dist/bar.js.map +1 -0
- package/dist/candlestick-IG626XL4.js +13 -0
- package/dist/candlestick-IG626XL4.js.map +1 -0
- package/dist/candlestick.d.ts +42 -0
- package/dist/candlestick.js +13 -0
- package/dist/candlestick.js.map +1 -0
- package/dist/canvas-4MSYDVFO.js +14 -0
- package/dist/canvas-4MSYDVFO.js.map +1 -0
- package/dist/cartesian-BRhNQ3ib.d.ts +34 -0
- package/dist/chart.d.ts +58 -0
- package/dist/chart.js +11 -0
- package/dist/chart.js.map +1 -0
- package/dist/chunk-3CJHBJXA.js +186 -0
- package/dist/chunk-3CJHBJXA.js.map +1 -0
- package/dist/chunk-4LBXEAGC.js +133 -0
- package/dist/chunk-4LBXEAGC.js.map +1 -0
- package/dist/chunk-6FINSUOS.js +49 -0
- package/dist/chunk-6FINSUOS.js.map +1 -0
- package/dist/chunk-AA5EWWYV.js +38 -0
- package/dist/chunk-AA5EWWYV.js.map +1 -0
- package/dist/chunk-ANUCSRUN.js +43 -0
- package/dist/chunk-ANUCSRUN.js.map +1 -0
- package/dist/chunk-ARARFMNE.js +88 -0
- package/dist/chunk-ARARFMNE.js.map +1 -0
- package/dist/chunk-BISL7DYW.js +66 -0
- package/dist/chunk-BISL7DYW.js.map +1 -0
- package/dist/chunk-BV4DBGN7.js +178 -0
- package/dist/chunk-BV4DBGN7.js.map +1 -0
- package/dist/chunk-C4MFZLJM.js +19 -0
- package/dist/chunk-C4MFZLJM.js.map +1 -0
- package/dist/chunk-CSSZLFLO.js +116 -0
- package/dist/chunk-CSSZLFLO.js.map +1 -0
- package/dist/chunk-CVWSMUUB.js +378 -0
- package/dist/chunk-CVWSMUUB.js.map +1 -0
- package/dist/chunk-E5DKBSWX.js +2 -0
- package/dist/chunk-E5DKBSWX.js.map +1 -0
- package/dist/chunk-EEP7PS2L.js +54 -0
- package/dist/chunk-EEP7PS2L.js.map +1 -0
- package/dist/chunk-EQLC2QVN.js +73 -0
- package/dist/chunk-EQLC2QVN.js.map +1 -0
- package/dist/chunk-FINOPIDN.js +2 -0
- package/dist/chunk-FINOPIDN.js.map +1 -0
- package/dist/chunk-G2KF2WL4.js +2 -0
- package/dist/chunk-G2KF2WL4.js.map +1 -0
- package/dist/chunk-I3D7KUGN.js +205 -0
- package/dist/chunk-I3D7KUGN.js.map +1 -0
- package/dist/chunk-IKQV3NSL.js +76 -0
- package/dist/chunk-IKQV3NSL.js.map +1 -0
- package/dist/chunk-JTKR7ZWP.js +468 -0
- package/dist/chunk-JTKR7ZWP.js.map +1 -0
- package/dist/chunk-KNDHO67X.js +78 -0
- package/dist/chunk-KNDHO67X.js.map +1 -0
- package/dist/chunk-L2EKYWVI.js +94 -0
- package/dist/chunk-L2EKYWVI.js.map +1 -0
- package/dist/chunk-MXLITIGU.js +92 -0
- package/dist/chunk-MXLITIGU.js.map +1 -0
- package/dist/chunk-NCIQMRV3.js +155 -0
- package/dist/chunk-NCIQMRV3.js.map +1 -0
- package/dist/chunk-OB5EFDDH.js +118 -0
- package/dist/chunk-OB5EFDDH.js.map +1 -0
- package/dist/chunk-OIRHLJBC.js +83 -0
- package/dist/chunk-OIRHLJBC.js.map +1 -0
- package/dist/chunk-PBQV3B6O.js +145 -0
- package/dist/chunk-PBQV3B6O.js.map +1 -0
- package/dist/chunk-POQIHFAZ.js +2 -0
- package/dist/chunk-POQIHFAZ.js.map +1 -0
- package/dist/chunk-PWMMXRMC.js +234 -0
- package/dist/chunk-PWMMXRMC.js.map +1 -0
- package/dist/chunk-SLEJDQ3A.js +81 -0
- package/dist/chunk-SLEJDQ3A.js.map +1 -0
- package/dist/chunk-TPJDOB7R.js +15 -0
- package/dist/chunk-TPJDOB7R.js.map +1 -0
- package/dist/chunk-VKZZY2QD.js +103 -0
- package/dist/chunk-VKZZY2QD.js.map +1 -0
- package/dist/chunk-W5FX4TU3.js +102 -0
- package/dist/chunk-W5FX4TU3.js.map +1 -0
- package/dist/chunk-W5ILLSPK.js +107 -0
- package/dist/chunk-W5ILLSPK.js.map +1 -0
- package/dist/chunk-WBHFVBSK.js +25 -0
- package/dist/chunk-WBHFVBSK.js.map +1 -0
- package/dist/chunk-WNUFGMS7.js +113 -0
- package/dist/chunk-WNUFGMS7.js.map +1 -0
- package/dist/chunk-WVTIKOII.js +15 -0
- package/dist/chunk-WVTIKOII.js.map +1 -0
- package/dist/chunk-XDDALY4C.js +166 -0
- package/dist/chunk-XDDALY4C.js.map +1 -0
- package/dist/chunk-XLLYNNC6.js +89 -0
- package/dist/chunk-XLLYNNC6.js.map +1 -0
- package/dist/context-BgYUymEO.d.ts +163 -0
- package/dist/credits.d.ts +42 -0
- package/dist/credits.js +21 -0
- package/dist/credits.js.map +1 -0
- package/dist/earnings.d.ts +29 -0
- package/dist/earnings.js +22 -0
- package/dist/earnings.js.map +1 -0
- package/dist/frame-I7_xYGy5.d.ts +45 -0
- package/dist/full-S2MBPEEP.js +11 -0
- package/dist/full-S2MBPEEP.js.map +1 -0
- package/dist/funnel-QU5ZPC52.js +13 -0
- package/dist/funnel-QU5ZPC52.js.map +1 -0
- package/dist/funnel.d.ts +26 -0
- package/dist/funnel.js +13 -0
- package/dist/funnel.js.map +1 -0
- package/dist/gauge.d.ts +38 -0
- package/dist/gauge.js +13 -0
- package/dist/gauge.js.map +1 -0
- package/dist/geo.d.ts +37 -0
- package/dist/geo.js +13 -0
- package/dist/geo.js.map +1 -0
- package/dist/globe.d.ts +36 -0
- package/dist/globe.js +12 -0
- package/dist/globe.js.map +1 -0
- package/dist/goal.d.ts +26 -0
- package/dist/goal.js +17 -0
- package/dist/goal.js.map +1 -0
- package/dist/heatmap-JWQOKUGM.js +13 -0
- package/dist/heatmap-JWQOKUGM.js.map +1 -0
- package/dist/heatmap.d.ts +47 -0
- package/dist/heatmap.js +15 -0
- package/dist/heatmap.js.map +1 -0
- package/dist/host-_F8RgiIz.d.ts +15 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +148 -0
- package/dist/index.js.map +1 -0
- package/dist/labels-DE_743fQ.d.ts +72 -0
- package/dist/latency.d.ts +33 -0
- package/dist/latency.js +24 -0
- package/dist/latency.js.map +1 -0
- package/dist/line.d.ts +25 -0
- package/dist/line.js +19 -0
- package/dist/line.js.map +1 -0
- package/dist/native.d.ts +494 -0
- package/dist/native.js +1244 -0
- package/dist/native.js.map +1 -0
- package/dist/pie.d.ts +37 -0
- package/dist/pie.js +16 -0
- package/dist/pie.js.map +1 -0
- package/dist/provider.d.ts +73 -0
- package/dist/provider.js +24 -0
- package/dist/provider.js.map +1 -0
- package/dist/radar-75GRJ2IK.js +13 -0
- package/dist/radar-75GRJ2IK.js.map +1 -0
- package/dist/radar.d.ts +22 -0
- package/dist/radar.js +13 -0
- package/dist/radar.js.map +1 -0
- package/dist/sankey-XQTX2EG6.js +13 -0
- package/dist/sankey-XQTX2EG6.js.map +1 -0
- package/dist/sankey.d.ts +28 -0
- package/dist/sankey.js +13 -0
- package/dist/sankey.js.map +1 -0
- package/dist/scatter-XSNG4OKD.js +13 -0
- package/dist/scatter-XSNG4OKD.js.map +1 -0
- package/dist/scatter.d.ts +41 -0
- package/dist/scatter.js +15 -0
- package/dist/scatter.js.map +1 -0
- package/dist/sparkline.d.ts +26 -0
- package/dist/sparkline.js +16 -0
- package/dist/sparkline.js.map +1 -0
- package/dist/svg-BJUHYX3B.js +14 -0
- package/dist/svg-BJUHYX3B.js.map +1 -0
- package/dist/throughput.d.ts +37 -0
- package/dist/throughput.js +24 -0
- package/dist/throughput.js.map +1 -0
- package/dist/ticker.d.ts +38 -0
- package/dist/ticker.js +22 -0
- package/dist/ticker.js.map +1 -0
- package/dist/treemap-OMGGGB5U.js +13 -0
- package/dist/treemap-OMGGGB5U.js.map +1 -0
- package/dist/treemap.d.ts +24 -0
- package/dist/treemap.js +14 -0
- package/dist/treemap.js.map +1 -0
- package/dist/world-110m-DVFWXS42.js +18 -0
- package/dist/world-110m-DVFWXS42.js.map +1 -0
- package/package.json +614 -3
- package/registry/area-chart.json +785 -0
- package/registry/bar-chart.json +784 -0
- package/registry/calendar-heatmap.json +460 -0
- package/registry/candlestick.json +553 -0
- package/registry/chart.json +441 -0
- package/registry/charts-provider.json +191 -0
- package/registry/credit-usage.json +473 -0
- package/registry/earnings-chart.json +703 -0
- package/registry/examples/area-chart/credits-usage.d.ts +4 -0
- package/registry/examples/area-chart/credits-usage.js +38 -0
- package/registry/examples/area-chart/credits-usage.tsx +32 -0
- package/registry/examples/area-chart/native/credits-usage.d.ts +4 -0
- package/registry/examples/area-chart/native/credits-usage.dark.png +0 -0
- package/registry/examples/area-chart/native/credits-usage.js +33 -0
- package/registry/examples/area-chart/native/credits-usage.light.png +0 -0
- package/registry/examples/area-chart/native/credits-usage.tsx +27 -0
- package/registry/examples/area-chart/storage.d.ts +4 -0
- package/registry/examples/area-chart/storage.js +27 -0
- package/registry/examples/area-chart/storage.tsx +21 -0
- package/registry/examples/bar-chart/jobs-by-status.d.ts +4 -0
- package/registry/examples/bar-chart/jobs-by-status.js +37 -0
- package/registry/examples/bar-chart/jobs-by-status.tsx +31 -0
- package/registry/examples/bar-chart/native/jobs-by-status.d.ts +4 -0
- package/registry/examples/bar-chart/native/jobs-by-status.dark.png +0 -0
- package/registry/examples/bar-chart/native/jobs-by-status.js +32 -0
- package/registry/examples/bar-chart/native/jobs-by-status.light.png +0 -0
- package/registry/examples/bar-chart/native/jobs-by-status.tsx +26 -0
- package/registry/examples/bar-chart/plans-by-quarter.d.ts +4 -0
- package/registry/examples/bar-chart/plans-by-quarter.js +31 -0
- package/registry/examples/bar-chart/plans-by-quarter.tsx +26 -0
- package/registry/examples/bar-chart/top-supporters.d.ts +4 -0
- package/registry/examples/bar-chart/top-supporters.js +32 -0
- package/registry/examples/bar-chart/top-supporters.tsx +27 -0
- package/registry/examples/calendar-heatmap/publishing.d.ts +4 -0
- package/registry/examples/calendar-heatmap/publishing.js +28 -0
- package/registry/examples/calendar-heatmap/publishing.tsx +23 -0
- package/registry/examples/candlestick/auction-bids.d.ts +4 -0
- package/registry/examples/candlestick/auction-bids.js +37 -0
- package/registry/examples/candlestick/auction-bids.tsx +32 -0
- package/registry/examples/chart/polar-uploads.d.ts +4 -0
- package/registry/examples/chart/polar-uploads.js +34 -0
- package/registry/examples/chart/polar-uploads.tsx +30 -0
- package/registry/examples/charts-provider/french-orazaka.d.ts +4 -0
- package/registry/examples/charts-provider/french-orazaka.js +26 -0
- package/registry/examples/charts-provider/french-orazaka.tsx +22 -0
- package/registry/examples/charts-provider/native/french-orazaka.d.ts +4 -0
- package/registry/examples/charts-provider/native/french-orazaka.dark.png +0 -0
- package/registry/examples/charts-provider/native/french-orazaka.js +17 -0
- package/registry/examples/charts-provider/native/french-orazaka.light.png +0 -0
- package/registry/examples/charts-provider/native/french-orazaka.tsx +17 -0
- package/registry/examples/credit-usage/monthly-credits.d.ts +4 -0
- package/registry/examples/credit-usage/monthly-credits.js +24 -0
- package/registry/examples/credit-usage/monthly-credits.tsx +19 -0
- package/registry/examples/credit-usage/native/monthly-credits.d.ts +4 -0
- package/registry/examples/credit-usage/native/monthly-credits.dark.png +0 -0
- package/registry/examples/credit-usage/native/monthly-credits.js +23 -0
- package/registry/examples/credit-usage/native/monthly-credits.light.png +0 -0
- package/registry/examples/credit-usage/native/monthly-credits.tsx +18 -0
- package/registry/examples/credit-usage/storage-plan.d.ts +4 -0
- package/registry/examples/credit-usage/storage-plan.js +21 -0
- package/registry/examples/credit-usage/storage-plan.tsx +15 -0
- package/registry/examples/earnings-chart/creator-month.d.ts +4 -0
- package/registry/examples/earnings-chart/creator-month.js +29 -0
- package/registry/examples/earnings-chart/creator-month.tsx +24 -0
- package/registry/examples/earnings-chart/gross-and-net.d.ts +4 -0
- package/registry/examples/earnings-chart/gross-and-net.js +29 -0
- package/registry/examples/earnings-chart/gross-and-net.tsx +24 -0
- package/registry/examples/earnings-chart/native/creator-month.d.ts +4 -0
- package/registry/examples/earnings-chart/native/creator-month.dark.png +0 -0
- package/registry/examples/earnings-chart/native/creator-month.js +29 -0
- package/registry/examples/earnings-chart/native/creator-month.light.png +0 -0
- package/registry/examples/earnings-chart/native/creator-month.tsx +24 -0
- package/registry/examples/funnel/signup.d.ts +4 -0
- package/registry/examples/funnel/signup.js +30 -0
- package/registry/examples/funnel/signup.tsx +24 -0
- package/registry/examples/gauge/challenge-goal.d.ts +4 -0
- package/registry/examples/gauge/challenge-goal.js +24 -0
- package/registry/examples/gauge/challenge-goal.tsx +18 -0
- package/registry/examples/gauge/credits-quota.d.ts +4 -0
- package/registry/examples/gauge/credits-quota.js +26 -0
- package/registry/examples/gauge/credits-quota.tsx +19 -0
- package/registry/examples/gauge/native/credits-quota.d.ts +4 -0
- package/registry/examples/gauge/native/credits-quota.dark.png +0 -0
- package/registry/examples/gauge/native/credits-quota.js +25 -0
- package/registry/examples/gauge/native/credits-quota.light.png +0 -0
- package/registry/examples/gauge/native/credits-quota.tsx +18 -0
- package/registry/examples/geo-map/viewers.d.ts +4 -0
- package/registry/examples/geo-map/viewers.js +43 -0
- package/registry/examples/geo-map/viewers.tsx +29 -0
- package/registry/examples/globe/deployment-regions.d.ts +4 -0
- package/registry/examples/globe/deployment-regions.js +36 -0
- package/registry/examples/globe/deployment-regions.tsx +30 -0
- package/registry/examples/goal-progress/challenge-pot.d.ts +4 -0
- package/registry/examples/goal-progress/challenge-pot.js +22 -0
- package/registry/examples/goal-progress/challenge-pot.tsx +16 -0
- package/registry/examples/goal-progress/goal-reached.d.ts +4 -0
- package/registry/examples/goal-progress/goal-reached.js +11 -0
- package/registry/examples/goal-progress/goal-reached.tsx +6 -0
- package/registry/examples/goal-progress/native/challenge-pot.d.ts +4 -0
- package/registry/examples/goal-progress/native/challenge-pot.dark.png +0 -0
- package/registry/examples/goal-progress/native/challenge-pot.js +11 -0
- package/registry/examples/goal-progress/native/challenge-pot.light.png +0 -0
- package/registry/examples/goal-progress/native/challenge-pot.tsx +6 -0
- package/registry/examples/heatmap/upload-activity.d.ts +4 -0
- package/registry/examples/heatmap/upload-activity.js +30 -0
- package/registry/examples/heatmap/upload-activity.tsx +25 -0
- package/registry/examples/job-throughput/live-hours.d.ts +4 -0
- package/registry/examples/job-throughput/live-hours.js +33 -0
- package/registry/examples/job-throughput/live-hours.tsx +28 -0
- package/registry/examples/job-throughput/native/week-of-jobs.d.ts +4 -0
- package/registry/examples/job-throughput/native/week-of-jobs.dark.png +0 -0
- package/registry/examples/job-throughput/native/week-of-jobs.js +20 -0
- package/registry/examples/job-throughput/native/week-of-jobs.light.png +0 -0
- package/registry/examples/job-throughput/native/week-of-jobs.tsx +16 -0
- package/registry/examples/job-throughput/week-of-jobs.d.ts +4 -0
- package/registry/examples/job-throughput/week-of-jobs.js +20 -0
- package/registry/examples/job-throughput/week-of-jobs.tsx +16 -0
- package/registry/examples/latency-chart/by-capability.d.ts +4 -0
- package/registry/examples/latency-chart/by-capability.js +26 -0
- package/registry/examples/latency-chart/by-capability.tsx +21 -0
- package/registry/examples/latency-chart/native/by-capability.d.ts +4 -0
- package/registry/examples/latency-chart/native/by-capability.dark.png +0 -0
- package/registry/examples/latency-chart/native/by-capability.js +17 -0
- package/registry/examples/latency-chart/native/by-capability.light.png +0 -0
- package/registry/examples/latency-chart/native/by-capability.tsx +13 -0
- package/registry/examples/latency-chart/time-to-result.d.ts +4 -0
- package/registry/examples/latency-chart/time-to-result.js +27 -0
- package/registry/examples/latency-chart/time-to-result.tsx +22 -0
- package/registry/examples/line-chart/creator-earnings.d.ts +4 -0
- package/registry/examples/line-chart/creator-earnings.js +35 -0
- package/registry/examples/line-chart/creator-earnings.tsx +30 -0
- package/registry/examples/line-chart/forecast.d.ts +4 -0
- package/registry/examples/line-chart/forecast.js +36 -0
- package/registry/examples/line-chart/forecast.tsx +30 -0
- package/registry/examples/line-chart/live-jobs.d.ts +4 -0
- package/registry/examples/line-chart/live-jobs.js +21 -0
- package/registry/examples/line-chart/live-jobs.tsx +23 -0
- package/registry/examples/line-chart/native/creator-earnings.d.ts +4 -0
- package/registry/examples/line-chart/native/creator-earnings.dark.png +0 -0
- package/registry/examples/line-chart/native/creator-earnings.js +32 -0
- package/registry/examples/line-chart/native/creator-earnings.light.png +0 -0
- package/registry/examples/line-chart/native/creator-earnings.tsx +26 -0
- package/registry/examples/line-chart/states.d.ts +4 -0
- package/registry/examples/line-chart/states.js +16 -0
- package/registry/examples/line-chart/states.tsx +13 -0
- package/registry/examples/pie-chart/credit-spend.d.ts +4 -0
- package/registry/examples/pie-chart/credit-spend.js +30 -0
- package/registry/examples/pie-chart/credit-spend.tsx +24 -0
- package/registry/examples/pie-chart/native/credit-spend.d.ts +4 -0
- package/registry/examples/pie-chart/native/credit-spend.dark.png +0 -0
- package/registry/examples/pie-chart/native/credit-spend.js +17 -0
- package/registry/examples/pie-chart/native/credit-spend.light.png +0 -0
- package/registry/examples/pie-chart/native/credit-spend.tsx +12 -0
- package/registry/examples/pie-chart/storage-by-kind.d.ts +4 -0
- package/registry/examples/pie-chart/storage-by-kind.js +31 -0
- package/registry/examples/pie-chart/storage-by-kind.tsx +26 -0
- package/registry/examples/price-ticker/auction-room.d.ts +4 -0
- package/registry/examples/price-ticker/auction-room.js +21 -0
- package/registry/examples/price-ticker/auction-room.tsx +17 -0
- package/registry/examples/price-ticker/native/auction-room.d.ts +4 -0
- package/registry/examples/price-ticker/native/auction-room.dark.png +0 -0
- package/registry/examples/price-ticker/native/auction-room.js +19 -0
- package/registry/examples/price-ticker/native/auction-room.light.png +0 -0
- package/registry/examples/price-ticker/native/auction-room.tsx +15 -0
- package/registry/examples/price-ticker/no-bid-yet.d.ts +4 -0
- package/registry/examples/price-ticker/no-bid-yet.js +11 -0
- package/registry/examples/price-ticker/no-bid-yet.tsx +6 -0
- package/registry/examples/radar-chart/model-comparison.d.ts +4 -0
- package/registry/examples/radar-chart/model-comparison.js +33 -0
- package/registry/examples/radar-chart/model-comparison.tsx +28 -0
- package/registry/examples/sankey/credit-flow.d.ts +4 -0
- package/registry/examples/sankey/credit-flow.js +37 -0
- package/registry/examples/sankey/credit-flow.tsx +32 -0
- package/registry/examples/scatter-chart/watch-time.d.ts +4 -0
- package/registry/examples/scatter-chart/watch-time.js +36 -0
- package/registry/examples/scatter-chart/watch-time.tsx +31 -0
- package/registry/examples/sparkline/bars.d.ts +4 -0
- package/registry/examples/sparkline/bars.js +12 -0
- package/registry/examples/sparkline/bars.tsx +7 -0
- package/registry/examples/sparkline/native/stat-trend.d.ts +4 -0
- package/registry/examples/sparkline/native/stat-trend.dark.png +0 -0
- package/registry/examples/sparkline/native/stat-trend.js +12 -0
- package/registry/examples/sparkline/native/stat-trend.light.png +0 -0
- package/registry/examples/sparkline/native/stat-trend.tsx +7 -0
- package/registry/examples/sparkline/stat-trend.d.ts +4 -0
- package/registry/examples/sparkline/stat-trend.js +18 -0
- package/registry/examples/sparkline/stat-trend.tsx +15 -0
- package/registry/examples/sparkline/table-rows.d.ts +4 -0
- package/registry/examples/sparkline/table-rows.js +23 -0
- package/registry/examples/sparkline/table-rows.tsx +26 -0
- package/registry/examples/treemap/storage.d.ts +4 -0
- package/registry/examples/treemap/storage.js +17 -0
- package/registry/examples/treemap/storage.tsx +13 -0
- package/registry/funnel.json +487 -0
- package/registry/gauge.json +600 -0
- package/registry/geo-map.json +484 -0
- package/registry/globe.json +469 -0
- package/registry/goal-progress.json +520 -0
- package/registry/heatmap.json +531 -0
- package/registry/index.json +582 -0
- package/registry/job-throughput.json +654 -0
- package/registry/latency-chart.json +671 -0
- package/registry/line-chart.json +793 -0
- package/registry/pie-chart.json +1288 -0
- package/registry/price-ticker.json +684 -0
- package/registry/radar-chart.json +459 -0
- package/registry/sankey.json +503 -0
- package/registry/scatter-chart.json +559 -0
- package/registry/sparkline.json +563 -0
- package/registry/treemap.json +432 -0
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "line-chart",
|
|
3
|
+
"package": "@krizaka/charts",
|
|
4
|
+
"type": "chart",
|
|
5
|
+
"title": "Line chart",
|
|
6
|
+
"summary": "Change over time: one line per series, the last value written at its end, thresholds, markers and a crosshair tooltip.",
|
|
7
|
+
"description": "Change over time: one line per series, the last value written at its end, thresholds, markers and a crosshair tooltip.",
|
|
8
|
+
"status": "beta",
|
|
9
|
+
"category": "charts",
|
|
10
|
+
"platforms": "both",
|
|
11
|
+
"engine": "svg",
|
|
12
|
+
"tier": "core",
|
|
13
|
+
"whenToUse": [
|
|
14
|
+
"A trend over time: a creator's earnings per month, credits used per day, latency per hour.",
|
|
15
|
+
"Two or three series compared over the same period (this year and last, two plans).",
|
|
16
|
+
"A goal or a limit to read against the trend: a payout threshold, an objective, with `thresholds`."
|
|
17
|
+
],
|
|
18
|
+
"whenNotToUse": [
|
|
19
|
+
{
|
|
20
|
+
"when": "Amounts compared across categories that are not time.",
|
|
21
|
+
"use": "bar-chart"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"when": "A volume whose parts add up to a total over time.",
|
|
25
|
+
"use": "area-chart"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"when": "A trend in a sentence, a table cell or a stat tile.",
|
|
29
|
+
"use": "sparkline"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"bestPractices": [
|
|
33
|
+
"Give dates as ISO strings (`2026-04`, `2026-04-12`): the axis writes them in the reader's locale, by their precision.",
|
|
34
|
+
"Store money as integer minor units and say so with `format={{ style: \"money\", currency }}`: the axis goes compact, the tooltip exact.",
|
|
35
|
+
"Keep to three series or fewer; past that, split into small multiples or fold the rest into one series.",
|
|
36
|
+
"Dash a forecast or a previous period (`dashed`), never a different colour for the same measure.",
|
|
37
|
+
"Write the title as what the chart answers (“Earnings, last 6 months”): it is the accessible name."
|
|
38
|
+
],
|
|
39
|
+
"accessibility": {
|
|
40
|
+
"keyboard": [
|
|
41
|
+
{
|
|
42
|
+
"keys": "Tab",
|
|
43
|
+
"action": "Moves the focus to the plot (one tab stop), then to the data and export buttons."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"keys": "Arrow keys",
|
|
47
|
+
"action": "Walk the points one by one: each is announced and its tooltip shown."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"keys": "Home / End",
|
|
51
|
+
"action": "Jump to the first or the last point."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"keys": "Esc",
|
|
55
|
+
"action": "Hides the tooltip and clears the active point."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"keys": "Enter",
|
|
59
|
+
"action": "Selects the active point (calls `onSelect` with its row)."
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"notes": [
|
|
63
|
+
"The plot is a group named by the title and described by a summary written from the data (extremes, trend), read before anything else.",
|
|
64
|
+
"The data table is always in the page for assistive technology; “Show data” reveals it for everyone.",
|
|
65
|
+
"Colour never carries a meaning alone: a legend from two series, direct labels, the table.",
|
|
66
|
+
"The entrance plays once, when the chart comes on screen, and never under reduced motion."
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"related": [
|
|
70
|
+
"area-chart",
|
|
71
|
+
"bar-chart",
|
|
72
|
+
"sparkline",
|
|
73
|
+
"charts-provider"
|
|
74
|
+
],
|
|
75
|
+
"source": "packages/charts/src/meta/line-chart.ts",
|
|
76
|
+
"install": {
|
|
77
|
+
"web": "npm install @krizaka/charts",
|
|
78
|
+
"native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
|
|
79
|
+
},
|
|
80
|
+
"web": {
|
|
81
|
+
"entry": "@krizaka/charts/line",
|
|
82
|
+
"import": "import { LineChart } from \"@krizaka/charts/line\";",
|
|
83
|
+
"props": [
|
|
84
|
+
{
|
|
85
|
+
"component": "LineChart",
|
|
86
|
+
"description": "Change over time: one line per series, the last value written at its end, a crosshair tooltip, the keyboard.",
|
|
87
|
+
"props": [
|
|
88
|
+
{
|
|
89
|
+
"name": "data",
|
|
90
|
+
"type": "readonly T[]",
|
|
91
|
+
"default": null,
|
|
92
|
+
"description": "The rows, in the order of the x axis.",
|
|
93
|
+
"required": true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "title",
|
|
97
|
+
"type": "string",
|
|
98
|
+
"default": null,
|
|
99
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
100
|
+
"required": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "brand",
|
|
104
|
+
"type": "BrandId",
|
|
105
|
+
"default": null,
|
|
106
|
+
"description": "The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it\nwhen the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).",
|
|
107
|
+
"required": false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "className",
|
|
111
|
+
"type": "string",
|
|
112
|
+
"default": null,
|
|
113
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
114
|
+
"required": false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "curve",
|
|
118
|
+
"type": "Curve",
|
|
119
|
+
"default": null,
|
|
120
|
+
"description": "The shape between points: `monotone` (default, never overshoots), `linear`, `step` (a value that holds).",
|
|
121
|
+
"required": false
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "dataTable",
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": null,
|
|
127
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
128
|
+
"required": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "description",
|
|
132
|
+
"type": "ReactNode",
|
|
133
|
+
"default": null,
|
|
134
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
135
|
+
"required": false
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "dots",
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"default": null,
|
|
141
|
+
"description": "A dot on every point (short series). Default false: the end of each line carries one.",
|
|
142
|
+
"required": false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "empty",
|
|
146
|
+
"type": "ReactNode",
|
|
147
|
+
"default": null,
|
|
148
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
149
|
+
"required": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "endLabels",
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"default": "true",
|
|
155
|
+
"description": "Write the last value at the end of each line (up to three series). Default true.",
|
|
156
|
+
"required": false
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "error",
|
|
160
|
+
"type": "ReactNode",
|
|
161
|
+
"default": null,
|
|
162
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
163
|
+
"required": false
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "exportable",
|
|
167
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
168
|
+
"default": null,
|
|
169
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
170
|
+
"required": false
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "format",
|
|
174
|
+
"type": "ValueFormat",
|
|
175
|
+
"default": null,
|
|
176
|
+
"description": "How the values are written (axis, tooltip, table, summary). Default `\"number\"`.",
|
|
177
|
+
"required": false
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "height",
|
|
181
|
+
"type": "number",
|
|
182
|
+
"default": null,
|
|
183
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
184
|
+
"required": false
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "hideTitle",
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"default": null,
|
|
190
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
191
|
+
"required": false
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "id",
|
|
195
|
+
"type": "string",
|
|
196
|
+
"default": null,
|
|
197
|
+
"description": "The id of the figure.",
|
|
198
|
+
"required": false
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "labels",
|
|
202
|
+
"type": "ChartLabelsInput",
|
|
203
|
+
"default": null,
|
|
204
|
+
"description": "The words, translated: the buttons, the states, the written summary.",
|
|
205
|
+
"required": false
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "legend",
|
|
209
|
+
"type": "boolean",
|
|
210
|
+
"default": null,
|
|
211
|
+
"description": "Show the legend (from two series). Default true.",
|
|
212
|
+
"required": false
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "live",
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"default": null,
|
|
218
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
219
|
+
"required": false
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "loading",
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"default": null,
|
|
225
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
226
|
+
"required": false
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "locale",
|
|
230
|
+
"type": "Locale",
|
|
231
|
+
"default": null,
|
|
232
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
233
|
+
"required": false
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "markers",
|
|
237
|
+
"type": "readonly Marker[]",
|
|
238
|
+
"default": null,
|
|
239
|
+
"description": "Vertical markers at a category: a launch, an incident.",
|
|
240
|
+
"required": false
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "onSelect",
|
|
244
|
+
"type": "((datum: T, index: number) => void)",
|
|
245
|
+
"default": null,
|
|
246
|
+
"description": "Called with the row when a point or a bar is clicked (or Enter is pressed on it).",
|
|
247
|
+
"required": false
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "series",
|
|
251
|
+
"type": "readonly SeriesSpec<T>[]",
|
|
252
|
+
"default": null,
|
|
253
|
+
"description": "The series to draw, each with its field and its name; the palette follows their order.",
|
|
254
|
+
"required": false
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "style",
|
|
258
|
+
"type": "CSSProperties",
|
|
259
|
+
"default": null,
|
|
260
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
261
|
+
"required": false
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "summary",
|
|
265
|
+
"type": "\"hidden\" | \"visible\"",
|
|
266
|
+
"default": null,
|
|
267
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
268
|
+
"required": false
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "summaryText",
|
|
272
|
+
"type": "string",
|
|
273
|
+
"default": null,
|
|
274
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
275
|
+
"required": false
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "thresholds",
|
|
279
|
+
"type": "readonly Threshold[]",
|
|
280
|
+
"default": null,
|
|
281
|
+
"description": "Horizontal lines at a value: a goal, a payout threshold.",
|
|
282
|
+
"required": false
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "x",
|
|
286
|
+
"type": "string | ((datum: T, index: number) => unknown)",
|
|
287
|
+
"default": null,
|
|
288
|
+
"description": "The field (or function) of the category: a month (`\"2026-04\"`), a day, a label. Default: the row's position.",
|
|
289
|
+
"required": false
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "xFormat",
|
|
293
|
+
"type": "CategoryFormat",
|
|
294
|
+
"default": null,
|
|
295
|
+
"description": "How the categories are written. Default: dates by their precision (`2026-04` → `Apr 2026`), text as is.",
|
|
296
|
+
"required": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "xLabel",
|
|
300
|
+
"type": "string",
|
|
301
|
+
"default": null,
|
|
302
|
+
"description": "The header of the categories in the data table (`Month`).",
|
|
303
|
+
"required": false
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "y",
|
|
307
|
+
"type": "string | ((datum: T, index: number) => number | null)",
|
|
308
|
+
"default": null,
|
|
309
|
+
"description": "A single series: its field. Use `series` for several.",
|
|
310
|
+
"required": false
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "yLabel",
|
|
314
|
+
"type": "string",
|
|
315
|
+
"default": null,
|
|
316
|
+
"description": "The name of the single `y` series (legend, tooltip, table). Default: the field's name.",
|
|
317
|
+
"required": false
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "zero",
|
|
321
|
+
"type": "boolean",
|
|
322
|
+
"default": null,
|
|
323
|
+
"description": "Start the value axis at zero. Default: true for bars and areas; for lines, unless the values sit far from zero.",
|
|
324
|
+
"required": false
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
"examples": [
|
|
330
|
+
{
|
|
331
|
+
"name": "creator-earnings",
|
|
332
|
+
"title": "Creator earnings",
|
|
333
|
+
"description": "Six months of a creator's earnings and tips in euros, with the payout threshold.",
|
|
334
|
+
"path": "examples/line-chart/creator-earnings.tsx",
|
|
335
|
+
"module": "@krizaka/charts/registry/examples/line-chart/creator-earnings",
|
|
336
|
+
"code": "import { LineChart } from \"@krizaka/charts/line\";\n\n// Amounts in cents, as the ledger stores them.\nconst earnings = [\n { month: \"2026-04\", earnings: 182_000, tips: 21_000 },\n { month: \"2026-05\", earnings: 164_000, tips: 18_500 },\n { month: \"2026-06\", earnings: 231_000, tips: 26_000 },\n { month: \"2026-07\", earnings: 298_000, tips: 31_000 },\n { month: \"2026-08\", earnings: 276_000, tips: 35_500 },\n { month: \"2026-09\", earnings: 342_000, tips: 41_000 },\n];\n\nexport default function CreatorEarnings() {\n return (\n <LineChart\n title=\"Earnings, last 6 months\"\n description=\"Video sales and tips, before fees\"\n data={earnings}\n x=\"month\"\n xLabel=\"Month\"\n series={[\n { key: \"earnings\", label: \"Video sales\" },\n { key: \"tips\", label: \"Tips\" },\n ]}\n format={{ style: \"money\", currency: \"EUR\" }}\n thresholds={[{ value: 250_000, label: \"Payout threshold\", tone: \"success\" }]}\n exportable\n />\n );\n}\n"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "forecast",
|
|
340
|
+
"title": "Forecast",
|
|
341
|
+
"description": "The months to come dashed after the actual ones, a marker on a launch.",
|
|
342
|
+
"path": "examples/line-chart/forecast.tsx",
|
|
343
|
+
"module": "@krizaka/charts/registry/examples/line-chart/forecast",
|
|
344
|
+
"code": "import { LineChart } from \"@krizaka/charts/line\";\n\nconst requests = [\n { week: \"2026-07-06\", actual: 41_200 },\n { week: \"2026-07-13\", actual: 43_900 },\n { week: \"2026-07-20\", actual: 47_100 },\n { week: \"2026-07-27\", actual: 52_800, forecast: 52_800 },\n { week: \"2026-08-03\", forecast: 57_400 },\n { week: \"2026-08-10\", forecast: 61_000 },\n { week: \"2026-08-17\", forecast: 66_300 },\n];\n\nexport default function Forecast() {\n return (\n <LineChart\n title=\"Inference requests per week\"\n description=\"Actual, then forecast\"\n data={requests}\n x=\"week\"\n xFormat=\"day\"\n series={[\n { key: \"actual\", label: \"Actual\" },\n { key: \"forecast\", label: \"Forecast\", color: 1, dashed: true },\n ]}\n format=\"compact\"\n markers={[{ x: \"2026-07-27\", label: \"Studio launch\", tone: \"accent\" }]}\n dots\n />\n );\n}\n"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "live-jobs",
|
|
348
|
+
"title": "Live data",
|
|
349
|
+
"description": "A sliding window of jobs per minute, appended as they arrive (`useSlidingWindow`, `live`).",
|
|
350
|
+
"path": "examples/line-chart/live-jobs.tsx",
|
|
351
|
+
"module": "@krizaka/charts/registry/examples/line-chart/live-jobs",
|
|
352
|
+
"code": "\"use client\";\nimport { LineChart } from \"@krizaka/charts/line\";\nimport { useSlidingWindow } from \"@krizaka/charts/provider\";\n\ntype Minute = { at: string; completed: number };\nconst start: Minute[] = [18, 22, 19, 25, 31, 28, 26, 33, 37, 35].map((completed, i) => ({ at: `2026-10-11T14:${String(20 + i).padStart(2, \"0\")}Z`, completed }));\n\nexport default function LiveJobs() {\n // The last 10 minutes; in an app, `push` is called by a server-sent event.\n const { data, push } = useSlidingWindow<Minute>(10, start);\n const next = () => {\n const last = new Date(data[data.length - 1]!.at);\n push({ at: new Date(last.getTime() + 60_000).toISOString(), completed: 20 + ((data.length * 7) % 19) });\n };\n return (\n <div style={{ display: \"grid\", gap: 8 }}>\n <LineChart title=\"Jobs completed per minute\" data={data} x=\"at\" xFormat=\"time\" y=\"completed\" yLabel=\"Jobs\" format=\"integer\" live dots />\n <button type=\"button\" onClick={next} style={{ justifySelf: \"start\", padding: \"4px 10px\", borderRadius: 8, border: \"1px solid var(--kz-border-default)\", background: \"var(--kz-surface-2)\", color: \"var(--kz-text-primary)\" }}>\n Next minute\n </button>\n </div>\n );\n}\n"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "states",
|
|
356
|
+
"title": "Loading, empty, error",
|
|
357
|
+
"description": "The three states at the chart's own height: no layout shift when the data arrives.",
|
|
358
|
+
"path": "examples/line-chart/states.tsx",
|
|
359
|
+
"module": "@krizaka/charts/registry/examples/line-chart/states",
|
|
360
|
+
"code": "import { LineChart } from \"@krizaka/charts/line\";\n\nconst series = [{ key: \"views\", label: \"Views\" }] as const;\n\nexport default function States() {\n return (\n <div style={{ display: \"grid\", gap: 24 }}>\n <LineChart title=\"Views (loading)\" data={[]} x=\"day\" series={series} height={140} loading />\n <LineChart title=\"Views (no data yet)\" data={[]} x=\"day\" series={series} height={140} />\n <LineChart title=\"Views (failed)\" data={[]} x=\"day\" series={series} height={140} error />\n </div>\n );\n}\n"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
"native": {
|
|
365
|
+
"entry": "@krizaka/charts/native",
|
|
366
|
+
"import": "import { LineChart } from \"@krizaka/charts/native\";",
|
|
367
|
+
"differences": [
|
|
368
|
+
"No data table or export: the plot is one adjustable element whose label is the title and the summary; swipe up and down to hear each point.",
|
|
369
|
+
"A tap selects the nearest point and writes it under the chart; no hover.",
|
|
370
|
+
"No markers, no end labels; `scheme` and `theme` (from @krizaka/ui/native's `useTheme()`) follow the app's theme."
|
|
371
|
+
],
|
|
372
|
+
"props": [
|
|
373
|
+
{
|
|
374
|
+
"component": "LineChart",
|
|
375
|
+
"description": "Change over time (React Native): one line per series.",
|
|
376
|
+
"props": [
|
|
377
|
+
{
|
|
378
|
+
"name": "data",
|
|
379
|
+
"type": "readonly T[]",
|
|
380
|
+
"default": null,
|
|
381
|
+
"description": "The rows, in the order of the x axis.",
|
|
382
|
+
"required": true
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "title",
|
|
386
|
+
"type": "string",
|
|
387
|
+
"default": null,
|
|
388
|
+
"description": "What the chart shows: its heading and accessible name.",
|
|
389
|
+
"required": true
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "brand",
|
|
393
|
+
"type": "BrandId",
|
|
394
|
+
"default": null,
|
|
395
|
+
"description": "The brand whose palette leads. Default Krizaka.",
|
|
396
|
+
"required": false
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "curve",
|
|
400
|
+
"type": "Curve",
|
|
401
|
+
"default": "monotone",
|
|
402
|
+
"description": "`monotone` (default), `linear` or `step`.",
|
|
403
|
+
"required": false
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "empty",
|
|
407
|
+
"type": "ReactNode",
|
|
408
|
+
"default": null,
|
|
409
|
+
"description": "Shown instead of the plot when there is nothing to draw. Default: the `empty` label.",
|
|
410
|
+
"required": false
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "format",
|
|
414
|
+
"type": "ValueFormat",
|
|
415
|
+
"default": null,
|
|
416
|
+
"description": "How the values are written.",
|
|
417
|
+
"required": false
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "height",
|
|
421
|
+
"type": "number",
|
|
422
|
+
"default": null,
|
|
423
|
+
"description": "The plot's height.",
|
|
424
|
+
"required": false
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "hideTitle",
|
|
428
|
+
"type": "boolean",
|
|
429
|
+
"default": null,
|
|
430
|
+
"description": "Hide the heading (it stays the accessible name).",
|
|
431
|
+
"required": false
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "labels",
|
|
435
|
+
"type": "ChartLabelsInput",
|
|
436
|
+
"default": null,
|
|
437
|
+
"description": "The words: the readout, the summary.",
|
|
438
|
+
"required": false
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "loading",
|
|
442
|
+
"type": "boolean",
|
|
443
|
+
"default": null,
|
|
444
|
+
"description": "The data is on its way.",
|
|
445
|
+
"required": false
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "locale",
|
|
449
|
+
"type": "Locale",
|
|
450
|
+
"default": null,
|
|
451
|
+
"description": "The locale of every figure and date. Default `\"en-US\"`.",
|
|
452
|
+
"required": false
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "scheme",
|
|
456
|
+
"type": "Mode",
|
|
457
|
+
"default": null,
|
|
458
|
+
"description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
|
|
459
|
+
"required": false
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "series",
|
|
463
|
+
"type": "readonly SeriesSpec<T>[]",
|
|
464
|
+
"default": null,
|
|
465
|
+
"description": "The series, each with its field and name.",
|
|
466
|
+
"required": false
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"name": "style",
|
|
470
|
+
"type": "ViewStyle",
|
|
471
|
+
"default": null,
|
|
472
|
+
"description": "The style of the chart's container (layout only: colours come from the theme).",
|
|
473
|
+
"required": false
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "theme",
|
|
477
|
+
"type": "Partial<ChartTheme>",
|
|
478
|
+
"default": null,
|
|
479
|
+
"description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
|
|
480
|
+
"required": false
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "thresholds",
|
|
484
|
+
"type": "readonly Threshold[]",
|
|
485
|
+
"default": null,
|
|
486
|
+
"description": "Horizontal lines at a value.",
|
|
487
|
+
"required": false
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "x",
|
|
491
|
+
"type": "string | ((datum: T, index: number) => unknown)",
|
|
492
|
+
"default": null,
|
|
493
|
+
"description": "The field (or function) of the category.",
|
|
494
|
+
"required": false
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "xFormat",
|
|
498
|
+
"type": "CategoryFormat",
|
|
499
|
+
"default": null,
|
|
500
|
+
"description": "How the categories are written.",
|
|
501
|
+
"required": false
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "y",
|
|
505
|
+
"type": "string | ((datum: T, index: number) => number | null)",
|
|
506
|
+
"default": null,
|
|
507
|
+
"description": "A single series: its field.",
|
|
508
|
+
"required": false
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "yLabel",
|
|
512
|
+
"type": "string",
|
|
513
|
+
"default": null,
|
|
514
|
+
"description": "The name of the single `y` series.",
|
|
515
|
+
"required": false
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"examples": [
|
|
521
|
+
{
|
|
522
|
+
"name": "creator-earnings",
|
|
523
|
+
"title": "Creator earnings",
|
|
524
|
+
"description": "Six months of earnings and tips, the payout threshold.",
|
|
525
|
+
"path": "examples/line-chart/native/creator-earnings.tsx",
|
|
526
|
+
"module": "@krizaka/charts/registry/examples/line-chart/native/creator-earnings",
|
|
527
|
+
"code": "import { LineChart } from \"@krizaka/charts/native\";\n\nconst earnings = [\n { month: \"2026-04\", earnings: 182_000, tips: 21_000 },\n { month: \"2026-05\", earnings: 164_000, tips: 18_500 },\n { month: \"2026-06\", earnings: 231_000, tips: 26_000 },\n { month: \"2026-07\", earnings: 298_000, tips: 31_000 },\n { month: \"2026-08\", earnings: 276_000, tips: 35_500 },\n { month: \"2026-09\", earnings: 342_000, tips: 41_000 },\n];\n\nexport default function CreatorEarnings() {\n return (\n <LineChart\n title=\"Earnings, last 6 months\"\n data={earnings}\n x=\"month\"\n series={[\n { key: \"earnings\", label: \"Video sales\" },\n { key: \"tips\", label: \"Tips\" },\n ]}\n format={{ style: \"money\", currency: \"EUR\" }}\n thresholds={[{ value: 250_000, label: \"Payout threshold\", tone: \"success\" }]}\n />\n );\n}\n",
|
|
528
|
+
"screenshots": {
|
|
529
|
+
"dark": "examples/line-chart/native/creator-earnings.dark.png",
|
|
530
|
+
"light": "examples/line-chart/native/creator-earnings.light.png"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
"files": [],
|
|
536
|
+
"dependencies": [
|
|
537
|
+
"@krizaka/intl@workspace:^",
|
|
538
|
+
"d3-geo@^3.1.1",
|
|
539
|
+
"echarts@^6.1.0",
|
|
540
|
+
"topojson-client@^3.1.0"
|
|
541
|
+
],
|
|
542
|
+
"registryDependencies": [],
|
|
543
|
+
"demo": {
|
|
544
|
+
"path": "examples/line-chart/creator-earnings.tsx",
|
|
545
|
+
"content": "import { LineChart } from \"@krizaka/charts/line\";\n\n// Amounts in cents, as the ledger stores them.\nconst earnings = [\n { month: \"2026-04\", earnings: 182_000, tips: 21_000 },\n { month: \"2026-05\", earnings: 164_000, tips: 18_500 },\n { month: \"2026-06\", earnings: 231_000, tips: 26_000 },\n { month: \"2026-07\", earnings: 298_000, tips: 31_000 },\n { month: \"2026-08\", earnings: 276_000, tips: 35_500 },\n { month: \"2026-09\", earnings: 342_000, tips: 41_000 },\n];\n\nexport default function CreatorEarnings() {\n return (\n <LineChart\n title=\"Earnings, last 6 months\"\n description=\"Video sales and tips, before fees\"\n data={earnings}\n x=\"month\"\n xLabel=\"Month\"\n series={[\n { key: \"earnings\", label: \"Video sales\" },\n { key: \"tips\", label: \"Tips\" },\n ]}\n format={{ style: \"money\", currency: \"EUR\" }}\n thresholds={[{ value: 250_000, label: \"Payout threshold\", tone: \"success\" }]}\n exportable\n />\n );\n}\n"
|
|
546
|
+
},
|
|
547
|
+
"props": [
|
|
548
|
+
{
|
|
549
|
+
"component": "LineChart",
|
|
550
|
+
"description": "Change over time: one line per series, the last value written at its end, a crosshair tooltip, the keyboard.",
|
|
551
|
+
"props": [
|
|
552
|
+
{
|
|
553
|
+
"name": "data",
|
|
554
|
+
"type": "readonly T[]",
|
|
555
|
+
"default": null,
|
|
556
|
+
"description": "The rows, in the order of the x axis.",
|
|
557
|
+
"required": true
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "title",
|
|
561
|
+
"type": "string",
|
|
562
|
+
"default": null,
|
|
563
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
564
|
+
"required": true
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "brand",
|
|
568
|
+
"type": "BrandId",
|
|
569
|
+
"default": null,
|
|
570
|
+
"description": "The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it\nwhen the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).",
|
|
571
|
+
"required": false
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "className",
|
|
575
|
+
"type": "string",
|
|
576
|
+
"default": null,
|
|
577
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
578
|
+
"required": false
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "curve",
|
|
582
|
+
"type": "Curve",
|
|
583
|
+
"default": null,
|
|
584
|
+
"description": "The shape between points: `monotone` (default, never overshoots), `linear`, `step` (a value that holds).",
|
|
585
|
+
"required": false
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "dataTable",
|
|
589
|
+
"type": "boolean",
|
|
590
|
+
"default": null,
|
|
591
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
592
|
+
"required": false
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "description",
|
|
596
|
+
"type": "ReactNode",
|
|
597
|
+
"default": null,
|
|
598
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
599
|
+
"required": false
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"name": "dots",
|
|
603
|
+
"type": "boolean",
|
|
604
|
+
"default": null,
|
|
605
|
+
"description": "A dot on every point (short series). Default false: the end of each line carries one.",
|
|
606
|
+
"required": false
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "empty",
|
|
610
|
+
"type": "ReactNode",
|
|
611
|
+
"default": null,
|
|
612
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
613
|
+
"required": false
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "endLabels",
|
|
617
|
+
"type": "boolean",
|
|
618
|
+
"default": "true",
|
|
619
|
+
"description": "Write the last value at the end of each line (up to three series). Default true.",
|
|
620
|
+
"required": false
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "error",
|
|
624
|
+
"type": "ReactNode",
|
|
625
|
+
"default": null,
|
|
626
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
627
|
+
"required": false
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "exportable",
|
|
631
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
632
|
+
"default": null,
|
|
633
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
634
|
+
"required": false
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"name": "format",
|
|
638
|
+
"type": "ValueFormat",
|
|
639
|
+
"default": null,
|
|
640
|
+
"description": "How the values are written (axis, tooltip, table, summary). Default `\"number\"`.",
|
|
641
|
+
"required": false
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "height",
|
|
645
|
+
"type": "number",
|
|
646
|
+
"default": null,
|
|
647
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
648
|
+
"required": false
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "hideTitle",
|
|
652
|
+
"type": "boolean",
|
|
653
|
+
"default": null,
|
|
654
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
655
|
+
"required": false
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "id",
|
|
659
|
+
"type": "string",
|
|
660
|
+
"default": null,
|
|
661
|
+
"description": "The id of the figure.",
|
|
662
|
+
"required": false
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"name": "labels",
|
|
666
|
+
"type": "ChartLabelsInput",
|
|
667
|
+
"default": null,
|
|
668
|
+
"description": "The words, translated: the buttons, the states, the written summary.",
|
|
669
|
+
"required": false
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "legend",
|
|
673
|
+
"type": "boolean",
|
|
674
|
+
"default": null,
|
|
675
|
+
"description": "Show the legend (from two series). Default true.",
|
|
676
|
+
"required": false
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "live",
|
|
680
|
+
"type": "boolean",
|
|
681
|
+
"default": null,
|
|
682
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
683
|
+
"required": false
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "loading",
|
|
687
|
+
"type": "boolean",
|
|
688
|
+
"default": null,
|
|
689
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
690
|
+
"required": false
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "locale",
|
|
694
|
+
"type": "Locale",
|
|
695
|
+
"default": null,
|
|
696
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
697
|
+
"required": false
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"name": "markers",
|
|
701
|
+
"type": "readonly Marker[]",
|
|
702
|
+
"default": null,
|
|
703
|
+
"description": "Vertical markers at a category: a launch, an incident.",
|
|
704
|
+
"required": false
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "onSelect",
|
|
708
|
+
"type": "((datum: T, index: number) => void)",
|
|
709
|
+
"default": null,
|
|
710
|
+
"description": "Called with the row when a point or a bar is clicked (or Enter is pressed on it).",
|
|
711
|
+
"required": false
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "series",
|
|
715
|
+
"type": "readonly SeriesSpec<T>[]",
|
|
716
|
+
"default": null,
|
|
717
|
+
"description": "The series to draw, each with its field and its name; the palette follows their order.",
|
|
718
|
+
"required": false
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"name": "style",
|
|
722
|
+
"type": "CSSProperties",
|
|
723
|
+
"default": null,
|
|
724
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
725
|
+
"required": false
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "summary",
|
|
729
|
+
"type": "\"hidden\" | \"visible\"",
|
|
730
|
+
"default": null,
|
|
731
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
732
|
+
"required": false
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"name": "summaryText",
|
|
736
|
+
"type": "string",
|
|
737
|
+
"default": null,
|
|
738
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
739
|
+
"required": false
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"name": "thresholds",
|
|
743
|
+
"type": "readonly Threshold[]",
|
|
744
|
+
"default": null,
|
|
745
|
+
"description": "Horizontal lines at a value: a goal, a payout threshold.",
|
|
746
|
+
"required": false
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "x",
|
|
750
|
+
"type": "string | ((datum: T, index: number) => unknown)",
|
|
751
|
+
"default": null,
|
|
752
|
+
"description": "The field (or function) of the category: a month (`\"2026-04\"`), a day, a label. Default: the row's position.",
|
|
753
|
+
"required": false
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "xFormat",
|
|
757
|
+
"type": "CategoryFormat",
|
|
758
|
+
"default": null,
|
|
759
|
+
"description": "How the categories are written. Default: dates by their precision (`2026-04` → `Apr 2026`), text as is.",
|
|
760
|
+
"required": false
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "xLabel",
|
|
764
|
+
"type": "string",
|
|
765
|
+
"default": null,
|
|
766
|
+
"description": "The header of the categories in the data table (`Month`).",
|
|
767
|
+
"required": false
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "y",
|
|
771
|
+
"type": "string | ((datum: T, index: number) => number | null)",
|
|
772
|
+
"default": null,
|
|
773
|
+
"description": "A single series: its field. Use `series` for several.",
|
|
774
|
+
"required": false
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"name": "yLabel",
|
|
778
|
+
"type": "string",
|
|
779
|
+
"default": null,
|
|
780
|
+
"description": "The name of the single `y` series (legend, tooltip, table). Default: the field's name.",
|
|
781
|
+
"required": false
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"name": "zero",
|
|
785
|
+
"type": "boolean",
|
|
786
|
+
"default": null,
|
|
787
|
+
"description": "Start the value axis at zero. Default: true for bars and areas; for lines, unless the values sit far from zero.",
|
|
788
|
+
"required": false
|
|
789
|
+
}
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
]
|
|
793
|
+
}
|