We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfChart version 17.1.0.52 not working on Xamarin 4.0 in UWP

Thread ID:

Created:

Updated:

Platform:

Replies:

145454 Jun 22,2019 04:45 PM UTC Jun 24,2019 10:43 AM UTC Xamarin.Forms 2
loading
Tags: SfChart
Emil
Asked On June 22, 2019 04:45 PM UTC

I am getting 2 different exception xamarin.forms 4.0 verson using latest SfChart version. It was working fine in previous versions

here is my implementation:

 <chart:SfChart x:Name="Chart" SelectionChanged="Chart_SelectionChanged" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"  
              >


                    <chart:SfChart.Title>

                        <chart:ChartTitle Text="{Binding ChartTitle}"/>

                    </chart:SfChart.Title>
                    <chart:SfChart.PrimaryAxis>

                        <chart:DateTimeCategoryAxis AutoScrollingDelta="7"   AutoScrollingMode="End"  >

                            <chart:DateTimeCategoryAxis.Title>

                                <chart:ChartAxisTitle Text="{resx:Translate Date}"></chart:ChartAxisTitle>

                            </chart:DateTimeCategoryAxis.Title>

                        </chart:DateTimeCategoryAxis>

                    </chart:SfChart.PrimaryAxis>

                    <chart:SfChart.SecondaryAxis>

                        <chart:NumericalAxis  Minimum="0" Maximum="{Binding NumericalAxisMax}" Interval="{Binding NumericalAxisInterval}" >

                            <chart:NumericalAxis.Title>

                                <chart:ChartAxisTitle Text="{Binding NumericalAxisTitle}" ></chart:ChartAxisTitle>

                            </chart:NumericalAxis.Title>

                        </chart:NumericalAxis>

                    </chart:SfChart.SecondaryAxis>

                    <chart:SfChart.Series>

                        <chart:LineSeries EnableDataPointSelection="{Binding EnableDataPointSelection}"  XBindingPath="XValue" YBindingPath="YValue" 
                                  SelectedDataPointColor="Yellow"  ItemsSource="{Binding NumericMonthStats, Mode=OneWay}"  EnableAnimation = "true"
                                  AnimationDuration="0.8" >
                            <chart:LineSeries.DataMarker>
                                <chart:ChartDataMarker/>
                            </chart:LineSeries.DataMarker>
                        </chart:LineSeries>

                    </chart:SfChart.Series>
                    <chart:SfChart.ChartBehaviors>

                        <chart:ChartZoomPanBehavior x:Name="ZoomBehavior"  ZoomMode="X"/>

                    </chart:SfChart.ChartBehaviors>

                </chart:SfChart>

System.Exception: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
   at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
   at Syncfusion.UI.Xaml.Charts.ChartCartesianAxisPanel.ComputeSize(Size availableSize)
   at Syncfusion.UI.Xaml.Charts.ChartAxisBase2D.ComputeDesiredSize(Size size)
   at Syncfusion.UI.Xaml.Charts.ChartColumnDefinition.Measure(Size size, List`1 nearSizes, List`1 farSizes)
   at Syncfusion.UI.Xaml.Charts.ChartCartesianAxisLayoutPanel.MeasureAxis(Size ava


System.ArgumentOutOfRangeException: Value to add was out of range.
Parameter name: value
   at System.DateTime.Add(Double value, Int32 scale)
   at Syncfusion.UI.Xaml.Charts.ChartZoomPanBehavior.RaiseZoomChangingEvent(Double zoomPosition, Double zoomFactor, ChartAxisBase2D axis)
   at Syncfusion.UI.Xaml.Charts.ChartZoomPanBehavior.Zoom(Double cumulativeScale, Double origin, ChartAxisBase2D axis)
   at Syncfusion.UI.Xaml.Charts.ChartZoomPanBehavior.MouseWheelZoom(Point mousePoint, Double direction)

Emil
Replied On June 22, 2019 05:13 PM UTC

I have downgraded on 17.1.0.40, everything works fine using xamarin.forms 4.0.
It seems like that you have either bug or breaking change in between versions. 

Rachel A [Syncfusion]
Replied On June 24, 2019 10:43 AM UTC

Hi Emil, 
 
We deeply regret for the inconvenience caused.  
 
Query 1: Regarding Catastrophic failure exception. 
We have already checked and resolved this problem in our side. The fix will be included in our upcoming Volume 2 release, which is scheduled to be rolled out at the end of June 2019.  
 
To avoid the delay, you can use the below alternative solution by defining FontFamily property as shown in the below code example.  
[XAML] 
<chart:SfChart.PrimaryAxis> 
    <chart:DateTimeCategoryAxis AutoScrollingDelta="7"   AutoScrollingMode="End"  > 
        <chart:DateTimeCategoryAxis.Title> 
            <chart:ChartAxisTitle Text="{Binding AxisTitle}" FontFamily="Segoe UI"></chart:ChartAxisTitle> 
        </chart:DateTimeCategoryAxis.Title> 
    </chart:DateTimeCategoryAxis> 
</chart:SfChart.PrimaryAxis> 
<chart:SfChart.SecondaryAxis> 
    <chart:NumericalAxis  Minimum="0" Maximum="{Binding NumericalAxisMax}" Interval="{Binding NumericalAxisInterval}" > 
        <chart:NumericalAxis.Title> 
            <chart:ChartAxisTitle Text="{Binding NumericalAxisTitle}" FontFamily="Segoe UI"></chart:ChartAxisTitle> 
        </chart:NumericalAxis.Title> 
    </chart:NumericalAxis> 
</chart:SfChart.SecondaryAxis> 
 
 
Query 2: Regarding ArgumentOutOfRangeException 
We are afraid, that the issue is not reproduced. The sample we tested can be downloaded from the below location.   
  
So, can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to investigate further and provide you a better solution at the earliest. 
 
Regards, 
Rachel.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon