@krizaka/charts 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions-5VG352VZ.js +53 -0
- package/dist/actions-5VG352VZ.js.map +1 -0
- package/dist/bar.d.ts +3 -3
- package/dist/bar.js +7 -6
- package/dist/candlestick.d.ts +2 -2
- package/dist/candlestick.js +6 -5
- package/dist/card.d.ts +52 -0
- package/dist/card.js +19 -0
- package/dist/card.js.map +1 -0
- package/dist/{cartesian-BRhNQ3ib.d.ts → cartesian-CEY_wwe_.d.ts} +12 -2
- package/dist/chart.d.ts +2 -2
- package/dist/chart.js +5 -4
- package/dist/{chunk-BV4DBGN7.js → chunk-7W4T255Q.js} +4 -4
- package/dist/{chunk-W5ILLSPK.js → chunk-AGSSNMK5.js} +5 -5
- package/dist/{chunk-VKZZY2QD.js → chunk-FE4LUGAE.js} +5 -5
- package/dist/{chunk-ARARFMNE.js → chunk-FIQHMJZK.js} +5 -5
- package/dist/chunk-FIQHMJZK.js.map +1 -0
- package/dist/{chunk-ANUCSRUN.js → chunk-GD7TWEN3.js} +3 -3
- package/dist/chunk-GRRFPI27.js +89 -0
- package/dist/chunk-GRRFPI27.js.map +1 -0
- package/dist/{chunk-SLEJDQ3A.js → chunk-HH65IEUV.js} +3 -3
- package/dist/{chunk-OIRHLJBC.js → chunk-IJTI6VJD.js} +3 -3
- package/dist/{chunk-WVTIKOII.js → chunk-IURCLBUQ.js} +2 -2
- package/dist/{chunk-CVWSMUUB.js → chunk-JST4HJC3.js} +33 -15
- package/dist/chunk-JST4HJC3.js.map +1 -0
- package/dist/{chunk-IKQV3NSL.js → chunk-KERGFVSN.js} +3 -3
- package/dist/{chunk-XDDALY4C.js → chunk-KMQ7RANJ.js} +5 -5
- package/dist/{chunk-NCIQMRV3.js → chunk-LLUQEK5J.js} +5 -5
- package/dist/{chunk-AA5EWWYV.js → chunk-LZPZWBBY.js} +2 -2
- package/dist/{chunk-PBQV3B6O.js → chunk-MK2ZFUWM.js} +31 -16
- package/dist/chunk-MK2ZFUWM.js.map +1 -0
- package/dist/{chunk-CSSZLFLO.js → chunk-MRGMLDNS.js} +5 -5
- package/dist/{chunk-I3D7KUGN.js → chunk-NLTZWJLV.js} +3 -3
- package/dist/{chunk-PWMMXRMC.js → chunk-NV52AKHG.js} +3 -3
- package/dist/{chunk-MXLITIGU.js → chunk-NWJ5VDN7.js} +5 -5
- package/dist/{chunk-3CJHBJXA.js → chunk-OVASCEGF.js} +12 -73
- package/dist/chunk-OVASCEGF.js.map +1 -0
- package/dist/{chunk-EQLC2QVN.js → chunk-OZOAKP5F.js} +4 -4
- package/dist/chunk-OZOAKP5F.js.map +1 -0
- package/dist/{chunk-KNDHO67X.js → chunk-P2NK5L3B.js} +3 -3
- package/dist/{chunk-JTKR7ZWP.js → chunk-P6RS2L23.js} +140 -36
- package/dist/chunk-P6RS2L23.js.map +1 -0
- package/dist/{chunk-W5FX4TU3.js → chunk-PGD6SH5I.js} +30 -2
- package/dist/chunk-PGD6SH5I.js.map +1 -0
- package/dist/{chunk-4LBXEAGC.js → chunk-PWZHIGPO.js} +5 -5
- package/dist/{chunk-L2EKYWVI.js → chunk-VEOJNMPF.js} +3 -3
- package/dist/chunk-YHQFW2PR.js +71 -0
- package/dist/chunk-YHQFW2PR.js.map +1 -0
- package/dist/{chunk-C4MFZLJM.js → chunk-Z4T3JFNU.js} +2 -2
- package/dist/{chunk-EEP7PS2L.js → chunk-ZF7LVQTR.js} +3 -3
- package/dist/{context-BgYUymEO.d.ts → context-DNW7bJYw.d.ts} +19 -0
- package/dist/credits.d.ts +1 -1
- package/dist/credits.js +7 -6
- package/dist/earnings.d.ts +3 -3
- package/dist/earnings.js +8 -7
- package/dist/{frame-I7_xYGy5.d.ts → frame-B1HDNm7c.d.ts} +9 -5
- package/dist/funnel.d.ts +2 -2
- package/dist/funnel.js +6 -5
- package/dist/gauge.d.ts +2 -2
- package/dist/gauge.js +4 -3
- package/dist/geo.d.ts +2 -2
- package/dist/geo.js +5 -4
- package/dist/globe.d.ts +2 -2
- package/dist/globe.js +4 -3
- package/dist/goal.d.ts +2 -2
- package/dist/goal.js +5 -4
- package/dist/heatmap.d.ts +2 -2
- package/dist/heatmap.js +6 -5
- package/dist/index.d.ts +5 -3
- package/dist/index.js +45 -37
- package/dist/latency.d.ts +3 -3
- package/dist/latency.js +8 -7
- package/dist/line.d.ts +3 -3
- package/dist/line.js +7 -6
- package/dist/native.d.ts +19 -0
- package/dist/native.js +13 -1
- package/dist/native.js.map +1 -1
- package/dist/pie.d.ts +2 -2
- package/dist/pie.js +6 -5
- package/dist/provider.d.ts +2 -2
- package/dist/provider.js +4 -2
- package/dist/radar.d.ts +2 -2
- package/dist/radar.js +6 -5
- package/dist/sankey.d.ts +2 -2
- package/dist/sankey.js +6 -5
- package/dist/scatter.d.ts +2 -2
- package/dist/scatter.js +6 -5
- package/dist/sparkline.d.ts +2 -2
- package/dist/sparkline.js +6 -5
- package/dist/table-sheet-CQBIAV5N.js +36 -0
- package/dist/table-sheet-CQBIAV5N.js.map +1 -0
- package/dist/throughput.d.ts +3 -3
- package/dist/throughput.js +8 -7
- package/dist/ticker.d.ts +3 -3
- package/dist/ticker.js +8 -7
- package/dist/treemap.d.ts +2 -2
- package/dist/treemap.js +7 -6
- package/package.json +292 -50
- package/registry/area-chart.json +82 -12
- package/registry/bar-chart.json +82 -12
- package/registry/calendar-heatmap.json +46 -18
- package/registry/candlestick.json +46 -18
- package/registry/chart-card.json +235 -0
- package/registry/chart.json +40 -12
- package/registry/charts-provider.json +2 -2
- package/registry/earnings-chart.json +82 -12
- package/registry/examples/chart-card/before-after.d.ts +4 -0
- package/registry/examples/chart-card/before-after.js +22 -0
- package/registry/examples/chart-card/before-after.tsx +22 -0
- package/registry/examples/chart-card/jobs-activity.d.ts +4 -0
- package/registry/examples/chart-card/jobs-activity.js +20 -0
- package/registry/examples/chart-card/jobs-activity.tsx +20 -0
- package/registry/examples/chart-card/sparse-and-empty.d.ts +4 -0
- package/registry/examples/chart-card/sparse-and-empty.js +16 -0
- package/registry/examples/chart-card/sparse-and-empty.tsx +18 -0
- package/registry/examples/chart-card/usage-donut.d.ts +4 -0
- package/registry/examples/chart-card/usage-donut.js +18 -0
- package/registry/examples/chart-card/usage-donut.tsx +18 -0
- package/registry/examples/charts-provider/french-orazaka.js +1 -1
- package/registry/examples/charts-provider/french-orazaka.tsx +1 -1
- package/registry/examples/kpi-stat/dashboard-row.d.ts +4 -0
- package/registry/examples/kpi-stat/dashboard-row.js +19 -0
- package/registry/examples/kpi-stat/dashboard-row.tsx +17 -0
- package/registry/examples/kpi-stat/single.d.ts +4 -0
- package/registry/examples/kpi-stat/single.js +11 -0
- package/registry/examples/kpi-stat/single.tsx +6 -0
- package/registry/funnel.json +46 -18
- package/registry/gauge.json +42 -14
- package/registry/geo-map.json +46 -18
- package/registry/globe.json +40 -12
- package/registry/goal-progress.json +36 -8
- package/registry/heatmap.json +46 -18
- package/registry/index.json +49 -1
- package/registry/job-throughput.json +82 -12
- package/registry/kpi-stat.json +296 -0
- package/registry/latency-chart.json +82 -12
- package/registry/line-chart.json +82 -12
- package/registry/pie-chart.json +92 -36
- package/registry/price-ticker.json +82 -12
- package/registry/radar-chart.json +46 -18
- package/registry/sankey.json +46 -18
- package/registry/scatter-chart.json +46 -18
- package/registry/sparkline.json +38 -10
- package/registry/treemap.json +40 -12
- package/dist/chunk-3CJHBJXA.js.map +0 -1
- package/dist/chunk-ARARFMNE.js.map +0 -1
- package/dist/chunk-CVWSMUUB.js.map +0 -1
- package/dist/chunk-EQLC2QVN.js.map +0 -1
- package/dist/chunk-JTKR7ZWP.js.map +0 -1
- package/dist/chunk-PBQV3B6O.js.map +0 -1
- package/dist/chunk-W5FX4TU3.js.map +0 -1
- /package/dist/{chunk-BV4DBGN7.js.map → chunk-7W4T255Q.js.map} +0 -0
- /package/dist/{chunk-W5ILLSPK.js.map → chunk-AGSSNMK5.js.map} +0 -0
- /package/dist/{chunk-VKZZY2QD.js.map → chunk-FE4LUGAE.js.map} +0 -0
- /package/dist/{chunk-ANUCSRUN.js.map → chunk-GD7TWEN3.js.map} +0 -0
- /package/dist/{chunk-SLEJDQ3A.js.map → chunk-HH65IEUV.js.map} +0 -0
- /package/dist/{chunk-OIRHLJBC.js.map → chunk-IJTI6VJD.js.map} +0 -0
- /package/dist/{chunk-WVTIKOII.js.map → chunk-IURCLBUQ.js.map} +0 -0
- /package/dist/{chunk-IKQV3NSL.js.map → chunk-KERGFVSN.js.map} +0 -0
- /package/dist/{chunk-XDDALY4C.js.map → chunk-KMQ7RANJ.js.map} +0 -0
- /package/dist/{chunk-NCIQMRV3.js.map → chunk-LLUQEK5J.js.map} +0 -0
- /package/dist/{chunk-AA5EWWYV.js.map → chunk-LZPZWBBY.js.map} +0 -0
- /package/dist/{chunk-CSSZLFLO.js.map → chunk-MRGMLDNS.js.map} +0 -0
- /package/dist/{chunk-I3D7KUGN.js.map → chunk-NLTZWJLV.js.map} +0 -0
- /package/dist/{chunk-PWMMXRMC.js.map → chunk-NV52AKHG.js.map} +0 -0
- /package/dist/{chunk-MXLITIGU.js.map → chunk-NWJ5VDN7.js.map} +0 -0
- /package/dist/{chunk-KNDHO67X.js.map → chunk-P2NK5L3B.js.map} +0 -0
- /package/dist/{chunk-4LBXEAGC.js.map → chunk-PWZHIGPO.js.map} +0 -0
- /package/dist/{chunk-L2EKYWVI.js.map → chunk-VEOJNMPF.js.map} +0 -0
- /package/dist/{chunk-C4MFZLJM.js.map → chunk-Z4T3JFNU.js.map} +0 -0
- /package/dist/{chunk-EEP7PS2L.js.map → chunk-ZF7LVQTR.js.map} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BarChart } from "@krizaka/charts/bar";
|
|
2
|
+
import { ChartCard } from "@krizaka/charts/card";
|
|
3
|
+
|
|
4
|
+
const days = ["2026-10-03", "2026-10-04", "2026-10-05", "2026-10-06", "2026-10-07", "2026-10-08", "2026-10-09", "2026-10-10"];
|
|
5
|
+
const completed = [12, 18, 9, 22, 31, 27, 35, 41];
|
|
6
|
+
const failed = [1, 0, 2, 1, 3, 0, 1, 2];
|
|
7
|
+
const data = days.map((day, i) => ({ day, completed: completed[i], failed: failed[i] }));
|
|
8
|
+
const series = [
|
|
9
|
+
{ key: "completed", label: "Completed", color: "accent" },
|
|
10
|
+
{ key: "failed", label: "Failed", color: "danger" },
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
// The card hands the chart its title and insight; the ⋯ menu (table, CSV, PNG, SVG, copy) comes with it.
|
|
14
|
+
export default function JobsActivity() {
|
|
15
|
+
return (
|
|
16
|
+
<ChartCard title="Jobs per day" insight="195 jobs · +24 % vs the week before" footer="Read from your own jobs — nothing estimated.">
|
|
17
|
+
<BarChart data={data} x="day" xFormat="day" xLabel="Day" series={series} stacked format="integer" height={220} autoRange />
|
|
18
|
+
</ChartCard>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/chart-card/sparse-and-empty.tsx
|
|
4
|
+
import { BarChart } from "@krizaka/charts/bar";
|
|
5
|
+
import { ChartCard } from "@krizaka/charts/card";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var days = Array.from({ length: 30 }, (_, i) => ({ day: `2026-09-${String(i + 1).padStart(2, "0")}`, jobs: i === 27 ? 100 : 0 }));
|
|
8
|
+
function SparseAndEmpty() {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "grid", gap: 16, gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))" }, children: [
|
|
10
|
+
/* @__PURE__ */ jsx(ChartCard, { title: "Jobs per day", insight: "100 jobs on Sep 28", children: /* @__PURE__ */ jsx(BarChart, { data: days, x: "day", xFormat: "day", y: "jobs", yLabel: "Jobs", format: "integer", height: 180, autoRange: true }) }),
|
|
11
|
+
/* @__PURE__ */ jsx(ChartCard, { title: "Failed jobs", insight: "Nothing failed yet", children: /* @__PURE__ */ jsx(BarChart, { data: [], x: "day", y: "jobs", yLabel: "Jobs", height: 180 }) })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
SparseAndEmpty as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BarChart } from "@krizaka/charts/bar";
|
|
2
|
+
import { ChartCard } from "@krizaka/charts/card";
|
|
3
|
+
|
|
4
|
+
const days = Array.from({ length: 30 }, (_, i) => ({ day: `2026-09-${String(i + 1).padStart(2, "0")}`, jobs: i === 27 ? 100 : 0 }));
|
|
5
|
+
|
|
6
|
+
// 29 empty days and one bar: `autoRange` zooms on the active period and says how sparse it is. No data: a calm state.
|
|
7
|
+
export default function SparseAndEmpty() {
|
|
8
|
+
return (
|
|
9
|
+
<div style={{ display: "grid", gap: 16, gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))" }}>
|
|
10
|
+
<ChartCard title="Jobs per day" insight="100 jobs on Sep 28">
|
|
11
|
+
<BarChart data={days} x="day" xFormat="day" y="jobs" yLabel="Jobs" format="integer" height={180} autoRange />
|
|
12
|
+
</ChartCard>
|
|
13
|
+
<ChartCard title="Failed jobs" insight="Nothing failed yet">
|
|
14
|
+
<BarChart data={[]} x="day" y="jobs" yLabel="Jobs" height={180} />
|
|
15
|
+
</ChartCard>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/chart-card/usage-donut.tsx
|
|
4
|
+
import { ChartCard } from "@krizaka/charts/card";
|
|
5
|
+
import { DonutChart } from "@krizaka/charts/pie";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var kinds = [
|
|
8
|
+
{ kind: "Images", jobs: 96 },
|
|
9
|
+
{ kind: "Video", jobs: 41 },
|
|
10
|
+
{ kind: "Audio", jobs: 33 },
|
|
11
|
+
{ kind: "Text", jobs: 25 }
|
|
12
|
+
];
|
|
13
|
+
function UsageDonut() {
|
|
14
|
+
return /* @__PURE__ */ jsx(ChartCard, { title: "What you made", insight: "195 jobs, most of them images", description: "Jobs by kind, last 7 days.", children: /* @__PURE__ */ jsx(DonutChart, { data: kinds, label: "kind", value: "jobs", labelHeader: "Kind", valueHeader: "Jobs", centerLabel: "jobs", format: "integer", height: 220 }) });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
UsageDonut as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChartCard } from "@krizaka/charts/card";
|
|
2
|
+
import { DonutChart } from "@krizaka/charts/pie";
|
|
3
|
+
|
|
4
|
+
const kinds = [
|
|
5
|
+
{ kind: "Images", jobs: 96 },
|
|
6
|
+
{ kind: "Video", jobs: 41 },
|
|
7
|
+
{ kind: "Audio", jobs: 33 },
|
|
8
|
+
{ kind: "Text", jobs: 25 },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
// Legend chips carry the value and the share, and switch a part off: click “Video” and the ring re-measures.
|
|
12
|
+
export default function UsageDonut() {
|
|
13
|
+
return (
|
|
14
|
+
<ChartCard title="What you made" insight="195 jobs, most of them images" description="Jobs by kind, last 7 days.">
|
|
15
|
+
<DonutChart data={kinds} label="kind" value="jobs" labelHeader="Kind" valueHeader="Jobs" centerLabel="jobs" format="integer" height={220} />
|
|
16
|
+
</ChartCard>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -16,7 +16,7 @@ function FrenchOrazaka() {
|
|
|
16
16
|
{
|
|
17
17
|
locale: "fr-FR",
|
|
18
18
|
brand: "orazaka",
|
|
19
|
-
labels: {
|
|
19
|
+
labels: { actions: "Actions du graphique", viewTable: "Voir en tableau", downloadCsv: "T\xE9l\xE9charger le CSV", copyData: "Copier les donn\xE9es", empty: "Pas encore de donn\xE9es.", kinds: { bar: "Histogramme" } },
|
|
20
20
|
children: /* @__PURE__ */ jsx(BarChart, { title: "Cr\xE9dits consomm\xE9s par mois", data: months, x: "month", xLabel: "Mois", y: "credits", yLabel: "Cr\xE9dits", format: "compact" })
|
|
21
21
|
}
|
|
22
22
|
);
|
|
@@ -14,7 +14,7 @@ export default function FrenchOrazaka() {
|
|
|
14
14
|
<ChartsProvider
|
|
15
15
|
locale="fr-FR"
|
|
16
16
|
brand="orazaka"
|
|
17
|
-
labels={{
|
|
17
|
+
labels={{ actions: "Actions du graphique", viewTable: "Voir en tableau", downloadCsv: "Télécharger le CSV", copyData: "Copier les données", empty: "Pas encore de données.", kinds: { bar: "Histogramme" } }}
|
|
18
18
|
>
|
|
19
19
|
<BarChart title="Crédits consommés par mois" data={months} x="month" xLabel="Mois" y="credits" yLabel="Crédits" format="compact" />
|
|
20
20
|
</ChartsProvider>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/kpi-stat/dashboard-row.tsx
|
|
4
|
+
import { KpiStat } from "@krizaka/charts/card";
|
|
5
|
+
import { StatGrid } from "@krizaka/ui/stat";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var jobs = [12, 18, 9, 22, 31, 27, 35, 41];
|
|
8
|
+
var minutes = [4.2, 4.6, 5.1, 4.4, 3.9, 3.7, 3.5, 3.2];
|
|
9
|
+
function DashboardRow() {
|
|
10
|
+
return /* @__PURE__ */ jsxs(StatGrid, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(KpiStat, { label: "Jobs", value: 195, previous: 157, data: jobs, variant: "bar", hint: "last 8 days" }),
|
|
12
|
+
/* @__PURE__ */ jsx(KpiStat, { label: "Success rate", value: 0.94, previous: 0.91, format: "percent", hint: "completed / all" }),
|
|
13
|
+
/* @__PURE__ */ jsx(KpiStat, { label: "Median time", value: 3.2, previous: 4.2, good: "down", data: minutes, format: { style: "unit", unit: "minute" }, hint: "to a result" }),
|
|
14
|
+
/* @__PURE__ */ jsx(KpiStat, { label: "Credits spent", value: 1240, previous: 1100, good: "down", format: "integer", hint: "this period" })
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
DashboardRow as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KpiStat } from "@krizaka/charts/card";
|
|
2
|
+
import { StatGrid } from "@krizaka/ui/stat";
|
|
3
|
+
|
|
4
|
+
const jobs = [12, 18, 9, 22, 31, 27, 35, 41];
|
|
5
|
+
const minutes = [4.2, 4.6, 5.1, 4.4, 3.9, 3.7, 3.5, 3.2];
|
|
6
|
+
|
|
7
|
+
// The head of a dashboard: each figure with its change against the previous period and the shape of the period.
|
|
8
|
+
export default function DashboardRow() {
|
|
9
|
+
return (
|
|
10
|
+
<StatGrid>
|
|
11
|
+
<KpiStat label="Jobs" value={195} previous={157} data={jobs} variant="bar" hint="last 8 days" />
|
|
12
|
+
<KpiStat label="Success rate" value={0.94} previous={0.91} format="percent" hint="completed / all" />
|
|
13
|
+
<KpiStat label="Median time" value={3.2} previous={4.2} good="down" data={minutes} format={{ style: "unit", unit: "minute" }} hint="to a result" />
|
|
14
|
+
<KpiStat label="Credits spent" value={1240} previous={1100} good="down" format="integer" hint="this period" />
|
|
15
|
+
</StatGrid>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/kpi-stat/single.tsx
|
|
4
|
+
import { KpiStat } from "@krizaka/charts/card";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function Single() {
|
|
7
|
+
return /* @__PURE__ */ jsx(KpiStat, { label: "Time to a result", value: 48, previous: 31, good: "down", format: { style: "unit", unit: "second" }, data: [31, 29, 35, 38, 41, 44, 48], hint: "median, last 7 days" });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
Single as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { KpiStat } from "@krizaka/charts/card";
|
|
2
|
+
|
|
3
|
+
// A rise in latency is bad news: good="down" makes the arrow say so.
|
|
4
|
+
export default function Single() {
|
|
5
|
+
return <KpiStat label="Time to a result" value={48} previous={31} good="down" format={{ style: "unit", unit: "second" }} data={[31, 29, 35, 38, 41, 44, 48]} hint="median, last 7 days" />;
|
|
6
|
+
}
|
package/registry/funnel.json
CHANGED
|
@@ -85,13 +85,6 @@
|
|
|
85
85
|
"description": "The field (or function) naming the stage.",
|
|
86
86
|
"required": true
|
|
87
87
|
},
|
|
88
|
-
{
|
|
89
|
-
"name": "title",
|
|
90
|
-
"type": "string",
|
|
91
|
-
"default": null,
|
|
92
|
-
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
93
|
-
"required": true
|
|
94
|
-
},
|
|
95
88
|
{
|
|
96
89
|
"name": "value",
|
|
97
90
|
"type": "string | ((datum: T, index: number) => number)",
|
|
@@ -99,6 +92,13 @@
|
|
|
99
92
|
"description": "The field of how many reached it.",
|
|
100
93
|
"required": true
|
|
101
94
|
},
|
|
95
|
+
{
|
|
96
|
+
"name": "actionsMenu",
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"default": null,
|
|
99
|
+
"description": "The ⋯ actions menu of the kit. `false`: the former “Show data” and export buttons, drawn in line. Default true.",
|
|
100
|
+
"required": false
|
|
101
|
+
},
|
|
102
102
|
{
|
|
103
103
|
"name": "brand",
|
|
104
104
|
"type": "BrandId",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"name": "dataTable",
|
|
118
118
|
"type": "boolean",
|
|
119
119
|
"default": null,
|
|
120
|
-
"description": "
|
|
120
|
+
"description": "“View as table” in the actions menu (the table is in the page for screen readers either way). Default true.",
|
|
121
121
|
"required": false
|
|
122
122
|
},
|
|
123
123
|
{
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"name": "exportable",
|
|
146
146
|
"type": "boolean | readonly ExportFormat[]",
|
|
147
147
|
"default": null,
|
|
148
|
-
"description": "
|
|
148
|
+
"description": "The downloads of the actions menu: all three by default, or the formats you want, or `false` for none.",
|
|
149
149
|
"required": false
|
|
150
150
|
},
|
|
151
151
|
{
|
|
@@ -190,6 +190,13 @@
|
|
|
190
190
|
"description": "The id of the figure.",
|
|
191
191
|
"required": false
|
|
192
192
|
},
|
|
193
|
+
{
|
|
194
|
+
"name": "insight",
|
|
195
|
+
"type": "ReactNode",
|
|
196
|
+
"default": null,
|
|
197
|
+
"description": "One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.",
|
|
198
|
+
"required": false
|
|
199
|
+
},
|
|
193
200
|
{
|
|
194
201
|
"name": "labels",
|
|
195
202
|
"type": "ChartLabelsInput",
|
|
@@ -253,6 +260,13 @@
|
|
|
253
260
|
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
254
261
|
"required": false
|
|
255
262
|
},
|
|
263
|
+
{
|
|
264
|
+
"name": "title",
|
|
265
|
+
"type": "string",
|
|
266
|
+
"default": null,
|
|
267
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`. Inside a `ChartCard`, the card's title is the default.",
|
|
268
|
+
"required": false
|
|
269
|
+
},
|
|
256
270
|
{
|
|
257
271
|
"name": "valueLabel",
|
|
258
272
|
"type": "string",
|
|
@@ -306,13 +320,6 @@
|
|
|
306
320
|
"description": "The field (or function) naming the stage.",
|
|
307
321
|
"required": true
|
|
308
322
|
},
|
|
309
|
-
{
|
|
310
|
-
"name": "title",
|
|
311
|
-
"type": "string",
|
|
312
|
-
"default": null,
|
|
313
|
-
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
314
|
-
"required": true
|
|
315
|
-
},
|
|
316
323
|
{
|
|
317
324
|
"name": "value",
|
|
318
325
|
"type": "string | ((datum: T, index: number) => number)",
|
|
@@ -320,6 +327,13 @@
|
|
|
320
327
|
"description": "The field of how many reached it.",
|
|
321
328
|
"required": true
|
|
322
329
|
},
|
|
330
|
+
{
|
|
331
|
+
"name": "actionsMenu",
|
|
332
|
+
"type": "boolean",
|
|
333
|
+
"default": null,
|
|
334
|
+
"description": "The ⋯ actions menu of the kit. `false`: the former “Show data” and export buttons, drawn in line. Default true.",
|
|
335
|
+
"required": false
|
|
336
|
+
},
|
|
323
337
|
{
|
|
324
338
|
"name": "brand",
|
|
325
339
|
"type": "BrandId",
|
|
@@ -338,7 +352,7 @@
|
|
|
338
352
|
"name": "dataTable",
|
|
339
353
|
"type": "boolean",
|
|
340
354
|
"default": null,
|
|
341
|
-
"description": "
|
|
355
|
+
"description": "“View as table” in the actions menu (the table is in the page for screen readers either way). Default true.",
|
|
342
356
|
"required": false
|
|
343
357
|
},
|
|
344
358
|
{
|
|
@@ -366,7 +380,7 @@
|
|
|
366
380
|
"name": "exportable",
|
|
367
381
|
"type": "boolean | readonly ExportFormat[]",
|
|
368
382
|
"default": null,
|
|
369
|
-
"description": "
|
|
383
|
+
"description": "The downloads of the actions menu: all three by default, or the formats you want, or `false` for none.",
|
|
370
384
|
"required": false
|
|
371
385
|
},
|
|
372
386
|
{
|
|
@@ -411,6 +425,13 @@
|
|
|
411
425
|
"description": "The id of the figure.",
|
|
412
426
|
"required": false
|
|
413
427
|
},
|
|
428
|
+
{
|
|
429
|
+
"name": "insight",
|
|
430
|
+
"type": "ReactNode",
|
|
431
|
+
"default": null,
|
|
432
|
+
"description": "One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.",
|
|
433
|
+
"required": false
|
|
434
|
+
},
|
|
414
435
|
{
|
|
415
436
|
"name": "labels",
|
|
416
437
|
"type": "ChartLabelsInput",
|
|
@@ -474,6 +495,13 @@
|
|
|
474
495
|
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
475
496
|
"required": false
|
|
476
497
|
},
|
|
498
|
+
{
|
|
499
|
+
"name": "title",
|
|
500
|
+
"type": "string",
|
|
501
|
+
"default": null,
|
|
502
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`. Inside a `ChartCard`, the card's title is the default.",
|
|
503
|
+
"required": false
|
|
504
|
+
},
|
|
477
505
|
{
|
|
478
506
|
"name": "valueLabel",
|
|
479
507
|
"type": "string",
|
package/registry/gauge.json
CHANGED
|
@@ -56,13 +56,6 @@
|
|
|
56
56
|
"component": "Gauge",
|
|
57
57
|
"description": "One figure against its range — credits used of a plan, a challenge's progress, a load.",
|
|
58
58
|
"props": [
|
|
59
|
-
{
|
|
60
|
-
"name": "title",
|
|
61
|
-
"type": "string",
|
|
62
|
-
"default": null,
|
|
63
|
-
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
64
|
-
"required": true
|
|
65
|
-
},
|
|
66
59
|
{
|
|
67
60
|
"name": "value",
|
|
68
61
|
"type": "number",
|
|
@@ -70,6 +63,13 @@
|
|
|
70
63
|
"description": "The value.",
|
|
71
64
|
"required": true
|
|
72
65
|
},
|
|
66
|
+
{
|
|
67
|
+
"name": "actionsMenu",
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": null,
|
|
70
|
+
"description": "The ⋯ actions menu of the kit. `false`: the former “Show data” and export buttons, drawn in line. Default true.",
|
|
71
|
+
"required": false
|
|
72
|
+
},
|
|
73
73
|
{
|
|
74
74
|
"name": "brand",
|
|
75
75
|
"type": "BrandId",
|
|
@@ -140,6 +140,13 @@
|
|
|
140
140
|
"description": "The id of the figure.",
|
|
141
141
|
"required": false
|
|
142
142
|
},
|
|
143
|
+
{
|
|
144
|
+
"name": "insight",
|
|
145
|
+
"type": "ReactNode",
|
|
146
|
+
"default": null,
|
|
147
|
+
"description": "One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.",
|
|
148
|
+
"required": false
|
|
149
|
+
},
|
|
143
150
|
{
|
|
144
151
|
"name": "labels",
|
|
145
152
|
"type": "ChartLabelsInput",
|
|
@@ -210,6 +217,13 @@
|
|
|
210
217
|
"description": "A tick on the arc: the objective.",
|
|
211
218
|
"required": false
|
|
212
219
|
},
|
|
220
|
+
{
|
|
221
|
+
"name": "title",
|
|
222
|
+
"type": "string",
|
|
223
|
+
"default": null,
|
|
224
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`. Inside a `ChartCard`, the card's title is the default.",
|
|
225
|
+
"required": false
|
|
226
|
+
},
|
|
213
227
|
{
|
|
214
228
|
"name": "tone",
|
|
215
229
|
"type": "Tone",
|
|
@@ -426,13 +440,6 @@
|
|
|
426
440
|
"component": "Gauge",
|
|
427
441
|
"description": "One figure against its range — credits used of a plan, a challenge's progress, a load.",
|
|
428
442
|
"props": [
|
|
429
|
-
{
|
|
430
|
-
"name": "title",
|
|
431
|
-
"type": "string",
|
|
432
|
-
"default": null,
|
|
433
|
-
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
434
|
-
"required": true
|
|
435
|
-
},
|
|
436
443
|
{
|
|
437
444
|
"name": "value",
|
|
438
445
|
"type": "number",
|
|
@@ -440,6 +447,13 @@
|
|
|
440
447
|
"description": "The value.",
|
|
441
448
|
"required": true
|
|
442
449
|
},
|
|
450
|
+
{
|
|
451
|
+
"name": "actionsMenu",
|
|
452
|
+
"type": "boolean",
|
|
453
|
+
"default": null,
|
|
454
|
+
"description": "The ⋯ actions menu of the kit. `false`: the former “Show data” and export buttons, drawn in line. Default true.",
|
|
455
|
+
"required": false
|
|
456
|
+
},
|
|
443
457
|
{
|
|
444
458
|
"name": "brand",
|
|
445
459
|
"type": "BrandId",
|
|
@@ -510,6 +524,13 @@
|
|
|
510
524
|
"description": "The id of the figure.",
|
|
511
525
|
"required": false
|
|
512
526
|
},
|
|
527
|
+
{
|
|
528
|
+
"name": "insight",
|
|
529
|
+
"type": "ReactNode",
|
|
530
|
+
"default": null,
|
|
531
|
+
"description": "One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.",
|
|
532
|
+
"required": false
|
|
533
|
+
},
|
|
513
534
|
{
|
|
514
535
|
"name": "labels",
|
|
515
536
|
"type": "ChartLabelsInput",
|
|
@@ -580,6 +601,13 @@
|
|
|
580
601
|
"description": "A tick on the arc: the objective.",
|
|
581
602
|
"required": false
|
|
582
603
|
},
|
|
604
|
+
{
|
|
605
|
+
"name": "title",
|
|
606
|
+
"type": "string",
|
|
607
|
+
"default": null,
|
|
608
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`. Inside a `ChartCard`, the card's title is the default.",
|
|
609
|
+
"required": false
|
|
610
|
+
},
|
|
583
611
|
{
|
|
584
612
|
"name": "tone",
|
|
585
613
|
"type": "Tone",
|
package/registry/geo-map.json
CHANGED
|
@@ -82,13 +82,6 @@
|
|
|
82
82
|
"description": "The field (or function) of the region's ISO 3166-1 alpha-2 code (`\"FR\"`, `\"US\"`).",
|
|
83
83
|
"required": true
|
|
84
84
|
},
|
|
85
|
-
{
|
|
86
|
-
"name": "title",
|
|
87
|
-
"type": "string",
|
|
88
|
-
"default": null,
|
|
89
|
-
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
90
|
-
"required": true
|
|
91
|
-
},
|
|
92
85
|
{
|
|
93
86
|
"name": "value",
|
|
94
87
|
"type": "string | ((datum: T, index: number) => number)",
|
|
@@ -96,6 +89,13 @@
|
|
|
96
89
|
"description": "The field (or function) of its value.",
|
|
97
90
|
"required": true
|
|
98
91
|
},
|
|
92
|
+
{
|
|
93
|
+
"name": "actionsMenu",
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"default": null,
|
|
96
|
+
"description": "The ⋯ actions menu of the kit. `false`: the former “Show data” and export buttons, drawn in line. Default true.",
|
|
97
|
+
"required": false
|
|
98
|
+
},
|
|
99
99
|
{
|
|
100
100
|
"name": "brand",
|
|
101
101
|
"type": "BrandId",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"name": "dataTable",
|
|
115
115
|
"type": "boolean",
|
|
116
116
|
"default": null,
|
|
117
|
-
"description": "
|
|
117
|
+
"description": "“View as table” in the actions menu (the table is in the page for screen readers either way). Default true.",
|
|
118
118
|
"required": false
|
|
119
119
|
},
|
|
120
120
|
{
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"name": "exportable",
|
|
143
143
|
"type": "boolean | readonly ExportFormat[]",
|
|
144
144
|
"default": null,
|
|
145
|
-
"description": "
|
|
145
|
+
"description": "The downloads of the actions menu: all three by default, or the formats you want, or `false` for none.",
|
|
146
146
|
"required": false
|
|
147
147
|
},
|
|
148
148
|
{
|
|
@@ -173,6 +173,13 @@
|
|
|
173
173
|
"description": "The id of the figure.",
|
|
174
174
|
"required": false
|
|
175
175
|
},
|
|
176
|
+
{
|
|
177
|
+
"name": "insight",
|
|
178
|
+
"type": "ReactNode",
|
|
179
|
+
"default": null,
|
|
180
|
+
"description": "One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.",
|
|
181
|
+
"required": false
|
|
182
|
+
},
|
|
176
183
|
{
|
|
177
184
|
"name": "labels",
|
|
178
185
|
"type": "ChartLabelsInput",
|
|
@@ -250,6 +257,13 @@
|
|
|
250
257
|
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
251
258
|
"required": false
|
|
252
259
|
},
|
|
260
|
+
{
|
|
261
|
+
"name": "title",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"default": null,
|
|
264
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`. Inside a `ChartCard`, the card's title is the default.",
|
|
265
|
+
"required": false
|
|
266
|
+
},
|
|
253
267
|
{
|
|
254
268
|
"name": "valueLabel",
|
|
255
269
|
"type": "string",
|
|
@@ -303,13 +317,6 @@
|
|
|
303
317
|
"description": "The field (or function) of the region's ISO 3166-1 alpha-2 code (`\"FR\"`, `\"US\"`).",
|
|
304
318
|
"required": true
|
|
305
319
|
},
|
|
306
|
-
{
|
|
307
|
-
"name": "title",
|
|
308
|
-
"type": "string",
|
|
309
|
-
"default": null,
|
|
310
|
-
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
311
|
-
"required": true
|
|
312
|
-
},
|
|
313
320
|
{
|
|
314
321
|
"name": "value",
|
|
315
322
|
"type": "string | ((datum: T, index: number) => number)",
|
|
@@ -317,6 +324,13 @@
|
|
|
317
324
|
"description": "The field (or function) of its value.",
|
|
318
325
|
"required": true
|
|
319
326
|
},
|
|
327
|
+
{
|
|
328
|
+
"name": "actionsMenu",
|
|
329
|
+
"type": "boolean",
|
|
330
|
+
"default": null,
|
|
331
|
+
"description": "The ⋯ actions menu of the kit. `false`: the former “Show data” and export buttons, drawn in line. Default true.",
|
|
332
|
+
"required": false
|
|
333
|
+
},
|
|
320
334
|
{
|
|
321
335
|
"name": "brand",
|
|
322
336
|
"type": "BrandId",
|
|
@@ -335,7 +349,7 @@
|
|
|
335
349
|
"name": "dataTable",
|
|
336
350
|
"type": "boolean",
|
|
337
351
|
"default": null,
|
|
338
|
-
"description": "
|
|
352
|
+
"description": "“View as table” in the actions menu (the table is in the page for screen readers either way). Default true.",
|
|
339
353
|
"required": false
|
|
340
354
|
},
|
|
341
355
|
{
|
|
@@ -363,7 +377,7 @@
|
|
|
363
377
|
"name": "exportable",
|
|
364
378
|
"type": "boolean | readonly ExportFormat[]",
|
|
365
379
|
"default": null,
|
|
366
|
-
"description": "
|
|
380
|
+
"description": "The downloads of the actions menu: all three by default, or the formats you want, or `false` for none.",
|
|
367
381
|
"required": false
|
|
368
382
|
},
|
|
369
383
|
{
|
|
@@ -394,6 +408,13 @@
|
|
|
394
408
|
"description": "The id of the figure.",
|
|
395
409
|
"required": false
|
|
396
410
|
},
|
|
411
|
+
{
|
|
412
|
+
"name": "insight",
|
|
413
|
+
"type": "ReactNode",
|
|
414
|
+
"default": null,
|
|
415
|
+
"description": "One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.",
|
|
416
|
+
"required": false
|
|
417
|
+
},
|
|
397
418
|
{
|
|
398
419
|
"name": "labels",
|
|
399
420
|
"type": "ChartLabelsInput",
|
|
@@ -471,6 +492,13 @@
|
|
|
471
492
|
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
472
493
|
"required": false
|
|
473
494
|
},
|
|
495
|
+
{
|
|
496
|
+
"name": "title",
|
|
497
|
+
"type": "string",
|
|
498
|
+
"default": null,
|
|
499
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`. Inside a `ChartCard`, the card's title is the default.",
|
|
500
|
+
"required": false
|
|
501
|
+
},
|
|
474
502
|
{
|
|
475
503
|
"name": "valueLabel",
|
|
476
504
|
"type": "string",
|