Skip to contentSkip to content

MapShapePlot API

API reference docs for the React MapShapePlot component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { MapShapePlot } from '@mui/x-charts-premium/Map';
// or
import { MapShapePlot } from '@mui/x-charts-premium';

Learn about the difference by reading this guide on minimizing bundle size.



Renders series mapShape items.

Props

NameTypeDefaultDescription
fillstring-

Fill color applied to every feature path. Overrides item and series colors.

onItemClickfunc-

Callback fired when clicking on a map shape.

Signature:function(event: React.MouseEvent<SVGPathElement, MouseEvent>, mapShapeItemIdentifier: MapShapeItemIdentifier) => void
  • event The event source of the callback.
  • mapShapeItemIdentifier The identifier of the clicked map shape.
strokestring'none'

Stroke color applied to every feature path.

strokeWidthnumber1

Stroke width applied to every feature path.

The component cannot hold a ref.

Source code

If you did not find the information in this page, consider having a look at the implementation of the component for more detail.