@krizaka/charts 0.0.0-stage → 0.1.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.
Files changed (273) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +47 -2
  3. package/dist/bar.d.ts +17 -0
  4. package/dist/bar.js +16 -0
  5. package/dist/bar.js.map +1 -0
  6. package/dist/candlestick-IG626XL4.js +13 -0
  7. package/dist/candlestick-IG626XL4.js.map +1 -0
  8. package/dist/candlestick.d.ts +42 -0
  9. package/dist/candlestick.js +13 -0
  10. package/dist/candlestick.js.map +1 -0
  11. package/dist/canvas-4MSYDVFO.js +14 -0
  12. package/dist/canvas-4MSYDVFO.js.map +1 -0
  13. package/dist/cartesian-BRhNQ3ib.d.ts +34 -0
  14. package/dist/chart.d.ts +58 -0
  15. package/dist/chart.js +11 -0
  16. package/dist/chart.js.map +1 -0
  17. package/dist/chunk-3CJHBJXA.js +186 -0
  18. package/dist/chunk-3CJHBJXA.js.map +1 -0
  19. package/dist/chunk-6FINSUOS.js +49 -0
  20. package/dist/chunk-6FINSUOS.js.map +1 -0
  21. package/dist/chunk-7CSAGFBW.js +166 -0
  22. package/dist/chunk-7CSAGFBW.js.map +1 -0
  23. package/dist/chunk-7TIFCK5E.js +103 -0
  24. package/dist/chunk-7TIFCK5E.js.map +1 -0
  25. package/dist/chunk-AHQXJSAQ.js +38 -0
  26. package/dist/chunk-AHQXJSAQ.js.map +1 -0
  27. package/dist/chunk-ANUCSRUN.js +43 -0
  28. package/dist/chunk-ANUCSRUN.js.map +1 -0
  29. package/dist/chunk-BISL7DYW.js +66 -0
  30. package/dist/chunk-BISL7DYW.js.map +1 -0
  31. package/dist/chunk-BZ5CQFPH.js +19 -0
  32. package/dist/chunk-BZ5CQFPH.js.map +1 -0
  33. package/dist/chunk-DWJPPEMC.js +455 -0
  34. package/dist/chunk-DWJPPEMC.js.map +1 -0
  35. package/dist/chunk-DZB6HEVO.js +73 -0
  36. package/dist/chunk-DZB6HEVO.js.map +1 -0
  37. package/dist/chunk-EK3Z647J.js +133 -0
  38. package/dist/chunk-EK3Z647J.js.map +1 -0
  39. package/dist/chunk-I5QUZVU2.js +234 -0
  40. package/dist/chunk-I5QUZVU2.js.map +1 -0
  41. package/dist/chunk-OB5EFDDH.js +118 -0
  42. package/dist/chunk-OB5EFDDH.js.map +1 -0
  43. package/dist/chunk-OER6ETT4.js +155 -0
  44. package/dist/chunk-OER6ETT4.js.map +1 -0
  45. package/dist/chunk-PTSB3H5Q.js +205 -0
  46. package/dist/chunk-PTSB3H5Q.js.map +1 -0
  47. package/dist/chunk-TPJDOB7R.js +15 -0
  48. package/dist/chunk-TPJDOB7R.js.map +1 -0
  49. package/dist/chunk-UNK4MJVG.js +378 -0
  50. package/dist/chunk-UNK4MJVG.js.map +1 -0
  51. package/dist/chunk-VKO2OYYM.js +88 -0
  52. package/dist/chunk-VKO2OYYM.js.map +1 -0
  53. package/dist/chunk-VKTZD7UT.js +107 -0
  54. package/dist/chunk-VKTZD7UT.js.map +1 -0
  55. package/dist/chunk-W5FX4TU3.js +102 -0
  56. package/dist/chunk-W5FX4TU3.js.map +1 -0
  57. package/dist/chunk-WBH2QU77.js +178 -0
  58. package/dist/chunk-WBH2QU77.js.map +1 -0
  59. package/dist/chunk-WIRCIOLH.js +145 -0
  60. package/dist/chunk-WIRCIOLH.js.map +1 -0
  61. package/dist/chunk-XAJ3KCC4.js +116 -0
  62. package/dist/chunk-XAJ3KCC4.js.map +1 -0
  63. package/dist/chunk-XC6BQ3RN.js +92 -0
  64. package/dist/chunk-XC6BQ3RN.js.map +1 -0
  65. package/dist/chunk-XLLYNNC6.js +89 -0
  66. package/dist/chunk-XLLYNNC6.js.map +1 -0
  67. package/dist/chunk-XR4ZJDOV.js +15 -0
  68. package/dist/chunk-XR4ZJDOV.js.map +1 -0
  69. package/dist/context-BgYUymEO.d.ts +163 -0
  70. package/dist/frame-I7_xYGy5.d.ts +45 -0
  71. package/dist/full-S2MBPEEP.js +11 -0
  72. package/dist/full-S2MBPEEP.js.map +1 -0
  73. package/dist/funnel-QU5ZPC52.js +13 -0
  74. package/dist/funnel-QU5ZPC52.js.map +1 -0
  75. package/dist/funnel.d.ts +26 -0
  76. package/dist/funnel.js +13 -0
  77. package/dist/funnel.js.map +1 -0
  78. package/dist/gauge.d.ts +38 -0
  79. package/dist/gauge.js +12 -0
  80. package/dist/gauge.js.map +1 -0
  81. package/dist/geo.d.ts +37 -0
  82. package/dist/geo.js +13 -0
  83. package/dist/geo.js.map +1 -0
  84. package/dist/globe.d.ts +36 -0
  85. package/dist/globe.js +12 -0
  86. package/dist/globe.js.map +1 -0
  87. package/dist/heatmap-JWQOKUGM.js +13 -0
  88. package/dist/heatmap-JWQOKUGM.js.map +1 -0
  89. package/dist/heatmap.d.ts +47 -0
  90. package/dist/heatmap.js +15 -0
  91. package/dist/heatmap.js.map +1 -0
  92. package/dist/host-_F8RgiIz.d.ts +15 -0
  93. package/dist/index.d.ts +22 -0
  94. package/dist/index.js +101 -0
  95. package/dist/index.js.map +1 -0
  96. package/dist/line.d.ts +25 -0
  97. package/dist/line.js +18 -0
  98. package/dist/line.js.map +1 -0
  99. package/dist/native.d.ts +300 -0
  100. package/dist/native.js +875 -0
  101. package/dist/native.js.map +1 -0
  102. package/dist/pie.d.ts +37 -0
  103. package/dist/pie.js +16 -0
  104. package/dist/pie.js.map +1 -0
  105. package/dist/provider.d.ts +73 -0
  106. package/dist/provider.js +24 -0
  107. package/dist/provider.js.map +1 -0
  108. package/dist/radar-75GRJ2IK.js +13 -0
  109. package/dist/radar-75GRJ2IK.js.map +1 -0
  110. package/dist/radar.d.ts +22 -0
  111. package/dist/radar.js +13 -0
  112. package/dist/radar.js.map +1 -0
  113. package/dist/sankey-XQTX2EG6.js +13 -0
  114. package/dist/sankey-XQTX2EG6.js.map +1 -0
  115. package/dist/sankey.d.ts +28 -0
  116. package/dist/sankey.js +13 -0
  117. package/dist/sankey.js.map +1 -0
  118. package/dist/scatter-XSNG4OKD.js +13 -0
  119. package/dist/scatter-XSNG4OKD.js.map +1 -0
  120. package/dist/scatter.d.ts +41 -0
  121. package/dist/scatter.js +15 -0
  122. package/dist/scatter.js.map +1 -0
  123. package/dist/sparkline.d.ts +26 -0
  124. package/dist/sparkline.js +15 -0
  125. package/dist/sparkline.js.map +1 -0
  126. package/dist/svg-BJUHYX3B.js +14 -0
  127. package/dist/svg-BJUHYX3B.js.map +1 -0
  128. package/dist/treemap-OMGGGB5U.js +13 -0
  129. package/dist/treemap-OMGGGB5U.js.map +1 -0
  130. package/dist/treemap.d.ts +24 -0
  131. package/dist/treemap.js +14 -0
  132. package/dist/treemap.js.map +1 -0
  133. package/dist/world-110m-DVFWXS42.js +18 -0
  134. package/dist/world-110m-DVFWXS42.js.map +1 -0
  135. package/package.json +518 -3
  136. package/registry/area-chart.json +784 -0
  137. package/registry/bar-chart.json +783 -0
  138. package/registry/calendar-heatmap.json +459 -0
  139. package/registry/candlestick.json +552 -0
  140. package/registry/chart.json +440 -0
  141. package/registry/charts-provider.json +190 -0
  142. package/registry/examples/area-chart/credits-usage.d.ts +4 -0
  143. package/registry/examples/area-chart/credits-usage.js +38 -0
  144. package/registry/examples/area-chart/credits-usage.tsx +32 -0
  145. package/registry/examples/area-chart/native/credits-usage.d.ts +4 -0
  146. package/registry/examples/area-chart/native/credits-usage.dark.png +0 -0
  147. package/registry/examples/area-chart/native/credits-usage.js +33 -0
  148. package/registry/examples/area-chart/native/credits-usage.light.png +0 -0
  149. package/registry/examples/area-chart/native/credits-usage.tsx +27 -0
  150. package/registry/examples/area-chart/storage.d.ts +4 -0
  151. package/registry/examples/area-chart/storage.js +27 -0
  152. package/registry/examples/area-chart/storage.tsx +21 -0
  153. package/registry/examples/bar-chart/jobs-by-status.d.ts +4 -0
  154. package/registry/examples/bar-chart/jobs-by-status.js +37 -0
  155. package/registry/examples/bar-chart/jobs-by-status.tsx +31 -0
  156. package/registry/examples/bar-chart/native/jobs-by-status.d.ts +4 -0
  157. package/registry/examples/bar-chart/native/jobs-by-status.dark.png +0 -0
  158. package/registry/examples/bar-chart/native/jobs-by-status.js +32 -0
  159. package/registry/examples/bar-chart/native/jobs-by-status.light.png +0 -0
  160. package/registry/examples/bar-chart/native/jobs-by-status.tsx +26 -0
  161. package/registry/examples/bar-chart/plans-by-quarter.d.ts +4 -0
  162. package/registry/examples/bar-chart/plans-by-quarter.js +31 -0
  163. package/registry/examples/bar-chart/plans-by-quarter.tsx +26 -0
  164. package/registry/examples/bar-chart/top-supporters.d.ts +4 -0
  165. package/registry/examples/bar-chart/top-supporters.js +32 -0
  166. package/registry/examples/bar-chart/top-supporters.tsx +27 -0
  167. package/registry/examples/calendar-heatmap/publishing.d.ts +4 -0
  168. package/registry/examples/calendar-heatmap/publishing.js +28 -0
  169. package/registry/examples/calendar-heatmap/publishing.tsx +23 -0
  170. package/registry/examples/candlestick/auction-bids.d.ts +4 -0
  171. package/registry/examples/candlestick/auction-bids.js +37 -0
  172. package/registry/examples/candlestick/auction-bids.tsx +32 -0
  173. package/registry/examples/chart/polar-uploads.d.ts +4 -0
  174. package/registry/examples/chart/polar-uploads.js +34 -0
  175. package/registry/examples/chart/polar-uploads.tsx +30 -0
  176. package/registry/examples/charts-provider/french-orazaka.d.ts +4 -0
  177. package/registry/examples/charts-provider/french-orazaka.js +26 -0
  178. package/registry/examples/charts-provider/french-orazaka.tsx +22 -0
  179. package/registry/examples/charts-provider/native/french-orazaka.d.ts +4 -0
  180. package/registry/examples/charts-provider/native/french-orazaka.dark.png +0 -0
  181. package/registry/examples/charts-provider/native/french-orazaka.js +17 -0
  182. package/registry/examples/charts-provider/native/french-orazaka.light.png +0 -0
  183. package/registry/examples/charts-provider/native/french-orazaka.tsx +17 -0
  184. package/registry/examples/funnel/signup.d.ts +4 -0
  185. package/registry/examples/funnel/signup.js +30 -0
  186. package/registry/examples/funnel/signup.tsx +24 -0
  187. package/registry/examples/gauge/challenge-goal.d.ts +4 -0
  188. package/registry/examples/gauge/challenge-goal.js +24 -0
  189. package/registry/examples/gauge/challenge-goal.tsx +18 -0
  190. package/registry/examples/gauge/credits-quota.d.ts +4 -0
  191. package/registry/examples/gauge/credits-quota.js +26 -0
  192. package/registry/examples/gauge/credits-quota.tsx +19 -0
  193. package/registry/examples/gauge/native/credits-quota.d.ts +4 -0
  194. package/registry/examples/gauge/native/credits-quota.dark.png +0 -0
  195. package/registry/examples/gauge/native/credits-quota.js +25 -0
  196. package/registry/examples/gauge/native/credits-quota.light.png +0 -0
  197. package/registry/examples/gauge/native/credits-quota.tsx +18 -0
  198. package/registry/examples/geo-map/viewers.d.ts +4 -0
  199. package/registry/examples/geo-map/viewers.js +43 -0
  200. package/registry/examples/geo-map/viewers.tsx +29 -0
  201. package/registry/examples/globe/deployment-regions.d.ts +4 -0
  202. package/registry/examples/globe/deployment-regions.js +36 -0
  203. package/registry/examples/globe/deployment-regions.tsx +30 -0
  204. package/registry/examples/heatmap/upload-activity.d.ts +4 -0
  205. package/registry/examples/heatmap/upload-activity.js +30 -0
  206. package/registry/examples/heatmap/upload-activity.tsx +25 -0
  207. package/registry/examples/line-chart/creator-earnings.d.ts +4 -0
  208. package/registry/examples/line-chart/creator-earnings.js +35 -0
  209. package/registry/examples/line-chart/creator-earnings.tsx +30 -0
  210. package/registry/examples/line-chart/forecast.d.ts +4 -0
  211. package/registry/examples/line-chart/forecast.js +36 -0
  212. package/registry/examples/line-chart/forecast.tsx +30 -0
  213. package/registry/examples/line-chart/live-jobs.d.ts +4 -0
  214. package/registry/examples/line-chart/live-jobs.js +21 -0
  215. package/registry/examples/line-chart/live-jobs.tsx +23 -0
  216. package/registry/examples/line-chart/native/creator-earnings.d.ts +4 -0
  217. package/registry/examples/line-chart/native/creator-earnings.dark.png +0 -0
  218. package/registry/examples/line-chart/native/creator-earnings.js +32 -0
  219. package/registry/examples/line-chart/native/creator-earnings.light.png +0 -0
  220. package/registry/examples/line-chart/native/creator-earnings.tsx +26 -0
  221. package/registry/examples/line-chart/states.d.ts +4 -0
  222. package/registry/examples/line-chart/states.js +16 -0
  223. package/registry/examples/line-chart/states.tsx +13 -0
  224. package/registry/examples/pie-chart/credit-spend.d.ts +4 -0
  225. package/registry/examples/pie-chart/credit-spend.js +30 -0
  226. package/registry/examples/pie-chart/credit-spend.tsx +24 -0
  227. package/registry/examples/pie-chart/native/credit-spend.d.ts +4 -0
  228. package/registry/examples/pie-chart/native/credit-spend.dark.png +0 -0
  229. package/registry/examples/pie-chart/native/credit-spend.js +17 -0
  230. package/registry/examples/pie-chart/native/credit-spend.light.png +0 -0
  231. package/registry/examples/pie-chart/native/credit-spend.tsx +12 -0
  232. package/registry/examples/pie-chart/storage-by-kind.d.ts +4 -0
  233. package/registry/examples/pie-chart/storage-by-kind.js +31 -0
  234. package/registry/examples/pie-chart/storage-by-kind.tsx +26 -0
  235. package/registry/examples/radar-chart/model-comparison.d.ts +4 -0
  236. package/registry/examples/radar-chart/model-comparison.js +33 -0
  237. package/registry/examples/radar-chart/model-comparison.tsx +28 -0
  238. package/registry/examples/sankey/credit-flow.d.ts +4 -0
  239. package/registry/examples/sankey/credit-flow.js +37 -0
  240. package/registry/examples/sankey/credit-flow.tsx +32 -0
  241. package/registry/examples/scatter-chart/watch-time.d.ts +4 -0
  242. package/registry/examples/scatter-chart/watch-time.js +36 -0
  243. package/registry/examples/scatter-chart/watch-time.tsx +31 -0
  244. package/registry/examples/sparkline/bars.d.ts +4 -0
  245. package/registry/examples/sparkline/bars.js +12 -0
  246. package/registry/examples/sparkline/bars.tsx +7 -0
  247. package/registry/examples/sparkline/native/stat-trend.d.ts +4 -0
  248. package/registry/examples/sparkline/native/stat-trend.dark.png +0 -0
  249. package/registry/examples/sparkline/native/stat-trend.js +12 -0
  250. package/registry/examples/sparkline/native/stat-trend.light.png +0 -0
  251. package/registry/examples/sparkline/native/stat-trend.tsx +7 -0
  252. package/registry/examples/sparkline/stat-trend.d.ts +4 -0
  253. package/registry/examples/sparkline/stat-trend.js +18 -0
  254. package/registry/examples/sparkline/stat-trend.tsx +15 -0
  255. package/registry/examples/sparkline/table-rows.d.ts +4 -0
  256. package/registry/examples/sparkline/table-rows.js +23 -0
  257. package/registry/examples/sparkline/table-rows.tsx +26 -0
  258. package/registry/examples/treemap/storage.d.ts +4 -0
  259. package/registry/examples/treemap/storage.js +17 -0
  260. package/registry/examples/treemap/storage.tsx +13 -0
  261. package/registry/funnel.json +486 -0
  262. package/registry/gauge.json +599 -0
  263. package/registry/geo-map.json +483 -0
  264. package/registry/globe.json +468 -0
  265. package/registry/heatmap.json +530 -0
  266. package/registry/index.json +420 -0
  267. package/registry/line-chart.json +792 -0
  268. package/registry/pie-chart.json +1287 -0
  269. package/registry/radar-chart.json +458 -0
  270. package/registry/sankey.json +502 -0
  271. package/registry/scatter-chart.json +558 -0
  272. package/registry/sparkline.json +562 -0
  273. package/registry/treemap.json +431 -0
@@ -0,0 +1,599 @@
1
+ {
2
+ "name": "gauge",
3
+ "package": "@krizaka/charts",
4
+ "type": "chart",
5
+ "title": "Gauge",
6
+ "summary": "One value against its range on a 240° arc: zones that change its tone, a target tick, the value written in the middle.",
7
+ "description": "One value against its range on a 240° arc: zones that change its tone, a target tick, the value written in the middle.",
8
+ "status": "beta",
9
+ "category": "charts",
10
+ "platforms": "both",
11
+ "engine": "svg",
12
+ "whenToUse": [
13
+ "A quota: credits used of a plan, with a warning zone before the limit.",
14
+ "Progress towards a goal with a target: a challenge's escrow against its objective.",
15
+ "A load or a score that has a known range."
16
+ ],
17
+ "whenNotToUse": [
18
+ {
19
+ "when": "Several values side by side (a gauge per item takes room and compares badly).",
20
+ "use": "bar-chart"
21
+ },
22
+ {
23
+ "when": "A value without a meaningful range.",
24
+ "use": "sparkline"
25
+ }
26
+ ],
27
+ "bestPractices": [
28
+ "Say the range in `caption` (“of 50,000 credits”): the arc alone is not a number.",
29
+ "Give zones their meaning in `label` (“Over quota”): it is read in the summary.",
30
+ "Use one gauge per screen at most; a row of figures reads better as stats."
31
+ ],
32
+ "accessibility": {
33
+ "keyboard": [],
34
+ "notes": [
35
+ "The gauge is a `meter`: its name is the title, its value, range and text (value and caption) are exposed.",
36
+ "The zone's tone is never the only signal: its label is in the summary.",
37
+ "The arc fills once, when the gauge comes on screen, and never under reduced motion."
38
+ ]
39
+ },
40
+ "related": [
41
+ "pie-chart",
42
+ "sparkline",
43
+ "bar-chart"
44
+ ],
45
+ "source": "packages/charts/src/meta/gauge.ts",
46
+ "install": {
47
+ "web": "npm install @krizaka/charts",
48
+ "native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
49
+ },
50
+ "web": {
51
+ "entry": "@krizaka/charts/gauge",
52
+ "import": "import { Gauge } from \"@krizaka/charts/gauge\";",
53
+ "props": [
54
+ {
55
+ "component": "Gauge",
56
+ "description": "One figure against its range — credits used of a plan, a challenge's progress, a load.",
57
+ "props": [
58
+ {
59
+ "name": "title",
60
+ "type": "string",
61
+ "default": null,
62
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
63
+ "required": true
64
+ },
65
+ {
66
+ "name": "value",
67
+ "type": "number",
68
+ "default": null,
69
+ "description": "The value.",
70
+ "required": true
71
+ },
72
+ {
73
+ "name": "brand",
74
+ "type": "BrandId",
75
+ "default": null,
76
+ "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`).",
77
+ "required": false
78
+ },
79
+ {
80
+ "name": "caption",
81
+ "type": "string",
82
+ "default": null,
83
+ "description": "The words under the value (“of 50 000 credits”).",
84
+ "required": false
85
+ },
86
+ {
87
+ "name": "className",
88
+ "type": "string",
89
+ "default": null,
90
+ "description": "A class on the figure (layout: margins, grid placement).",
91
+ "required": false
92
+ },
93
+ {
94
+ "name": "description",
95
+ "type": "ReactNode",
96
+ "default": null,
97
+ "description": "A sentence under the title: the period, the unit, the source.",
98
+ "required": false
99
+ },
100
+ {
101
+ "name": "empty",
102
+ "type": "ReactNode",
103
+ "default": null,
104
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
105
+ "required": false
106
+ },
107
+ {
108
+ "name": "error",
109
+ "type": "ReactNode",
110
+ "default": null,
111
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
112
+ "required": false
113
+ },
114
+ {
115
+ "name": "format",
116
+ "type": "ValueFormat",
117
+ "default": null,
118
+ "description": "How the value and the range are written.",
119
+ "required": false
120
+ },
121
+ {
122
+ "name": "height",
123
+ "type": "number",
124
+ "default": null,
125
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
126
+ "required": false
127
+ },
128
+ {
129
+ "name": "hideTitle",
130
+ "type": "boolean",
131
+ "default": null,
132
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
133
+ "required": false
134
+ },
135
+ {
136
+ "name": "id",
137
+ "type": "string",
138
+ "default": null,
139
+ "description": "The id of the figure.",
140
+ "required": false
141
+ },
142
+ {
143
+ "name": "labels",
144
+ "type": "ChartLabelsInput",
145
+ "default": null,
146
+ "description": "The words, translated: the buttons, the states, the written summary.",
147
+ "required": false
148
+ },
149
+ {
150
+ "name": "live",
151
+ "type": "boolean",
152
+ "default": null,
153
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
154
+ "required": false
155
+ },
156
+ {
157
+ "name": "loading",
158
+ "type": "boolean",
159
+ "default": null,
160
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
161
+ "required": false
162
+ },
163
+ {
164
+ "name": "locale",
165
+ "type": "Locale",
166
+ "default": null,
167
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
168
+ "required": false
169
+ },
170
+ {
171
+ "name": "max",
172
+ "type": "number",
173
+ "default": null,
174
+ "description": "The end of the range. Default 100.",
175
+ "required": false
176
+ },
177
+ {
178
+ "name": "min",
179
+ "type": "number",
180
+ "default": null,
181
+ "description": "The start of the range. Default 0.",
182
+ "required": false
183
+ },
184
+ {
185
+ "name": "style",
186
+ "type": "CSSProperties",
187
+ "default": null,
188
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
189
+ "required": false
190
+ },
191
+ {
192
+ "name": "summary",
193
+ "type": "\"hidden\" | \"visible\"",
194
+ "default": null,
195
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
196
+ "required": false
197
+ },
198
+ {
199
+ "name": "summaryText",
200
+ "type": "string",
201
+ "default": null,
202
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
203
+ "required": false
204
+ },
205
+ {
206
+ "name": "target",
207
+ "type": "Threshold",
208
+ "default": null,
209
+ "description": "A tick on the arc: the objective.",
210
+ "required": false
211
+ },
212
+ {
213
+ "name": "tone",
214
+ "type": "Tone",
215
+ "default": null,
216
+ "description": "The tone of the value without zones. Default `\"accent\"`.",
217
+ "required": false
218
+ },
219
+ {
220
+ "name": "zones",
221
+ "type": "readonly GaugeZone[]",
222
+ "default": null,
223
+ "description": "Coloured zones along the arc: the value takes the tone of the zone it is in.",
224
+ "required": false
225
+ }
226
+ ]
227
+ }
228
+ ],
229
+ "examples": [
230
+ {
231
+ "name": "credits-quota",
232
+ "title": "Quota",
233
+ "description": "Credits used of a plan: green, then warning past 80 %, danger past the plan.",
234
+ "path": "examples/gauge/credits-quota.tsx",
235
+ "module": "@krizaka/charts/registry/examples/gauge/credits-quota",
236
+ "code": "import { Gauge } from \"@krizaka/charts/gauge\";\n\nexport default function CreditsQuota() {\n return (\n <Gauge\n title=\"Credits used this month\"\n value={41_250}\n max={50_000}\n format=\"compact\"\n caption=\"of 50K credits\"\n zones={[\n { to: 40_000, tone: \"success\", label: \"Within plan\" },\n { to: 47_500, tone: \"warning\", label: \"Nearing the limit\" },\n { to: 50_000, tone: \"danger\", label: \"At the limit\" },\n ]}\n style={{ maxWidth: 320 }}\n />\n );\n}\n"
237
+ },
238
+ {
239
+ "name": "challenge-goal",
240
+ "title": "Goal",
241
+ "description": "A challenge's escrowed amount against its objective, a target tick on the arc.",
242
+ "path": "examples/gauge/challenge-goal.tsx",
243
+ "module": "@krizaka/charts/registry/examples/gauge/challenge-goal",
244
+ "code": "import { Gauge } from \"@krizaka/charts/gauge\";\n\n// A challenge's escrow, in cents, against its objective.\nexport default function ChallengeGoal() {\n return (\n <Gauge\n title=\"“Shoot the sunrise from the Mont-Royal”\"\n description=\"Challenge in escrow · 6 days left\"\n value={186_000}\n max={300_000}\n format={{ style: \"money\", currency: \"CAD\" }}\n caption=\"raised\"\n target={{ value: 250_000, label: \"Objective\" }}\n tone=\"accent\"\n style={{ maxWidth: 320 }}\n />\n );\n}\n"
245
+ }
246
+ ]
247
+ },
248
+ "native": {
249
+ "entry": "@krizaka/charts/native",
250
+ "import": "import { Gauge } from \"@krizaka/charts/native\";",
251
+ "differences": [
252
+ "No zone bands around the arc: the value takes the zone's tone.",
253
+ "The summary is the accessible label (no meter role in React Native)."
254
+ ],
255
+ "props": [
256
+ {
257
+ "component": "Gauge",
258
+ "description": "One figure against its range (React Native).",
259
+ "props": [
260
+ {
261
+ "name": "title",
262
+ "type": "string",
263
+ "default": null,
264
+ "description": "What the chart shows: its heading and accessible name.",
265
+ "required": true
266
+ },
267
+ {
268
+ "name": "value",
269
+ "type": "number",
270
+ "default": null,
271
+ "description": "The value.",
272
+ "required": true
273
+ },
274
+ {
275
+ "name": "brand",
276
+ "type": "BrandId",
277
+ "default": null,
278
+ "description": "The brand whose palette leads. Default Krizaka.",
279
+ "required": false
280
+ },
281
+ {
282
+ "name": "caption",
283
+ "type": "string",
284
+ "default": null,
285
+ "description": "The words under the value.",
286
+ "required": false
287
+ },
288
+ {
289
+ "name": "empty",
290
+ "type": "ReactNode",
291
+ "default": null,
292
+ "description": "Shown instead of the plot when there is nothing to draw. Default: the `empty` label.",
293
+ "required": false
294
+ },
295
+ {
296
+ "name": "format",
297
+ "type": "ValueFormat",
298
+ "default": null,
299
+ "description": "How the value is written.",
300
+ "required": false
301
+ },
302
+ {
303
+ "name": "height",
304
+ "type": "number",
305
+ "default": null,
306
+ "description": "The plot's height.",
307
+ "required": false
308
+ },
309
+ {
310
+ "name": "hideTitle",
311
+ "type": "boolean",
312
+ "default": null,
313
+ "description": "Hide the heading (it stays the accessible name).",
314
+ "required": false
315
+ },
316
+ {
317
+ "name": "labels",
318
+ "type": "ChartLabelsInput",
319
+ "default": null,
320
+ "description": "The words: the readout, the summary.",
321
+ "required": false
322
+ },
323
+ {
324
+ "name": "loading",
325
+ "type": "boolean",
326
+ "default": null,
327
+ "description": "The data is on its way.",
328
+ "required": false
329
+ },
330
+ {
331
+ "name": "locale",
332
+ "type": "Locale",
333
+ "default": null,
334
+ "description": "The locale of every figure and date. Default `\"en-US\"`.",
335
+ "required": false
336
+ },
337
+ {
338
+ "name": "max",
339
+ "type": "number",
340
+ "default": null,
341
+ "description": "The end of the range. Default 100.",
342
+ "required": false
343
+ },
344
+ {
345
+ "name": "min",
346
+ "type": "number",
347
+ "default": null,
348
+ "description": "The start of the range. Default 0.",
349
+ "required": false
350
+ },
351
+ {
352
+ "name": "scheme",
353
+ "type": "Mode",
354
+ "default": null,
355
+ "description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
356
+ "required": false
357
+ },
358
+ {
359
+ "name": "style",
360
+ "type": "ViewStyle",
361
+ "default": null,
362
+ "description": "The style of the chart's container (layout only: colours come from the theme).",
363
+ "required": false
364
+ },
365
+ {
366
+ "name": "target",
367
+ "type": "Threshold",
368
+ "default": null,
369
+ "description": "A tick on the arc: the objective.",
370
+ "required": false
371
+ },
372
+ {
373
+ "name": "theme",
374
+ "type": "Partial<ChartTheme>",
375
+ "default": null,
376
+ "description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
377
+ "required": false
378
+ },
379
+ {
380
+ "name": "tone",
381
+ "type": "Tone",
382
+ "default": null,
383
+ "description": "The tone of the value without zones. Default `\"accent\"`.",
384
+ "required": false
385
+ },
386
+ {
387
+ "name": "zones",
388
+ "type": "readonly { readonly to: number; readonly tone: Tone; readonly label?: string; }[]",
389
+ "default": null,
390
+ "description": "Zones: the value takes the tone of the zone it is in.",
391
+ "required": false
392
+ }
393
+ ]
394
+ }
395
+ ],
396
+ "examples": [
397
+ {
398
+ "name": "credits-quota",
399
+ "title": "Quota",
400
+ "description": "Credits used of a plan.",
401
+ "path": "examples/gauge/native/credits-quota.tsx",
402
+ "module": "@krizaka/charts/registry/examples/gauge/native/credits-quota",
403
+ "code": "import { Gauge } from \"@krizaka/charts/native\";\n\nexport default function CreditsQuota() {\n return (\n <Gauge\n title=\"Credits used this month\"\n value={41_250}\n max={50_000}\n format=\"compact\"\n caption=\"of 50K credits\"\n zones={[\n { to: 40_000, tone: \"success\" },\n { to: 47_500, tone: \"warning\" },\n { to: 50_000, tone: \"danger\" },\n ]}\n />\n );\n}\n",
404
+ "screenshots": {
405
+ "dark": "examples/gauge/native/credits-quota.dark.png",
406
+ "light": "examples/gauge/native/credits-quota.light.png"
407
+ }
408
+ }
409
+ ]
410
+ },
411
+ "files": [],
412
+ "dependencies": [
413
+ "@krizaka/intl@workspace:^",
414
+ "d3-geo@^3.1.1",
415
+ "echarts@^6.1.0",
416
+ "topojson-client@^3.1.0"
417
+ ],
418
+ "registryDependencies": [],
419
+ "demo": {
420
+ "path": "examples/gauge/credits-quota.tsx",
421
+ "content": "import { Gauge } from \"@krizaka/charts/gauge\";\n\nexport default function CreditsQuota() {\n return (\n <Gauge\n title=\"Credits used this month\"\n value={41_250}\n max={50_000}\n format=\"compact\"\n caption=\"of 50K credits\"\n zones={[\n { to: 40_000, tone: \"success\", label: \"Within plan\" },\n { to: 47_500, tone: \"warning\", label: \"Nearing the limit\" },\n { to: 50_000, tone: \"danger\", label: \"At the limit\" },\n ]}\n style={{ maxWidth: 320 }}\n />\n );\n}\n"
422
+ },
423
+ "props": [
424
+ {
425
+ "component": "Gauge",
426
+ "description": "One figure against its range — credits used of a plan, a challenge's progress, a load.",
427
+ "props": [
428
+ {
429
+ "name": "title",
430
+ "type": "string",
431
+ "default": null,
432
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
433
+ "required": true
434
+ },
435
+ {
436
+ "name": "value",
437
+ "type": "number",
438
+ "default": null,
439
+ "description": "The value.",
440
+ "required": true
441
+ },
442
+ {
443
+ "name": "brand",
444
+ "type": "BrandId",
445
+ "default": null,
446
+ "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`).",
447
+ "required": false
448
+ },
449
+ {
450
+ "name": "caption",
451
+ "type": "string",
452
+ "default": null,
453
+ "description": "The words under the value (“of 50 000 credits”).",
454
+ "required": false
455
+ },
456
+ {
457
+ "name": "className",
458
+ "type": "string",
459
+ "default": null,
460
+ "description": "A class on the figure (layout: margins, grid placement).",
461
+ "required": false
462
+ },
463
+ {
464
+ "name": "description",
465
+ "type": "ReactNode",
466
+ "default": null,
467
+ "description": "A sentence under the title: the period, the unit, the source.",
468
+ "required": false
469
+ },
470
+ {
471
+ "name": "empty",
472
+ "type": "ReactNode",
473
+ "default": null,
474
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
475
+ "required": false
476
+ },
477
+ {
478
+ "name": "error",
479
+ "type": "ReactNode",
480
+ "default": null,
481
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
482
+ "required": false
483
+ },
484
+ {
485
+ "name": "format",
486
+ "type": "ValueFormat",
487
+ "default": null,
488
+ "description": "How the value and the range are written.",
489
+ "required": false
490
+ },
491
+ {
492
+ "name": "height",
493
+ "type": "number",
494
+ "default": null,
495
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
496
+ "required": false
497
+ },
498
+ {
499
+ "name": "hideTitle",
500
+ "type": "boolean",
501
+ "default": null,
502
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
503
+ "required": false
504
+ },
505
+ {
506
+ "name": "id",
507
+ "type": "string",
508
+ "default": null,
509
+ "description": "The id of the figure.",
510
+ "required": false
511
+ },
512
+ {
513
+ "name": "labels",
514
+ "type": "ChartLabelsInput",
515
+ "default": null,
516
+ "description": "The words, translated: the buttons, the states, the written summary.",
517
+ "required": false
518
+ },
519
+ {
520
+ "name": "live",
521
+ "type": "boolean",
522
+ "default": null,
523
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
524
+ "required": false
525
+ },
526
+ {
527
+ "name": "loading",
528
+ "type": "boolean",
529
+ "default": null,
530
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
531
+ "required": false
532
+ },
533
+ {
534
+ "name": "locale",
535
+ "type": "Locale",
536
+ "default": null,
537
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
538
+ "required": false
539
+ },
540
+ {
541
+ "name": "max",
542
+ "type": "number",
543
+ "default": null,
544
+ "description": "The end of the range. Default 100.",
545
+ "required": false
546
+ },
547
+ {
548
+ "name": "min",
549
+ "type": "number",
550
+ "default": null,
551
+ "description": "The start of the range. Default 0.",
552
+ "required": false
553
+ },
554
+ {
555
+ "name": "style",
556
+ "type": "CSSProperties",
557
+ "default": null,
558
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
559
+ "required": false
560
+ },
561
+ {
562
+ "name": "summary",
563
+ "type": "\"hidden\" | \"visible\"",
564
+ "default": null,
565
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
566
+ "required": false
567
+ },
568
+ {
569
+ "name": "summaryText",
570
+ "type": "string",
571
+ "default": null,
572
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
573
+ "required": false
574
+ },
575
+ {
576
+ "name": "target",
577
+ "type": "Threshold",
578
+ "default": null,
579
+ "description": "A tick on the arc: the objective.",
580
+ "required": false
581
+ },
582
+ {
583
+ "name": "tone",
584
+ "type": "Tone",
585
+ "default": null,
586
+ "description": "The tone of the value without zones. Default `\"accent\"`.",
587
+ "required": false
588
+ },
589
+ {
590
+ "name": "zones",
591
+ "type": "readonly GaugeZone[]",
592
+ "default": null,
593
+ "description": "Coloured zones along the arc: the value takes the tone of the zone it is in.",
594
+ "required": false
595
+ }
596
+ ]
597
+ }
598
+ ]
599
+ }