Selecting points in RadCartesianChart with ScatterAreaSeries

0 Answers 9 Views
Chart
Dominic
Top achievements
Rank 1
Dominic asked on 30 Mar 2024, 11:20 PM

Hello!

I'm using a `<RadCartesianChart>` with `<ScatterAreaSeries> to visualize some data as a histogram.

I'd like the user to be able to select a data point in that chart.

I've been using this guide: https://docs.telerik.com/devtools/wpf/controls/radchartview/features/behaviors/selection
but nothing seems to work.

If I add

<telerik:RadCartesianChart.Behaviors>
    <telerik:ChartSelectionBehavior />
</telerik:RadCartesianChart.Behaviors>

I still can't seem to select anything. The `SelectionChanged` event also never arrives when I click on the chart.
When I set a random point as selected programmatically via:

RadCartesianChart chart = this.GetTemplateChild("Histogram_Chart") as RadCartesianChart;
var chartSeries = (ScatterAreaSeries)chart.Series[0];
ScatterDataPoint dataPoint = chartSeries.DataPoints[10];
dataPoint.IsSelected = true;

it still doesn't change how the chart looks.

Am I missing something or is selection just not possible for ScatterAreaSeries?

Thanks in advance!

Stenly
Telerik team
commented on 01 Apr 2024, 07:25 AM

A selection behavior in the scope of the ScatterAreaSeries is not supported since the data points of the ScatterAreaSeries are represented by a single Path element, whose Data property is calculated based on the XValue and YValue properties of each ScatterDataPoint.

With this in mind, could you share a bit more information about how exactly should the ScatterAreaSeries behave when a user selects a part of it? Should the whole Path element's color change?

No answers yet. Maybe you can help?

Tags
Chart
Asked by
Dominic
Top achievements
Rank 1
Share this question
or