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: System.ArgumentOutOfRangeException for ColumnSeries.CreateSegments ()

Thread ID:

Created:

Updated:

Platform:

Replies:

147771 Sep 23,2019 03:31 PM UTC Oct 3,2019 02:08 PM UTC Xamarin.Forms 3
loading
Tags: SfChart
Matteo Comi
Asked On September 23, 2019 03:31 PM UTC

Hello,
I have a problem with this control.
I created a page with a listview and four charts in a custom control. When the page is loaded, the listview is visible and the custom control is hidden. When the user clicks a button, visibilities of listview and custom control are changed. Itemsources are via data binding.
In the page there's another button: clicking it performs a refresh of the database and a busyindicator is shown. When the refresh is completed, the listview is shown and the custom control with the four charts is hidden once again. When the user clicks the first button, the app throws the exception in the subject of the thread.

The custom control has attached a behaviour the retrieve show data.


Thanks in advance.

Regards,
Matteo

Muneesh Kumar G [Syncfusion]
Replied On September 24, 2019 09:57 AM UTC

Hi Matteo, 
  
Greetings, we have tried to reproduce the reported issue at our end based on the provided information. But we afraid that the issue not reproduced at our end. We have attached the prepared sample. 
  
  
Since we are not aware of your exact application scenario, we were not able to reproduce this issue at our end, so can you please revert us by modifying the sample based on your application and also please share the complete call stack or code snippets. This will be helpful for us to investigate further and provide you a better solution at the earliest.

 
Thanks, 
Muneesh Kumar G. 


Matteo Comi
Replied On October 2, 2019 03:51 PM UTC

Hi,
I updated the control to version 17.2.0.51 and the problem seems fixed.
I found another issue: one of my four charts is a Stacked doughnut with a CenterView, containg an image. This is the code of the xaml part:

<chart:DoughnutSeries.CenterView>
<ffimageloading:CachedImage x:Name="centerImage" Aspect="AspectFill" DownsampleToViewSize="True" HeightRequest="{Binding InnerRadius, Converter={StaticResource ImageSize}, ConverterParameter=Series}" HorizontalOptions="Center" VerticalOptions="Center" WidthRequest="{Binding InnerRadius, Converter={StaticResource ImageSize}, ConverterParameter=Series}">
<ffimageloading:CachedImage.Transformations>
<fftransformations:CircleTransformation />
</ffimageloading:CachedImage.Transformations>
</ffimageloading:CachedImage>
</chart:DoughnutSeries.CenterView>

This is the converter:

public class ImageSizeConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value == null)
            return value;

        float size = (float)value;

        return float.IsNaN(size) ? 0 : /*(Device.RuntimePlatform == Device.Android) ? size / 1.75 + 4 :*/ (size * 2) - 10;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return value;
    }
}

The first time the chart loads, it displays the image correctly. From the second time, the image disappears. I took the code from one of your samples, but I don't remember which one. What am I doing wrong?

Thanks in advance,
Matteo

Muneesh Kumar G [Syncfusion]
Replied On October 3, 2019 02:08 PM UTC

Hi Matteo, 
 
We have checked to replicate the issue based on the provided code snippet, but we are afraid, that we are not able to reproduce the issue at our end. The sample we tried can be downloaded from the below location. 
 
 
Please check once after updating the sample to latest volume 3 beta version whether the issue still occurs. If yes, please revert us the attached sample based on your application along with replication. This will be helpful for us to provide a better solution at the earliest.  
   
Thanks,   
Muneesh Kumar G.  
 


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