@bicharts/chart-host 0.4.0 → 0.4.2
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 +6 -2
- package/dist/{chunk-CVJFLLAD.mjs → chunk-3TQHUKTM.mjs} +279 -239
- package/dist/geo.mjs +11 -0
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +18 -2
- package/dist/types/contract.d.ts +2 -2
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ geography away and leaves nothing to click to change the selection.
|
|
|
72
72
|
|
|
73
73
|
```tsx
|
|
74
74
|
<BicChartGroup columns={columns} rows={rows} point={{ city: "City", state: "StateOrProvince" }}>
|
|
75
|
-
<BicChart id="map" code={mapCode} d3={d3} geoKind="
|
|
75
|
+
<BicChart id="map" code={mapCode} d3={d3} geoKind="north-america" respondsWith="highlight" />
|
|
76
76
|
<BicChart id="table" code={tableCode} d3={d3} />
|
|
77
77
|
</BicChartGroup>
|
|
78
78
|
```
|
|
@@ -137,7 +137,11 @@ createChartHost(el, { code, data, d3, geoKind, geoProvider: geoForKind });
|
|
|
137
137
|
createChartHost(el, { code, data, d3, options: { geo } }); // or pass data.geo.json directly
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
The React `<BicChart>` handles this itself: give it `geoKind` and it fetches the geometry when
|
|
141
|
+
the cache is cold, re-rendering with the basemap when it lands. `await loadGeo(kind)` before
|
|
142
|
+
mounting still works and skips the one-frame pop-in. Outside React, `render()` is synchronous
|
|
143
|
+
by contract, so setting `geoKind` with no geometry available warns and draws without a
|
|
144
|
+
basemap — load or provide geometry first.
|
|
141
145
|
|
|
142
146
|
## D3 plugins
|
|
143
147
|
|