gralobe 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -3
- package/dist/gralobe.js +988 -739
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +13 -13
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -219,15 +219,29 @@ const customStat: StatisticData = {
|
|
|
219
219
|
format: (v) => `${v.toFixed(1)}%`,
|
|
220
220
|
},
|
|
221
221
|
values: {
|
|
222
|
-
'
|
|
223
|
-
'
|
|
224
|
-
//
|
|
222
|
+
'US': 75.5, // ISO alpha-2
|
|
223
|
+
'Germany': 42.3, // Country name
|
|
224
|
+
'CHN': 60.0, // ISO alpha-3
|
|
225
|
+
'826': 55.0, // ISO numeric
|
|
225
226
|
},
|
|
226
227
|
};
|
|
227
228
|
|
|
228
229
|
globe.setStatistic(customStat);
|
|
229
230
|
```
|
|
230
231
|
|
|
232
|
+
### Supported Country Code Formats
|
|
233
|
+
|
|
234
|
+
Gralobe accepts multiple country identifier formats:
|
|
235
|
+
|
|
236
|
+
| Format | Example | Description |
|
|
237
|
+
|--------|---------|-------------|
|
|
238
|
+
| ISO 3166-1 alpha-2 | `US`, `DE`, `TR` | 2-letter country codes |
|
|
239
|
+
| ISO 3166-1 alpha-3 | `USA`, `DEU`, `TUR` | 3-letter country codes |
|
|
240
|
+
| ISO 3166-1 numeric | `840`, `276`, `792` | 3-digit numeric codes |
|
|
241
|
+
| Country name | `Germany`, `Turkey` | Common English names |
|
|
242
|
+
|
|
243
|
+
All formats are automatically normalized internally.
|
|
244
|
+
|
|
231
245
|
## TypeScript Types
|
|
232
246
|
|
|
233
247
|
```typescript
|