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

DataMaker show outside SfChart (Pie Series)

Thread ID:

Created:

Updated:

Platform:

Replies:

148305 Oct 15,2019 01:26 AM UTC Oct 17,2019 09:46 AM UTC Xamarin.Forms 3
loading
Tags: SfChart
Nguyen Khoa Lu
Asked On October 15, 2019 02:49 AM UTC

When I have many XPath with value 0. The SfChart show DataMaker outside the Frame. And background Datamaker same between of T1 and T11 , T2 and T12. How to fix it?
This my code:
DataMarkerPosition = CircularSeriesDataMarkerPosition.OutsideExtended;
EnableSmartLabels = true;
ShowMarkerAtLineEnd = true;
Did you had solution for this?

Attachment: Error_e4605daa.rar

Hemalatha Marikumar [Syncfusion]
Replied On October 15, 2019 08:48 AM UTC

Hi Nguyen Khoa Lu,

Greetings from Syncfusion.

Query 1: The SfChart show DataMarker outside the Frame. 
 
Due to the lack of space in PieSeries, DataMarker goes out of the frame. You can resolve this issue by setting the StartAngle and EndAngle properties in PieSeries.  
 
Please refer below code snippet. 
  
Code Snippet [Xaml]: 
 <chart:SfChart.Series> 
               <chart:PieSeries StartAngle="330" EndAngle="690" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" 
                                      EnableSmartLabels="True" ConnectorLineType="Line"  
                                 DataMarkerPosition="OutsideExtended" ShowMarkerAtLineEnd="True"> 
      </chart:PieSeries> 
</chart:SfChart.Series> 
  
Query 2: And background Datamarker same between of T1 and T11 , T2 and T12. 
 
We have provided only ten colors in source level, so the same colors will repeat it when the datapoint is more than ten. You can resolve this issue by setting the CustomBrushes in ChartSeries
 
 Please refer below code snippet. 
  
Code Snippet [Xaml]: 
 
<StackLayout.Resources> 
            <ResourceDictionary> 
                <chart:ChartColorCollection x:Key="Colors"> 
                    <Color>Red</Color> 
                    <Color>Gray</Color> 
                    <Color>Blue</Color> 
                    <Color>Pink</Color> 
                    <Color>YellowGreen</Color> 
                    <Color>Aqua</Color> 
                    <Color>Brown</Color> 
                    <Color>DarkGreen</Color> 
                    <Color>Violet</Color> 
                    <Color>Purple</Color> 
                    <Color>Accent</Color> 
                    <Color>Maroon</Color> 
                    <Color>Lavender</Color> 
                    <Color>Navy</Color> 
                </chart:ChartColorCollection> 
            </ResourceDictionary> 
</StackLayout.Resources> 
<chart:SfChart.Series> 
               <chart:PieSeries StartAngle="330" EndAngle="690" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" 
                                      EnableSmartLabels="True" ConnectorLineType="Line"  
                                 DataMarkerPosition="OutsideExtended" ShowMarkerAtLineEnd="True"> 
                <chart:PieSeries.ColorModel> 
                        <chart:ChartColorModel Palette="Custom" CustomBrushes="{StaticResource Colors}"/> 
              </chart:PieSeries.ColorModel> 
      </chart:PieSeries> 
</chart:SfChart.Series> 
  
Please refer below link to know more about the CustomBrushes. 
  
And we have prepared a sample based on your requirement and you can download the sample from the below link. 
  
  
Screenshot: 
 
  
Regards, 
Hemalatha M. 
 


Nguyen Khoa Lu
Replied On October 16, 2019 07:27 AM UTC

Thanks you. I did it!

Hemalatha Marikumar [Syncfusion]
Replied On October 17, 2019 09:46 AM UTC

Hi Nguyen Khoa Lu, 
 
Thanks for your update. We glad to hear that given solution works. 
 
Please let us know if you have any other query. 
 
Regards, 
Hemalatha M. 
 


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