This is a migrated thread and some comments may be shown as answers.

Chart Localization

1 Answer 79 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Lucy
Top achievements
Rank 1
Lucy asked on 15 Jan 2019, 12:45 AM

Hello,

How to format the yaxis label based on the culture? The following code always renders the yaxis in "en" format instead of "fr", when the user loaded in "fr" mode. Y axis will be having amount value.

<script src="js/kendo.all.min.js"></script>
<script src="js/kendo.culture.en-CA.min.js"></script>
<script src="js/kendo.culture.fr-CA.min.js"></script>
 
kendo.culture("<%=GetCultureString()%>");
 
<PlotArea>
<YAxis>
<LabelsAppearance DataFormatString="C" />
</YAxis>


I tried this as well, but didnt work

<YAxis>
<LabelsAppearance>  
<ClientTemplate>#if(value > 0){# #= kendo.format(\'{0:C1}\', value)# #}#</ClientTemplate>
</LabelsAppearance>

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 17 Jan 2019, 01:26 PM
Hi Lucy,

Can you try with the kendo.toString() function as shown here (EDIT: fixed link): https://docs.telerik.com/kendo-ui/api/javascript/kendo/methods/tostring?

Also, remove the reference to kendo.all.min.js, RadHtmlChart already fetches the necessary Kendo scripts and this will result in a double declaration of the Kendo objects and this may, in turn, cause weird issues.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Chart (HTML5)
Asked by
Lucy
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or