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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

LabelContent for chart to include both percentage and y value?

Thread ID:





124736 Jun 27,2016 12:01 AM UTC Jan 31,2017 08:41 AM UTC Xamarin.Forms 4
Tags: SfSchedule
Jeff Lindborg
Asked On June 27, 2016 12:01 AM UTC

using the pieSeries and currently just have the ChartDataMarker set with a LabelContent = LabelContent.Percentage - which is ok, however I'd also like to show the count (i.e. "%28 (142)") - both numbers are useful.  Doesn't look to be an option currently, if not I'd like to submit it for a feature request.

Jaikrishna Chandrasekar [Syncfusion]
Replied On June 27, 2016 01:00 PM UTC

Hi Jeff Lindborg,  
Thanks for contacting Syncfusion support.   
We can show both the percentage values and Y values in the data marker label by using ChartDelegate in iOS and CustomRenderer in Andriod.   
In iOS:   
ChartDelegate has a method called GetFormattedAxisLabel using that we can display the Y values along with the percentage values.   
In Android:   
SfChart has an event called DataMarkerLabelCreated using that we can display the Yvalues along with percentage values.   
We have prepared a sample and it can be downloaded from the below location.   
Jaikrishna C   

Replied On January 30, 2017 10:00 AM UTC

What about the data marker for a circular gauge ? I want to show the value as percentage inside the circular gauge using data binding, which in the viewmodel is given as an integer. 

Replied On January 30, 2017 10:05 AM UTC

how can I add a postfix to the header of a circular gauge?

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 31, 2017 08:41 AM UTC

Hi Bg, 
Based on the provided information, we have checked and your requirement of setting postfix label along with the HeaderText in SfCircularGauge Xamarin Forms can be achieved by adding the required symbol with the HeaderText in the code behind. Since HeaderText is a String you can convert and set Text as per this requirement. Please refer the below code example, 
header.Text = header.Text + "%"; 
We have prepared sample based on the mentioned scenario, please find the below sample. 
Sample link: GaugeHeader_Sample 
In the sample, we have added CircularGauge properties in the XAML and bind the pointer values and HeaderText. As mentioned in the code example added the HeaderText in the propertyChanged on HeaderText. 
If the given solution doesn’t meet your requirement, could you please revert to us by modifying the provided sample based on your requirement with more information about your query, it will be helpful for us to analyze on it and provide you a better solution. 
Subburaj Pandian V.  


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