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.v23.1.UI.dll
NuGet Package: DevExpress.Win.Charts
Declaration
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;
}
}