@toclocoinc/lattice-grid 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -34
- package/docs/AI-SKILL.md +22 -22
- package/docs/API.html +3026 -233
- package/docs/CHART-CODES.md +60 -60
- package/docs/api-detail.html +365 -365
- package/lattice-grid.d.ts +390 -69
- package/lattice-grid.esm.min.js +952 -74
- package/lattice-grid.min.cjs +952 -74
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +952 -74
- package/modules/charts.esm.min.js +308 -18
- package/modules/devtools.esm.min.js +8 -8
- package/modules/dhtmlx-compat.esm.min.js +958 -80
- package/modules/htmx.esm.min.js +919 -75
- package/modules/htmx.min.cjs +919 -75
- package/modules/htmx.min.js +919 -75
- package/modules/react.esm.min.js +2 -2
- package/modules/svelte.esm.min.js +2 -2
- package/modules/vue.esm.min.js +2 -2
- package/modules/webcomponent.esm.min.js +952 -74
- package/package.json +1 -1
package/docs/CHART-CODES.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Chart codes reference
|
|
2
2
|
|
|
3
3
|
The codes the `geomap` chart joins data to shapes with. Generated from
|
|
4
|
-
`packages/modules/charts/geo.js`, which is the source of truth
|
|
4
|
+
`packages/modules/charts/geo.js`, which is the source of truth: if the two ever
|
|
5
5
|
disagree, the module is right and this file is stale.
|
|
6
6
|
|
|
7
7
|
## How the join works
|
|
@@ -28,8 +28,8 @@ a grid's data will hold whichever one its source used:
|
|
|
28
28
|
| numeric | `826` | ISO 3166-1 numeric. A string or a number; leading zeros are ignored. |
|
|
29
29
|
|
|
30
30
|
Codes are matched case-insensitively and trimmed, so `gb`, `GB ` and `Gb` are
|
|
31
|
-
one country. Anything that is not a code
|
|
32
|
-
identifier, an empty cell
|
|
31
|
+
one country. Anything that is not a code, a country *name*, an internal
|
|
32
|
+
identifier, an empty cell: is not guessed at. Those rows are counted and the
|
|
33
33
|
count is drawn on the map, because a map quietly missing half its data looks
|
|
34
34
|
exactly like a map of a world where half the data is zero.
|
|
35
35
|
|
|
@@ -58,7 +58,7 @@ genuinely means Namibia should use `NAM` or `516`.
|
|
|
58
58
|
|
|
59
59
|
## What ships, and what does not
|
|
60
60
|
|
|
61
|
-
**Continent outlines ship** with the module
|
|
61
|
+
**Continent outlines ship** with the module: seven coarse polygons, a few
|
|
62
62
|
hundred bytes. They are *schematic, not cartographic*: recognisable, the right
|
|
63
63
|
shape for "which continent is biggest", and not a basemap. Nothing should be
|
|
64
64
|
measured off them.
|
|
@@ -70,7 +70,7 @@ chart. A country map is drawn from shapes the host supplies, at whatever
|
|
|
70
70
|
resolution that host actually needs:
|
|
71
71
|
|
|
72
72
|
```js
|
|
73
|
-
// GeoJSON
|
|
73
|
+
// GeoJSON, a FeatureCollection or a single feature. Projected for you.
|
|
74
74
|
createChart({
|
|
75
75
|
grid, container: '#map', type: 'geomap',
|
|
76
76
|
code: 'country', y: 'revenue',
|
|
@@ -93,20 +93,20 @@ reported as unplaced rather than rolled up.
|
|
|
93
93
|
|
|
94
94
|
## The projection
|
|
95
95
|
|
|
96
|
-
Equirectangular
|
|
96
|
+
Equirectangular: longitude and latitude map linearly onto x and y. The least
|
|
97
97
|
arithmetic and the most distortion at the poles, which is the right trade for
|
|
98
98
|
shading regions by value: nothing here measures area, and a reader comparing
|
|
99
99
|
Greenland with Africa by eye is misled by every rectangular projection equally.
|
|
100
100
|
Anything better belongs in the host's own GeoJSON, projected before it arrives.
|
|
101
101
|
|
|
102
|
-
The map keeps its 2:1 proportions and is centred in the plot
|
|
103
|
-
wide panel, letterboxed in a tall one
|
|
102
|
+
The map keeps its 2:1 proportions and is centred in the plot, pillarboxed in a
|
|
103
|
+
wide panel, letterboxed in a tall one: rather than being stretched to fill.
|
|
104
104
|
|
|
105
105
|
## Colour
|
|
106
106
|
|
|
107
107
|
Values are shaded with a sequential ramp: monotone lightness, so darker always
|
|
108
|
-
means larger. Pass `diverging: true` for a measure with a meaningful midpoint
|
|
109
|
-
profit and loss, change against a baseline
|
|
108
|
+
means larger. Pass `diverging: true` for a measure with a meaningful midpoint ,
|
|
109
|
+
profit and loss, change against a baseline, which centres the ramp on **zero**
|
|
110
110
|
rather than on the middle of the data, because a neutral colour at the mean
|
|
111
111
|
claims the mean is neutral.
|
|
112
112
|
|
|
@@ -120,12 +120,12 @@ share a shade.
|
|
|
120
120
|
|
|
121
121
|
Grouped by the continent each lands on.
|
|
122
122
|
|
|
123
|
-
### Africa
|
|
123
|
+
### Africa: `AF`
|
|
124
124
|
|
|
125
125
|
| alpha-2 | alpha-3 | numeric |
|
|
126
126
|
|---|---|---|
|
|
127
127
|
| `AO` | `AGO` | `24` |
|
|
128
|
-
| `BF` | `BFA`
|
|
128
|
+
| `BF` | `BFA` |: |
|
|
129
129
|
| `BI` | `BDI` | `108` |
|
|
130
130
|
| `BJ` | `BEN` | `204` |
|
|
131
131
|
| `BW` | `BWA` | `72` |
|
|
@@ -161,7 +161,7 @@ Grouped by the continent each lands on.
|
|
|
161
161
|
| `NA` | `NAM` | `516` |
|
|
162
162
|
| `NE` | `NER` | `562` |
|
|
163
163
|
| `NG` | `NGA` | `566` |
|
|
164
|
-
| `RE`
|
|
164
|
+
| `RE` |: |: |
|
|
165
165
|
| `RW` | `RWA` | `646` |
|
|
166
166
|
| `SC` | `SYC` | `690` |
|
|
167
167
|
| `SD` | `SDN` | `729` |
|
|
@@ -169,32 +169,32 @@ Grouped by the continent each lands on.
|
|
|
169
169
|
| `SN` | `SEN` | `686` |
|
|
170
170
|
| `SO` | `SOM` | `706` |
|
|
171
171
|
| `SS` | `SSD` | `728` |
|
|
172
|
-
| `ST` | `STP`
|
|
172
|
+
| `ST` | `STP` |: |
|
|
173
173
|
| `SZ` | `SWZ` | `748` |
|
|
174
174
|
| `TD` | `TCD` | `148` |
|
|
175
175
|
| `TG` | `TGO` | `768` |
|
|
176
176
|
| `TN` | `TUN` | `788` |
|
|
177
177
|
| `TZ` | `TZA` | `834` |
|
|
178
178
|
| `UG` | `UGA` | `800` |
|
|
179
|
-
| `YT`
|
|
179
|
+
| `YT` |: |: |
|
|
180
180
|
| `ZA` | `ZAF` | `710` |
|
|
181
181
|
| `ZM` | `ZMB` | `894` |
|
|
182
182
|
| `ZW` | `ZWE` | `716` |
|
|
183
183
|
|
|
184
|
-
### Antarctica
|
|
184
|
+
### Antarctica: `AN`
|
|
185
185
|
|
|
186
186
|
| alpha-2 | alpha-3 | numeric |
|
|
187
187
|
|---|---|---|
|
|
188
|
-
| `AQ`
|
|
188
|
+
| `AQ` |: |: |
|
|
189
189
|
|
|
190
|
-
### Asia
|
|
190
|
+
### Asia: `AS`
|
|
191
191
|
|
|
192
192
|
| alpha-2 | alpha-3 | numeric |
|
|
193
193
|
|---|---|---|
|
|
194
194
|
| `AE` | `ARE` | `784` |
|
|
195
195
|
| `AF` | `AFG` | `4` |
|
|
196
196
|
| `AM` | `ARM` | `51` |
|
|
197
|
-
| `AZ` | `AZE`
|
|
197
|
+
| `AZ` | `AZE` |: |
|
|
198
198
|
| `BD` | `BGD` | `50` |
|
|
199
199
|
| `BH` | `BHR` | `48` |
|
|
200
200
|
| `BN` | `BRN` | `96` |
|
|
@@ -221,14 +221,14 @@ Grouped by the continent each lands on.
|
|
|
221
221
|
| `LK` | `LKA` | `144` |
|
|
222
222
|
| `MM` | `MMR` | `104` |
|
|
223
223
|
| `MN` | `MNG` | `496` |
|
|
224
|
-
| `MO`
|
|
224
|
+
| `MO` |: |: |
|
|
225
225
|
| `MV` | `MDV` | `462` |
|
|
226
226
|
| `MY` | `MYS` | `458` |
|
|
227
227
|
| `NP` | `NPL` | `524` |
|
|
228
228
|
| `OM` | `OMN` | `512` |
|
|
229
229
|
| `PH` | `PHL` | `608` |
|
|
230
230
|
| `PK` | `PAK` | `586` |
|
|
231
|
-
| `PS` | `PSE`
|
|
231
|
+
| `PS` | `PSE` |: |
|
|
232
232
|
| `QA` | `QAT` | `634` |
|
|
233
233
|
| `SA` | `SAU` | `682` |
|
|
234
234
|
| `SG` | `SGP` | `702` |
|
|
@@ -238,19 +238,19 @@ Grouped by the continent each lands on.
|
|
|
238
238
|
| `TL` | `TLS` | `626` |
|
|
239
239
|
| `TM` | `TKM` | `795` |
|
|
240
240
|
| `TR` | `TUR` | `792` |
|
|
241
|
-
| `TW` | `TWN`
|
|
241
|
+
| `TW` | `TWN` |: |
|
|
242
242
|
| `UZ` | `UZB` | `860` |
|
|
243
243
|
| `VN` | `VNM` | `704` |
|
|
244
244
|
| `YE` | `YEM` | `887` |
|
|
245
245
|
|
|
246
|
-
### Europe
|
|
246
|
+
### Europe: `EU`
|
|
247
247
|
|
|
248
248
|
| alpha-2 | alpha-3 | numeric |
|
|
249
249
|
|---|---|---|
|
|
250
250
|
| `AD` | `AND` | `20` |
|
|
251
251
|
| `AL` | `ALB` | `8` |
|
|
252
252
|
| `AT` | `AUT` | `40` |
|
|
253
|
-
| `AX`
|
|
253
|
+
| `AX` |: |: |
|
|
254
254
|
| `BA` | `BIH` | `70` |
|
|
255
255
|
| `BE` | `BEL` | `56` |
|
|
256
256
|
| `BG` | `BGR` | `100` |
|
|
@@ -262,24 +262,24 @@ Grouped by the continent each lands on.
|
|
|
262
262
|
| `EE` | `EST` | `233` |
|
|
263
263
|
| `ES` | `ESP` | `724` |
|
|
264
264
|
| `FI` | `FIN` | `246` |
|
|
265
|
-
| `FO`
|
|
265
|
+
| `FO` |: |: |
|
|
266
266
|
| `FR` | `FRA` | `250` |
|
|
267
267
|
| `GB` | `GBR` | `826` |
|
|
268
|
-
| `GG`
|
|
269
|
-
| `GI`
|
|
268
|
+
| `GG` |: |: |
|
|
269
|
+
| `GI` |: |: |
|
|
270
270
|
| `GR` | `GRC` | `300` |
|
|
271
271
|
| `HR` | `HRV` | `191` |
|
|
272
272
|
| `HU` | `HUN` | `348` |
|
|
273
273
|
| `IE` | `IRL` | `372` |
|
|
274
|
-
| `IM`
|
|
274
|
+
| `IM` |: |: |
|
|
275
275
|
| `IS` | `ISL` | `352` |
|
|
276
276
|
| `IT` | `ITA` | `380` |
|
|
277
|
-
| `JE`
|
|
277
|
+
| `JE` |: |: |
|
|
278
278
|
| `LI` | `LIE` | `438` |
|
|
279
279
|
| `LT` | `LTU` | `440` |
|
|
280
280
|
| `LU` | `LUX` | `442` |
|
|
281
281
|
| `LV` | `LVA` | `428` |
|
|
282
|
-
| `MC` | `MCO`
|
|
282
|
+
| `MC` | `MCO` |: |
|
|
283
283
|
| `MD` | `MDA` | `498` |
|
|
284
284
|
| `ME` | `MNE` | `499` |
|
|
285
285
|
| `MK` | `MKD` | `807` |
|
|
@@ -294,19 +294,19 @@ Grouped by the continent each lands on.
|
|
|
294
294
|
| `SE` | `SWE` | `752` |
|
|
295
295
|
| `SI` | `SVN` | `705` |
|
|
296
296
|
| `SK` | `SVK` | `703` |
|
|
297
|
-
| `SM` | `SMR`
|
|
297
|
+
| `SM` | `SMR` |: |
|
|
298
298
|
| `UA` | `UKR` | `804` |
|
|
299
|
-
| `VA`
|
|
299
|
+
| `VA` |: |: |
|
|
300
300
|
|
|
301
|
-
### North America
|
|
301
|
+
### North America: `NA`
|
|
302
302
|
|
|
303
303
|
| alpha-2 | alpha-3 | numeric |
|
|
304
304
|
|---|---|---|
|
|
305
|
-
| `AG`
|
|
306
|
-
| `AI`
|
|
307
|
-
| `AW`
|
|
305
|
+
| `AG` |: |: |
|
|
306
|
+
| `AI` |: |: |
|
|
307
|
+
| `AW` |: |: |
|
|
308
308
|
| `BB` | `BRB` | `52` |
|
|
309
|
-
| `BM`
|
|
309
|
+
| `BM` |: |: |
|
|
310
310
|
| `BS` | `BHS` | `44` |
|
|
311
311
|
| `BZ` | `BLZ` | `84` |
|
|
312
312
|
| `CA` | `CAN` | `124` |
|
|
@@ -314,45 +314,45 @@ Grouped by the continent each lands on.
|
|
|
314
314
|
| `CU` | `CUB` | `192` |
|
|
315
315
|
| `DM` | `DMA` | `212` |
|
|
316
316
|
| `DO` | `DOM` | `214` |
|
|
317
|
-
| `GD`
|
|
317
|
+
| `GD` |: |: |
|
|
318
318
|
| `GL` | `GRL` | `304` |
|
|
319
|
-
| `GP`
|
|
319
|
+
| `GP` |: |: |
|
|
320
320
|
| `GT` | `GTM` | `320` |
|
|
321
321
|
| `HN` | `HND` | `340` |
|
|
322
322
|
| `HT` | `HTI` | `332` |
|
|
323
323
|
| `JM` | `JAM` | `388` |
|
|
324
|
-
| `KN` | `KNA`
|
|
325
|
-
| `KY`
|
|
326
|
-
| `LC` | `LCA`
|
|
327
|
-
| `MQ`
|
|
324
|
+
| `KN` | `KNA` |: |
|
|
325
|
+
| `KY` |: |: |
|
|
326
|
+
| `LC` | `LCA` |: |
|
|
327
|
+
| `MQ` |: |: |
|
|
328
328
|
| `MX` | `MEX` | `484` |
|
|
329
329
|
| `NI` | `NIC` | `558` |
|
|
330
330
|
| `PA` | `PAN` | `591` |
|
|
331
|
-
| `PM`
|
|
331
|
+
| `PM` |: |: |
|
|
332
332
|
| `PR` | `PRI` | `630` |
|
|
333
333
|
| `SV` | `SLV` | `222` |
|
|
334
|
-
| `TC`
|
|
334
|
+
| `TC` |: |: |
|
|
335
335
|
| `TT` | `TTO` | `780` |
|
|
336
336
|
| `US` | `USA` | `840` |
|
|
337
|
-
| `VC` | `VCT`
|
|
338
|
-
| `VG`
|
|
339
|
-
| `VI`
|
|
337
|
+
| `VC` | `VCT` |: |
|
|
338
|
+
| `VG` |: |: |
|
|
339
|
+
| `VI` |: |: |
|
|
340
340
|
|
|
341
|
-
### Oceania
|
|
341
|
+
### Oceania: `OC`
|
|
342
342
|
|
|
343
343
|
| alpha-2 | alpha-3 | numeric |
|
|
344
344
|
|---|---|---|
|
|
345
|
-
| `AS`
|
|
345
|
+
| `AS` |: |: |
|
|
346
346
|
| `AU` | `AUS` | `36` |
|
|
347
|
-
| `FJ` | `FJI`
|
|
348
|
-
| `FM` | `FSM`
|
|
349
|
-
| `GU`
|
|
350
|
-
| `KI` | `KIR`
|
|
351
|
-
| `MH` | `MHL`
|
|
352
|
-
| `NC`
|
|
347
|
+
| `FJ` | `FJI` |: |
|
|
348
|
+
| `FM` | `FSM` |: |
|
|
349
|
+
| `GU` |: |: |
|
|
350
|
+
| `KI` | `KIR` |: |
|
|
351
|
+
| `MH` | `MHL` |: |
|
|
352
|
+
| `NC` |: |: |
|
|
353
353
|
| `NR` | `NRU` | `520` |
|
|
354
354
|
| `NZ` | `NZL` | `554` |
|
|
355
|
-
| `PF`
|
|
355
|
+
| `PF` |: |: |
|
|
356
356
|
| `PG` | `PNG` | `598` |
|
|
357
357
|
| `PW` | `PLW` | `585` |
|
|
358
358
|
| `SB` | `SLB` | `90` |
|
|
@@ -361,7 +361,7 @@ Grouped by the continent each lands on.
|
|
|
361
361
|
| `VU` | `VUT` | `548` |
|
|
362
362
|
| `WS` | `WSM` | `882` |
|
|
363
363
|
|
|
364
|
-
### South America
|
|
364
|
+
### South America: `SA`
|
|
365
365
|
|
|
366
366
|
| alpha-2 | alpha-3 | numeric |
|
|
367
367
|
|---|---|---|
|
|
@@ -371,8 +371,8 @@ Grouped by the continent each lands on.
|
|
|
371
371
|
| `CL` | `CHL` | `152` |
|
|
372
372
|
| `CO` | `COL` | `170` |
|
|
373
373
|
| `EC` | `ECU` | `218` |
|
|
374
|
-
| `FK`
|
|
375
|
-
| `GF`
|
|
374
|
+
| `FK` |: |: |
|
|
375
|
+
| `GF` |: |: |
|
|
376
376
|
| `GY` | `GUY` | `328` |
|
|
377
377
|
| `PE` | `PER` | `604` |
|
|
378
378
|
| `PY` | `PRY` | `600` |
|