ElementTooltip

live example

Explore the API in the live example.

api reference

ElementTooltip()
Component implementing the element tooltip feature. The element tooltip is a pre-formatted tooltip that takes a data point and displays its attributes in the tooltip with a colored left border. The name of the plot group the element belongs to is used as the tooltip title and the various attributes are displayed in a column of entries. Each entry is a label-value pair. The element tooltip can be used in charts where the tooltip displays info for a specific element in the widget (hence the name), such as bar charts or pie charts. It inherits all methods from the Tooltip component.
ElementTooltip.labelFormat([format])
Sets the format for the tooltip entry labels.

Parameters

NameTypeDescription
formatFunctionoptionalFunction to use as the formatter. May take one parameter which is the entry label. Can be HTML formatted. Default value is d => d+:.

Returns

Widget
Reference to the Widget API.
ElementTooltip.titleFormat([format])
Sets the format for the tooltip title.

Parameters

NameTypeDescription
formatFunctionoptionalFunction 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.
ElementTooltip.valueFormat([format])
Sets the format for the tooltip entry values.

Parameters

NameTypeDescription
formatFunctionoptionalFunction to use as the formatter. May take two parameters: the value for the entry and the entry name (label before the value). Can be HTML formatted. Default value is d => d.

Returns

Widget
Reference to the Widget API.