corelibraries-devexpress-dot-xtracharts-dot-sankey-19b9b8ff.md
Contains label options for node labels.
Namespace : DevExpress.XtraCharts.Sankey
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public class SankeyNodeLabel :
IXtraSupportShouldSerialize,
IXtraPartlyDeserializable
Public Class SankeyNodeLabel
Implements IXtraSupportShouldSerialize,
IXtraPartlyDeserializable
The following members return SankeyNodeLabel objects:
Use the SankeyDiagramControl.NodeLabel property to access node label settings. The following options allow you to configure text for node labels:
TextOrientation - Label text orientation.
MaxWidth - Label width in pixels.
MaxLineCount - The number of lines that multiline text can occupy.
TextAlignment - Text alignment.
DXFont - Font parameters.
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);
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:
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)";
}
}
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
Object SankeyNodeLabel
See Also