ChartsTooltipContainer API
API reference docs for the React ChartsTooltipContainer component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip';
// or
import { ChartsTooltipContainer } from '@mui/x-charts';
// or
import { ChartsTooltipContainer } from '@mui/x-charts-pro/ChartsTooltip';
// or
import { ChartsTooltipContainer } from '@mui/x-charts-pro';
// or
import { ChartsTooltipContainer } from '@mui/x-charts-premium/ChartsTooltip';
// or
import { ChartsTooltipContainer } from '@mui/x-charts-premium';Learn about the difference by reading this guide on minimizing bundle size.
| Name | Type | Default | Description |
|---|---|---|---|
| anchor | 'chart' | 'node' | 'pointer' | 'pointer' | Determine if the tooltip should be placed on the pointer location or on the node. |
| children | node | - | Popper render function or node. |
| classes | Partial | - | Override or extend the styles applied to the component. See CSS classes API below for more details. |
| position | 'bottom' | 'left' | 'right' | 'top' | - | Determines the tooltip position relatively to the anchor. |
| slotProps | ChartsTooltipContainerSlotProps | {} | The props used for each component slot. |
| slots | ChartsTooltipContainerSlots | {} | Overridable component slots. See Slots API below for more details. |
| trigger | 'axis' | 'item' | 'none' | 'axis' | 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. |
| Slot name | Class name | Default component | Description |
|---|---|---|---|
| root | 'div' | The component that renders the root. |
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.