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

DataMarker inside a circular gauge- displaying an integer as a percentage value

I need to display an integer field in the ViewModel as a percentage value inside the gauge, ie if score is 80 for an object, it should be displayed as "80%" inside the gauge. Right now I can bind this property to the gauge header's 'Text', however unlike in PieCharts, DataMarker with 'LabelPostFix' option is unavailable for Circular gauges , so all I am getting inside the gauge is '80'. Is there a way to achieve this  without using custom renderer ? (Please provide an example if Custom Renderer needs to be used.)

1 Reply

SP Subburaj Pandian Veluchamy Syncfusion Team January 31, 2017 06:55 AM UTC

Hi Bg, 
 
Thank you for your interest in Syncfusion products. 
 
Based on the provided information, we have checked and your requirement of setting symbol (%) along with the HeaderText in CircularGauge 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.  
 


Loader.
Up arrow icon