feat(chart): add ChoroplethMap#610
Conversation
|
/bonk please review |
commit: |
Docs PreviewCommit: |
There was a problem hiding this comment.
Thanks for the PR! The ChoroplethMap implementation is well-structured — clean viewport preservation, consistent event handling with BubbleMap, and nice Kumo color integration.
A few things to address before merging:
- BubbleMap default change is undocumented. Switching the default from → changes the default interaction behavior for existing consumers. If this is intentional it should be called out in the changeset.
- Missing ChoroplethMap PropsTable in docs. The API Reference section should include a PropsTable for the new component too.
- Test page consistency. The ChoroplethMap test section is missing a descriptive paragraph like the other sections have.
See inline comments for details.
|
Follow-up: my earlier review comments lost some backticks due to escaping issues. Here is the same feedback with proper formatting:
Otherwise the implementation looks solid. Nice work! |
|
Review submitted on PR #610. Summary of feedback:
The batch review was posted successfully (with inline comments on the relevant lines), and a follow-up top-level comment clarifies the properly formatted feedback. |
- Default both maps to a latitude-clamped Mercator projection (d3-geo); add `projection` prop (custom d3-geo projection or `null` for raw plotting) - Size the chart container by the projected window's aspect ratio so maps fill the frame without letterboxing; `height` still overrides - Make ChoroplethMap borderless (minimalist, matching BubbleMap); drop the now-unused MapColors.line seam colour - Add a Cloudflare network hero example (major locations in brand orange with city + IATA tooltips) as the first thing on the Maps docs page
|
/bonk can you review? |
|
@rozenmd Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
/bonk can you try again |
There was a problem hiding this comment.
Thanks for the PR! The ChoroplethMap implementation is solid — clean viewport preservation, consistent event handling with BubbleMap, and nice Kumo color integration.
However, the three issues from the previous review are still unaddressed. Please take a look at the inline comments below.
|
Review submitted on PR #610. Summary of feedback: All three issues from the prior review are still unaddressed:
The batch review was posted successfully with inline comments on the relevant lines, including suggested code changes where applicable. |
|
/bonk can you review |
There was a problem hiding this comment.
All three issues from the previous review rounds are now resolved:
- Changeset documents the breaking change — the
BubbleMaproamdefault switch fromtrue→falseis explicitly called out in.changeset/choropleth-map.md. - Docs include
ChoroplethMapPropsTable —maps.astronow has the API reference for both map components. - Test page is consistent — all sections now follow the same structure.
The viewport-preservation logic (appliedGeoRef/appliedViewRef), d3-geo projection integration, and Kumo-themed colour ramps are all well implemented. The choropleth visualMap setup and tooltip escaping look correct.
Two non-blocking nits:
MapProjectionis exported fromMaps.tsxbut not re-exported from thechartbarrel (src/components/chart/index.ts) or the package root, so consumers typing custom projections need a deep import.- The switch to
sqrt(v / vmax)for bubble radius (scaling from zero instead ofvmin) is a subtle behaviour change worth keeping in mind for release notes, even though it's an improvement.
Nice work — LGTM!
|
Review submitted on PR #610. Summary: All three blocking issues from the prior review rounds are resolved:
The implementation is solid: clean viewport preservation via |











































































Adds
ChoroplethMap, a GeoJSON region choropleth chart component with Kumo light/dark map colors, tooltip formatting, optional legend, hover/click callbacks, roam controls, docs, demos, exports, and a changeset.Reviews
Tests
pnpm --filter @cloudflare/kumo-docs-astro typecheckwith 0 errors; existing warnings/hints remain unrelated