@krizaka/charts 0.1.0 → 0.2.1

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.
Files changed (193) hide show
  1. package/README.md +17 -5
  2. package/dist/bar.js +5 -4
  3. package/dist/candlestick.js +3 -3
  4. package/dist/chart.js +3 -3
  5. package/dist/{chunk-EK3Z647J.js → chunk-4LBXEAGC.js} +3 -3
  6. package/dist/{chunk-AHQXJSAQ.js → chunk-AA5EWWYV.js} +2 -2
  7. package/dist/{chunk-VKO2OYYM.js → chunk-ARARFMNE.js} +2 -2
  8. package/dist/{chunk-WBH2QU77.js → chunk-BV4DBGN7.js} +2 -2
  9. package/dist/{chunk-BZ5CQFPH.js → chunk-C4MFZLJM.js} +2 -2
  10. package/dist/{chunk-XAJ3KCC4.js → chunk-CSSZLFLO.js} +3 -3
  11. package/dist/{chunk-UNK4MJVG.js → chunk-CVWSMUUB.js} +8 -8
  12. package/dist/chunk-E5DKBSWX.js +2 -0
  13. package/dist/chunk-E5DKBSWX.js.map +1 -0
  14. package/dist/chunk-EEP7PS2L.js +54 -0
  15. package/dist/chunk-EEP7PS2L.js.map +1 -0
  16. package/dist/{chunk-DZB6HEVO.js → chunk-EQLC2QVN.js} +2 -2
  17. package/dist/chunk-FINOPIDN.js +2 -0
  18. package/dist/chunk-FINOPIDN.js.map +1 -0
  19. package/dist/chunk-G2KF2WL4.js +2 -0
  20. package/dist/chunk-G2KF2WL4.js.map +1 -0
  21. package/dist/{chunk-PTSB3H5Q.js → chunk-I3D7KUGN.js} +2 -2
  22. package/dist/chunk-IKQV3NSL.js +76 -0
  23. package/dist/chunk-IKQV3NSL.js.map +1 -0
  24. package/dist/{chunk-DWJPPEMC.js → chunk-JTKR7ZWP.js} +73 -60
  25. package/dist/chunk-JTKR7ZWP.js.map +1 -0
  26. package/dist/chunk-KNDHO67X.js +78 -0
  27. package/dist/chunk-KNDHO67X.js.map +1 -0
  28. package/dist/chunk-L2EKYWVI.js +94 -0
  29. package/dist/chunk-L2EKYWVI.js.map +1 -0
  30. package/dist/{chunk-XC6BQ3RN.js → chunk-MXLITIGU.js} +3 -3
  31. package/dist/{chunk-OER6ETT4.js → chunk-NCIQMRV3.js} +3 -3
  32. package/dist/chunk-OIRHLJBC.js +83 -0
  33. package/dist/chunk-OIRHLJBC.js.map +1 -0
  34. package/dist/{chunk-WIRCIOLH.js → chunk-PBQV3B6O.js} +5 -5
  35. package/dist/chunk-POQIHFAZ.js +2 -0
  36. package/dist/chunk-POQIHFAZ.js.map +1 -0
  37. package/dist/{chunk-I5QUZVU2.js → chunk-PWMMXRMC.js} +2 -2
  38. package/dist/chunk-SLEJDQ3A.js +81 -0
  39. package/dist/chunk-SLEJDQ3A.js.map +1 -0
  40. package/dist/{chunk-7TIFCK5E.js → chunk-VKZZY2QD.js} +3 -3
  41. package/dist/{chunk-VKTZD7UT.js → chunk-W5ILLSPK.js} +3 -3
  42. package/dist/chunk-WBHFVBSK.js +25 -0
  43. package/dist/chunk-WBHFVBSK.js.map +1 -0
  44. package/dist/chunk-WNUFGMS7.js +113 -0
  45. package/dist/chunk-WNUFGMS7.js.map +1 -0
  46. package/dist/{chunk-XR4ZJDOV.js → chunk-WVTIKOII.js} +2 -2
  47. package/dist/{chunk-7CSAGFBW.js → chunk-XDDALY4C.js} +3 -3
  48. package/dist/credits.d.ts +42 -0
  49. package/dist/credits.js +21 -0
  50. package/dist/credits.js.map +1 -0
  51. package/dist/earnings.d.ts +29 -0
  52. package/dist/earnings.js +22 -0
  53. package/dist/earnings.js.map +1 -0
  54. package/dist/funnel.js +3 -3
  55. package/dist/gauge.js +3 -2
  56. package/dist/geo.js +2 -2
  57. package/dist/globe.js +2 -2
  58. package/dist/goal.d.ts +26 -0
  59. package/dist/goal.js +17 -0
  60. package/dist/goal.js.map +1 -0
  61. package/dist/heatmap.js +3 -3
  62. package/dist/index.d.ts +7 -0
  63. package/dist/index.js +80 -33
  64. package/dist/labels-DE_743fQ.d.ts +72 -0
  65. package/dist/latency.d.ts +33 -0
  66. package/dist/latency.js +24 -0
  67. package/dist/latency.js.map +1 -0
  68. package/dist/line.js +5 -4
  69. package/dist/native.d.ts +195 -1
  70. package/dist/native.js +383 -14
  71. package/dist/native.js.map +1 -1
  72. package/dist/pie.js +3 -3
  73. package/dist/radar.js +3 -3
  74. package/dist/sankey.js +3 -3
  75. package/dist/scatter.js +3 -3
  76. package/dist/sparkline.js +4 -3
  77. package/dist/throughput.d.ts +37 -0
  78. package/dist/throughput.js +24 -0
  79. package/dist/throughput.js.map +1 -0
  80. package/dist/ticker.d.ts +38 -0
  81. package/dist/ticker.js +22 -0
  82. package/dist/ticker.js.map +1 -0
  83. package/dist/treemap.js +3 -3
  84. package/package.json +102 -6
  85. package/registry/area-chart.json +1 -0
  86. package/registry/bar-chart.json +1 -0
  87. package/registry/calendar-heatmap.json +1 -0
  88. package/registry/candlestick.json +1 -0
  89. package/registry/chart.json +1 -0
  90. package/registry/charts-provider.json +1 -0
  91. package/registry/credit-usage.json +473 -0
  92. package/registry/earnings-chart.json +703 -0
  93. package/registry/examples/credit-usage/monthly-credits.d.ts +4 -0
  94. package/registry/examples/credit-usage/monthly-credits.js +24 -0
  95. package/registry/examples/credit-usage/monthly-credits.tsx +19 -0
  96. package/registry/examples/credit-usage/native/monthly-credits.d.ts +4 -0
  97. package/registry/examples/credit-usage/native/monthly-credits.dark.png +0 -0
  98. package/registry/examples/credit-usage/native/monthly-credits.js +23 -0
  99. package/registry/examples/credit-usage/native/monthly-credits.light.png +0 -0
  100. package/registry/examples/credit-usage/native/monthly-credits.tsx +18 -0
  101. package/registry/examples/credit-usage/storage-plan.d.ts +4 -0
  102. package/registry/examples/credit-usage/storage-plan.js +21 -0
  103. package/registry/examples/credit-usage/storage-plan.tsx +15 -0
  104. package/registry/examples/earnings-chart/creator-month.d.ts +4 -0
  105. package/registry/examples/earnings-chart/creator-month.js +29 -0
  106. package/registry/examples/earnings-chart/creator-month.tsx +24 -0
  107. package/registry/examples/earnings-chart/gross-and-net.d.ts +4 -0
  108. package/registry/examples/earnings-chart/gross-and-net.js +29 -0
  109. package/registry/examples/earnings-chart/gross-and-net.tsx +24 -0
  110. package/registry/examples/earnings-chart/native/creator-month.d.ts +4 -0
  111. package/registry/examples/earnings-chart/native/creator-month.dark.png +0 -0
  112. package/registry/examples/earnings-chart/native/creator-month.js +29 -0
  113. package/registry/examples/earnings-chart/native/creator-month.light.png +0 -0
  114. package/registry/examples/earnings-chart/native/creator-month.tsx +24 -0
  115. package/registry/examples/goal-progress/challenge-pot.d.ts +4 -0
  116. package/registry/examples/goal-progress/challenge-pot.js +22 -0
  117. package/registry/examples/goal-progress/challenge-pot.tsx +16 -0
  118. package/registry/examples/goal-progress/goal-reached.d.ts +4 -0
  119. package/registry/examples/goal-progress/goal-reached.js +11 -0
  120. package/registry/examples/goal-progress/goal-reached.tsx +6 -0
  121. package/registry/examples/goal-progress/native/challenge-pot.d.ts +4 -0
  122. package/registry/examples/goal-progress/native/challenge-pot.dark.png +0 -0
  123. package/registry/examples/goal-progress/native/challenge-pot.js +11 -0
  124. package/registry/examples/goal-progress/native/challenge-pot.light.png +0 -0
  125. package/registry/examples/goal-progress/native/challenge-pot.tsx +6 -0
  126. package/registry/examples/job-throughput/live-hours.d.ts +4 -0
  127. package/registry/examples/job-throughput/live-hours.js +33 -0
  128. package/registry/examples/job-throughput/live-hours.tsx +28 -0
  129. package/registry/examples/job-throughput/native/week-of-jobs.d.ts +4 -0
  130. package/registry/examples/job-throughput/native/week-of-jobs.dark.png +0 -0
  131. package/registry/examples/job-throughput/native/week-of-jobs.js +20 -0
  132. package/registry/examples/job-throughput/native/week-of-jobs.light.png +0 -0
  133. package/registry/examples/job-throughput/native/week-of-jobs.tsx +16 -0
  134. package/registry/examples/job-throughput/week-of-jobs.d.ts +4 -0
  135. package/registry/examples/job-throughput/week-of-jobs.js +20 -0
  136. package/registry/examples/job-throughput/week-of-jobs.tsx +16 -0
  137. package/registry/examples/latency-chart/by-capability.d.ts +4 -0
  138. package/registry/examples/latency-chart/by-capability.js +26 -0
  139. package/registry/examples/latency-chart/by-capability.tsx +21 -0
  140. package/registry/examples/latency-chart/native/by-capability.d.ts +4 -0
  141. package/registry/examples/latency-chart/native/by-capability.dark.png +0 -0
  142. package/registry/examples/latency-chart/native/by-capability.js +17 -0
  143. package/registry/examples/latency-chart/native/by-capability.light.png +0 -0
  144. package/registry/examples/latency-chart/native/by-capability.tsx +13 -0
  145. package/registry/examples/latency-chart/time-to-result.d.ts +4 -0
  146. package/registry/examples/latency-chart/time-to-result.js +27 -0
  147. package/registry/examples/latency-chart/time-to-result.tsx +22 -0
  148. package/registry/examples/price-ticker/auction-room.d.ts +4 -0
  149. package/registry/examples/price-ticker/auction-room.js +21 -0
  150. package/registry/examples/price-ticker/auction-room.tsx +17 -0
  151. package/registry/examples/price-ticker/native/auction-room.d.ts +4 -0
  152. package/registry/examples/price-ticker/native/auction-room.dark.png +0 -0
  153. package/registry/examples/price-ticker/native/auction-room.js +19 -0
  154. package/registry/examples/price-ticker/native/auction-room.light.png +0 -0
  155. package/registry/examples/price-ticker/native/auction-room.tsx +15 -0
  156. package/registry/examples/price-ticker/no-bid-yet.d.ts +4 -0
  157. package/registry/examples/price-ticker/no-bid-yet.js +11 -0
  158. package/registry/examples/price-ticker/no-bid-yet.tsx +6 -0
  159. package/registry/funnel.json +1 -0
  160. package/registry/gauge.json +1 -0
  161. package/registry/geo-map.json +1 -0
  162. package/registry/globe.json +1 -0
  163. package/registry/goal-progress.json +520 -0
  164. package/registry/heatmap.json +1 -0
  165. package/registry/index.json +163 -1
  166. package/registry/job-throughput.json +654 -0
  167. package/registry/latency-chart.json +671 -0
  168. package/registry/line-chart.json +1 -0
  169. package/registry/pie-chart.json +1 -0
  170. package/registry/price-ticker.json +684 -0
  171. package/registry/radar-chart.json +1 -0
  172. package/registry/sankey.json +1 -0
  173. package/registry/scatter-chart.json +1 -0
  174. package/registry/sparkline.json +1 -0
  175. package/registry/treemap.json +1 -0
  176. package/dist/chunk-DWJPPEMC.js.map +0 -1
  177. /package/dist/{chunk-EK3Z647J.js.map → chunk-4LBXEAGC.js.map} +0 -0
  178. /package/dist/{chunk-AHQXJSAQ.js.map → chunk-AA5EWWYV.js.map} +0 -0
  179. /package/dist/{chunk-VKO2OYYM.js.map → chunk-ARARFMNE.js.map} +0 -0
  180. /package/dist/{chunk-WBH2QU77.js.map → chunk-BV4DBGN7.js.map} +0 -0
  181. /package/dist/{chunk-BZ5CQFPH.js.map → chunk-C4MFZLJM.js.map} +0 -0
  182. /package/dist/{chunk-XAJ3KCC4.js.map → chunk-CSSZLFLO.js.map} +0 -0
  183. /package/dist/{chunk-UNK4MJVG.js.map → chunk-CVWSMUUB.js.map} +0 -0
  184. /package/dist/{chunk-DZB6HEVO.js.map → chunk-EQLC2QVN.js.map} +0 -0
  185. /package/dist/{chunk-PTSB3H5Q.js.map → chunk-I3D7KUGN.js.map} +0 -0
  186. /package/dist/{chunk-XC6BQ3RN.js.map → chunk-MXLITIGU.js.map} +0 -0
  187. /package/dist/{chunk-OER6ETT4.js.map → chunk-NCIQMRV3.js.map} +0 -0
  188. /package/dist/{chunk-WIRCIOLH.js.map → chunk-PBQV3B6O.js.map} +0 -0
  189. /package/dist/{chunk-I5QUZVU2.js.map → chunk-PWMMXRMC.js.map} +0 -0
  190. /package/dist/{chunk-7TIFCK5E.js.map → chunk-VKZZY2QD.js.map} +0 -0
  191. /package/dist/{chunk-VKTZD7UT.js.map → chunk-W5ILLSPK.js.map} +0 -0
  192. /package/dist/{chunk-XR4ZJDOV.js.map → chunk-WVTIKOII.js.map} +0 -0
  193. /package/dist/{chunk-7CSAGFBW.js.map → chunk-XDDALY4C.js.map} +0 -0
@@ -0,0 +1,520 @@
1
+ {
2
+ "name": "goal-progress",
3
+ "package": "@krizaka/charts",
4
+ "type": "chart",
5
+ "title": "Goal progress",
6
+ "summary": "A pot towards its goal, in money: an arc that fills, “raised of $500” under the amount, the supporters and the time left.",
7
+ "description": "A pot towards its goal, in money: an arc that fills, “raised of $500” under the amount, the supporters and the time left.",
8
+ "status": "beta",
9
+ "category": "charts",
10
+ "platforms": "both",
11
+ "engine": "svg",
12
+ "tier": "ready-made",
13
+ "whenToUse": [
14
+ "An Orochia challenge with a goal: what fans pledged so far, on the web and in the app.",
15
+ "A crowdfunded request: the amount raised, the supporters, the deadline."
16
+ ],
17
+ "whenNotToUse": [
18
+ {
19
+ "when": "An allowance that runs out.",
20
+ "use": "credit-usage"
21
+ },
22
+ {
23
+ "when": "A value in a range that is not money raised.",
24
+ "use": "gauge"
25
+ }
26
+ ],
27
+ "bestPractices": [
28
+ "Pass amounts in minor units and the currency.",
29
+ "Write the time left with the app's countdown and pass it in `timeLeft`.",
30
+ "Past the goal the amount keeps counting and the arc stays full, in the success tone."
31
+ ],
32
+ "accessibility": {
33
+ "keyboard": [],
34
+ "notes": [
35
+ "The gauge is a `meter`: the amount and “raised of $500” are its value in words.",
36
+ "“Goal reached” is written, never only shown by a colour."
37
+ ]
38
+ },
39
+ "related": [
40
+ "gauge",
41
+ "credit-usage",
42
+ "price-ticker"
43
+ ],
44
+ "source": "packages/charts/src/meta/goal-progress.ts",
45
+ "install": {
46
+ "web": "npm install @krizaka/charts",
47
+ "native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
48
+ },
49
+ "web": {
50
+ "entry": "@krizaka/charts/goal",
51
+ "import": "import { GoalProgress } from \"@krizaka/charts/goal\";",
52
+ "props": [
53
+ {
54
+ "component": "GoalProgress",
55
+ "description": "A pot towards its goal, in money: the arc fills, the words say how much of what, and who chipped in.",
56
+ "props": [
57
+ {
58
+ "name": "currency",
59
+ "type": "string",
60
+ "default": null,
61
+ "description": "The ISO 4217 currency.",
62
+ "required": true
63
+ },
64
+ {
65
+ "name": "goal",
66
+ "type": "number",
67
+ "default": null,
68
+ "description": "The goal, in minor units.",
69
+ "required": true
70
+ },
71
+ {
72
+ "name": "raised",
73
+ "type": "number",
74
+ "default": null,
75
+ "description": "The amount raised, in **minor units** (cents).",
76
+ "required": true
77
+ },
78
+ {
79
+ "name": "title",
80
+ "type": "string",
81
+ "default": null,
82
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "brand",
87
+ "type": "BrandId",
88
+ "default": null,
89
+ "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`).",
90
+ "required": false
91
+ },
92
+ {
93
+ "name": "className",
94
+ "type": "string",
95
+ "default": null,
96
+ "description": "A class on the figure (layout: margins, grid placement).",
97
+ "required": false
98
+ },
99
+ {
100
+ "name": "description",
101
+ "type": "ReactNode",
102
+ "default": null,
103
+ "description": "A sentence under the title: the period, the unit, the source.",
104
+ "required": false
105
+ },
106
+ {
107
+ "name": "empty",
108
+ "type": "ReactNode",
109
+ "default": null,
110
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
111
+ "required": false
112
+ },
113
+ {
114
+ "name": "error",
115
+ "type": "ReactNode",
116
+ "default": null,
117
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
118
+ "required": false
119
+ },
120
+ {
121
+ "name": "height",
122
+ "type": "number",
123
+ "default": null,
124
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
125
+ "required": false
126
+ },
127
+ {
128
+ "name": "hideTitle",
129
+ "type": "boolean",
130
+ "default": null,
131
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
132
+ "required": false
133
+ },
134
+ {
135
+ "name": "id",
136
+ "type": "string",
137
+ "default": null,
138
+ "description": "The id of the figure.",
139
+ "required": false
140
+ },
141
+ {
142
+ "name": "labels",
143
+ "type": "Partial<GoalLabels>",
144
+ "default": null,
145
+ "description": "The words, passed translated; English by default.",
146
+ "required": false
147
+ },
148
+ {
149
+ "name": "live",
150
+ "type": "boolean",
151
+ "default": null,
152
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
153
+ "required": false
154
+ },
155
+ {
156
+ "name": "loading",
157
+ "type": "boolean",
158
+ "default": null,
159
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
160
+ "required": false
161
+ },
162
+ {
163
+ "name": "locale",
164
+ "type": "Locale",
165
+ "default": null,
166
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
167
+ "required": false
168
+ },
169
+ {
170
+ "name": "style",
171
+ "type": "CSSProperties",
172
+ "default": null,
173
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
174
+ "required": false
175
+ },
176
+ {
177
+ "name": "summary",
178
+ "type": "\"hidden\" | \"visible\"",
179
+ "default": null,
180
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
181
+ "required": false
182
+ },
183
+ {
184
+ "name": "summaryText",
185
+ "type": "string",
186
+ "default": null,
187
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
188
+ "required": false
189
+ },
190
+ {
191
+ "name": "supporters",
192
+ "type": "number",
193
+ "default": null,
194
+ "description": "How many people chipped in.",
195
+ "required": false
196
+ },
197
+ {
198
+ "name": "timeLeft",
199
+ "type": "ReactNode",
200
+ "default": null,
201
+ "description": "The time left, written by the app (a `Countdown`, “2 days”).",
202
+ "required": false
203
+ }
204
+ ]
205
+ }
206
+ ],
207
+ "examples": [
208
+ {
209
+ "name": "challenge-pot",
210
+ "title": "A challenge's pot",
211
+ "description": "An Orochia goal halfway there, its supporters and the time left.",
212
+ "path": "examples/goal-progress/challenge-pot.tsx",
213
+ "module": "@krizaka/charts/registry/examples/goal-progress/challenge-pot",
214
+ "code": "import { GoalProgress } from \"@krizaka/charts/goal\";\n\n// An Orochia challenge: fans pledge towards a goal, held in escrow until it is met.\nexport default function ChallengePot() {\n return (\n <GoalProgress\n title=\"Backflip on the beach\"\n raised={262_00}\n goal={500_00}\n currency=\"USD\"\n supporters={41}\n timeLeft=\"3 days\"\n height={200}\n />\n );\n}\n"
215
+ },
216
+ {
217
+ "name": "goal-reached",
218
+ "title": "Goal reached",
219
+ "description": "Past the goal: the success tone, the amount still counting.",
220
+ "path": "examples/goal-progress/goal-reached.tsx",
221
+ "module": "@krizaka/charts/registry/examples/goal-progress/goal-reached",
222
+ "code": "import { GoalProgress } from \"@krizaka/charts/goal\";\n\n// Past the goal: the arc stays full, the amount keeps counting, “Goal reached” is written.\nexport default function GoalReached() {\n return <GoalProgress title=\"Cover of the summer hit\" raised={1_180_00} goal={1_000_00} currency=\"EUR\" supporters={128} height={200} locale=\"fr-FR\" labels={{ raised: \"collectés sur {goal}\", reached: \"Objectif atteint\", supporters: \"{count} soutiens\" }} />;\n}\n"
223
+ }
224
+ ]
225
+ },
226
+ "native": {
227
+ "entry": "@krizaka/charts/native",
228
+ "import": "import { GoalProgress } from \"@krizaka/charts/native\";",
229
+ "differences": [
230
+ "`timeLeft` is a string (the app writes it); the facts are written under the gauge."
231
+ ],
232
+ "props": [
233
+ {
234
+ "component": "GoalProgress",
235
+ "description": "A pot towards its goal, in money (React Native): the arc fills, the words say how much of what.",
236
+ "props": [
237
+ {
238
+ "name": "currency",
239
+ "type": "string",
240
+ "default": null,
241
+ "description": "The ISO 4217 currency.",
242
+ "required": true
243
+ },
244
+ {
245
+ "name": "goal",
246
+ "type": "number",
247
+ "default": null,
248
+ "description": "The goal, in minor units.",
249
+ "required": true
250
+ },
251
+ {
252
+ "name": "raised",
253
+ "type": "number",
254
+ "default": null,
255
+ "description": "The amount raised, in minor units.",
256
+ "required": true
257
+ },
258
+ {
259
+ "name": "title",
260
+ "type": "string",
261
+ "default": null,
262
+ "description": "What the chart shows: its heading and accessible name.",
263
+ "required": true
264
+ },
265
+ {
266
+ "name": "brand",
267
+ "type": "BrandId",
268
+ "default": null,
269
+ "description": "The brand whose palette leads. Default Krizaka.",
270
+ "required": false
271
+ },
272
+ {
273
+ "name": "height",
274
+ "type": "number",
275
+ "default": null,
276
+ "description": "The plot's height.",
277
+ "required": false
278
+ },
279
+ {
280
+ "name": "hideTitle",
281
+ "type": "boolean",
282
+ "default": null,
283
+ "description": "Hide the heading (it stays the accessible name).",
284
+ "required": false
285
+ },
286
+ {
287
+ "name": "labels",
288
+ "type": "Partial<GoalLabels>",
289
+ "default": null,
290
+ "description": "The words, passed translated.",
291
+ "required": false
292
+ },
293
+ {
294
+ "name": "locale",
295
+ "type": "Locale",
296
+ "default": null,
297
+ "description": "The locale of every figure and date. Default `\"en-US\"`.",
298
+ "required": false
299
+ },
300
+ {
301
+ "name": "scheme",
302
+ "type": "Mode",
303
+ "default": null,
304
+ "description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
305
+ "required": false
306
+ },
307
+ {
308
+ "name": "style",
309
+ "type": "ViewStyle",
310
+ "default": null,
311
+ "description": "The style of the chart's container (layout only: colours come from the theme).",
312
+ "required": false
313
+ },
314
+ {
315
+ "name": "supporters",
316
+ "type": "number",
317
+ "default": null,
318
+ "description": "How many people chipped in.",
319
+ "required": false
320
+ },
321
+ {
322
+ "name": "theme",
323
+ "type": "Partial<ChartTheme>",
324
+ "default": null,
325
+ "description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
326
+ "required": false
327
+ },
328
+ {
329
+ "name": "timeLeft",
330
+ "type": "string",
331
+ "default": null,
332
+ "description": "The time left, written by the app (“2 days”).",
333
+ "required": false
334
+ }
335
+ ]
336
+ }
337
+ ],
338
+ "examples": [
339
+ {
340
+ "name": "challenge-pot",
341
+ "title": "A challenge's pot",
342
+ "description": "The challenge screen of the app.",
343
+ "path": "examples/goal-progress/native/challenge-pot.tsx",
344
+ "module": "@krizaka/charts/registry/examples/goal-progress/native/challenge-pot",
345
+ "code": "import { GoalProgress } from \"@krizaka/charts/native\";\n\n// The challenge screen of the app.\nexport default function NativeChallengePot() {\n return <GoalProgress title=\"Backflip on the beach\" raised={262_00} goal={500_00} currency=\"USD\" supporters={41} timeLeft=\"3 days\" height={180} />;\n}\n",
346
+ "screenshots": {
347
+ "dark": "examples/goal-progress/native/challenge-pot.dark.png",
348
+ "light": "examples/goal-progress/native/challenge-pot.light.png"
349
+ }
350
+ }
351
+ ]
352
+ },
353
+ "files": [],
354
+ "dependencies": [
355
+ "@krizaka/intl@workspace:^",
356
+ "d3-geo@^3.1.1",
357
+ "echarts@^6.1.0",
358
+ "topojson-client@^3.1.0"
359
+ ],
360
+ "registryDependencies": [],
361
+ "demo": {
362
+ "path": "examples/goal-progress/challenge-pot.tsx",
363
+ "content": "import { GoalProgress } from \"@krizaka/charts/goal\";\n\n// An Orochia challenge: fans pledge towards a goal, held in escrow until it is met.\nexport default function ChallengePot() {\n return (\n <GoalProgress\n title=\"Backflip on the beach\"\n raised={262_00}\n goal={500_00}\n currency=\"USD\"\n supporters={41}\n timeLeft=\"3 days\"\n height={200}\n />\n );\n}\n"
364
+ },
365
+ "props": [
366
+ {
367
+ "component": "GoalProgress",
368
+ "description": "A pot towards its goal, in money: the arc fills, the words say how much of what, and who chipped in.",
369
+ "props": [
370
+ {
371
+ "name": "currency",
372
+ "type": "string",
373
+ "default": null,
374
+ "description": "The ISO 4217 currency.",
375
+ "required": true
376
+ },
377
+ {
378
+ "name": "goal",
379
+ "type": "number",
380
+ "default": null,
381
+ "description": "The goal, in minor units.",
382
+ "required": true
383
+ },
384
+ {
385
+ "name": "raised",
386
+ "type": "number",
387
+ "default": null,
388
+ "description": "The amount raised, in **minor units** (cents).",
389
+ "required": true
390
+ },
391
+ {
392
+ "name": "title",
393
+ "type": "string",
394
+ "default": null,
395
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
396
+ "required": true
397
+ },
398
+ {
399
+ "name": "brand",
400
+ "type": "BrandId",
401
+ "default": null,
402
+ "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`).",
403
+ "required": false
404
+ },
405
+ {
406
+ "name": "className",
407
+ "type": "string",
408
+ "default": null,
409
+ "description": "A class on the figure (layout: margins, grid placement).",
410
+ "required": false
411
+ },
412
+ {
413
+ "name": "description",
414
+ "type": "ReactNode",
415
+ "default": null,
416
+ "description": "A sentence under the title: the period, the unit, the source.",
417
+ "required": false
418
+ },
419
+ {
420
+ "name": "empty",
421
+ "type": "ReactNode",
422
+ "default": null,
423
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
424
+ "required": false
425
+ },
426
+ {
427
+ "name": "error",
428
+ "type": "ReactNode",
429
+ "default": null,
430
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
431
+ "required": false
432
+ },
433
+ {
434
+ "name": "height",
435
+ "type": "number",
436
+ "default": null,
437
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
438
+ "required": false
439
+ },
440
+ {
441
+ "name": "hideTitle",
442
+ "type": "boolean",
443
+ "default": null,
444
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
445
+ "required": false
446
+ },
447
+ {
448
+ "name": "id",
449
+ "type": "string",
450
+ "default": null,
451
+ "description": "The id of the figure.",
452
+ "required": false
453
+ },
454
+ {
455
+ "name": "labels",
456
+ "type": "Partial<GoalLabels>",
457
+ "default": null,
458
+ "description": "The words, passed translated; English by default.",
459
+ "required": false
460
+ },
461
+ {
462
+ "name": "live",
463
+ "type": "boolean",
464
+ "default": null,
465
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
466
+ "required": false
467
+ },
468
+ {
469
+ "name": "loading",
470
+ "type": "boolean",
471
+ "default": null,
472
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
473
+ "required": false
474
+ },
475
+ {
476
+ "name": "locale",
477
+ "type": "Locale",
478
+ "default": null,
479
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
480
+ "required": false
481
+ },
482
+ {
483
+ "name": "style",
484
+ "type": "CSSProperties",
485
+ "default": null,
486
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
487
+ "required": false
488
+ },
489
+ {
490
+ "name": "summary",
491
+ "type": "\"hidden\" | \"visible\"",
492
+ "default": null,
493
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
494
+ "required": false
495
+ },
496
+ {
497
+ "name": "summaryText",
498
+ "type": "string",
499
+ "default": null,
500
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
501
+ "required": false
502
+ },
503
+ {
504
+ "name": "supporters",
505
+ "type": "number",
506
+ "default": null,
507
+ "description": "How many people chipped in.",
508
+ "required": false
509
+ },
510
+ {
511
+ "name": "timeLeft",
512
+ "type": "ReactNode",
513
+ "default": null,
514
+ "description": "The time left, written by the app (a `Countdown`, “2 days”).",
515
+ "required": false
516
+ }
517
+ ]
518
+ }
519
+ ]
520
+ }
@@ -9,6 +9,7 @@
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
11
  "engine": "echarts",
12
+ "tier": "advanced",
12
13
  "whenToUse": [
13
14
  "When something happens: uploads by weekday and hour, errors by service and day.",
14
15
  "A matrix of two categorical dimensions with a value in each cell."