Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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