Skip to main content
All docs
V23.2

SankeyDiagramControl.CustomizeNodeToolTip Event

Occurs before a tooltip is displayed for a node and allows you to format tooltip content.

Namespace: DevExpress.XtraCharts.Sankey

Assembly: DevExpress.XtraCharts.v23.2.UI.dll

NuGet Package: DevExpress.Win.Charts

Declaration

public event CustomizeSankeyNodeToolTipEventHandler CustomizeNodeToolTip

Event Data

The CustomizeNodeToolTip event's data class is CustomizeSankeyNodeToolTipEventArgs. The following properties provide information specific to this event:

Property Description
Content Specifies the tooltip’s content. Inherited from CustomizeSankeyToolTipEventArgs.
Node Returns the node whose tooltip is customized.
NodeColor Returns the color of a node whose tooltip is customized.
Title Specifies the tooltip’s title. Inherited from CustomizeSankeyToolTipEventArgs.

Remarks

Handle the CustomizeLinkToolTip event to customize tooltips for links.

Example

To format tooltip text for nodes, handle the CustomizeNodeToolTip event and specify the CustomizeSankeyToolTipEventArgs.Title and CustomizeSankeyToolTipEventArgs.Content properties.

private void Form1_Load(object sender, EventArgs e) {
    sankeyDiagramControl1.ToolTipOptions.NodeToolTipEnabled = DevExpress.Utils.DefaultBoolean.True;
    sankeyDiagramControl1.ToolTipController = new DevExpress.Utils.ToolTipController { 
        ToolTipType = DevExpress.Utils.ToolTipType.Flyout, 
        AllowHtmlText = true 
    };
    sankeyDiagramControl1.CustomizeNodeToolTip += OnCustomizeNodeToolTip;
}
private void OnCustomizeNodeToolTip(object sender, CustomizeSankeyNodeToolTipEventArgs e) {
    e.Title = $"Country: <u>{e.Node.Tag}</u>";
    e.Content = $"{e.Node.TotalWeight:f1}";
}
See Also