Skip to contentSkip to content

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.

Props

NameTypeDefaultDescription
anchor'chart'
| 'node'
| 'pointer'
'pointer'

Determine if the tooltip should be placed on the pointer location or on the node.

childrennode-

Popper render function or node.

classesPartial-

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.

slotPropsChartsTooltipContainerSlotProps{}

The props used for each component slot.

slotsChartsTooltipContainerSlots{}

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.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
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.