Thousands separators using Draw widget in WAB dev

2287
2
Jump to solution
08-12-2015 11:35 AM
DiegoLlamas
Occasional Contributor III

Hi,

I want to invert the separator for every thousand. When I use Draw widget in WAB I got a (,) separating the decimals and a dot separating the thousands

I identify in the widget.js file of the draw widget the variable that is used to make that separation and the symbols

So I opened the utils.js file and i found the pattern that is used to separate the thousands and decimals and it seems to be correct

I also check this in WAB widget option and it is using the same format and I would like to use a dot for decimals and coma for thousands

My question is, am i looking in the correct file to invert the symbols used to separate decimals and thousands?  How can I accomplish this?

Thanks,

Diego Llamas

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Diego,

  The locale that your app is using defines the way the number will be formatted using the num.toLocaleString().

You can use the locale option to force the US english number format like this.

var localeLength = jimuUtils.localizeNumber(length.toFixed(1),{locale:"en-US"});

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Diego,

  The locale that your app is using defines the way the number will be formatted using the num.toLocaleString().

You can use the locale option to force the US english number format like this.

var localeLength = jimuUtils.localizeNumber(length.toFixed(1),{locale:"en-US"});

View solution in original post

DiegoLlamas
Occasional Contributor III

Thank you Robert

0 Kudos