Skip to main content
All docs
V24.2

SankeyDiagramControl.SelectedItemsChanged Event

Occurs after a user changes the Sankey selection state and this change is applied to the SelectedItems collection.

Namespace: DevExpress.XtraCharts.Sankey

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

Declaration

public event SankeySelectedItemsChangedEventHandler SelectedItemsChanged

Event Data

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

Property Description
SelectedLinks Returns selected Sankey links.
SelectedNodes Returns selected Sankey nodes.

Remarks

The following example uses the SankeySelectedItemsChangedEventArgs.SelectedLinks property to add selected links to a custom selectedExportItems collection:

HashSet<ExportItem> selectedExportItems = new HashSet<ExportItem>();

private void sankeyDiagramControl1_SelectedItemsChanged(object sender, SankeySelectedItemsChangedEventArgs e){
    selectedExportItems.Clear();
    foreach (SankeyLink link in e.SelectedLinks) {
        selectedExportItems.Add((ExportItem)link.Tags[0]);
    }
}

//...

public class ExportItem {
    public string Exporter { get; set; }
    public string Importer { get; set; }
    public double Sum { get; set; }

    public ExportItem(string from, string to, double weight) {
        this.Exporter = from;
        this.Importer = to;
        this.Sum = weight;
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedItemsChanged event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also