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

Dash line for axis

I was following this link to style my axis line to be dashed. 

but my visual studio is showing the following error
A value of type 'ArrayExtension' cannot be added to a collection or dictionary of type 'Double[]'.


1 Reply

MK Muneesh Kumar G Syncfusion Team September 4, 2019 11:52 AM UTC

Hi Benjamin, 
  
Greetings from Syncfusion.  
 
We can able to reproduce the reported problem issue at our end, but we would like to inform you that it is not related with SfChart, this compilation error will not affect the solution deployment. It will run while showing these error message time also.  
  
As by this forum, we can overcome this issue by declaring array in resources by below. 
  
    <ContentPage.Resources> 
        <x:Array x:Key="StrokeArray" Type="{x:Type x:Double}"> 
            <x:Double>5</x:Double> 
            <x:Double>6</x:Double> 
        </x:Array> 
    </ContentPage.Resources> 
. . . 
. . . 
<chart:NumericalAxis.AxisLineStyle> 
                        <chart:ChartLineStyle StrokeColor="Black" StrokeDashArray="{StaticResource StrokeArray}"> 
                        </chart:ChartLineStyle> 
                    </chart:NumericalAxis.AxisLineStyle> 
  
Please let us know if you have any other queries.  
  
Regards,    
Muneesh Kumar G 
 


Loader.
Up arrow icon