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.
Unfortunately, activation email could not send to your email. Please try again.

LabelContent for chart to include both percentage and y value?

Thread ID:

Created:

Updated:

Platform:

Replies:

124736 Jun 26,2016 08:01 PM Jan 31,2017 03:41 AM Xamarin.Forms 4
loading
Tags: SfSchedule
Jeff Lindborg
Asked On June 26, 2016 08:01 PM

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.
thanks

Jaikrishna Chandrasekar [Syncfusion]
Replied On June 27, 2016 09:00 AM

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.   
  
  
Regards,   
Jaikrishna C   


bg
Replied On January 30, 2017 05:00 AM

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. 

bg
Replied On January 30, 2017 05:05 AM

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


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

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, 
 
[c#] 
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. 
 
Regards,  
Subburaj Pandian V.  
 


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.

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.

;