[object Promise]

# ChartsContainer API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Composition](/x/react-charts/composition/)
- [Charts - Localization](/x/react-charts/localization/)
- [Charts - Plugins](/x/react-charts/plugins/)

## Import

```jsx
import { ChartsContainer } from '@mui/x-charts/ChartsContainer';
// or
import { ChartsContainer } from '@mui/x-charts';
// or
import { ChartsContainer } from '@mui/x-charts-pro';
// or
import { ChartsContainer } from '@mui/x-charts-premium';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| apiRef | `{ current?: object }` | - | No |  |
| axesGap | `number` | `0` | No |  |
| brushConfig | `{ enabled?: bool, preventHighlight?: bool, preventTooltip?: bool }` | - | No |  |
| children | `node` | - | No |  |
| colors | `Array<string> \| func` | `rainbowSurgePalette` | No |  |
| dataset | `Array<object>` | - | No |  |
| desc | `string` | - | No |  |
| disableAxisListener | `bool` | `false` | No |  |
| disableHitArea | `bool` | - | No |  |
| disableKeyboardNavigation | `bool` | - | No |  |
| experimentalFeatures | `{ keyboardActivation?: bool }` | - | No |  |
| focusItemOnClick | `bool` | `false` | No |  |
| height | `number` | - | No |  |
| hiddenItems | `Array<{ dataIndex?: number, seriesId: string, type: 'bar' \| 'line' \| 'pie' \| 'radar' \| 'scatter' } \| { dataIndex?: number, seriesId: string, type?: 'bar' \| 'line' \| 'pie' \| 'radar' \| 'scatter' }>` | - | No |  |
| highlightedAxis | `Array<{ axisId: number \| string, dataIndex: number }>` | - | No |  |
| highlightedItem | `{ dataIndex?: number, seriesId: string } \| { dataIndex?: number, seriesId: string, type: 'bar' \| 'line' \| 'pie' \| 'radar' \| 'scatter' }` | - | No |  |
| hitAreaRadius | `'item' \| number` | - | No |  |
| id | `string` | - | No |  |
| initialHiddenItems | `Array<{ dataIndex?: number, seriesId: string, type: 'bar' \| 'line' \| 'pie' \| 'radar' \| 'scatter' } \| { dataIndex?: number, seriesId: string, type?: 'bar' \| 'line' \| 'pie' \| 'radar' \| 'scatter' }>` | - | No |  |
| localeText | `object` | - | No |  |
| margin | `number \| { bottom?: number, left?: number, right?: number, top?: number }` | - | No |  |
| onAxisClick | `function(event: ChartsActivationEvent, data: null \| ChartsAxisData) => void` | - | No |  |
| onHiddenItemsChange | `function(hiddenItems: Array<VisibilityIdentifierWithType>) => void` | - | No |  |
| onHighlightChange | `function(highlightedItem: HighlightItemIdentifierWithType<SeriesType> \| null) => void` | - | No |  |
| onHighlightedAxisChange | `function(axisItems: Array<AxisItemIdentifier>) => void` | - | No |  |
| onItemClick | `function(event: ChartsActivationEvent, scatterItemIdentifier: ScatterItemIdentifier) => void` | - | No |  |
| onTooltipAxisChange | `function(axisItems: Array<AxisItemIdentifier>) => void` | - | No |  |
| onTooltipItemChange | `function(tooltipItem: SeriesItemIdentifier<SeriesType> \| null) => void` | - | No |  |
| radiusAxis | `Array<object>` | - | No |  |
| rotationAxis | `Array<object>` | - | No |  |
| series | `Array<object>` | - | No |  |
| skipAnimation | `bool` | - | No |  |
| slotProps | `object` | - | No |  |
| slots | `object` | - | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |
| theme | `'dark' \| 'light'` | - | No |  |
| title | `string` | - | No |  |
| tooltipAxis | `Array<{ axisId: number \| string, dataIndex: number }>` | - | No |  |
| tooltipItem | `{ dataIndex?: number, seriesId: string } \| { dataIndex?: number, seriesId: string, type: 'bar' \| 'line' \| 'pie' \| 'radar' \| 'scatter' }` | - | No |  |
| width | `number` | - | No |  |
| xAxis | `Array<object>` | - | No |  |
| yAxis | `Array<object>` | - | No |  |
| zAxis | `Array<{ colorMap?: { color: Array<string> \| func, max?: Date \| number, min?: Date \| number, type: 'continuous', unknownColor?: string } \| { colors: Array<string>, thresholds: Array<Date \| number>, type: 'piecewise', unknownColor?: string } \| { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date \| number \| string> }, data?: array, dataKey?: string, id?: string, max?: number, min?: number, sizeMap?: { interpolator?: 'linear' \| 'log' \| 'sqrt', max?: Date \| number, min?: Date \| number, size: Array<number>, type: 'continuous' } \| { max?: Date \| number, min?: Date \| number, size: func, type: 'continuous' } \| { sizes: Array<number>, thresholds: Array<Date \| number>, type: 'piecewise' } \| { sizes: Array<number>, type: 'ordinal', unknownSize?: number, values?: Array<Date \| number \| string> }, valueGetter?: func }>` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| baseButton | `Button` | - | The component used for buttons. |
| baseIconButton | `IconButton` | - | The component used for icon buttons. |
| baseToggleButton | `ToggleButton` | - | The component used for toggle buttons.
Note: MUI's `ToggleButton` has an incompatible `href` prop, so it must be cast:
`ToggleButton as unknown as React.ComponentType`. |
| baseToggleButtonGroup | `ToggleButtonGroup` | - | The component used for toggle button groups. |

## Source code

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

- [/packages/x-charts/src/ChartsContainer/ChartsContainer.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/ChartsContainer/ChartsContainer.tsx)

# ChartsContainerPro API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Composition](/x/react-charts/composition/)

## Import

```jsx
import { ChartsContainerPro } from '@mui/x-charts-pro/ChartsContainerPro';
// or
import { ChartsContainerPro } from '@mui/x-charts-pro';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| apiRef | `{ current?: { setZoomData: func } }` | - | No |  |
| children | `node` | - | No |  |
| colors | `Array<string> \| func` | `blueberryTwilightPalette` | No |  |
| dataset | `Array<object>` | - | No |  |
| desc | `string` | - | No |  |
| disableAxisListener | `bool` | `false` | No |  |
| height | `number` | - | No |  |
| highlightedItem | `{ dataIndex?: number, seriesId: number \| string }` | - | No |  |
| id | `string` | - | No |  |
| initialZoom | `Array<{ axisId: number \| string, end: number, start: number }>` | - | No |  |
| margin | `{ bottom?: number, left?: number, right?: number, top?: number }` | - | No |  |
| onHighlightChange | `function(highlightedItem: HighlightItemData \| null) => void` | - | No |  |
| onZoomChange | `function(zoomData: Array<ZoomData>) => void` | - | No |  |
| series | `Array<object>` | - | No |  |
| skipAnimation | `bool` | - | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |
| theme | `'dark' \| 'light'` | - | No |  |
| title | `string` | - | No |  |
| width | `number` | - | No |  |
| xAxis | `Array<object>` | - | No |  |
| yAxis | `Array<object>` | - | No |  |
| zAxis | `Array<{ colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date \| number \| string> } \| { color: Array<string> \| func, max?: Date \| number, min?: Date \| number, type: 'continuous' } \| { colors: Array<string>, thresholds: Array<Date \| number>, type: 'piecewise' }, data?: array, dataKey?: string, id?: string, max?: number, min?: number }>` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

## Source code

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

- [/packages/x-charts-pro/src/ChartsContainerPro/ChartsContainerPro.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts-pro/src/ChartsContainerPro/ChartsContainerPro.tsx)

# ChartsDataProvider API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Composition](/x/react-charts/composition/)
- [Charts - Localization](/x/react-charts/localization/)
- [Charts - Plugins](/x/react-charts/plugins/)

## Import

```jsx
import { ChartsDataProvider } from '@mui/x-charts/ChartsDataProvider';
// or
import { ChartsDataProvider } from '@mui/x-charts';
// or
import { ChartsDataProvider } from '@mui/x-charts-pro';
// or
import { ChartsDataProvider } from '@mui/x-charts-premium';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| apiRef | `{ current?: any }` | - | No |  |
| colors | `Array<string> \| func` | `rainbowSurgePalette` | No |  |
| dataset | `Array<object>` | - | No |  |
| experimentalFeatures | `{ keyboardActivation?: bool }` | - | No |  |
| height | `number` | - | No |  |
| id | `string` | - | No |  |
| localeText | `object` | - | No |  |
| margin | `number \| { bottom?: number, left?: number, right?: number, top?: number }` | - | No |  |
| series | `Array<object>` | - | No |  |
| skipAnimation | `bool` | - | No |  |
| slotProps | `object` | - | No |  |
| slots | `object` | - | No |  |
| theme | `'dark' \| 'light'` | - | No |  |
| width | `number` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| baseButton | `Button` | - | The component used for buttons. |
| baseIconButton | `IconButton` | - | The component used for icon buttons. |
| baseToggleButton | `ToggleButton` | - | The component used for toggle buttons.
Note: MUI's `ToggleButton` has an incompatible `href` prop, so it must be cast:
`ToggleButton as unknown as React.ComponentType`. |
| baseToggleButtonGroup | `ToggleButtonGroup` | - | The component used for toggle button groups. |

## Source code

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

- [/packages/x-charts/src/ChartsDataProvider/ChartsDataProvider.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/ChartsDataProvider/ChartsDataProvider.tsx)

# ChartsDataProviderPremium API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Composition](/x/react-charts/composition/)
- Charts - Range Bar

## Import

```jsx
import { ChartsDataProviderPremium } from '@mui/x-charts-premium/ChartsDataProviderPremium';
// or
import { ChartsDataProviderPremium } from '@mui/x-charts-premium';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| apiRef | `{ current?: any }` | - | No |  |
| colors | `Array<string> \| func` | `rainbowSurgePalette` | No |  |
| dataset | `Array<object>` | - | No |  |
| experimentalFeatures | `{ keyboardActivation?: bool }` | - | No |  |
| height | `number` | - | No |  |
| id | `string` | - | No |  |
| localeText | `object` | - | No |  |
| margin | `number \| { bottom?: number, left?: number, right?: number, top?: number }` | - | No |  |
| series | `Array<object>` | - | No |  |
| skipAnimation | `bool` | - | No |  |
| slotProps | `object` | - | No |  |
| slots | `object` | - | No |  |
| theme | `'dark' \| 'light'` | - | No |  |
| width | `number` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| baseButton | `Button` | - | The component used for buttons. |
| baseDivider | `Divider` | - | The component used for dividers. |
| baseIconButton | `IconButton` | - | The component used for icon buttons. |
| baseMenuItem | `MenuItem` | - | The component used for menu items. |
| baseMenuList | `MenuList` | - | The component used for menu lists. |
| basePopper | `Popper` | - | The component used for poppers. |
| baseToggleButton | `ToggleButton` | - | The component used for toggle buttons.
Note: MUI's `ToggleButton` has an incompatible `href` prop, so it must be cast:
`ToggleButton as unknown as React.ComponentType`. |
| baseToggleButtonGroup | `ToggleButtonGroup` | - | The component used for toggle button groups. |
| baseTooltip | `Tooltip` | - | The component used for tooltips. |
| exportIcon | `ChartsExportIcon` | - | Icon displayed on the toolbar's export button. |
| zoomInIcon | `ChartsZoomInIcon` | - | Icon displayed on the toolbar's zoom in button. |
| zoomOutIcon | `ChartsZoomOutIcon` | - | Icon displayed on the toolbar's zoom out button. |

## Source code

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

- [/packages/x-charts-premium/src/ChartsDataProviderPremium/ChartsDataProviderPremium.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts-premium/src/ChartsDataProviderPremium/ChartsDataProviderPremium.tsx)

# ChartsDataProviderPro API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Composition](/x/react-charts/composition/)

## Import

```jsx
import { ChartsDataProviderPro } from '@mui/x-charts-pro/ChartsDataProviderPro';
// or
import { ChartsDataProviderPro } from '@mui/x-charts-pro';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| apiRef | `{ current?: any }` | - | No |  |
| colors | `Array<string> \| func` | `rainbowSurgePalette` | No |  |
| dataset | `Array<object>` | - | No |  |
| experimentalFeatures | `{ keyboardActivation?: bool }` | - | No |  |
| height | `number` | - | No |  |
| id | `string` | - | No |  |
| localeText | `object` | - | No |  |
| margin | `number \| { bottom?: number, left?: number, right?: number, top?: number }` | - | No |  |
| series | `Array<object>` | - | No |  |
| skipAnimation | `bool` | - | No |  |
| slotProps | `object` | - | No |  |
| slots | `object` | - | No |  |
| theme | `'dark' \| 'light'` | - | No |  |
| width | `number` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| baseButton | `Button` | - | The component used for buttons. |
| baseDivider | `Divider` | - | The component used for dividers. |
| baseIconButton | `IconButton` | - | The component used for icon buttons. |
| baseMenuItem | `MenuItem` | - | The component used for menu items. |
| baseMenuList | `MenuList` | - | The component used for menu lists. |
| basePopper | `Popper` | - | The component used for poppers. |
| baseToggleButton | `ToggleButton` | - | The component used for toggle buttons.
Note: MUI's `ToggleButton` has an incompatible `href` prop, so it must be cast:
`ToggleButton as unknown as React.ComponentType`. |
| baseToggleButtonGroup | `ToggleButtonGroup` | - | The component used for toggle button groups. |
| baseTooltip | `Tooltip` | - | The component used for tooltips. |
| exportIcon | `ChartsExportIcon` | - | Icon displayed on the toolbar's export button. |
| zoomInIcon | `ChartsZoomInIcon` | - | Icon displayed on the toolbar's zoom in button. |
| zoomOutIcon | `ChartsZoomOutIcon` | - | Icon displayed on the toolbar's zoom out button. |

## Source code

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

- [/packages/x-charts-pro/src/ChartsDataProviderPro/ChartsDataProviderPro.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts-pro/src/ChartsDataProviderPro/ChartsDataProviderPro.tsx)

# ChartsGrid API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Axis ticks and grid](/x/react-charts/axis-ticks/)
- [Charts - Bars](/x/react-charts/bars/)
- [Charts - Composition](/x/react-charts/composition/)
- [Charts - Lines](/x/react-charts/lines/)
- [Charts - Scatter](/x/react-charts/scatter/)

## Import

```jsx
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
// or
import { ChartsGrid } from '@mui/x-charts';
// or
import { ChartsGrid } from '@mui/x-charts-pro';
// or
import { ChartsGrid } from '@mui/x-charts-premium';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| className | `string` | - | No |  |
| horizontal | `bool` | - | No |  |
| vertical | `bool` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

> Any other props supplied will be provided to the root element (native element).

## CSS

### Rule name

| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | horizontalLine | Styles applied to x-axes. |
| - | line | Styles applied to every line element. |
| - | root | Styles applied to the root element. |
| - | verticalLine | Styles applied to y-axes. |

## Source code

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

- [/packages/x-charts/src/ChartsGrid/ChartsGrid.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/ChartsGrid/ChartsGrid.tsx)

# ChartsSurface API

## Demos

For examples and details on the usage of this React component, visit the component demo pages:

- [Charts - Custom components](/x/react-charts/components/)
- [Charts - Composition](/x/react-charts/composition/)

## Import

```jsx
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
// or
import { ChartsSurface } from '@mui/x-charts';
// or
import { ChartsSurface } from '@mui/x-charts-pro';
// or
import { ChartsSurface } from '@mui/x-charts-premium';
```

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| children | `node` | - | No |  |
| desc | `string` | - | No |  |
| sx | `Array<func \| object \| bool> \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |
| title | `string` | - | No |  |

> **Note**: The `ref` is forwarded to the root element.

> Any other props supplied will be provided to the root element (native element).

## CSS

### Rule name

| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | root | Styles applied to the root element. |

## Source code

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

- [/packages/x-charts/src/ChartsSurface/ChartsSurface.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/ChartsSurface/ChartsSurface.tsx)