- Since:
-
- 9.8.0 Introduced
- 10.1.0 Added formatting using yAxis.formatter
Type Definitions
-
TooltipConfig
-
UI tooltip configuration. Configures the tooltip plugin that displays a floating DOM element with the prices of the plots as of the bar the cursor is hovering over.
Type:
- Since:
-
9.8.0
Properties:
Name Type Argument Description exportstring <optional>
Name of the exported class, usually "Tooltip".
displayMappingRecord.<string, (Record.<string, string>|undefined)> <optional>
Allows specification of custom labels to display in the tooltip area in lieu of the standard field names. Using the key
globalallows the value mapping to apply to all plots. Using a key matching a plot name restricts the mapping to that plot name. You can use handlebars ({{xxx}}) to reference a study input. See example for details.Example
Use handlebars to reference a study name in a `displayMapping`:
displayMapping: { ... // instead of showing "ma 1", "ma 2", "ma 3" in the tooltip, now it will show "ma 10", "ma 50", "ma 200" (assuming these 3 values are the maCross input values). maCross: { "ma 1": "ma\u200c{{MA 1 Period}}", "ma 2": "ma\u200c{{MA 2 Period}}", "ma 3": "ma\u200c{{MA 3 Period}}" } }
