Back to Devexpress

SankeyNodeLabel Class

corelibraries-devexpress-dot-xtracharts-dot-sankey-19b9b8ff.md

latest3.6 KB
Original Source

SankeyNodeLabel Class

Contains label options for node labels.

Namespace : DevExpress.XtraCharts.Sankey

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class SankeyNodeLabel :
    IXtraSupportShouldSerialize,
    IXtraPartlyDeserializable
vb
Public Class SankeyNodeLabel
    Implements IXtraSupportShouldSerialize,
               IXtraPartlyDeserializable

The following members return SankeyNodeLabel objects:

Remarks

Use the SankeyDiagramControl.NodeLabel property to access node label settings. The following options allow you to configure text for node labels:

csharp
sankeyDiagramControl1.NodeLabel.TextOrientation = TextOrientation.TopToBottom;
sankeyDiagramControl1.NodeLabel.MaxWidth = 200;
sankeyDiagramControl1.NodeLabel.MaxLineCount = 1;
sankeyDiagramControl1.NodeLabel.TextAlignment = StringAlignment.Center;
sankeyDiagramControl1.NodeLabel.Font = new Font(FontFamily.GenericSerif, 10);
vb
sankeyDiagramControl1.NodeLabel.TextOrientation = TextOrientation.TopToBottom
sankeyDiagramControl1.NodeLabel.MaxWidth = 200
sankeyDiagramControl1.NodeLabel.MaxLineCount = 1
sankeyDiagramControl1.NodeLabel.TextAlignment = StringAlignment.Center
sankeyDiagramControl1.NodeLabel.Font = New Font(FontFamily.GenericSerif, 10)

You can also handle the CustomizeNode event to access a specific node and customize it based on a certain condition:

csharp
sankeyDiagramControl1.CustomizeNode += OnCustomizeNode;
//...
private void OnCustomizeNode(object sender, CustomizeSankeyNodeEventArgs e) {
    if (e.Label.Text == "France" && e.Node.Level == 0) {
        e.Label.Font = new Font("Tahoma", 16);
        e.Label.Text = "France (Source)";
    }
}
vb
Private Sub OnCustomizeNode(ByVal sender As Object, ByVal e As CustomizeSankeyNodeEventArgs)
    If e.Label.Text Is "France" AndAlso e.Node.Level = 0 Then
        e.Label.Font = New Font("Tahoma", 16)
        e.Label.Text = "France (Source)"
    End If
End Sub

Inheritance

Object SankeyNodeLabel

See Also

SankeyNodeLabel Members

DevExpress.XtraCharts.Sankey Namespace