docs(charts): document how to remove Antarctica from maps#22818
Closed
Anexus5919 wants to merge 1 commit into
Closed
docs(charts): document how to remove Antarctica from maps#22818Anexus5919 wants to merge 1 commit into
Anexus5919 wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
|
@rita-codes @alexfauquette Kindly have a review on this pr. Thanks! |
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
Member
|
Closing since it's duplicated with #22815 and the docs example does not seems to impact the projection contrary to what is said in the PR description |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #22810.
The Map docs already mention that the projection auto-fits to the
geoDatabounds, but there was no example of how changinggeoDataaffects that fit. This adds a short section and an interactive demo that show how to omit Antarctica, which is a common need since most datasets have nothing to render there.What changed
docs/data/charts/map/map.md, placed right after "Modifying the projection".RemoveAntarctica.tsx(plus the generated.js) with an "Include Antarctica" toggle.Why this shows the projection impact
The provider fits the projection to the bounding box of whatever features are in
geoData(throughfitExtent, when no explicitscaleis set). Antarctica reaches the bottom of most projections, so including it forces the fit to reserve vertical space that is usually empty, which shrinks every other landmass. Filtering it out lets the populated regions fill the drawing area. Toggling the checkbox makes that refit visible.The example filters by feature name, matching how series already join to features (
feature.properties.name):Validation
eslinton both demo files: cleanvaleonmap.md: no errors, warnings, or suggestionstsc -p docs/tsconfig.json: clean.jsgenerated through the standard babel and prettier pipeline so it stays in sync with the.tsxNotes
Docs only. No source or API changes, and no new translation keys.
The Map is a Premium preview feature, so the demo shows the usual missing-license watermark in local dev without a license key. It does not appear on the published docs.
I have followed (at least) the PR section of the contributing guide.
Preview: https://deploy-preview-22818--material-ui-x.netlify.app/x/react-charts/map/#filtering-the-geographic-data