Skip to main content
A newer version of this page is available. .
All docs
V21.1

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.v21.1.UI.dll

NuGet Packages: DevExpress.Win.Charts, DevExpress.Win.Design

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 snippets (auto-collected from DevExpress Examples) contain references 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