App Crash on iOS when using CartesianGridLineAnnotation

1 Answer 42 Views
Chart
Steve
Top achievements
Rank 1
Iron
Steve asked on 19 Jul 2023, 11:14 PM

When using a CartesianGridLineAnnotation, if Value is not set, it causes an app crash.  This does not happen on Android or Windows.

Code that crashes iOS app:

<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>

Work around, set Value to 0

<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}"
                                                     Value="0"/>

            </telerik:RadCartesianChart.Annotations>

            <telerik:RadCartesianChart.ChartBehaviors>

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

        </telerik:RadCartesianChart>

Lance | Manager Technical Support
Telerik team
commented on 20 Jul 2023, 01:35 PM

After logging the bug report, I have also updated your account's Telerik Points as a small token of appreciation for bringing this to our attention. Thanks again!

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 20 Jul 2023, 12:46 PM

Hi Steve,

Thank you for sharing the workaround with the community. As to the issue itself, I have created an official Bug Report on your behalf in the Feedback Portal => Chart: Set Default Value for CartesianGridLineAnnotation (telerik.com).

Regards,
Lance | Manager Technical Support
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
Lance | Manager Technical Support
Telerik team
Share this question
or