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

How to add the currency symbol on the Y axis

Thread ID:

Created:

Updated:

Platform:

Replies:

130160 Apr 26,2017 03:43 AM UTC May 1,2017 04:52 AM UTC Android 5
loading
Tags: SfChart
Giovanni Cuadra
Asked On April 26, 2017 03:43 AM UTC

Hello everyone,


How can I add the currency symbol to the Y axis in Android ?, I searched everywhere and I could not find something that would allow me to do it, however in the examples that you offer from the online documentation appear print screen with the symbol Of currency.


Thank you.

Attachment: axis_img11_c269fc88.rar

Saravana Pandian Murugan [Syncfusion]
Replied On April 27, 2017 09:02 AM UTC

Hi Giovanni, 
  
Thanks for using Syncfusion products. 
  
You can achieve your requirement by using LabelFormat property of ChartAxisLabelStyle. Please find the code snippet below. 
  
Code Snippet: 
  
[XAML] 
  
 
<chart:NumericalAxis.LabelStyle> 
  
    <chart:ChartAxisLabelStyle LabelFormat = "$##.##"/> 
  
</chart:NumericalAxis.LabelStyle> 
  
  
  
[C#] 
  
 
NumericalAxis numericalAxis = new NumericalAxis(); 
  
numericalAxis.LabelStyle.LabelFormat = "$##.##"; 
  
chart.SecondaryAxis = numericalAxis; 
  
  
Please let us know if you need further assistance.  
 
Regards, 
Saravana Pandian M. 


Giovanni Cuadra
Replied On April 27, 2017 04:34 PM UTC

Hi,


Very good to know using Xamarin, but what happens in Android Studio, as it is achieved from there.



Thanks.

Saravana Pandian Murugan [Syncfusion]
Replied On April 28, 2017 07:33 AM UTC

Hi Giovanni,  

You can achieve your requirement by using LabelFormat property of ChartAxisLabelStyle in Android platform also. Please find the code snippet below.  
 
Code Snippet: 

 
NumericalAxis numericalAxis = new NumericalAxis(); 

numericalAxis.getLabelStyle().setLabelFormat(
"$##.##");

 
chart.setSecondaryAxis(numericalAxis); 



We have attached sample for your reference which can be downloaded from the below location. 


Please let us know if you need any further assistance. 

Regards, 
Saravana Pandian M. 


Giovanni Cuadra
Replied On April 28, 2017 03:57 PM UTC

Hi,


Thanks.

Saravana Pandian Murugan [Syncfusion]
Replied On May 1, 2017 04:52 AM UTC

Hi Giovanni,

Thanks for the update. We are glad to know that the given solution worked. Please get back to us if you need further assistance.

Regards,
Saravana Pandian 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.

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

;