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. Image for the cookie policy date
close icon

SfChart: System.ArgumentOutOfRangeException for ColumnSeries.CreateSegments ()

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

3 Replies

MK Muneesh Kumar G Syncfusion Team 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. 



MC Matteo Comi 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


MK Muneesh Kumar G Syncfusion Team 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.  
 


Loader.
Live Chat Icon For mobile
Up arrow icon