@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,1288 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pie-chart",
|
|
3
|
+
"package": "@krizaka/charts",
|
|
4
|
+
"type": "chart",
|
|
5
|
+
"title": "Pie and donut chart",
|
|
6
|
+
"summary": "Part of a whole: slices sorted by size, folded into “Other” past six, each share written in the legend; a donut carries the total in its hole.",
|
|
7
|
+
"description": "Part of a whole: slices sorted by size, folded into “Other” past six, each share written in the legend; a donut carries the total in its hole.",
|
|
8
|
+
"status": "beta",
|
|
9
|
+
"category": "charts",
|
|
10
|
+
"platforms": "both",
|
|
11
|
+
"engine": "svg",
|
|
12
|
+
"tier": "core",
|
|
13
|
+
"whenToUse": [
|
|
14
|
+
"How one total splits at one moment: credits spent by model this month, storage by kind.",
|
|
15
|
+
"Two to six parts, one of which clearly dominates or is clearly small."
|
|
16
|
+
],
|
|
17
|
+
"whenNotToUse": [
|
|
18
|
+
{
|
|
19
|
+
"when": "Parts compared precisely, or more than six of them.",
|
|
20
|
+
"use": "bar-chart"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"when": "Parts that change over time.",
|
|
24
|
+
"use": "area-chart"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"when": "Nested parts (a team, then its projects).",
|
|
28
|
+
"use": "treemap"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"bestPractices": [
|
|
32
|
+
"Prefer the donut (`DonutChart`) with `centerLabel`: the total is the first thing a reader looks for.",
|
|
33
|
+
"Name the folded slice in your language with `otherLabel`.",
|
|
34
|
+
"Never put two pies side by side to compare them: use bars."
|
|
35
|
+
],
|
|
36
|
+
"accessibility": {
|
|
37
|
+
"keyboard": [
|
|
38
|
+
{
|
|
39
|
+
"keys": "Tab",
|
|
40
|
+
"action": "Moves the focus to the plot (one tab stop), then to the data and export buttons."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"keys": "Arrow keys",
|
|
44
|
+
"action": "Walk the items one by one: each is announced and its tooltip shown."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"keys": "Home / End",
|
|
48
|
+
"action": "Jump to the first or the last item."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"keys": "Esc",
|
|
52
|
+
"action": "Hides the tooltip and clears the active item."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"keys": "Enter",
|
|
56
|
+
"action": "Selects the active slice (calls `onSelect` with its row)."
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"notes": [
|
|
60
|
+
"The plot is a group named by the title and described by a summary written from the data, read before anything else.",
|
|
61
|
+
"The data table is always in the page for assistive technology; “Show data” reveals it for everyone.",
|
|
62
|
+
"Colour never carries a meaning alone: the legend, the labels and the table say it in words.",
|
|
63
|
+
"The entrance plays once, when the chart comes on screen, and never under reduced motion.",
|
|
64
|
+
"A 2 px gap in the surface colour separates the slices."
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"related": [
|
|
68
|
+
"bar-chart",
|
|
69
|
+
"treemap",
|
|
70
|
+
"gauge"
|
|
71
|
+
],
|
|
72
|
+
"source": "packages/charts/src/meta/pie-chart.ts",
|
|
73
|
+
"install": {
|
|
74
|
+
"web": "npm install @krizaka/charts",
|
|
75
|
+
"native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
|
|
76
|
+
},
|
|
77
|
+
"web": {
|
|
78
|
+
"entry": "@krizaka/charts/pie",
|
|
79
|
+
"import": "import { DonutChart, PieChart } from \"@krizaka/charts/pie\";",
|
|
80
|
+
"props": [
|
|
81
|
+
{
|
|
82
|
+
"component": "DonutChart",
|
|
83
|
+
"description": "A pie with a hole: the total (or `centerValue`) and `centerLabel` in it.",
|
|
84
|
+
"props": [
|
|
85
|
+
{
|
|
86
|
+
"name": "data",
|
|
87
|
+
"type": "readonly T[]",
|
|
88
|
+
"default": null,
|
|
89
|
+
"description": "One row per part.",
|
|
90
|
+
"required": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "label",
|
|
94
|
+
"type": "string | ((datum: T, index: number) => string)",
|
|
95
|
+
"default": null,
|
|
96
|
+
"description": "The field (or function) naming the part.",
|
|
97
|
+
"required": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "title",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"default": null,
|
|
103
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
104
|
+
"required": true
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "value",
|
|
108
|
+
"type": "string | ((datum: T, index: number) => number)",
|
|
109
|
+
"default": null,
|
|
110
|
+
"description": "The field (or function) of its amount (≥ 0).",
|
|
111
|
+
"required": true
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "brand",
|
|
115
|
+
"type": "BrandId",
|
|
116
|
+
"default": null,
|
|
117
|
+
"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`).",
|
|
118
|
+
"required": false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "centerLabel",
|
|
122
|
+
"type": "string",
|
|
123
|
+
"default": null,
|
|
124
|
+
"description": "The words under the number in the hole of a donut (“Total credits”).",
|
|
125
|
+
"required": false
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "centerValue",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"default": null,
|
|
131
|
+
"description": "The number in the hole, written already. Default: the total.",
|
|
132
|
+
"required": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "className",
|
|
136
|
+
"type": "string",
|
|
137
|
+
"default": null,
|
|
138
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
139
|
+
"required": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "color",
|
|
143
|
+
"type": "string | ((datum: T, index: number) => SeriesColor)",
|
|
144
|
+
"default": null,
|
|
145
|
+
"description": "A part's own colour (a slot, a tone or a CSS colour); default: the palette in order of size.",
|
|
146
|
+
"required": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "dataTable",
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"default": null,
|
|
152
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
153
|
+
"required": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "description",
|
|
157
|
+
"type": "ReactNode",
|
|
158
|
+
"default": null,
|
|
159
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
160
|
+
"required": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "empty",
|
|
164
|
+
"type": "ReactNode",
|
|
165
|
+
"default": null,
|
|
166
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
167
|
+
"required": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "error",
|
|
171
|
+
"type": "ReactNode",
|
|
172
|
+
"default": null,
|
|
173
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
174
|
+
"required": false
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "exportable",
|
|
178
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
179
|
+
"default": null,
|
|
180
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
181
|
+
"required": false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "format",
|
|
185
|
+
"type": "ValueFormat",
|
|
186
|
+
"default": null,
|
|
187
|
+
"description": "How the amounts are written.",
|
|
188
|
+
"required": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "height",
|
|
192
|
+
"type": "number",
|
|
193
|
+
"default": null,
|
|
194
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
195
|
+
"required": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "hideTitle",
|
|
199
|
+
"type": "boolean",
|
|
200
|
+
"default": null,
|
|
201
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
202
|
+
"required": false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "id",
|
|
206
|
+
"type": "string",
|
|
207
|
+
"default": null,
|
|
208
|
+
"description": "The id of the figure.",
|
|
209
|
+
"required": false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "labelHeader",
|
|
213
|
+
"type": "string",
|
|
214
|
+
"default": null,
|
|
215
|
+
"description": "The header of the parts in the data table.",
|
|
216
|
+
"required": false
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "labels",
|
|
220
|
+
"type": "ChartLabelsInput",
|
|
221
|
+
"default": null,
|
|
222
|
+
"description": "The words, translated: the buttons, the states, the written summary.",
|
|
223
|
+
"required": false
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "live",
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"default": null,
|
|
229
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
230
|
+
"required": false
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "loading",
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"default": null,
|
|
236
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
237
|
+
"required": false
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "locale",
|
|
241
|
+
"type": "Locale",
|
|
242
|
+
"default": null,
|
|
243
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
244
|
+
"required": false
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "maxSlices",
|
|
248
|
+
"type": "number",
|
|
249
|
+
"default": null,
|
|
250
|
+
"description": "At most this many slices; the rest fold into one, named `otherLabel`. Default 6.",
|
|
251
|
+
"required": false
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "onSelect",
|
|
255
|
+
"type": "((datum: T, index: number) => void)",
|
|
256
|
+
"default": null,
|
|
257
|
+
"description": "Called with the row when a slice is clicked (or Enter is pressed on it).",
|
|
258
|
+
"required": false
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "otherLabel",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"default": null,
|
|
264
|
+
"description": "The name of the folded slice. Default “Other”.",
|
|
265
|
+
"required": false
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "style",
|
|
269
|
+
"type": "CSSProperties",
|
|
270
|
+
"default": null,
|
|
271
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
272
|
+
"required": false
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "summary",
|
|
276
|
+
"type": "\"hidden\" | \"visible\"",
|
|
277
|
+
"default": null,
|
|
278
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
279
|
+
"required": false
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "summaryText",
|
|
283
|
+
"type": "string",
|
|
284
|
+
"default": null,
|
|
285
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
286
|
+
"required": false
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "valueHeader",
|
|
290
|
+
"type": "string",
|
|
291
|
+
"default": null,
|
|
292
|
+
"description": "The header of the amounts in the data table.",
|
|
293
|
+
"required": false
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"component": "PieChart",
|
|
299
|
+
"description": "",
|
|
300
|
+
"props": [
|
|
301
|
+
{
|
|
302
|
+
"name": "data",
|
|
303
|
+
"type": "readonly T[]",
|
|
304
|
+
"default": null,
|
|
305
|
+
"description": "One row per part.",
|
|
306
|
+
"required": true
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "label",
|
|
310
|
+
"type": "string | ((datum: T, index: number) => string)",
|
|
311
|
+
"default": null,
|
|
312
|
+
"description": "The field (or function) naming the part.",
|
|
313
|
+
"required": true
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "title",
|
|
317
|
+
"type": "string",
|
|
318
|
+
"default": null,
|
|
319
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
320
|
+
"required": true
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "value",
|
|
324
|
+
"type": "string | ((datum: T, index: number) => number)",
|
|
325
|
+
"default": null,
|
|
326
|
+
"description": "The field (or function) of its amount (≥ 0).",
|
|
327
|
+
"required": true
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "brand",
|
|
331
|
+
"type": "BrandId",
|
|
332
|
+
"default": null,
|
|
333
|
+
"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`).",
|
|
334
|
+
"required": false
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "centerLabel",
|
|
338
|
+
"type": "string",
|
|
339
|
+
"default": null,
|
|
340
|
+
"description": "The words under the number in the hole of a donut (“Total credits”).",
|
|
341
|
+
"required": false
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "centerValue",
|
|
345
|
+
"type": "string",
|
|
346
|
+
"default": null,
|
|
347
|
+
"description": "The number in the hole, written already. Default: the total.",
|
|
348
|
+
"required": false
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "className",
|
|
352
|
+
"type": "string",
|
|
353
|
+
"default": null,
|
|
354
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
355
|
+
"required": false
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "color",
|
|
359
|
+
"type": "string | ((datum: T, index: number) => SeriesColor)",
|
|
360
|
+
"default": null,
|
|
361
|
+
"description": "A part's own colour (a slot, a tone or a CSS colour); default: the palette in order of size.",
|
|
362
|
+
"required": false
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "dataTable",
|
|
366
|
+
"type": "boolean",
|
|
367
|
+
"default": null,
|
|
368
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
369
|
+
"required": false
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "description",
|
|
373
|
+
"type": "ReactNode",
|
|
374
|
+
"default": null,
|
|
375
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
376
|
+
"required": false
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "donut",
|
|
380
|
+
"type": "boolean",
|
|
381
|
+
"default": null,
|
|
382
|
+
"description": "A ring rather than a pie: the total (or `centerValue`) is written in its hole.",
|
|
383
|
+
"required": false
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "empty",
|
|
387
|
+
"type": "ReactNode",
|
|
388
|
+
"default": null,
|
|
389
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
390
|
+
"required": false
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "error",
|
|
394
|
+
"type": "ReactNode",
|
|
395
|
+
"default": null,
|
|
396
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
397
|
+
"required": false
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "exportable",
|
|
401
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
402
|
+
"default": null,
|
|
403
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
404
|
+
"required": false
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "format",
|
|
408
|
+
"type": "ValueFormat",
|
|
409
|
+
"default": null,
|
|
410
|
+
"description": "How the amounts are written.",
|
|
411
|
+
"required": false
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "height",
|
|
415
|
+
"type": "number",
|
|
416
|
+
"default": null,
|
|
417
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
418
|
+
"required": false
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"name": "hideTitle",
|
|
422
|
+
"type": "boolean",
|
|
423
|
+
"default": null,
|
|
424
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
425
|
+
"required": false
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "id",
|
|
429
|
+
"type": "string",
|
|
430
|
+
"default": null,
|
|
431
|
+
"description": "The id of the figure.",
|
|
432
|
+
"required": false
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "labelHeader",
|
|
436
|
+
"type": "string",
|
|
437
|
+
"default": null,
|
|
438
|
+
"description": "The header of the parts in the data table.",
|
|
439
|
+
"required": false
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "labels",
|
|
443
|
+
"type": "ChartLabelsInput",
|
|
444
|
+
"default": null,
|
|
445
|
+
"description": "The words, translated: the buttons, the states, the written summary.",
|
|
446
|
+
"required": false
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "live",
|
|
450
|
+
"type": "boolean",
|
|
451
|
+
"default": null,
|
|
452
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
453
|
+
"required": false
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "loading",
|
|
457
|
+
"type": "boolean",
|
|
458
|
+
"default": null,
|
|
459
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
460
|
+
"required": false
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "locale",
|
|
464
|
+
"type": "Locale",
|
|
465
|
+
"default": null,
|
|
466
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
467
|
+
"required": false
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "maxSlices",
|
|
471
|
+
"type": "number",
|
|
472
|
+
"default": null,
|
|
473
|
+
"description": "At most this many slices; the rest fold into one, named `otherLabel`. Default 6.",
|
|
474
|
+
"required": false
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"name": "onSelect",
|
|
478
|
+
"type": "((datum: T, index: number) => void)",
|
|
479
|
+
"default": null,
|
|
480
|
+
"description": "Called with the row when a slice is clicked (or Enter is pressed on it).",
|
|
481
|
+
"required": false
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"name": "otherLabel",
|
|
485
|
+
"type": "string",
|
|
486
|
+
"default": null,
|
|
487
|
+
"description": "The name of the folded slice. Default “Other”.",
|
|
488
|
+
"required": false
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "style",
|
|
492
|
+
"type": "CSSProperties",
|
|
493
|
+
"default": null,
|
|
494
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
495
|
+
"required": false
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "summary",
|
|
499
|
+
"type": "\"hidden\" | \"visible\"",
|
|
500
|
+
"default": null,
|
|
501
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
502
|
+
"required": false
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "summaryText",
|
|
506
|
+
"type": "string",
|
|
507
|
+
"default": null,
|
|
508
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
509
|
+
"required": false
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "valueHeader",
|
|
513
|
+
"type": "string",
|
|
514
|
+
"default": null,
|
|
515
|
+
"description": "The header of the amounts in the data table.",
|
|
516
|
+
"required": false
|
|
517
|
+
}
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
],
|
|
521
|
+
"examples": [
|
|
522
|
+
{
|
|
523
|
+
"name": "credit-spend",
|
|
524
|
+
"title": "Donut",
|
|
525
|
+
"description": "This month's Orazaka credits by model, the total in the hole.",
|
|
526
|
+
"path": "examples/pie-chart/credit-spend.tsx",
|
|
527
|
+
"module": "@krizaka/charts/registry/examples/pie-chart/credit-spend",
|
|
528
|
+
"code": "import { DonutChart } from \"@krizaka/charts/pie\";\n\nconst spend = [\n { model: \"Chat · Mistral Large\", credits: 18_400 },\n { model: \"Image · Flux\", credits: 9_650 },\n { model: \"Video · Wan 2.2\", credits: 7_200 },\n { model: \"Speech · Whisper\", credits: 2_100 },\n { model: \"Embeddings\", credits: 640 },\n];\n\nexport default function CreditSpend() {\n return (\n <DonutChart\n title=\"Credits spent in September\"\n data={spend}\n label=\"model\"\n value=\"credits\"\n labelHeader=\"Model\"\n valueHeader=\"Credits\"\n format=\"integer\"\n centerLabel=\"credits\"\n />\n );\n}\n"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "storage-by-kind",
|
|
532
|
+
"title": "Pie",
|
|
533
|
+
"description": "Storage by kind of file, the small kinds folded into “Other”.",
|
|
534
|
+
"path": "examples/pie-chart/storage-by-kind.tsx",
|
|
535
|
+
"module": "@krizaka/charts/registry/examples/pie-chart/storage-by-kind",
|
|
536
|
+
"code": "import { PieChart } from \"@krizaka/charts/pie\";\n\n// Gigabytes; past six slices the smallest fold into “Other”.\nconst kinds = [\n { kind: \"Videos\", gb: 812 },\n { kind: \"Thumbnails\", gb: 64 },\n { kind: \"Audio\", gb: 121 },\n { kind: \"Subtitles\", gb: 3 },\n { kind: \"Project files\", gb: 96 },\n { kind: \"Exports\", gb: 210 },\n { kind: \"Fonts\", gb: 1 },\n { kind: \"Logs\", gb: 2 },\n];\n\nexport default function StorageByKind() {\n return (\n <PieChart\n title=\"Storage by kind\"\n data={kinds}\n label=\"kind\"\n value=\"gb\"\n format={{ style: \"unit\", unit: \"gigabyte\" }}\n otherLabel=\"Other\"\n />\n );\n}\n"
|
|
537
|
+
}
|
|
538
|
+
]
|
|
539
|
+
},
|
|
540
|
+
"native": {
|
|
541
|
+
"entry": "@krizaka/charts/native",
|
|
542
|
+
"import": "import { DonutChart, PieChart } from \"@krizaka/charts/native\";",
|
|
543
|
+
"differences": [
|
|
544
|
+
"No tooltip: swipe up and down on the chart to hear each slice and its share.",
|
|
545
|
+
"No `onSelect`, no data table."
|
|
546
|
+
],
|
|
547
|
+
"props": [
|
|
548
|
+
{
|
|
549
|
+
"component": "DonutChart",
|
|
550
|
+
"description": "A pie with a hole (React Native).",
|
|
551
|
+
"props": [
|
|
552
|
+
{
|
|
553
|
+
"name": "data",
|
|
554
|
+
"type": "readonly T[]",
|
|
555
|
+
"default": null,
|
|
556
|
+
"description": "One row per part.",
|
|
557
|
+
"required": true
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "label",
|
|
561
|
+
"type": "string | ((datum: T, index: number) => string)",
|
|
562
|
+
"default": null,
|
|
563
|
+
"description": "The field naming the part.",
|
|
564
|
+
"required": true
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "title",
|
|
568
|
+
"type": "string",
|
|
569
|
+
"default": null,
|
|
570
|
+
"description": "What the chart shows: its heading and accessible name.",
|
|
571
|
+
"required": true
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "value",
|
|
575
|
+
"type": "string | ((datum: T, index: number) => number)",
|
|
576
|
+
"default": null,
|
|
577
|
+
"description": "The field of its amount.",
|
|
578
|
+
"required": true
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "brand",
|
|
582
|
+
"type": "BrandId",
|
|
583
|
+
"default": null,
|
|
584
|
+
"description": "The brand whose palette leads. Default Krizaka.",
|
|
585
|
+
"required": false
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "centerLabel",
|
|
589
|
+
"type": "string",
|
|
590
|
+
"default": null,
|
|
591
|
+
"description": "The words under the total of a donut.",
|
|
592
|
+
"required": false
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "empty",
|
|
596
|
+
"type": "ReactNode",
|
|
597
|
+
"default": null,
|
|
598
|
+
"description": "Shown instead of the plot when there is nothing to draw. Default: the `empty` label.",
|
|
599
|
+
"required": false
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"name": "format",
|
|
603
|
+
"type": "ValueFormat",
|
|
604
|
+
"default": null,
|
|
605
|
+
"description": "How the amounts are written.",
|
|
606
|
+
"required": false
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "height",
|
|
610
|
+
"type": "number",
|
|
611
|
+
"default": null,
|
|
612
|
+
"description": "The plot's height.",
|
|
613
|
+
"required": false
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "hideTitle",
|
|
617
|
+
"type": "boolean",
|
|
618
|
+
"default": null,
|
|
619
|
+
"description": "Hide the heading (it stays the accessible name).",
|
|
620
|
+
"required": false
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "labels",
|
|
624
|
+
"type": "ChartLabelsInput",
|
|
625
|
+
"default": null,
|
|
626
|
+
"description": "The words: the readout, the summary.",
|
|
627
|
+
"required": false
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "loading",
|
|
631
|
+
"type": "boolean",
|
|
632
|
+
"default": null,
|
|
633
|
+
"description": "The data is on its way.",
|
|
634
|
+
"required": false
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"name": "locale",
|
|
638
|
+
"type": "Locale",
|
|
639
|
+
"default": null,
|
|
640
|
+
"description": "The locale of every figure and date. Default `\"en-US\"`.",
|
|
641
|
+
"required": false
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "maxSlices",
|
|
645
|
+
"type": "number",
|
|
646
|
+
"default": null,
|
|
647
|
+
"description": "At most this many slices; the rest fold into `otherLabel`. Default 6.",
|
|
648
|
+
"required": false
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "otherLabel",
|
|
652
|
+
"type": "string",
|
|
653
|
+
"default": null,
|
|
654
|
+
"description": "The name of the folded slice. Default “Other”.",
|
|
655
|
+
"required": false
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "scheme",
|
|
659
|
+
"type": "Mode",
|
|
660
|
+
"default": null,
|
|
661
|
+
"description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
|
|
662
|
+
"required": false
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"name": "style",
|
|
666
|
+
"type": "ViewStyle",
|
|
667
|
+
"default": null,
|
|
668
|
+
"description": "The style of the chart's container (layout only: colours come from the theme).",
|
|
669
|
+
"required": false
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "theme",
|
|
673
|
+
"type": "Partial<ChartTheme>",
|
|
674
|
+
"default": null,
|
|
675
|
+
"description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
|
|
676
|
+
"required": false
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"component": "PieChart",
|
|
682
|
+
"description": "Part of a whole (React Native).",
|
|
683
|
+
"props": [
|
|
684
|
+
{
|
|
685
|
+
"name": "data",
|
|
686
|
+
"type": "readonly T[]",
|
|
687
|
+
"default": null,
|
|
688
|
+
"description": "One row per part.",
|
|
689
|
+
"required": true
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"name": "label",
|
|
693
|
+
"type": "string | ((datum: T, index: number) => string)",
|
|
694
|
+
"default": null,
|
|
695
|
+
"description": "The field naming the part.",
|
|
696
|
+
"required": true
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"name": "title",
|
|
700
|
+
"type": "string",
|
|
701
|
+
"default": null,
|
|
702
|
+
"description": "What the chart shows: its heading and accessible name.",
|
|
703
|
+
"required": true
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"name": "value",
|
|
707
|
+
"type": "string | ((datum: T, index: number) => number)",
|
|
708
|
+
"default": null,
|
|
709
|
+
"description": "The field of its amount.",
|
|
710
|
+
"required": true
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"name": "brand",
|
|
714
|
+
"type": "BrandId",
|
|
715
|
+
"default": null,
|
|
716
|
+
"description": "The brand whose palette leads. Default Krizaka.",
|
|
717
|
+
"required": false
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"name": "centerLabel",
|
|
721
|
+
"type": "string",
|
|
722
|
+
"default": null,
|
|
723
|
+
"description": "The words under the total of a donut.",
|
|
724
|
+
"required": false
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"name": "donut",
|
|
728
|
+
"type": "boolean",
|
|
729
|
+
"default": null,
|
|
730
|
+
"description": "A ring with the total in its hole.",
|
|
731
|
+
"required": false
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "empty",
|
|
735
|
+
"type": "ReactNode",
|
|
736
|
+
"default": null,
|
|
737
|
+
"description": "Shown instead of the plot when there is nothing to draw. Default: the `empty` label.",
|
|
738
|
+
"required": false
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"name": "format",
|
|
742
|
+
"type": "ValueFormat",
|
|
743
|
+
"default": null,
|
|
744
|
+
"description": "How the amounts are written.",
|
|
745
|
+
"required": false
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"name": "height",
|
|
749
|
+
"type": "number",
|
|
750
|
+
"default": null,
|
|
751
|
+
"description": "The plot's height.",
|
|
752
|
+
"required": false
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "hideTitle",
|
|
756
|
+
"type": "boolean",
|
|
757
|
+
"default": null,
|
|
758
|
+
"description": "Hide the heading (it stays the accessible name).",
|
|
759
|
+
"required": false
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "labels",
|
|
763
|
+
"type": "ChartLabelsInput",
|
|
764
|
+
"default": null,
|
|
765
|
+
"description": "The words: the readout, the summary.",
|
|
766
|
+
"required": false
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"name": "loading",
|
|
770
|
+
"type": "boolean",
|
|
771
|
+
"default": null,
|
|
772
|
+
"description": "The data is on its way.",
|
|
773
|
+
"required": false
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "locale",
|
|
777
|
+
"type": "Locale",
|
|
778
|
+
"default": null,
|
|
779
|
+
"description": "The locale of every figure and date. Default `\"en-US\"`.",
|
|
780
|
+
"required": false
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"name": "maxSlices",
|
|
784
|
+
"type": "number",
|
|
785
|
+
"default": null,
|
|
786
|
+
"description": "At most this many slices; the rest fold into `otherLabel`. Default 6.",
|
|
787
|
+
"required": false
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "otherLabel",
|
|
791
|
+
"type": "string",
|
|
792
|
+
"default": null,
|
|
793
|
+
"description": "The name of the folded slice. Default “Other”.",
|
|
794
|
+
"required": false
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"name": "scheme",
|
|
798
|
+
"type": "Mode",
|
|
799
|
+
"default": null,
|
|
800
|
+
"description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
|
|
801
|
+
"required": false
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "style",
|
|
805
|
+
"type": "ViewStyle",
|
|
806
|
+
"default": null,
|
|
807
|
+
"description": "The style of the chart's container (layout only: colours come from the theme).",
|
|
808
|
+
"required": false
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"name": "theme",
|
|
812
|
+
"type": "Partial<ChartTheme>",
|
|
813
|
+
"default": null,
|
|
814
|
+
"description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
|
|
815
|
+
"required": false
|
|
816
|
+
}
|
|
817
|
+
]
|
|
818
|
+
}
|
|
819
|
+
],
|
|
820
|
+
"examples": [
|
|
821
|
+
{
|
|
822
|
+
"name": "credit-spend",
|
|
823
|
+
"title": "Donut",
|
|
824
|
+
"description": "Credits by model, the total in the hole.",
|
|
825
|
+
"path": "examples/pie-chart/native/credit-spend.tsx",
|
|
826
|
+
"module": "@krizaka/charts/registry/examples/pie-chart/native/credit-spend",
|
|
827
|
+
"code": "import { DonutChart } from \"@krizaka/charts/native\";\n\nconst spend = [\n { model: \"Chat\", credits: 18_400 },\n { model: \"Image\", credits: 9_650 },\n { model: \"Video\", credits: 7_200 },\n { model: \"Speech\", credits: 2_100 },\n];\n\nexport default function CreditSpend() {\n return <DonutChart title=\"Credits spent in September\" data={spend} label=\"model\" value=\"credits\" format=\"compact\" centerLabel=\"credits\" />;\n}\n",
|
|
828
|
+
"screenshots": {
|
|
829
|
+
"dark": "examples/pie-chart/native/credit-spend.dark.png",
|
|
830
|
+
"light": "examples/pie-chart/native/credit-spend.light.png"
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
"files": [],
|
|
836
|
+
"dependencies": [
|
|
837
|
+
"@krizaka/intl@workspace:^",
|
|
838
|
+
"d3-geo@^3.1.1",
|
|
839
|
+
"echarts@^6.1.0",
|
|
840
|
+
"topojson-client@^3.1.0"
|
|
841
|
+
],
|
|
842
|
+
"registryDependencies": [],
|
|
843
|
+
"demo": {
|
|
844
|
+
"path": "examples/pie-chart/credit-spend.tsx",
|
|
845
|
+
"content": "import { DonutChart } from \"@krizaka/charts/pie\";\n\nconst spend = [\n { model: \"Chat · Mistral Large\", credits: 18_400 },\n { model: \"Image · Flux\", credits: 9_650 },\n { model: \"Video · Wan 2.2\", credits: 7_200 },\n { model: \"Speech · Whisper\", credits: 2_100 },\n { model: \"Embeddings\", credits: 640 },\n];\n\nexport default function CreditSpend() {\n return (\n <DonutChart\n title=\"Credits spent in September\"\n data={spend}\n label=\"model\"\n value=\"credits\"\n labelHeader=\"Model\"\n valueHeader=\"Credits\"\n format=\"integer\"\n centerLabel=\"credits\"\n />\n );\n}\n"
|
|
846
|
+
},
|
|
847
|
+
"props": [
|
|
848
|
+
{
|
|
849
|
+
"component": "DonutChart",
|
|
850
|
+
"description": "A pie with a hole: the total (or `centerValue`) and `centerLabel` in it.",
|
|
851
|
+
"props": [
|
|
852
|
+
{
|
|
853
|
+
"name": "data",
|
|
854
|
+
"type": "readonly T[]",
|
|
855
|
+
"default": null,
|
|
856
|
+
"description": "One row per part.",
|
|
857
|
+
"required": true
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"name": "label",
|
|
861
|
+
"type": "string | ((datum: T, index: number) => string)",
|
|
862
|
+
"default": null,
|
|
863
|
+
"description": "The field (or function) naming the part.",
|
|
864
|
+
"required": true
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"name": "title",
|
|
868
|
+
"type": "string",
|
|
869
|
+
"default": null,
|
|
870
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
871
|
+
"required": true
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "value",
|
|
875
|
+
"type": "string | ((datum: T, index: number) => number)",
|
|
876
|
+
"default": null,
|
|
877
|
+
"description": "The field (or function) of its amount (≥ 0).",
|
|
878
|
+
"required": true
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"name": "brand",
|
|
882
|
+
"type": "BrandId",
|
|
883
|
+
"default": null,
|
|
884
|
+
"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`).",
|
|
885
|
+
"required": false
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"name": "centerLabel",
|
|
889
|
+
"type": "string",
|
|
890
|
+
"default": null,
|
|
891
|
+
"description": "The words under the number in the hole of a donut (“Total credits”).",
|
|
892
|
+
"required": false
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"name": "centerValue",
|
|
896
|
+
"type": "string",
|
|
897
|
+
"default": null,
|
|
898
|
+
"description": "The number in the hole, written already. Default: the total.",
|
|
899
|
+
"required": false
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"name": "className",
|
|
903
|
+
"type": "string",
|
|
904
|
+
"default": null,
|
|
905
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
906
|
+
"required": false
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"name": "color",
|
|
910
|
+
"type": "string | ((datum: T, index: number) => SeriesColor)",
|
|
911
|
+
"default": null,
|
|
912
|
+
"description": "A part's own colour (a slot, a tone or a CSS colour); default: the palette in order of size.",
|
|
913
|
+
"required": false
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"name": "dataTable",
|
|
917
|
+
"type": "boolean",
|
|
918
|
+
"default": null,
|
|
919
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
920
|
+
"required": false
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"name": "description",
|
|
924
|
+
"type": "ReactNode",
|
|
925
|
+
"default": null,
|
|
926
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
927
|
+
"required": false
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"name": "empty",
|
|
931
|
+
"type": "ReactNode",
|
|
932
|
+
"default": null,
|
|
933
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
934
|
+
"required": false
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"name": "error",
|
|
938
|
+
"type": "ReactNode",
|
|
939
|
+
"default": null,
|
|
940
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
941
|
+
"required": false
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "exportable",
|
|
945
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
946
|
+
"default": null,
|
|
947
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
948
|
+
"required": false
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"name": "format",
|
|
952
|
+
"type": "ValueFormat",
|
|
953
|
+
"default": null,
|
|
954
|
+
"description": "How the amounts are written.",
|
|
955
|
+
"required": false
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "height",
|
|
959
|
+
"type": "number",
|
|
960
|
+
"default": null,
|
|
961
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
962
|
+
"required": false
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "hideTitle",
|
|
966
|
+
"type": "boolean",
|
|
967
|
+
"default": null,
|
|
968
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
969
|
+
"required": false
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "id",
|
|
973
|
+
"type": "string",
|
|
974
|
+
"default": null,
|
|
975
|
+
"description": "The id of the figure.",
|
|
976
|
+
"required": false
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"name": "labelHeader",
|
|
980
|
+
"type": "string",
|
|
981
|
+
"default": null,
|
|
982
|
+
"description": "The header of the parts in the data table.",
|
|
983
|
+
"required": false
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"name": "labels",
|
|
987
|
+
"type": "ChartLabelsInput",
|
|
988
|
+
"default": null,
|
|
989
|
+
"description": "The words, translated: the buttons, the states, the written summary.",
|
|
990
|
+
"required": false
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"name": "live",
|
|
994
|
+
"type": "boolean",
|
|
995
|
+
"default": null,
|
|
996
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
997
|
+
"required": false
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "loading",
|
|
1001
|
+
"type": "boolean",
|
|
1002
|
+
"default": null,
|
|
1003
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
1004
|
+
"required": false
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"name": "locale",
|
|
1008
|
+
"type": "Locale",
|
|
1009
|
+
"default": null,
|
|
1010
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
1011
|
+
"required": false
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"name": "maxSlices",
|
|
1015
|
+
"type": "number",
|
|
1016
|
+
"default": null,
|
|
1017
|
+
"description": "At most this many slices; the rest fold into one, named `otherLabel`. Default 6.",
|
|
1018
|
+
"required": false
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "onSelect",
|
|
1022
|
+
"type": "((datum: T, index: number) => void)",
|
|
1023
|
+
"default": null,
|
|
1024
|
+
"description": "Called with the row when a slice is clicked (or Enter is pressed on it).",
|
|
1025
|
+
"required": false
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"name": "otherLabel",
|
|
1029
|
+
"type": "string",
|
|
1030
|
+
"default": null,
|
|
1031
|
+
"description": "The name of the folded slice. Default “Other”.",
|
|
1032
|
+
"required": false
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"name": "style",
|
|
1036
|
+
"type": "CSSProperties",
|
|
1037
|
+
"default": null,
|
|
1038
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
1039
|
+
"required": false
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"name": "summary",
|
|
1043
|
+
"type": "\"hidden\" | \"visible\"",
|
|
1044
|
+
"default": null,
|
|
1045
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
1046
|
+
"required": false
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"name": "summaryText",
|
|
1050
|
+
"type": "string",
|
|
1051
|
+
"default": null,
|
|
1052
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
1053
|
+
"required": false
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"name": "valueHeader",
|
|
1057
|
+
"type": "string",
|
|
1058
|
+
"default": null,
|
|
1059
|
+
"description": "The header of the amounts in the data table.",
|
|
1060
|
+
"required": false
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"component": "PieChart",
|
|
1066
|
+
"description": "",
|
|
1067
|
+
"props": [
|
|
1068
|
+
{
|
|
1069
|
+
"name": "data",
|
|
1070
|
+
"type": "readonly T[]",
|
|
1071
|
+
"default": null,
|
|
1072
|
+
"description": "One row per part.",
|
|
1073
|
+
"required": true
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"name": "label",
|
|
1077
|
+
"type": "string | ((datum: T, index: number) => string)",
|
|
1078
|
+
"default": null,
|
|
1079
|
+
"description": "The field (or function) naming the part.",
|
|
1080
|
+
"required": true
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"name": "title",
|
|
1084
|
+
"type": "string",
|
|
1085
|
+
"default": null,
|
|
1086
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
1087
|
+
"required": true
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "value",
|
|
1091
|
+
"type": "string | ((datum: T, index: number) => number)",
|
|
1092
|
+
"default": null,
|
|
1093
|
+
"description": "The field (or function) of its amount (≥ 0).",
|
|
1094
|
+
"required": true
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"name": "brand",
|
|
1098
|
+
"type": "BrandId",
|
|
1099
|
+
"default": null,
|
|
1100
|
+
"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`).",
|
|
1101
|
+
"required": false
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"name": "centerLabel",
|
|
1105
|
+
"type": "string",
|
|
1106
|
+
"default": null,
|
|
1107
|
+
"description": "The words under the number in the hole of a donut (“Total credits”).",
|
|
1108
|
+
"required": false
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"name": "centerValue",
|
|
1112
|
+
"type": "string",
|
|
1113
|
+
"default": null,
|
|
1114
|
+
"description": "The number in the hole, written already. Default: the total.",
|
|
1115
|
+
"required": false
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"name": "className",
|
|
1119
|
+
"type": "string",
|
|
1120
|
+
"default": null,
|
|
1121
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
1122
|
+
"required": false
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"name": "color",
|
|
1126
|
+
"type": "string | ((datum: T, index: number) => SeriesColor)",
|
|
1127
|
+
"default": null,
|
|
1128
|
+
"description": "A part's own colour (a slot, a tone or a CSS colour); default: the palette in order of size.",
|
|
1129
|
+
"required": false
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"name": "dataTable",
|
|
1133
|
+
"type": "boolean",
|
|
1134
|
+
"default": null,
|
|
1135
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
1136
|
+
"required": false
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"name": "description",
|
|
1140
|
+
"type": "ReactNode",
|
|
1141
|
+
"default": null,
|
|
1142
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
1143
|
+
"required": false
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"name": "donut",
|
|
1147
|
+
"type": "boolean",
|
|
1148
|
+
"default": null,
|
|
1149
|
+
"description": "A ring rather than a pie: the total (or `centerValue`) is written in its hole.",
|
|
1150
|
+
"required": false
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"name": "empty",
|
|
1154
|
+
"type": "ReactNode",
|
|
1155
|
+
"default": null,
|
|
1156
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
1157
|
+
"required": false
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"name": "error",
|
|
1161
|
+
"type": "ReactNode",
|
|
1162
|
+
"default": null,
|
|
1163
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
1164
|
+
"required": false
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"name": "exportable",
|
|
1168
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
1169
|
+
"default": null,
|
|
1170
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
1171
|
+
"required": false
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"name": "format",
|
|
1175
|
+
"type": "ValueFormat",
|
|
1176
|
+
"default": null,
|
|
1177
|
+
"description": "How the amounts are written.",
|
|
1178
|
+
"required": false
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"name": "height",
|
|
1182
|
+
"type": "number",
|
|
1183
|
+
"default": null,
|
|
1184
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
1185
|
+
"required": false
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"name": "hideTitle",
|
|
1189
|
+
"type": "boolean",
|
|
1190
|
+
"default": null,
|
|
1191
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
1192
|
+
"required": false
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"name": "id",
|
|
1196
|
+
"type": "string",
|
|
1197
|
+
"default": null,
|
|
1198
|
+
"description": "The id of the figure.",
|
|
1199
|
+
"required": false
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"name": "labelHeader",
|
|
1203
|
+
"type": "string",
|
|
1204
|
+
"default": null,
|
|
1205
|
+
"description": "The header of the parts in the data table.",
|
|
1206
|
+
"required": false
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"name": "labels",
|
|
1210
|
+
"type": "ChartLabelsInput",
|
|
1211
|
+
"default": null,
|
|
1212
|
+
"description": "The words, translated: the buttons, the states, the written summary.",
|
|
1213
|
+
"required": false
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"name": "live",
|
|
1217
|
+
"type": "boolean",
|
|
1218
|
+
"default": null,
|
|
1219
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
1220
|
+
"required": false
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"name": "loading",
|
|
1224
|
+
"type": "boolean",
|
|
1225
|
+
"default": null,
|
|
1226
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
1227
|
+
"required": false
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
"name": "locale",
|
|
1231
|
+
"type": "Locale",
|
|
1232
|
+
"default": null,
|
|
1233
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
1234
|
+
"required": false
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"name": "maxSlices",
|
|
1238
|
+
"type": "number",
|
|
1239
|
+
"default": null,
|
|
1240
|
+
"description": "At most this many slices; the rest fold into one, named `otherLabel`. Default 6.",
|
|
1241
|
+
"required": false
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"name": "onSelect",
|
|
1245
|
+
"type": "((datum: T, index: number) => void)",
|
|
1246
|
+
"default": null,
|
|
1247
|
+
"description": "Called with the row when a slice is clicked (or Enter is pressed on it).",
|
|
1248
|
+
"required": false
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"name": "otherLabel",
|
|
1252
|
+
"type": "string",
|
|
1253
|
+
"default": null,
|
|
1254
|
+
"description": "The name of the folded slice. Default “Other”.",
|
|
1255
|
+
"required": false
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"name": "style",
|
|
1259
|
+
"type": "CSSProperties",
|
|
1260
|
+
"default": null,
|
|
1261
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
1262
|
+
"required": false
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"name": "summary",
|
|
1266
|
+
"type": "\"hidden\" | \"visible\"",
|
|
1267
|
+
"default": null,
|
|
1268
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
1269
|
+
"required": false
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"name": "summaryText",
|
|
1273
|
+
"type": "string",
|
|
1274
|
+
"default": null,
|
|
1275
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
1276
|
+
"required": false
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"name": "valueHeader",
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"default": null,
|
|
1282
|
+
"description": "The header of the amounts in the data table.",
|
|
1283
|
+
"required": false
|
|
1284
|
+
}
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
]
|
|
1288
|
+
}
|