Back to Devexpress

SankeyDiagramControl.CustomizeNode Event

windowsforms-devexpress-dot-xtracharts-dot-sankey-dot-sankeydiagramcontrol-061ac7e5.md

latest2.4 KB
Original Source

SankeyDiagramControl.CustomizeNode Event

Occurs for each node and allows you to customize a specific node based on a specified condition.

Namespace : DevExpress.XtraCharts.Sankey

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

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
public event CustomizeSankeyNodeEventHandler CustomizeNode
vb
Public Event CustomizeNode As CustomizeSankeyNodeEventHandler

Event Data

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

PropertyDescription
LabelReturns a node label to be customized.
NodeReturns a node to be customized.
NodeColorReturns a node color.

Remarks

The following code customizes label settings for the “France” node:

csharp
sankeyDiagramControl1.CustomizeNode += OnCustomizeNode;
//...
private void OnCustomizeNode(object sender, CustomizeSankeyNodeEventArgs e) {
    if (e.Label.Text == "France" && e.Node.Level == 0) {
        e.Label.Font = SystemFonts.DefaultFont;
        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 = SystemFonts.DefaultFont
        e.Label.Text = "France (Source)"
    End If
End Sub

See Also

SankeyDiagramControl Class

SankeyDiagramControl Members

DevExpress.XtraCharts.Sankey Namespace