Skip to contentSkip to content

ScatterPlotPremium API

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

Demos

Import

import { ScatterPlotPremium } from '@mui/x-charts-premium/ScatterChartPremium';
// or
import { ScatterPlotPremium } from '@mui/x-charts-premium';

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

Props

NameTypeDefaultDescription
renderer*'svg-batch'
| 'svg-single'
| 'webgl'
-

The type of renderer to use for the scatter plot.

  • svg-single: Renders every scatter item in its own <circle /> element.
  • svg-batch: Renders all scatter items in a single batched SVG path.
  • webgl: Renders scatter items using WebGL for better performance, at the cost of some limitations.
onItemClickfunc-

Callback fired when a marker is clicked directly. For closest-point clicks (the ScatterChart default), pass onItemClick to the chart container instead.

Signature:function(event: MouseEvent, scatterItemIdentifier: ScatterItemIdentifier) => void
  • event Mouse event recorded on the <svg/> element.
  • scatterItemIdentifier The scatter item identifier.
slotPropsobject{}

The props used for each component slot.

slotsobject{}

Overridable component slots.

See Slots API below for more details.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
marker.MuiScatterChart-markerScatterMarkerThe component that renders the marker for a scatter point.
scatter

CSS classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

Class nameRule nameDescription
.MuiScatterChart-focusedMarkfocusedMarkStyles applied to the focused scatter mark element.
.MuiScatterChart-highlightedMarkhighlightedMarkStyles applied to the highlighted scatter mark element.
.MuiScatterChart-rootrootStyles applied to the scatter plot element.
.MuiScatterChart-seriesseriesStyles applied to the group surrounding a series' scatter elements.

You can override the style of the component using one of these customization options:

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.