ChartsTooltip API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import { ChartsTooltip } from '@mui/x-charts';Component name
The nameMuiChartsTooltip can be used when providing default props or style overrides in the theme.Props
| Name | Type | Default | Description | 
|---|---|---|---|
| axisContent | elementType | Component to override the tooltip content when triger is set to 'axis'. | |
| classes | object | Override or extend the styles applied to the component. See CSS API below for more details. | |
| itemContent | elementType | Component to override the tooltip content when triger is set to 'item'. | |
| trigger | 'axis' | 'item' | 'none' | 'item' | Select the kind of tooltip to display - 'item': Shows data about the item below the mouse. - 'axis': Shows values associated with the hovered x value - 'none': Does not display tooltip | 
The component cannot hold a ref.
CSS
| Rule name | Global class | Description | 
|---|---|---|
| root | .MuiChartsTooltip-root | Styles applied to the root element. | 
| markCell | .MuiChartsTooltip-markCell | Styles applied to the markCell element. | 
| labelCell | .MuiChartsTooltip-labelCell | Styles applied to the labelCell element. | 
| valueCell | .MuiChartsTooltip-valueCell | Styles applied to the valueCell element. | 
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's styleOverridesproperty in a custom theme.