ChartSelectionBehavior w/ DataPointSelectionMode does not fire event on windows

1 Answer 68 Views
Chart
Steve
Top achievements
Rank 1
Iron
Steve asked on 27 Jun 2023, 08:29 PM

When using a ChartSelectionBehavior, the DataPointSelectionMode never fires the SelectionChanged event when clicking on a data point.

I have used both Single and Multiple modes without success.  The SeriesSelectionMode does work, however.

<Grid RowDefinitions="*">

        <telerik:RadCartesianChart x:Name="chart"
                                   Grid.Row="0">

            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:NumericalAxis x:Name="xAxis" />
            </telerik:RadCartesianChart.HorizontalAxis>

            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:NumericalAxis x:Name="yAxis" />
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.Series />

            <telerik:RadCartesianChart.Annotations>

                <telerik:CartesianGridLineAnnotation x:Name="marker"
                                                     Axis="{x:Reference xAxis}" />

            </telerik:RadCartesianChart.Annotations>

            <telerik:RadCartesianChart.ChartBehaviors>

                <telerik:ChartSelectionBehavior x:Name="selection"
                                                DataPointSelectionMode="Single"
                                                SelectionChanged="ChartSelectionBehavior_SelectionChanged" />
            </telerik:RadCartesianChart.ChartBehaviors>

        </telerik:RadCartesianChart>

        <ScrollView Grid.Row="0"
                    VerticalOptions="Start"
                    x:Name="legendContainer"
                    HeightRequest="80">
            <telerik:RadLegend x:Name="legend"
                               LegendProvider="{x:Reference Name=chart}" />
        </ScrollView>
    </Grid>

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 30 Jun 2023, 07:49 AM | edited on 30 Jun 2023, 07:52 AM

Hi Steve,

Thank you for the provided code. 

I have tested the scenario and the selection behavior works on series. The event does not fire on data point. I have logged this on your behalf here: https://feedback.telerik.com/maui/1614623-chart-winui-datapoint-selection-event-is-not-fired-on-cartesian-series Follow the item to track its progress.

I cannot suggest a workaround for this behavior. You caŠ½ switch to SeriesSelectionMode on WinUI.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Chart
Asked by
Steve
Top achievements
Rank 1
Iron
Answers by
Didi
Telerik team
Share this question
or