Sankey Tooltip
The Sankey Diagram for Blazor displays Tooltips when the user hovers the links and nodes. You can customize the rendering of these Tooltips through dedicated templates:
To use the templates, declare a <SankeyTooltip> tag as a direct child of <TelerikSankey>. Add the desired template inside the <SankeyTooltip> tag.
Link Tooltip Template
The LinkTemplate controls the content of the Tooltip that will appear when the user hovers a link. The NodeTemplate exposes a context of type
SankeyLinkTooltipTemplateContext which provides the following properties:
| Property | Type | Description |
|---|---|---|
Source | SankeyDataNode | The source of the hovered link. Provides details for the source node such as its label, opacity, color, width, offset, alignment, and more. |
Target | SankeyDataNode | The target of the hovered link. Provides details for the target node such as its label, opacity, color, width, offset, alignment and more. |
Value | double? | The hovered link value. |
Node Tooltip Template
The NodeTemplate controls the content of the Tooltip that will appear when the user hovers a node. The NodeTemplate exposes a context of type SankeyNodeTooltipTemplateContext which provides the following properties:
| Property | Type | Description |
|---|---|---|
DataItem | SankeyDataNode | The node that the user hovered. The SankeyDataNode provides details for the hovered node such as its label, opacity, color, width, offset and alignment. |
Value | double? | The hovered node value. |
Example
Customizing the Sankey Tooltips