ChartTooltip and ChartTooltipContent components provide themed, accessible tooltips for all chart types. They automatically adapt to the mineral palette and respect light/dark themes.
Basic usage
--card for the background and --border for the border, adapting to the active theme.
With chart config
The tooltip reads labels and colors from thechartConfig passed to ChartContainer:
Custom formatting
Value formatter
Format tooltip values (e.g., currency, percentages):Label formatter
Customize the tooltip header label:Tooltip with indicator
Show a color indicator (dot, line, or dashed) next to each value:Hide label
For single-series charts where the label is redundant:Cursor styling
Customize the hover cursor (the line or area that follows the mouse):Styling guidelines
- Use the default
ChartTooltipContentfor consistency across the ecosystem - Include tooltips on all charts — they are the primary way users read exact values
- Use value formatters for currency, percentages, and large numbers
- The tooltip automatically handles light/dark themes via CSS custom properties
- Keep custom formatting minimal — the default styling is designed to be consistent