[object Promise]

# AreaElement API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| color | `string` | - | Yes |  |
| d | `string` | - | Yes |  |
| seriesId | `string` | - | Yes |  |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| gradientId | `string` | - | No |  |
| skipAnimation | `bool` | `false` | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| area | `AnimatedArea` | `.MuiLineChart-area` | The component that renders the area. |

## 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/LineChart/AreaElement.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/AreaElement.tsx)

# AreaPlot API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| onItemClick | `function(event: ChartsActivationEvent<SVGElement>, lineItemIdentifier: LineItemClickIdentifier) => void` | - | No |  |
| skipAnimation | `bool` | `false` | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| area | `AnimatedArea` | - | The component that renders the area. |

## 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/LineChart/AreaPlot.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/AreaPlot.tsx)

# LineChart API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Label](/x/react-charts/label/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| series | `Array<object>` | - | Yes |  |
| apiRef | `{ current?: object }` | - | No |  |
| axesGap | `number` | `0` | No |  |
| axisHighlight | `{ x?: 'band' \| 'line' \| 'none', y?: 'band' \| 'line' \| 'none' }` | `{ x: 'line' }` | 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 |  |
| disableKeyboardNavigation | `bool` | - | No |  |
| disableLineItemHighlight | `bool` | - | No |  |
| experimentalFeatures | `{ enablePositionBasedPointerInteraction?: bool, keyboardActivation?: bool }` | - | No |  |
| focusItemOnClick | `bool` | `false` | No |  |
| grid | `{ horizontal?: bool, vertical?: bool }` | - | No |  |
| height | `number` | - | No |  |
| hiddenItems | `Array<{ dataIndex?: number, seriesId: string, type: 'line' } \| { dataIndex?: number, seriesId: string, type?: 'line' }>` | - | No |  |
| hideLegend | `bool` | - | No |  |
| highlightedAxis | `Array<{ axisId: number \| string, dataIndex: number }>` | - | No |  |
| highlightedItem | `{ dataIndex?: number, seriesId: string } \| { dataIndex?: number, seriesId: string, type: 'line' }` | - | No |  |
| id | `string` | - | No |  |
| initialHiddenItems | `Array<{ dataIndex?: number, seriesId: string, type: 'line' } \| { dataIndex?: number, seriesId: string, type?: 'line' }>` | - | No |  |
| loading | `bool` | `false` | No |  |
| localeText | `object` | - | No |  |
| margin | `number \| { bottom?: number, left?: number, right?: number, top?: number }` | - | No |  |
| onAreaClick | `func` | - | 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 |  |
| onLineClick | `func` | - | No |  |
| onMarkClick | `func` | - | No |  |
| onTooltipAxisChange | `function(axisItems: Array<AxisItemIdentifier>) => void` | - | No |  |
| onTooltipItemChange | `function(tooltipItem: SeriesItemIdentifier<SeriesType> \| null) => void` | - | No |  |
| showToolbar | `bool` | `false` | No |  |
| skipAnimation | `bool` | `false` | 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: 'line' }` | - | No |  |
| width | `number` | - | No |  |
| xAxis | `Array<object>` | - | No |  |
| yAxis | `Array<object>` | - | No |  |

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

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

## Theme default props

You can use `MuiLineChart` to change the default props of this component with the theme.

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| area | `AnimatedArea` | - | The component that renders the area. |
| axisLabel | `ChartsText` | - | Custom component for axis label. |
| axisLine | `'line'` | - | Custom component for the axis main line. |
| axisTick | `'line'` | - | Custom component for the axis tick. |
| axisTickLabel | `ChartsText` | - | Custom component for tick label. |
| 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. |
| legend | `ChartsLegend` | - | Custom rendering of the legend. |
| line | `LineElementPath` | - | The component that renders the line. |
| lineHighlight | `LineHighlightElement` | - | The component that renders the line highlight. |
| loadingOverlay | `ChartsLoadingOverlay` | - | Overlay component rendered when the chart is in a loading state. |
| mark | `MarkElement` | - | The component that renders the marks. |
| noDataOverlay | `ChartsNoDataOverlay` | - | Overlay component rendered when the chart has no data to display. |
| toolbar | `ChartsToolbar` | - | Custom component for the toolbar. |
| tooltip | `ChartsTooltipRoot` | - | Custom component for the tooltip popper. |
| xAxis | `ChartsXAxis` | - | Custom component for the x-axis. |
| yAxis | `ChartsYAxis` | - | Custom component for the y-axis. |

## 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/LineChart/LineChart.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/LineChart.tsx)

# LineElement API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| color | `string` | - | Yes |  |
| d | `string` | - | Yes |  |
| seriesId | `string` | - | Yes |  |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| gradientId | `string` | - | No |  |
| hidden | `bool` | - | No |  |
| skipAnimation | `bool` | `false` | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| line | `LineElementPath` | `.MuiLineChart-line` | The component that renders the line. |

## 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/LineChart/LineElement.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/LineElement.tsx)

# LineHighlightElement API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| seriesId | `string` | - | Yes |  |
| shape | `'circle' \| 'cross' \| 'diamond' \| 'square' \| 'star' \| 'triangle' \| 'wye'` | - | Yes |  |

> **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/src/LineChart/LineHighlightElement.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/LineHighlightElement.tsx)

# LineHighlightPlot API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| lineHighlight | `LineHighlightElement` | - | The component that renders the line highlight. |

## 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/LineChart/LineHighlightPlot.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/LineHighlightPlot.tsx)

# LinePlot API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| onItemClick | `function(event: ChartsActivationEvent<SVGElement>, lineItemIdentifier: LineItemClickIdentifier) => void` | - | No |  |
| skipAnimation | `bool` | `false` | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| line | `LineElementPath` | - | The component that renders the line. |

## 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/LineChart/LinePlot.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/LinePlot.tsx)

# MarkElement API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| dataIndex | `number` | - | Yes |  |
| seriesId | `string` | - | Yes |  |
| shape | `'circle' \| 'cross' \| 'diamond' \| 'square' \| 'star' \| 'triangle' \| 'wye'` | - | Yes |  |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| hidden | `bool` | `false` | No |  |
| isFaded | `bool` | `false` | No |  |
| isHighlighted | `bool` | `false` | No |  |
| skipAnimation | `bool` | `false` | 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 |
|--------------|-----------|-------------|
| - | mark | Styles applied to the mark 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/LineChart/MarkElement.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/MarkElement.tsx)

# MarkPlot API

## Demos

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

- [Charts - Areas demos](/x/react-charts/areas-demo/)
- [Charts - Line demos](/x/react-charts/line-demo/)
- [Charts - Lines](/x/react-charts/lines/)

## Import

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

## Props

| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| onItemClick | `function(event: ChartsActivationEvent<SVGElement>, lineItemIdentifier: LineItemClickIdentifier) => void` | - | No |  |
| skipAnimation | `bool` | `false` | No |  |
| slotProps | `object` | `{}` | No |  |
| slots | `object` | `{}` | No |  |

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

## Slots

| Name | Default | Class | Description |
|------|---------|-------|-------------|
| mark | `MarkElement` | - | The component that renders the marks. |

## 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/LineChart/MarkPlot.tsx](https://github.com/mui/material-ui/tree/HEAD/packages/x-charts/src/LineChart/MarkPlot.tsx)