Hi,
I'm trying to read the value of selectedPoint.DataItem in RadCartesianChartView when selecting the bar.
DataPoint selectedPoint = e.P0.SelectedDataPoint();
var dataItem = selectedPoint.DataItem;
public class CastJavaObject
{
public static T Cast<T>(Java.Lang.Object? obj) where T : class
{
var propInfo = obj.GetType().GetProperty("Instance");
return propInfo == null ? null : propInfo.GetValue(obj, null) as T;
}
}
var poco = CastJavaObject.Cast<Result>(dataItem);
Thanks.
@Didi any help?
I am researching this case and will send an update next week.
Hi,
You have the information for the selected point in this way:
ChartSelectionBehavior selectionBehavior = new ChartSelectionBehavior(); selectionBehavior.SeriesSelectionMode = ChartSelectionMode.None; selectionBehavior.DataPointsSelectionMode = ChartSelectionMode.Single; chart.Behaviors.Add(selectionBehavior); selectionBehavior.SelectionChange += SelectionBehavior_SelectionChange;
private void SelectionBehavior_SelectionChange(object sender, ChartSelectionChangeEventArgs e) { DataPoint selectedPoint = e.P0.SelectedDataPoint(); }
How to display the data is up to you. This requires custom development from your side.