This topic is locked
[SOLVED]

 Currency Formatting

12/15/2017 6:00:09 PM
PHPRunner General questions
J
jiscar author

Hi,
How can I format numbers as german money decimal format in this JavaScript?
102176.85 to €102'176.85

Or

102176.85 to €102.176,85

var series = chart.getSeriesAt(0);
series.labels().textFormatter(function(){
var num = Number(this.value);
return(("€"+num.toFixed(2)));
});


thx

Sergey Kornilov admin 12/15/2017

It looks like you can use anychart.format.number(this.value, 2, ".", ",") function.
See code example at https://playground.anychart.com/docs/8.0.1/samples/CS_format_05_1

J
jiscar author 12/16/2017



It looks like you can use anychart.format.number(this.value, 2, ".", ",") function.
See code example at https://playground.anychart.com/docs/8.0.1/samples/CS_format_05_1


Thanks, it worked