@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,483 @@
1
+ {
2
+ "name": "geo-map",
3
+ "package": "@krizaka/charts",
4
+ "type": "chart",
5
+ "title": "Geo map",
6
+ "summary": "Where: a world choropleth in one sequential hue, bubbles on places, country names in the reader's language — plain SVG, the world loaded on demand.",
7
+ "description": "Where: a world choropleth in one sequential hue, bubbles on places, country names in the reader's language — plain SVG, the world loaded on demand.",
8
+ "status": "beta",
9
+ "category": "charts",
10
+ "platforms": "web",
11
+ "engine": "svg",
12
+ "whenToUse": [
13
+ "An audience by country: a creator's viewers, a service's users.",
14
+ "Places with an amount: cities, data centres, as bubbles."
15
+ ],
16
+ "whenNotToUse": [
17
+ {
18
+ "when": "Deployment regions and the links between them, as a showpiece.",
19
+ "use": "globe"
20
+ },
21
+ {
22
+ "when": "A precise comparison between a few countries.",
23
+ "use": "bar-chart"
24
+ }
25
+ ],
26
+ "bestPractices": [
27
+ "Key the regions by ISO 3166-1 alpha-2 (`FR`, `US`): the names come from `Intl.DisplayNames` in the reader's locale.",
28
+ "Map rates (per viewer, per capita) rather than raw counts when the countries' sizes differ widely.",
29
+ "Pair it with a ranked table or bars when the exact order matters."
30
+ ],
31
+ "accessibility": {
32
+ "keyboard": [
33
+ {
34
+ "keys": "Arrow keys",
35
+ "action": "Walk the regions that have data, largest first, then the places."
36
+ },
37
+ {
38
+ "keys": "Home / End",
39
+ "action": "Jump to the largest or the last item."
40
+ },
41
+ {
42
+ "keys": "Esc",
43
+ "action": "Clears the active region."
44
+ }
45
+ ],
46
+ "notes": [
47
+ "The summary names the five largest regions with their shares; the table lists every region and place.",
48
+ "The Equal Earth projection keeps areas true: no country looks larger than it is.",
49
+ "The world's countries (~38 kB) are loaded only when a map is drawn; a skeleton holds the height meanwhile."
50
+ ]
51
+ },
52
+ "related": [
53
+ "globe",
54
+ "bar-chart",
55
+ "heatmap"
56
+ ],
57
+ "source": "packages/charts/src/meta/geo-map.ts",
58
+ "install": {
59
+ "web": "npm install @krizaka/charts",
60
+ "native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
61
+ },
62
+ "web": {
63
+ "entry": "@krizaka/charts/geo",
64
+ "import": "import { GeoMap } from \"@krizaka/charts/geo\";",
65
+ "props": [
66
+ {
67
+ "component": "GeoMap",
68
+ "description": "",
69
+ "props": [
70
+ {
71
+ "name": "data",
72
+ "type": "readonly T[]",
73
+ "default": null,
74
+ "description": "One row per region with a value.",
75
+ "required": true
76
+ },
77
+ {
78
+ "name": "region",
79
+ "type": "string | ((datum: T, index: number) => string)",
80
+ "default": null,
81
+ "description": "The field (or function) of the region's ISO 3166-1 alpha-2 code (`\"FR\"`, `\"US\"`).",
82
+ "required": true
83
+ },
84
+ {
85
+ "name": "title",
86
+ "type": "string",
87
+ "default": null,
88
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
89
+ "required": true
90
+ },
91
+ {
92
+ "name": "value",
93
+ "type": "string | ((datum: T, index: number) => number)",
94
+ "default": null,
95
+ "description": "The field (or function) of its value.",
96
+ "required": true
97
+ },
98
+ {
99
+ "name": "brand",
100
+ "type": "BrandId",
101
+ "default": null,
102
+ "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`).",
103
+ "required": false
104
+ },
105
+ {
106
+ "name": "className",
107
+ "type": "string",
108
+ "default": null,
109
+ "description": "A class on the figure (layout: margins, grid placement).",
110
+ "required": false
111
+ },
112
+ {
113
+ "name": "dataTable",
114
+ "type": "boolean",
115
+ "default": null,
116
+ "description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
117
+ "required": false
118
+ },
119
+ {
120
+ "name": "description",
121
+ "type": "ReactNode",
122
+ "default": null,
123
+ "description": "A sentence under the title: the period, the unit, the source.",
124
+ "required": false
125
+ },
126
+ {
127
+ "name": "empty",
128
+ "type": "ReactNode",
129
+ "default": null,
130
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
131
+ "required": false
132
+ },
133
+ {
134
+ "name": "error",
135
+ "type": "ReactNode",
136
+ "default": null,
137
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
138
+ "required": false
139
+ },
140
+ {
141
+ "name": "exportable",
142
+ "type": "boolean | readonly ExportFormat[]",
143
+ "default": null,
144
+ "description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
145
+ "required": false
146
+ },
147
+ {
148
+ "name": "format",
149
+ "type": "ValueFormat",
150
+ "default": null,
151
+ "description": "How the values are written.",
152
+ "required": false
153
+ },
154
+ {
155
+ "name": "height",
156
+ "type": "number",
157
+ "default": null,
158
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
159
+ "required": false
160
+ },
161
+ {
162
+ "name": "hideTitle",
163
+ "type": "boolean",
164
+ "default": null,
165
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
166
+ "required": false
167
+ },
168
+ {
169
+ "name": "id",
170
+ "type": "string",
171
+ "default": null,
172
+ "description": "The id of the figure.",
173
+ "required": false
174
+ },
175
+ {
176
+ "name": "labels",
177
+ "type": "ChartLabelsInput",
178
+ "default": null,
179
+ "description": "The words, translated: the buttons, the states, the written summary.",
180
+ "required": false
181
+ },
182
+ {
183
+ "name": "live",
184
+ "type": "boolean",
185
+ "default": null,
186
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
187
+ "required": false
188
+ },
189
+ {
190
+ "name": "loading",
191
+ "type": "boolean",
192
+ "default": null,
193
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
194
+ "required": false
195
+ },
196
+ {
197
+ "name": "locale",
198
+ "type": "Locale",
199
+ "default": null,
200
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
201
+ "required": false
202
+ },
203
+ {
204
+ "name": "onSelect",
205
+ "type": "((datum: T, index: number) => void)",
206
+ "default": null,
207
+ "description": "Called with the row when a region is clicked (or Enter is pressed on it).",
208
+ "required": false
209
+ },
210
+ {
211
+ "name": "points",
212
+ "type": "readonly GeoPoint[]",
213
+ "default": null,
214
+ "description": "Bubbles on places, their area by `value`.",
215
+ "required": false
216
+ },
217
+ {
218
+ "name": "regionLabel",
219
+ "type": "string",
220
+ "default": null,
221
+ "description": "The header of the regions and of the values in the table (“Country”, “Viewers”).",
222
+ "required": false
223
+ },
224
+ {
225
+ "name": "steps",
226
+ "type": "number",
227
+ "default": null,
228
+ "description": "The number of colour steps of the scale. Default 5.",
229
+ "required": false
230
+ },
231
+ {
232
+ "name": "style",
233
+ "type": "CSSProperties",
234
+ "default": null,
235
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
236
+ "required": false
237
+ },
238
+ {
239
+ "name": "summary",
240
+ "type": "\"hidden\" | \"visible\"",
241
+ "default": null,
242
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
243
+ "required": false
244
+ },
245
+ {
246
+ "name": "summaryText",
247
+ "type": "string",
248
+ "default": null,
249
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
250
+ "required": false
251
+ },
252
+ {
253
+ "name": "valueLabel",
254
+ "type": "string",
255
+ "default": null,
256
+ "description": "The header of the values (“Viewers”).",
257
+ "required": false
258
+ }
259
+ ]
260
+ }
261
+ ],
262
+ "examples": [
263
+ {
264
+ "name": "viewers",
265
+ "title": "Viewers by country",
266
+ "description": "A creator's viewers by country, the top cities as bubbles.",
267
+ "path": "examples/geo-map/viewers.tsx",
268
+ "module": "@krizaka/charts/registry/examples/geo-map/viewers",
269
+ "code": "import { GeoMap } from \"@krizaka/charts/geo\";\n\nconst countries = [\n { code: \"FR\", viewers: 48_200 }, { code: \"CA\", viewers: 31_500 }, { code: \"BE\", viewers: 9_800 },\n { code: \"CH\", viewers: 7_400 }, { code: \"MA\", viewers: 12_900 }, { code: \"SN\", viewers: 6_100 },\n { code: \"US\", viewers: 15_300 }, { code: \"DE\", viewers: 4_200 }, { code: \"TN\", viewers: 5_600 },\n { code: \"CI\", viewers: 4_900 }, { code: \"BR\", viewers: 2_300 }, { code: \"JP\", viewers: 1_800 },\n];\nconst cities = [\n { label: \"Paris\", lon: 2.35, lat: 48.86, value: 21_400 },\n { label: \"Montréal\", lon: -73.57, lat: 45.5, value: 17_800 },\n { label: \"Casablanca\", lon: -7.59, lat: 33.57, value: 6_300 },\n { label: \"Dakar\", lon: -17.45, lat: 14.69, value: 3_900 },\n];\n\nexport default function Viewers() {\n return (\n <GeoMap\n title=\"Viewers by country, last 90 days\"\n data={countries}\n region=\"code\"\n value=\"viewers\"\n points={cities}\n format=\"compact\"\n regionLabel=\"Country\"\n valueLabel=\"Viewers\"\n />\n );\n}\n"
270
+ }
271
+ ]
272
+ },
273
+ "native": null,
274
+ "files": [],
275
+ "dependencies": [
276
+ "@krizaka/intl@workspace:^",
277
+ "d3-geo@^3.1.1",
278
+ "echarts@^6.1.0",
279
+ "topojson-client@^3.1.0"
280
+ ],
281
+ "registryDependencies": [],
282
+ "demo": {
283
+ "path": "examples/geo-map/viewers.tsx",
284
+ "content": "import { GeoMap } from \"@krizaka/charts/geo\";\n\nconst countries = [\n { code: \"FR\", viewers: 48_200 }, { code: \"CA\", viewers: 31_500 }, { code: \"BE\", viewers: 9_800 },\n { code: \"CH\", viewers: 7_400 }, { code: \"MA\", viewers: 12_900 }, { code: \"SN\", viewers: 6_100 },\n { code: \"US\", viewers: 15_300 }, { code: \"DE\", viewers: 4_200 }, { code: \"TN\", viewers: 5_600 },\n { code: \"CI\", viewers: 4_900 }, { code: \"BR\", viewers: 2_300 }, { code: \"JP\", viewers: 1_800 },\n];\nconst cities = [\n { label: \"Paris\", lon: 2.35, lat: 48.86, value: 21_400 },\n { label: \"Montréal\", lon: -73.57, lat: 45.5, value: 17_800 },\n { label: \"Casablanca\", lon: -7.59, lat: 33.57, value: 6_300 },\n { label: \"Dakar\", lon: -17.45, lat: 14.69, value: 3_900 },\n];\n\nexport default function Viewers() {\n return (\n <GeoMap\n title=\"Viewers by country, last 90 days\"\n data={countries}\n region=\"code\"\n value=\"viewers\"\n points={cities}\n format=\"compact\"\n regionLabel=\"Country\"\n valueLabel=\"Viewers\"\n />\n );\n}\n"
285
+ },
286
+ "props": [
287
+ {
288
+ "component": "GeoMap",
289
+ "description": "",
290
+ "props": [
291
+ {
292
+ "name": "data",
293
+ "type": "readonly T[]",
294
+ "default": null,
295
+ "description": "One row per region with a value.",
296
+ "required": true
297
+ },
298
+ {
299
+ "name": "region",
300
+ "type": "string | ((datum: T, index: number) => string)",
301
+ "default": null,
302
+ "description": "The field (or function) of the region's ISO 3166-1 alpha-2 code (`\"FR\"`, `\"US\"`).",
303
+ "required": true
304
+ },
305
+ {
306
+ "name": "title",
307
+ "type": "string",
308
+ "default": null,
309
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
310
+ "required": true
311
+ },
312
+ {
313
+ "name": "value",
314
+ "type": "string | ((datum: T, index: number) => number)",
315
+ "default": null,
316
+ "description": "The field (or function) of its value.",
317
+ "required": true
318
+ },
319
+ {
320
+ "name": "brand",
321
+ "type": "BrandId",
322
+ "default": null,
323
+ "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`).",
324
+ "required": false
325
+ },
326
+ {
327
+ "name": "className",
328
+ "type": "string",
329
+ "default": null,
330
+ "description": "A class on the figure (layout: margins, grid placement).",
331
+ "required": false
332
+ },
333
+ {
334
+ "name": "dataTable",
335
+ "type": "boolean",
336
+ "default": null,
337
+ "description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
338
+ "required": false
339
+ },
340
+ {
341
+ "name": "description",
342
+ "type": "ReactNode",
343
+ "default": null,
344
+ "description": "A sentence under the title: the period, the unit, the source.",
345
+ "required": false
346
+ },
347
+ {
348
+ "name": "empty",
349
+ "type": "ReactNode",
350
+ "default": null,
351
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
352
+ "required": false
353
+ },
354
+ {
355
+ "name": "error",
356
+ "type": "ReactNode",
357
+ "default": null,
358
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
359
+ "required": false
360
+ },
361
+ {
362
+ "name": "exportable",
363
+ "type": "boolean | readonly ExportFormat[]",
364
+ "default": null,
365
+ "description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
366
+ "required": false
367
+ },
368
+ {
369
+ "name": "format",
370
+ "type": "ValueFormat",
371
+ "default": null,
372
+ "description": "How the values are written.",
373
+ "required": false
374
+ },
375
+ {
376
+ "name": "height",
377
+ "type": "number",
378
+ "default": null,
379
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
380
+ "required": false
381
+ },
382
+ {
383
+ "name": "hideTitle",
384
+ "type": "boolean",
385
+ "default": null,
386
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
387
+ "required": false
388
+ },
389
+ {
390
+ "name": "id",
391
+ "type": "string",
392
+ "default": null,
393
+ "description": "The id of the figure.",
394
+ "required": false
395
+ },
396
+ {
397
+ "name": "labels",
398
+ "type": "ChartLabelsInput",
399
+ "default": null,
400
+ "description": "The words, translated: the buttons, the states, the written summary.",
401
+ "required": false
402
+ },
403
+ {
404
+ "name": "live",
405
+ "type": "boolean",
406
+ "default": null,
407
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
408
+ "required": false
409
+ },
410
+ {
411
+ "name": "loading",
412
+ "type": "boolean",
413
+ "default": null,
414
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
415
+ "required": false
416
+ },
417
+ {
418
+ "name": "locale",
419
+ "type": "Locale",
420
+ "default": null,
421
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
422
+ "required": false
423
+ },
424
+ {
425
+ "name": "onSelect",
426
+ "type": "((datum: T, index: number) => void)",
427
+ "default": null,
428
+ "description": "Called with the row when a region is clicked (or Enter is pressed on it).",
429
+ "required": false
430
+ },
431
+ {
432
+ "name": "points",
433
+ "type": "readonly GeoPoint[]",
434
+ "default": null,
435
+ "description": "Bubbles on places, their area by `value`.",
436
+ "required": false
437
+ },
438
+ {
439
+ "name": "regionLabel",
440
+ "type": "string",
441
+ "default": null,
442
+ "description": "The header of the regions and of the values in the table (“Country”, “Viewers”).",
443
+ "required": false
444
+ },
445
+ {
446
+ "name": "steps",
447
+ "type": "number",
448
+ "default": null,
449
+ "description": "The number of colour steps of the scale. Default 5.",
450
+ "required": false
451
+ },
452
+ {
453
+ "name": "style",
454
+ "type": "CSSProperties",
455
+ "default": null,
456
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
457
+ "required": false
458
+ },
459
+ {
460
+ "name": "summary",
461
+ "type": "\"hidden\" | \"visible\"",
462
+ "default": null,
463
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
464
+ "required": false
465
+ },
466
+ {
467
+ "name": "summaryText",
468
+ "type": "string",
469
+ "default": null,
470
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
471
+ "required": false
472
+ },
473
+ {
474
+ "name": "valueLabel",
475
+ "type": "string",
476
+ "default": null,
477
+ "description": "The header of the values (“Viewers”).",
478
+ "required": false
479
+ }
480
+ ]
481
+ }
482
+ ]
483
+ }