[docs][charts] Add map example for arbitrary GeoJSON shapes#22976
Merged
Conversation
Shows that `geoData` accepts any `FeatureCollection`, using the PB2002 tectonic plates with country borders for orientation. Both layers share one `geoData` as two `mapShape` series rendered by a single `MapShapePlot`, styled per layer via their `data-series` attribute. Toggles between a flat map and an orthographic globe.
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
alexfauquette
approved these changes
Jun 26, 2026
| ]} | ||
| > | ||
| <ChartsSurface> | ||
| <Graticule stroke="#b0bec5" strokeWidth={0.4} opacity={0.3} /> |
Member
There was a problem hiding this comment.
I don't get why adding graticule in this case
Member
Author
There was a problem hiding this comment.
It was working when fading was enabled, so it was easier to see distortion. I'll check if putting it in front works, else remove it
mbrookes
pushed a commit
to mbrookes/mui-x
that referenced
this pull request
Jun 27, 2026
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.
Summary
Adds a map demo under Composition → Rendering any GeoJSON shapes, showing that
geoDataaccepts any GeoJSONFeatureCollection— not only country borders.The example loads the PB2002 tectonic plate model together with country borders into a single
geoDataas twomapShapeseries. A singleMapShapePlotrenders both, and each layer is styled independently via itsdata-seriesattribute (colored plates below, country outlines on top for orientation). A toggle switches between a flatnaturalEarth1map and anorthographicglobe.No library changes — relies on the existing
data-seriesattribute emitted per series.