Tooltips and Data Labels
Tooltips and data labels are essential features for displaying detailed information about data points in your charts.Tooltips
Tooltips appear when users hover over data points, providing contextual information about the data.Basic Tooltip Configuration
Tooltip Positioning
Tooltip Formatting
Customize tooltip content using formatters:ts/Core/TooltipOptions.ts:89-150):
Shared Tooltips
Display information for multiple series in one tooltip:Split Tooltips
Show separate tooltip boxes for each series:Advanced Tooltip Features
Data Labels
Data labels display values directly on the chart, making data immediately visible without interaction.Basic Data Labels
Data Label Positioning
Custom Data Label Formatting
Data Labels Styling
Data Labels for Specific Points
Tooltip vs Data Labels
| Feature | Tooltips | Data Labels |
|---|---|---|
| Visibility | On hover/interaction | Always visible |
| Space Usage | Minimal | Can clutter chart |
| Detail Level | Can show extensive info | Best for key values |
| Performance | Better for large datasets | May impact rendering |
| Accessibility | Requires interaction | Immediately visible |
Real-World Example
From the drilldown demo (samples/highcharts/demo/column-drilldown/demo.js:41-44):
Best Practices
Tooltip Performance
- Use
animation: falsefor charts with frequent updates - Consider
outside: truefor better performance with complex layouts - Use format strings instead of formatters when possible for better performance