PointTooltip
live example
Explore the API in the live example.
api reference
PointTooltip()
Component implementing the point tooltip feature. The point tooltip is a pre-formatted tooltip that takes an array of plot data and displays it in the tooltip as a list of plots with colored square markers. Can be used in charts where the tooltip displays info at a specific point of the widget (hence the name), such as line charts or heat maps. It inherits all methods from the [Tooltip] ../components/tooltip.html component. The tooltip consists of the X coordinate of the current data point(s) (which can be formatted using [xFormat] ../components/tooltip.html#titleFormat ) and the list of Y coordinates for the plots (formatted using [yFormat] ../components/tooltip.html#valueFormat ).
PointTooltip.titleFormat([format])
Sets the format for the tooltip title.
Parameters
Name | Type | Description |
---|---|---|
format | Function | optionalFunction to use as the formatter. May take one parameter which is the title of the tooltip. Can be HTML formatted. Default value is d => d . |
Returns
Widget
Reference to the Widget API.
PointTooltip.valueFormat([format])
Sets the format of the tooltip entry values.
Parameters
Name | Type | Description |
---|---|---|
format | Function | optionalFunction to use as the formatter. May take one parameter which is the data point for the current plot's entry containing the plot name and the data. Can be HTML formatted. If the return value is null, the value is ignored. Default value is d => d.y . |
Returns
Widget
Reference to the Widget API.