Hi,
When zooming into a chart and selecting a point, the selection seems to move along with the scroll bars. I noticed this while adding an annotation feature in my project, and used the selection example from your documentation to test it.
I've attached a couple of screenshots to make it clearer. The selected point shouldn't move - do you know why this is happening?
Thanks!
When zooming into a chart and selecting a point, the selection seems to move along with the scroll bars. I noticed this while adding an annotation feature in my project, and used the selection example from your documentation to test it.
<telerik:RadCartesianChart.Behaviors> <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" SelectionChanged="ChartSelectionBehavior_SelectionChanged_1" /> <telerik:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Both"/> </telerik:RadCartesianChart.Behaviors>
private void ChartSelectionBehavior_SelectionChanged_1(object sender, ChartSelectionChangedEventArgs e) { //Handle selection of the current point if (e.AddedPoints.Count > 0) { var addedPoint = e.AddedPoints[0]; var series = addedPoint.Presenter as LineSeries; //Get the Content Presenter of the series var pointPresenter = series.ChildrenOfType<ContentPresenter>(). Where(cp => cp.Tag == addedPoint).FirstOrDefault(); var ellipseElement = pointPresenter. ChildrenOfType<Ellipse>().FirstOrDefault(); //Do whatever you want with it :) ellipseElement.Fill = new SolidColorBrush(Colors.Red); } //Handle de-selection of the current point if (e.RemovedPoints.Count > 0) { var removedPoint = e.RemovedPoints[0]; var series = removedPoint.Presenter as LineSeries; var pointPresenter = series. ChildrenOfType<ContentPresenter>(). Where(cp => cp.Tag == removedPoint).FirstOrDefault(); var ellipseElement = pointPresenter. ChildrenOfType<Ellipse>().FirstOrDefault(); //Do whatever you want with it :) ellipseElement.Fill = new SolidColorBrush(Colors.Yellow); } }I've attached a couple of screenshots to make it clearer. The selected point shouldn't move - do you know why this is happening?
Thanks!