All docs
V21.2
21.2
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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.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;
    }
}
See Also