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

How to add the currency symbol on the Y axis

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

5 Replies

SP Saravana Pandian Murugan Syncfusion Team 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. 



GC Giovanni Cuadra 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.


SP Saravana Pandian Murugan Syncfusion Team 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. 



GC Giovanni Cuadra April 28, 2017 03:57 PM UTC

Hi,


Thanks.


SP Saravana Pandian Murugan Syncfusion Team 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.

Loader.
Up arrow icon