@krizaka/charts 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/dist/bar.js +5 -4
- package/dist/candlestick.js +3 -3
- package/dist/chart.js +3 -3
- package/dist/{chunk-EK3Z647J.js → chunk-4LBXEAGC.js} +3 -3
- package/dist/{chunk-AHQXJSAQ.js → chunk-AA5EWWYV.js} +2 -2
- package/dist/{chunk-VKO2OYYM.js → chunk-ARARFMNE.js} +2 -2
- package/dist/{chunk-WBH2QU77.js → chunk-BV4DBGN7.js} +2 -2
- package/dist/{chunk-BZ5CQFPH.js → chunk-C4MFZLJM.js} +2 -2
- package/dist/{chunk-XAJ3KCC4.js → chunk-CSSZLFLO.js} +3 -3
- package/dist/{chunk-UNK4MJVG.js → chunk-CVWSMUUB.js} +8 -8
- 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-DZB6HEVO.js → chunk-EQLC2QVN.js} +2 -2
- 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-PTSB3H5Q.js → chunk-I3D7KUGN.js} +2 -2
- package/dist/chunk-IKQV3NSL.js +76 -0
- package/dist/chunk-IKQV3NSL.js.map +1 -0
- package/dist/{chunk-DWJPPEMC.js → chunk-JTKR7ZWP.js} +73 -60
- 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-XC6BQ3RN.js → chunk-MXLITIGU.js} +3 -3
- package/dist/{chunk-OER6ETT4.js → chunk-NCIQMRV3.js} +3 -3
- package/dist/chunk-OIRHLJBC.js +83 -0
- package/dist/chunk-OIRHLJBC.js.map +1 -0
- package/dist/{chunk-WIRCIOLH.js → chunk-PBQV3B6O.js} +5 -5
- package/dist/chunk-POQIHFAZ.js +2 -0
- package/dist/chunk-POQIHFAZ.js.map +1 -0
- package/dist/{chunk-I5QUZVU2.js → chunk-PWMMXRMC.js} +2 -2
- package/dist/chunk-SLEJDQ3A.js +81 -0
- package/dist/chunk-SLEJDQ3A.js.map +1 -0
- package/dist/{chunk-7TIFCK5E.js → chunk-VKZZY2QD.js} +3 -3
- package/dist/{chunk-VKTZD7UT.js → chunk-W5ILLSPK.js} +3 -3
- 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-XR4ZJDOV.js → chunk-WVTIKOII.js} +2 -2
- package/dist/{chunk-7CSAGFBW.js → chunk-XDDALY4C.js} +3 -3
- 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/funnel.js +3 -3
- package/dist/gauge.js +3 -2
- package/dist/geo.js +2 -2
- package/dist/globe.js +2 -2
- package/dist/goal.d.ts +26 -0
- package/dist/goal.js +17 -0
- package/dist/goal.js.map +1 -0
- package/dist/heatmap.js +3 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +80 -33
- 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.js +5 -4
- package/dist/native.d.ts +195 -1
- package/dist/native.js +383 -14
- package/dist/native.js.map +1 -1
- package/dist/pie.js +3 -3
- package/dist/radar.js +3 -3
- package/dist/sankey.js +3 -3
- package/dist/scatter.js +3 -3
- package/dist/sparkline.js +4 -3
- 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.js +3 -3
- package/package.json +100 -4
- package/registry/area-chart.json +1 -0
- package/registry/bar-chart.json +1 -0
- package/registry/calendar-heatmap.json +1 -0
- package/registry/candlestick.json +1 -0
- package/registry/chart.json +1 -0
- package/registry/charts-provider.json +1 -0
- package/registry/credit-usage.json +473 -0
- package/registry/earnings-chart.json +703 -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/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/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/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/funnel.json +1 -0
- package/registry/gauge.json +1 -0
- package/registry/geo-map.json +1 -0
- package/registry/globe.json +1 -0
- package/registry/goal-progress.json +520 -0
- package/registry/heatmap.json +1 -0
- package/registry/index.json +163 -1
- package/registry/job-throughput.json +654 -0
- package/registry/latency-chart.json +671 -0
- package/registry/line-chart.json +1 -0
- package/registry/pie-chart.json +1 -0
- package/registry/price-ticker.json +684 -0
- package/registry/radar-chart.json +1 -0
- package/registry/sankey.json +1 -0
- package/registry/scatter-chart.json +1 -0
- package/registry/sparkline.json +1 -0
- package/registry/treemap.json +1 -0
- package/dist/chunk-DWJPPEMC.js.map +0 -1
- /package/dist/{chunk-EK3Z647J.js.map → chunk-4LBXEAGC.js.map} +0 -0
- /package/dist/{chunk-AHQXJSAQ.js.map → chunk-AA5EWWYV.js.map} +0 -0
- /package/dist/{chunk-VKO2OYYM.js.map → chunk-ARARFMNE.js.map} +0 -0
- /package/dist/{chunk-WBH2QU77.js.map → chunk-BV4DBGN7.js.map} +0 -0
- /package/dist/{chunk-BZ5CQFPH.js.map → chunk-C4MFZLJM.js.map} +0 -0
- /package/dist/{chunk-XAJ3KCC4.js.map → chunk-CSSZLFLO.js.map} +0 -0
- /package/dist/{chunk-UNK4MJVG.js.map → chunk-CVWSMUUB.js.map} +0 -0
- /package/dist/{chunk-DZB6HEVO.js.map → chunk-EQLC2QVN.js.map} +0 -0
- /package/dist/{chunk-PTSB3H5Q.js.map → chunk-I3D7KUGN.js.map} +0 -0
- /package/dist/{chunk-XC6BQ3RN.js.map → chunk-MXLITIGU.js.map} +0 -0
- /package/dist/{chunk-OER6ETT4.js.map → chunk-NCIQMRV3.js.map} +0 -0
- /package/dist/{chunk-WIRCIOLH.js.map → chunk-PBQV3B6O.js.map} +0 -0
- /package/dist/{chunk-I5QUZVU2.js.map → chunk-PWMMXRMC.js.map} +0 -0
- /package/dist/{chunk-7TIFCK5E.js.map → chunk-VKZZY2QD.js.map} +0 -0
- /package/dist/{chunk-VKTZD7UT.js.map → chunk-W5ILLSPK.js.map} +0 -0
- /package/dist/{chunk-XR4ZJDOV.js.map → chunk-WVTIKOII.js.map} +0 -0
- /package/dist/{chunk-7CSAGFBW.js.map → chunk-XDDALY4C.js.map} +0 -0
|
@@ -0,0 +1,703 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "earnings-chart",
|
|
3
|
+
"package": "@krizaka/charts",
|
|
4
|
+
"type": "chart",
|
|
5
|
+
"title": "Earnings chart",
|
|
6
|
+
"summary": "Earnings per period in money: the bars of the net amount, the total and the last period's change written above, the payout threshold as a line.",
|
|
7
|
+
"description": "Earnings per period in money: the bars of the net amount, the total and the last period's change written above, the payout threshold as a line.",
|
|
8
|
+
"status": "beta",
|
|
9
|
+
"category": "charts",
|
|
10
|
+
"platforms": "both",
|
|
11
|
+
"engine": "svg",
|
|
12
|
+
"tier": "ready-made",
|
|
13
|
+
"whenToUse": [
|
|
14
|
+
"A creator's earnings page: net earnings per month, with the minimum to withdraw (Orochia /earnings).",
|
|
15
|
+
"A treasury view: gross and net per month side by side (Orochia's console).",
|
|
16
|
+
"The earnings card of the mobile app: the total in large, the bars under it."
|
|
17
|
+
],
|
|
18
|
+
"whenNotToUse": [
|
|
19
|
+
{
|
|
20
|
+
"when": "A count that is not money (jobs, views).",
|
|
21
|
+
"use": "job-throughput"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"when": "A trend over many points (a year of days).",
|
|
25
|
+
"use": "line-chart"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"when": "One figure against a goal.",
|
|
29
|
+
"use": "goal-progress"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"bestPractices": [
|
|
33
|
+
"Pass the amounts in minor units (cents) as the ledger stores them, and the currency: the chart writes them.",
|
|
34
|
+
"Keep the periods in time order; the change compares the last two periods.",
|
|
35
|
+
"Say what the threshold means in its label (“Payout threshold”), never only its amount."
|
|
36
|
+
],
|
|
37
|
+
"accessibility": {
|
|
38
|
+
"keyboard": [
|
|
39
|
+
{
|
|
40
|
+
"keys": "Tab",
|
|
41
|
+
"action": "Moves the focus to the plot, then to the data and export buttons."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"keys": "Arrow keys",
|
|
45
|
+
"action": "Walk the periods one by one: each amount is announced."
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"notes": [
|
|
49
|
+
"The total and the change are written in words under the title; the arrow beside the change is decorative.",
|
|
50
|
+
"The plot is described by a summary written from the data and backed by a data table, as every chart of the package."
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"related": [
|
|
54
|
+
"bar-chart",
|
|
55
|
+
"goal-progress",
|
|
56
|
+
"sparkline"
|
|
57
|
+
],
|
|
58
|
+
"source": "packages/charts/src/meta/earnings-chart.ts",
|
|
59
|
+
"install": {
|
|
60
|
+
"web": "npm install @krizaka/charts",
|
|
61
|
+
"native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
|
|
62
|
+
},
|
|
63
|
+
"web": {
|
|
64
|
+
"entry": "@krizaka/charts/earnings",
|
|
65
|
+
"import": "import { EarningsChart } from \"@krizaka/charts/earnings\";",
|
|
66
|
+
"props": [
|
|
67
|
+
{
|
|
68
|
+
"component": "EarningsChart",
|
|
69
|
+
"description": "Earnings per period in money — the total, the change of the last period, the payout threshold.",
|
|
70
|
+
"props": [
|
|
71
|
+
{
|
|
72
|
+
"name": "currency",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"default": null,
|
|
75
|
+
"description": "The ISO 4217 currency (`\"USD\"`, `\"EUR\"`).",
|
|
76
|
+
"required": true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "data",
|
|
80
|
+
"type": "readonly T[]",
|
|
81
|
+
"default": null,
|
|
82
|
+
"description": "The rows, in the order of the x axis.",
|
|
83
|
+
"required": true
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "net",
|
|
87
|
+
"type": "string | ((datum: T, index: number) => number | null | undefined)",
|
|
88
|
+
"default": null,
|
|
89
|
+
"description": "The net amount of each period, in **minor units** (cents), as the ledger stores it.",
|
|
90
|
+
"required": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "title",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"default": null,
|
|
96
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
97
|
+
"required": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "brand",
|
|
101
|
+
"type": "BrandId",
|
|
102
|
+
"default": null,
|
|
103
|
+
"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`).",
|
|
104
|
+
"required": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "className",
|
|
108
|
+
"type": "string",
|
|
109
|
+
"default": null,
|
|
110
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
111
|
+
"required": false
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "dataTable",
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"default": null,
|
|
117
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
118
|
+
"required": false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "description",
|
|
122
|
+
"type": "ReactNode",
|
|
123
|
+
"default": null,
|
|
124
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
125
|
+
"required": false
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "empty",
|
|
129
|
+
"type": "ReactNode",
|
|
130
|
+
"default": null,
|
|
131
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
132
|
+
"required": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "error",
|
|
136
|
+
"type": "ReactNode",
|
|
137
|
+
"default": null,
|
|
138
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
139
|
+
"required": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "exportable",
|
|
143
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
144
|
+
"default": null,
|
|
145
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
146
|
+
"required": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "gross",
|
|
150
|
+
"type": "string | ((datum: T, index: number) => number | null)",
|
|
151
|
+
"default": null,
|
|
152
|
+
"description": "The gross amount (before fees), drawn beside the net when given.",
|
|
153
|
+
"required": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "height",
|
|
157
|
+
"type": "number",
|
|
158
|
+
"default": null,
|
|
159
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
160
|
+
"required": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "hideSummary",
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"default": null,
|
|
166
|
+
"description": "Hide the total and the change above the bars.",
|
|
167
|
+
"required": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "hideTitle",
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"default": null,
|
|
173
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
174
|
+
"required": false
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "id",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"default": null,
|
|
180
|
+
"description": "The id of the figure.",
|
|
181
|
+
"required": false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "labels",
|
|
185
|
+
"type": "Partial<EarningsLabels>",
|
|
186
|
+
"default": null,
|
|
187
|
+
"description": "The words, passed translated; English by default.",
|
|
188
|
+
"required": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "legend",
|
|
192
|
+
"type": "boolean",
|
|
193
|
+
"default": null,
|
|
194
|
+
"description": "Show the legend (from two series). Default true.",
|
|
195
|
+
"required": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "live",
|
|
199
|
+
"type": "boolean",
|
|
200
|
+
"default": null,
|
|
201
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
202
|
+
"required": false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "loading",
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"default": null,
|
|
208
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
209
|
+
"required": false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "locale",
|
|
213
|
+
"type": "Locale",
|
|
214
|
+
"default": null,
|
|
215
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
216
|
+
"required": false
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "markers",
|
|
220
|
+
"type": "readonly Marker[]",
|
|
221
|
+
"default": null,
|
|
222
|
+
"description": "Vertical markers at a category: a launch, an incident.",
|
|
223
|
+
"required": false
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "onSelect",
|
|
227
|
+
"type": "((datum: T, index: number) => void)",
|
|
228
|
+
"default": null,
|
|
229
|
+
"description": "Called with the row when a point or a bar is clicked (or Enter is pressed on it).",
|
|
230
|
+
"required": false
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "payoutThreshold",
|
|
234
|
+
"type": "Threshold",
|
|
235
|
+
"default": null,
|
|
236
|
+
"description": "The minimum to withdraw, drawn as a line: `{ value: 5000, label: \"Payout threshold\" }`.",
|
|
237
|
+
"required": false
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "period",
|
|
241
|
+
"type": "CategoryFormat",
|
|
242
|
+
"default": "month",
|
|
243
|
+
"description": "How the periods are written. Default `\"month\"` (`Apr 2026`).",
|
|
244
|
+
"required": false
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "style",
|
|
248
|
+
"type": "CSSProperties",
|
|
249
|
+
"default": null,
|
|
250
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
251
|
+
"required": false
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "summary",
|
|
255
|
+
"type": "\"hidden\" | \"visible\"",
|
|
256
|
+
"default": null,
|
|
257
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
258
|
+
"required": false
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "summaryText",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"default": null,
|
|
264
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
265
|
+
"required": false
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "x",
|
|
269
|
+
"type": "string | ((datum: T, index: number) => unknown)",
|
|
270
|
+
"default": "\"month\" as Accessor<T, unknown>",
|
|
271
|
+
"description": "The field (or function) of the period: an ISO month (`\"2026-04\"`), a day. Default `\"month\"`.",
|
|
272
|
+
"required": false
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "xLabel",
|
|
276
|
+
"type": "string",
|
|
277
|
+
"default": null,
|
|
278
|
+
"description": "The header of the categories in the data table (`Month`).",
|
|
279
|
+
"required": false
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "zero",
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"default": null,
|
|
285
|
+
"description": "Start the value axis at zero. Default: true for bars and areas; for lines, unless the values sit far from zero.",
|
|
286
|
+
"required": false
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"examples": [
|
|
292
|
+
{
|
|
293
|
+
"name": "creator-month",
|
|
294
|
+
"title": "A creator's months",
|
|
295
|
+
"description": "Six months of net earnings, the payout threshold, the change of the last month.",
|
|
296
|
+
"path": "examples/earnings-chart/creator-month.tsx",
|
|
297
|
+
"module": "@krizaka/charts/registry/examples/earnings-chart/creator-month",
|
|
298
|
+
"code": "import { EarningsChart } from \"@krizaka/charts/earnings\";\n\n// Net earnings in cents, as the ledger stores them (Orochia /earnings).\nconst months = [\n { month: \"2026-05\", net: 182_40 },\n { month: \"2026-06\", net: 245_10 },\n { month: \"2026-07\", net: 210_75 },\n { month: \"2026-08\", net: 398_20 },\n { month: \"2026-09\", net: 441_05 },\n { month: \"2026-10\", net: 512_90 },\n];\n\nexport default function CreatorMonth() {\n return (\n <EarningsChart\n title=\"Your earnings\"\n data={months}\n net=\"net\"\n currency=\"USD\"\n payoutThreshold={{ value: 50_00, label: \"Payout threshold\" }}\n labels={{ total: \"earned over {count} months\", change: \"{change} vs September\" }}\n />\n );\n}\n"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "gross-and-net",
|
|
302
|
+
"title": "Gross and net",
|
|
303
|
+
"description": "The treasury: gross and net per month side by side.",
|
|
304
|
+
"path": "examples/earnings-chart/gross-and-net.tsx",
|
|
305
|
+
"module": "@krizaka/charts/registry/examples/earnings-chart/gross-and-net",
|
|
306
|
+
"code": "import { EarningsChart } from \"@krizaka/charts/earnings\";\n\n// The platform's treasury: gross volume and creators' net, in cents.\nconst months = [\n { month: \"2026-07\", gross: 12_480_00, net: 10_608_00 },\n { month: \"2026-08\", gross: 15_920_00, net: 13_532_00 },\n { month: \"2026-09\", gross: 18_210_00, net: 15_478_50 },\n { month: \"2026-10\", gross: 21_045_00, net: 17_888_25 },\n];\n\nexport default function GrossAndNet() {\n return (\n <EarningsChart\n title=\"Creator earnings\"\n description=\"Gross volume and what creators keep after fees\"\n data={months}\n gross=\"gross\"\n net=\"net\"\n currency=\"USD\"\n labels={{ total: \"paid to creators over {count} months\", change: \"{change} vs last month\", gross: \"Gross volume\", net: \"Creators' net\" }}\n exportable={[\"csv\"]}\n />\n );\n}\n"
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
"native": {
|
|
311
|
+
"entry": "@krizaka/charts/native",
|
|
312
|
+
"import": "import { EarningsChart } from \"@krizaka/charts/native\";",
|
|
313
|
+
"differences": [
|
|
314
|
+
"The total and the change sit above the chart as a headline (the first thing a phone shows), not in the description.",
|
|
315
|
+
"No data table or export: swipe on the chart to hear each period."
|
|
316
|
+
],
|
|
317
|
+
"props": [
|
|
318
|
+
{
|
|
319
|
+
"component": "EarningsChart",
|
|
320
|
+
"description": "Earnings per period in money (React Native): the total and the change first, the bars under them.",
|
|
321
|
+
"props": [
|
|
322
|
+
{
|
|
323
|
+
"name": "currency",
|
|
324
|
+
"type": "string",
|
|
325
|
+
"default": null,
|
|
326
|
+
"description": "The ISO 4217 currency.",
|
|
327
|
+
"required": true
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "data",
|
|
331
|
+
"type": "readonly T[]",
|
|
332
|
+
"default": null,
|
|
333
|
+
"description": "The rows, in the order of the x axis.",
|
|
334
|
+
"required": true
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "net",
|
|
338
|
+
"type": "string | ((datum: T, index: number) => number | null | undefined)",
|
|
339
|
+
"default": null,
|
|
340
|
+
"description": "The net amount of each period, in minor units.",
|
|
341
|
+
"required": true
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "title",
|
|
345
|
+
"type": "string",
|
|
346
|
+
"default": null,
|
|
347
|
+
"description": "What the chart shows: its heading and accessible name.",
|
|
348
|
+
"required": true
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "brand",
|
|
352
|
+
"type": "BrandId",
|
|
353
|
+
"default": null,
|
|
354
|
+
"description": "The brand whose palette leads. Default Krizaka.",
|
|
355
|
+
"required": false
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "empty",
|
|
359
|
+
"type": "ReactNode",
|
|
360
|
+
"default": null,
|
|
361
|
+
"description": "Shown instead of the plot when there is nothing to draw. Default: the `empty` label.",
|
|
362
|
+
"required": false
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "gross",
|
|
366
|
+
"type": "string | ((datum: T, index: number) => number | null)",
|
|
367
|
+
"default": null,
|
|
368
|
+
"description": "The gross amount, drawn beside the net.",
|
|
369
|
+
"required": false
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "height",
|
|
373
|
+
"type": "number",
|
|
374
|
+
"default": null,
|
|
375
|
+
"description": "The plot's height.",
|
|
376
|
+
"required": false
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "hideTitle",
|
|
380
|
+
"type": "boolean",
|
|
381
|
+
"default": null,
|
|
382
|
+
"description": "Hide the heading (it stays the accessible name).",
|
|
383
|
+
"required": false
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "labels",
|
|
387
|
+
"type": "Partial<EarningsLabels>",
|
|
388
|
+
"default": null,
|
|
389
|
+
"description": "The words, passed translated.",
|
|
390
|
+
"required": false
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "loading",
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"default": null,
|
|
396
|
+
"description": "The data is on its way.",
|
|
397
|
+
"required": false
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "locale",
|
|
401
|
+
"type": "Locale",
|
|
402
|
+
"default": null,
|
|
403
|
+
"description": "The locale of every figure and date. Default `\"en-US\"`.",
|
|
404
|
+
"required": false
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "payoutThreshold",
|
|
408
|
+
"type": "Threshold",
|
|
409
|
+
"default": null,
|
|
410
|
+
"description": "The payout threshold, drawn as a line.",
|
|
411
|
+
"required": false
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "period",
|
|
415
|
+
"type": "CategoryFormat",
|
|
416
|
+
"default": "month",
|
|
417
|
+
"description": "How the periods are written. Default `\"month\"`.",
|
|
418
|
+
"required": false
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"name": "scheme",
|
|
422
|
+
"type": "Mode",
|
|
423
|
+
"default": null,
|
|
424
|
+
"description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
|
|
425
|
+
"required": false
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "style",
|
|
429
|
+
"type": "ViewStyle",
|
|
430
|
+
"default": null,
|
|
431
|
+
"description": "The style of the chart's container (layout only: colours come from the theme).",
|
|
432
|
+
"required": false
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "theme",
|
|
436
|
+
"type": "Partial<ChartTheme>",
|
|
437
|
+
"default": null,
|
|
438
|
+
"description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
|
|
439
|
+
"required": false
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "x",
|
|
443
|
+
"type": "string | ((datum: T, index: number) => unknown)",
|
|
444
|
+
"default": "\"month\" as Accessor<T, unknown>",
|
|
445
|
+
"description": "The field (or function) of the period. Default `\"month\"`.",
|
|
446
|
+
"required": false
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
"examples": [
|
|
452
|
+
{
|
|
453
|
+
"name": "creator-month",
|
|
454
|
+
"title": "A creator's months",
|
|
455
|
+
"description": "The mobile earnings card: the total first, the bars under it.",
|
|
456
|
+
"path": "examples/earnings-chart/native/creator-month.tsx",
|
|
457
|
+
"module": "@krizaka/charts/registry/examples/earnings-chart/native/creator-month",
|
|
458
|
+
"code": "import { EarningsChart } from \"@krizaka/charts/native\";\n\nconst months = [\n { month: \"2026-05\", net: 182_40 },\n { month: \"2026-06\", net: 245_10 },\n { month: \"2026-07\", net: 210_75 },\n { month: \"2026-08\", net: 398_20 },\n { month: \"2026-09\", net: 441_05 },\n { month: \"2026-10\", net: 512_90 },\n];\n\n// The earnings card of the app: the total first, the bars under it.\nexport default function NativeCreatorMonth() {\n return (\n <EarningsChart\n title=\"Your earnings\"\n data={months}\n net=\"net\"\n currency=\"USD\"\n height={160}\n labels={{ total: \"over {count} months\", change: \"{change} vs September\" }}\n />\n );\n}\n",
|
|
459
|
+
"screenshots": {
|
|
460
|
+
"dark": "examples/earnings-chart/native/creator-month.dark.png",
|
|
461
|
+
"light": "examples/earnings-chart/native/creator-month.light.png"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
"files": [],
|
|
467
|
+
"dependencies": [
|
|
468
|
+
"@krizaka/intl@workspace:^",
|
|
469
|
+
"d3-geo@^3.1.1",
|
|
470
|
+
"echarts@^6.1.0",
|
|
471
|
+
"topojson-client@^3.1.0"
|
|
472
|
+
],
|
|
473
|
+
"registryDependencies": [],
|
|
474
|
+
"demo": {
|
|
475
|
+
"path": "examples/earnings-chart/creator-month.tsx",
|
|
476
|
+
"content": "import { EarningsChart } from \"@krizaka/charts/earnings\";\n\n// Net earnings in cents, as the ledger stores them (Orochia /earnings).\nconst months = [\n { month: \"2026-05\", net: 182_40 },\n { month: \"2026-06\", net: 245_10 },\n { month: \"2026-07\", net: 210_75 },\n { month: \"2026-08\", net: 398_20 },\n { month: \"2026-09\", net: 441_05 },\n { month: \"2026-10\", net: 512_90 },\n];\n\nexport default function CreatorMonth() {\n return (\n <EarningsChart\n title=\"Your earnings\"\n data={months}\n net=\"net\"\n currency=\"USD\"\n payoutThreshold={{ value: 50_00, label: \"Payout threshold\" }}\n labels={{ total: \"earned over {count} months\", change: \"{change} vs September\" }}\n />\n );\n}\n"
|
|
477
|
+
},
|
|
478
|
+
"props": [
|
|
479
|
+
{
|
|
480
|
+
"component": "EarningsChart",
|
|
481
|
+
"description": "Earnings per period in money — the total, the change of the last period, the payout threshold.",
|
|
482
|
+
"props": [
|
|
483
|
+
{
|
|
484
|
+
"name": "currency",
|
|
485
|
+
"type": "string",
|
|
486
|
+
"default": null,
|
|
487
|
+
"description": "The ISO 4217 currency (`\"USD\"`, `\"EUR\"`).",
|
|
488
|
+
"required": true
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "data",
|
|
492
|
+
"type": "readonly T[]",
|
|
493
|
+
"default": null,
|
|
494
|
+
"description": "The rows, in the order of the x axis.",
|
|
495
|
+
"required": true
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "net",
|
|
499
|
+
"type": "string | ((datum: T, index: number) => number | null | undefined)",
|
|
500
|
+
"default": null,
|
|
501
|
+
"description": "The net amount of each period, in **minor units** (cents), as the ledger stores it.",
|
|
502
|
+
"required": true
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "title",
|
|
506
|
+
"type": "string",
|
|
507
|
+
"default": null,
|
|
508
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
509
|
+
"required": true
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "brand",
|
|
513
|
+
"type": "BrandId",
|
|
514
|
+
"default": null,
|
|
515
|
+
"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`).",
|
|
516
|
+
"required": false
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"name": "className",
|
|
520
|
+
"type": "string",
|
|
521
|
+
"default": null,
|
|
522
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
523
|
+
"required": false
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "dataTable",
|
|
527
|
+
"type": "boolean",
|
|
528
|
+
"default": null,
|
|
529
|
+
"description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
|
|
530
|
+
"required": false
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "description",
|
|
534
|
+
"type": "ReactNode",
|
|
535
|
+
"default": null,
|
|
536
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
537
|
+
"required": false
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "empty",
|
|
541
|
+
"type": "ReactNode",
|
|
542
|
+
"default": null,
|
|
543
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
544
|
+
"required": false
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "error",
|
|
548
|
+
"type": "ReactNode",
|
|
549
|
+
"default": null,
|
|
550
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
551
|
+
"required": false
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "exportable",
|
|
555
|
+
"type": "boolean | readonly ExportFormat[]",
|
|
556
|
+
"default": null,
|
|
557
|
+
"description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
|
|
558
|
+
"required": false
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "gross",
|
|
562
|
+
"type": "string | ((datum: T, index: number) => number | null)",
|
|
563
|
+
"default": null,
|
|
564
|
+
"description": "The gross amount (before fees), drawn beside the net when given.",
|
|
565
|
+
"required": false
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "height",
|
|
569
|
+
"type": "number",
|
|
570
|
+
"default": null,
|
|
571
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
572
|
+
"required": false
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "hideSummary",
|
|
576
|
+
"type": "boolean",
|
|
577
|
+
"default": null,
|
|
578
|
+
"description": "Hide the total and the change above the bars.",
|
|
579
|
+
"required": false
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"name": "hideTitle",
|
|
583
|
+
"type": "boolean",
|
|
584
|
+
"default": null,
|
|
585
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
586
|
+
"required": false
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "id",
|
|
590
|
+
"type": "string",
|
|
591
|
+
"default": null,
|
|
592
|
+
"description": "The id of the figure.",
|
|
593
|
+
"required": false
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"name": "labels",
|
|
597
|
+
"type": "Partial<EarningsLabels>",
|
|
598
|
+
"default": null,
|
|
599
|
+
"description": "The words, passed translated; English by default.",
|
|
600
|
+
"required": false
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "legend",
|
|
604
|
+
"type": "boolean",
|
|
605
|
+
"default": null,
|
|
606
|
+
"description": "Show the legend (from two series). Default true.",
|
|
607
|
+
"required": false
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "live",
|
|
611
|
+
"type": "boolean",
|
|
612
|
+
"default": null,
|
|
613
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
614
|
+
"required": false
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"name": "loading",
|
|
618
|
+
"type": "boolean",
|
|
619
|
+
"default": null,
|
|
620
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
621
|
+
"required": false
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"name": "locale",
|
|
625
|
+
"type": "Locale",
|
|
626
|
+
"default": null,
|
|
627
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
628
|
+
"required": false
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "markers",
|
|
632
|
+
"type": "readonly Marker[]",
|
|
633
|
+
"default": null,
|
|
634
|
+
"description": "Vertical markers at a category: a launch, an incident.",
|
|
635
|
+
"required": false
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "onSelect",
|
|
639
|
+
"type": "((datum: T, index: number) => void)",
|
|
640
|
+
"default": null,
|
|
641
|
+
"description": "Called with the row when a point or a bar is clicked (or Enter is pressed on it).",
|
|
642
|
+
"required": false
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"name": "payoutThreshold",
|
|
646
|
+
"type": "Threshold",
|
|
647
|
+
"default": null,
|
|
648
|
+
"description": "The minimum to withdraw, drawn as a line: `{ value: 5000, label: \"Payout threshold\" }`.",
|
|
649
|
+
"required": false
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "period",
|
|
653
|
+
"type": "CategoryFormat",
|
|
654
|
+
"default": "month",
|
|
655
|
+
"description": "How the periods are written. Default `\"month\"` (`Apr 2026`).",
|
|
656
|
+
"required": false
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "style",
|
|
660
|
+
"type": "CSSProperties",
|
|
661
|
+
"default": null,
|
|
662
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
663
|
+
"required": false
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"name": "summary",
|
|
667
|
+
"type": "\"hidden\" | \"visible\"",
|
|
668
|
+
"default": null,
|
|
669
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
670
|
+
"required": false
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"name": "summaryText",
|
|
674
|
+
"type": "string",
|
|
675
|
+
"default": null,
|
|
676
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
677
|
+
"required": false
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"name": "x",
|
|
681
|
+
"type": "string | ((datum: T, index: number) => unknown)",
|
|
682
|
+
"default": "\"month\" as Accessor<T, unknown>",
|
|
683
|
+
"description": "The field (or function) of the period: an ISO month (`\"2026-04\"`), a day. Default `\"month\"`.",
|
|
684
|
+
"required": false
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "xLabel",
|
|
688
|
+
"type": "string",
|
|
689
|
+
"default": null,
|
|
690
|
+
"description": "The header of the categories in the data table (`Month`).",
|
|
691
|
+
"required": false
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"name": "zero",
|
|
695
|
+
"type": "boolean",
|
|
696
|
+
"default": null,
|
|
697
|
+
"description": "Start the value axis at zero. Default: true for bars and areas; for lines, unless the values sit far from zero.",
|
|
698
|
+
"required": false
|
|
699
|
+
}
|
|
700
|
+
]
|
|
701
|
+
}
|
|
702
|
+
]
|
|
703
|
+
}
|