Legend Color for iOS not rendering.

Hi.
I'm trying to display a small  colored circle next to each label in the chart legend based on the IconColor.
It is working like a charm on Android but for some reason its not rendering on iOS.

My code :

<chart:SfChart.Legend>
<chart:ChartLegend  IsIconVisible="True" IsVisible="True" DockPosition="Bottom" OverflowMode="Wrap" ToggleSeriesVisibility="True">
     <chart:ChartLegend.ItemTemplate>
          <DataTemplate>
               <StackLayout Orientation="Horizontal">
                   <BoxView Color="{Binding IconColor}" CornerRadius="8"  HorizontalOptions="Center" VerticalOptions="Center" HeightRequest="10" WidthRequest="10" />
                   <Label FontSize="14" VerticalTextAlignment="Center" Text="{Binding Label}" TextColor="{Binding IconColor}"/>
                </StackLayout>
          </DataTemplate>
     </chart:ChartLegend.ItemTemplate>
</chart:ChartLegend>
</chart:SfChart.Legend>

I even tried using a converter,  IconColor is a Xamarin.Forms.Color no problem but its not rendered.

The result screenshot on Android and iOS and some code attached

Any help would be greatly appreciated

Attachment: sfChart_43eea93c.zip

4 Replies 1 reply marked as answer

SM Saravanan Madheswaran Syncfusion Team April 23, 2021 03:55 PM UTC

Hi Louis,  
  
Greetings from Syncfusion.  
 
We have validated the provided code and the reported issue has been reproduced at iOS while using CustomGradientColors, and we have forward this to our development team for further validation. And we will update you the validation status in two business days (27th April 2021). 
 
Regards, 
Saravanan.  



DD Devakumar Dhanapoosanam Syncfusion Team April 28, 2021 04:09 PM UTC

Hi Louis, 
 
On further analysis with the provided code, we have found that you have declared gradient color collection for chart ColorModel. But, you have used specific hexa color for every series from data source. 
  
 
 
Could you please check with remove the below unused gradient color collection code in the chart and let us know whether your issue has resolved at your end or not. 
  
 
  
Regards, 
Devakumar D 


Marked as answer

LO Louis April 29, 2021 02:26 PM UTC

Hi Devakumar ,
You are right.

By removing the unused gradient  its working like a charm.

Thanks a lot.



DD Devakumar Dhanapoosanam Syncfusion Team April 30, 2021 09:03 AM UTC

Hi Louis, 
 
We are glad to hear that, let us know if you need any more assistance. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon