- Since:
-
- 9.4.0 Introduced
- 10.1.0 Added formatting using yAxis.formatter
Type Definitions
-
HeadsUpConfig
-
Configures the display of numerical chart data in an area on the chart. The heads-up values are displayed when either the crosshair is on or the heads-up is toggled on in the chart layout.
Type:
- Since:
-
- 9.4.0 Introduced
- 10.1.0 Added property
titleOnly.
Properties:
Name Type Argument Description exportstring <optional>
Name of the exported class, usually "HeadsUp".
offDelaystring <optional>
Set to allow delay in transitioning heads-up off after release of long-press. e.g., "5s".
titleOnlyboolean <optional>
Set to true to only display the plot names.
displayMappingRecord.<string, (Record.<string, string>|undefined)> <optional>
Allows specification of custom labels to display in the heads-up 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.backgroundColorstring <optional>
Color of backing behind the heads-up area.
Example
Use handlebars to reference a study name in a `displayMapping`:
displayMapping: { ... // instead of showing "ma 1", "ma 2", "ma 3" in the heads-up, 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}}" } }
