Skip to content

docs(charts): document how to remove Antarctica from maps#22818

Closed
Anexus5919 wants to merge 1 commit into
mui:masterfrom
Anexus5919:docs/map-remove-antarctica
Closed

docs(charts): document how to remove Antarctica from maps#22818
Anexus5919 wants to merge 1 commit into
mui:masterfrom
Anexus5919:docs/map-remove-antarctica

Conversation

@Anexus5919

@Anexus5919 Anexus5919 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #22810.

The Map docs already mention that the projection auto-fits to the geoData bounds, but there was no example of how changing geoData affects 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

  • New section "Filtering the geographic data" in docs/data/charts/map/map.md, placed right after "Modifying the projection".
  • New demo 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 (through fitExtent, when no explicit scale is 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):

const countriesWithoutAntarctica = {
  ...countries,
  features: countries.features.filter(
    (feature) => feature.properties?.name !== 'Antarctica',
  ),
};

Validation

  • eslint on both demo files: clean
  • vale on map.md: no errors, warnings, or suggestions
  • tsc -p docs/tsconfig.json: clean
  • .js generated through the standard babel and prettier pipeline so it stays in sync with the .tsx

Notes

  • 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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Anexus5919

Copy link
Copy Markdown
Contributor Author

@rita-codes @alexfauquette Kindly have a review on this pr. Thanks!

@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@oliviertassinari oliviertassinari added the scope: charts Changes related to the charts. label Jun 15, 2026
@alexfauquette

Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: charts Changes related to the charts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[charts] document in maps how to remove antartica

3 participants